diff --git a/ChangeLog b/ChangeLog index 84f177d2a5..c7877ef1bf 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,32 @@ +2017-06-20 Zack Weinberg + + * locale/xlocale.h: Rename to... + * locale/bits/types/__locale_t.h: ...here. Adjust commentary. + Only define struct __locale_struct and __locale_t, not locale_t. + * locale/bits/types/locale_t.h: New file; define locale_t here. + * locale/Makefile (headers): Update to match. + + * include/xlocale.h: Delete wrapper. + * include/bits/types/__locale_t.h: New wrapper. + * include/bits/types/locale_t.h: New wrapper. + + * ctype/ctype.h, include/printf.h, include/time.h + * locale/langinfo.h, locale/locale.h, stdlib/monetary.h + * stdlib/stdlib.h, string/string.h, string/strings.h, time/time.h + * wcsmbs/wchar.h, wctype/wctype.h: Use bits/types/locale_t.h. + Correct outdated comments regarding the standardization status of + the functions that take locale_t arguments. + + * stdlib/strtod_l.c, stdlib/strtof_l.c, stdlib/strtol_l.c + * stdlib/strtold_l.c, stdlib/strtoul_l.c, stdlib/strtoull_l.c + * sysdeps/ieee754/ldbl-128ibm/strtold_l.c + * sysdeps/ieee754/ldbl-64-128/strtold_l.c + * wcsmbs/wcstod.c, wcsmbs/wcstod_l.c, wcsmbs/wcstof.c + * wcsmbs/wcstof_l.c, wcsmbs/wcstold.c, wcsmbs/wcstold_l.c: + Don't include xlocale.h. If necessary, include locale.h instead. + + * stdlib/strtold_l.c: Unconditionally include wchar.h. + 2017-06-20 Adhemerval Zanella * sysdeps/unix/sysv/linux/openat.c (__libc_openat): Build only diff --git a/NEWS b/NEWS index 4db334b687..0736b4b27f 100644 --- a/NEWS +++ b/NEWS @@ -74,6 +74,10 @@ Version 2.26 as this kind of optimization is better done by the compiler. The macros __USE_STRING_INLINES and __NO_STRING_INLINES no longer have any effect. +* The nonstandard header has been removed. Most programs should + use instead. If you have a specific need for the definition + of locale_t with no other declarations, please talk to us. + * The reallocarray function has been added to libc. It is a realloc replacement with a check for integer overflow when calculating total allocation size. diff --git a/ctype/ctype.h b/ctype/ctype.h index 1fe89cf836..ce598d53e5 100644 --- a/ctype/ctype.h +++ b/ctype/ctype.h @@ -233,20 +233,8 @@ __NTH (toupper (int __c)) #ifdef __USE_XOPEN2K8 -/* 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 +/* POSIX.1-2008 extended locale interface (see locale.h). */ +# include /* These definitions are similar to the ones above but all functions take as an argument a handle for the locale which shall be used. */ diff --git a/dev/null b/dev/null new file mode 100644 index 0000000000..e69de29bb2 diff --git a/include/bits/types/__locale_t.h b/include/bits/types/__locale_t.h new file mode 100644 index 0000000000..610b8197c7 --- /dev/null +++ b/include/bits/types/__locale_t.h @@ -0,0 +1 @@ +#include diff --git a/include/bits/types/locale_t.h b/include/bits/types/locale_t.h new file mode 100644 index 0000000000..24b074872f --- /dev/null +++ b/include/bits/types/locale_t.h @@ -0,0 +1 @@ +#include diff --git a/include/printf.h b/include/printf.h index 984f263167..7b4d209c47 100644 --- a/include/printf.h +++ b/include/printf.h @@ -4,7 +4,7 @@ # ifndef _ISOMAC -#include +#include /* Now define the internal interfaces. */ extern int __printf_fphex (FILE *, const struct printf_info *, diff --git a/include/time.h b/include/time.h index 3a828e0420..0a67cf3a19 100644 --- a/include/time.h +++ b/include/time.h @@ -2,7 +2,7 @@ #include