public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/azanella/redir-refactor] Use __REDIRECT_LDBL_COMPAT for _IO_vfscanf
@ 2022-03-03 19:23 Adhemerval Zanella
  0 siblings, 0 replies; only message in thread
From: Adhemerval Zanella @ 2022-03-03 19:23 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=021e142a767836c74552be7c536127aeb102dfbe

commit 021e142a767836c74552be7c536127aeb102dfbe
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date:   Mon Feb 28 11:06:00 2022 -0300

    Use __REDIRECT_LDBL_COMPAT for _IO_vfscanf
    
    The macro redirects for __nldbl__IO_vfscanf only when required
    and it removes a __LDBL_REDIR_DECL usage.

Diff:
---
 libio/libio.h    | 4 +++-
 misc/sys/cdefs.h | 5 +++++
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/libio/libio.h b/libio/libio.h
index d0184df878..b0c1c8c3a8 100644
--- a/libio/libio.h
+++ b/libio/libio.h
@@ -257,7 +257,9 @@ extern __ssize_t _IO_wpadn (FILE *, wint_t, __ssize_t);
 extern void _IO_free_wbackup_area (FILE *) __THROW;
 
 #ifdef __LDBL_COMPAT
-__LDBL_REDIR_DECL (_IO_vfscanf)
+extern int __REDIRECT_LDBL_COMPAT (_IO_vfscanf, (FILE * __restrict,
+						 const char * __restrict,
+						 __gnuc_va_list, int *__restrict));
 #endif
 
 libc_hidden_proto (__overflow)
diff --git a/misc/sys/cdefs.h b/misc/sys/cdefs.h
index d8069a7590..1beda4fc67 100644
--- a/misc/sys/cdefs.h
+++ b/misc/sys/cdefs.h
@@ -595,6 +595,8 @@ _Static_assert (0, "IEEE 128-bits long double requires redirection on this platf
 #  ifdef __REDIRECT
 #   define __REDIRECT_LDBL(name, proto, ieee128, compat) \
       __REDIRECT_LDBL1 (name, , , proto, compat)
+#   define __REDIRECT_LDBL_COMPAT(name, proto) \
+      __REDIRECT_LDBL1 (name, , , proto, __nldbl_##name)
 #   ifdef __cplusplus
 #    define __REDIRECT_LDBL_NTH(name, proto, ieee128, compat) \
       __REDIRECT_LDBL1 (name, __THROW, , proto, compat)
@@ -620,6 +622,9 @@ _Static_assert (0, "Compat long double requires redirection on this platform");
 # define __REDIRECT_LDBL128_NTH(name, proto) name proto __THROW
 # define __REDIRECT_LDBL128_NTHNL(name, proto) name proto __THROWNL
 #endif
+#ifndef __REDIRECT_LDBL_COMPAT
+# define __REDIRECT_LDBL_COMPAT(name, proto)
+#endif
 
 #if __LDOUBLE_REDIRECTS_TO_FLOAT128_ABI == 1
 # ifdef __REDIRECT


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-03-03 19:23 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-03 19:23 [glibc/azanella/redir-refactor] Use __REDIRECT_LDBL_COMPAT for _IO_vfscanf Adhemerval Zanella

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).