diff options
Diffstat (limited to 'libstdc++-v3')
-rw-r--r-- | libstdc++-v3/ChangeLog | 21 | ||||
-rw-r--r-- | libstdc++-v3/Makefile.am | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/assert.h | 6 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/bits/std_climits.h | 2 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/bits/std_cstddef.h | 11 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/bits/wrap_unistd.h | 32 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/ctype.h | 1 | ||||
-rw-r--r-- | libstdc++-v3/include/c_std/unistd.h | 14 | ||||
-rw-r--r-- | libstdc++-v3/libio/ChangeLog | 7 | ||||
-rw-r--r-- | libstdc++-v3/libio/libioP.h | 12 |
10 files changed, 62 insertions, 46 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index 1dd57c1f9ac..95320e43efa 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,24 @@ +2000-10-16 Benjamin Kosnik <bkoz@gnu.org> + + Shadow headers would work if libsupc++ was strict about namespaces. + This only possible if g++ maps std::size_t -> size_t. (Hint hint.) + * include/c_std/assert.h: Add guards. + * include/c_std/bits/std_climits.h: Correct typo. + * include/c_std/ctype.h: Remove #error. + + * libio/libioP.h: Break up extern "C" bits around includes. + * libio/libio.h: Only include C headers, or else _C_legacy namespaces + will be nested. + * libio/libioP.h: Same here. + +2000-10-15 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr> + + * include/c_std/unistd.h: Define some types only when defined in + the original unistd.h. + * include/c_std/bits/std_cstddef.h: Explicitly ask for the + definition of size_t, ptrdiff_t and NULL. + * include/c_std/bits/wrap_unistd.h: Blank lines removal. + 2000-10-15 Phil Edwards <pme@sources.redhat.com> * docs/configopts.html: Remove libgcc-rebuild; HTML formatting. diff --git a/libstdc++-v3/Makefile.am b/libstdc++-v3/Makefile.am index b32a151cd8b..0c5c09f2b54 100644 --- a/libstdc++-v3/Makefile.am +++ b/libstdc++-v3/Makefile.am @@ -121,4 +121,4 @@ AM_MAKEFLAGS = \ "NM_FOR_BUILD=$(NM_FOR_BUILD)" \ "NM_FOR_TARGET=$(NM_FOR_TARGET)" \ "DESTDIR=$(DESTDIR)" \ - "WERROR=$(WERROR)"
\ No newline at end of file + "WERROR=$(WERROR)" diff --git a/libstdc++-v3/include/c_std/assert.h b/libstdc++-v3/include/c_std/assert.h index 3507bdf449a..f4f8d6ebdca 100644 --- a/libstdc++-v3/include/c_std/assert.h +++ b/libstdc++-v3/include/c_std/assert.h @@ -28,7 +28,9 @@ // the GNU General Public License. -// no include guard here. +#ifndef _INCLUDED_CPP_ASSERT_H_ +# define _INCLUDED_CPP_ASSERT_H_ 1 + #ifdef _IN_C_LEGACY_ /* sub-included by a C header */ // get out of the "legacy" } // close extern "C" @@ -49,3 +51,5 @@ # define _IN_C_LEGACY_ # undef _ASSERT_NEED_C_LEGACY_ #endif /* _ASSERT_NEED_C_LEGACY_ */ +#endif /* _INCLUDED_CPP_ASSERT_H_ */ + diff --git a/libstdc++-v3/include/c_std/bits/std_climits.h b/libstdc++-v3/include/c_std/bits/std_climits.h index d0db90521b0..13d30065ab5 100644 --- a/libstdc++-v3/include/c_std/bits/std_climits.h +++ b/libstdc++-v3/include/c_std/bits/std_climits.h @@ -32,7 +32,7 @@ // #ifndef _CPP_CLIMITS -#define _CPP_CLIMTIS 1 +#define _CPP_CLIMITS 1 namespace _C_legacy { extern "C" { diff --git a/libstdc++-v3/include/c_std/bits/std_cstddef.h b/libstdc++-v3/include/c_std/bits/std_cstddef.h index 5ebcb61c808..588566499b3 100644 --- a/libstdc++-v3/include/c_std/bits/std_cstddef.h +++ b/libstdc++-v3/include/c_std/bits/std_cstddef.h @@ -38,7 +38,11 @@ namespace _C_legacy { extern "C" { # define _IN_C_LEGACY_ # pragma GCC system_header -# include_next <stddef.h> +// XXX +# define __need_size_t +# define __need_ptrdiff_t +# define __need_NULL +# include_next <stddef.h> } } // namespace _C_legacy @@ -53,8 +57,3 @@ namespace std { # undef _IN_C_LEGACY_ #endif - - - - - diff --git a/libstdc++-v3/include/c_std/bits/wrap_unistd.h b/libstdc++-v3/include/c_std/bits/wrap_unistd.h index 144a3ea794c..8e28b698c72 100644 --- a/libstdc++-v3/include/c_std/bits/wrap_unistd.h +++ b/libstdc++-v3/include/c_std/bits/wrap_unistd.h @@ -45,35 +45,3 @@ namespace _C_legacy { # undef _IN_C_LEGACY_ #endif - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libstdc++-v3/include/c_std/ctype.h b/libstdc++-v3/include/c_std/ctype.h index 7dcea803ab5..199089c594c 100644 --- a/libstdc++-v3/include/c_std/ctype.h +++ b/libstdc++-v3/include/c_std/ctype.h @@ -33,7 +33,6 @@ # ifdef _IN_C_LEGACY_ /* sub-included by a C header */ // get out of the "legacy" -#error ctype.h } // close extern "C" } // close namespace _C_legacy:: # undef _IN_C_LEGACY_ diff --git a/libstdc++-v3/include/c_std/unistd.h b/libstdc++-v3/include/c_std/unistd.h index 39cfaae642d..e05efe72f57 100644 --- a/libstdc++-v3/include/c_std/unistd.h +++ b/libstdc++-v3/include/c_std/unistd.h @@ -43,14 +43,28 @@ // Expose global C names, including non-standard ones, but shadow // some names and types with the std:: C++ version. +#ifdef __gid_t_defined using _C_legacy::gid_t; +#endif +#ifdef __uid_t_defined using _C_legacy::uid_t; +#endif +#ifdef __off_t_defined using _C_legacy::off_t; +#endif +#ifdef __off64_t_defined using _C_legacy::off64_t; +#endif +#ifdef __useconds_t_defined using _C_legacy::useconds_t; +#endif +#ifdef __pid_t_defined using _C_legacy::pid_t; +#endif using _C_legacy::intptr_t; +#ifdef __socklen_t_defined using _C_legacy::socklen_t; +#endif using _C_legacy::access; using _C_legacy::euidaccess; diff --git a/libstdc++-v3/libio/ChangeLog b/libstdc++-v3/libio/ChangeLog index 67d758553eb..9736beb09d5 100644 --- a/libstdc++-v3/libio/ChangeLog +++ b/libstdc++-v3/libio/ChangeLog @@ -1,3 +1,10 @@ +2000-10-17 Benjamin Kosnik <bkoz@gnu.org> + + * libioP.h: Break up extern "C" bits around includes. + * libio.h: Only include C headers, or else _C_legacy namespaces + will be nested. + * libioP.h: Same here. + 2000-10-11 Benjamin Kosnik <bkoz@gnu.org> * Makefile.am: Add includes from GLIBCPP_EXPORT_INCLUDES. diff --git a/libstdc++-v3/libio/libioP.h b/libstdc++-v3/libio/libioP.h index c2bf2c8205f..598949d8988 100644 --- a/libstdc++-v3/libio/libioP.h +++ b/libstdc++-v3/libio/libioP.h @@ -23,11 +23,7 @@ other reasons why the executable file might be covered by the GNU General Public License. */ -#ifdef __cplusplus -# include <cerrno> -#else # include <errno.h> -#endif #ifndef __set_errno # define __set_errno(Val) errno = (Val) @@ -620,11 +616,19 @@ extern void (*_IO_cleanup_registration_needed) __PMT ((void)); #if _G_HAVE_MMAP +#ifdef __cplusplus +} +#endif + # include <unistd.h> # include <fcntl.h> # include <sys/mman.h> # include <sys/param.h> +#ifdef __cplusplus +extern "C" { +#endif + # if !defined(MAP_ANONYMOUS) && defined(MAP_ANON) # define MAP_ANONYMOUS MAP_ANON # endif |