glibc/locale
Joseph Myers 2072f5c34e Remove C++ namespace handling from glibc headers.
glibc headers include some code (not particularly consistent or
systematic) to put various declarations in C++ namespaces std and
__c99, if _GLIBCPP_USE_NAMESPACES is defined.

As noted in <https://gcc.gnu.org/ml/libstdc++/2017-03/msg00025.html>,
this macro was removed from libstdc++ in 2000.  I don't expect
compilation with such old versions of libstdc++ to work with current
glibc headers anyway (whereas old *binaries* are expected to stay
working with current glibc); this patch (which should be a no-op with
any libstdc++ version postdating that removal) removes all this code
from the glibc headers.

The begin-end-check.pl test, whose comments say it is about checking
these namespace macro calls, is also removed.  The code in that test
would have covered __BEGIN_DECLS / __END_DECLS as well, but if those
weren't properly matched it would show up with the
check-installed-headers-cxx tests, so I don't think there is an actual
use for keeping begin-end-check.pl with the namespace code removed.

Tested for x86_64 and x86 (testsuite, and that installed stripped
shared libraries are unchanged by the patch).

	* misc/sys/cdefs.h (__BEGIN_NAMESPACE_STD): Remove macro.
	(__END_NAMESPACE_STD): Likewise.
	(__USING_NAMESPACE_STD): Likewise.
	(__BEGIN_NAMESPACE_C99): Likewise.
	(__END_NAMESPACE_C99): Likewise.
	(__USING_NAMESPACE_C99): Likewise.
	* math/math.h (_Mdouble_BEGIN_NAMESPACE): Do not define and
	undefine macro.
	(_Mdouble_END_NAMESPACE): Likewise.
	* ctype/ctype.h: Do not handle C++ namespaces.
	* libio/bits/stdio-ldbl.h: Likewise.
	* libio/stdio.h: Likewise.
	* locale/locale.h: Likewise.
	* math/bits/mathcalls.h: Likewise.
	* setjmp/setjmp.h: Likewise.
	* signal/signal.h: Likewise.
	* stdlib/bits/stdlib-float.h: Likewise.
	* stdlib/bits/stdlib-ldbl.h: Likewise.
	* stdlib/stdlib.h: Likewise.
	* string/string.h: Likewise.
	* sysdeps/x86/fpu/bits/mathinline.h: Likewise.
	* time/bits/types/clock_t.h: Likewise.
	* time/bits/types/struct_tm.h: Likewise.
	* time/bits/types/time_t.h: Likewise.
	* time/time.h: Likewise.
	* wcsmbs/bits/wchar-ldbl.h: Likewise.
	* wcsmbs/uchar.h: Likewise.
	* wcsmbs/wchar.h: Likewise.
	[_GLIBCPP_USE_NAMESPACES] (wint_t): Remove conditional definition.
	* wctype/wctype.h: Do not handle C++ namespaces.
	* scripts/begin-end-check.pl: Remove.
	* Makefile (installed-headers): Likewise.
	(tests-special): Do not add $(objpfx)begin-end-check.out.
	($(objpfx)begin-end-check.out): Remove.
2017-03-16 13:31:57 +00:00
..
bits Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
programs Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
broken_cur_max.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C_name.c
C-address.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-collate.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-ctype.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-identification.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-measurement.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-messages.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-monetary.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-name.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-numeric.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-paper.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-telephone.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-time.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
C-translit.h Regenerate locale/C-translit.h. 2015-12-09 22:24:26 -05:00
C-translit.h.in Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
categories.def Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
coll-lookup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
coll-lookup.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
duplocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
elem-hash.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
findlocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
freelocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gen-translit.pl Make shebang interpreter directives consistent 2016-01-07 04:03:21 -05:00
global-locale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hashval.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
indigits.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
indigitswc.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
iso-639.def localedata: sgs_LT: new locale [BZ #12450] 2016-05-01 15:18:04 -04:00
iso-3166.def Fix typos in 3166.def. 2013-10-04 18:51:42 -04:00
iso-4217.def localedata: CLDRv29: update LC_MONETARY int_curr_symbol & currency_symbol 2016-04-15 13:42:29 -04:00
langinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-address.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-collate.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-ctype.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-identification.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-measurement.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-messages.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-monetary.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-name.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-numeric.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-paper.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-telephone.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lc-time.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
loadarchive.c Remove the str(n)dup inlines from string/bits/string2.h. Although inlining 2017-03-13 18:45:42 +00:00
loadlocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
locale.h Remove C++ namespace handling from glibc headers. 2017-03-16 13:31:57 +00:00
localeconv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
localeinfo.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
localename.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
locarchive.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Makefile Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mb_cur_max.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
newlocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nl_langinfo_l.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
nl_langinfo.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
outdigits.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
outdigitswc.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setlocale.c Remove the str(n)dup inlines from string/bits/string2.h. Although inlining 2017-03-13 18:45:42 +00:00
strlen-hash.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
SYS_libc.c [BZ #284, BZ #721] 2005-02-17 01:19:55 +00:00
tst-C-locale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-duplocale.c Add missing test files. 2009-11-17 16:23:57 -08:00
tst-locname.c Add missing test files. 2009-11-17 16:23:57 -08:00
uselocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions * sysdeps/ia64/dl-fptr.c (__ia64_make_fptr): Revert last change. 2003-03-03 09:45:25 +00:00
weight.h Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
weightwc.h Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
xlocale.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
xlocale.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00