This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Partial shadow header patch (was Re: still problems with libstdcxx-v3 and -ansi)
- To: "Benjamin Kosnik" <bkoz at redhat dot com>
- Subject: Partial shadow header patch (was Re: still problems with libstdcxx-v3 and -ansi)
- From: Steven King <sxking at uswest dot net>
- Date: Tue, 26 Sep 2000 12:04:24 -0700
- Cc: libstdc++ at sources dot redhat dot com
- Organization: is the root of all evil
- References: <Pine.LNX.4.10.10009251332200.22649-100000@decepticon.cygnus.com>
- Reply-To: sxking at uswest dot net
On Mon, 25 Sep 2000, Benjamin Kosnik wrote:
> The shadow headers will allow all children currently hungry to be
> immediately fed. Wars will cease. Peace and prosperity will reign. C++
> implementors will rejoice.
you forgot, cure the common cold.
>
> Any word on an ETA? Can you post a partial patch, or a work-in-progress?
Okay, Okay already. This should be considered work in progress. Anyone
whose interested (Brent?) might try it, but its definately not ready to go into
the tree.
Configure as normal for cshadow and add to your CXXFLAGS for any target code
with "-fno-builtins -D_ISOC99_SOURCE -I $(prefix)/g++-v3/shadow". For some
stuff adding "-I $(prefix)/g++-v3/cshadow" maybe counterproductive.
There maybe some problems with the ordering of #includes in user code; I think
mostly due to cshadow hacks or lack there of. I wouldnt be surprised if
non-glibc systems have problems, especially with the changes to _G_config.h.
Oh, and this will work (most of the time) with -ansi -pedantic but only if
you specify -D_ISOC99_SOURCE...
--
Steven King
sxking@uswest.net
? stamp-h.in
Index: mkcshadow
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/mkcshadow,v
retrieving revision 1.5
diff -c -p -3 -r1.5 mkcshadow
*** mkcshadow 2000/05/25 13:09:00 1.5
--- mkcshadow 2000/09/26 18:59:53
*************** while read header; do
*** 66,73 ****
--- 66,75 ----
// script. RTFM!
#ifndef _INCLUDED_CPP_${UPNAME}_
+ # define _INCLUDED_CPP_${UPNAME}_
# ifdef _IN_C_LEGACY_ /* sub-included by a C header */
+ # pragma GCC system_header
# include_next <${header}>
# else
*************** while read header; do
*** 76,84 ****
--- 78,88 ----
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
+ # pragma GCC system_header
# include_next <${header}>
} // close extern "C"
} // close namespace _C_legacy::
+ # undef _IN_C_LEGACY_
# endif /* _IN_C_LEGACY_ */
#endif /* _INCLUDED_CPP_${UPNAME}_ */
Index: bits/char_traits.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/bits/char_traits.h,v
retrieving revision 1.8
diff -c -p -3 -r1.8 char_traits.h
*** char_traits.h 2000/09/14 19:44:03 1.8
--- char_traits.h 2000/09/26 18:59:53
*************** namespace std {
*** 176,198 ****
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
! { return static_cast<char*>(memchr(__s, __a, __n)); }
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
! { return static_cast<char*>(memmove(__s1, __s2, __n)); }
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
! { return static_cast<char*>(memcpy(__s1, __s2, __n)); }
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
! { return static_cast<char*>(memset(__s, __a, __n)); }
static char_type
to_char_type(const int_type& __c)
! { return static_cast<char>(__c); }
// To keep both the byte 0xff and the eof symbol 0xffffffff
// from ending up as 0xffffffff.
--- 176,198 ----
static const char_type*
find(const char_type* __s, size_t __n, const char_type& __a)
! { return static_cast<const char_type*>(memchr(__s, __a, __n)); }
static char_type*
move(char_type* __s1, const char_type* __s2, size_t __n)
! { return static_cast<char_type*>(memmove(__s1, __s2, __n)); }
static char_type*
copy(char_type* __s1, const char_type* __s2, size_t __n)
! { return static_cast<char_type*>(memcpy(__s1, __s2, __n)); }
static char_type*
assign(char_type* __s, size_t __n, char_type __a)
! { return static_cast<char_type*>(memset(__s, __a, __n)); }
static char_type
to_char_type(const int_type& __c)
! { return static_cast<char_type>(__c); }
// To keep both the byte 0xff and the eof symbol 0xffffffff
// from ending up as 0xffffffff.
Index: libio/_G_config.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/libio/_G_config.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 _G_config.h
*** _G_config.h 2000/08/24 19:05:22 1.4
--- _G_config.h 2000/09/26 18:59:53
***************
*** 19,33 ****
#include <bits/std_cstddef.h>
- /* For use as part of glibc (native) or as part of libstdc++ (maybe
- not glibc) */
- #if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1)
- # ifdef _GLIBCPP_USE_WCHAR_T
- # include <bits/std_cwchar.h>
- typedef mbstate_t __mbstate_t;
- # endif
- #endif
-
#ifndef _WINT_T
/* Integral type unchanged by default argument promotions that can
hold any value corresponding to members of the extended character
--- 19,24 ----
*************** typedef mbstate_t __mbstate_t;
*** 36,44 ****
# define _WINT_T
typedef unsigned int wint_t;
#endif
! #define __need_mbstate_t
! #include <bits/std_cwchar.h>
! #define _G_size_t size_t
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
typedef struct
{
--- 27,48 ----
# define _WINT_T
typedef unsigned int wint_t;
#endif
!
! /* For use as part of glibc (native) or as part of libstdc++ (maybe
! not glibc) */
! #if __GLIBC__ < 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 1)
! # ifdef _GLIBCPP_USE_WCHAR_T
! typedef struct
! {
! int count;
! wint_t value;
! }__mbstate_t;
! # endif
! #endif
!
! typedef size_t _G_size_t;
!
!
#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
typedef struct
{
Index: shadow/assert.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/assert.h,v
retrieving revision 1.1
diff -c -p -3 -r1.1 assert.h
*** assert.h 2000/04/21 20:33:33 1.1
--- assert.h 2000/09/26 18:59:53
***************
*** 29,35 ****
// no include guard here.
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cassert>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
--- 29,51 ----
// no include guard here.
! #ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _ASSERT_NEED_C_LEGACY_
! #endif
!
! #include <cassert>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
! #ifdef _ASSERT_NEED_C_LEGACY_
! // dive back into the "swamp"
! namespace _C_legacy {
! extern "C" {
! # define _IN_C_LEGACY_
! # undef _ASSERT_NEED_C_LEGACY_
! #endif /* _ASSERT_NEED_C_LEGACY_ */
Index: shadow/ctype.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/ctype.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 ctype.h
*** ctype.h 2000/05/19 09:33:23 1.2
--- ctype.h 2000/09/26 18:59:53
***************
*** 30,41 ****
#ifndef _INCLUDED_CPP_CTYPE_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cctype>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::isalnum;
using ::std::isalpha;
using ::std::iscntrl;
--- 30,51 ----
#ifndef _INCLUDED_CPP_CTYPE_H_
! # define _INCLUDED_CPP_CTYPE_H_ 1
!
! # 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_
! # define _CTYPE_NEED_C_LEGACY_
! # endif
!
! # include <cctype>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::isalnum;
using ::std::isalpha;
using ::std::iscntrl;
***************
*** 49,55 ****
using ::std::isxdigit;
using ::std::tolower;
using ::std::toupper;
- # define _INCLUDED_CPP_CTYPE_H_ 1
- # endif
#endif /* _INCLUDED_CPP_CTYPE_H_ */
--- 59,70 ----
using ::std::isxdigit;
using ::std::tolower;
using ::std::toupper;
+ # ifdef _CTYPE_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _CTYPE_NEED_C_LEGACY_
+ # endif /* _CTYPE_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_CTYPE_H_ */
Index: shadow/errno.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/errno.h,v
retrieving revision 1.1
diff -c -p -3 -r1.1 errno.h
*** errno.h 2000/04/21 20:33:33 1.1
--- errno.h 2000/09/26 18:59:53
***************
*** 30,37 ****
#ifndef _INCLUDED_CPP_ERRNO_H_
# define _INCLUDED_CPP_ERRNO_H_ 1
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cerrno>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
#endif /* _INCLUDED_CPP_ERRNO_H_ */
--- 30,54 ----
#ifndef _INCLUDED_CPP_ERRNO_H_
# define _INCLUDED_CPP_ERRNO_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _ERRNO_NEED_C_LEGACY_
! # endif
!
! # include <cerrno>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
! # ifdef _ERRNO_NEED_C_LEGACY_
! // dive back into the "swamp"
! namespace _C_legacy {
! extern "C" {
! # define _IN_C_LEGACY_
! # undef _ERRNO_NEED_C_LEGACY_
! # endif /* _ERRNO_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_ERRNO_H_ */
Index: shadow/float.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/float.h,v
retrieving revision 1.1
diff -c -p -3 -r1.1 float.h
*** float.h 2000/04/21 20:33:33 1.1
--- float.h 2000/09/26 18:59:53
***************
*** 31,38 ****
#ifndef _INCLUDED_CPP_FLOAT_H_
# define _INCLUDED_CPP_FLOAT_H_ 1
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cfloat>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
#endif /* _INCLUDED_CPP_FLOAT_H_ */
--- 31,55 ----
#ifndef _INCLUDED_CPP_FLOAT_H_
# define _INCLUDED_CPP_FLOAT_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _FLOAT_NEED_C_LEGACY_
! # endif
!
! # include <cfloat>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
! # ifdef _FLOAT_NEED_C_LEGACY_
! // dive back into the "swamp"
! namespace _C_legacy {
! extern "C" {
! # define _IN_C_LEGACY_
! # undef _FLOAT_NEED_C_LEGACY_
! # endif /* _FLOAT_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_FLOAT_H_ */
Index: shadow/libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/libio.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 libio.h
*** libio.h 2000/05/19 09:33:23 1.2
--- libio.h 2000/09/26 18:59:53
***************
*** 27,44 ****
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-
#ifndef _INCLUDED_CPP_LIBIO_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <bits/wrap_libio.h>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
! // using ::std::stuff
! # define _INCLUDED_CPP_LIBIO_H_ 1
! # endif
#endif /* _INCLUDED_CPP_LIBIO_H_ */
--- 27,88 ----
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_LIBIO_H_
+ # define _INCLUDED_CPP_LIBIO_H_ 1
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _LIBIO_NEED_C_LEGACY_
! # endif
! # include <bits/wrap_libio.h>
! // make all the symbols visable in the global namespace
!
! typedef _C_legacy::_IO_pos_t _IO_pos_t;
! typedef _C_legacy::_IO_fpos_t _IO_fpos_t;
! typedef _C_legacy::_IO_size_t _IO_size_t;
! typedef _C_legacy::_IO_ssize_t _IO_ssize_t;
! typedef _C_legacy::_IO_off_t _IO_off_t;
! typedef _C_legacy::_IO_pid_t _IO_pid_t;
! typedef _C_legacy::_IO_uid_t _IO_uid_t;
!
! #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _C_legacy::_IO_fpos64_t _IO_fpos64_t;
! typedef _C_legacy::_IO_off64_t _IO_off64_t;
! #endif
! typedef _C_legacy::_IO_FILE _IO_FILE;
! typedef _C_legacy::_IO_wide_data _IO_wide_data;
! typedef _C_legacy::_IO_lock_t _IO_lock_t;
!
! typedef _C_legacy::__loff_t __loff_t;
! typedef _C_legacy::__ino_t __ino_t;
! typedef _C_legacy::__dev_t __dev_t;
! typedef _C_legacy::__gid_t __gid_t;
! typedef _C_legacy::__mode_t __mode_t;
! typedef _C_legacy::__nlink_t __nlink_t;
! #ifndef __USE_FILE_OFFSET64
! typedef _C_legacy::__blkcnt_t __blkcnt_t;
! typedef _C_legacy::__fsblkcnt_t __fsblkcnt_t;
! typedef _C_legacy::__fsfilcnt_t __fsfilcnt_t;
! #else
! typedef _C_legacy::__blkcnt64_t __blkcnt64_t;
! typedef _C_legacy::__fsblkcnt64_t __fsblkcnt64_t;
! typedef _C_legacy::__fsfilcnt64_t __fsfilcnt64_t;
! #endif
!
! typedef _C_legacy::__fd_mask __fd_mask;
! typedef _C_legacy::__fd_set __fd_set;
! typedef _C_legacy::__time_t __time_t;
+ # ifdef _LIBIO_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _LIBIO_NEED_C_LEGACY_
+ # endif /* _LIBIO_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_LIBIO_H_ */
Index: shadow/limits.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/limits.h,v
retrieving revision 1.1
diff -c -p -3 -r1.1 limits.h
*** limits.h 2000/04/21 20:33:33 1.1
--- limits.h 2000/09/26 18:59:53
***************
*** 31,38 ****
#ifndef _INCLUDED_CPP_LIMITS_H_
# define _INCLUDED_CPP_LIMITS_H_ 1
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <climits>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
#endif /* _INCLUDED_CPP_LIMITS_H_ */
--- 31,55 ----
#ifndef _INCLUDED_CPP_LIMITS_H_
# define _INCLUDED_CPP_LIMITS_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _LIMITS_NEED_C_LEGACY_
! # endif
!
! # include <climits>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
! # ifdef _LIMITS_NEED_C_LEGACY_
! // dive back into the "swamp"
! namespace _C_legacy {
! extern "C" {
! # define _IN_C_LEGACY_
! # undef _LIMITS_NEED_C_LEGACY_
! # endif /* _LIMITS_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_LIMITS_H_ */
Index: shadow/locale.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/locale.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 locale.h
*** locale.h 2000/05/19 09:33:23 1.2
--- locale.h 2000/09/26 18:59:53
***************
*** 30,45 ****
#ifndef _INCLUDED_CPP_LOCALE_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <clocale>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::lconv;
using ::std::setlocale;
using ::std::localeconv;
- # define _INCLUDED_CPP_LOCALE_H_ 1
- # endif
#endif /* _INCLUDED_CPP_LOCALE_H_ */
--- 30,59 ----
#ifndef _INCLUDED_CPP_LOCALE_H_
! # define _INCLUDED_CPP_LOCALE_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _LOCALE_NEED_C_LEGACY_
! #endif
!
! # include <clocale>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::lconv;
using ::std::setlocale;
using ::std::localeconv;
+ # ifdef _LOCALE_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _LOCALE_NEED_C_LEGACY_
+ # endif /* _LOCALE_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_LOCALE_H_ */
Index: shadow/math.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/math.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 math.h
*** math.h 2000/05/19 09:33:23 1.2
--- math.h 2000/09/26 18:59:53
***************
*** 29,40 ****
#ifndef _INCLUDED_CPP_MATH_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cmath>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::acos;
using ::std::asin;
using ::std::atan;
--- 29,50 ----
#ifndef _INCLUDED_CPP_MATH_H_
! # define _INCLUDED_CPP_MATH_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _MATH_NEED_C_LEGACY_
! # endif
!
! # include <cmath>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
! using ::std::abs;
using ::std::acos;
using ::std::asin;
using ::std::atan;
***************
*** 57,63 ****
using ::std::fabs;
using ::std::floor;
using ::std::fmod;
- # define _INCLUDED_CPP_MATH_H_ 1
- # endif
#endif /* _INCLUDED_CPP_MATH_H_ */
--- 67,78 ----
using ::std::fabs;
using ::std::floor;
using ::std::fmod;
+ # ifdef _MATH_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _MATH_NEED_C_LEGACY_
+ # endif /* _MATH_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_MATH_H_ */
Index: shadow/setjmp.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/setjmp.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 setjmp.h
*** setjmp.h 2000/05/19 09:33:23 1.2
--- setjmp.h 2000/09/26 18:59:53
***************
*** 30,44 ****
#ifndef _INCLUDED_CPP_SETJMP_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <csetjmp>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::jmp_buf;
using ::std::longjmp;
- # define _INCLUDED_CPP_SETJMP_H_ 1
- # endif
#endif /* _INCLUDED_CPP_SETJMP_H_ */
--- 30,58 ----
#ifndef _INCLUDED_CPP_SETJMP_H_
! # define _INCLUDED_CPP_SETJMP_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _SETJMP_NEED_C_LEGACY_
! # endif
!
! # include <csetjmp>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::jmp_buf;
using ::std::longjmp;
+ # ifdef _SETJMP_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _SETJMP_NEED_C_LEGACY_
+ # endif /* _SETJMP_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_SETJMP_H_ */
Index: shadow/signal.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/signal.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 signal.h
*** signal.h 2000/05/19 09:33:23 1.2
--- signal.h 2000/09/26 18:59:53
***************
*** 30,45 ****
#ifndef _INCLUDED_CPP_SIGNAL_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <csignal>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::sig_atomic_t;
using ::std::raise;
using ::std::signal;
- # define _INCLUDED_CPP_SIGNAL_H_ 1
- # endif
#endif /* _INCLUDED_CPP_SIGNAL_H_ */
--- 30,59 ----
#ifndef _INCLUDED_CPP_SIGNAL_H_
! # define _INCLUDED_CPP_SIGNAL_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _SIGNAL_NEED_C_LEGACY_
! # endif
!
! # include <csignal>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::sig_atomic_t;
using ::std::raise;
using ::std::signal;
+ # ifdef _SIGNAL_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _SIGNAL_NEED_C_LEGACY_
+ # endif /* _SIGNAL_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_SIGNAL_H_ */
Index: shadow/stdarg.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/stdarg.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 stdarg.h
*** stdarg.h 2000/05/19 09:33:23 1.2
--- stdarg.h 2000/09/26 18:59:53
***************
*** 29,42 ****
#ifndef _INCLUDED_CPP_STDARG_H_
- # undef _SHADOW_NAME
- # define _SHADOW_NAME <cstdarg>
- # include <bits/generic_shadow.h>
- # undef _SHADOW_NAME
-
- # ifndef _IN_C_LEGACY_
- using ::std::va_list;
# define _INCLUDED_CPP_STDARG_H_ 1
# endif
#endif /* _INCLUDED_CPP_STDARG_H_ */
--- 29,56 ----
#ifndef _INCLUDED_CPP_STDARG_H_
# define _INCLUDED_CPP_STDARG_H_ 1
+
+ #ifdef _IN_C_LEGACY_ /* sub-included by a C header */
+ // get out of the "legacy"
+ } // close extern "C"
+ } // close namespace _C_legacy::
+ # undef _IN_C_LEGACY_
+ # define _STDARG_NEED_C_LEGACY_
# endif
+ # include <cstdarg>
+
+ // expose global C names, including non-standard ones, but shadow
+ // some names and types with the std:: C++ version.
+
+ using ::std::va_list;
+
+ # ifdef _STDARG_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _STDARG_NEED_C_LEGACY_
+ # endif /* _STDARG_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STDARG_H_ */
Index: shadow/stddef.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/stddef.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 stddef.h
*** stddef.h 2000/05/19 09:33:23 1.2
--- stddef.h 2000/09/26 18:59:53
***************
*** 27,34 ****
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-
#ifndef _INCLUDED_CPP_STDDEF_H_
// turn off glibc weirdness. other libs have similar foolishness.
#undef __need_wchar_t
--- 27,34 ----
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_STDDEF_H_
+ # define _INCLUDED_CPP_STDDEF_H_ 1
// turn off glibc weirdness. other libs have similar foolishness.
#undef __need_wchar_t
***************
*** 36,51 ****
#undef __need_ptrdiff_t
#undef __need_NULL
#undef __need_wint_t
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cstddef>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::ptrdiff_t;
using ::std::size_t;
- # define _INCLUDED_CPP_STDDEF_H_ 1
- # endif
#endif /* _INCLUDED_CPP_STDDEF_H_ */
--- 36,63 ----
#undef __need_ptrdiff_t
#undef __need_NULL
#undef __need_wint_t
+
+ # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
+ // get out of the "legacy"
+ } // close extern "C"
+ } // close namespace _C_legacy::
+ # undef _IN_C_LEGACY_
+ # define _STDDEF_NEED_C_LEGACY_
+ # endif
! # include <cstddef>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::ptrdiff_t;
using ::std::size_t;
+ # ifdef _STDDEF_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _STDDEF_NEED_C_LEGACY_
+ # endif /* _STDDEF_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STDDEF_H_ */
Index: shadow/stdio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/stdio.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 stdio.h
*** stdio.h 2000/05/19 09:33:23 1.2
--- stdio.h 2000/09/26 18:59:53
***************
*** 27,41 ****
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-
#ifndef _INCLUDED_CPP_STDIO_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cstdio>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::size_t;
using ::std::fpos_t;
using ::std::remove;
using ::std::rename;
--- 27,50 ----
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_STDIO_H_
! # define _INCLUDED_CPP_STDIO_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _STDIO_NEED_C_LEGACY_
! # endif
! # include <cstdio>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::size_t;
+ using ::std::FILE;
using ::std::fpos_t;
using ::std::remove;
using ::std::rename;
***************
*** 78,84 ****
using ::std::feof;
using ::std::ferror;
using ::std::perror;
- # define _INCLUDED_CPP_STDIO_H_ 1
- # endif
#endif /* _INCLUDED_CPP_STDIO_H_ */
--- 87,98 ----
using ::std::feof;
using ::std::ferror;
using ::std::perror;
+ # ifdef _STDIO_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _STDIO_NEED_C_LEGACY_
+ # endif /* _STDIO_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STDIO_H_ */
Index: shadow/stdlib.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/stdlib.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 stdlib.h
*** stdlib.h 2000/05/19 09:33:23 1.2
--- stdlib.h 2000/09/26 18:59:53
***************
*** 27,72 ****
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-
#ifndef _INCLUDED_CPP_STDLIB_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cstdlib>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
- # ifndef _IN_C_LEGACY_
- using ::std::size_t;
using ::std::div_t;
using ::std::ldiv_t;
using ::std::atof;
using ::std::atoi;
using ::std::atol;
! using ::std::strtod;
! using ::std::strtol;
! using ::std::strtoul;
! using ::std::rand;
! using ::std::srand;
using ::std::calloc;
! using ::std::free;
! using ::std::malloc;
! using ::std::realloc;
! using ::std::abort;
! using ::std::atexit;
using ::std::exit;
using ::std::getenv;
- using ::std::system;
- using ::std::bsearch;
- using ::std::qsort;
- using ::std::abs;
- using ::std::div;
using ::std::labs;
using ::std::ldiv;
using ::std::mblen;
- using ::std::mbtowc;
- using ::std::wctomb;
using ::std::mbstowcs;
using ::std::wcstombs;
! # define _INCLUDED_CPP_STDLIB_H_ 1
! # endif
#endif /* _INCLUDED_CPP_STDLIB_H_ */
--- 27,89 ----
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_STDLIB_H_
! # define _INCLUDED_CPP_STDLIB_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _STDLIB_NEED_C_LEGACY_
! # endif
!
! # include <cstdlib>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
using ::std::div_t;
using ::std::ldiv_t;
+ #ifdef _GLIBCPP_USE_LONG_LONG
+ using ::std::lldiv_t;
+ #endif
+ //using ::std::size_t;
+
+ using ::std::abort;
+ using ::std::abs;
+ using ::std::atexit;
using ::std::atof;
using ::std::atoi;
using ::std::atol;
! using ::std::bsearch;
using ::std::calloc;
! using ::std::div;
using ::std::exit;
+ using ::std::free;
using ::std::getenv;
using ::std::labs;
using ::std::ldiv;
+ using ::std::malloc;
using ::std::mblen;
using ::std::mbstowcs;
+ using ::std::mbtowc;
+ using ::std::qsort;
+ using ::std::rand;
+ using ::std::realloc;
+ using ::std::srand;
+ using ::std::strtod;
+ using ::std::strtol;
+ using ::std::strtoul;
+ using ::std::system;
using ::std::wcstombs;
! using ::std::wctomb;
+ # ifdef _STDLIB_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _STDLIB_NEED_C_LEGACY_
+ # endif /* _STDLIB_NEED_C__LEGACY_ */
#endif /* _INCLUDED_CPP_STDLIB_H_ */
Index: shadow/string.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/string.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 string.h
*** string.h 2000/05/19 09:33:23 1.2
--- string.h 2000/09/26 18:59:53
***************
*** 29,40 ****
#ifndef _INCLUDED_CPP_STRING_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cstring>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::memcpy;
using ::std::memmove;
using ::std::strcpy;
--- 29,49 ----
#ifndef _INCLUDED_CPP_STRING_H_
! # define _INCLUDED_CPP_STRING_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _STRING_NEED_C_LEGACY_
! # endif
!
! # include <cstring>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::memcpy;
using ::std::memmove;
using ::std::strcpy;
***************
*** 57,63 ****
using ::std::memset;
using ::std::strerror;
using ::std::strlen;
- # define _INCLUDED_CPP_STRING_H_ 1
- # endif
#endif /* _INCLUDED_CPP_STRING_H_ */
--- 66,77 ----
using ::std::memset;
using ::std::strerror;
using ::std::strlen;
+ # ifdef _STRING_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _STRING_NEED_C_LEGACY_
+ # endif /* _STRING_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_STRING_H_ */
Index: shadow/time.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/time.h,v
retrieving revision 1.3
diff -c -p -3 -r1.3 time.h
*** time.h 2000/06/01 00:52:26 1.3
--- time.h 2000/09/26 18:59:53
***************
*** 27,46 ****
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-
#ifndef _INCLUDED_CPP_TIME_H_
!
// turn off glibc-2.0 weirdness. Other systems define similar foolishness
#undef __need_time_t
#undef __need_clock_t
#undef __need_timespec
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <ctime>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::size_t; /* handled in <cstddef> */
using ::std::clock_t;
using ::std::time_t;
--- 27,52 ----
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
#ifndef _INCLUDED_CPP_TIME_H_
! # define _INCLUDED_CPP_TIME_H_ 1
// turn off glibc-2.0 weirdness. Other systems define similar foolishness
#undef __need_time_t
#undef __need_clock_t
#undef __need_timespec
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _TIME_NEED_C_LEGACY_
! # endif
! # include <ctime>
!
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::size_t; /* handled in <cstddef> */
using ::std::clock_t;
using ::std::time_t;
***************
*** 54,60 ****
using ::std::gmtime;
using ::std::localtime;
using ::std::strftime;
- # define _INCLUDED_CPP_TIME_H_ 1
- # endif
#endif /* _INCLUDED_CPP_TIME_H_ */
--- 60,71 ----
using ::std::gmtime;
using ::std::localtime;
using ::std::strftime;
+ # ifdef _TIME_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _TIME_NEED_C_LEGACY_
+ # endif /* _TIME_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_TIME_H_ */
Index: shadow/unistd.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/unistd.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 unistd.h
*** unistd.h 2000/05/19 09:33:23 1.2
--- unistd.h 2000/09/26 18:59:53
***************
*** 29,44 ****
#ifndef _INCLUDED_CPP_UNISTD_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <bits/wrap_unistd.h>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
! // using ::std::stuff
! # define _INCLUDED_CPP_UNISTD_H_ 1
! # endif
#endif /* _INCLUDED_CPP_UNISTD_H_ */
--- 29,54 ----
#ifndef _INCLUDED_CPP_UNISTD_H_
+ # define _INCLUDED_CPP_UNISTD_H_ 1
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _UNISTD_NEED_C_LEGACY_
! # endif
! # include <bits/wrap_unistd.h>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
+ # ifdef _UNISTD_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _UNISTD_NEED_C_LEGACY_
+ # endif /* _UNISTD_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_UNISTD_H_ */
Index: shadow/wchar.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/wchar.h,v
retrieving revision 1.3
diff -c -p -3 -r1.3 wchar.h
*** wchar.h 2000/06/01 00:52:26 1.3
--- wchar.h 2000/09/26 18:59:53
***************
*** 29,40 ****
#ifndef _INCLUDED_CPP_WCHAR_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cwchar>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
using ::std::size_t; /* handled in <cstddef> */
using ::std::wint_t;
using ::std::mbstate_t;
--- 29,49 ----
#ifndef _INCLUDED_CPP_WCHAR_H_
! # define _INCLUDED_CPP_WCHAR_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_ /* sub-included by a C header */
! # define _WCHAR_NEED_C_LEGACY_
! # endif
!
! # include <cwchar>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::size_t; /* handled in <cstddef> */
using ::std::wint_t;
using ::std::mbstate_t;
***************
*** 67,72 ****
--- 76,83 ----
using ::std::wcscoll;
using ::std::wcsxfrm;
# ifdef __USE_GNU
+ # ifdef __USE_GNU
+ # endif
using ::std::wcsdup;
# endif
using ::std::wcschr;
***************
*** 92,101 ****
using ::std::mbsrtowcs;
using ::std::wcsrtombs;
using ::std::mbsnrtowcs;
! using ::std::mbsnrtombs;
using ::std::wcwidth;
using ::std::wcswidth;
! using ::std::wcscmpy;
# endif
using ::std::wcstod;
using ::std::wcstol;
--- 103,112 ----
using ::std::mbsrtowcs;
using ::std::wcsrtombs;
using ::std::mbsnrtowcs;
! // using ::std::mbsnrtombs;
using ::std::wcwidth;
using ::std::wcswidth;
! // using ::std::wcscmpy;
# endif
using ::std::wcstod;
using ::std::wcstol;
***************
*** 104,111 ****
using ::std::wcsncmp;
using ::std::wcsncpy;
using ::std::wcsrchr;
using ::std::wcsspn;
- # define _INCLUDED_CPP_WCHAR_H_ 1
- # endif /* _IN_C_LEGACY_ */
#endif /* _INCLUDED_CPP_WCHAR_H_ */
--- 115,127 ----
using ::std::wcsncmp;
using ::std::wcsncpy;
using ::std::wcsrchr;
+ # ifdef _WCHAR_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _WCHAR_NEED_C_LEGACY_
+ # endif /* _WCHAR_NEED_C_LEGACY_ */
using ::std::wcsspn;
#endif /* _INCLUDED_CPP_WCHAR_H_ */
Index: shadow/wctype.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/wctype.h,v
retrieving revision 1.2
diff -c -p -3 -r1.2 wctype.h
*** wctype.h 2000/05/19 09:33:23 1.2
--- wctype.h 2000/09/26 18:59:53
***************
*** 29,41 ****
// the GNU General Public License.
#ifndef _INCLUDED_CPP_CWCTYPE_H_
! # undef _SHADOW_NAME
! # define _SHADOW_NAME <cwctype>
! # include <bits/generic_shadow.h>
! # undef _SHADOW_NAME
! # ifndef _IN_C_LEGACY_
! using ::std::size_t;
using ::std::wint_t;
using ::std::wctype_t;
using ::std::wctrans_t;
--- 29,49 ----
// the GNU General Public License.
#ifndef _INCLUDED_CPP_CWCTYPE_H_
! # define _INCLUDED_CPP_CWCTYPE_H_ 1
!
! # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
! // get out of the "legacy"
! } // close extern "C"
! } // close namespace _C_legacy::
! # undef _IN_C_LEGACY_
! # define _CWCHAR_NEED_C_LEGACY_
! # endif
!
! # include <cwctype>
! // expose global C names, including non-standard ones, but shadow
! // some names and types with the std:: C++ version.
!
using ::std::wint_t;
using ::std::wctype_t;
using ::std::wctrans_t;
***************
*** 51,59 ****
using ::std::iswgraph;
using ::std::iswcntrl;
using ::std::iswctype;
using ::std::towlower;
using ::std::towupper;
! # define _INCLUDED_CPP_CWCTYPE_H_ 1
! # endif
#endif /* _INCLUDED_CPP_CWCTYPE_H_ */
--- 59,75 ----
using ::std::iswgraph;
using ::std::iswcntrl;
using ::std::iswctype;
+ using ::std::towctrans;
using ::std::towlower;
using ::std::towupper;
! using ::std::wctrans;
! using ::std::wctype;
+ # ifdef _CWCHAR_NEED_C_LEGACY_
+ // dive back into the "swamp"
+ namespace _C_legacy {
+ extern "C" {
+ # define _IN_C_LEGACY_
+ # undef _CWCHAR_NEED_C_LEGACY_
+ # endif /* _CWCHAR_NEED_C_LEGACY_ */
#endif /* _INCLUDED_CPP_CWCTYPE_H_ */
Index: shadow/bits/std_cassert.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cassert.h,v
retrieving revision 1.3
diff -c -p -3 -r1.3 std_cassert.h
*** std_cassert.h 2000/07/21 01:02:32 1.3
--- std_cassert.h 2000/09/26 18:59:53
***************
*** 36,43 ****
// If <assert.h> sub-includes anything else that
// defines a global used in other headers, we are sunk.
! extern "C" {
# pragma GCC system_header
# include_next <assert.h>
! }
!
--- 36,46 ----
// If <assert.h> sub-includes anything else that
// defines a global used in other headers, we are sunk.
! namespace _C_legacy {
! extern "C" {
! # define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <assert.h>
! }
! } // close namespace ::_C_legacy::
! #undef _IN_C_LEGACY_
Index: shadow/bits/std_cctype.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cctype.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cctype.h
*** std_cctype.h 2000/07/21 01:02:32 1.4
--- std_cctype.h 2000/09/26 18:59:53
***************
*** 73,93 ****
# undef tolower
# undef toupper
- #if 0 /* these might not be necessary any more. 98-09-29 */
- # undef _U
- # undef _L
- # undef _N
- # undef _S
- # undef _P
- # undef _C
- # undef _B
- # undef _X
- #endif
-
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
namespace std {
inline int isalnum(int __c)
--- 73,78 ----
***************
*** 120,143 ****
} // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- using ::std::isalnum;
- using ::std::isalpha;
- using ::std::iscntrl;
- using ::std::isdigit;
- using ::std::isgraph;
- using ::std::islower;
- using ::std::isprint;
- using ::std::ispunct;
- using ::std::isspace;
- using ::std::isupper;
- using ::std::isxdigit;
- using ::std::tolower;
- using ::std::toupper;
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 105,110 ----
Index: shadow/bits/std_cerrno.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cerrno.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cerrno.h
*** std_cerrno.h 2000/07/21 01:02:32 1.4
--- std_cerrno.h 2000/09/26 18:59:53
***************
*** 43,66 ****
int& _CPP_errno_capture() { return errno; }
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef errno
# define errno ::_C_legacy::_CPP_errno_capture()
// # undef EDOM
// # undef ERANGE
-
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
- namespace std {
- } // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
# undef _IN_C_LEGACY_
--- 43,54 ----
Index: shadow/bits/std_cfloat.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cfloat.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cfloat.h
*** std_cfloat.h 2000/07/21 01:02:32 1.4
--- std_cfloat.h 2000/09/26 18:59:53
***************
*** 167,184 ****
# undef LDBL_MIN
# define LDBL_MIN ::_C_legacy::_CPP_LDBL_MIN_capture()
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
- namespace std {
- } // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 167,172 ----
Index: shadow/bits/std_climits.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_climits.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_climits.h
*** std_climits.h 2000/07/21 01:02:32 1.4
--- std_climits.h 2000/09/26 18:59:53
***************
*** 40,46 ****
# pragma GCC system_header
# include_next <limits.h>
}
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
// Note: there is not much for this wrapper to do besides hiding
--- 40,45 ----
***************
*** 49,62 ****
// #undef MB_LEN_MAX
// #define MB_LEN_MAX 16 /* or something */
-
- namespace std {
- } // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
# undef _IN_C_LEGACY_
--- 48,53 ----
Index: shadow/bits/std_clocale.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_clocale.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_clocale.h
*** std_clocale.h 2000/07/21 01:02:32 1.4
--- std_clocale.h 2000/09/26 18:59:53
***************
*** 54,60 ****
const int _CPP_LC_MESSAGES_capture = LC_MESSAGES;
#endif
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
// # undef NULL
--- 54,59 ----
***************
*** 80,108 ****
# undef setlocale
# undef localeconv
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
namespace std {
// Adopt C names into std::
using ::_C_legacy::setlocale;
// note: still a POD type:
! struct lconv : ::_C_legacy::_CPP_lconv_capture { };
inline lconv* localeconv()
{ return reinterpret_cast<lconv*>(::_C_legacy::localeconv()); }
} // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- using ::std::lconv;
- using ::std::localeconv;
- }
- }
# undef _IN_C_LEGACY_
--- 79,96 ----
# undef setlocale
# undef localeconv
namespace std {
// Adopt C names into std::
using ::_C_legacy::setlocale;
// note: still a POD type:
! struct lconv : ::_C_legacy::_CPP_lconv_capture { };
inline lconv* localeconv()
{ return reinterpret_cast<lconv*>(::_C_legacy::localeconv()); }
} // close namespace std::
# undef _IN_C_LEGACY_
Index: shadow/bits/std_csetjmp.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_csetjmp.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_csetjmp.h
*** std_csetjmp.h 2000/07/21 01:02:32 1.4
--- std_csetjmp.h 2000/09/26 18:59:53
***************
*** 43,49 ****
typedef jmp_buf _CPP_jmp_buf_capture;
inline int _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef jmp_buf
--- 43,48 ----
***************
*** 51,74 ****
# define setjmp(__jb) ::_C_legacy::_CPP_setjmp_capture(__jb)
# undef longjmp
- namespace _C_legacy {
- namespace _C_shadow {
- typedef ::_C_legacy::_CPP_jmp_buf_capture jmp_buf;
- }
- }
namespace std {
// Adopt C names into std::
- using ::_C_legacy::_C_shadow::jmp_buf;
- using ::_C_legacy::longjmp;
} // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 50,63 ----
# define setjmp(__jb) ::_C_legacy::_CPP_setjmp_capture(__jb)
# undef longjmp
namespace std {
// Adopt C names into std::
+ typedef ::_C_legacy::_CPP_jmp_buf_capture jmp_buf;
+ using ::_C_legacy::longjmp;
} // close namespace std::
# undef _IN_C_LEGACY_
#endif
Index: shadow/bits/std_csignal.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_csignal.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_csignal.h
*** std_csignal.h 2000/07/21 01:02:32 1.4
--- std_csignal.h 2000/09/26 18:59:53
***************
*** 37,42 ****
--- 37,44 ----
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
+ # undef __need_sig_atomic_t
+ # undef __need_sigset_t
# pragma GCC system_header
# include_next <signal.h>
typedef void (*_CPP_CSIGFUN_capture)(int); // a C function pointer
***************
*** 52,58 ****
const int _CPP_SIGSEGV_capture = SIGSEGV;
const int _CPP_SIGTERM_capture = SIGTERM;
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef sig_atomic_t
--- 54,59 ----
***************
*** 80,94 ****
# undef SIGTERM
# define SIGTERM ::_C_legacy::_CPP_SIGTERM_capture
- namespace _C_legacy {
- namespace _C_shadow {
- typedef ::_C_legacy::_CPP_sig_atomic_t_capture sig_atomic_t;
- }
- }
namespace std {
// Adopt C names into std::
! using ::_C_legacy::_C_shadow::sig_atomic_t;
using ::_C_legacy::raise;
inline void (*signal(int __sig, void (* __fun)(int)))(int)
--- 81,90 ----
# undef SIGTERM
# define SIGTERM ::_C_legacy::_CPP_SIGTERM_capture
namespace std {
// Adopt C names into std::
! typedef ::_C_legacy::_CPP_sig_atomic_t_capture sig_atomic_t;
using ::_C_legacy::raise;
inline void (*signal(int __sig, void (* __fun)(int)))(int)
***************
*** 99,110 ****
} // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- using ::std::signal;
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 95,100 ----
Index: shadow/bits/std_cstdarg.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cstdarg.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cstdarg.h
*** std_cstdarg.h 2000/07/21 01:02:32 1.4
--- std_cstdarg.h 2000/09/26 18:59:53
***************
*** 58,66 ****
{ va_end(__val); }
# endif
- // typedef size_t _CPP_size_t_capture; // handled in <cstddef>
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
# ifdef __GNUC__
--- 58,64 ----
***************
*** 80,98 ****
# endif
- namespace _C_legacy {
- namespace _C_shadow {
- typedef ::_C_legacy::_CPP_va_list_capture va_list;
- }
- }
namespace std {
! using ::_C_legacy::_C_shadow::va_list;
} // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
# undef _IN_C_LEGACY_
--- 78,86 ----
# endif
namespace std {
! typedef ::_C_legacy::_CPP_va_list_capture va_list;
} // close namespace std::
# undef _IN_C_LEGACY_
Index: shadow/bits/std_cstddef.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cstddef.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cstddef.h
*** std_cstddef.h 2000/07/21 01:02:32 1.4
--- std_cstddef.h 2000/09/26 18:59:53
***************
*** 43,49 ****
typedef ptrdiff_t _CPP_ptrdiff_t_capture;
typedef size_t _CPP_size_t_capture;
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef ptrdiff_t
--- 43,48 ----
***************
*** 53,77 ****
# define NULL 0
// # undef offsetof
- namespace _C_legacy {
- namespace _C_shadow {
- typedef ::_C_legacy::_CPP_ptrdiff_t_capture ptrdiff_t;
- typedef ::_C_legacy::_CPP_size_t_capture size_t;
- }
- }
namespace std {
- // Adopt C names into std::
- using ::_C_legacy::_C_shadow::ptrdiff_t;
- using ::_C_legacy::_C_shadow::size_t;
-
} // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 52,63 ----
# define NULL 0
// # undef offsetof
namespace std {
+ typedef ::_C_legacy::_CPP_ptrdiff_t_capture ptrdiff_t;
+ typedef ::_C_legacy::_CPP_size_t_capture size_t;
} // close namespace std::
# undef _IN_C_LEGACY_
#endif
Index: shadow/bits/std_cstdio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cstdio.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cstdio.h
*** std_cstdio.h 2000/07/21 01:02:32 1.4
--- std_cstdio.h 2000/09/26 18:59:53
***************
*** 47,52 ****
--- 47,53 ----
namespace _C_legacy {
extern "C" {
# define _IN_C_LEGACY_
+ # undef __need_FILE
# pragma GCC system_header
# include_next <stdio.h>
}
***************
*** 77,85 ****
inline int _CPP_putchar_capture(int __c) { return putchar(__c); }
inline int _CPP_feof_capture(FILE* __f) { return feof(__f); }
- namespace _C_shadow {
- }
-
} // close namespace ::_C_legacy::
// # undef size_t /* handled in <cstddef> */
--- 78,83 ----
***************
*** 97,114 ****
# define EOF ::_C_legacy::_CPP_EOF_capture
# undef FOPEN_MAX
# define FOPEN_MAX ::_C_legacy::_CPP_FOPEN_MAX_capture
! # undef FILENAME_MAX
! # define FILENAME_MAX ::_C_legacy::_CPP_FILENAME_MAX_capture
! # undef L_tmpnam
! # define L_tmpnam ::_C_legacy::_CPP_L_tmpnam_capture
# undef SEEK_CUR
# define SEEK_CUR ::_C_legacy::_CPP_SEEK_CUR_capture
# undef SEEK_END
# define SEEK_END ::_C_legacy::_CPP_SEEK_END_capture
# undef SEEK_SET
# define SEEK_SET ::_C_legacy::_CPP_SEEK_SET_capture
! # undef TMP_MAX
! # define TMP_MAX ::_C_legacy::_CPP_TMP_MAX_capture
# undef remove
# undef rename
--- 95,112 ----
# define EOF ::_C_legacy::_CPP_EOF_capture
# undef FOPEN_MAX
# define FOPEN_MAX ::_C_legacy::_CPP_FOPEN_MAX_capture
! //# undef FILENAME_MAX
! //# define FILENAME_MAX ::_C_legacy::_CPP_FILENAME_MAX_capture
! //# undef L_tmpnam
! //# define L_tmpnam ::_C_legacy::_CPP_L_tmpnam_capture
# undef SEEK_CUR
# define SEEK_CUR ::_C_legacy::_CPP_SEEK_CUR_capture
# undef SEEK_END
# define SEEK_END ::_C_legacy::_CPP_SEEK_END_capture
# undef SEEK_SET
# define SEEK_SET ::_C_legacy::_CPP_SEEK_SET_capture
! //# undef TMP_MAX
! //# define TMP_MAX ::_C_legacy::_CPP_TMP_MAX_capture
# undef remove
# undef rename
***************
*** 152,161 ****
# undef ferror
# undef perror
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
namespace std {
// Adopt C names into std::
--- 150,155 ----
***************
*** 312,366 ****
# define stdin ::std::_CPP_stdin()
# undef stdout
# define stdout ::std::_CPP_stdout()
-
- namespace _C_legacy {
- namespace _C_shadow {
- using ::std::FILE;
- using ::std::fpos_t;
-
- // using ::std::remove;
- // using ::std::rename;
- using ::std::tmpfile;
- // using ::std::tmpnam;
- using ::std::fclose;
- using ::std::fflush;
- using ::std::fopen;
- using ::std::freopen;
- using ::std::setbuf;
- using ::std::setvbuf;
- using ::std::fprintf;
- using ::std::fscanf;
- // using ::std::printf;
- // using ::std::scanf;
- // using ::std::sprintf;
- // using ::std::sscanf;
- using ::std::vfprintf;
- using ::std::vprintf;
- using ::std::vsprintf;
- using ::std::fgetc;
- using ::std::fgets;
- using ::std::fputc;
- using ::std::fputs;
- using ::std::getc;
- using ::std::getchar;
- // using ::std::gets;
- using ::std::putc;
- using ::std::putchar;
- // using ::std::puts;
- using ::std::ungetc;
- using ::std::fread;
- using ::std::fwrite;
- using ::std::fgetpos;
- using ::std::fseek;
- using ::std::fsetpos;
- using ::std::ftell;
- using ::std::rewind;
- using ::std::clearerr;
- using ::std::feof;
- using ::std::ferror;
- // using ::std::perror;
- }
- }
# undef _IN_C_LEGACY_
--- 306,311 ----
Index: shadow/bits/std_cstdlib.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cstdlib.h,v
retrieving revision 1.5
diff -c -p -3 -r1.5 std_cstdlib.h
*** std_cstdlib.h 2000/07/21 01:02:32 1.5
--- std_cstdlib.h 2000/09/26 18:59:53
***************
*** 38,43 ****
--- 38,44 ----
#ifndef _CPP_CSTDLIB
#define _CPP_CSTDLIB 1
+ # include <bits/c++config.h>
# include <bits/std_cstddef.h> /* pick up NULL, size_t */
namespace _C_legacy {
*************** namespace _C_legacy {
*** 56,63 ****
typedef div_t _CPP_div_t_capture;
typedef ldiv_t _CPP_ldiv_t_capture;
! namespace _C_shadow {
! }
} // namespace _C_legacy::
# undef size_t
--- 57,66 ----
typedef div_t _CPP_div_t_capture;
typedef ldiv_t _CPP_ldiv_t_capture;
! # if _GLIBCPP_HAVE_LLDIV_T
! typedef lldiv_t _CPP_lldiv_t_capture;
! # endif
!
} // namespace _C_legacy::
# undef size_t
*************** namespace _C_legacy {
*** 110,134 ****
# undef mbstowcs
# undef wcstombs
- namespace _C_legacy {
- namespace _C_shadow {
- // these come from <cstddef>
- // typedef ::_C_legacy::_CPP_size_t_capture size_t;
- // typedef ::_C_legacy::_CPP_wchar_t_capture wchar_t;
- }
- }
namespace std {
- // Adopt C names into std::
- // using ::_C_legacy::_C_shadow::size_t;
- // using ::_C_legacy::_C_shadow::wchar_t;
-
typedef ::_C_legacy::_CPP_div_t_capture _CPP_div_t;
struct div_t : _CPP_div_t {};
typedef ::_C_legacy::_CPP_ldiv_t_capture _CPP_ldiv_t;
struct ldiv_t : _CPP_ldiv_t {};
// note: div_t and ldiv_t are still POD types
!
// EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, MB_CUR_MAX, NULL
using ::_C_legacy::atof;
--- 113,137 ----
# undef mbstowcs
# undef wcstombs
namespace std {
typedef ::_C_legacy::_CPP_div_t_capture _CPP_div_t;
struct div_t : _CPP_div_t {};
typedef ::_C_legacy::_CPP_ldiv_t_capture _CPP_ldiv_t;
struct ldiv_t : _CPP_ldiv_t {};
// note: div_t and ldiv_t are still POD types
! #ifdef _GLIBCPP_USE_LONG_LONG
! # ifdef _GLIBCPP_HAVE_LLDIV_T
! typedef ::_C_legacy::_CPP_lldiv_t_capture _CPP_lldiv_t;
! struct lldiv_t : _CPP_lldiv_t {};
! # else
! struct lldiv_t
! {
! long long quot;
! long long rem;
! };
! # endif
! #endif
// EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, MB_CUR_MAX, NULL
using ::_C_legacy::atof;
*************** namespace _C_legacy {
*** 159,165 ****
// C and C++ calling conventions differ, each pointer must
// be marked to be called using the proper convention.
! void exit(int __i) // XXX must define correctly for C++, like atexit().
{ ::_C_legacy::exit(__i); }
using ::_C_legacy::getenv;
--- 162,168 ----
// C and C++ calling conventions differ, each pointer must
// be marked to be called using the proper convention.
! inline void exit(int __i) // XXX must define correctly for C++, like atexit().
{ ::_C_legacy::exit(__i); }
using ::_C_legacy::getenv;
*************** namespace _C_legacy {
*** 209,243 ****
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#endif
! using ::_C_legacy::mblen;
! using ::_C_legacy::mbtowc;;
using ::_C_legacy::wctomb;
using ::_C_legacy::mbstowcs;
using ::_C_legacy::wcstombs;
} // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- using ::std::div_t;
- using ::std::ldiv_t;
-
- using ::std::abort;
- using ::std::atexit;
- using ::std::exit;
- using ::std::bsearch;
- using ::std::qsort;
- using ::std::abs;
- using ::std::div;
- using ::std::labs;
- using ::std::ldiv;
- #ifdef _GLIBCPP_USE_LONG_LONG
- using ::std::llabs;
- using ::std::lldiv;
- #endif
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 212,227 ----
{ lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
#endif
! //using ::_C_legacy::mblen;
! inline int mblen (const char* __p, unsigned int __n)
! { return ::_C_legacy::mblen (__p, __n); }
! using ::_C_legacy::mbtowc;
using ::_C_legacy::wctomb;
using ::_C_legacy::mbstowcs;
using ::_C_legacy::wcstombs;
} // close namespace std::
# undef _IN_C_LEGACY_
#endif
Index: shadow/bits/std_cstring.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cstring.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cstring.h
*** std_cstring.h 2000/07/21 01:02:32 1.4
--- std_cstring.h 2000/09/26 18:59:53
***************
*** 100,106 ****
inline size_t _CPP_strlen_capture(char const* __s)
{ return strlen(__s); }
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
// size_t, NULL
--- 100,105 ----
***************
*** 127,136 ****
# undef strerror
# undef strlen
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
namespace std {
// Redefine most of these inline. Note that the
--- 126,131 ----
***************
*** 203,236 ****
{ return ::_C_legacy::_CPP_strlen_capture(__s); }
} // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- // adopt names back into C
- using ::std::memcpy;
- using ::std::memmove;
- using ::std::strcpy;
- using ::std::strncpy;
- using ::std::strcat;
- using ::std::strncat;
- using ::std::memcmp;
- using ::std::strcmp;
- using ::std::strcoll;
- using ::std::strncmp;
- using ::std::strxfrm;
- using ::std::memchr;
- using ::std::strchr;
- using ::std::strcspn;
- using ::std::strpbrk;
- using ::std::strrchr;
- using ::std::strspn;
- using ::std::strstr;
- using ::std::strtok;
- using ::std::memset;
- // using ::std::strerror;
- using ::std::strlen;
- }
- }
# undef _IN_C_LEGACY_
--- 198,203 ----
Index: shadow/bits/std_ctime.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_ctime.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_ctime.h
*** std_ctime.h 2000/07/21 01:02:32 1.4
--- std_ctime.h 2000/09/26 18:59:53
***************
*** 49,55 ****
typedef time_t _CPP_time_t_capture;
typedef struct tm _CPP_tm_capture;
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
// # undef NULL
--- 49,54 ----
***************
*** 71,90 ****
# undef localtime
# undef strftime
- namespace _C_legacy {
- namespace _C_shadow {
- // typedef ::_C_legacy::_CPP_size_t_capture size_t;
- typedef ::_C_legacy::_CPP_clock_t_capture clock_t;
- typedef ::_C_legacy::_CPP_time_t_capture time_t;
- }
- }
namespace std {
// Adopt C names into std::
! // using ::_C_legacy::_C_shadow::size_t;
! using ::_C_legacy::_C_shadow::clock_t;
! using ::_C_legacy::_C_shadow::time_t;
!
// note: still a POD type:
struct tm : ::_C_legacy::_CPP_tm_capture { };
--- 70,81 ----
# undef localtime
# undef strftime
namespace std {
// Adopt C names into std::
! // typedef ::_C_legacy::_CPP_size_t_capture size_t;
! typedef ::_C_legacy::_CPP_clock_t_capture clock_t;
! typedef ::_C_legacy::_CPP_time_t_capture time_t;
// note: still a POD type:
struct tm : ::_C_legacy::_CPP_tm_capture { };
***************
*** 112,127 ****
} // close namespace std::
- namespace _C_legacy {
- namespace _C_shadow {
- using ::std::tm;
- using ::std::asctime;
- using ::std::gmtime;
- using ::std::localtime;
- using ::std::strftime;
- }
- }
-
# undef _IN_C_LEGACY_
#endif
--- 103,108 ----
Index: shadow/bits/std_cwchar.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cwchar.h,v
retrieving revision 1.5
diff -c -p -3 -r1.5 std_cwchar.h
*** std_cwchar.h 2000/07/21 01:02:32 1.5
--- std_cwchar.h 2000/09/26 18:59:53
***************
*** 35,43 ****
#ifndef _CPP_CWCHAR
# define _CPP_CWCHAR 1
# include <bits/std_cstddef.h> /* size_t, NULL */
- # include <bits/std_cstdio.h> /* FILE */
# include <bits/std_ctime.h> /* struct tm */
# include <bits/std_cstring.h> /* memset */
namespace _C_legacy {
--- 35,45 ----
#ifndef _CPP_CWCHAR
# define _CPP_CWCHAR 1
+ #if 0
# include <bits/std_cstddef.h> /* size_t, NULL */
# include <bits/std_ctime.h> /* struct tm */
+ # include <bits/std_cstdio.h> /* FILE */
+ #endif
# include <bits/std_cstring.h> /* memset */
namespace _C_legacy {
***************
*** 45,50 ****
--- 47,53 ----
# define _IN_C_LEGACY_
# pragma GCC system_header
# include_next <wchar.h>
+ #define __XX__
}
// NULL, size_t handled in <cstddef>
***************
*** 64,70 ****
{ return putwchar(__c); }
#endif
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
// # undef size_t /* handled in <cstddef> */
--- 67,72 ----
***************
*** 159,182 ****
# undef wcspbrk
# undef wcswcs
- namespace _C_legacy {
- namespace _C_shadow {
- typedef ::_C_legacy::_CPP_wint_t_capture wint_t;
- // typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
- }
- }
namespace std {
! // using ::_C_legacy::wchar_t;
! using ::_C_legacy::_C_shadow::wint_t;
// using ::_C_legacy::WEOF;
// XXX this might better be replaced with one unrelated to the C mbstate_t.
struct mbstate_t {
! _C_legacy::_CPP_mbstate_t_capture _M_dum;
mbstate_t() { std::memset(&_M_dum,0,sizeof(_M_dum)); }
};
#if 0 /* glibc-2.0 does not implement these. */
inline wint_t fgetwc(FILE* __f)
--- 161,181 ----
# undef wcspbrk
# undef wcswcs
namespace std {
! typedef ::_C_legacy::_CPP_wint_t_capture wint_t;
// using ::_C_legacy::WEOF;
// XXX this might better be replaced with one unrelated to the C mbstate_t.
+ #if 1
struct mbstate_t {
! ::_C_legacy::_CPP_mbstate_t_capture _M_dum;
mbstate_t() { std::memset(&_M_dum,0,sizeof(_M_dum)); }
};
+ #else
+ typdef _C_legacy::_CPP_mbstate_t_capture mbstate_t;
+ #endif
#if 0 /* glibc-2.0 does not implement these. */
inline wint_t fgetwc(FILE* __f)
***************
*** 233,240 ****
using ::_C_legacy::mbsrtowcs;
using ::_C_legacy::wcsrtombs;
using ::_C_legacy::mbsnrtowcs;
! using ::_C_legacy::mbsnrtombs;
! using ::_C_legacy::wcscmpy
using ::_C_legacy::wcwidth;
using ::_C_legacy::wcswidth;
#endif
--- 232,239 ----
using ::_C_legacy::mbsrtowcs;
using ::_C_legacy::wcsrtombs;
using ::_C_legacy::mbsnrtowcs;
! //using ::_C_legacy::mbsnrtombs;
! //using ::_C_legacy::wcscmpy;
using ::_C_legacy::wcwidth;
using ::_C_legacy::wcswidth;
#endif
***************
*** 256,279 ****
using ::_C_legacy::wctype;
#endif
- }
-
- namespace _C_legacy {
- namespace _C_shadow {
- #if 0 /* XXX glibc-2.0 does not implement these. */
- using ::std::fgetwc;
- using ::std::fgetws;
- using ::std::fputwc;
- using ::std::fputws;
- using ::std::ungetwc;
- using ::std::getwc;
- using ::std::getwchar;
- using ::std::putwc;
- using ::std::putwchar;
- using ::std::wcsftime;
- // XXX also wprintf etc.
- #endif
- }
}
# undef _IN_C_LEGACY_
--- 255,260 ----
Index: shadow/bits/std_cwctype.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/std_cwctype.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 std_cwctype.h
*** std_cwctype.h 2000/07/21 01:02:32 1.4
--- std_cwctype.h 2000/09/26 18:59:53
***************
*** 47,55 ****
typedef wctype_t _CPP_wctype_t_capture;
typedef wctrans_t _CPP_wctrans_t_capture;
- // XXX probably should capture defs of the "is" functions.
-
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
# undef size_t /* handled in <cstddef> */
--- 47,52 ----
***************
*** 70,77 ****
--- 67,77 ----
# undef iswgraph
# undef iswcntrl
# undef iswctype
+ # undef towctrans
# undef towlower
# undef towupper
+ # undef wctrans
+ # undef wctype
// SunOS macros
# undef iswascii
***************
*** 80,117 ****
# undef iscodeset2
# undef iscodeset3
- namespace _C_legacy {
- namespace _C_shadow {
- typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
- typedef ::_C_legacy::_CPP_wctrans_t_capture wctrans_t;
- }
- }
namespace std {
! using ::_C_legacy::_C_shadow::wctype_t;
! using ::_C_legacy::_C_shadow::wctrans_t;
! // XXX probably should capture these to inlines.
! using ::_C_legacy::iswalpha;
! using ::_C_legacy::iswupper;
! using ::_C_legacy::iswlower;
! using ::_C_legacy::iswdigit;
! using ::_C_legacy::iswxdigit;
! using ::_C_legacy::iswalnum;
! using ::_C_legacy::iswspace;
! using ::_C_legacy::iswpunct;
! using ::_C_legacy::iswprint;
! using ::_C_legacy::iswgraph;
! using ::_C_legacy::iswcntrl;
! using ::_C_legacy::iswctype;
! using ::_C_legacy::towlower;
! using ::_C_legacy::towupper;
} // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- }
- }
# undef _IN_C_LEGACY_
--- 80,126 ----
# undef iscodeset2
# undef iscodeset3
namespace std {
! typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
! typedef ::_C_legacy::_CPP_wctrans_t_capture wctrans_t;
! inline int iswalpha (wint_t __wc)
! { return ::_C_legacy::iswalpha (__wc); }
! inline int iswupper (wint_t __wc)
! { return ::_C_legacy::iswupper (__wc); }
! inline int iswlower (wint_t __wc)
! { return ::_C_legacy::iswlower (__wc); }
! inline int iswdigit (wint_t __wc)
! { return ::_C_legacy::iswdigit (__wc); }
! inline int iswxdigit (wint_t __wc)
! { return ::_C_legacy::iswxdigit (__wc); }
! inline int iswalnum (wint_t __wc)
! { return ::_C_legacy::iswalnum (__wc); }
! inline int iswspace (wint_t __wc)
! { return ::_C_legacy::iswspace (__wc); }
! inline int iswpunct (wint_t __wc)
! { return ::_C_legacy::iswpunct (__wc); }
! inline int iswprint (wint_t __wc)
! { return ::_C_legacy::iswprint (__wc); }
! inline int iswgraph (wint_t __wc)
! { return ::_C_legacy::iswgraph (__wc); }
! inline int iswcntrl (wint_t __wc)
! { return ::_C_legacy::iswcntrl (__wc); }
! inline int towlower (wint_t __wc)
! { return ::_C_legacy::towlower (__wc); }
! inline int towupper (wint_t __wc)
! { return ::_C_legacy::towupper (__wc); }
!
! inline int iswctype (wint_t __wc, wctype_t __desc)
! { return ::_C_legacy::iswctype (__wc, __desc); }
! inline wint_t towctrans(wint_t __wc, wctrans_t __desc)
! { return ::_C_legacy::towctrans (__wc, __desc); }
! inline wctrans_t wctrans(const char *__property)
! { return _C_legacy::wctrans (__property); }
! inline wctype_t wctype (char const* __property)
! { return _C_legacy::wctype(__property); }
} // close namespace std::
# undef _IN_C_LEGACY_
Index: shadow/bits/wrap_libio.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/wrap_libio.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 wrap_libio.h
*** wrap_libio.h 2000/07/21 01:02:32 1.4
--- wrap_libio.h 2000/09/26 18:59:53
***************
*** 42,71 ****
# pragma GCC system_header
# include_next <libio.h>
}
-
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
- // # undef that
-
- namespace _C_legacy {
- namespace _C_shadow {
- // typedef stuff
- }
- }
namespace std {
!
! // using ::_C_legacy::stuff
!
! } // close namespace std::
!
! namespace _C_legacy {
! namespace _C_shadow {
! // using ::std::stuff
! }
}
# undef _IN_C_LEGACY_
#endif
-
--- 42,69 ----
# pragma GCC system_header
# include_next <libio.h>
}
} // close namespace ::_C_legacy::
+ #if 0
namespace std {
! typedef _C_legacy::_IO_pos_t _IO_pos_t;
! typedef _C_legacy::_IO_fpos_t _IO_fpos_t;
! typedef _C_legacy::_IO_size_t _IO_size_t;
! typedef _C_legacy::_IO_ssize_t _IO_ssize_t;
! typedef _C_legacy::_IO_off_t _IO_off_t;
! typedef _C_legacy::_IO_pid_t _IO_pid_t;
! typedef _C_legacy::_IO_uid_t _IO_uid_t;
!
! #if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
! typedef _C_legacy::_IO_fpos64_t _IO_fpos64_t;
! typedef _C_legacy::_IO_off64_t _IO_off64_t;
! #endif
! typedef _C_legacy::_IO_FILE _IO_FILE;
! typedef _C_legacy::_IO_wide_data _IO_wide_data;
! typedef _C_legacy::_IO_lock_t _IO_lock_t;
}
+ #endif
# undef _IN_C_LEGACY_
#endif
Index: shadow/bits/wrap_unistd.h
===================================================================
RCS file: /cvs/gcc/egcs/libstdc++-v3/shadow/bits/wrap_unistd.h,v
retrieving revision 1.4
diff -c -p -3 -r1.4 wrap_unistd.h
*** wrap_unistd.h 2000/07/21 01:02:32 1.4
--- wrap_unistd.h 2000/09/26 18:59:53
***************
*** 42,71 ****
# pragma GCC system_header
# include_next <unistd.h>
}
-
- namespace _C_shadow { }
} // close namespace ::_C_legacy::
-
- // # undef that
-
- namespace _C_legacy {
- namespace _C_shadow {
- // typedef stuff
- }
- }
- namespace std {
-
- using ::_C_legacy::read;
- using ::_C_legacy::write;
- using ::_C_legacy::open;
-
- } // close namespace std::
-
- namespace _C_legacy {
- namespace _C_shadow {
- // using ::std::stuff
- }
- }
# undef _IN_C_LEGACY_
--- 42,48 ----