aboutsummaryrefslogtreecommitdiff
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
parent883f7943f242c174c49bc82d51fe8332ad50d573 (diff)
downloadglibc-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.
-rw-r--r--ChangeLog124
-rw-r--r--include/stdio.h16
-rw-r--r--include/wchar.h17
-rw-r--r--inet/tst-network.c3
-rw-r--r--libio/bits/stdio-ldbl.h15
-rw-r--r--libio/libio.h3
-rw-r--r--libio/libioP.h2
-rw-r--r--libio/stdio.h64
-rw-r--r--stdio-common/Makefile26
-rw-r--r--stdio-common/Versions4
-rw-r--r--stdio-common/isoc99_fscanf.c40
-rw-r--r--stdio-common/isoc99_scanf.c42
-rw-r--r--stdio-common/isoc99_sscanf.c37
-rw-r--r--stdio-common/isoc99_vfscanf.c35
-rw-r--r--stdio-common/isoc99_vscanf.c34
-rw-r--r--stdio-common/isoc99_vsscanf.c47
-rw-r--r--stdio-common/scanf13.c187
-rw-r--r--stdio-common/scanf14.c63
-rw-r--r--stdio-common/scanf15.c54
-rw-r--r--stdio-common/vfscanf.c273
-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
-rw-r--r--wcsmbs/Makefile14
-rw-r--r--wcsmbs/Versions4
-rw-r--r--wcsmbs/bits/wchar-ldbl.h17
-rw-r--r--wcsmbs/isoc99_fwscanf.c41
-rw-r--r--wcsmbs/isoc99_swscanf.c38
-rw-r--r--wcsmbs/isoc99_vfwscanf.c36
-rw-r--r--wcsmbs/isoc99_vswscanf.c49
-rw-r--r--wcsmbs/isoc99_vwscanf.c35
-rw-r--r--wcsmbs/isoc99_wscanf.c43
-rw-r--r--wcsmbs/wchar.h62
46 files changed, 1677 insertions, 67 deletions
diff --git a/ChangeLog b/ChangeLog
index 3a09160a6f..2848a70dec 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,129 @@
+2007-09-17 Jakub Jelinek <jakub@redhat.com>
+
+ * 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.
+
2007-09-18 Ulrich Drepper <drepper@redhat.com>
* sysdeps/unix/sysv/linux/i386/bits/fcntl.h: Correct return value
- type __THROW marker of splice, vmsplice, and tee.
+ type and __THROW marker of splice, vmsplice, and tee.
* sysdeps/unix/sysv/linux/ia64/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/powerpc/bits/fcntl.h: Likewise.
* sysdeps/unix/sysv/linux/s390/bits/fcntl.h: Likewise.
diff --git a/include/stdio.h b/include/stdio.h
index 4b30e6a359..084c02ea1e 100644
--- a/include/stdio.h
+++ b/include/stdio.h
@@ -43,6 +43,22 @@ extern char *__fgets_unlocked_chk (char *buf, size_t size, int n, FILE *fp);
extern char *__fgets_chk (char *buf, size_t size, int n, FILE *fp);
#endif
+extern int __isoc99_fscanf (FILE *__restrict __stream,
+ __const char *__restrict __format, ...) __wur;
+extern int __isoc99_scanf (__const char *__restrict __format, ...) __wur;
+extern int __isoc99_sscanf (__const char *__restrict __s,
+ __const char *__restrict __format, ...) __THROW;
+extern int __isoc99_vfscanf (FILE *__restrict __s,
+ __const char *__restrict __format,
+ _G_va_list __arg) __wur;
+extern int __isoc99_vscanf (__const char *__restrict __format,
+ _G_va_list __arg) __wur;
+extern int __isoc99_vsscanf (__const char *__restrict __s,
+ __const char *__restrict __format,
+ _G_va_list __arg) __THROW;
+libc_hidden_proto (__isoc99_vsscanf)
+libc_hidden_proto (__isoc99_vfscanf)
+
/* Prototypes for compatibility functions. */
extern FILE *__new_tmpfile (void);
extern FILE *__old_tmpfile (void);
diff --git a/include/wchar.h b/include/wchar.h
index 7651f6de29..bca847731d 100644
--- a/include/wchar.h
+++ b/include/wchar.h
@@ -166,6 +166,23 @@ libc_hidden_proto (__vfwprintf_chk)
libc_hidden_proto (__vswprintf_chk)
#endif
+extern int __isoc99_fwscanf (__FILE *__restrict __stream,
+ __const wchar_t *__restrict __format, ...);
+extern int __isoc99_wscanf (__const wchar_t *__restrict __format, ...);
+extern int __isoc99_swscanf (__const wchar_t *__restrict __s,
+ __const wchar_t *__restrict __format, ...)
+ __THROW;
+extern int __isoc99_vfwscanf (__FILE *__restrict __s,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg);
+extern int __isoc99_vwscanf (__const wchar_t *__restrict __format,
+ __gnuc_va_list __arg);
+extern int __isoc99_vswscanf (__const wchar_t *__restrict __s,
+ __const wchar_t *__restrict __format,
+ __gnuc_va_list __arg) __THROW;
+libc_hidden_proto (__isoc99_vswscanf)
+libc_hidden_proto (__isoc99_vfwscanf)
+
/* Internal functions. */
extern size_t __mbsrtowcs_l (wchar_t *dst, const char **src, size_t len,
mbstate_t *ps, __locale_t l) attribute_hidden;
diff --git a/inet/tst-network.c b/inet/tst-network.c
index 564a366a44..5491740e37 100644
--- a/inet/tst-network.c
+++ b/inet/tst-network.c
@@ -34,7 +34,10 @@ struct
{"1.0", 0x100},
{"1", 0x1},
{"192.168.0.0", 0xC0A80000},
+ {"0", 0},
+ {"0x0", 0},
/* Now some invalid addresses. */
+ {"0x", INADDR_NONE},
{"141.30.225.2800", INADDR_NONE},
{"141.76.1.1.1", INADDR_NONE},
{"141.76.1.11.", INADDR_NONE},
diff --git a/libio/bits/stdio-ldbl.h b/libio/bits/stdio-ldbl.h
index b6ec7f3c92..c93e6c48fb 100644
--- a/libio/bits/stdio-ldbl.h
+++ b/libio/bits/stdio-ldbl.h
@@ -28,9 +28,17 @@ __LDBL_REDIR_DECL (sprintf)
__LDBL_REDIR_DECL (vfprintf)
__LDBL_REDIR_DECL (vprintf)
_