about summary refs log tree commit diff
path: root/sysdeps/ieee754
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/ieee754')
-rw-r--r--sysdeps/ieee754/ldbl-opt/Makefile6
-rw-r--r--sysdeps/ieee754/ldbl-opt/Versions8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-compat.c153
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-compat.h14
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c15
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c15
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c15
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c15
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c15
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c8
-rw-r--r--sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c15
16 files changed, 316 insertions, 3 deletions
diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile
index 7f7bc3ce33..ce2d2d5d1d 100644
--- a/sysdeps/ieee754/ldbl-opt/Makefile
+++ b/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/sysdeps/ieee754/ldbl-opt/Versions b/sysdeps/ieee754/ldbl-opt/Versions
index d22b18ec89..74fb3383ab 100644
--- a/sysdeps/ieee754/ldbl-opt/Versions
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-compat.c b/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
index f82c5f60bb..b87f3bc476 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.c
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-compat.h b/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
index c0461000f0..c7824583d6 100644
--- a/sysdeps/ieee754/ldbl-opt/nldbl-compat.h
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c
new file mode 100644
index 0000000000..1d736668a4
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c
new file mode 100644
index 0000000000..dbea1512cf
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c
new file mode 100644
index 0000000000..ec2ec53291
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c
new file mode 100644
index 0000000000..52e1bd5d2a
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c
new file mode 100644
index 0000000000..927d024923
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c
new file mode 100644
index 0000000000..55556c375c
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c
new file mode 100644
index 0000000000..4fd54cb176
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c
new file mode 100644
index 0000000000..6284c9339b
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c
new file mode 100644
index 0000000000..0c19032b15
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c
new file mode 100644
index 0000000000..5f34221b62
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c
new file mode 100644
index 0000000000..a8a76ff54b
--- /dev/null
+++ b/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/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c b/sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c
new file mode 100644
index 0000000000..fc2f6f8598
--- /dev/null
+++ b/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;
+}