glibc/misc
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
sys Remove C++ namespace handling from glibc headers. 2017-03-16 13:31:57 +00:00
acct.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ar.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
brk.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
bug-hsearch1.c .. 2009-01-23 20:41:36 +00:00
bug18240.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
chflags.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
chroot.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
daemon.c Convert 29 more function definitions to prototype style (multiple parameters in one K&R parameter declaration). 2015-10-20 11:52:27 +00:00
dirname.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
efgcvt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
efgcvt_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
err.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
err.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
error.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
error.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fchflags.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fdatasync.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fgetxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
flistxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fremovexattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fsetxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fstab.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
fstab.h Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
fsync.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ftruncate.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ftruncate64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
futimes.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
futimesat.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getauxval.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getclktck.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getdomain.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getdtsz.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gethostid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gethostname.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getloadavg.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getpagesize.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getpass.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getsysstats.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
getttyent.c As a minor cleanup remove the (r)index defines from include/string.h as 2017-02-06 18:15:18 +00:00
getusershell.c Use (void) in no-arguments function definitions. 2013-06-08 00:22:23 +00:00
getxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
gtty.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hsearch.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
hsearch_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ifunc-impl-list.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
init-misc.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
insremque.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ioctl.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lgetxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
libgen.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
listxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
llistxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lremovexattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lsearch.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lsetxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
lutimes.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
madvise.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
makedev.c 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
mincore.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkdtemp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkostemp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkostemp64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkostemps.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkostemps64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkstemp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkstemp64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkstemps.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mkstemps64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mktemp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mlock.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mlockall.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mmap.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mmap64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mntent.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mntent.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mntent_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
mprotect.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
msync.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
munlock.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
munlockall.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
munmap.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
preadv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
preadv64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
pselect.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ptrace.c Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
pwritev.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
pwritev64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
qefgcvt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
qefgcvt_r.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
readv.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
reboot.c Narrowing the visibility of libc-internal.h even further. 2017-03-01 20:33:46 -05:00
regexp.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
regexp.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
remap_file_pages.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
removexattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
revoke.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sbrk.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
search.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
select.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setdomain.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setegid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
seteuid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sethostid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sethostname.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setregid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setreuid.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
setxattr.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sgtty.h Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sstk.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
stab.h
stty.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
swapoff.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
swapon.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
sync.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
syncfs.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
syscall.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
syscall.h
sysexits.h
syslog.c Assume that SOCK_CLOEXEC is available and works 2015-10-17 12:02:37 +02:00
syslog.h
truncate.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
truncate64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tsearch.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-atomic-long.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-atomic.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-dirname.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-efgcvt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-empty.c Move all tests out of the csu subdirectory 2016-12-21 11:52:19 +01:00
tst-error1.c Split DIAG_* macros to new header libc-diag.h. 2017-02-25 09:59:46 -05:00
tst-fdset.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-hsearch.c Modify several tests to use test-skeleton.c 2014-11-05 15:24:08 +05:30
tst-insremque.c [BZ #2766] 2006-06-17 17:01:42 +00:00
tst-makedev.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mntent-blank-corrupt.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mntent-blank-passno.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-mntent.c getmntent: fix memory corruption w/blank lines [BZ #18887] 2015-08-29 18:07:00 -04:00
tst-mntent2.c Fix warning in misc/tst-mntent2.c. 2014-12-16 10:27:16 +01:00
tst-preadvwritev-common.c Add missing header files throughout the testsuite. 2017-02-16 17:33:18 -05:00
tst-preadvwritev.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-preadvwritev64.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
tst-pselect.c Do not use SA_NOCLDWAIT in tst-pselect. 2015-02-06 12:29:39 -08:00
tst-tsearch.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ttyent.h Remove pre-ISO C support 2012-01-07 23:57:22 -05:00
ttyslot.c As a minor cleanup remove the (r)index defines from include/string.h as 2017-02-06 18:15:18 +00:00
ualarm.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
usleep.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ustat.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
ustat.h
utimes.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
Versions Minimize sysdeps code involved in defining major/minor/makedev. 2016-08-03 15:23:04 -04:00
vhangup.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00
writev.c Update copyright dates with scripts/update-copyrights. 2017-01-01 00:14:16 +00:00