aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog37
-rw-r--r--Makefile51
-rw-r--r--ctype/ctype.h8
-rw-r--r--libio/bits/stdio-ldbl.h6
-rw-r--r--libio/stdio.h45
-rw-r--r--locale/locale.h4
-rw-r--r--math/bits/mathcalls.h31
-rw-r--r--math/math.h12
-rw-r--r--misc/sys/cdefs.h25
-rw-r--r--scripts/begin-end-check.pl47
-rw-r--r--setjmp/setjmp.h8
-rw-r--r--signal/signal.h6
-rw-r--r--stdlib/bits/stdlib-float.h2
-rw-r--r--stdlib/bits/stdlib-ldbl.h2
-rw-r--r--stdlib/stdlib.h44
-rw-r--r--string/string.h14
-rw-r--r--sysdeps/x86/fpu/bits/mathinline.h14
-rw-r--r--time/bits/types/clock_t.h6
-rw-r--r--time/bits/types/struct_tm.h5
-rw-r--r--time/bits/types/time_t.h5
-rw-r--r--time/time.h6
-rw-r--r--wcsmbs/bits/wchar-ldbl.h4
-rw-r--r--wcsmbs/uchar.h2
-rw-r--r--wcsmbs/wchar.h51
-rw-r--r--wctype/wctype.h13
25 files changed, 37 insertions, 411 deletions
diff --git a/ChangeLog b/ChangeLog
index 2d24cfac44..b63677c2fb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,40 @@
+2017-03-16 Joseph Myers <joseph@codesourcery.com>
+
+ * 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-15 Steve Ellcey <sellcey@caviumnetworks.com>
Adhemerval Zanella <adhemerval.zanella@linaro.org>
diff --git a/Makefile b/Makefile
index 425cb796db..1b896b979c 100644
--- a/Makefile
+++ b/Makefile
@@ -267,57 +267,6 @@ $(objpfx)check-local-headers.out: scripts/check-local-headers.sh
"$(includedir)" "$(objpfx)" < /dev/null > $@; \
$(evaluate-test)
-ifneq ($(PERL),no)
-installed-headers = argp/argp.h assert/assert.h catgets/nl_types.h \
- crypt/crypt.h ctype/ctype.h debug/execinfo.h \
- dirent/dirent.h dlfcn/dlfcn.h elf/elf.h elf/link.h \
- gmon/sys/gmon.h gmon/sys/gmon_out.h gmon/sys/profil.h \
- grp/grp.h gshadow/gshadow.h iconv/iconv.h iconv/gconv.h \
- $(wildcard inet/netinet/*.h) \
- $(wildcard inet/arpa/*.h inet/protocols/*.h) \
- inet/aliases.h inet/ifaddrs.h inet/netinet/ip6.h \
- inet/netinet/icmp6.h intl/libintl.h io/sys/stat.h \
- io/sys/statfs.h io/sys/vfs.h io/sys/statvfs.h \
- io/fcntl.h io/sys/fcntl.h io/poll.h io/sys/poll.h \
- io/utime.h io/ftw.h io/fts.h io/sys/sendfile.h \
- libio/stdio.h libio/libio.h locale/locale.h \
- locale/langinfo.h locale/xlocale.h login/utmp.h \
- login/lastlog.h login/pty.h malloc/malloc.h \
- malloc/obstack.h malloc/mcheck.h math/math.h \
- math/complex.h math/fenv.h math/tgmath.h misc/sys/uio.h \
- $(wildcard nis/rpcsvc/*.h) nptl_db/thread_db.h \
- sysdeps/nptl/pthread.h sysdeps/pthread/semaphore.h \
- nss/nss.h posix/sys/utsname.h posix/sys/times.h \
- posix/sys/wait.h posix/sys/types.h posix/unistd.h \
- posix/glob.h posix/regex.h posix/wordexp.h posix/fnmatch.h\
- posix/getopt.h posix/tar.h posix/sys/unistd.h \
- posix/sched.h posix/re_comp.h posix/wait.h \
- posix/cpio.h posix/spawn.h pwd/pwd.h resolv/resolv.h \
- resolv/netdb.h $(wildcard resolv/arpa/*.h) \
- resource/sys/resource.h resource/sys/vlimit.h \
- resource/sys/vtimes.h resource/ulimit.h rt/aio.h \
- rt/mqueue.h setjmp/setjmp.h shadow/shadow.h \
- signal/signal.h signal/sys/signal.h socket/sys/socket.h \
- socket/sys/un.h stdio-common/printf.h \
- stdio-common/stdio_ext.h stdlib/stdlib.h stdlib/alloca.h \
- stdlib/monetary.h stdlib/fmtmsg.h stdlib/ucontext.h \
- sysdeps/generic/inttypes.h sysdeps/generic/stdint.h \
- stdlib/errno.h stdlib/sys/errno.h string/string.h \
- string/strings.h string/memory.h string/endian.h \
- string/argz.h string/envz.h string/byteswap.h \
- $(wildcard sunrpc/rpc/*.h sunrpc/rpcsvc/*.h) \
- sysvipc/sys/ipc.h sysvipc/sys/msg.h sysvipc/sys/sem.h \
- sysvipc/sys/shm.h termios/termios.h \
- termios/sys/termios.h termios/sys/ttychars.h time/time.h \
- time/sys/time.h time/sys/timeb.h wcsmbs/wchar.h \
- wctype/wctype.h
-
-tests-special += $(objpfx)begin-end-check.out
-$(objpfx)begin-end-check.out: scripts/begin-end-check.pl
- $(PERL) scripts/begin-end-check.pl $(installed-headers) > $@; \
- $(evaluate-test)
-endif
-
ifneq "$(headers)" ""
# Special test of all the installed headers in this directory.
tests-special += $(objpfx)check-installed-headers-c.out
diff --git a/ctype/ctype.h b/ctype/ctype.h
index 3a58924f89..1fe89cf836 100644
--- a/ctype/ctype.h
+++ b/ctype/ctype.h
@@ -101,8 +101,6 @@ extern const __int32_t **__ctype_toupper_loc (void)
#define __exctype(name) extern int name (int) __THROW
-__BEGIN_NAMESPACE_STD
-
/* The following names are all functions:
int isCHARACTERISTIC(int c);
which return nonzero iff C has CHARACTERISTIC.
@@ -126,16 +124,10 @@ extern int tolower (int __c) __THROW;
/* Return the uppercase version of C. */
extern int toupper (int __c) __THROW;
-__END_NAMESPACE_STD
-
/* ISO C99 introduced one new function. */
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
-
__exctype (isblank);
-
-__END_NAMESPACE_C99
#endif
#ifdef __USE_GNU
diff --git a/libio/bits/stdio-ldbl.h b/libio/bits/stdio-ldbl.h
index bb68cf1692..caa1e538c3 100644
--- a/libio/bits/stdio-ldbl.h
+++ b/libio/bits/stdio-ldbl.h
@@ -20,7 +20,6 @@
# error "Never include <bits/stdio-ldbl.h> directly; use <stdio.h> instead."
#endif
-__BEGIN_NAMESPACE_STD
__LDBL_REDIR_DECL (fprintf)
__LDBL_REDIR_DECL (printf)
__LDBL_REDIR_DECL (sprintf)
@@ -38,17 +37,13 @@ __LDBL_REDIR_DECL (fscanf)
__LDBL_REDIR_DECL (scanf)
__LDBL_REDIR_DECL (sscanf)
#endif
-__END_NAMESPACE_STD
#if defined __USE_ISOC99 || defined __USE_UNIX98
-__BEGIN_NAMESPACE_C99
__LDBL_REDIR_DECL (snprintf)
__LDBL_REDIR_DECL (vsnprintf)
-__END_NAMESPACE_C99
#endif
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99
# if !defined __USE_GNU && !defined __REDIRECT \
&& (defined __STRICT_ANSI__ || defined __USE_XOPEN2K)
__LDBL_REDIR1_DECL (vfscanf, __nldbl___isoc99_vfscanf)
@@ -59,7 +54,6 @@ __LDBL_REDIR_DECL (vfscanf)
__LDBL_REDIR_DECL (vsscanf)
__LDBL_REDIR_DECL (vscanf)
# endif
-__END_NAMESPACE_C99
#endif
#ifdef __USE_XOPEN2K8
diff --git a/libio/stdio.h b/libio/stdio.h
index c4f734cb3c..3e01d54eb2 100644
--- a/libio/stdio.h
+++ b/libio/stdio.h
@@ -44,15 +44,8 @@ __BEGIN_DECLS
/* Define outside of namespace so the C++ is happy. */
struct _IO_FILE;
-__BEGIN_NAMESPACE_STD
/* The opaque type of streams. This is the definition used elsewhere. */
typedef struct _IO_FILE FILE;
-__END_NAMESPACE_STD
-#if defined __USE_LARGEFILE64 || defined __USE_POSIX \
- || defined __USE_ISOC99 || defined __USE_XOPEN \
- || defined __USE_POSIX2
-__USING_NAMESPACE_STD(FILE)
-#endif
# define __FILE_defined 1
#endif /* FILE not defined. */
@@ -108,13 +101,11 @@ typedef __ssize_t ssize_t;
#endif
/* The type of the second argument to `fgetpos' and `fsetpos'. */
-__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
typedef _G_fpos_t fpos_t;
#else
typedef _G_fpos64_t fpos_t;
#endif
-__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
typedef _G_fpos64_t fpos64_t;
#endif
@@ -176,12 +167,10 @@ extern struct _IO_FILE *stderr; /* Standard error output stream. */
#define stdout stdout
#define stderr stderr
-__BEGIN_NAMESPACE_STD
/* Remove file FILENAME. */
extern int remove (const char *__filename) __THROW;
/* Rename file OLD to NEW. */
extern int rename (const char *__old, const char *__new) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_ATFILE
/* Rename file OLD relative to OLDFD to NEW relative to NEWFD. */
@@ -189,7 +178,6 @@ extern int renameat (int __oldfd, const char *__old, int __newfd,
const char *__new) __THROW;
#endif
-__BEGIN_NAMESPACE_STD
/* Create a temporary file and open it read/write.
This function is a possible cancellation point and therefore not
@@ -210,7 +198,6 @@ extern FILE *tmpfile64 (void) __wur;
/* Generate a temporary filename. */
extern char *tmpnam (char *__s) __THROW __wur;
-__END_NAMESPACE_STD
#ifdef __USE_MISC
/* This is the reentrant variant of `tmpnam'. The only difference is
@@ -232,7 +219,6 @@ extern char *tempnam (const char *__dir, const char *__pfx)
#endif
-__BEGIN_NAMESPACE_STD
/* Close STREAM.
This function is a possible cancellation point and therefore not
@@ -243,7 +229,6 @@ extern int fclose (FILE *__stream);
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int fflush (FILE *__stream);
-__END_NAMESPACE_STD
#ifdef __USE_MISC
/* Faster versions when locking is not required.
@@ -266,7 +251,6 @@ extern int fcloseall (void);
#endif
-__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
/* Open a file and create a new stream for it.
@@ -295,7 +279,6 @@ extern FILE *__REDIRECT (freopen, (const char *__restrict __filename,
# define freopen freopen64
# endif
#endif
-__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
extern FILE *fopen64 (const char *__restrict __filename,
const char *__restrict __modes) __wur;
@@ -329,7 +312,6 @@ extern FILE *open_memstream (char **__bufloc, size_t *__sizeloc) __THROW __wur;
#endif
-__BEGIN_NAMESPACE_STD
/* If BUF is NULL, make STREAM unbuffered.
Else make it use buffer BUF, of size BUFSIZ. */
extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
@@ -338,7 +320,6 @@ extern void setbuf (FILE *__restrict __stream, char *__restrict __buf) __THROW;
else allocate an internal buffer N bytes long. */
extern int setvbuf (FILE *__restrict __stream, char *__restrict __buf,
int __modes, size_t __n) __THROW;
-__END_NAMESPACE_STD
#ifdef __USE_MISC
/* If BUF is NULL, make STREAM unbuffered.
@@ -351,7 +332,6 @@ extern void setlinebuf (FILE *__stream) __THROW;
#endif
-__BEGIN_NAMESPACE_STD
/* Write formatted output to STREAM.
This function is a possible cancellation point and therefore not
@@ -381,10 +361,8 @@ extern int vprintf (const char *__restrict __format, _G_va_list __arg);
/* Write formatted output to S from argument list ARG. */
extern int vsprintf (char *__restrict __s, const char *__restrict __format,
_G_va_list __arg) __THROWNL;
-__END_NAMESPACE_STD
#if defined __USE_ISOC99 || defined __USE_UNIX98
-__BEGIN_NAMESPACE_C99
/* Maximum chars of output to write in MAXLEN. */
extern int snprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, ...)
@@ -393,7 +371,6 @@ extern int snprintf (char *__restrict __s, size_t __maxlen,
extern int vsnprintf (char *__restrict __s, size_t __maxlen,
const char *__restrict __format, _G_va_list __arg)
__THROWNL __attribute__ ((__format__ (__printf__, 3, 0)));
-__END_NAMESPACE_C99
#endif
#if __GLIBC_USE (LIB_EXT2)
@@ -420,7 +397,6 @@ extern int dprintf (int __fd, const char *__restrict __fmt, ...)
#endif
-__BEGIN_NAMESPACE_STD
/* Read formatted input from STREAM.
This function is a possible cancellation point and therefore not
@@ -463,10 +439,7 @@ extern int __isoc99_sscanf (const char *__restrict __s,
# endif
#endif
-__END_NAMESPACE_STD
-
#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
@@ -521,12 +494,9 @@ extern int __isoc99_vsscanf (const char *__restrict __s,
# define vsscanf __isoc99_vsscanf
# endif
# endif
-
-__END_NAMESPACE_C99
#endif /* Use ISO C9x. */
-__BEGIN_NAMESPACE_STD
/* Read a character from STREAM.
These functions are possible cancellation points and therefore not
@@ -539,7 +509,6 @@ extern int getc (FILE *__stream);
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int getchar (void);
-__END_NAMESPACE_STD
/* The C standard explicitly says this is a macro, so we always do the
optimization for it. */
@@ -565,7 +534,6 @@ extern int fgetc_unlocked (FILE *__stream);
#endif /* Use MISC. */
-__BEGIN_NAMESPACE_STD
/* Write a character to STREAM.
These functions are possible cancellation points and therefore not
@@ -581,7 +549,6 @@ extern int putc (int __c, FILE *__stream);
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern int putchar (int __c);
-__END_NAMESPACE_STD
/* The C standard explicitly says this can be a macro,
so we always do the optimization for it. */
@@ -617,7 +584,6 @@ extern int putw (int __w, FILE *__stream);
#endif
-__BEGIN_NAMESPACE_STD
/* Get a newline-terminated string of finite length from STREAM.
This function is a possible cancellation point and therefore not
@@ -637,7 +603,6 @@ extern char *fgets (char *__restrict __s, int __n, FILE *__restrict __stream)
marked with __THROW. */
extern char *gets (char *__s) __wur __attribute_deprecated__;
#endif
-__END_NAMESPACE_STD
#ifdef __USE_GNU
/* This function does the same as `fgets' but does not lock the stream.
@@ -681,7 +646,6 @@ extern _IO_ssize_t getline (char **__restrict __lineptr,
#endif
-__BEGIN_NAMESPACE_STD
/* Write a string to STREAM.
This function is a possible cancellation point and therefore not
@@ -714,7 +678,6 @@ extern size_t fread (void *__restrict __ptr, size_t __size,
marked with __THROW. */
extern size_t fwrite (const void *__restrict __ptr, size_t __size,
size_t __n, FILE *__restrict __s);
-__END_NAMESPACE_STD
#ifdef __USE_GNU
/* This function does the same as `fputs' but does not lock the stream.
@@ -741,7 +704,6 @@ extern size_t fwrite_unlocked (const void *__restrict __ptr, size_t __size,
#endif
-__BEGIN_NAMESPACE_STD
/* Seek to a certain position on STREAM.
This function is a possible cancellation point and therefore not
@@ -757,7 +719,6 @@ extern long int ftell (FILE *__stream) __wur;
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void rewind (FILE *__stream);
-__END_NAMESPACE_STD
/* The Single Unix Specification, Version 2, specifies an alternative,
more adequate interface for the two functions above which deal with
@@ -789,7 +750,6 @@ extern __off64_t __REDIRECT (ftello, (FILE *__stream), ftello64);
# endif
#endif
-__BEGIN_NAMESPACE_STD
#ifndef __USE_FILE_OFFSET64
/* Get STREAM's position.
@@ -812,7 +772,6 @@ extern int __REDIRECT (fsetpos,
# define fsetpos fsetpos64
# endif
#endif
-__END_NAMESPACE_STD
#ifdef __USE_LARGEFILE64
extern int fseeko64 (FILE *__stream, __off64_t __off, int __whence);
@@ -821,14 +780,12 @@ extern int fgetpos64 (FILE *__restrict __stream, fpos64_t *__restrict __pos);
extern int fsetpos64 (FILE *__stream, const fpos64_t *__pos);
#endif
-__BEGIN_NAMESPACE_STD
/* Clear the error and EOF indicators for STREAM. */
extern void clearerr (FILE *__stream) __THROW;
/* Return the EOF indicator for STREAM. */
extern int feof (FILE *__stream) __THROW __wur;
/* Return the error indicator for STREAM. */
extern int ferror (FILE *__stream) __THROW __wur;
-__END_NAMESPACE_STD
#ifdef __USE_MISC
/* Faster versions when locking is not required. */
@@ -838,13 +795,11 @@ extern int ferror_unlocked (FILE *__stream) __THROW __wur;
#endif
-__BEGIN_NAMESPACE_STD
/* Print a message describing the meaning of the value of errno.
This function is a possible cancellation point and therefore not
marked with __THROW. */
extern void perror (const char *__s);
-__END_NAMESPACE_STD
/* Provide the declarations for `sys_errlist' and `sys_nerr' if they
are available on this system. Even if available, these variables
diff --git a/locale/locale.h b/locale/locale.h
index 20a842ea36..9a5fce9d47 100644
--- a/locale/locale.h
+++ b/locale/locale.h
@@ -47,8 +47,6 @@ __BEGIN_DECLS
#define LC_IDENTIFICATION __LC_IDENTIFICATION
-__BEGIN_NAMESPACE_STD
-
/* Structure giving information about numeric and monetary notation. */
struct lconv
{
@@ -126,8 +124,6 @@ extern char *setlocale (int __category, const char *__locale) __THROW;
/* Return the numeric/monetary information for the current locale. */
extern struct lconv *localeconv (void) __THROW;
-__END_NAMESPACE_STD
-
#ifdef __USE_XOPEN2K8
/* The concept of one static locale per category is not very well
diff --git a/math/bits/mathcalls.h b/math/bits/mathcalls.h
index fe315fd3d1..0d341fbfe1 100644
--- a/math/bits/mathcalls.h
+++ b/math/bits/mathcalls.h
@@ -49,7 +49,6 @@
/* Trigonometric functions. */
-_Mdouble_BEGIN_NAMESPACE
/* Arc cosine of X. */
__MATHCALL (acos,, (_Mdouble_ __x));
/* Arc sine of X. */
@@ -74,7 +73,6 @@ __MATHCALL (cosh,, (_Mdouble_ __x));
__MATHCALL (sinh,, (_Mdouble_ __x));
/* Hyperbolic tangent of X. */
__MATHCALL (tanh,, (_Mdouble_ __x));
-_Mdouble_END_NAMESPACE
#ifdef __USE_GNU
/* Cosine and sine of X. */
@@ -83,19 +81,16 @@ __MATHDECL_VEC (void,sincos,,
#endif
#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-__BEGIN_NAMESPACE_C99
/* Hyperbolic arc cosine of X. */
__MATHCALL (acosh,, (_Mdouble_ __x));
/* Hyperbolic arc sine of X. */
__MATHCALL (asinh,, (_Mdouble_ __x));
/* Hyperbolic arc tangent of X. */
__MATHCALL (atanh,, (_Mdouble_ __x));
-__END_NAMESPACE_C99
#endif
/* Exponential and logarithmic functions. */
-_Mdouble_BEGIN_NAMESPACE
/* Exponential function of X. */
__MATHCALL_VEC (exp,, (_Mdouble_ __x));
@@ -113,7 +108,6 @@ __MATHCALL (log10,, (_Mdouble_ __x));
/* Break VALUE into integral and fractional parts. */
__MATHCALL (modf,, (_Mdouble_ __x, _Mdouble_ *__iptr)) __nonnull ((2));
-_Mdouble_END_NAMESPACE
#if __GLIBC_USE (IEC_60559_FUNCS_EXT)
/* Compute exponent to base ten. */
@@ -125,7 +119,6 @@ __MATHCALL (pow10,, (_Mdouble_ __x));
#endif
#if defined __USE_XOPEN_EXTENDED || defined __USE_ISOC99
-__BEGIN_NAMESPACE_C99
/* Return exp(X) - 1. */
__MATHCALL (expm1,, (_Mdouble_ __x));
@@ -134,48 +127,38 @@ __MATHCALL (log1p,, (_Mdouble_ __x));
/* Return the base 2 signed integral exponent of X. */
__MATHCALL (logb,, (_Mdouble_ __x));
-__END_NAMESPACE_C99
#endif
#ifdef __USE_ISOC99
-__BEGIN_NAMESPACE_C99