diff options
author | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-09-25 15:22:16 +0000 |
---|---|---|
committer | joseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d> | 2007-09-25 15:22:16 +0000 |
commit | 39214d562d474c17d8242008f5454e9c9ca710ad (patch) | |
tree | 1c44f1babbdb5d368fc0e1032b4e9d013af2263a /libc/sysdeps/ieee754/ldbl-opt | |
parent | 9238710d492f92f0221bba03ee01c08ccbd6387c (diff) | |
download | eglibc2-39214d562d474c17d8242008f5454e9c9ca710ad.tar.gz |
Merge changes between r3467 and r3614 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@3615 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/sysdeps/ieee754/ldbl-opt')
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/Makefile | 6 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/Versions | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c | 153 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h | 14 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c | 15 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c | 8 | ||||
-rw-r--r-- | libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c | 15 |
16 files changed, 316 insertions, 3 deletions
diff --git a/libc/sysdeps/ieee754/ldbl-opt/Makefile b/libc/sysdeps/ieee754/ldbl-opt/Makefile index 7f7bc3ce3..ce2d2d5d1 100644 --- a/libc/sysdeps/ieee754/ldbl-opt/Makefile +++ b/libc/sysdeps/ieee754/ldbl-opt/Makefile @@ -35,7 +35,11 @@ libnldbl-calls = asprintf dprintf fprintf fscanf fwprintf fwscanf iovfscanf \ jn yn ilogb remquo lrint lround llrint llround nexttowardf \ nexttoward conj cacos cacosh casin catan catanh ccos ccosh \ casinh cexp clog cproj csin csinh csqrt ctan ctanh cpow \ - cabs carg cimag creal clog10 + cabs carg cimag creal clog10 \ + isoc99_scanf isoc99_fscanf isoc99_sscanf \ + isoc99_vscanf isoc99_vfscanf isoc99_vsscanf \ + isoc99_wscanf isoc99_fwscanf isoc99_swscanf \ + isoc99_vwscanf isoc99_vfwscanf isoc99_vswscanf libnldbl-routines = $(libnldbl-calls:%=nldbl-%) libnldbl-inhibit-o = $(object-suffixes) libnldbl-static-only-routines = $(libnldbl-routines) diff --git a/libc/sysdeps/ieee754/ldbl-opt/Versions b/libc/sysdeps/ieee754/ldbl-opt/Versions index d22b18ec8..74fb3383a 100644 --- a/libc/sysdeps/ieee754/ldbl-opt/Versions +++ b/libc/sysdeps/ieee754/ldbl-opt/Versions @@ -65,6 +65,14 @@ libc { __nldbl___swprintf_chk; __nldbl___vswprintf_chk; __nldbl___fwprintf_chk; __nldbl___wprintf_chk; __nldbl___vfwprintf_chk; __nldbl___vwprintf_chk; } + GLIBC_2.7 { + __nldbl___isoc99_scanf; __nldbl___isoc99_fscanf; + __nldbl___isoc99_sscanf; __nldbl___isoc99_vscanf; + __nldbl___isoc99_vfscanf; __nldbl___isoc99_vsscanf; + __nldbl___isoc99_wscanf; __nldbl___isoc99_fwscanf; + __nldbl___isoc99_swscanf; __nldbl___isoc99_vwscanf; + __nldbl___isoc99_vfwscanf; __nldbl___isoc99_vswscanf; + } } libm { NLDBL_VERSION { diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c index f82c5f60b..b87f3bc47 100644 --- a/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.c @@ -1,5 +1,5 @@ /* *printf* family compatibility routines for IEEE double as long double - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006. @@ -50,6 +50,10 @@ libc_hidden_proto (__nldbl___vsprintf_chk) libc_hidden_proto (__nldbl___vswprintf_chk) libc_hidden_proto (__nldbl___vstrfmon) libc_hidden_proto (__nldbl___vstrfmon_l) +libc_hidden_proto (__nldbl___isoc99_vsscanf) +libc_hidden_proto (__nldbl___isoc99_vfscanf) +libc_hidden_proto (__nldbl___isoc99_vswscanf) +libc_hidden_proto (__nldbl___isoc99_vfwscanf) static void __nldbl_cleanup (void *arg) @@ -782,6 +786,153 @@ __nldbl_vsyslog (int pri, const char *fmt, va_list ap) __nldbl___vsyslog_chk (pri, -1, fmt, ap); } +int +attribute_compat_text_section +__nldbl___isoc99_vfscanf (FILE *s, const char *fmt, va_list ap) +{ + int res; + set_no_long_double (); + res = __isoc99_vfscanf (s, fmt, ap); + clear_no_long_double (); + return res; +} +libc_hidden_def (__nldbl___isoc99_vfscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_sscanf (const char *s, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vsscanf (s, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_vsscanf (const char *string, const char *fmt, va_list ap) +{ + int res; + __no_long_double = 1; + res = __isoc99_vsscanf (string, fmt, ap); + __no_long_double = 0; + return res; +} +libc_hidden_def (__nldbl___isoc99_vsscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_vscanf (const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vfscanf (stdin, fmt, ap); +} + +int +attribute_compat_text_section +__nldbl___isoc99_fscanf (FILE *stream, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stream, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_scanf (const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) +{ + int res; + set_no_long_double (); + res = __isoc99_vfwscanf (s, fmt, ap); + clear_no_long_double (); + return res; +} +libc_hidden_def (__nldbl___isoc99_vfwscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vswscanf (s, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_vswscanf (const wchar_t *string, const wchar_t *fmt, + va_list ap) +{ + int res; + __no_long_double = 1; + res = __isoc99_vswscanf (string, fmt, ap); + __no_long_double = 0; + return res; +} +libc_hidden_def (__nldbl___isoc99_vswscanf) + +int +attribute_compat_text_section +__nldbl___isoc99_vwscanf (const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vfwscanf (stdin, fmt, ap); +} + +int +attribute_compat_text_section +__nldbl___isoc99_fwscanf (FILE *stream, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stream, fmt, arg); + va_end (arg); + + return done; +} + +int +attribute_compat_text_section +__nldbl___isoc99_wscanf (const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} + #if LONG_DOUBLE_COMPAT(libc, GLIBC_2_0) compat_symbol (libc, __nldbl__IO_printf, _IO_printf, GLIBC_2_0); compat_symbol (libc, __nldbl__IO_sprintf, _IO_sprintf, GLIBC_2_0); diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h index c0461000f..c7824583d 100644 --- a/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-compat.h @@ -1,5 +1,5 @@ /* Prototypes for compatibility double == long double entry points. - Copyright (C) 2006 Free Software Foundation, Inc. + Copyright (C) 2006, 2007 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@cygnus.com>, 2006. @@ -61,6 +61,18 @@ NLDBL_DECL (qecvt); NLDBL_DECL (qfcvt); NLDBL_DECL (qgcvt); NLDBL_DECL (__vstrfmon_l); +NLDBL_DECL (__isoc99_scanf); +NLDBL_DECL (__isoc99_fscanf); +NLDBL_DECL (__isoc99_sscanf); +NLDBL_DECL (__isoc99_vscanf); +NLDBL_DECL (__isoc99_vfscanf); +NLDBL_DECL (__isoc99_vsscanf); +NLDBL_DECL (__isoc99_wscanf); +NLDBL_DECL (__isoc99_fwscanf); +NLDBL_DECL (__isoc99_swscanf); +NLDBL_DECL (__isoc99_vwscanf); +NLDBL_DECL (__isoc99_vfwscanf); +NLDBL_DECL (__isoc99_vswscanf); /* This one does not exist in the normal interface, only __nldbl___vstrfmon really exists. */ diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c new file mode 100644 index 000000000..1d736668a --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_fscanf (FILE *stream, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stream, fmt, arg); + va_end (arg); + + return done; +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c new file mode 100644 index 000000000..dbea1512c --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_fwscanf (FILE *stream, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stream, fmt, arg); + va_end (arg); + + return done; +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c new file mode 100644 index 000000000..ec2ec5329 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_scanf (const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c new file mode 100644 index 000000000..52e1bd5d2 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_sscanf (const char *s, const char *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vsscanf (s, fmt, arg); + va_end (arg); + + return done; +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c new file mode 100644 index 000000000..927d02492 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_swscanf (const wchar_t *s, const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vswscanf (s, fmt, arg); + va_end (arg); + + return done; +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c new file mode 100644 index 000000000..55556c375 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vfscanf (FILE *s, const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vfscanf (s, fmt, ap); +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c new file mode 100644 index 000000000..4fd54cb17 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vfwscanf (FILE *s, const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vfwscanf (s, fmt, ap); +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c new file mode 100644 index 000000000..6284c9339 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vscanf (const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vfscanf (stdin, fmt, ap); +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c new file mode 100644 index 000000000..0c19032b1 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vsscanf (const char *string, const char *fmt, va_list ap) +{ + return __nldbl___isoc99_vsscanf (string, fmt, ap); +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c new file mode 100644 index 000000000..5f34221b6 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vswscanf (const wchar_t *string, const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vswscanf (string, fmt, ap); +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c new file mode 100644 index 000000000..a8a76ff54 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c @@ -0,0 +1,8 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_vwscanf (const wchar_t *fmt, va_list ap) +{ + return __nldbl___isoc99_vfwscanf (stdin, fmt, ap); +} diff --git a/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c new file mode 100644 index 000000000..fc2f6f859 --- /dev/null +++ b/libc/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c @@ -0,0 +1,15 @@ +#include "nldbl-compat.h" + +int +attribute_hidden +__isoc99_wscanf (const wchar_t *fmt, ...) +{ + va_list arg; + int done; + + va_start (arg, fmt); + done = __nldbl___isoc99_vfwscanf (stdin, fmt, arg); + va_end (arg); + + return done; +} |