summaryrefslogtreecommitdiff
path: root/wcsmbs
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/Makefile49
-rw-r--r--wcsmbs/Versions20
-rw-r--r--wcsmbs/bits/types/__mbstate_t.h23
-rw-r--r--wcsmbs/bits/types/mbstate_t.h8
-rw-r--r--wcsmbs/bits/types/wint_t.h23
-rw-r--r--wcsmbs/bits/wchar-ldbl.h6
-rw-r--r--wcsmbs/bits/wchar2.h2
-rw-r--r--wcsmbs/btowc.c10
-rw-r--r--wcsmbs/c16rtomb.c2
-rw-r--r--wcsmbs/isoc99_fwscanf.c2
-rw-r--r--wcsmbs/isoc99_swscanf.c2
-rw-r--r--wcsmbs/isoc99_vfwscanf.c4
-rw-r--r--wcsmbs/isoc99_vswscanf.c7
-rw-r--r--wcsmbs/isoc99_vwscanf.c4
-rw-r--r--wcsmbs/isoc99_wscanf.c2
-rw-r--r--wcsmbs/mbrlen.c2
-rw-r--r--wcsmbs/mbrtoc16.c2
-rw-r--r--wcsmbs/mbrtowc.c2
-rw-r--r--wcsmbs/mbsinit.c2
-rw-r--r--wcsmbs/mbsnrtowcs.c2
-rw-r--r--wcsmbs/mbsrtowcs.c2
-rw-r--r--wcsmbs/mbsrtowcs_l.c4
-rw-r--r--wcsmbs/test-char-types.c31
-rw-r--r--wcsmbs/test-wcpcpy.c2
-rw-r--r--wcsmbs/test-wcpncpy.c2
-rw-r--r--wcsmbs/test-wcscat.c2
-rw-r--r--wcsmbs/test-wcschrnul.c2
-rw-r--r--wcsmbs/test-wcscspn.c2
-rw-r--r--wcsmbs/test-wcsncat.c2
-rw-r--r--wcsmbs/test-wcsncpy.c2
-rw-r--r--wcsmbs/test-wcsnlen.c2
-rw-r--r--wcsmbs/test-wcspbrk.c2
-rw-r--r--wcsmbs/test-wcsspn.c2
-rw-r--r--wcsmbs/test-wmemchr.c2
-rw-r--r--wcsmbs/test-wmemset.c2
-rw-r--r--wcsmbs/tst-btowc.c5
-rw-r--r--wcsmbs/tst-fgetwc-after-eof.c114
-rw-r--r--wcsmbs/tst-mbrtowc.c2
-rw-r--r--wcsmbs/tst-mbrtowc2.c6
-rw-r--r--wcsmbs/tst-mbsrtowcs.c5
-rw-r--r--wcsmbs/tst-wchar-h.c3
-rw-r--r--wcsmbs/tst-wcpncpy.c5
-rw-r--r--wcsmbs/tst-wcrtomb.c5
-rw-r--r--wcsmbs/tst-wcsnlen.c5
-rw-r--r--wcsmbs/tst-wcstod-nan-locale.c2
-rw-r--r--wcsmbs/tst-wcstod-nan-sign.c23
-rw-r--r--wcsmbs/tst-wcstod-round.c31
-rw-r--r--wcsmbs/tst-wcstof.c11
-rw-r--r--wcsmbs/tst-wcstol-locale.c2
-rw-r--r--wcsmbs/uchar.h30
-rw-r--r--wcsmbs/wchar.h304
-rw-r--r--wcsmbs/wcpcpy.c2
-rw-r--r--wcsmbs/wcpncpy.c2
-rw-r--r--wcsmbs/wcrtomb.c2
-rw-r--r--wcsmbs/wcscasecmp.c4
-rw-r--r--wcsmbs/wcscasecmp_l.c2
-rw-r--r--wcsmbs/wcscat.c2
-rw-r--r--wcsmbs/wcschr.c2
-rw-r--r--wcsmbs/wcschrnul.c2
-rw-r--r--wcsmbs/wcscmp.c2
-rw-r--r--wcsmbs/wcscoll.c2
-rw-r--r--wcsmbs/wcscoll_l.c2
-rw-r--r--wcsmbs/wcscpy.c2
-rw-r--r--wcsmbs/wcscspn.c2
-rw-r--r--wcsmbs/wcsdup.c2
-rw-r--r--wcsmbs/wcslen.c2
-rw-r--r--wcsmbs/wcsmbsload.c7
-rw-r--r--wcsmbs/wcsmbsload.h11
-rw-r--r--wcsmbs/wcsncase.c4
-rw-r--r--wcsmbs/wcsncase_l.c2
-rw-r--r--wcsmbs/wcsncat.c2
-rw-r--r--wcsmbs/wcsncmp.c2
-rw-r--r--wcsmbs/wcsncpy.c2
-rw-r--r--wcsmbs/wcsnlen.c2
-rw-r--r--wcsmbs/wcsnrtombs.c2
-rw-r--r--wcsmbs/wcspbrk.c2
-rw-r--r--wcsmbs/wcsrchr.c2
-rw-r--r--wcsmbs/wcsrtombs.c2
-rw-r--r--wcsmbs/wcsspn.c2
-rw-r--r--wcsmbs/wcsstr.c2
-rw-r--r--wcsmbs/wcstod.c7
-rw-r--r--wcsmbs/wcstod_l.c7
-rw-r--r--wcsmbs/wcstod_nan.c4
-rw-r--r--wcsmbs/wcstof.c7
-rw-r--r--wcsmbs/wcstof_l.c7
-rw-r--r--wcsmbs/wcstof_nan.c4
-rw-r--r--wcsmbs/wcstok.c2
-rw-r--r--wcsmbs/wcstol.c2
-rw-r--r--wcsmbs/wcstol_l.c5
-rw-r--r--wcsmbs/wcstold.c7
-rw-r--r--wcsmbs/wcstold_l.c7
-rw-r--r--wcsmbs/wcstold_nan.c4
-rw-r--r--wcsmbs/wcstoll.c2
-rw-r--r--wcsmbs/wcstoll_l.c5
-rw-r--r--wcsmbs/wcstoul.c2
-rw-r--r--wcsmbs/wcstoul_l.c5
-rw-r--r--wcsmbs/wcstoull.c2
-rw-r--r--wcsmbs/wcstoull_l.c6
-rw-r--r--wcsmbs/wcswidth.c2
-rw-r--r--wcsmbs/wcsxfrm.c2
-rw-r--r--wcsmbs/wcsxfrm_l.c2
-rw-r--r--wcsmbs/wctob.c2
-rw-r--r--wcsmbs/wcwidth.c2
-rw-r--r--wcsmbs/wcwidth.h2
-rw-r--r--wcsmbs/wmemchr.c2
-rw-r--r--wcsmbs/wmemcmp.c2
-rw-r--r--wcsmbs/wmemcpy.c2
-rw-r--r--wcsmbs/wmemmove.c2
-rw-r--r--wcsmbs/wmempcpy.c2
-rw-r--r--wcsmbs/wmemset.c2
110 files changed, 576 insertions, 397 deletions
diff --git a/wcsmbs/Makefile b/wcsmbs/Makefile
index 8b599f75be..2e02b22c3b 100644
--- a/wcsmbs/Makefile
+++ b/wcsmbs/Makefile
@@ -1,4 +1,4 @@
-# Copyright (C) 1995-2016 Free Software Foundation, Inc.
+# Copyright (C) 1995-2018 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,8 @@ subdir := wcsmbs
include ../Makeconfig
-headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h
+headers := wchar.h bits/wchar.h bits/wchar2.h bits/wchar-ldbl.h uchar.h \
+ bits/types/__mbstate_t.h bits/types/mbstate_t.h bits/types/wint_t.h
routines := wcscat wcschr wcscmp wcscpy wcscspn wcsdup wcslen wcsncat \
wcsncmp wcsncpy wcspbrk wcsrchr wcsspn wcstok wcsstr wmemchr \
@@ -49,7 +50,8 @@ strop-tests := wcscmp wcsncmp wmemcmp wcslen wcschr wcsrchr wcscpy wcsnlen \
tests := tst-wcstof wcsmbs-tst1 tst-wcsnlen tst-btowc tst-mbrtowc \
tst-wcrtomb tst-wcpncpy tst-mbsrtowcs tst-wchar-h tst-mbrtowc2 \
tst-c16c32-1 wcsatcliff tst-wcstol-locale tst-wcstod-nan-locale \
- $(addprefix test-,$(strop-tests))
+ tst-wcstod-round test-char-types tst-fgetwc-after-eof \
+ tst-wcstod-nan-sign $(addprefix test-,$(strop-tests))
include ../Rules
@@ -68,25 +70,29 @@ $(objpfx)tst-wcstol-locale.out: $(gen-locales)
$(objpfx)tst-wcstod-nan-locale.out: $(gen-locales)
endif
-CFLAGS-wcwidth.c = -I../wctype
-CFLAGS-wcswidth.c = -I../wctype
+$(objpfx)tst-wcstod-round: $(libm)
+
+CFLAGS-wcwidth.c += -I../wctype
+CFLAGS-wcswidth.c += -I../wctype
strtox-CFLAGS = -I../include
-CFLAGS-wcstol.c = $(strtox-CFLAGS)
-CFLAGS-wcstoul.c = $(strtox-CFLAGS)
-CFLAGS-wcstoll.c = $(strtox-CFLAGS)
-CFLAGS-wcstoull.c = $(strtox-CFLAGS)
-CFLAGS-wcstod.c = $(strtox-CFLAGS)
-CFLAGS-wcstold.c = $(strtox-CFLAGS)
-CFLAGS-wcstof.c = $(strtox-CFLAGS)
-CFLAGS-wcstol_l.c = $(strtox-CFLAGS)
-CFLAGS-wcstoul_l.c = $(strtox-CFLAGS)
-CFLAGS-wcstoll_l.c = $(strtox-CFLAGS)
-CFLAGS-wcstoull_l.c = $(strtox-CFLAGS)
-CFLAGS-wcstod_l.c = $(strtox-CFLAGS)
-CFLAGS-wcstold_l.c = $(strtox-CFLAGS)
-CFLAGS-wcstof_l.c = $(strtox-CFLAGS)
-CPPFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
+CFLAGS-wcstol.c += $(strtox-CFLAGS)
+CFLAGS-wcstoul.c += $(strtox-CFLAGS)
+CFLAGS-wcstoll.c += $(strtox-CFLAGS)
+CFLAGS-wcstoull.c += $(strtox-CFLAGS)
+CFLAGS-wcstod.c += $(strtox-CFLAGS)
+CFLAGS-wcstold.c += $(strtox-CFLAGS)
+CFLAGS-wcstof128.c += $(strtox-CFLAGS)
+CFLAGS-wcstof.c += $(strtox-CFLAGS)
+CFLAGS-wcstol_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstoul_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstoll_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstoull_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstod_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstold_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstof128_l.c += $(strtox-CFLAGS)
+CFLAGS-wcstof_l.c += $(strtox-CFLAGS)
+CPPFLAGS-tst-wchar-h.c += -D_FORTIFY_SOURCE=2
CFLAGS-isoc99_wscanf.c += -fexceptions
CFLAGS-isoc99_fwscanf.c += -fexceptions
@@ -96,6 +102,7 @@ CFLAGS-isoc99_vfwscanf.c += -fexceptions
CPPFLAGS += $(libio-mtsafe)
# We need to find the default version of strtold_l in stdlib.
-CPPFLAGS-wcstold_l.c = -I../stdlib
+CPPFLAGS-wcstold_l.c += -I../stdlib
$(objpfx)tst-wcstod-nan-locale: $(libm)
+$(objpfx)tst-wcstod-nan-sign: $(libm)
diff --git a/wcsmbs/Versions b/wcsmbs/Versions
index 1ff5ff3057..0b31c1b940 100644
--- a/wcsmbs/Versions
+++ b/wcsmbs/Versions
@@ -1,7 +1,11 @@
+%include <float128-abi.h>
libc {
GLIBC_2.0 {
# functions used in inline functions or macros
- __mbrlen; __mbrtowc; __wcsto*_internal;
+ __mbrlen; __mbrtowc;
+ __wcstod_internal; __wcstof_internal; __wcstold_internal;
+ __wcstol_internal; __wcstoll_internal;
+ __wcstoul_internal; __wcstoull_internal;
# b*
btowc;
@@ -31,4 +35,18 @@ libc {
GLIBC_2.16 {
c16rtomb; c32rtomb; mbrtoc16; mbrtoc32;
}
+%ifdef FLOAT128_VERSION
+ FLOAT128_VERSION {
+ wcstof128;
+ wcstof128_l;
+ }
+%endif
+ GLIBC_2.27 {
+ # _Float64x functions, only present for some configurations.
+ wcstof64x;
+ wcstof64x_l;
+ # _Float32, _Float64 and _Float32x functions, for all configurations.
+ wcstof32; wcstof64; wcstof32x;
+ wcstof32_l; wcstof64_l; wcstof32x_l;
+ }
}
diff --git a/wcsmbs/bits/types/__mbstate_t.h b/wcsmbs/bits/types/__mbstate_t.h
new file mode 100644
index 0000000000..1d8a4e28d1
--- /dev/null
+++ b/wcsmbs/bits/types/__mbstate_t.h
@@ -0,0 +1,23 @@
+#ifndef ____mbstate_t_defined
+#define ____mbstate_t_defined 1
+
+/* Integral type unchanged by default argument promotions that can
+ hold any value corresponding to members of the extended character
+ set, as well as at least one value that does not correspond to any
+ member of the extended character set. */
+#ifndef __WINT_TYPE__
+# define __WINT_TYPE__ unsigned int
+#endif
+
+/* Conversion state information. */
+typedef struct
+{
+ int __count;
+ union
+ {
+ __WINT_TYPE__ __wch;
+ char __wchb[4];
+ } __value; /* Value so far. */
+} __mbstate_t;
+
+#endif
diff --git a/wcsmbs/bits/types/mbstate_t.h b/wcsmbs/bits/types/mbstate_t.h
new file mode 100644
index 0000000000..8d1baa5c3b
--- /dev/null
+++ b/wcsmbs/bits/types/mbstate_t.h
@@ -0,0 +1,8 @@
+#ifndef __mbstate_t_defined
+#define __mbstate_t_defined 1
+
+#include <bits/types/__mbstate_t.h>
+
+typedef __mbstate_t mbstate_t;
+
+#endif
diff --git a/wcsmbs/bits/types/wint_t.h b/wcsmbs/bits/types/wint_t.h
new file mode 100644
index 0000000000..fbd63dbc84
--- /dev/null
+++ b/wcsmbs/bits/types/wint_t.h
@@ -0,0 +1,23 @@
+#ifndef __wint_t_defined
+#define __wint_t_defined 1
+
+/* Some versions of stddef.h provide wint_t, even though neither the
+ C nor C++ standards, nor POSIX, specifies this. We assume that
+ stddef.h will define the macro _WINT_T if and only if it provides
+ wint_t, and conversely, that it will avoid providing wint_t if
+ _WINT_T is already defined. */
+#ifndef _WINT_T
+#define _WINT_T 1
+
+/* Integral type unchanged by default argument promotions that can
+ hold any value corresponding to members of the extended character
+ set, as well as at least one value that does not correspond to any
+ member of the extended character set. */
+#ifndef __WINT_TYPE__
+# define __WINT_TYPE__ unsigned int
+#endif
+
+typedef __WINT_TYPE__ wint_t;
+
+#endif /* _WINT_T */
+#endif /* bits/types/wint_t.h */
diff --git a/wcsmbs/bits/wchar-ldbl.h b/wcsmbs/bits/wchar-ldbl.h
index d6c28c541f..b91ee9fbf5 100644
--- a/wcsmbs/bits/wchar-ldbl.h
+++ b/wcsmbs/bits/wchar-ldbl.h
@@ -1,5 +1,5 @@
/* -mlong-double-64 compatibility mode for <wchar.h> functions.
- Copyright (C) 2006-2016 Free Software Foundation, Inc.
+ Copyright (C) 2006-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,7 +21,6 @@
#endif
#if defined __USE_ISOC95 || defined __USE_UNIX98
-__BEGIN_NAMESPACE_C99
__LDBL_REDIR_DECL (fwprintf);
__LDBL_REDIR_DECL (wprintf);
__LDBL_REDIR_DECL (swprintf);
@@ -39,11 +38,9 @@ __LDBL_REDIR_DECL (fwscanf);
__LDBL_REDIR_DECL (wscanf);
__LDBL_REDIR_DECL (swscanf);
# endif
-__END_NAMESPACE_C99
#endif
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
__LDBL_REDIR1_DECL (wcstold, wcstod);
# if !defined __USE_GNU && !defined __REDIRECT \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
@@ -55,7 +52,6 @@ __LDBL_REDIR_DECL (vfwscanf);
__LDBL_REDIR_DECL (vwscanf);
__LDBL_REDIR_DECL (vswscanf);
# endif
-__END_NAMESPACE_C99
#endif
#ifdef __USE_GNU
diff --git a/wcsmbs/bits/wchar2.h b/wcsmbs/bits/wchar2.h
index ccf8dc9960..d62b86de3e 100644
--- a/wcsmbs/bits/wchar2.h
+++ b/wcsmbs/bits/wchar2.h
@@ -1,5 +1,5 @@
/* Checking macros for wchar functions.
- Copyright (C) 2005-2016 Free Software Foundation, Inc.
+ Copyright (C) 2005-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/btowc.c b/wcsmbs/btowc.c
index e9d3fd25b0..39069a28d3 100644
--- a/wcsmbs/btowc.c
+++ b/wcsmbs/btowc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
@@ -46,15 +46,15 @@ __btowc (int c)
/* Get the conversion functions. */
fcts = get_gconv_fcts (_NL_CURRENT_DATA (LC_CTYPE));
__gconv_btowc_fct btowc_fct = fcts->towc->__btowc_fct;
+#ifdef PTR_DEMANGLE
+ if (fcts->towc->__shlib_handle != NULL)
+ PTR_DEMANGLE (btowc_fct);
+#endif
if (__builtin_expect (fcts->towc_nsteps == 1, 1)
&& __builtin_expect (btowc_fct != NULL, 1))
{
/* Use the shortcut function. */
-#ifdef PTR_DEMANGLE
- if (fcts->towc->__shlib_handle != NULL)
- PTR_DEMANGLE (btowc_fct);
-#endif
return DL_CALL_FCT (btowc_fct, (fcts->towc, (unsigned char) c));
}
else
diff --git a/wcsmbs/c16rtomb.c b/wcsmbs/c16rtomb.c
index ce43409a27..48a63d067b 100644
--- a/wcsmbs/c16rtomb.c
+++ b/wcsmbs/c16rtomb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
diff --git a/wcsmbs/isoc99_fwscanf.c b/wcsmbs/isoc99_fwscanf.c
index 0e9148b9ee..0c6a2c47ac 100644
--- a/wcsmbs/isoc99_fwscanf.c
+++ b/wcsmbs/isoc99_fwscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/isoc99_swscanf.c b/wcsmbs/isoc99_swscanf.c
index b023f5dcaf..ff523db706 100644
--- a/wcsmbs/isoc99_swscanf.c
+++ b/wcsmbs/isoc99_swscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/isoc99_vfwscanf.c b/wcsmbs/isoc99_vfwscanf.c
index 59ec197b0b..7beb45b4d3 100644
--- a/wcsmbs/isoc99_vfwscanf.c
+++ b/wcsmbs/isoc99_vfwscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
/* Read formatted input from STREAM according to the format string FORMAT. */
/* VARARGS2 */
int
-__isoc99_vfwscanf (FILE *stream, const wchar_t *format, _IO_va_list args)
+__isoc99_vfwscanf (FILE *stream, const wchar_t *format, va_list args)
{
int done;
diff --git a/wcsmbs/isoc99_vswscanf.c b/wcsmbs/isoc99_vswscanf.c
index b7effb0e37..130769154d 100644
--- a/wcsmbs/isoc99_vswscanf.c
+++ b/wcsmbs/isoc99_vswscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1993-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1993-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -29,8 +29,7 @@
#include "../libio/strfile.h"
int
-__isoc99_vswscanf (const wchar_t *string, const wchar_t *format,
- _IO_va_list args)
+__isoc99_vswscanf (const wchar_t *string, const wchar_t *format, va_list args)
{
int ret;
_IO_strfile sf;
@@ -42,7 +41,7 @@ __isoc99_vswscanf (const wchar_t *string, const wchar_t *format,
_IO_fwide (&sf._sbf._f, 1);
_IO_wstr_init_static (&sf._sbf._f, (wchar_t *)string, 0, NULL);
sf._sbf._f._flags2 |= _IO_FLAGS2_SCANF_STD;
- ret = _IO_vfwscanf ((_IO_FILE *) &sf._sbf, format, args, NULL);
+ ret = _IO_vfwscanf ((FILE *) &sf._sbf, format, args, NULL);
return ret;
}
libc_hidden_def (__isoc99_vswscanf)
diff --git a/wcsmbs/isoc99_vwscanf.c b/wcsmbs/isoc99_vwscanf.c
index 661c25c11b..049521b964 100644
--- a/wcsmbs/isoc99_vwscanf.c
+++ b/wcsmbs/isoc99_vwscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -22,7 +22,7 @@
/* Read formatted input from STDIN according to the format string FORMAT. */
/* VARARGS2 */
int
-__isoc99_vwscanf (const wchar_t *format, _IO_va_list args)
+__isoc99_vwscanf (const wchar_t *format, va_list args)
{
int done;
diff --git a/wcsmbs/isoc99_wscanf.c b/wcsmbs/isoc99_wscanf.c
index 621edd8307..abfbd50c11 100644
--- a/wcsmbs/isoc99_wscanf.c
+++ b/wcsmbs/isoc99_wscanf.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/mbrlen.c b/wcsmbs/mbrlen.c
index 905c5b21eb..405a7aefe3 100644
--- a/wcsmbs/mbrlen.c
+++ b/wcsmbs/mbrlen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
diff --git a/wcsmbs/mbrtoc16.c b/wcsmbs/mbrtoc16.c
index 3defdc34ee..e054743cd0 100644
--- a/wcsmbs/mbrtoc16.c
+++ b/wcsmbs/mbrtoc16.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gmail.com>, 2011.
diff --git a/wcsmbs/mbrtowc.c b/wcsmbs/mbrtowc.c
index 63426d1827..954933d068 100644
--- a/wcsmbs/mbrtowc.c
+++ b/wcsmbs/mbrtowc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/mbsinit.c b/wcsmbs/mbsinit.c
index 0ea2d61844..d2a0668193 100644
--- a/wcsmbs/mbsinit.c
+++ b/wcsmbs/mbsinit.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/mbsnrtowcs.c b/wcsmbs/mbsnrtowcs.c
index 58540b4dfc..aef7858082 100644
--- a/wcsmbs/mbsnrtowcs.c
+++ b/wcsmbs/mbsnrtowcs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/mbsrtowcs.c b/wcsmbs/mbsrtowcs.c
index 36dfbd8a18..ed854e792b 100644
--- a/wcsmbs/mbsrtowcs.c
+++ b/wcsmbs/mbsrtowcs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/mbsrtowcs_l.c b/wcsmbs/mbsrtowcs_l.c
index 90392b6cbf..c86055b505 100644
--- a/wcsmbs/mbsrtowcs_l.c
+++ b/wcsmbs/mbsrtowcs_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 2002.
@@ -38,7 +38,7 @@
size_t
attribute_hidden
__mbsrtowcs_l (wchar_t *dst, const char **src, size_t len, mbstate_t *ps,
- __locale_t l)
+ locale_t l)
{
struct __gconv_step_data data;
size_t result;
diff --git a/wcsmbs/test-char-types.c b/wcsmbs/test-char-types.c
new file mode 100644
index 0000000000..31237619d2
--- /dev/null
+++ b/wcsmbs/test-char-types.c
@@ -0,0 +1,31 @@
+/* Test char16_t and char32_t types consistent with compiler.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <uchar.h>
+
+const char16_t *s16 = u"";
+const char32_t *s32 = U"";
+
+static int
+do_test (void)
+{
+ /* This is a compilation test. */
+ return 0;
+}
+
+#include <support/test-driver.c>
diff --git a/wcsmbs/test-wcpcpy.c b/wcsmbs/test-wcpcpy.c
index 1abb24293e..78ea4da2fd 100644
--- a/wcsmbs/test-wcpcpy.c
+++ b/wcsmbs/test-wcpcpy.c
@@ -1,5 +1,5 @@
/* Test wcspcpy functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcpncpy.c b/wcsmbs/test-wcpncpy.c
index ef02f34f79..e86a51c7be 100644
--- a/wcsmbs/test-wcpncpy.c
+++ b/wcsmbs/test-wcpncpy.c
@@ -1,5 +1,5 @@
/* Test wcpncpy functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcscat.c b/wcsmbs/test-wcscat.c
index 1a298ca666..22c64de38e 100644
--- a/wcsmbs/test-wcscat.c
+++ b/wcsmbs/test-wcscat.c
@@ -1,5 +1,5 @@
/* Test wcscat functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcschrnul.c b/wcsmbs/test-wcschrnul.c
index 1290fe3eb2..10610f32cf 100644
--- a/wcsmbs/test-wcschrnul.c
+++ b/wcsmbs/test-wcschrnul.c
@@ -1,5 +1,5 @@
/* Test wcschrnul functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcscspn.c b/wcsmbs/test-wcscspn.c
index ae32abc8b3..3b37bda6a2 100644
--- a/wcsmbs/test-wcscspn.c
+++ b/wcsmbs/test-wcscspn.c
@@ -1,5 +1,5 @@
/* Test wcscspn functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcsncat.c b/wcsmbs/test-wcsncat.c
index 924455c180..4532995412 100644
--- a/wcsmbs/test-wcsncat.c
+++ b/wcsmbs/test-wcsncat.c
@@ -1,5 +1,5 @@
/* Test wcsncat functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcsncpy.c b/wcsmbs/test-wcsncpy.c
index 31ddfcf9c1..98f98b1e37 100644
--- a/wcsmbs/test-wcsncpy.c
+++ b/wcsmbs/test-wcsncpy.c
@@ -1,5 +1,5 @@
/* Test wcsncpy functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcsnlen.c b/wcsmbs/test-wcsnlen.c
index eb535dbfec..0f7a1b8769 100644
--- a/wcsmbs/test-wcsnlen.c
+++ b/wcsmbs/test-wcsnlen.c
@@ -1,5 +1,5 @@
/* Test wcsnlen function.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcspbrk.c b/wcsmbs/test-wcspbrk.c
index 2d5fdccd2f..31206485cf 100644
--- a/wcsmbs/test-wcspbrk.c
+++ b/wcsmbs/test-wcspbrk.c
@@ -1,5 +1,5 @@
/* Test wcspbrk functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wcsspn.c b/wcsmbs/test-wcsspn.c
index bf74cf1c8d..395f44431d 100644
--- a/wcsmbs/test-wcsspn.c
+++ b/wcsmbs/test-wcsspn.c
@@ -1,5 +1,5 @@
/* Test wcsspn functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wmemchr.c b/wcsmbs/test-wmemchr.c
index 998b9511c8..36d890bd69 100644
--- a/wcsmbs/test-wmemchr.c
+++ b/wcsmbs/test-wmemchr.c
@@ -1,5 +1,5 @@
/* Test wmemchr functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/test-wmemset.c b/wcsmbs/test-wmemset.c
index 6a45686986..856663d04b 100644
--- a/wcsmbs/test-wmemset.c
+++ b/wcsmbs/test-wmemset.c
@@ -1,5 +1,5 @@
/* Test wmemset functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/tst-btowc.c b/wcsmbs/tst-btowc.c
index ba0521bdab..39ad0c23c0 100644
--- a/wcsmbs/tst-btowc.c
+++ b/wcsmbs/tst-btowc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -173,5 +173,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-fgetwc-after-eof.c b/wcsmbs/tst-fgetwc-after-eof.c
new file mode 100644
index 0000000000..9103529246
--- /dev/null
+++ b/wcsmbs/tst-fgetwc-after-eof.c
@@ -0,0 +1,114 @@
+/* Bug 1190: EOF conditions are supposed to be sticky.
+ Copyright (C) 2018 Free Software Foundation.
+ Copying and distribution of this file, with or without modification,
+ are permitted in any medium without royalty provided the copyright
+ notice and this notice are preserved. This file is offered as-is,
+ without any warranty. */
+
+/* ISO C1999 specification of fgetwc:
+
+ #include <stdio.h>
+ #include <wchar.h>
+ wint_t fgetwc (FILE *stream);
+
+ Description
+
+ If the end-of-file indicator for the input stream pointed to by
+ stream is not set and a next wide character is present, the
+ fgetwc function obtains that wide character as a wchar_t
+ converted to a wint_t and advances the associated file position
+ indicator for the stream (if defined).
+
+ Returns
+
+ If the end-of-file indicator for the stream is set, or if the
+ stream is at end-of-file, the end- of-file indicator for the
+ stream is set and the fgetwc function returns WEOF. Otherwise,
+ the fgetwc function returns the next wide character from the
+ input stream pointed to by stream. If a read error occurs, the
+ error indicator for the stream is set and the fgetwc function
+ returns WEOF. If an encoding error occurs (including too few
+ bytes), the value of the macro EILSEQ is stored in errno and the
+ fgetwc function returns WEOF.
+
+ The requirement to return WEOF "if the end-of-file indicator for the
+ stream is set" was new in C99; the language in the 1995 edition of
+ the standard was ambiguous. Historically, BSD-derived Unix always
+ had the C99 behavior, whereas in System V fgetwc would attempt to
+ call read() again before returning EOF again. Prior to version 2.28,
+ glibc followed the System V behavior even though this does not
+ comply with C99.
+
+ See
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=1190>,
+ <https://sourceware.org/bugzilla/show_bug.cgi?id=19476>,
+ and the thread at
+ <https://sourceware.org/ml/libc-alpha/2012-09/msg00343.html>
+ for more detail. */
+
+#include <support/tty.h>
+#include <support/check.h>
+
+#include <fcntl.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+#include <wchar.h>
+
+#define XWRITE(fd, s, msg) do { \
+ if (write (fd, s, sizeof s - 1) != sizeof s - 1) \
+ { \
+ perror ("write " msg); \
+ return 1; \
+ } \
+ } while (0)
+
+int
+do_test (void)
+{
+ /* The easiest way to set up the conditions under which you can
+ notice whether the end-of-file indicator is sticky, is with a
+ pseudo-tty. This is also the case which applications are most
+ likely to care about. And it avoids any question of whether and
+ how it is legitimate to access the same physical file with two
+ independent FILE objects. */
+ int outer_fd, inner_fd;
+ FILE *fp;
+
+ support_openpty (&outer_fd, &inner_fd, 0, 0, 0);
+ fp = fdopen (inner_fd, "r+");
+ if (!fp)
+ {
+ perror ("fdopen");
+ return 1;
+ }
+
+ XWRITE (outer_fd, "abc\n\004", "first line + EOF");
+ TEST_COMPARE (fgetwc (fp), L'a');
+ TEST_COMPARE (fgetwc (fp), L'b');
+ TEST_COMPARE (fgetwc (fp), L'c');
+ TEST_COMPARE (fgetwc (fp), L'\n');
+ TEST_COMPARE (fgetwc (fp), WEOF);
+
+ TEST_VERIFY_EXIT (feof (fp));
+ TEST_VERIFY_EXIT (!ferror (fp));
+
+ XWRITE (outer_fd, "d\n", "second line");
+
+ /* At this point, there is a new full line of input waiting in the
+ kernelside input buffer, but we should still observe EOF from
+ stdio, because the end-of-file indicator has not been cleared. */
+ TEST_COMPARE (fgetwc (fp), WEOF);
+
+ /* Clearing EOF should reveal the next line of input. */
+ clearerr (fp);
+ TEST_COMPARE (fgetwc (fp), L'd');
+ TEST_COMPARE (fgetwc (fp), L'\n');
+
+ fclose (fp);
+ close (outer_fd);
+ return 0;
+}
+
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-mbrtowc.c b/wcsmbs/tst-mbrtowc.c
index 4017ac509b..511859013c 100644
--- a/wcsmbs/tst-mbrtowc.c
+++ b/wcsmbs/tst-mbrtowc.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
diff --git a/wcsmbs/tst-mbrtowc2.c b/wcsmbs/tst-mbrtowc2.c
index 67d8e29a0f..95e9541466 100644
--- a/wcsmbs/tst-mbrtowc2.c
+++ b/wcsmbs/tst-mbrtowc2.c
@@ -1,4 +1,5 @@
-/* Derived from the test case in http://sourceware.org/bugzilla/show_bug.cgi?id=714 */
+/* Derived from the test case in
+ https://sourceware.org/bugzilla/show_bug.cgi?id=714 */
#include <locale.h>
#include <stdio.h>
#include <string.h>
@@ -63,5 +64,4 @@ t (const char *ch, size_t nch, const char *loc)
return ret;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-mbsrtowcs.c b/wcsmbs/tst-mbsrtowcs.c
index 38eb1ed2f6..253ef2b278 100644
--- a/wcsmbs/tst-mbsrtowcs.c
+++ b/wcsmbs/tst-mbsrtowcs.c
@@ -1,5 +1,5 @@
/* Test NUL handling of mbsrtowcs.
- Copyright (C) 2004-2016 Free Software Foundation, Inc.
+ Copyright (C) 2004-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2004.
@@ -63,5 +63,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-wchar-h.c b/wcsmbs/tst-wchar-h.c
index fd2ad569a7..047ba6c377 100644
--- a/wcsmbs/tst-wchar-h.c
+++ b/wcsmbs/tst-wchar-h.c
@@ -8,5 +8,4 @@ do_test (void)
return sizeof (x) - sizeof (mbstate_t);
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-wcpncpy.c b/wcsmbs/tst-wcpncpy.c
index 9585f6b8b6..5ec42d2f53 100644
--- a/wcsmbs/tst-wcpncpy.c
+++ b/wcsmbs/tst-wcpncpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2003-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 2003.
@@ -75,5 +75,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-wcrtomb.c b/wcsmbs/tst-wcrtomb.c
index 4cf19fca15..7d146751dd 100644
--- a/wcsmbs/tst-wcrtomb.c
+++ b/wcsmbs/tst-wcrtomb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2000-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 2000.
@@ -93,5 +93,4 @@ check_ascii (const char *locname)
return res != 0;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-wcsnlen.c b/wcsmbs/tst-wcsnlen.c
index 7d588762b7..5aff054e5d 100644
--- a/wcsmbs/tst-wcsnlen.c
+++ b/wcsmbs/tst-wcsnlen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1999.
@@ -49,5 +49,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-wcstod-nan-locale.c b/wcsmbs/tst-wcstod-nan-locale.c
index 41c91c423b..1435a426dc 100644
--- a/wcsmbs/tst-wcstod-nan-locale.c
+++ b/wcsmbs/tst-wcstod-nan-locale.c
@@ -1,6 +1,6 @@
/* Test strtod functions work with all ASCII letters in NAN(...) in
Turkish locales (bug 19266). Wide string version.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/tst-wcstod-nan-sign.c b/wcsmbs/tst-wcstod-nan-sign.c
new file mode 100644
index 0000000000..4c40e50f4f
--- /dev/null
+++ b/wcsmbs/tst-wcstod-nan-sign.c
@@ -0,0 +1,23 @@
+/* Test strtod functions handle signs of NaNs (bug 23007).
+ Wide string version.
+ Copyright (C) 2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#define FNPFX wcsto
+#define L_(C) L ## C
+
+#include "../stdlib/tst-strtod-nan-sign-main.c"
diff --git a/wcsmbs/tst-wcstod-round.c b/wcsmbs/tst-wcstod-round.c
new file mode 100644
index 0000000000..9db907972f
--- /dev/null
+++ b/wcsmbs/tst-wcstod-round.c
@@ -0,0 +1,31 @@
+/* wide character shim for tst-strtod-round-skeleton.c.
+ Copyright (C) 2016-2018 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, see
+ <http://www.gnu.org/licenses/>. */
+
+#include <wchar.h>
+
+/* Include stdio.h early to avoid issues with the snprintf
+ redefinition below. */
+#include <stdio.h>
+
+#define L_(str) L ## str
+#define FNPFX wcs
+#define CHAR wchar_t
+#define STRM "%ls"
+#define snprintf swprintf
+
+#include <stdlib/tst-strtod-round-skeleton.c>
diff --git a/wcsmbs/tst-wcstof.c b/wcsmbs/tst-wcstof.c
index 576a58c023..5b7cdeacd8 100644
--- a/wcsmbs/tst-wcstof.c
+++ b/wcsmbs/tst-wcstof.c
@@ -3,6 +3,7 @@
#include <stdio.h>
#include <string.h>
#include <wctype.h>
+#include <libc-diag.h>
static int
do_test (void)
@@ -14,7 +15,14 @@ do_test (void)
tmp[1] = '1';
tmp[2] = 0;
+ /* GCC does not know the result of wcstof so cannot see that the
+ snprintf output is not truncated. */
+ DIAG_PUSH_NEEDS_COMMENT;
+#if __GNUC_PREREQ (7, 0)
+ DIAG_IGNORE_NEEDS_COMMENT (7.0, "-Wformat-truncation");
+#endif
snprintf (buf, 100, "%S = %f", tmp, wcstof (tmp, NULL));
+ DIAG_POP_NEEDS_COMMENT;
printf ("\"%s\" -> %s\n", buf,
strcmp (buf, "81 = 81.000000") == 0 ? "okay" : "buggy");
result |= strcmp (buf, "81 = 81.000000") != 0;
@@ -22,5 +30,4 @@ do_test (void)
return result;
}
-#define TEST_FUNCTION do_test ()
-#include "../test-skeleton.c"
+#include <support/test-driver.c>
diff --git a/wcsmbs/tst-wcstol-locale.c b/wcsmbs/tst-wcstol-locale.c
index c50cb5cc7a..db75145338 100644
--- a/wcsmbs/tst-wcstol-locale.c
+++ b/wcsmbs/tst-wcstol-locale.c
@@ -1,6 +1,6 @@
/* Test strtol functions work with all ASCII letters in Turkish
locales (bug 19242). Wide string version.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/uchar.h b/wcsmbs/uchar.h
index ce92b25c87..4d9b2ec14d 100644
--- a/wcsmbs/uchar.h
+++ b/wcsmbs/uchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2011-2016 Free Software Foundation, Inc.
+/* Copyright (C) 2011-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -27,30 +27,14 @@
#define __need_size_t
#include <stddef.h>
-#define __need_mbstate_t
-#include <wchar.h>
-
-#ifndef __mbstate_t_defined
-__BEGIN_NAMESPACE_C99
-/* Public type. */
-typedef __mbstate_t mbstate_t;
-__END_NAMESPACE_C99
-# define __mbstate_t_defined 1
-#endif
+#include <bits/types.h>
+#include <bits/types/mbstate_t.h>
-#if defined __GNUC__ && !defined __USE_ISOCXX11
-/* Define the 16-bit and 32-bit character types. Use the information
- provided by the compiler. */
-# if !defined __CHAR16_TYPE__ || !defined __CHAR32_TYPE__
-# if defined __STDC_VERSION__ && __STDC_VERSION__ < 201000L
-# error "<uchar.h> requires ISO C11 mode"
-# else
-# error "definitions of __CHAR16_TYPE__ and/or __CHAR32_TYPE__ missing"
-# endif
-# endif
-typedef __CHAR16_TYPE__ char16_t;
-typedef __CHAR32_TYPE__ char32_t;
+#ifndef __USE_ISOCXX11
+/* Define the 16-bit and 32-bit character types. */
+typedef __uint_least16_t char16_t;
+typedef __uint_least32_t char32_t;
#endif
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index e4134167dc..6c94f3ebc6 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -21,95 +21,37 @@
*/
#ifndef _WCHAR_H
+#define _WCHAR_H 1
-#if !defined __need_mbstate_t && !defined __need_wint_t
-# define _WCHAR_H 1
-# include <features.h>
-#endif
+#define __GLIBC_INTERNAL_STARTING_HEADER_IMPLEMENTATION
+#include <bits/libc-header-start.h>
-#ifdef _WCHAR_H
-/* Get FILE definition. */
-# define __need___FILE
-# if defined __USE_UNIX98 || defined __USE_XOPEN2K
-# define __need_FILE
-# endif
-# include <stdio.h>
-/* Get va_list definition. */
-# define __need___va_list
-# include <stdarg.h>
+/* Gather machine dependent type support. */
+#include <bits/floatn.h>
-# include <bits/wchar.h>
+#define __need_size_t
+#define __need_wchar_t
+#define __need_NULL
+#include <stddef.h>
-/* Get size_t, wchar_t, wint_t and NULL from <stddef.h>. */
-# define __need_size_t
-# define __need_wchar_t
-# define __need_NULL
-#endif
-#if defined _WCHAR_H || defined __need_wint_t || !defined __WINT_TYPE__
-# undef __need_wint_t
-# define __need_wint_t
-# include <stddef.h>
-
-/* We try to get wint_t from <stddef.h>, but not all GCC versions define it
- there. So define it ourselves if it remains undefined. */
-# ifndef _WINT_T
-/* Integral type unchanged by default argument promotions that can
- hold any value corresponding to members of the extended character
- set, as well as at least one value that does not correspond to any
- member of the extended character set. */
-# define _WINT_T
-typedef unsigned int wint_t;
-# else
-/* Work around problems with the <stddef.h> file which doesn't put
- wint_t in the std namespace. */
-# if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES \
- && defined __WINT_TYPE__
-__BEGIN_NAMESPACE_STD
-typedef __WINT_TYPE__ wint_t;
-__END_NAMESPACE_STD
-# endif
-# endif
+#define __need___va_list
+#include <stdarg.h>
-/* Tell the caller that we provide correct C++ prototypes. */
-# if defined __cplusplus && __GNUC_PREREQ (4, 4)
-# define __CORRECT_ISO_CPP_WCHAR_H_PROTO
-# endif
-#endif
+#include <bits/wchar.h>
+#include <bits/types/wint_t.h>
+#include <bits/types/mbstate_t.h>
+#include <bits/types/__FILE.h>
-#if (defined _WCHAR_H || defined __need_mbstate_t) && !defined ____mbstate_t_defined
-# define ____mbstate_t_defined 1
-/* Conversion state information. */
-typedef struct
-{
- int __count;
- union
- {
-# ifdef __WINT_TYPE__
- __WINT_TYPE__ __wch;
-# else
- wint_t __wch;
-# endif
- char __wchb[4];
- } __value; /* Value so far. */
-} __mbstate_t;
+#if defined __USE_UNIX98 || defined __USE_XOPEN2K
+# include <bits/types/FILE.h>
+#endif
+#ifdef __USE_XOPEN2K8
+# include <bits/types/locale_t.h>
#endif
-#undef __need_mbstate_t
-
-
-/* The rest of the file is only used if used if __need_mbstate_t is not
- defined. */
-#ifdef _WCHAR_H
-
-# ifndef __mbstate_t_defined
-__BEGIN_NAMESPACE_C99
-/* Public type. */
-typedef __mbstate_t mbstate_t;
-__END_NAMESPACE_C99
-# define __mbstate_t_defined 1
-# endif
-#ifdef __USE_GNU
-__USING_NAMESPACE_C99(mbstate_t)
+/* Tell the caller that we provide correct C++ prototypes. */
+#if defined __cplusplus && __GNUC_PREREQ (4, 4)
+# define __CORRECT_ISO_CPP_WCHAR_H_PROTO
#endif
#ifndef WCHAR_MIN
@@ -122,27 +64,25 @@ __USING_NAMESPACE_C99(mbstate_t)
# define WEOF (0xffffffffu)
#endif
-/* For XPG4 compliance we have to define the stuff from <wctype.h> here
- as well. */
-#if defined __USE_XOPEN && !defined __USE_UNIX98
-# include <wctype.h>
+/* All versions of XPG prior to the publication of ISO C99 required
+ the bulk of <wctype.h>'s declarations to appear in this header
+ (because <wctype.h> did not exist prior to C99). In POSIX.1-2001
+ those declarations were marked as XSI extensions; in -2008 they
+ were additionally marked as obsolescent. _GNU_SOURCE mode
+ anticipates the removal of these declarations in the next revision
+ of POSIX. */
+#if (defined __USE_XOPEN && !defined __USE_GNU \
+ && !(defined __USE_XOPEN2K && !defined __USE_XOPEN2KXSI))
+# include <bits/wctype-wchar.h>
#endif
-
__BEGIN_DECLS
-__BEGIN_NAMESPACE_STD
/* This incomplete type is defined in <time.h> but needed here because
of `wcsftime'. */
struct tm;
-__END_NAMESPACE_STD
-/* XXX We have to clean this up at some point. Since tm is in the std
- namespace but wcsftime is in __c99 the type wouldn't be found
- without inserting it in the global namespace. */
-__USING_NAMESPACE_STD(tm)
-__BEGIN_NAMESPACE_STD
/* Copy SRC to DEST. */
extern wchar_t *wcscpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src)
@@ -168,7 +108,6 @@ extern int wcscmp (const wchar_t *__s1, const wchar_t *__s2)
/* Compare N wide-characters of S1 and S2. */
extern int wcsncmp (const wchar_t *__s1, const wchar_t *__s2, size_t __n)
__THROW __attribute_pure__ __nonnull ((1, 2));
-__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8
/* Compare S1 and S2, ignoring case. */
@@ -180,16 +119,13 @@ extern int wcsncasecmp (const wchar_t *__s1, const wchar_t *__s2,
/* Similar to the two functions above but take the information from
the provided locale and not the global locale. */
-# include <xlocale.h>
-
extern int wcscasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
- __locale_t __loc) __THROW;
+ locale_t __loc) __THROW;
extern int wcsncasecmp_l (const wchar_t *__s1, const wchar_t *__s2,
- size_t __n, __locale_t __loc) __THROW;
+ size_t __n, locale_t __loc) __THROW;
#endif
-__BEGIN_NAMESPACE_STD
/* Compare S1 and S2, both interpreted as appropriate to the
LC_COLLATE category of the current locale. */
extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW;
@@ -198,7 +134,6 @@ extern int wcscoll (const wchar_t *__s1, const wchar_t *__s2) __THROW;
`wcscoll' to the original strings. */
extern size_t wcsxfrm (wchar_t *__restrict __s1,
const wchar_t *__restrict __s2, size_t __n) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8
/* Similar to the two functions above but take the information from
@@ -207,19 +142,18 @@ __END_NAMESPACE_STD
/* Compare S1 and S2, both interpreted as appropriate to the
LC_COLLATE category of the given locale. */
extern int wcscoll_l (const wchar_t *__s1, const wchar_t *__s2,
- __locale_t __loc) __THROW;
+ locale_t __loc) __THROW;
/* Transform S2 into array pointed to by S1 such that if wcscmp is
applied to two transformed strings the result is the as applying
`wcscoll' to the original strings. */
extern size_t wcsxfrm_l (wchar_t *__s1, const wchar_t *__s2,
- size_t __n, __locale_t __loc) __THROW;
+ size_t __n, locale_t __loc) __THROW;
/* Duplicate S, returning an identical malloc'd string. */
extern wchar_t *wcsdup (const wchar_t *__s) __THROW __attribute_malloc__;
#endif
-__BEGIN_NAMESPACE_STD
/* Find the first occurrence of WC in WCS. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wcschr (wchar_t *__wcs, wchar_t __wc)
@@ -240,7 +174,6 @@ extern "C++" const wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
extern wchar_t *wcsrchr (const wchar_t *__wcs, wchar_t __wc)
__THROW __attribute_pure__;
#endif
-__END_NAMESPACE_STD
#ifdef __USE_GNU
/* This function is similar to `wcschr'. But it returns a pointer to
@@ -249,7 +182,6 @@ extern wchar_t *wcschrnul (const wchar_t *__s, wchar_t __wc)
__THROW __attribute_pure__;
#endif
-__BEGIN_NAMESPACE_STD
/* Return the length of the initial segmet of WCS which
consists entirely of wide characters not in REJECT. */
extern size_t wcscspn (const wchar_t *__wcs, const wchar_t *__reject)
@@ -288,7 +220,6 @@ extern wchar_t *wcstok (wchar_t *__restrict __s,
/* Return the number of wide characters in S. */
extern size_t wcslen (const wchar_t *__s) __THROW __attribute_pure__;
-__END_NAMESPACE_STD
#ifdef __USE_XOPEN
/* Another name for `wcsstr' from XPG4. */
@@ -311,7 +242,6 @@ extern size_t wcsnlen (const wchar_t *__s, size_t __maxlen)
#endif
-__BEGIN_NAMESPACE_STD
/* Search N wide characters of S for C. */
#ifdef __CORRECT_ISO_CPP_WCHAR_H_PROTO
extern "C++" wchar_t *wmemchr (wchar_t *__s, wchar_t __c, size_t __n)
@@ -339,7 +269,6 @@ extern wchar_t *wmemmove (wchar_t *__s1, const wchar_t *__s2, size_t __n)
/* Set N wide characters of S to C. */
extern wchar_t *wmemset (wchar_t *__s, wchar_t __c, size_t __n) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_GNU
/* Copy N wide characters of SRC to DEST and return pointer to following
@@ -350,7 +279,6 @@ extern wchar_t *wmempcpy (wchar_t *__restrict __s1,
#endif
-__BEGIN_NAMESPACE_STD
/* Determine whether C constitutes a valid (one-byte) multibyte
character. */
extern wint_t btowc (int __c) __THROW;
@@ -378,7 +306,6 @@ extern size_t __mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) __THROW;
extern size_t mbrlen (const char *__restrict __s, size_t __n,
mbstate_t *__restrict __ps) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_EXTERN_INLINES
/* Define inline function as optimization. */
@@ -405,7 +332,6 @@ __NTH (mbrlen (const char *__restrict __s, size_t __n,
? mbrtowc (NULL, __s, __n, __ps) : __mbrlen (__s, __n, NULL)); }
#endif
-__BEGIN_NAMESPACE_STD
/* Write wide character representation of multibyte character string
SRC to DST. */
extern size_t mbsrtowcs (wchar_t *__restrict __dst,
@@ -417,7 +343,6 @@ extern size_t mbsrtowcs (wchar_t *__restrict __dst,
extern size_t wcsrtombs (char *__restrict __dst,
const wchar_t **__restrict __src, size_t __len,
mbstate_t *__restrict __ps) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_XOPEN2K8
@@ -447,25 +372,57 @@ extern int wcswidth (const wchar_t *__s, size_t __n) __THROW;
#endif /* Use X/Open. */
-__BEGIN_NAMESPACE_STD
/* Convert initial portion of the wide string NPTR to `double'
representation. */
extern double wcstod (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
/* Likewise for `float' and `long double' sizes of floating-point numbers. */
extern float wcstof (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
extern long double wcstold (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr) __THROW;
-__END_NAMESPACE_C99
#endif /* C99 */
+/* Likewise for `_FloatN' and `_FloatNx' when support is enabled. */
+
+#if __HAVE_FLOAT16 && defined __USE_GNU
+extern _Float16 wcstof16 (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
+#if __HAVE_FLOAT32 && defined __USE_GNU
+extern _Float32 wcstof32 (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
+#if __HAVE_FLOAT64 && defined __USE_GNU
+extern _Float64 wcstof64 (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
+#if __HAVE_FLOAT128 && defined __USE_GNU
+extern _Float128 wcstof128 (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
+#if __HAVE_FLOAT32X && defined __USE_GNU
+extern _Float32x wcstof32x (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
+#if __HAVE_FLOAT64X && defined __USE_GNU
+extern _Float64x wcstof64x (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
+#if __HAVE_FLOAT128X && defined __USE_GNU
+extern _Float128x wcstof128x (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr) __THROW;
+#endif
+
-__BEGIN_NAMESPACE_STD
/* Convert initial portion of wide string NPTR to `long int'
representation. */
extern long int wcstol (const wchar_t *__restrict __nptr,
@@ -476,10 +433,8 @@ extern long int wcstol (const wchar_t *__restrict __nptr,
extern unsigned long int wcstoul (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base)
__THROW;
-__END_NAMESPACE_STD
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
/* Convert initial portion of wide string NPTR to `long long int'
representation. */
__extension__
@@ -493,7 +448,6 @@ __extension__
extern unsigned long long int wcstoull (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
int __base) __THROW;
-__END_NAMESPACE_C99
#endif /* ISO C99. */
#ifdef __USE_GNU
@@ -513,53 +467,81 @@ extern unsigned long long int wcstouq (const wchar_t *__restrict __nptr,
#endif /* Use GNU. */
#ifdef __USE_GNU
-/* The concept of one static locale per category is not very well
- thought out. Many applications will need to process its data using
- information from several different locales. Another application is
- the implementation of the internationalization handling in the
- upcoming ISO C++ standard library. To support this another set of
- the functions using locale data exist which have an additional
- argument.
-
- Attention: all these functions are *not* standardized in any form.
- This is a proof-of-concept implementation. */
-
-/* Structure for reentrant locale using functions. This is an
- (almost) opaque type for the user level programs. */
-# include <xlocale.h>
-
-/* Special versions of the functions above which take the locale to
- use as an additional parameter. */
+/* Parallel versions of the functions above which take the locale to
+ use as an additional parameter. These are GNU extensions inspired
+ by the POSIX.1-2008 extended locale API. */
extern long int wcstol_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr, int __base,
- __locale_t __loc) __THROW;
+ locale_t __loc) __THROW;
extern unsigned long int wcstoul_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
+ int __base, locale_t __loc) __THROW;
__extension__
extern long long int wcstoll_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
- int __base, __locale_t __loc) __THROW;
+ int __base, locale_t __loc) __THROW;
__extension__
extern unsigned long long int wcstoull_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
- int __base, __locale_t __loc)
+ int __base, locale_t __loc)
__THROW;
extern double wcstod_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, __locale_t __loc)
+ wchar_t **__restrict __endptr, locale_t __loc)
__THROW;
extern float wcstof_l (const wchar_t *__restrict __nptr,
- wchar_t **__restrict __endptr, __locale_t __loc)
+ wchar_t **__restrict __endptr, locale_t __loc)
__THROW;
extern long double wcstold_l (const wchar_t *__restrict __nptr,
wchar_t **__restrict __endptr,
- __locale_t __loc) __THROW;
+ locale_t __loc) __THROW;
+
+# if __HAVE_FLOAT16
+extern _Float16 wcstof16_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
+
+# if __HAVE_FLOAT32
+extern _Float32 wcstof32_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
+
+# if __HAVE_FLOAT64
+extern _Float64 wcstof64_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
+
+# if __HAVE_FLOAT128
+extern _Float128 wcstof128_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
+
+# if __HAVE_FLOAT32X
+extern _Float32x wcstof32x_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
+
+# if __HAVE_FLOAT64X
+extern _Float64x wcstof64x_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
+
+# if __HAVE_FLOAT128X
+extern _Float128x wcstof128x_l (const wchar_t *__restrict __nptr,
+ wchar_t **__restrict __endptr,
+ locale_t __loc) __THROW;
+# endif
#endif /* use GNU */
@@ -574,17 +556,18 @@ extern wchar_t *wcpcpy (wchar_t *__restrict __dest,
extern wchar_t *wcpncpy (wchar_t *__restrict __dest,
const wchar_t *__restrict __src, size_t __n)
__THROW;
+#endif
/* Wide character I/O functions. */
+#if defined __USE_XOPEN2K8 || __GLIBC_USE (LIB_EXT2)
/* Like OPEN_MEMSTREAM, but the stream is wide oriented and produces
a wide character string. */
extern __FILE *open_wmemstream (wchar_t **__bufloc, size_t *__sizeloc) __THROW;
#endif
#if defined __USE_ISOC95 || defined __USE_UNIX98
-__BEGIN_NAMESPACE_STD
/* Select orientation for stream. */
extern int fwide (__FILE *__fp, int __mode) __THROW;
@@ -680,11 +663,9 @@ extern int __isoc99_swscanf (const wchar_t *__restrict __s,
# endif
# endif
-__END_NAMESPACE_STD
#endif /* Use ISO C95, C99 and Unix98. */
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
/* Read formatted input from S into argument list ARG.
This function is a possible cancellation point and therefore not
@@ -736,11 +717,9 @@ extern int __isoc99_vswscanf (const wchar_t *__restrict __s,
# endif
# endif
-__END_NAMESPACE_C99
#endif /* Use ISO C99. */
-__BEGIN_NAMESPACE_STD
/* Read a character from STREAM.
These functions are possible cancellation points and therefore not
@@ -790,7 +769,6 @@ extern int fputws (const wchar_t *__restrict __ws,
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern wint_t ungetwc (wint_t __wc, __FILE *__stream);
-__END_NAMESPACE_STD
#ifdef __USE_GNU
@@ -851,37 +829,22 @@ extern int fputws_unlocked (const wchar_t *__restrict __ws,
#endif
-__BEGIN_NAMESPACE_C99
/* Format TP into S according to FORMAT.
Write no more than MAXSIZE wide characters and return the number
of wide characters written, or 0 if it would exceed MAXSIZE. */
extern size_t wcsftime (wchar_t *__restrict __s, size_t __maxsize,
const wchar_t *__restrict __format,
const struct tm *__restrict __tp) __THROW;
-__END_NAMESPACE_C99
# ifdef __USE_GNU
-# include <xlocale.h>
-
/* Similar to `wcsftime' but takes the information from
the provided locale and not the global locale. */
extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
const wchar_t *__restrict __format,
const struct tm *__restrict __tp,
- __locale_t __loc) __THROW;
+ locale_t __loc) __THROW;
# endif
-/* The X/Open standard demands that most of the functions defined in
- the <wctype.h> header must also appear here. This is probably
- because some X/Open members wrote their implementation before the
- ISO C standard was published and introduced the better solution.
- We have to provide these definitions for compliance reasons but we
- do this nonsense only if really necessary. */
-#if defined __USE_UNIX98 && !defined __USE_GNU
-# define __need_iswxxx
-# include <wctype.h>
-#endif
-
/* Define some macros helping to catch buffer overflows. */
#if __USE_FORTIFY_LEVEL > 0 && defined __fortify_function
# include <bits/wchar2.h>
@@ -893,11 +856,4 @@ extern size_t wcsftime_l (wchar_t *__restrict __s, size_t __maxsize,
__END_DECLS
-#endif /* _WCHAR_H defined */
-
#endif /* wchar.h */
-
-/* Undefine all __need_* constants in case we are included to get those
- constants but the whole file was already read. */
-#undef __need_mbstate_t
-#undef __need_wint_t
diff --git a/wcsmbs/wcpcpy.c b/wcsmbs/wcpcpy.c
index 839d049501..af0cf28d74 100644
--- a/wcsmbs/wcpcpy.c
+++ b/wcsmbs/wcpcpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcpncpy.c b/wcsmbs/wcpncpy.c
index 958ed46ed7..e633faf797 100644
--- a/wcsmbs/wcpncpy.c
+++ b/wcsmbs/wcpncpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcrtomb.c b/wcsmbs/wcrtomb.c
index 8b87ddeb8f..23f122599a 100644
--- a/wcsmbs/wcrtomb.c
+++ b/wcsmbs/wcrtomb.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/wcsmbs/wcscasecmp.c b/wcsmbs/wcscasecmp.c
index dee604a9a9..e2d7f7ce84 100644
--- a/wcsmbs/wcscasecmp.c
+++ b/wcsmbs/wcscasecmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1991-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1991-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -35,7 +35,7 @@
#endif
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define LOCALE_PARAM , __locale_t loc
+# define LOCALE_PARAM , locale_t loc
#else
# define LOCALE_PARAM
#endif
diff --git a/wcsmbs/wcscasecmp_l.c b/wcsmbs/wcscasecmp_l.c
index 3cb3c978f1..bbe50c607a 100644
--- a/wcsmbs/wcscasecmp_l.c
+++ b/wcsmbs/wcscasecmp_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/wcsmbs/wcscat.c b/wcsmbs/wcscat.c
index 04cb7a206f..5fe4e02adc 100644
--- a/wcsmbs/wcscat.c
+++ b/wcsmbs/wcscat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcschr.c b/wcsmbs/wcschr.c
index e005b802c6..2136050f7a 100644
--- a/wcsmbs/wcschr.c
+++ b/wcsmbs/wcschr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/wcschrnul.c b/wcsmbs/wcschrnul.c
index 791e47df5b..af35da8ae3 100644
--- a/wcsmbs/wcschrnul.c
+++ b/wcsmbs/wcschrnul.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/wcscmp.c b/wcsmbs/wcscmp.c
index a1b42886ec..254bc7e257 100644
--- a/wcsmbs/wcscmp.c
+++ b/wcsmbs/wcscmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcscoll.c b/wcsmbs/wcscoll.c
index 2c0e3feb5d..eb71842b8b 100644
--- a/wcsmbs/wcscoll.c
+++ b/wcsmbs/wcscoll.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/wcsmbs/wcscoll_l.c b/wcsmbs/wcscoll_l.c
index 9fc9524010..2f0fa2fe27 100644
--- a/wcsmbs/wcscoll_l.c
+++ b/wcsmbs/wcscoll_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcscpy.c b/wcsmbs/wcscpy.c
index d07fd3e05f..31a2dd0897 100644
--- a/wcsmbs/wcscpy.c
+++ b/wcsmbs/wcscpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcscspn.c b/wcsmbs/wcscspn.c
index 8fce43caf7..845f532c82 100644
--- a/wcsmbs/wcscspn.c
+++ b/wcsmbs/wcscspn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcsdup.c b/wcsmbs/wcsdup.c
index 658207a2cd..cebf6eda95 100644
--- a/wcsmbs/wcsdup.c
+++ b/wcsmbs/wcsdup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcslen.c b/wcsmbs/wcslen.c
index f34dffb977..cfb076e469 100644
--- a/wcsmbs/wcslen.c
+++ b/wcsmbs/wcslen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcsmbsload.c b/wcsmbs/wcsmbsload.c
index d8b863e01a..02cf94bab8 100644
--- a/wcsmbs/wcsmbsload.c
+++ b/wcsmbs/wcsmbsload.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -148,7 +148,6 @@ __libc_rwlock_define (extern, __libc_setlocale_lock attribute_hidden)
/* Load conversion functions for the currently selected locale. */
void
-internal_function
__wcsmbs_load_conv (struct __locale_data *new_category)
{
/* Acquire the lock. */
@@ -215,7 +214,6 @@ __wcsmbs_load_conv (struct __locale_data *new_category)
/* Clone the current conversion function set. */
void
-internal_function
__wcsmbs_clone_conv (struct gconv_fcts *copy)
{
const struct gconv_fcts *orig;
@@ -236,7 +234,6 @@ __wcsmbs_clone_conv (struct gconv_fcts *copy)
/* Get converters for named charset. */
int
-internal_function
__wcsmbs_named_conv (struct gconv_fcts *copy, const char *name)
{
copy->towc = __wcsmbs_getfct ("INTERNAL", name, &copy->towc_nsteps);
@@ -253,7 +250,7 @@ __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name)
return 0;
}
-void internal_function
+void
_nl_cleanup_ctype (struct __locale_data *locale)
{
const struct gconv_fcts *const data = locale->private.ctype;
diff --git a/wcsmbs/wcsmbsload.h b/wcsmbs/wcsmbsload.h
index 7fdaf4bce0..8ad9fcadf9 100644
--- a/wcsmbs/wcsmbsload.h
+++ b/wcsmbs/wcsmbsload.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -38,19 +38,18 @@ extern const struct gconv_fcts __wcsmbs_gconv_fcts_c attribute_hidden;
/* Load conversion functions for the currently selected locale. */
extern void __wcsmbs_load_conv (struct __locale_data *new_category)
- internal_function;
+ attribute_hidden;
/* Clone the current `__wcsmbs_load_conv' value. */
extern void __wcsmbs_clone_conv (struct gconv_fcts *copy)
- internal_function;
+ attribute_hidden;
/* Find the conversion functions for converting to and from NAME. */
extern int __wcsmbs_named_conv (struct gconv_fcts *copy, const char *name)
- internal_function;
+ attribute_hidden;
/* Function used for the `private.cleanup' hook. */
-extern void _nl_cleanup_ctype (struct __locale_data *)
- internal_function attribute_hidden;
+extern void _nl_cleanup_ctype (struct __locale_data *) attribute_hidden;
#include <iconv/gconv_int.h>
diff --git a/wcsmbs/wcsncase.c b/wcsmbs/wcsncase.c
index c6034a9114..2f149b2434 100644
--- a/wcsmbs/wcsncase.c
+++ b/wcsmbs/wcsncase.c
@@ -1,6 +1,6 @@
/* Compare at most N wide characters of two strings without taking care
for the case.
- Copyright (C) 1992-2016 Free Software Foundation, Inc.
+ Copyright (C) 1992-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,7 +37,7 @@
#endif
#ifdef USE_IN_EXTENDED_LOCALE_MODEL
-# define LOCALE_PARAM , __locale_t loc
+# define LOCALE_PARAM , locale_t loc
#else
# define LOCALE_PARAM
#endif
diff --git a/wcsmbs/wcsncase_l.c b/wcsmbs/wcsncase_l.c
index 2275a18fad..ed0b1a81a8 100644
--- a/wcsmbs/wcsncase_l.c
+++ b/wcsmbs/wcsncase_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
diff --git a/wcsmbs/wcsncat.c b/wcsmbs/wcsncat.c
index 9b22764ca1..8d4013b53d 100644
--- a/wcsmbs/wcsncat.c
+++ b/wcsmbs/wcsncat.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcsncmp.c b/wcsmbs/wcsncmp.c
index fa4ceadf7f..5e8201243b 100644
--- a/wcsmbs/wcsncmp.c
+++ b/wcsmbs/wcsncmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcsncpy.c b/wcsmbs/wcsncpy.c
index cd90024e44..e9735854d2 100644
--- a/wcsmbs/wcsncpy.c
+++ b/wcsmbs/wcsncpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcsnlen.c b/wcsmbs/wcsnlen.c
index 59527b1616..d8f60a3b5a 100644
--- a/wcsmbs/wcsnlen.c
+++ b/wcsmbs/wcsnlen.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1998-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1998-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
diff --git a/wcsmbs/wcsnrtombs.c b/wcsmbs/wcsnrtombs.c
index 40d7ab71b0..93d51cae37 100644
--- a/wcsmbs/wcsnrtombs.c
+++ b/wcsmbs/wcsnrtombs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/wcspbrk.c b/wcsmbs/wcspbrk.c
index 7671affb36..24f9da352f 100644
--- a/wcsmbs/wcspbrk.c
+++ b/wcsmbs/wcspbrk.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
diff --git a/wcsmbs/wcsrchr.c b/wcsmbs/wcsrchr.c
index 8954ad01c9..f81c8f52d4 100644
--- a/wcsmbs/wcsrchr.c
+++ b/wcsmbs/wcsrchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
diff --git a/wcsmbs/wcsrtombs.c b/wcsmbs/wcsrtombs.c
index e22cc04f61..9b85822464 100644
--- a/wcsmbs/wcsrtombs.c
+++ b/wcsmbs/wcsrtombs.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/wcsspn.c b/wcsmbs/wcsspn.c
index ae26506b3b..e6caafcc2b 100644
--- a/wcsmbs/wcsspn.c
+++ b/wcsmbs/wcsspn.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcsstr.c b/wcsmbs/wcsstr.c
index a3449ba0b2..fba0325bf3 100644
--- a/wcsmbs/wcsstr.c
+++ b/wcsmbs/wcsstr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
diff --git a/wcsmbs/wcstod.c b/wcsmbs/wcstod.c
index 8e16234a40..b081c0ae16 100644
--- a/wcsmbs/wcstod.c
+++ b/wcsmbs/wcstod.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
@@ -17,12 +17,9 @@
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
#define USE_WIDE_CHAR 1
-extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int,
- __locale_t);
-
#include <stdlib/strtod.c>
diff --git a/wcsmbs/wcstod_l.c b/wcsmbs/wcstod_l.c
index 62e75ed19c..921c1fb229 100644
--- a/wcsmbs/wcstod_l.c
+++ b/wcsmbs/wcstod_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,12 +18,9 @@
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
-extern double ____wcstod_l_internal (const wchar_t *, wchar_t **, int,
- __locale_t);
-
#define USE_WIDE_CHAR 1
#include <stdlib/strtod_l.c>
diff --git a/wcsmbs/wcstod_nan.c b/wcsmbs/wcstod_nan.c
index cd96ea01b6..1423f3e8aa 100644
--- a/wcsmbs/wcstod_nan.c
+++ b/wcsmbs/wcstod_nan.c
@@ -1,5 +1,5 @@
/* Convert string for NaN payload to corresponding NaN. Wide strings, double.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include "../stdlib/strtod_nan_wide.h"
-#include "../stdlib/strtod_nan_double.h"
+#include <math-type-macros-double.h>
#define STRTOD_NAN __wcstod_nan
#include "../stdlib/strtod_nan_main.c"
diff --git a/wcsmbs/wcstof.c b/wcsmbs/wcstof.c
index ac998cf038..f27c9a68a6 100644
--- a/wcsmbs/wcstof.c
+++ b/wcsmbs/wcstof.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
@@ -17,11 +17,8 @@
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
#define USE_WIDE_CHAR 1
-extern float ____wcstof_l_internal (const wchar_t *, wchar_t **, int,
- __locale_t);
-
#include <stdlib/strtof.c>
diff --git a/wcsmbs/wcstof_l.c b/wcsmbs/wcstof_l.c
index f03f3ef0ec..3c8c9a7e1e 100644
--- a/wcsmbs/wcstof_l.c
+++ b/wcsmbs/wcstof_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,12 +18,9 @@
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
#define USE_WIDE_CHAR 1
-extern float ____wcstof_l_internal (const wchar_t *, wchar_t **, int,
- __locale_t);
-
#include <stdlib/strtof_l.c>
diff --git a/wcsmbs/wcstof_nan.c b/wcsmbs/wcstof_nan.c
index 58ee01ab5b..96f2198667 100644
--- a/wcsmbs/wcstof_nan.c
+++ b/wcsmbs/wcstof_nan.c
@@ -1,5 +1,5 @@
/* Convert string for NaN payload to corresponding NaN. Wide strings, float.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -17,7 +17,7 @@
<http://www.gnu.org/licenses/>. */
#include "../stdlib/strtod_nan_wide.h"
-#include "../stdlib/strtod_nan_float.h"
+#include <math-type-macros-float.h>
#define STRTOD_NAN __wcstof_nan
#include "../stdlib/strtod_nan_main.c"
diff --git a/wcsmbs/wcstok.c b/wcsmbs/wcstok.c
index 74de78ca3c..8fbf4af9d9 100644
--- a/wcsmbs/wcstok.c
+++ b/wcsmbs/wcstok.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
diff --git a/wcsmbs/wcstol.c b/wcsmbs/wcstol.c
index cefd747d81..e9e09ca48c 100644
--- a/wcsmbs/wcstol.c
+++ b/wcsmbs/wcstol.c
@@ -1,5 +1,5 @@
/* Function to parse a `long int' from text.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcstol_l.c b/wcsmbs/wcstol_l.c
index 1cebaecf01..e6f9e8523e 100644
--- a/wcsmbs/wcstol_l.c
+++ b/wcsmbs/wcstol_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,7 +23,4 @@
#define USE_WIDE_CHAR 1
-extern long int ____wcstol_l_internal (const wchar_t *, wchar_t **, int, int,
- __locale_t);
-
#include <stdlib/strtol_l.c>
diff --git a/wcsmbs/wcstold.c b/wcsmbs/wcstold.c
index 03d4c96afc..b6c8ccb3c4 100644
--- a/wcsmbs/wcstold.c
+++ b/wcsmbs/wcstold.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
@@ -17,11 +17,8 @@
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
#define USE_WIDE_CHAR 1
-extern long double ____wcstold_l_internal (const wchar_t *, wchar_t **, int,
- __locale_t);
-
#include <stdlib/strtold.c>
diff --git a/wcsmbs/wcstold_l.c b/wcsmbs/wcstold_l.c
index c7459f82ab..1002f25574 100644
--- a/wcsmbs/wcstold_l.c
+++ b/wcsmbs/wcstold_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -18,11 +18,8 @@
<http://www.gnu.org/licenses/>. */
#include <stddef.h>
-#include <xlocale.h>
+#include <locale.h>
#define USE_WIDE_CHAR 1
-extern long double ____wcstold_l_internal (const wchar_t *, wchar_t **, int,
- __locale_t);
-
#include <strtold_l.c>
diff --git a/wcsmbs/wcstold_nan.c b/wcsmbs/wcstold_nan.c
index 6baeee7219..66793ec459 100644
--- a/wcsmbs/wcstold_nan.c
+++ b/wcsmbs/wcstold_nan.c
@@ -1,6 +1,6 @@
/* Convert string for NaN payload to corresponding NaN. Wide strings,
long double.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2015-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -23,7 +23,7 @@
representation. */
#ifndef __NO_LONG_DOUBLE_MATH
# include "../stdlib/strtod_nan_wide.h"
-# include <strtod_nan_ldouble.h>
+# include <math-type-macros-ldouble.h>
# define STRTOD_NAN __wcstold_nan
# include "../stdlib/strtod_nan_main.c"
diff --git a/wcsmbs/wcstoll.c b/wcsmbs/wcstoll.c
index 91a7291072..d821d60b54 100644
--- a/wcsmbs/wcstoll.c
+++ b/wcsmbs/wcstoll.c
@@ -1,5 +1,5 @@
/* Function to parse a `long long int' from text.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcstoll_l.c b/wcsmbs/wcstoll_l.c
index ea2aa5a900..bca3900d75 100644
--- a/wcsmbs/wcstoll_l.c
+++ b/wcsmbs/wcstoll_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,7 +23,4 @@
#define QUAD 1
-extern long long int ____wcstoll_l_internal (const wchar_t *, wchar_t **,
- int, int, __locale_t);
-
#include <wcstol_l.c>
diff --git a/wcsmbs/wcstoul.c b/wcsmbs/wcstoul.c
index 064dc6a6e3..b2e1bc918c 100644
--- a/wcsmbs/wcstoul.c
+++ b/wcsmbs/wcstoul.c
@@ -1,5 +1,5 @@
/* Function to parse an `unsigned long int' from text.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcstoul_l.c b/wcsmbs/wcstoul_l.c
index 314d7d7c3b..6bdf43a06d 100644
--- a/wcsmbs/wcstoul_l.c
+++ b/wcsmbs/wcstoul_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,7 +23,4 @@
#define UNSIGNED 1
-extern unsigned long int ____wcstoul_l_internal (const wchar_t *, wchar_t **,
- int, int, __locale_t);
-
#include "wcstol_l.c"
diff --git a/wcsmbs/wcstoull.c b/wcsmbs/wcstoull.c
index 2a91beefc2..6195b6f376 100644
--- a/wcsmbs/wcstoull.c
+++ b/wcsmbs/wcstoull.c
@@ -1,5 +1,5 @@
/* Function to parse an `unsigned long long int' from text.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcstoull_l.c b/wcsmbs/wcstoull_l.c
index 24b1d79e54..8526d51266 100644
--- a/wcsmbs/wcstoull_l.c
+++ b/wcsmbs/wcstoull_l.c
@@ -1,5 +1,5 @@
/* Convert string representing a number to integer value, using given locale.
- Copyright (C) 1997-2016 Free Software Foundation, Inc.
+ Copyright (C) 1997-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1997.
@@ -23,8 +23,4 @@
#define UNSIGNED 1
-extern unsigned long long int ____wcstoull_l_internal (const wchar_t *,
- wchar_t **, int, int,
- __locale_t);
-
#include <wcstoll_l.c>
diff --git a/wcsmbs/wcswidth.c b/wcsmbs/wcswidth.c
index e0b3ac24ae..bdbc171b86 100644
--- a/wcsmbs/wcswidth.c
+++ b/wcsmbs/wcswidth.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcsxfrm.c b/wcsmbs/wcsxfrm.c
index 2473d234f9..d9c3489240 100644
--- a/wcsmbs/wcsxfrm.c
+++ b/wcsmbs/wcsxfrm.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
diff --git a/wcsmbs/wcsxfrm_l.c b/wcsmbs/wcsxfrm_l.c
index 73954166ee..27f8e2a503 100644
--- a/wcsmbs/wcsxfrm_l.c
+++ b/wcsmbs/wcsxfrm_l.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wctob.c b/wcsmbs/wctob.c
index c054290b4e..906d68bd60 100644
--- a/wcsmbs/wctob.c
+++ b/wcsmbs/wctob.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcwidth.c b/wcsmbs/wcwidth.c
index a56297b279..26f6960e08 100644
--- a/wcsmbs/wcwidth.c
+++ b/wcsmbs/wcwidth.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wcwidth.h b/wcsmbs/wcwidth.h
index bebeb6c873..6fb3503196 100644
--- a/wcsmbs/wcwidth.h
+++ b/wcsmbs/wcwidth.h
@@ -1,5 +1,5 @@
/* Internal header containing implementation of wcwidth() function.
- Copyright (C) 1996-2016 Free Software Foundation, Inc.
+ Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wmemchr.c b/wcsmbs/wmemchr.c
index 27a79d58c6..d01939355e 100644
--- a/wcsmbs/wmemchr.c
+++ b/wcsmbs/wmemchr.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/wmemcmp.c b/wcsmbs/wmemcmp.c
index 83594d1943..d6cfd692c0 100644
--- a/wcsmbs/wmemcmp.c
+++ b/wcsmbs/wmemcmp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1996.
diff --git a/wcsmbs/wmemcpy.c b/wcsmbs/wmemcpy.c
index 06e156aba6..4980c9ba52 100644
--- a/wcsmbs/wmemcpy.c
+++ b/wcsmbs/wmemcpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
diff --git a/wcsmbs/wmemmove.c b/wcsmbs/wmemmove.c
index f13f6fbebb..f22ff6fbb5 100644
--- a/wcsmbs/wmemmove.c
+++ b/wcsmbs/wmemmove.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper, <drepper@gnu.ai.mit.edu>
diff --git a/wcsmbs/wmempcpy.c b/wcsmbs/wmempcpy.c
index c6387edcea..fae854b804 100644
--- a/wcsmbs/wmempcpy.c
+++ b/wcsmbs/wmempcpy.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1999-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1999.
diff --git a/wcsmbs/wmemset.c b/wcsmbs/wmemset.c
index 67f7ad0cee..330f5a30e4 100644
--- a/wcsmbs/wmemset.c
+++ b/wcsmbs/wmemset.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2016 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.