about summary refs log tree commit diff
path: root/sysdeps/ieee754/ldbl-opt
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2007-09-18 19:04:01 +0000
committerUlrich Drepper <drepper@redhat.com>2007-09-18 19:04:01 +0000
commit874aa52349cc111d1f6ea5dff24bb14c306714e0 (patch)
tree40cc28100e18b8b9d8311038b0d3f9dd38bcfe0f /sysdeps/ieee754/ldbl-opt
parent883f7943f242c174c49bc82d51fe8332ad50d573 (diff)
downloadglibc-874aa52349cc111d1f6ea5dff24bb14c306714e0.tar.gz
glibc-874aa52349cc111d1f6ea5dff24bb14c306714e0.tar.xz
glibc-874aa52349cc111d1f6ea5dff24bb14c306714e0.zip
* include/stdio.h (__isoc99_fscanf, __isoc99_scanf,
	__isoc99_sscanf, __isoc99_vscanf): New prototypes.
	(__isoc99_vsscanf, __isoc99_vfscanf): New prototypes, add
	libc_hidden_proto.
	* include/wchar.h (__isoc99_fwscanf, __isoc99_wscanf,
	__isoc99_swscanf, __isoc99_vwscanf): New prototypes.
	(__isoc99_vswscanf, __isoc99_vfwscanf): New prototypes,
	add libc_hidden_proto.
	* libio/stdio.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/wchar.h (fwscanf, wscanf, swscanf, vfwscanf, vwscanf,
	vswscanf): Redirect to __isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* libio/bits/stdio-ldbl.h (fscanf, scanf, sscanf, vfscanf, vscanf,
	vsscanf): Redirect to __nldbl___isoc99_* if strict ISO C99 or POSIX
	conformance requested.
	* wcsmbs/bits/wchar-ldbl.h (fwscanf, wscanf, swscanf, vfwscanf,
	vwscanf, vswscanf): Redirect to __nldbl___isoc99_* if strict
	ISO C99 or POSIX conformance requested.
	* stdio-common/Versions (libc): Export __isoc99_scanf@@GLIBC_2.7,
	__isoc99_vscanf@@GLIBC_2.7, __isoc99_fscanf@@GLIBC_2.7,
	__isoc99_vfscanf@@GLIBC_2.7, __isoc99_sscanf@@GLIBC_2.7
	and __isoc99_vsscanf@@GLIBC_2.7.
	* stdio-common/Makefile (routines): Add isoc99_scanf, isoc99_vscanf,
	isoc99_fscanf, isoc99_vfscanf, isoc99_sscanf and isoc99_vsscanf.
	(tests): Add scanf14.
	(CFLAGS-vfprintf.c, CFLAGS-fprintf.c, CFLAGS-printf.c,
	CFLAGS-vfwprintf.c, CFLAGS-vfscanf.c, CFLAGS-vfwscanf.c,
	CFLAGS-fscanf.c, CFLAGS-scanf.c, CFLAGS-isoc99_vfscanf.c,
	CFLAGS-isoc99_vscanf.c, CFLAGS-isoc99_fscanf.c,
	CFLAGS-isoc99_scanf.c): Add $(exceptions).
	(CFLAGS-scanf15.c): Add various -I paths to prevent the compiler
	from using internal headers.
	* wcsmbs/Versions (libc): Export __isoc99_wscanf@@GLIBC_2.7,
	__isoc99_vwscanf@@GLIBC_2.7, __isoc99_fwscanf@@GLIBC_2.7,
	__isoc99_vfwscanf@@GLIBC_2.7, __isoc99_swscanf@@GLIBC_2.7
	and __isoc99_vswscanf@@GLIBC_2.7.
	* wcsmbs/Makefile (routines): Add isoc99_wscanf, isoc99_vwscanf,
	isoc99_fwscanf, isoc99_vfwscanf, isoc99_swscanf and isoc99_vswscanf.
	(CFLAGS-isoc99_wscanf.c, CFLAGS-isoc99_fwscanf.c,
	CFLAGS-isoc99_vwscanf.c, CFLAGS-isoc99_vfwscanf.c): Add $(exceptions).
	(CPPFLAGS): Add -D_IO_MTSAFE_IO if needed.
	* stdio-common/isoc99_scanf.c: New file.
	* stdio-common/isoc99_vsscanf.c: New file.
	* stdio-common/isoc99_vscanf.c: New file.
	* stdio-common/isoc99_vfscanf.c: New file.
	* stdio-common/isoc99_fscanf.c: New file.
	* stdio-common/isoc99_sscanf.c: New file.
	* wcsmbs/isoc99_fwscanf.c: New file.
	* wcsmbs/isoc99_vswscanf.c: New file.
	* wcsmbs/isoc99_swscanf.c: New file.
	* wcsmbs/isoc99_wscanf.c: New file.
	* wcsmbs/isoc99_vwscanf.c: New file.
	* wcsmbs/isoc99_vfwscanf.c: New file.
	* libio/libio.h (_IO_FLAGS2_SCANF_STD): Define.
	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Also
	clear _IO_FLAGS2_SCANF_STD bit from _flags2.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Don't
	handle %as, %aS and %a[ if _IO_FLAGS2_SCANF_STD is set in _flags2.
	* stdio-common/scanf14.c: New test.
	* stdio-common/scanf15.c: New test.
	* sysdeps/ieee754/ldbl-opt/Makefile (libnldbl-calls): Add
	isoc99_scanf, isoc99_fscanf, isoc99_sscanf,
	isoc99_vscanf, isoc99_vfscanf, isoc99_vsscanf,
	isoc99_wscanf, isoc99_fwscanf, isoc99_swscanf,
	isoc99_vwscanf, isoc99_vfwscanf and isoc99_vswscanf.
	* sysdeps/ieee754/ldbl-opt/Versions (libc): Export
	__nldbl___isoc99_scanf@@GLIBC_2.7,
	__nldbl___isoc99_fscanf@@GLIBC_2.7,
	__nldbl___isoc99_sscanf@@GLIBC_2.7,
	__nldbl___isoc99_vscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfscanf@@GLIBC_2.7,
	__nldbl___isoc99_vsscanf@@GLIBC_2.7,
	__nldbl___isoc99_wscanf@@GLIBC_2.7,
	__nldbl___isoc99_fwscanf@@GLIBC_2.7,
	__nldbl___isoc99_swscanf@@GLIBC_2.7,
	__nldbl___isoc99_vwscanf@@GLIBC_2.7,
	__nldbl___isoc99_vfwscanf@@GLIBC_2.7
	and __nldbl___isoc99_vswscanf@@GLIBC_2.7.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (__isoc99_scanf,
	__isoc99_fscanf, __isoc99_sscanf, __isoc99_vscanf,
	__isoc99_vfscanf, __isoc99_vsscanf, __isoc99_wscanf,
	__isoc99_fwscanf, __isoc99_swscanf, __isoc99_vwscanf,
	__isoc99_vfwscanf, __isoc99_vswscanf): Add NLDBL_DECL.
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.c
	(__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): New
	functions.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_swscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_wscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_scanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_sscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vsscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vfwscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vswscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_vscanf.c: New file.
	* sysdeps/ieee754/ldbl-opt/nldbl-isoc99_fscanf.c: New file.

	* stdio-common/Makefile (tests): Add scanf13.
	(scanf13-ENV): New.
	* stdio-common/vfscanf.c (_IO_vfscanf_internal): Handle
	m modifier followed by l.
	(STRING_ARG): Add width argument.
	(_IO_vfscanf_internal) <case L_('c')>: Handle %mc.
	<case L_('C')>: Handle %mlc and %mC.
	<case L_('s'), case L_('S'), case L_('[')>: Adjust STRING_ARG
	arguments.
	* stdio-common/scanf13.c: New test.

	* libio/libioP.h (_IO_acquire_lock_clear_flags2_fct): Clear
	the _IO_FLAGS2_FORTIFY bit from _flags2 rather than _flags.

	type and __THROW marker of splice, vmsplice, and tee.
Diffstat (limited to 'sysdeps/ieee754/ldbl-opt')
-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;
+}