Commit 6dad70df by Benjamin Kosnik

[multiple changes]


2000-05-18  Chip Salzenberg  <chip@valinux.com>

        * bits/ostream.tcc (_S_pad_char): Function template should not be
        static.
        * bits/streambuf.tcc (_S_copy_streambufs): Likewise.
        * src/string-inst.cc (__destroy_aux): Instantiate for string*.

2000-05-18  Nathan C. Myers  <ncm@cantrip.org>

	* mkcshadow: Change C_Swamp to C_legacy.
	* shadow/*: Same.
	* shadow/bits/*: Same.
	s/C_Swamp/C_legacy/g
	s/SWAMP/LEGACY/g
	s/_Shadow/_shadow/g

2000-05-18  Anthony Williams  <anthony@anthonyw.cjb.net>

	* bits/locale_facets.tcc (num_get::_M_extract): Change char* to
	const char*.
	* src/string-inst.cc (string::_S_find): Same.

From-SVN: r34018
parent 5cabe22b
2000-05-18 Chip Salzenberg <chip@valinux.com>
* bits/ostream.tcc (_S_pad_char): Function template should not be
static.
* bits/streambuf.tcc (_S_copy_streambufs): Likewise.
* src/string-inst.cc (__destroy_aux): Instantiate for string*.
2000-05-18 Nathan C. Myers <ncm@cantrip.org>
* mkcshadow: Change C_Swamp to C_legacy.
* shadow/*: Same.
* shadow/bits/*: Same.
s/C_Swamp/C_legacy/g
s/SWAMP/LEGACY/g
s/_Shadow/_shadow/g
2000-05-18 Anthony Williams <anthony@anthonyw.cjb.net>
* bits/locale_facets.tcc (num_get::_M_extract): Change char* to
const char*.
* src/string-inst.cc (string::_S_find): Same.
2000-05-18 Benjamin Kosnik <bkoz@gnu.org> 2000-05-18 Benjamin Kosnik <bkoz@gnu.org>
* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to
......
...@@ -319,7 +319,7 @@ namespace std ...@@ -319,7 +319,7 @@ namespace std
{ {
__valid = false; __valid = false;
char __c = *__beg; char __c = *__beg;
char* __p = strchr(__fmt->_S_literals, __c); const char* __p = strchr(__fmt->_S_literals, __c);
// NB: strchr returns true for __c == 0x0 // NB: strchr returns true for __c == 0x0
if (__p && __c) if (__p && __c)
......
// Copyright (C) 1997-1999 Free Software Foundation, Inc. // Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
// //
// This file is part of the GNU ISO C++ Library. This library is free // This file is part of the GNU ISO C++ Library. This library is free
// software; you can redistribute it and/or modify it under the // software; you can redistribute it and/or modify it under the
...@@ -407,7 +407,7 @@ namespace std { ...@@ -407,7 +407,7 @@ namespace std {
// __newlen > __oldlen // __newlen > __oldlen
// __news is allocated for __newlen size // __news is allocated for __newlen size
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
static void void
_S_pad_char(basic_ios<_CharT, _Traits>& __ios, _S_pad_char(basic_ios<_CharT, _Traits>& __ios,
_CharT* __news, const _CharT* __olds, _CharT* __news, const _CharT* __olds,
const streamsize __newlen, const streamsize __oldlen) const streamsize __newlen, const streamsize __oldlen)
......
...@@ -211,7 +211,7 @@ namespace std { ...@@ -211,7 +211,7 @@ namespace std {
// standard. If so, then checks for __ios being zero would be // standard. If so, then checks for __ios being zero would be
// necessary. // necessary.
template<typename _CharT, typename _Traits> template<typename _CharT, typename _Traits>
static streamsize streamsize
_S_copy_streambufs(basic_ios<_CharT, _Traits>& __ios, _S_copy_streambufs(basic_ios<_CharT, _Traits>& __ios,
basic_streambuf<_CharT, _Traits>* __sbin, basic_streambuf<_CharT, _Traits>* __sbin,
basic_streambuf<_CharT, _Traits>* __sbout) basic_streambuf<_CharT, _Traits>* __sbout)
......
...@@ -67,20 +67,20 @@ while read header; do ...@@ -67,20 +67,20 @@ while read header; do
#ifndef _INCLUDED_CPP_${UPNAME}_ #ifndef _INCLUDED_CPP_${UPNAME}_
# ifdef _IN_C_SWAMP_ /* sub-included by a C header */ # ifdef _IN_C_LEGACY_ /* sub-included by a C header */
# include_next <${header}> # include_next <${header}>
# else # else
namespace _C_Swamp { namespace _C_Shadow { } } namespace _C_legacy { namespace _C_shadow { } }
using namespace ::_C_Swamp::_C_Shadow; using namespace ::_C_legacy::_C_shadow;
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# include_next <${header}> # include_next <${header}>
} // close extern "C" } // close extern "C"
} // close namespace _C_Swamp:: } // close namespace _C_legacy::
# endif /* _IN_C_SWAMP_ */ # endif /* _IN_C_LEGACY_ */
#endif /* _INCLUDED_CPP_${UPNAME}_ */ #endif /* _INCLUDED_CPP_${UPNAME}_ */
EOF EOF
#################### end #################### #################### end ####################
......
...@@ -33,9 +33,9 @@ ...@@ -33,9 +33,9 @@
#ifndef _CPP_CCTYPE #ifndef _CPP_CCTYPE
#define _CPP_CCTYPE 1 #define _CPP_CCTYPE 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <ctype.h> # include_next <ctype.h>
} }
...@@ -55,8 +55,8 @@ ...@@ -55,8 +55,8 @@
inline int _CPP_tolower_capture(int c) { return tolower (c); } inline int _CPP_tolower_capture(int c) { return tolower (c); }
inline int _CPP_toupper_capture(int c) { return toupper (c); } inline int _CPP_toupper_capture(int c) { return toupper (c); }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef isalnum # undef isalnum
# undef isalpha # undef isalpha
...@@ -84,44 +84,44 @@ ...@@ -84,44 +84,44 @@
# undef _X # undef _X
#endif #endif
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
namespace std { namespace std {
inline int isalnum(int __c) inline int isalnum(int __c)
{ return ::_C_Swamp::_CPP_isalnum_capture (__c); } { return ::_C_legacy::_CPP_isalnum_capture (__c); }
inline int isalpha (int __c) inline int isalpha (int __c)
{ return ::_C_Swamp::_CPP_isalpha_capture (__c); } { return ::_C_legacy::_CPP_isalpha_capture (__c); }
inline int iscntrl (int __c) inline int iscntrl (int __c)
{ return ::_C_Swamp::_CPP_iscntrl_capture (__c); } { return ::_C_legacy::_CPP_iscntrl_capture (__c); }
inline int isdigit (int __c) inline int isdigit (int __c)
{ return ::_C_Swamp::_CPP_isdigit_capture (__c); } { return ::_C_legacy::_CPP_isdigit_capture (__c); }
inline int isgraph (int __c) inline int isgraph (int __c)
{ return ::_C_Swamp::_CPP_isgraph_capture (__c); } { return ::_C_legacy::_CPP_isgraph_capture (__c); }
inline int islower (int __c) inline int islower (int __c)
{ return ::_C_Swamp::_CPP_islower_capture (__c); } { return ::_C_legacy::_CPP_islower_capture (__c); }
inline int isprint (int __c) inline int isprint (int __c)
{ return ::_C_Swamp::_CPP_isprint_capture (__c); } { return ::_C_legacy::_CPP_isprint_capture (__c); }
inline int ispunct (int __c) inline int ispunct (int __c)
{ return ::_C_Swamp::_CPP_ispunct_capture (__c); } { return ::_C_legacy::_CPP_ispunct_capture (__c); }
inline int isspace (int __c) inline int isspace (int __c)
{ return ::_C_Swamp::_CPP_isspace_capture (__c); } { return ::_C_legacy::_CPP_isspace_capture (__c); }
inline int isupper (int __c) inline int isupper (int __c)
{ return ::_C_Swamp::_CPP_isupper_capture (__c); } { return ::_C_legacy::_CPP_isupper_capture (__c); }
inline int isxdigit (int __c) inline int isxdigit (int __c)
{ return ::_C_Swamp::_CPP_isxdigit_capture (__c); } { return ::_C_legacy::_CPP_isxdigit_capture (__c); }
inline int tolower (int __c) inline int tolower (int __c)
{ return ::_C_Swamp::_CPP_tolower_capture (__c); } { return ::_C_legacy::_CPP_tolower_capture (__c); }
inline int toupper (int __c) inline int toupper (int __c)
{ return ::_C_Swamp::_CPP_toupper_capture (__c); } { return ::_C_legacy::_CPP_toupper_capture (__c); }
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
using ::std::isalnum; using ::std::isalnum;
using ::std::isalpha; using ::std::isalpha;
using ::std::iscntrl; using ::std::iscntrl;
...@@ -138,6 +138,6 @@ ...@@ -138,6 +138,6 @@
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -34,35 +34,35 @@ ...@@ -34,35 +34,35 @@
#ifndef _CPP_CERRNO #ifndef _CPP_CERRNO
#define _CPP_CERRNO 1 #define _CPP_CERRNO 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <errno.h> # include_next <errno.h>
} }
int& _CPP_errno_capture() { return errno; } int& _CPP_errno_capture() { return errno; }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef errno # undef errno
# define errno ::_C_Swamp::_CPP_errno_capture() # define errno ::_C_legacy::_CPP_errno_capture()
// # undef EDOM // # undef EDOM
// # undef ERANGE // # undef ERANGE
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
namespace std { namespace std {
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
# endif # endif
#endif #endif
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <float.h> # include_next <float.h>
} }
...@@ -89,97 +89,97 @@ ...@@ -89,97 +89,97 @@
inline double _CPP_DBL_MIN_capture() { return DBL_MIN; } inline double _CPP_DBL_MIN_capture() { return DBL_MIN; }
inline long double _CPP_LDBL_MIN_capture() { return LDBL_MIN; } inline long double _CPP_LDBL_MIN_capture() { return LDBL_MIN; }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef FLT_ROUNDS # undef FLT_ROUNDS
# define FLT_ROUNDS ::_C_Swamp::_CPP_FLT_ROUNDS_capture() # define FLT_ROUNDS ::_C_legacy::_CPP_FLT_ROUNDS_capture()
// # undef FLT_RADIX // OK as-is. // # undef FLT_RADIX // OK as-is.
# undef FLT_MANT_DIG # undef FLT_MANT_DIG
# define FLT_MANT_DIG ::_C_Swamp::_CPP_FLT_MANT_DIG_capture() # define FLT_MANT_DIG ::_C_legacy::_CPP_FLT_MANT_DIG_capture()
# undef DBL_MANT_DIG # undef DBL_MANT_DIG
# define DBL_MANT_DIG ::_C_Swamp::_CPP_DBL_MANT_DIG_capture() # define DBL_MANT_DIG ::_C_legacy::_CPP_DBL_MANT_DIG_capture()
# undef LDBL_MANT_DIG # undef LDBL_MANT_DIG
# define LDBL_MANT_DIG ::_C_Swamp::_CPP_LDBL_MANT_DIG_capture() # define LDBL_MANT_DIG ::_C_legacy::_CPP_LDBL_MANT_DIG_capture()
# undef FLT_DIG # undef FLT_DIG
# define FLT_DIG ::_C_Swamp::_CPP_FLT_DIG_capture() # define FLT_DIG ::_C_legacy::_CPP_FLT_DIG_capture()
# undef DBL_DIG # undef DBL_DIG
# define DBL_DIG ::_C_Swamp::_CPP_DBL_DIG_capture() # define DBL_DIG ::_C_legacy::_CPP_DBL_DIG_capture()
# undef LDBL_DIG # undef LDBL_DIG
# define LDBL_DIG ::_C_Swamp::_CPP_LDBL_DIG_capture() # define LDBL_DIG ::_C_legacy::_CPP_LDBL_DIG_capture()
# undef FLT_MIN_MIN_DIG # undef FLT_MIN_MIN_DIG
# define FLT_MIN_MIN_DIG ::_C_Swamp::_CPP_FLT_MIN_MIN_DIG_capture() # define FLT_MIN_MIN_DIG ::_C_legacy::_CPP_FLT_MIN_MIN_DIG_capture()
# undef DBL_MIN_MIN_DIG # undef DBL_MIN_MIN_DIG
# define DBL_MIN_MIN_DIG ::_C_Swamp::_CPP_DBL_MIN_MIN_DIG_capture() # define DBL_MIN_MIN_DIG ::_C_legacy::_CPP_DBL_MIN_MIN_DIG_capture()
# undef LDBL_MIN_MIN_DIG # undef LDBL_MIN_MIN_DIG
# define LDBL_MIN_MIN_DIG ::_C_Swamp::_CPP_LDBL_MIN_MIN_DIG_capture() # define LDBL_MIN_MIN_DIG ::_C_legacy::_CPP_LDBL_MIN_MIN_DIG_capture()
# undef FLT_MIN_EXP # undef FLT_MIN_EXP
# define FLT_MIN_EXP ::_C_Swamp::_CPP_FLT_MIN_EXP_capture() # define FLT_MIN_EXP ::_C_legacy::_CPP_FLT_MIN_EXP_capture()
# undef DBL_MIN_EXP # undef DBL_MIN_EXP
# define DBL_MIN_EXP ::_C_Swamp::_CPP_DBL_MIN_EXP_capture() # define DBL_MIN_EXP ::_C_legacy::_CPP_DBL_MIN_EXP_capture()
# undef LDBL_MIN_EXP # undef LDBL_MIN_EXP
# define LDBL_MIN_EXP ::_C_Swamp::_CPP_LDBL_MIN_EXP_capture() # define LDBL_MIN_EXP ::_C_legacy::_CPP_LDBL_MIN_EXP_capture()
# undef FLT_MIN_10_EXP # undef FLT_MIN_10_EXP
# define FLT_MIN_10_EXP ::_C_Swamp::_CPP_FLT_MIN_10_EXP_capture() # define FLT_MIN_10_EXP ::_C_legacy::_CPP_FLT_MIN_10_EXP_capture()
# undef DBL_MIN_10_EXP # undef DBL_MIN_10_EXP
# define DBL_MIN_10_EXP _::_C_Swamp::CPP_DBL_MIN_10_EXP_capture() # define DBL_MIN_10_EXP _::_C_legacy::CPP_DBL_MIN_10_EXP_capture()
# undef LDBL_MIN_10_EXP # undef LDBL_MIN_10_EXP
# define LDBL_MIN_10_EXP ::_C_Swamp::_CPP_LDBL_MIN_10_EXP_capture() # define LDBL_MIN_10_EXP ::_C_legacy::_CPP_LDBL_MIN_10_EXP_capture()
# undef FLT_MAX_EXP # undef FLT_MAX_EXP
# define FLT_MAX_EXP ::_C_Swamp::_CPP_FLT_MAX_EXP_capture() # define FLT_MAX_EXP ::_C_legacy::_CPP_FLT_MAX_EXP_capture()
# undef DBL_MAX_EXP # undef DBL_MAX_EXP
# define DBL_MAX_EXP ::_C_Swamp::_CPP_DBL_MAX_EXP_capture() # define DBL_MAX_EXP ::_C_legacy::_CPP_DBL_MAX_EXP_capture()
# undef LDBL_MAX_EXP # undef LDBL_MAX_EXP
# define LDBL_MAX_EXP ::_C_Swamp::_CPP_LDBL_MAX_EXP_capture() # define LDBL_MAX_EXP ::_C_legacy::_CPP_LDBL_MAX_EXP_capture()
# undef FLT_MAX_10_EXP # undef FLT_MAX_10_EXP
# define FLT_MAX_10_EXP ::_C_Swamp::_CPP_FLT_MAX_10_EXP_capture() # define FLT_MAX_10_EXP ::_C_legacy::_CPP_FLT_MAX_10_EXP_capture()
# undef DBL_MAX_10_EXP # undef DBL_MAX_10_EXP
# define DBL_MAX_10_EXP ::_C_Swamp::_CPP_DBL_MAX_10_EXP_capture() # define DBL_MAX_10_EXP ::_C_legacy::_CPP_DBL_MAX_10_EXP_capture()
# undef LDBL_MAX_10_EXP # undef LDBL_MAX_10_EXP
# define LDBL_MAX_10_EXP ::_C_Swamp::_CPP_LDBL_MAX_10_EXP_capture() # define LDBL_MAX_10_EXP ::_C_legacy::_CPP_LDBL_MAX_10_EXP_capture()
# undef FLT_MAX # undef FLT_MAX
# define FLT_MAX ::_C_Swamp::_CPP_FLT_MAX_capture() # define FLT_MAX ::_C_legacy::_CPP_FLT_MAX_capture()
# undef DBL_MAX # undef DBL_MAX
# define DBL_MAX ::_C_Swamp::_CPP_DBL_MAX_capture() # define DBL_MAX ::_C_legacy::_CPP_DBL_MAX_capture()
# undef LDBL_MAX # undef LDBL_MAX
# define LDBL_MAX ::_C_Swamp::_CPP_LDBL_MAX_capture() # define LDBL_MAX ::_C_legacy::_CPP_LDBL_MAX_capture()
# undef FLT_EPSILON # undef FLT_EPSILON
# define FLT_EPSILON ::_C_Swamp::_CPP_FLT_EPSILON_capture() # define FLT_EPSILON ::_C_legacy::_CPP_FLT_EPSILON_capture()
# undef DBL_EPSILON # undef DBL_EPSILON
# define DBL_EPSILON ::_C_Swamp::_CPP_DBL_EPSILON_capture() # define DBL_EPSILON ::_C_legacy::_CPP_DBL_EPSILON_capture()
# undef LDBL_EPSILON # undef LDBL_EPSILON
# define LDBL_EPSILON ::_C_Swamp::_CPP_LDBL_EPSILON_capture() # define LDBL_EPSILON ::_C_legacy::_CPP_LDBL_EPSILON_capture()
# undef FLT_MIN # undef FLT_MIN
# define FLT_MIN ::_C_Swamp::_CPP_FLT_MIN_capture() # define FLT_MIN ::_C_legacy::_CPP_FLT_MIN_capture()
# undef DBL_MIN # undef DBL_MIN
# define DBL_MIN ::_C_Swamp::_CPP_DBL_MIN_capture() # define DBL_MIN ::_C_legacy::_CPP_DBL_MIN_capture()
# undef LDBL_MIN # undef LDBL_MIN
# define LDBL_MIN ::_C_Swamp::_CPP_LDBL_MIN_capture() # define LDBL_MIN ::_C_legacy::_CPP_LDBL_MIN_capture()
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
namespace std { namespace std {
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
#ifndef _CPP_CLIMITS #ifndef _CPP_CLIMITS
#define _CPP_CLIMTIS 1 #define _CPP_CLIMTIS 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <limits.h> # include_next <limits.h>
} }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// Note: there is not much for this wrapper to do besides hiding // Note: there is not much for this wrapper to do besides hiding
// vendor-extension names and (perhaps) replacing one or other // vendor-extension names and (perhaps) replacing one or other
...@@ -53,12 +53,12 @@ ...@@ -53,12 +53,12 @@
namespace std { namespace std {
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
# include <bits/std_cstddef.h> /* pick up NULL */ # include <bits/std_cstddef.h> /* pick up NULL */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <locale.h> # include_next <locale.h>
} }
...@@ -54,56 +54,56 @@ ...@@ -54,56 +54,56 @@
const int _CPP_LC_MESSAGES_capture = LC_MESSAGES; const int _CPP_LC_MESSAGES_capture = LC_MESSAGES;
#endif #endif
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// # undef NULL // # undef NULL
// # define NULL 0 /* handled in <cstddef> */ // # define NULL 0 /* handled in <cstddef> */
# undef LC_ALL # undef LC_ALL
# define LC_ALL ::_C_Swamp::_CPP_LC_ALL_capture # define LC_ALL ::_C_legacy::_CPP_LC_ALL_capture
# undef LC_COLLATE # undef LC_COLLATE
# define LC_COLLATE ::_C_Swamp::_CPP_LC_COLLATE_capture # define LC_COLLATE ::_C_legacy::_CPP_LC_COLLATE_capture
# undef LC_CTYPE # undef LC_CTYPE
# define LC_CTYPE ::_C_Swamp::_CPP_LC_CTYPE_capture # define LC_CTYPE ::_C_legacy::_CPP_LC_CTYPE_capture
# undef LC_MONETARY # undef LC_MONETARY
# define LC_MONETARY ::_C_Swamp::_CPP_LC_MONETARY_capture # define LC_MONETARY ::_C_legacy::_CPP_LC_MONETARY_capture
# undef LC_NUMERIC # undef LC_NUMERIC
# define LC_NUMERIC ::_C_Swamp::_CPP_LC_NUMERIC_capture # define LC_NUMERIC ::_C_legacy::_CPP_LC_NUMERIC_capture
# undef LC_TIME # undef LC_TIME
# define LC_TIME ::_C_Swamp::_CPP_LC_TIME_capture # define LC_TIME ::_C_legacy::_CPP_LC_TIME_capture
#if 0 /* XXX need proper macro guard for this common extension. */ #if 0 /* XXX need proper macro guard for this common extension. */
# undef LC_MESSAGES # undef LC_MESSAGES
# define LC_MESSAGES ::_C_Swamp::_CPP_LC_MESSAGES_capture # define LC_MESSAGES ::_C_legacy::_CPP_LC_MESSAGES_capture
#endif #endif
# undef lconv # undef lconv
# undef setlocale # undef setlocale
# undef localeconv # undef localeconv
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
using ::_C_Swamp::setlocale; using ::_C_legacy::setlocale;
// note: still a POD type: // note: still a POD type:
struct lconv : ::_C_Swamp::_CPP_lconv_capture { }; struct lconv : ::_C_legacy::_CPP_lconv_capture { };
inline lconv* localeconv() inline lconv* localeconv()
{ return reinterpret_cast<lconv*>(::_C_Swamp::localeconv()); } { return reinterpret_cast<lconv*>(::_C_legacy::localeconv()); }
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
using ::std::lconv; using ::std::lconv;
using ::std::localeconv; using ::std::localeconv;
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif /* _CPP_CLOCALE */ #endif /* _CPP_CLOCALE */
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#ifndef _CPP_CMATH #ifndef _CPP_CMATH
#define _CPP_CMATH 1 #define _CPP_CMATH 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <math.h> # include_next <math.h>
} }
...@@ -70,11 +70,11 @@ ...@@ -70,11 +70,11 @@
inline double _CPP_fmod_capture(double __x, double __y) inline double _CPP_fmod_capture(double __x, double __y)
{ return fmod(__x, __y); } { return fmod(__x, __y); }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef HUGE_VAL # undef HUGE_VAL
# define HUGE_VAL ::_C_Swamp::_CPP_HUGE_VAL_capture() # define HUGE_VAL ::_C_legacy::_CPP_HUGE_VAL_capture()
# undef acos # undef acos
# undef asin # undef asin
# undef atan # undef atan
...@@ -98,88 +98,88 @@ ...@@ -98,88 +98,88 @@
# undef floor # undef floor
# undef fmod # undef fmod
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
inline double acos(double __x) inline double acos(double __x)
{ return ::_C_Swamp::_CPP_acos_capture(__x); } { return ::_C_legacy::_CPP_acos_capture(__x); }
inline double asin(double __x) inline double asin(double __x)
{ return ::_C_Swamp::_CPP_asin_capture(__x); } { return ::_C_legacy::_CPP_asin_capture(__x); }
inline double atan(double __x) inline double atan(double __x)
{ return ::_C_Swamp::_CPP_atan_capture(__x); } { return ::_C_legacy::_CPP_atan_capture(__x); }
inline double atan2(double __y, double __x) inline double atan2(double __y, double __x)
{ return ::_C_Swamp::_CPP_atan2_capture(__y,__x); } { return ::_C_legacy::_CPP_atan2_capture(__y,__x); }
inline double cos(double __x) inline double cos(double __x)
{ return ::_C_Swamp::_CPP_cos_capture(__x); } { return ::_C_legacy::_CPP_cos_capture(__x); }
inline double sin(double __x) inline double sin(double __x)
{ return ::_C_Swamp::_CPP_sin_capture(__x); } { return ::_C_legacy::_CPP_sin_capture(__x); }
inline double tan(double __x) inline double tan(double __x)
{ return ::_C_Swamp::_CPP_tan_capture(__x); } { return ::_C_legacy::_CPP_tan_capture(__x); }
inline double cosh(double __x) inline double cosh(double __x)
{ return ::_C_Swamp::_CPP_cosh_capture(__x); } { return ::_C_legacy::_CPP_cosh_capture(__x); }
inline double sinh(double __x) inline double sinh(double __x)
{ return ::_C_Swamp::_CPP_sinh_capture(__x); } { return ::_C_legacy::_CPP_sinh_capture(__x); }
inline double tanh(double __x) inline double tanh(double __x)
{ return ::_C_Swamp::_CPP_tanh_capture(__x); } { return ::_C_legacy::_CPP_tanh_capture(__x); }
inline double exp(double __x) inline double exp(double __x)
{ return ::_C_Swamp::_CPP_exp_capture(__x); } { return ::_C_legacy::_CPP_exp_capture(__x); }
inline double frexp(double __x, int* __exp) inline double frexp(double __x, int* __exp)
{ return ::_C_Swamp::_CPP_frexp_capture(__x, __exp); } { return ::_C_legacy::_CPP_frexp_capture(__x, __exp); }
inline double ldexp(double __x, int __exp) inline double ldexp(double __x, int __exp)
{ return ::_C_Swamp::_CPP_ldexp_capture(__x, __exp); } { return ::_C_legacy::_CPP_ldexp_capture(__x, __exp); }
inline double log(double __x) inline double log(double __x)
{ return ::_C_Swamp::_CPP_log_capture(__x); } { return ::_C_legacy::_CPP_log_capture(__x); }
inline double log10(double __x) inline double log10(double __x)
{ return ::_C_Swamp::_CPP_log10_capture(__x); } { return ::_C_legacy::_CPP_log10_capture(__x); }
inline double modf(double __x, double* __iptr) inline double modf(double __x, double* __iptr)
{ return ::_C_Swamp::_CPP_modf_capture(__x, __iptr); } { return ::_C_legacy::_CPP_modf_capture(__x, __iptr); }
inline double pow(double __x, double __y) inline double pow(double __x, double __y)
{ return ::_C_Swamp::_CPP_pow_capture(__x, __y); } { return ::_C_legacy::_CPP_pow_capture(__x, __y); }
inline double sqrt(double __x) inline double sqrt(double __x)
{ return ::_C_Swamp::_CPP_sqrt_capture(__x); } { return ::_C_legacy::_CPP_sqrt_capture(__x); }
inline double ceil(double __x) inline double ceil(double __x)
{ return ::_C_Swamp::_CPP_ceil_capture(__x); } { return ::_C_legacy::_CPP_ceil_capture(__x); }
inline double fabs(double __x) inline double fabs(double __x)
{ return ::_C_Swamp::_CPP_fabs_capture(__x); } { return ::_C_legacy::_CPP_fabs_capture(__x); }
inline double floor(double __x) inline double floor(double __x)
{ return ::_C_Swamp::_CPP_floor_capture(__x); } { return ::_C_legacy::_CPP_floor_capture(__x); }
inline double fmod(double __x, double __y) inline double fmod(double __x, double __y)
{ return ::_C_Swamp::_CPP_fmod_capture(__x, __y); } { return ::_C_legacy::_CPP_fmod_capture(__x, __y); }
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
using ::_C_Swamp::_C_Shadow::acos; using ::_C_legacy::_C_shadow::acos;
using ::_C_Swamp::_C_Shadow::asin; using ::_C_legacy::_C_shadow::asin;
using ::_C_Swamp::_C_Shadow::atan; using ::_C_legacy::_C_shadow::atan;
using ::_C_Swamp::_C_Shadow::atan2; using ::_C_legacy::_C_shadow::atan2;
using ::_C_Swamp::_C_Shadow::cos; using ::_C_legacy::_C_shadow::cos;
using ::_C_Swamp::_C_Shadow::sin; using ::_C_legacy::_C_shadow::sin;
using ::_C_Swamp::_C_Shadow::tan; using ::_C_legacy::_C_shadow::tan;
using ::_C_Swamp::_C_Shadow::cosh; using ::_C_legacy::_C_shadow::cosh;
using ::_C_Swamp::_C_Shadow::sinh; using ::_C_legacy::_C_shadow::sinh;
using ::_C_Swamp::_C_Shadow::tanh; using ::_C_legacy::_C_shadow::tanh;
using ::_C_Swamp::_C_Shadow::exp; using ::_C_legacy::_C_shadow::exp;
using ::_C_Swamp::_C_Shadow::frexp; using ::_C_legacy::_C_shadow::frexp;
using ::_C_Swamp::_C_Shadow::ldexp; using ::_C_legacy::_C_shadow::ldexp;
using ::_C_Swamp::_C_Shadow::log; using ::_C_legacy::_C_shadow::log;
using ::_C_Swamp::_C_Shadow::log10; using ::_C_legacy::_C_shadow::log10;
using ::_C_Swamp::_C_Shadow::modf; using ::_C_legacy::_C_shadow::modf;
using ::_C_Swamp::_C_Shadow::pow; using ::_C_legacy::_C_shadow::pow;
using ::_C_Swamp::_C_Shadow::sqrt; using ::_C_legacy::_C_shadow::sqrt;
using ::_C_Swamp::_C_Shadow::ceil; using ::_C_legacy::_C_shadow::ceil;
using ::_C_Swamp::_C_Shadow::fabs; using ::_C_legacy::_C_shadow::fabs;
using ::_C_Swamp::_C_Shadow::floor; using ::_C_legacy::_C_shadow::floor;
using ::_C_Swamp::_C_Shadow::fmod; using ::_C_legacy::_C_shadow::fmod;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -34,42 +34,42 @@ ...@@ -34,42 +34,42 @@
#ifndef _CPP_CSETJMP #ifndef _CPP_CSETJMP
#define _CPP_CSETJMP 1 #define _CPP_CSETJMP 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <setjmp.h> # include_next <setjmp.h>
} }
typedef jmp_buf _CPP_jmp_buf_capture; typedef jmp_buf _CPP_jmp_buf_capture;
inline int _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); } inline int _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef jmp_buf # undef jmp_buf
# undef setjmp # undef setjmp
# define setjmp(__jb) ::_C_Swamp::_CPP_setjmp_capture(__jb) # define setjmp(__jb) ::_C_legacy::_CPP_setjmp_capture(__jb)
# undef longjmp # undef longjmp
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
typedef ::_C_Swamp::_CPP_jmp_buf_capture jmp_buf; typedef ::_C_legacy::_CPP_jmp_buf_capture jmp_buf;
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
using ::_C_Swamp::_C_Shadow::jmp_buf; using ::_C_legacy::_C_shadow::jmp_buf;
using ::_C_Swamp::longjmp; using ::_C_legacy::longjmp;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#ifndef _CPP_CSIGNAL #ifndef _CPP_CSIGNAL
#define _CPP_CSIGNAL 1 #define _CPP_CSIGNAL 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <signal.h> # include_next <signal.h>
typedef void (*_CPP_CSIGFUN_capture)(int); // a C function pointer typedef void (*_CPP_CSIGFUN_capture)(int); // a C function pointer
...@@ -52,60 +52,60 @@ ...@@ -52,60 +52,60 @@
const int _CPP_SIGSEGV_capture = SIGSEGV; const int _CPP_SIGSEGV_capture = SIGSEGV;
const int _CPP_SIGTERM_capture = SIGTERM; const int _CPP_SIGTERM_capture = SIGTERM;
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef sig_atomic_t # undef sig_atomic_t
# undef raise # undef raise
# undef signal # undef signal
# undef SIG_DFL # undef SIG_DFL
# define SIG_DFL \ # define SIG_DFL \
reinterpret_cast<void (*)(int)>(::_C_Swamp::_CPP_SIG_DFL_capture) reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_DFL_capture)
# undef SIG_ERR # undef SIG_ERR
# define SIG_ERR \ # define SIG_ERR \
reinterpret_cast<void (*)(int)>(::_C_Swamp::_CPP_SIG_ERR_capture) reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_ERR_capture)
# undef SIG_IGN # undef SIG_IGN
# define SIG_IGN \ # define SIG_IGN \
reinterpret_cast<void (*)(int)>(::_C_Swamp::_CPP_SIG_IGN_capture) reinterpret_cast<void (*)(int)>(::_C_legacy::_CPP_SIG_IGN_capture)
# undef SIGABRT # undef SIGABRT
# define SIGABRT ::_C_Swamp::_CPP_SIGABRT_capture # define SIGABRT ::_C_legacy::_CPP_SIGABRT_capture
# undef SIGFPE # undef SIGFPE
# define SIGFPE ::_C_Swamp::_CPP_SIGFPE_capture # define SIGFPE ::_C_legacy::_CPP_SIGFPE_capture
# undef SIGILL # undef SIGILL
# define SIGILL ::_C_Swamp::_CPP_SIGILL_capture # define SIGILL ::_C_legacy::_CPP_SIGILL_capture
# undef SIGINT # undef SIGINT
# define SIGINT ::_C_Swamp::_CPP_SIGINT_capture # define SIGINT ::_C_legacy::_CPP_SIGINT_capture
# undef SIGSEGV # undef SIGSEGV
# define SIGSEGV ::_C_Swamp::_CPP_SIGSEGV_capture # define SIGSEGV ::_C_legacy::_CPP_SIGSEGV_capture
# undef SIGTERM # undef SIGTERM
# define SIGTERM ::_C_Swamp::_CPP_SIGTERM_capture # define SIGTERM ::_C_legacy::_CPP_SIGTERM_capture
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
typedef ::_C_Swamp::_CPP_sig_atomic_t_capture sig_atomic_t; typedef ::_C_legacy::_CPP_sig_atomic_t_capture sig_atomic_t;
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
using ::_C_Swamp::_C_Shadow::sig_atomic_t; using ::_C_legacy::_C_shadow::sig_atomic_t;
using ::_C_Swamp::raise; using ::_C_legacy::raise;
inline void (*signal(int __sig, void (* __fun)(int)))(int) inline void (*signal(int __sig, void (* __fun)(int)))(int)
{ return reinterpret_cast<void (*)(int)>( { return reinterpret_cast<void (*)(int)>(
::_C_Swamp::signal(__sig, ::_C_legacy::signal(__sig,
reinterpret_cast< ::_C_Swamp::_CPP_CSIGFUN_capture>(__fun))); reinterpret_cast< ::_C_legacy::_CPP_CSIGFUN_capture>(__fun)));
} }
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
using ::std::signal; using ::std::signal;
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -34,9 +34,9 @@ ...@@ -34,9 +34,9 @@
#ifndef _CPP_CSTDARG #ifndef _CPP_CSTDARG
#define _CPP_CSTDARG 1 #define _CPP_CSTDARG 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <stdarg.h> # include_next <stdarg.h>
} }
...@@ -60,41 +60,41 @@ ...@@ -60,41 +60,41 @@
// typedef size_t _CPP_size_t_capture; // handled in <cstddef> // typedef size_t _CPP_size_t_capture; // handled in <cstddef>
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# ifdef __GNUC__ # ifdef __GNUC__
# undef va_list # undef va_list
using _C_Swamp::__gnuc_va_list; using _C_legacy::__gnuc_va_list;
# elif /* probably must be tailored for each compiler, as above. */ # elif /* probably must be tailored for each compiler, as above. */
# undef va_list # undef va_list
# undef va_start # undef va_start
# define va_start(a,b) ::_C_Swamp::_CPP_va_start_capture(a,b) # define va_start(a,b) ::_C_legacy::_CPP_va_start_capture(a,b)
# undef va_arg # undef va_arg
# define va_arg(a,b) ::_C_Swamp::_CPP_va_arg_capture<b>(a) # define va_arg(a,b) ::_C_legacy::_CPP_va_arg_capture<b>(a)
# undef va_end # undef va_end
# define va_end(a) ::_C_Swamp::_CPP_va_end_capture(a) # define va_end(a) ::_C_legacy::_CPP_va_end_capture(a)
# endif # endif
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
typedef ::_C_Swamp::_CPP_va_list_capture va_list; typedef ::_C_legacy::_CPP_va_list_capture va_list;
} }
} }
namespace std { namespace std {
using ::_C_Swamp::_C_Shadow::va_list; using ::_C_legacy::_C_shadow::va_list;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -34,17 +34,17 @@ ...@@ -34,17 +34,17 @@
#ifndef _CPP_CSTDDEF #ifndef _CPP_CSTDDEF
#define _CPP_CSTDDEF 1 #define _CPP_CSTDDEF 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <stddef.h> # include_next <stddef.h>
} }
typedef ptrdiff_t _CPP_ptrdiff_t_capture; typedef ptrdiff_t _CPP_ptrdiff_t_capture;
typedef size_t _CPP_size_t_capture; typedef size_t _CPP_size_t_capture;
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef ptrdiff_t # undef ptrdiff_t
# undef size_t # undef size_t
...@@ -53,26 +53,26 @@ ...@@ -53,26 +53,26 @@
# define NULL 0 # define NULL 0
// # undef offsetof // # undef offsetof
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
typedef ::_C_Swamp::_CPP_ptrdiff_t_capture ptrdiff_t; typedef ::_C_legacy::_CPP_ptrdiff_t_capture ptrdiff_t;
typedef ::_C_Swamp::_CPP_size_t_capture size_t; typedef ::_C_legacy::_CPP_size_t_capture size_t;
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
using ::_C_Swamp::_C_Shadow::ptrdiff_t; using ::_C_legacy::_C_shadow::ptrdiff_t;
using ::_C_Swamp::_C_Shadow::size_t; using ::_C_legacy::_C_shadow::size_t;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
# include <bits/std_cstddef.h> /* pick up size_t, NULL */ # include <bits/std_cstddef.h> /* pick up size_t, NULL */
# include <bits/std_cstdarg.h> /* pick up va_list, va_start, va_end */ # include <bits/std_cstdarg.h> /* pick up va_list, va_start, va_end */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <stdio.h> # include_next <stdio.h>
} }
...@@ -77,38 +77,38 @@ ...@@ -77,38 +77,38 @@
inline int _CPP_putchar_capture(int __c) { return putchar(__c); } inline int _CPP_putchar_capture(int __c) { return putchar(__c); }
inline int _CPP_feof_capture(FILE* __f) { return feof(__f); } inline int _CPP_feof_capture(FILE* __f) { return feof(__f); }
namespace _C_Shadow { namespace _C_shadow {
} }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// # undef size_t /* handled in <cstddef> */ // # undef size_t /* handled in <cstddef> */
# undef FILE # undef FILE
# undef fpos_t # undef fpos_t
# undef _IOFBF # undef _IOFBF
# define _IOFBF ::_C_Swamp::_CPP__IOFBF_capture # define _IOFBF ::_C_legacy::_CPP__IOFBF_capture
# undef _IOLBF # undef _IOLBF
# define _IOLBF ::_C_Swamp::_CPP__IOLBF_capture # define _IOLBF ::_C_legacy::_CPP__IOLBF_capture
# undef _IONBF # undef _IONBF
# define _IONBF ::_C_Swamp::_CPP__IONBF_capture # define _IONBF ::_C_legacy::_CPP__IONBF_capture
# undef BUFSIZ # undef BUFSIZ
# define BUFSIZ ::_C_Swamp::_CPP_BUFSIZ_capture # define BUFSIZ ::_C_legacy::_CPP_BUFSIZ_capture
# undef EOF # undef EOF
# define EOF ::_C_Swamp::_CPP_EOF_capture # define EOF ::_C_legacy::_CPP_EOF_capture
# undef FOPEN_MAX # undef FOPEN_MAX
# define FOPEN_MAX ::_C_Swamp::_CPP_FOPEN_MAX_capture # define FOPEN_MAX ::_C_legacy::_CPP_FOPEN_MAX_capture
# undef FILENAME_MAX # undef FILENAME_MAX
# define FILENAME_MAX ::_C_Swamp::_CPP_FILENAME_MAX_capture # define FILENAME_MAX ::_C_legacy::_CPP_FILENAME_MAX_capture
# undef L_tmpnam # undef L_tmpnam
# define L_tmpnam ::_C_Swamp::_CPP_L_tmpnam_capture # define L_tmpnam ::_C_legacy::_CPP_L_tmpnam_capture
# undef SEEK_CUR # undef SEEK_CUR
# define SEEK_CUR ::_C_Swamp::_CPP_SEEK_CUR_capture # define SEEK_CUR ::_C_legacy::_CPP_SEEK_CUR_capture
# undef SEEK_END # undef SEEK_END
# define SEEK_END ::_C_Swamp::_CPP_SEEK_END_capture # define SEEK_END ::_C_legacy::_CPP_SEEK_END_capture
# undef SEEK_SET # undef SEEK_SET
# define SEEK_SET ::_C_Swamp::_CPP_SEEK_SET_capture # define SEEK_SET ::_C_legacy::_CPP_SEEK_SET_capture
# undef TMP_MAX # undef TMP_MAX
# define TMP_MAX ::_C_Swamp::_CPP_TMP_MAX_capture # define TMP_MAX ::_C_legacy::_CPP_TMP_MAX_capture
# undef remove # undef remove
# undef rename # undef rename
...@@ -152,157 +152,157 @@ ...@@ -152,157 +152,157 @@
# undef ferror # undef ferror
# undef perror # undef perror
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
struct FILE : ::_C_Swamp::_CPP_FILE_capture { }; struct FILE : ::_C_legacy::_CPP_FILE_capture { };
struct fpos_t { ::_C_Swamp::_CPP_fpos_t_capture _M_dummy; }; struct fpos_t { ::_C_legacy::_CPP_fpos_t_capture _M_dummy; };
inline FILE* _CPP_stderr() inline FILE* _CPP_stderr()
{ return reinterpret_cast<FILE*>( ::_C_Swamp::_CPP_stderr_capture() ); } { return reinterpret_cast<FILE*>( ::_C_legacy::_CPP_stderr_capture() ); }
inline FILE* _CPP_stdin() inline FILE* _CPP_stdin()
{ return reinterpret_cast<FILE*>( ::_C_Swamp::_CPP_stdin_capture() ); } { return reinterpret_cast<FILE*>( ::_C_legacy::_CPP_stdin_capture() ); }
inline FILE* _CPP_stdout() inline FILE* _CPP_stdout()
{ return reinterpret_cast<FILE*>( ::_C_Swamp::_CPP_stdout_capture() ); } { return reinterpret_cast<FILE*>( ::_C_legacy::_CPP_stdout_capture() ); }
using ::_C_Swamp::remove; using ::_C_legacy::remove;
using ::_C_Swamp::rename; using ::_C_legacy::rename;
inline FILE* inline FILE*
tmpfile() { return reinterpret_cast<FILE*>(::_C_Swamp::tmpfile()); } tmpfile() { return reinterpret_cast<FILE*>(::_C_legacy::tmpfile()); }
using ::_C_Swamp::tmpnam; using ::_C_legacy::tmpnam;
inline int inline int
fclose(FILE* __f) { return ::_C_Swamp::fclose(__f); } fclose(FILE* __f) { return ::_C_legacy::fclose(__f); }
inline int inline int
fflush(FILE* __f) { return ::_C_Swamp::fflush(__f); } fflush(FILE* __f) { return ::_C_legacy::fflush(__f); }
inline FILE* inline FILE*
fopen(char const* __name, char const* __mode) fopen(char const* __name, char const* __mode)
{ return reinterpret_cast<FILE*>(::_C_Swamp::fopen(__name,__mode)); } { return reinterpret_cast<FILE*>(::_C_legacy::fopen(__name,__mode)); }
inline FILE* inline FILE*
freopen(char const* __name, char const* __mode, FILE* __f) freopen(char const* __name, char const* __mode, FILE* __f)
{ return reinterpret_cast<FILE*>( { return reinterpret_cast<FILE*>(
::_C_Swamp::freopen(__name,__mode,__f)); } ::_C_legacy::freopen(__name,__mode,__f)); }
inline void inline void
setbuf(FILE* __f, char* __buf) setbuf(FILE* __f, char* __buf)
{ return ::_C_Swamp::setbuf(__f, __buf); } { return ::_C_legacy::setbuf(__f, __buf); }
inline int inline int
setvbuf(FILE* __f, char* __buf, int __mode, size_t __size) setvbuf(FILE* __f, char* __buf, int __mode, size_t __size)
{ return ::_C_Swamp::setvbuf(__f, __buf, __mode, __size); } { return ::_C_legacy::setvbuf(__f, __buf, __mode, __size); }
inline int inline int
fprintf(FILE* __f, char const* __fmt, ...) fprintf(FILE* __f, char const* __fmt, ...)
{ va_list __v; va_start(__v,__fmt); { va_list __v; va_start(__v,__fmt);
int __i = ::_C_Swamp::vfprintf(__f, __fmt, __v); va_end(__v); int __i = ::_C_legacy::vfprintf(__f, __fmt, __v); va_end(__v);
return __i; } return __i; }
inline int inline int
fscanf(FILE* __f, char const* __fmt, ...) fscanf(FILE* __f, char const* __fmt, ...)
{ va_list __v; va_start(__v,__fmt); { va_list __v; va_start(__v,__fmt);
int __i = ::_C_Swamp::vfscanf(__f, __fmt, __v); va_end(__v); int __i = ::_C_legacy::vfscanf(__f, __fmt, __v); va_end(__v);
return __i; } return __i; }
using ::_C_Swamp::printf; using ::_C_legacy::printf;
using ::_C_Swamp::scanf; using ::_C_legacy::scanf;
using ::_C_Swamp::sprintf; using ::_C_legacy::sprintf;
using ::_C_Swamp::sscanf; using ::_C_legacy::sscanf;
// using ::_C_Swamp::vfprintf; // using ::_C_legacy::vfprintf;
inline int inline int
vfprintf(FILE* __f, char const* __fmt, va_list __v) vfprintf(FILE* __f, char const* __fmt, va_list __v)
{ return ::_C_Swamp::vfprintf(__f, __fmt, __v); } { return ::_C_legacy::vfprintf(__f, __fmt, __v); }
inline int inline int
vprintf(char const* __fmt, va_list __v) vprintf(char const* __fmt, va_list __v)
{ return ::_C_Swamp::vprintf(__fmt, __v); } { return ::_C_legacy::vprintf(__fmt, __v); }
inline int inline int
vsprintf(char* __buf, char const* __fmt, va_list __v) vsprintf(char* __buf, char const* __fmt, va_list __v)
{ return ::_C_Swamp::vsprintf(__buf, __fmt, __v); } { return ::_C_legacy::vsprintf(__buf, __fmt, __v); }
inline int inline int
fgetc(FILE* __f) { return ::_C_Swamp::fgetc(__f); } fgetc(FILE* __f) { return ::_C_legacy::fgetc(__f); }
// using ::_C_Swamp::fgets; // using ::_C_legacy::fgets;
inline char* inline char*
fgets(char* __buf, int __n, FILE* __f) fgets(char* __buf, int __n, FILE* __f)
{ return ::_C_Swamp::fgets(__buf, __n, __f); } { return ::_C_legacy::fgets(__buf, __n, __f); }
inline int inline int
fputc(int __c, FILE* __f) { return ::_C_Swamp::fputc(__c, __f); } fputc(int __c, FILE* __f) { return ::_C_legacy::fputc(__c, __f); }
inline int inline int
fputs(char const* __s, FILE* __f) fputs(char const* __s, FILE* __f)
{ return ::_C_Swamp::fputs(__s, __f); } { return ::_C_legacy::fputs(__s, __f); }
inline int inline int
getc(FILE* __f) { return ::_C_Swamp::_CPP_getc_capture(__f); } getc(FILE* __f) { return ::_C_legacy::_CPP_getc_capture(__f); }
inline int inline int
getchar() { return ::_C_Swamp::_CPP_getchar_capture(); } getchar() { return ::_C_legacy::_CPP_getchar_capture(); }
using ::_C_Swamp::gets; using ::_C_legacy::gets;
inline int inline int
putc(int __c, FILE* __f) putc(int __c, FILE* __f)
{ return ::_C_Swamp::_CPP_putc_capture(__c, __f); } { return ::_C_legacy::_CPP_putc_capture(__c, __f); }
inline int inline int
putchar(int __c) { return ::_C_Swamp::_CPP_putchar_capture(__c); } putchar(int __c) { return ::_C_legacy::_CPP_putchar_capture(__c); }
using ::_C_Swamp::puts; using ::_C_legacy::puts;
// using ::_C_Swamp::ungetc; // using ::_C_legacy::ungetc;
inline int inline int
ungetc(int __c, FILE* __f) { return ::_C_Swamp::ungetc(__c, __f); } ungetc(int __c, FILE* __f) { return ::_C_legacy::ungetc(__c, __f); }
inline size_t inline size_t
fread(void* __p, size_t __z, size_t __n, FILE* __f) fread(void* __p, size_t __z, size_t __n, FILE* __f)
{ return ::_C_Swamp::fread(__p,__z,__n,__f); } { return ::_C_legacy::fread(__p,__z,__n,__f); }
inline size_t inline size_t
fwrite(void const* __p, size_t __z, size_t __n, FILE* __f) fwrite(void const* __p, size_t __z, size_t __n, FILE* __f)
{ return ::_C_Swamp::fwrite(__p,__z,__n,__f); } { return ::_C_legacy::fwrite(__p,__z,__n,__f); }
inline int inline int
fgetpos(FILE* __f, fpos_t* __pos) fgetpos(FILE* __f, fpos_t* __pos)
{ return ::_C_Swamp::fgetpos(__f,&__pos->_M_dummy); } { return ::_C_legacy::fgetpos(__f,&__pos->_M_dummy); }
inline int inline int
fseek(FILE* __f, long __off, int __how) fseek(FILE* __f, long __off, int __how)
{ return ::_C_Swamp::fseek(__f,__off,__how); } { return ::_C_legacy::fseek(__f,__off,__how); }
inline int inline int
fsetpos(FILE* __f, fpos_t const* __pos) fsetpos(FILE* __f, fpos_t const* __pos)
{ return ::_C_Swamp::fsetpos(__f,&__pos->_M_dummy); } { return ::_C_legacy::fsetpos(__f,&__pos->_M_dummy); }
inline long inline long
ftell(FILE* __f) { return ::_C_Swamp::ftell(__f); } ftell(FILE* __f) { return ::_C_legacy::ftell(__f); }
inline void inline void
rewind(FILE* __f) { return ::_C_Swamp::rewind(__f); } rewind(FILE* __f) { return ::_C_legacy::rewind(__f); }
inline void inline void
clearerr(FILE* __f) { return ::_C_Swamp::clearerr(__f); } clearerr(FILE* __f) { return ::_C_legacy::clearerr(__f); }
inline int inline int
feof(FILE* __f) { return ::_C_Swamp::_CPP_feof_capture(__f); } feof(FILE* __f) { return ::_C_legacy::_CPP_feof_capture(__f); }
inline int inline int
ferror(FILE* __f) { return ::_C_Swamp::ferror(__f); } ferror(FILE* __f) { return ::_C_legacy::ferror(__f); }
using ::_C_Swamp::perror; using ::_C_legacy::perror;
} // close namespace std:: } // close namespace std::
...@@ -313,8 +313,8 @@ ...@@ -313,8 +313,8 @@
# undef stdout # undef stdout
# define stdout ::std::_CPP_stdout() # define stdout ::std::_CPP_stdout()
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
using ::std::FILE; using ::std::FILE;
using ::std::fpos_t; using ::std::fpos_t;
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
# include <bits/std_cstddef.h> /* pick up NULL, size_t */ # include <bits/std_cstddef.h> /* pick up NULL, size_t */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <stdlib.h> # include_next <stdlib.h>
typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr
...@@ -56,9 +56,9 @@ ...@@ -56,9 +56,9 @@
typedef div_t _CPP_div_t_capture; typedef div_t _CPP_div_t_capture;
typedef ldiv_t _CPP_ldiv_t_capture; typedef ldiv_t _CPP_ldiv_t_capture;
namespace _C_Shadow { namespace _C_shadow {
} }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef size_t # undef size_t
# undef wchar_t # undef wchar_t
...@@ -69,13 +69,13 @@ ...@@ -69,13 +69,13 @@
// # undef NULL // # undef NULL
// # define NULL 0 // # define NULL 0
# undef EXIT_SUCCESS # undef EXIT_SUCCESS
# define EXIT_SUCCESS (::_C_Swamp::_CPP_EXIT_SUCCESS_capture) # define EXIT_SUCCESS (::_C_legacy::_CPP_EXIT_SUCCESS_capture)
# undef EXIT_FAILURE # undef EXIT_FAILURE
# define EXIT_FAILURE (::_C_Swamp::_CPP_EXIT_FAILURE_capture) # define EXIT_FAILURE (::_C_legacy::_CPP_EXIT_FAILURE_capture)
# undef RAND_MAX # undef RAND_MAX
# define RAND_MAX (::_C_Swamp::_CPP_RAND_MAX_capture) # define RAND_MAX (::_C_legacy::_CPP_RAND_MAX_capture)
# undef MB_CUR_MAX # undef MB_CUR_MAX
# define MB_CUR_MAX (::_C_Swamp::_CPP_MB_CUR_MAX_capture()) # define MB_CUR_MAX (::_C_legacy::_CPP_MB_CUR_MAX_capture())
# undef atof # undef atof
# undef atoi # undef atoi
...@@ -106,39 +106,39 @@ ...@@ -106,39 +106,39 @@
# undef mbstowcs # undef mbstowcs
# undef wcstombs # undef wcstombs
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// these come from <cstddef> // these come from <cstddef>
// typedef ::_C_Swamp::_CPP_size_t_capture size_t; // typedef ::_C_legacy::_CPP_size_t_capture size_t;
// typedef ::_C_Swamp::_CPP_wchar_t_capture wchar_t; // typedef ::_C_legacy::_CPP_wchar_t_capture wchar_t;
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
// using ::_C_Swamp::_C_Shadow::size_t; // using ::_C_legacy::_C_shadow::size_t;
// using ::_C_Swamp::_C_Shadow::wchar_t; // using ::_C_legacy::_C_shadow::wchar_t;
typedef ::_C_Swamp::_CPP_div_t_capture _CPP_div_t; typedef ::_C_legacy::_CPP_div_t_capture _CPP_div_t;
struct div_t : _CPP_div_t {}; struct div_t : _CPP_div_t {};
typedef ::_C_Swamp::_CPP_ldiv_t_capture _CPP_ldiv_t; typedef ::_C_legacy::_CPP_ldiv_t_capture _CPP_ldiv_t;
struct ldiv_t : _CPP_ldiv_t {}; struct ldiv_t : _CPP_ldiv_t {};
// note: div_t and ldiv_t are still POD types // note: div_t and ldiv_t are still POD types
// EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, MB_CUR_MAX, NULL // EXIT_SUCCESS, EXIT_FAILURE, RAND_MAX, MB_CUR_MAX, NULL
using ::_C_Swamp::atof; using ::_C_legacy::atof;
using ::_C_Swamp::atoi; using ::_C_legacy::atoi;
using ::_C_Swamp::atol; using ::_C_legacy::atol;
using ::_C_Swamp::strtod; using ::_C_legacy::strtod;
using ::_C_Swamp::strtol; using ::_C_legacy::strtol;
using ::_C_Swamp::strtoul; using ::_C_legacy::strtoul;
using ::_C_Swamp::rand; using ::_C_legacy::rand;
using ::_C_Swamp::srand; using ::_C_legacy::srand;
using ::_C_Swamp::calloc; using ::_C_legacy::calloc;
using ::_C_Swamp::free; using ::_C_legacy::free;
using ::_C_Swamp::malloc; using ::_C_legacy::malloc;
using ::_C_Swamp::realloc; using ::_C_legacy::realloc;
void abort(); // XXX must define this correctly for C++. void abort(); // XXX must define this correctly for C++.
#define _FUN_OVERLOAD_BUG #define _FUN_OVERLOAD_BUG
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
// but not if declared void f(int (*)(void)). // but not if declared void f(int (*)(void)).
#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG) #if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
using ::_C_Swamp::atexit; // XXX must redefine this one! using ::_C_legacy::atexit; // XXX must redefine this one!
#endif #endif
int atexit(void (*)()); // XXX must define this. int atexit(void (*)()); // XXX must define this.
// More precisely, we need an extern "C" atexit() that // More precisely, we need an extern "C" atexit() that
...@@ -156,30 +156,30 @@ ...@@ -156,30 +156,30 @@
// be marked to be called using the proper convention. // be marked to be called using the proper convention.
void exit(int __i) // XXX must define correctly for C++, like atexit(). void exit(int __i) // XXX must define correctly for C++, like atexit().
{ ::_C_Swamp::exit(__i); } { ::_C_legacy::exit(__i); }
using ::_C_Swamp::getenv; using ::_C_legacy::getenv;
using ::_C_Swamp::system; using ::_C_legacy::system;
// XXX note that the raw conversion between C and C++ function // XXX note that the raw conversion between C and C++ function
// pointers may not be portable to some targets; those targets need // pointers may not be portable to some targets; those targets need
// a forwarding function. // a forwarding function.
#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG) #if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
using ::_C_Swamp::bsearch; // overload using ::_C_legacy::bsearch; // overload
#endif #endif
inline void* bsearch(const void* __key, const void* __base, size_t __n, inline void* bsearch(const void* __key, const void* __base, size_t __n,
size_t __size, int (*__cmp)(const void*, const void*)) size_t __size, int (*__cmp)(const void*, const void*))
{ return ::_C_Swamp::bsearch(__key,__base,__n,__size, { return ::_C_legacy::bsearch(__key,__base,__n,__size,
reinterpret_cast< ::_C_Swamp::_C_cmp_fun_ptr>(__cmp)); } // XXX reinterpret_cast< ::_C_legacy::_C_cmp_fun_ptr>(__cmp)); } // XXX
#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG) #if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
using ::_C_Swamp::qsort; // overload using ::_C_legacy::qsort; // overload
#endif #endif
inline void qsort(void* __base, size_t __n, size_t __size, inline void qsort(void* __base, size_t __n, size_t __size,
int (*__cmp)(const void*, const void*)) int (*__cmp)(const void*, const void*))
{ return ::_C_Swamp::qsort(__base,__n,__size, { return ::_C_legacy::qsort(__base,__n,__size,
reinterpret_cast< ::_C_Swamp::_C_cmp_fun_ptr>(__cmp)); } // XXX reinterpret_cast< ::_C_legacy::_C_cmp_fun_ptr>(__cmp)); } // XXX
inline int abs(int __x) inline int abs(int __x)
...@@ -191,16 +191,16 @@ ...@@ -191,16 +191,16 @@
inline ldiv_t ldiv(long __num, long __den) inline ldiv_t ldiv(long __num, long __den)
{ _ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; } { _ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
using ::_C_Swamp::mblen; using ::_C_legacy::mblen;
using ::_C_Swamp::mbtowc;; using ::_C_legacy::mbtowc;;
using ::_C_Swamp::wctomb; using ::_C_legacy::wctomb;
using ::_C_Swamp::mbstowcs; using ::_C_legacy::mbstowcs;
using ::_C_Swamp::wcstombs; using ::_C_legacy::wcstombs;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
using ::std::div_t; using ::std::div_t;
using ::std::ldiv_t; using ::std::ldiv_t;
...@@ -216,7 +216,7 @@ ...@@ -216,7 +216,7 @@
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
# include <bits/std_cstddef.h> /* pick up size_t, NULL */ # include <bits/std_cstddef.h> /* pick up size_t, NULL */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <string.h> # include_next <string.h>
} }
...@@ -100,8 +100,8 @@ ...@@ -100,8 +100,8 @@
inline size_t _CPP_strlen_capture(char const* __s) inline size_t _CPP_strlen_capture(char const* __s)
{ return strlen(__s); } { return strlen(__s); }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// size_t, NULL // size_t, NULL
# undef memcpy # undef memcpy
...@@ -127,8 +127,8 @@ ...@@ -127,8 +127,8 @@
# undef strerror # undef strerror
# undef strlen # undef strlen
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
namespace std { namespace std {
...@@ -137,75 +137,75 @@ ...@@ -137,75 +137,75 @@
// C++ definition differs from C in some cases. // C++ definition differs from C in some cases.
inline void* memcpy(void* __s1, void const* __s2, size_t __n) inline void* memcpy(void* __s1, void const* __s2, size_t __n)
{ return ::_C_Swamp::_CPP_memcpy_capture(__s1,__s2,__n); } { return ::_C_legacy::_CPP_memcpy_capture(__s1,__s2,__n); }
inline void* memmove(void* __s1, void const* __s2, size_t __n) inline void* memmove(void* __s1, void const* __s2, size_t __n)
{ return ::_C_Swamp::_CPP_memmove_capture(__s1,__s2,__n); } { return ::_C_legacy::_CPP_memmove_capture(__s1,__s2,__n); }
inline void* strcpy(char* __s1, char const* __s2) inline void* strcpy(char* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strcpy_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strcpy_capture(__s1,__s2); }
inline char* strncpy(char* __s1, char const* __s2, size_t __n) inline char* strncpy(char* __s1, char const* __s2, size_t __n)
{ return ::_C_Swamp::_CPP_strncpy_capture(__s1,__s2,__n); } { return ::_C_legacy::_CPP_strncpy_capture(__s1,__s2,__n); }
inline char* strcat(char* __s1, char const* __s2) inline char* strcat(char* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strcat_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strcat_capture(__s1,__s2); }
inline char* strncat(char* __s1, char const* __s2, size_t __n) inline char* strncat(char* __s1, char const* __s2, size_t __n)
{ return ::_C_Swamp::_CPP_strncat_capture(__s1,__s2,__n); } { return ::_C_legacy::_CPP_strncat_capture(__s1,__s2,__n); }
inline int memcmp(void const* __s1, inline int memcmp(void const* __s1,
void const* __s2, size_t __n) void const* __s2, size_t __n)
{ return ::_C_Swamp::_CPP_memcmp_capture(__s1,__s2,__n); } { return ::_C_legacy::_CPP_memcmp_capture(__s1,__s2,__n); }
inline int strcmp(char const* __s1, char const* __s2) inline int strcmp(char const* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strcmp_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strcmp_capture(__s1,__s2); }
inline int strcoll(char const* __s1, char const* __s2) inline int strcoll(char const* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strcoll_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strcoll_capture(__s1,__s2); }
inline int strncmp(char const* __s1, inline int strncmp(char const* __s1,
char const* __s2, size_t __n) char const* __s2, size_t __n)
{ return ::_C_Swamp::_CPP_strncmp_capture(__s1,__s2,__n); } { return ::_C_legacy::_CPP_strncmp_capture(__s1,__s2,__n); }
inline size_t strxfrm(char* __b, char const* __s, size_t __n) inline size_t strxfrm(char* __b, char const* __s, size_t __n)
{ return ::_C_Swamp::_CPP_strxfrm_capture(__b,__s,__n); } { return ::_C_legacy::_CPP_strxfrm_capture(__b,__s,__n); }
inline void const* memchr(void const* __s1, int __c, size_t __n) inline void const* memchr(void const* __s1, int __c, size_t __n)
{ return ::_C_Swamp::_CPP_memchr_capture(__s1,__c,__n); } { return ::_C_legacy::_CPP_memchr_capture(__s1,__c,__n); }
inline void* memchr( void* __s1, int __c, size_t __n) inline void* memchr( void* __s1, int __c, size_t __n)
{ return ::_C_Swamp::_CPP_memchr_capture(__s1,__c,__n); } { return ::_C_legacy::_CPP_memchr_capture(__s1,__c,__n); }
inline char const* strchr(char const* __s1, int __c) inline char const* strchr(char const* __s1, int __c)
{ return ::_C_Swamp::_CPP_strchr_capture(__s1,__c); } { return ::_C_legacy::_CPP_strchr_capture(__s1,__c); }
inline char* strchr( char* __s1, int __c) inline char* strchr( char* __s1, int __c)
{ return ::_C_Swamp::_CPP_strchr_capture(__s1,__c); } { return ::_C_legacy::_CPP_strchr_capture(__s1,__c); }
inline size_t strcspn(char const* __s1, char const* __s2) inline size_t strcspn(char const* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strcspn_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strcspn_capture(__s1,__s2); }
inline char const* strpbrk(char const* __s1, char const* __s2) inline char const* strpbrk(char const* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strpbrk_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strpbrk_capture(__s1,__s2); }
inline char* strpbrk( char* __s1, char const* __s2) inline char* strpbrk( char* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strpbrk_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strpbrk_capture(__s1,__s2); }
inline char const* strrchr(char const* __s1, int __c) inline char const* strrchr(char const* __s1, int __c)
{ return ::_C_Swamp::_CPP_strrchr_capture(__s1,__c); } { return ::_C_legacy::_CPP_strrchr_capture(__s1,__c); }
inline char* strrchr( char* __s1, int __c) inline char* strrchr( char* __s1, int __c)
{ return ::_C_Swamp::_CPP_strrchr_capture(__s1,__c); } { return ::_C_legacy::_CPP_strrchr_capture(__s1,__c); }
inline size_t strspn(char const* __s1, char const* __s2) inline size_t strspn(char const* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strspn_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strspn_capture(__s1,__s2); }
inline char const* strstr(char const* __s1, char const* __s2) inline char const* strstr(char const* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strstr_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strstr_capture(__s1,__s2); }
inline char* strstr( char* __s1, char const* __s2) inline char* strstr( char* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strstr_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strstr_capture(__s1,__s2); }
inline char* strtok(char* __s1, char const* __s2) inline char* strtok(char* __s1, char const* __s2)
{ return ::_C_Swamp::_CPP_strtok_capture(__s1,__s2); } { return ::_C_legacy::_CPP_strtok_capture(__s1,__s2); }
inline void* memset(void* __s, int __c, size_t __n) inline void* memset(void* __s, int __c, size_t __n)
{ return ::_C_Swamp::_CPP_memset_capture(__s,__c,__n); } { return ::_C_legacy::_CPP_memset_capture(__s,__c,__n); }
using ::_C_Swamp::strerror; using ::_C_legacy::strerror;
inline size_t strlen(char const* __s) inline size_t strlen(char const* __s)
{ return ::_C_Swamp::_CPP_strlen_capture(__s); } { return ::_C_legacy::_CPP_strlen_capture(__s); }
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// adopt names back into C // adopt names back into C
using ::std::memcpy; using ::std::memcpy;
using ::std::memmove; using ::std::memmove;
...@@ -232,7 +232,7 @@ ...@@ -232,7 +232,7 @@
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -36,9 +36,9 @@ ...@@ -36,9 +36,9 @@
# include <bits/std_cstddef.h> /* pick up size_t, NULL */ # include <bits/std_cstddef.h> /* pick up size_t, NULL */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <time.h> # include_next <time.h>
} }
...@@ -49,13 +49,13 @@ ...@@ -49,13 +49,13 @@
typedef time_t _CPP_time_t_capture; typedef time_t _CPP_time_t_capture;
typedef struct tm _CPP_tm_capture; typedef struct tm _CPP_tm_capture;
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// # undef NULL // # undef NULL
// # define NULL 0 /* handled in <cstddef> */ // # define NULL 0 /* handled in <cstddef> */
# undef CLOCKS_PER_SEC # undef CLOCKS_PER_SEC
# define CLOCKS_PER_SEC (::_C_Swamp::_CPP_CLOCKS_PER_SEC_capture()) # define CLOCKS_PER_SEC (::_C_legacy::_CPP_CLOCKS_PER_SEC_capture())
# undef size_t /* handled in <cstddef> */ # undef size_t /* handled in <cstddef> */
# undef clock_t # undef clock_t
...@@ -71,49 +71,49 @@ ...@@ -71,49 +71,49 @@
# undef localtime # undef localtime
# undef strftime # undef strftime
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// typedef ::_C_Swamp::_CPP_size_t_capture size_t; // typedef ::_C_legacy::_CPP_size_t_capture size_t;
typedef ::_C_Swamp::_CPP_clock_t_capture clock_t; typedef ::_C_legacy::_CPP_clock_t_capture clock_t;
typedef ::_C_Swamp::_CPP_time_t_capture time_t; typedef ::_C_legacy::_CPP_time_t_capture time_t;
} }
} }
namespace std { namespace std {
// Adopt C names into std:: // Adopt C names into std::
// using ::_C_Swamp::_C_Shadow::size_t; // using ::_C_legacy::_C_shadow::size_t;
using ::_C_Swamp::_C_Shadow::clock_t; using ::_C_legacy::_C_shadow::clock_t;
using ::_C_Swamp::_C_Shadow::time_t; using ::_C_legacy::_C_shadow::time_t;
// note: still a POD type: // note: still a POD type:
struct tm : ::_C_Swamp::_CPP_tm_capture { }; struct tm : ::_C_legacy::_CPP_tm_capture { };
using ::_C_Swamp::clock; using ::_C_legacy::clock;
using ::_C_Swamp::difftime; using ::_C_legacy::difftime;
using ::_C_Swamp::mktime; using ::_C_legacy::mktime;
using ::_C_Swamp::time; using ::_C_legacy::time;
inline char* asctime(const tm* __tp) inline char* asctime(const tm* __tp)
{ return ::_C_Swamp::asctime( { return ::_C_legacy::asctime(
static_cast< ::_C_Swamp::_CPP_tm_capture const*>(__tp)); } static_cast< ::_C_legacy::_CPP_tm_capture const*>(__tp)); }
using ::_C_Swamp::ctime; using ::_C_legacy::ctime;
inline tm* gmtime(time_t const* __tp) inline tm* gmtime(time_t const* __tp)
{ return reinterpret_cast<tm*>(::_C_Swamp::gmtime(__tp)); } { return reinterpret_cast<tm*>(::_C_legacy::gmtime(__tp)); }
inline tm* localtime(const time_t* __tp) inline tm* localtime(const time_t* __tp)
{ return reinterpret_cast<tm*>(::_C_Swamp::localtime(__tp)); } { return reinterpret_cast<tm*>(::_C_legacy::localtime(__tp)); }
inline size_t strftime(char* __buf, size_t __maxsz, inline size_t strftime(char* __buf, size_t __maxsz,
char const* __fmt, tm const* __tp) char const* __fmt, tm const* __tp)
{ return ::_C_Swamp::strftime(__buf, __maxsz, __fmt, { return ::_C_legacy::strftime(__buf, __maxsz, __fmt,
static_cast< ::_C_Swamp::_CPP_tm_capture const*>(__tp)); } static_cast< ::_C_legacy::_CPP_tm_capture const*>(__tp)); }
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
using ::std::tm; using ::std::tm;
using ::std::asctime; using ::std::asctime;
using ::std::gmtime; using ::std::gmtime;
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -40,9 +40,9 @@ ...@@ -40,9 +40,9 @@
# include <bits/std_ctime.h> /* struct tm */ # include <bits/std_ctime.h> /* struct tm */
# include <bits/std_cstring.h> /* memset */ # include <bits/std_cstring.h> /* memset */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <wchar.h> # include_next <wchar.h>
} }
...@@ -64,15 +64,15 @@ ...@@ -64,15 +64,15 @@
{ return putwchar(__c); } { return putwchar(__c); }
#endif #endif
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// # undef size_t /* handled in <cstddef> */ // # undef size_t /* handled in <cstddef> */
# undef wchar_t # undef wchar_t
# undef wint_t # undef wint_t
# undef mbstate_t # undef mbstate_t
# undef WEOF # undef WEOF
# define WEOF ::_C_Swamp::_CPP_WEOF_capture # define WEOF ::_C_legacy::_CPP_WEOF_capture
// the following are not in glibc-2.0 // the following are not in glibc-2.0
# undef fgetwc # undef fgetwc
...@@ -159,105 +159,105 @@ ...@@ -159,105 +159,105 @@
# undef wcspbrk # undef wcspbrk
# undef wcswcs # undef wcswcs
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
typedef ::_C_Swamp::_CPP_wint_t_capture wint_t; typedef ::_C_legacy::_CPP_wint_t_capture wint_t;
// typedef ::_C_Swamp::_CPP_wctype_t_capture wctype_t; // typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
} }
} }
namespace std { namespace std {
// using ::_C_Swamp::wchar_t; // using ::_C_legacy::wchar_t;
using ::_C_Swamp::_C_Shadow::wint_t; using ::_C_legacy::_C_shadow::wint_t;
// using ::_C_Swamp::WEOF; // using ::_C_legacy::WEOF;
// XXX this might better be replaced with one unrelated to the C mbstate_t. // XXX this might better be replaced with one unrelated to the C mbstate_t.
struct mbstate_t { struct mbstate_t {
_C_Swamp::_CPP_mbstate_t_capture _M_dum; _C_legacy::_CPP_mbstate_t_capture _M_dum;
mbstate_t() { std::memset(&_M_dum,0,sizeof(_M_dum)); } mbstate_t() { std::memset(&_M_dum,0,sizeof(_M_dum)); }
}; };
#if 0 /* glibc-2.0 does not implement these. */ #if 0 /* glibc-2.0 does not implement these. */
inline wint_t fgetwc(FILE* __f) inline wint_t fgetwc(FILE* __f)
{ return ::_C_Swamp::fgetwc(__f); } { return ::_C_legacy::fgetwc(__f); }
inline wchar_t* fgetws(wchar_t* __s, int __n, FILE* __f) inline wchar_t* fgetws(wchar_t* __s, int __n, FILE* __f)
{ return ::_C_Swamp::fgetws(__s,__n,__f); } { return ::_C_legacy::fgetws(__s,__n,__f); }
inline wint_t fputwc(wint_t __c, FILE* __f) inline wint_t fputwc(wint_t __c, FILE* __f)
{ return ::_C_Swamp::fputwc(__c,__f); } { return ::_C_legacy::fputwc(__c,__f); }
inline int fputws(const wchar_t* __s, FILE* __f) inline int fputws(const wchar_t* __s, FILE* __f)
{ return ::_C_Swamp::fputws(__s,__f); } { return ::_C_legacy::fputws(__s,__f); }
inline wint_t ungetwc(wint_t __c, FILE* __f) inline wint_t ungetwc(wint_t __c, FILE* __f)
{ return ::_C_Swamp::ungetwc(__c,__f); } { return ::_C_legacy::ungetwc(__c,__f); }
inline wint_t getwc(FILE* __f) inline wint_t getwc(FILE* __f)
{ return ::_C_Swamp::_CPP_getwc_capture(__f); } { return ::_C_legacy::_CPP_getwc_capture(__f); }
inline wint_t getwchar() inline wint_t getwchar()
{ return ::_C_Swamp::_CPP_getwchar_capture(); } { return ::_C_legacy::_CPP_getwchar_capture(); }
inline wint_t putwc(wint_t __c, FILE* __f) inline wint_t putwc(wint_t __c, FILE* __f)
{ return ::_C_Swamp::_CPP_putwc_capture(__c,__f); } { return ::_C_legacy::_CPP_putwc_capture(__c,__f); }
inline wint_t putwchar(wint_t __c) inline wint_t putwchar(wint_t __c)
{ return ::_C_Swamp::_CPP_putwchar_capture(__c); } { return ::_C_legacy::_CPP_putwchar_capture(__c); }
// similarly wprintf etc. // similarly wprintf etc.
#endif #endif
using ::_C_Swamp::wcscpy; using ::_C_legacy::wcscpy;
using ::_C_Swamp::wcscat; using ::_C_legacy::wcscat;
using ::_C_Swamp::wcscmp; using ::_C_legacy::wcscmp;
using ::_C_Swamp::wcscoll; using ::_C_legacy::wcscoll;
using ::_C_Swamp::wcsxfrm; using ::_C_legacy::wcsxfrm;
using ::_C_Swamp::wcschr; using ::_C_legacy::wcschr;
using ::_C_Swamp::wcscspn; using ::_C_legacy::wcscspn;
using ::_C_Swamp::wcspbrk; using ::_C_legacy::wcspbrk;
using ::_C_Swamp::wcstok; using ::_C_legacy::wcstok;
using ::_C_Swamp::wcslen; using ::_C_legacy::wcslen;
#ifndef __sun #ifndef __sun
using ::_C_Swamp::wcsdup; using ::_C_legacy::wcsdup;
using ::_C_Swamp::wcsstr; using ::_C_legacy::wcsstr;
using ::_C_Swamp::wmemchr; using ::_C_legacy::wmemchr;
using ::_C_Swamp::wmemcmp; using ::_C_legacy::wmemcmp;
using ::_C_Swamp::wmemcpy; using ::_C_legacy::wmemcpy;
using ::_C_Swamp::wmemmove; using ::_C_legacy::wmemmove;
using ::_C_Swamp::wmemset; using ::_C_legacy::wmemset;
using ::_C_Swamp::btowc; using ::_C_legacy::btowc;
using ::_C_Swamp::wctob; using ::_C_legacy::wctob;
using ::_C_Swamp::mbsinit; using ::_C_legacy::mbsinit;
using ::_C_Swamp::mbrtowc; using ::_C_legacy::mbrtowc;
using ::_C_Swamp::wcrtomb; using ::_C_legacy::wcrtomb;
using ::_C_Swamp::mbrlen; using ::_C_legacy::mbrlen;
#endif #endif
#ifdef __USE_GNU #ifdef __USE_GNU
using ::_C_Swamp::mbsrtowcs; using ::_C_legacy::mbsrtowcs;
using ::_C_Swamp::wcsrtombs; using ::_C_legacy::wcsrtombs;
using ::_C_Swamp::mbsnrtowcs; using ::_C_legacy::mbsnrtowcs;
using ::_C_Swamp::mbsnrtombs; using ::_C_legacy::mbsnrtombs;
using ::_C_Swamp::wcscmpy using ::_C_legacy::wcscmpy
using ::_C_Swamp::wcwidth; using ::_C_legacy::wcwidth;
using ::_C_Swamp::wcswidth; using ::_C_legacy::wcswidth;
#endif #endif
using ::_C_Swamp::wcstod; using ::_C_legacy::wcstod;
using ::_C_Swamp::wcstol; using ::_C_legacy::wcstol;
using ::_C_Swamp::wcstoul; using ::_C_legacy::wcstoul;
using ::_C_Swamp::wcsncat; using ::_C_legacy::wcsncat;
using ::_C_Swamp::wcsncmp; using ::_C_legacy::wcsncmp;
using ::_C_Swamp::wcsncpy; using ::_C_legacy::wcsncpy;
using ::_C_Swamp::wcsrchr; using ::_C_legacy::wcsrchr;
using ::_C_Swamp::wcsspn; using ::_C_legacy::wcsspn;
// using ::_C_Swamp::wcswcs; // using ::_C_legacy::wcswcs;
#if 0 /* not implemented in glibc-2 */ #if 0 /* not implemented in glibc-2 */
inline size_t wcsftime(wchar_t* __s, size_t __n, inline size_t wcsftime(wchar_t* __s, size_t __n,
char const* __fmt, struct tm const* __tmb) char const* __fmt, struct tm const* __tmb)
{ return ::_C_Swamp::wcsftime(__s,__n,__fmt,__tmb); } { return ::_C_legacy::wcsftime(__s,__n,__fmt,__tmb); }
using ::_C_Swamp::wctype; using ::_C_legacy::wctype;
#endif #endif
} }
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
#if 0 /* XXX glibc-2.0 does not implement these. */ #if 0 /* XXX glibc-2.0 does not implement these. */
using ::std::fgetwc; using ::std::fgetwc;
using ::std::fgetws; using ::std::fgetws;
...@@ -274,6 +274,6 @@ ...@@ -274,6 +274,6 @@
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -38,9 +38,9 @@ ...@@ -38,9 +38,9 @@
# include <bits/std_cwchar.h> /* pick up wint_t, WEOF */ # include <bits/std_cwchar.h> /* pick up wint_t, WEOF */
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <wctype.h> # include_next <wctype.h>
} }
...@@ -49,8 +49,8 @@ ...@@ -49,8 +49,8 @@
// XXX probably should capture defs of the "is" functions. // XXX probably should capture defs of the "is" functions.
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
# undef size_t /* handled in <cstddef> */ # undef size_t /* handled in <cstddef> */
# undef wchar_t # undef wchar_t
...@@ -80,39 +80,39 @@ ...@@ -80,39 +80,39 @@
# undef iscodeset2 # undef iscodeset2
# undef iscodeset3 # undef iscodeset3
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
typedef ::_C_Swamp::_CPP_wctype_t_capture wctype_t; typedef ::_C_legacy::_CPP_wctype_t_capture wctype_t;
typedef ::_C_Swamp::_CPP_wctrans_t_capture wctrans_t; typedef ::_C_legacy::_CPP_wctrans_t_capture wctrans_t;
} }
} }
namespace std { namespace std {
using ::_C_Swamp::_C_Shadow::wctype_t; using ::_C_legacy::_C_shadow::wctype_t;
using ::_C_Swamp::_C_Shadow::wctrans_t; using ::_C_legacy::_C_shadow::wctrans_t;
// XXX probably should capture these to inlines. // XXX probably should capture these to inlines.
using ::_C_Swamp::iswalpha; using ::_C_legacy::iswalpha;
using ::_C_Swamp::iswupper; using ::_C_legacy::iswupper;
using ::_C_Swamp::iswlower; using ::_C_legacy::iswlower;
using ::_C_Swamp::iswdigit; using ::_C_legacy::iswdigit;
using ::_C_Swamp::iswxdigit; using ::_C_legacy::iswxdigit;
using ::_C_Swamp::iswalnum; using ::_C_legacy::iswalnum;
using ::_C_Swamp::iswspace; using ::_C_legacy::iswspace;
using ::_C_Swamp::iswpunct; using ::_C_legacy::iswpunct;
using ::_C_Swamp::iswprint; using ::_C_legacy::iswprint;
using ::_C_Swamp::iswgraph; using ::_C_legacy::iswgraph;
using ::_C_Swamp::iswcntrl; using ::_C_legacy::iswcntrl;
using ::_C_Swamp::iswctype; using ::_C_legacy::iswctype;
using ::_C_Swamp::towlower; using ::_C_legacy::towlower;
using ::_C_Swamp::towupper; using ::_C_legacy::towupper;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -36,36 +36,36 @@ ...@@ -36,36 +36,36 @@
#ifndef _CPP_WRAP_LIBIO_H #ifndef _CPP_WRAP_LIBIO_H
#define _CPP_WRAP_LIBIO_H 1 #define _CPP_WRAP_LIBIO_H 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <libio.h> # include_next <libio.h>
} }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// # undef that // # undef that
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// typedef stuff // typedef stuff
} }
} }
namespace std { namespace std {
// using ::_C_Swamp::stuff // using ::_C_legacy::stuff
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// using ::std::stuff // using ::std::stuff
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -36,38 +36,38 @@ ...@@ -36,38 +36,38 @@
#ifndef _CPP_WRAP_UNISTD_H #ifndef _CPP_WRAP_UNISTD_H
#define _CPP_WRAP_UNISTD_H 1 #define _CPP_WRAP_UNISTD_H 1
namespace _C_Swamp { namespace _C_legacy {
extern "C" { extern "C" {
# define _IN_C_SWAMP_ # define _IN_C_LEGACY_
# pragma system_header # pragma system_header
# include_next <unistd.h> # include_next <unistd.h>
} }
namespace _C_Shadow { } namespace _C_shadow { }
} // close namespace ::_C_Swamp:: } // close namespace ::_C_legacy::
// # undef that // # undef that
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// typedef stuff // typedef stuff
} }
} }
namespace std { namespace std {
using ::_C_Swamp::read; using ::_C_legacy::read;
using ::_C_Swamp::write; using ::_C_legacy::write;
using ::_C_Swamp::open; using ::_C_legacy::open;
} // close namespace std:: } // close namespace std::
namespace _C_Swamp { namespace _C_legacy {
namespace _C_Shadow { namespace _C_shadow {
// using ::std::stuff // using ::std::stuff
} }
} }
# undef _IN_C_SWAMP_ # undef _IN_C_LEGACY_
#endif #endif
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::isalnum; using ::std::isalnum;
using ::std::isalpha; using ::std::isalpha;
using ::std::iscntrl; using ::std::iscntrl;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
// using ::std::stuff // using ::std::stuff
# define _INCLUDED_CPP_LIBIO_H_ 1 # define _INCLUDED_CPP_LIBIO_H_ 1
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::lconv; using ::std::lconv;
using ::std::setlocale; using ::std::setlocale;
using ::std::localeconv; using ::std::localeconv;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::acos; using ::std::acos;
using ::std::asin; using ::std::asin;
using ::std::atan; using ::std::atan;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::jmp_buf; using ::std::jmp_buf;
using ::std::longjmp; using ::std::longjmp;
# define _INCLUDED_CPP_SETJMP_H_ 1 # define _INCLUDED_CPP_SETJMP_H_ 1
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::sig_atomic_t; using ::std::sig_atomic_t;
using ::std::raise; using ::std::raise;
using ::std::signal; using ::std::signal;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::va_list; using ::std::va_list;
# define _INCLUDED_CPP_STDARG_H_ 1 # define _INCLUDED_CPP_STDARG_H_ 1
# endif # endif
......
...@@ -42,7 +42,7 @@ ...@@ -42,7 +42,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::ptrdiff_t; using ::std::ptrdiff_t;
using ::std::size_t; using ::std::size_t;
# define _INCLUDED_CPP_STDDEF_H_ 1 # define _INCLUDED_CPP_STDDEF_H_ 1
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::size_t; using ::std::size_t;
using ::std::fpos_t; using ::std::fpos_t;
using ::std::remove; using ::std::remove;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::size_t; using ::std::size_t;
using ::std::div_t; using ::std::div_t;
using ::std::ldiv_t; using ::std::ldiv_t;
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::memcpy; using ::std::memcpy;
using ::std::memmove; using ::std::memmove;
using ::std::strcpy; using ::std::strcpy;
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::size_t; /* handled in <cstddef> */ using ::std::size_t; /* handled in <cstddef> */
using ::std::clock_t; using ::std::clock_t;
using ::std::time_t; using ::std::time_t;
......
...@@ -35,7 +35,7 @@ ...@@ -35,7 +35,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
// using ::std::stuff // using ::std::stuff
# define _INCLUDED_CPP_UNISTD_H_ 1 # define _INCLUDED_CPP_UNISTD_H_ 1
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::size_t; /* handled in <cstddef> */ using ::std::size_t; /* handled in <cstddef> */
using ::std::wint_t; using ::std::wint_t;
using ::std::mbstate_t; using ::std::mbstate_t;
...@@ -104,6 +104,6 @@ ...@@ -104,6 +104,6 @@
using ::std::wcsrchr; using ::std::wcsrchr;
using ::std::wcsspn; using ::std::wcsspn;
# define _INCLUDED_CPP_WCHAR_H_ 1 # define _INCLUDED_CPP_WCHAR_H_ 1
# endif /* _IN_C_SWAMP_ */ # endif /* _IN_C_LEGACY_ */
#endif /* _INCLUDED_CPP_WCHAR_H_ */ #endif /* _INCLUDED_CPP_WCHAR_H_ */
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
# include <bits/generic_shadow.h> # include <bits/generic_shadow.h>
# undef _SHADOW_NAME # undef _SHADOW_NAME
# ifndef _IN_C_SWAMP_ # ifndef _IN_C_LEGACY_
using ::std::size_t; using ::std::size_t;
using ::std::wint_t; using ::std::wint_t;
using ::std::wctype_t; using ::std::wctype_t;
......
...@@ -63,6 +63,7 @@ namespace std ...@@ -63,6 +63,7 @@ namespace std
template S::basic_string(S const&); template S::basic_string(S const&);
template S::_Rep* S::_Rep::_S_create(size_t, S::allocator_type const&); template S::_Rep* S::_Rep::_S_create(size_t, S::allocator_type const&);
template void S::_Rep::_M_destroy(S::allocator_type const&) throw(); template void S::_Rep::_M_destroy(S::allocator_type const&) throw();
template void __destroy_aux(S*, S*, __false_type);
#endif #endif
#ifdef CTORNC #ifdef CTORNC
...@@ -287,7 +288,7 @@ namespace std ...@@ -287,7 +288,7 @@ namespace std
const char* const char*
string::_S_find(const char* __beg, const char* __end, char __c) string::_S_find(const char* __beg, const char* __end, char __c)
{ {
char* __retval = strchr(__beg, __c); const char* __retval = strchr(__beg, __c);
return (__retval ? __retval : __end); return (__retval ? __retval : __end);
} }
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment