aboutsummaryrefslogtreecommitdiff
path: root/libstdc++-v3
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@gcc.gnu.org>2000-04-23 19:42:39 +0000
committerBenjamin Kosnik <bkoz@gcc.gnu.org>2000-04-23 19:42:39 +0000
commitff2b942e78dc46a8705f54ccd352c51b61163829 (patch)
tree070c46a92d0352e91d525ae9086699e94723621c /libstdc++-v3
parentd9e0bd53b2da36f66fcd18b168b354612ef7f4df (diff)
downloadgcc-ff2b942e78dc46a8705f54ccd352c51b61163829.zip
gcc-ff2b942e78dc46a8705f54ccd352c51b61163829.tar.gz
gcc-ff2b942e78dc46a8705f54ccd352c51b61163829.tar.bz2
bits: Add.
2000-04-23 Benjamin Kosnik <bkoz@redhat.com> * shadow/bits: Add. * shadow/sys: Add. From-SVN: r33356
Diffstat (limited to 'libstdc++-v3')
-rw-r--r--libstdc++-v3/shadow/bits/std_cassert.h42
-rw-r--r--libstdc++-v3/shadow/bits/std_cctype.h142
-rw-r--r--libstdc++-v3/shadow/bits/std_cerrno.h67
-rw-r--r--libstdc++-v3/shadow/bits/std_cfloat.h184
-rw-r--r--libstdc++-v3/shadow/bits/std_climits.h63
-rw-r--r--libstdc++-v3/shadow/bits/std_clocale.h108
-rw-r--r--libstdc++-v3/shadow/bits/std_cmath.h184
-rw-r--r--libstdc++-v3/shadow/bits/std_csetjmp.h74
-rw-r--r--libstdc++-v3/shadow/bits/std_csignal.h110
-rw-r--r--libstdc++-v3/shadow/bits/std_cstdarg.h99
-rw-r--r--libstdc++-v3/shadow/bits/std_cstddef.h77
-rw-r--r--libstdc++-v3/shadow/bits/std_cstdio.h367
-rw-r--r--libstdc++-v3/shadow/bits/std_cstdlib.h221
-rw-r--r--libstdc++-v3/shadow/bits/std_cstring.h237
-rw-r--r--libstdc++-v3/shadow/bits/std_ctime.h127
-rw-r--r--libstdc++-v3/shadow/bits/std_cwchar.h278
-rw-r--r--libstdc++-v3/shadow/bits/std_cwctype.h117
-rw-r--r--libstdc++-v3/shadow/bits/wrap_libio.h70
-rw-r--r--libstdc++-v3/shadow/bits/wrap_unistd.h72
-rw-r--r--libstdc++-v3/shadow/sys/cdefs.h42
20 files changed, 2681 insertions, 0 deletions
diff --git a/libstdc++-v3/shadow/bits/std_cassert.h b/libstdc++-v3/shadow/bits/std_cassert.h
new file mode 100644
index 0000000..cd7c939
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cassert.h
@@ -0,0 +1,42 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.2 Assertions
+//
+
+// No include guards or wrappers on this header...
+//
+// If <assert.h> sub-includes anything else that
+// defines a global used in other headers, we are sunk.
+
+extern "C" {
+# include_next <assert.h>
+}
+
diff --git a/libstdc++-v3/shadow/bits/std_cctype.h b/libstdc++-v3/shadow/bits/std_cctype.h
new file mode 100644
index 0000000..b8555c1
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cctype.h
@@ -0,0 +1,142 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// ISO C++ 14882: 22
+//
+
+#ifndef _CPP_CCTYPE
+#define _CPP_CCTYPE 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <ctype.h>
+ }
+
+ inline int _CPP_isalnum_capture(int c) { return isalnum (c); }
+ inline int _CPP_isalpha_capture(int c) { return isalpha (c); }
+ inline int _CPP_iscntrl_capture(int c) { return iscntrl (c); }
+ inline int _CPP_isdigit_capture(int c) { return isdigit (c); }
+ inline int _CPP_isgraph_capture(int c) { return isgraph (c); }
+ inline int _CPP_islower_capture(int c) { return islower (c); }
+ inline int _CPP_isprint_capture(int c) { return isprint (c); }
+ inline int _CPP_ispunct_capture(int c) { return ispunct (c); }
+ inline int _CPP_isspace_capture(int c) { return isspace (c); }
+ inline int _CPP_isupper_capture(int c) { return isupper (c); }
+ inline int _CPP_isxdigit_capture(int c) { return isxdigit (c); }
+
+ inline int _CPP_tolower_capture(int c) { return tolower (c); }
+ inline int _CPP_toupper_capture(int c) { return toupper (c); }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef isalnum
+# undef isalpha
+# undef iscntrl
+# undef isdigit
+# undef isgraph
+# undef islower
+# undef isprint
+# undef ispunct
+# undef isspace
+# undef isupper
+# undef isxdigit
+
+# 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_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+ namespace std {
+
+ inline int isalnum(int __c)
+ { return ::_C_Swamp::_CPP_isalnum_capture (__c); }
+ inline int isalpha (int __c)
+ { return ::_C_Swamp::_CPP_isalpha_capture (__c); }
+ inline int iscntrl (int __c)
+ { return ::_C_Swamp::_CPP_iscntrl_capture (__c); }
+ inline int isdigit (int __c)
+ { return ::_C_Swamp::_CPP_isdigit_capture (__c); }
+ inline int isgraph (int __c)
+ { return ::_C_Swamp::_CPP_isgraph_capture (__c); }
+ inline int islower (int __c)
+ { return ::_C_Swamp::_CPP_islower_capture (__c); }
+ inline int isprint (int __c)
+ { return ::_C_Swamp::_CPP_isprint_capture (__c); }
+ inline int ispunct (int __c)
+ { return ::_C_Swamp::_CPP_ispunct_capture (__c); }
+ inline int isspace (int __c)
+ { return ::_C_Swamp::_CPP_isspace_capture (__c); }
+ inline int isupper (int __c)
+ { return ::_C_Swamp::_CPP_isupper_capture (__c); }
+ inline int isxdigit (int __c)
+ { return ::_C_Swamp::_CPP_isxdigit_capture (__c); }
+
+ inline int tolower (int __c)
+ { return ::_C_Swamp::_CPP_tolower_capture (__c); }
+ inline int toupper (int __c)
+ { return ::_C_Swamp::_CPP_toupper_capture (__c); }
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ 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_SWAMP_
+
+#endif
diff --git a/libstdc++-v3/shadow/bits/std_cerrno.h b/libstdc++-v3/shadow/bits/std_cerrno.h
new file mode 100644
index 0000000..0ca6b6c
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cerrno.h
@@ -0,0 +1,67 @@
+// -*- C++ -*- header wrapper.
+
+
+//// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// ISO C++ 14882: 19.3 Error numbers
+//
+
+#ifndef _CPP_CERRNO
+#define _CPP_CERRNO 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <errno.h>
+ }
+
+ int& _CPP_errno_capture() { return errno; }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef errno
+# define errno ::_C_Swamp::_CPP_errno_capture()
+// # undef EDOM
+// # undef ERANGE
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+ namespace std {
+ } // close namespace std::
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cfloat.h b/libstdc++-v3/shadow/bits/std_cfloat.h
new file mode 100644
index 0000000..2b8dbdf
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cfloat.h
@@ -0,0 +1,184 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#ifndef _CPP_CFLOAT
+#define _CPP_CFLOAT 1
+
+#if 0 /* 1998-09-29 */
+# ifdef __GLIBC__
+// For GNU libc we must also include this one:
+# include <fenv.h>
+# endif
+#endif
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <float.h>
+ }
+
+ inline int _CPP_FLT_ROUNDS_capture() { return FLT_ROUNDS; }
+
+ // FLT_RADIX is OK as-is.
+ // const int _CPP_FLT_RADIX_capture() { return FLT_RADIX; }
+
+ inline int _CPP_FLT_MANT_DIG_capture() { return FLT_MANT_DIG; }
+ inline int _CPP_DBL_MANT_DIG_capture() { return DBL_MANT_DIG; }
+ inline int _CPP_LDBL_MANT_DIG_capture() { return LDBL_MANT_DIG; }
+
+ inline int _CPP_FLT_DIG_capture() { return FLT_DIG; }
+ inline int _CPP_DBL_DIG_capture() { return DBL_DIG; }
+ inline int _CPP_LDBL_DIG_capture() { return LDBL_DIG; }
+
+ inline int _CPP_FLT_MIN_EXP_capture() { return FLT_MIN_EXP; }
+ inline int _CPP_DBL_MIN_EXP_capture() { return DBL_MIN_EXP; }
+ inline int _CPP_LDBL_MIN_EXP_capture() { return LDBL_MIN_EXP; }
+
+ inline int _CPP_FLT_MIN_10_EXP_capture() { return FLT_MIN_10_EXP; }
+ inline int _CPP_DBL_MIN_10_EXP_capture() { return DBL_MIN_10_EXP; }
+ inline int _CPP_LDBL_MIN_10_EXP_capture() { return LDBL_MIN_10_EXP; }
+
+ inline int _CPP_FLT_MAX_EXP_capture() { return FLT_MAX_EXP; }
+ inline int _CPP_DBL_MAX_EXP_capture() { return DBL_MAX_EXP; }
+ inline int _CPP_LDBL_MAX_EXP_capture() { return LDBL_MAX_EXP; }
+
+ inline int _CPP_FLT_MAX_10_EXP_capture() { return FLT_MAX_10_EXP; }
+ inline int _CPP_DBL_MAX_10_EXP_capture() { return DBL_MAX_10_EXP; }
+ inline int _CPP_LDBL_MAX_10_EXP_capture() { return LDBL_MAX_10_EXP; }
+
+ inline float _CPP_FLT_MAX_capture() { return FLT_MAX; }
+ inline double _CPP_DBL_MAX_capture() { return DBL_MAX; }
+ inline long double _CPP_LDBL_MAX_capture() { return LDBL_MAX; }
+
+ inline float _CPP_FLT_EPSILON_capture() { return FLT_EPSILON; }
+ inline double _CPP_DBL_EPSILON_capture() { return DBL_EPSILON; }
+ inline long double _CPP_LDBL_EPSILON_capture() { return LDBL_EPSILON; }
+
+ inline float _CPP_FLT_MIN_capture() { return FLT_MIN; }
+ inline double _CPP_DBL_MIN_capture() { return DBL_MIN; }
+ inline long double _CPP_LDBL_MIN_capture() { return LDBL_MIN; }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef FLT_ROUNDS
+# define FLT_ROUNDS ::_C_Swamp::_CPP_FLT_ROUNDS_capture()
+
+// # undef FLT_RADIX // OK as-is.
+
+# undef FLT_MANT_DIG
+# define FLT_MANT_DIG ::_C_Swamp::_CPP_FLT_MANT_DIG_capture()
+# undef DBL_MANT_DIG
+# define DBL_MANT_DIG ::_C_Swamp::_CPP_DBL_MANT_DIG_capture()
+# undef LDBL_MANT_DIG
+# define LDBL_MANT_DIG ::_C_Swamp::_CPP_LDBL_MANT_DIG_capture()
+
+# undef FLT_DIG
+# define FLT_DIG ::_C_Swamp::_CPP_FLT_DIG_capture()
+# undef DBL_DIG
+# define DBL_DIG ::_C_Swamp::_CPP_DBL_DIG_capture()
+# undef LDBL_DIG
+# define LDBL_DIG ::_C_Swamp::_CPP_LDBL_DIG_capture()
+
+# undef FLT_MIN_MIN_DIG
+# define FLT_MIN_MIN_DIG ::_C_Swamp::_CPP_FLT_MIN_MIN_DIG_capture()
+# undef DBL_MIN_MIN_DIG
+# define DBL_MIN_MIN_DIG ::_C_Swamp::_CPP_DBL_MIN_MIN_DIG_capture()
+# undef LDBL_MIN_MIN_DIG
+# define LDBL_MIN_MIN_DIG ::_C_Swamp::_CPP_LDBL_MIN_MIN_DIG_capture()
+
+# undef FLT_MIN_EXP
+# define FLT_MIN_EXP ::_C_Swamp::_CPP_FLT_MIN_EXP_capture()
+# undef DBL_MIN_EXP
+# define DBL_MIN_EXP ::_C_Swamp::_CPP_DBL_MIN_EXP_capture()
+# undef LDBL_MIN_EXP
+# define LDBL_MIN_EXP ::_C_Swamp::_CPP_LDBL_MIN_EXP_capture()
+
+# undef FLT_MIN_10_EXP
+# define FLT_MIN_10_EXP ::_C_Swamp::_CPP_FLT_MIN_10_EXP_capture()
+# undef DBL_MIN_10_EXP
+# define DBL_MIN_10_EXP _::_C_Swamp::CPP_DBL_MIN_10_EXP_capture()
+# undef LDBL_MIN_10_EXP
+# define LDBL_MIN_10_EXP ::_C_Swamp::_CPP_LDBL_MIN_10_EXP_capture()
+
+# undef FLT_MAX_EXP
+# define FLT_MAX_EXP ::_C_Swamp::_CPP_FLT_MAX_EXP_capture()
+# undef DBL_MAX_EXP
+# define DBL_MAX_EXP ::_C_Swamp::_CPP_DBL_MAX_EXP_capture()
+# undef LDBL_MAX_EXP
+# define LDBL_MAX_EXP ::_C_Swamp::_CPP_LDBL_MAX_EXP_capture()
+
+# undef FLT_MAX_10_EXP
+# define FLT_MAX_10_EXP ::_C_Swamp::_CPP_FLT_MAX_10_EXP_capture()
+# undef DBL_MAX_10_EXP
+# define DBL_MAX_10_EXP ::_C_Swamp::_CPP_DBL_MAX_10_EXP_capture()
+# undef LDBL_MAX_10_EXP
+# define LDBL_MAX_10_EXP ::_C_Swamp::_CPP_LDBL_MAX_10_EXP_capture()
+
+# undef FLT_MAX
+# define FLT_MAX ::_C_Swamp::_CPP_FLT_MAX_capture()
+# undef DBL_MAX
+# define DBL_MAX ::_C_Swamp::_CPP_DBL_MAX_capture()
+# undef LDBL_MAX
+# define LDBL_MAX ::_C_Swamp::_CPP_LDBL_MAX_capture()
+
+# undef FLT_EPSILON
+# define FLT_EPSILON ::_C_Swamp::_CPP_FLT_EPSILON_capture()
+# undef DBL_EPSILON
+# define DBL_EPSILON ::_C_Swamp::_CPP_DBL_EPSILON_capture()
+# undef LDBL_EPSILON
+# define LDBL_EPSILON ::_C_Swamp::_CPP_LDBL_EPSILON_capture()
+
+# undef FLT_MIN
+# define FLT_MIN ::_C_Swamp::_CPP_FLT_MIN_capture()
+# undef DBL_MIN
+# define DBL_MIN ::_C_Swamp::_CPP_DBL_MIN_capture()
+# undef LDBL_MIN
+# define LDBL_MIN ::_C_Swamp::_CPP_LDBL_MIN_capture()
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+ namespace std {
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_climits.h b/libstdc++-v3/shadow/bits/std_climits.h
new file mode 100644
index 0000000..d1159df
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_climits.h
@@ -0,0 +1,63 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#ifndef _CPP_CLIMITS
+#define _CPP_CLIMTIS 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <limits.h>
+ }
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+ // Note: there is not much for this wrapper to do besides hiding
+ // vendor-extension names and (perhaps) replacing one or other
+ // macro with a larger value.
+
+// #undef MB_LEN_MAX
+// #define MB_LEN_MAX 16 /* or something */
+
+ namespace std {
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_clocale.h b/libstdc++-v3/shadow/bits/std_clocale.h
new file mode 100644
index 0000000..85add2d
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_clocale.h
@@ -0,0 +1,108 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2 Implementation properties: C library
+//
+
+#ifndef _CPP_CLOCALE
+#define _CPP_CLOCALE 1
+
+# include <bits/std_cstddef.h> /* pick up NULL */
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <locale.h>
+ }
+
+ typedef struct lconv _CPP_lconv_capture;
+ const int _CPP_LC_ALL_capture = LC_ALL;
+ const int _CPP_LC_COLLATE_capture = LC_COLLATE;
+ const int _CPP_LC_CTYPE_capture = LC_CTYPE;
+ const int _CPP_LC_MONETARY_capture = LC_MONETARY;
+ const int _CPP_LC_NUMERIC_capture = LC_NUMERIC;
+ const int _CPP_LC_TIME_capture = LC_TIME;
+#if 0 /* XXX need proper macro guard for this common extension. */
+ const int _CPP_LC_MESSAGES_capture = LC_MESSAGES;
+#endif
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+// # undef NULL
+// # define NULL 0 /* handled in <cstddef> */
+# undef LC_ALL
+# define LC_ALL ::_C_Swamp::_CPP_LC_ALL_capture
+# undef LC_COLLATE
+# define LC_COLLATE ::_C_Swamp::_CPP_LC_COLLATE_capture
+# undef LC_CTYPE
+# define LC_CTYPE ::_C_Swamp::_CPP_LC_CTYPE_capture
+# undef LC_MONETARY
+# define LC_MONETARY ::_C_Swamp::_CPP_LC_MONETARY_capture
+# undef LC_NUMERIC
+# define LC_NUMERIC ::_C_Swamp::_CPP_LC_NUMERIC_capture
+# undef LC_TIME
+# define LC_TIME ::_C_Swamp::_CPP_LC_TIME_capture
+#if 0 /* XXX need proper macro guard for this common extension. */
+# undef LC_MESSAGES
+# define LC_MESSAGES ::_C_Swamp::_CPP_LC_MESSAGES_capture
+#endif
+
+# undef lconv
+# undef setlocale
+# undef localeconv
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ using ::_C_Swamp::setlocale;
+
+ // note: still a POD type:
+ struct lconv : ::_C_Swamp::_CPP_lconv_capture { };
+
+ inline lconv* localeconv()
+ { return reinterpret_cast<lconv*>(::_C_Swamp::localeconv()); }
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ using ::std::lconv;
+ using ::std::localeconv;
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif /* _CPP_CLOCALE */
diff --git a/libstdc++-v3/shadow/bits/std_cmath.h b/libstdc++-v3/shadow/bits/std_cmath.h
new file mode 100644
index 0000000..a6f97b9
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cmath.h
@@ -0,0 +1,184 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5 C library
+//
+
+#ifndef _CPP_CMATH
+#define _CPP_CMATH 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <math.h>
+ }
+ inline double _CPP_HUGE_VAL_capture() { return HUGE_VAL; }
+ inline double _CPP_acos_capture(double __x) { return acos(__x); }
+ inline double _CPP_asin_capture(double __x) { return asin(__x); }
+ inline double _CPP_atan_capture(double __x) { return atan(__x); }
+ inline double _CPP_atan2_capture(double __y, double __x)
+ { return atan2(__y,__x); }
+ inline double _CPP_cos_capture(double __x) { return cos(__x); }
+ inline double _CPP_sin_capture(double __x) { return sin(__x); }
+ inline double _CPP_tan_capture(double __x) { return tan(__x); }
+ inline double _CPP_cosh_capture(double __x) { return cosh(__x); }
+ inline double _CPP_sinh_capture(double __x) { return sinh(__x); }
+ inline double _CPP_tanh_capture(double __x) { return tanh(__x); }
+ inline double _CPP_exp_capture(double __x) { return exp(__x); }
+ inline double _CPP_frexp_capture(double __x, int* __exp)
+ { return frexp(__x, __exp); }
+ inline double _CPP_ldexp_capture(double __x, int __exp)
+ { return ldexp(__x, __exp); }
+ inline double _CPP_log_capture(double __x) { return log(__x); }
+ inline double _CPP_log10_capture(double __x) { return log10(__x); }
+ inline double _CPP_modf_capture(double __x, double* __iptr)
+ { return modf(__x, __iptr); }
+ inline double _CPP_pow_capture(double __x, double __y)
+ { return pow(__x, __y); }
+ inline double _CPP_sqrt_capture(double __x) { return sqrt(__x); }
+ inline double _CPP_ceil_capture(double __x) { return ceil(__x); }
+ inline double _CPP_fabs_capture(double __x) { return fabs(__x); }
+ inline double _CPP_floor_capture(double __x) { return floor(__x); }
+ inline double _CPP_fmod_capture(double __x, double __y)
+ { return fmod(__x, __y); }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef HUGE_VAL
+# define HUGE_VAL ::_C_Swamp::_CPP_HUGE_VAL_capture()
+# undef acos
+# undef asin
+# undef atan
+# undef atan2
+# undef cos
+# undef sin
+# undef tan
+# undef cosh
+# undef sinh
+# undef tanh
+# undef exp
+# undef frexp
+# undef ldexp
+# undef log
+# undef log10
+# undef modf
+# undef pow
+# undef sqrt
+# undef ceil
+# undef fabs
+# undef floor
+# undef fmod
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ inline double acos(double __x)
+ { return ::_C_Swamp::_CPP_acos_capture(__x); }
+ inline double asin(double __x)
+ { return ::_C_Swamp::_CPP_asin_capture(__x); }
+ inline double atan(double __x)
+ { return ::_C_Swamp::_CPP_atan_capture(__x); }
+ inline double atan2(double __y, double __x)
+ { return ::_C_Swamp::_CPP_atan2_capture(__y,__x); }
+ inline double cos(double __x)
+ { return ::_C_Swamp::_CPP_cos_capture(__x); }
+ inline double sin(double __x)
+ { return ::_C_Swamp::_CPP_sin_capture(__x); }
+ inline double tan(double __x)
+ { return ::_C_Swamp::_CPP_tan_capture(__x); }
+ inline double cosh(double __x)
+ { return ::_C_Swamp::_CPP_cosh_capture(__x); }
+ inline double sinh(double __x)
+ { return ::_C_Swamp::_CPP_sinh_capture(__x); }
+ inline double tanh(double __x)
+ { return ::_C_Swamp::_CPP_tanh_capture(__x); }
+ inline double exp(double __x)
+ { return ::_C_Swamp::_CPP_exp_capture(__x); }
+ inline double frexp(double __x, int* __exp)
+ { return ::_C_Swamp::_CPP_frexp_capture(__x, __exp); }
+ inline double ldexp(double __x, int __exp)
+ { return ::_C_Swamp::_CPP_ldexp_capture(__x, __exp); }
+ inline double log(double __x)
+ { return ::_C_Swamp::_CPP_log_capture(__x); }
+ inline double log10(double __x)
+ { return ::_C_Swamp::_CPP_log10_capture(__x); }
+ inline double modf(double __x, double* __iptr)
+ { return ::_C_Swamp::_CPP_modf_capture(__x, __iptr); }
+ inline double pow(double __x, double __y)
+ { return ::_C_Swamp::_CPP_pow_capture(__x, __y); }
+ inline double sqrt(double __x)
+ { return ::_C_Swamp::_CPP_sqrt_capture(__x); }
+ inline double ceil(double __x)
+ { return ::_C_Swamp::_CPP_ceil_capture(__x); }
+ inline double fabs(double __x)
+ { return ::_C_Swamp::_CPP_fabs_capture(__x); }
+ inline double floor(double __x)
+ { return ::_C_Swamp::_CPP_floor_capture(__x); }
+ inline double fmod(double __x, double __y)
+ { return ::_C_Swamp::_CPP_fmod_capture(__x, __y); }
+
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ using ::_C_Swamp::_C_Shadow::acos;
+ using ::_C_Swamp::_C_Shadow::asin;
+ using ::_C_Swamp::_C_Shadow::atan;
+ using ::_C_Swamp::_C_Shadow::atan2;
+ using ::_C_Swamp::_C_Shadow::cos;
+ using ::_C_Swamp::_C_Shadow::sin;
+ using ::_C_Swamp::_C_Shadow::tan;
+ using ::_C_Swamp::_C_Shadow::cosh;
+ using ::_C_Swamp::_C_Shadow::sinh;
+ using ::_C_Swamp::_C_Shadow::tanh;
+ using ::_C_Swamp::_C_Shadow::exp;
+ using ::_C_Swamp::_C_Shadow::frexp;
+ using ::_C_Swamp::_C_Shadow::ldexp;
+ using ::_C_Swamp::_C_Shadow::log;
+ using ::_C_Swamp::_C_Shadow::log10;
+ using ::_C_Swamp::_C_Shadow::modf;
+ using ::_C_Swamp::_C_Shadow::pow;
+ using ::_C_Swamp::_C_Shadow::sqrt;
+ using ::_C_Swamp::_C_Shadow::ceil;
+ using ::_C_Swamp::_C_Shadow::fabs;
+ using ::_C_Swamp::_C_Shadow::floor;
+ using ::_C_Swamp::_C_Shadow::fmod;
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
diff --git a/libstdc++-v3/shadow/bits/std_csetjmp.h b/libstdc++-v3/shadow/bits/std_csetjmp.h
new file mode 100644
index 0000000..5313887
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_csetjmp.h
@@ -0,0 +1,74 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#ifndef _CPP_CSETJMP
+#define _CPP_CSETJMP 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <setjmp.h>
+ }
+ typedef jmp_buf _CPP_jmp_buf_capture;
+ inline int _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef jmp_buf
+# undef setjmp
+# define setjmp(__jb) ::_C_Swamp::_CPP_setjmp_capture(__jb)
+# undef longjmp
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ typedef ::_C_Swamp::_CPP_jmp_buf_capture jmp_buf;
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ using ::_C_Swamp::_C_Shadow::jmp_buf;
+ using ::_C_Swamp::longjmp;
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_csignal.h b/libstdc++-v3/shadow/bits/std_csignal.h
new file mode 100644
index 0000000..36f3cb7
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_csignal.h
@@ -0,0 +1,110 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#ifndef _CPP_CSIGNAL
+#define _CPP_CSIGNAL 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <signal.h>
+ typedef void (*_CPP_CSIGFUN_capture)(int); // a C function pointer
+ typedef sig_atomic_t _CPP_sig_atomic_t_capture;
+ const _CPP_CSIGFUN_capture _CPP_SIG_DFL_capture = SIG_DFL;
+ const _CPP_CSIGFUN_capture _CPP_SIG_ERR_capture = SIG_ERR;
+ const _CPP_CSIGFUN_capture _CPP_SIG_IGN_capture = SIG_IGN;
+ }
+ const int _CPP_SIGABRT_capture = SIGABRT;
+ const int _CPP_SIGFPE_capture = SIGFPE;
+ const int _CPP_SIGILL_capture = SIGILL;
+ const int _CPP_SIGINT_capture = SIGINT;
+ const int _CPP_SIGSEGV_capture = SIGSEGV;
+ const int _CPP_SIGTERM_capture = SIGTERM;
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef sig_atomic_t
+# undef raise
+# undef signal
+# undef SIG_DFL
+# define SIG_DFL \
+ reinterpret_cast<void (*)(int)>(::_C_Swamp::_CPP_SIG_DFL_capture)
+# undef SIG_ERR
+# define SIG_ERR \
+ reinterpret_cast<void (*)(int)>(::_C_Swamp::_CPP_SIG_ERR_capture)
+# undef SIG_IGN
+# define SIG_IGN \
+ reinterpret_cast<void (*)(int)>(::_C_Swamp::_CPP_SIG_IGN_capture)
+# undef SIGABRT
+# define SIGABRT ::_C_Swamp::_CPP_SIGABRT_capture
+# undef SIGFPE
+# define SIGFPE ::_C_Swamp::_CPP_SIGFPE_capture
+# undef SIGILL
+# define SIGILL ::_C_Swamp::_CPP_SIGILL_capture
+# undef SIGINT
+# define SIGINT ::_C_Swamp::_CPP_SIGINT_capture
+# undef SIGSEGV
+# define SIGSEGV ::_C_Swamp::_CPP_SIGSEGV_capture
+# undef SIGTERM
+# define SIGTERM ::_C_Swamp::_CPP_SIGTERM_capture
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ typedef ::_C_Swamp::_CPP_sig_atomic_t_capture sig_atomic_t;
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ using ::_C_Swamp::_C_Shadow::sig_atomic_t;
+ using ::_C_Swamp::raise;
+
+ inline void (*signal(int __sig, void (* __fun)(int)))(int)
+ { return reinterpret_cast<void (*)(int)>(
+ ::_C_Swamp::signal(__sig,
+ reinterpret_cast< ::_C_Swamp::_CPP_CSIGFUN_capture>(__fun)));
+ }
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ using ::std::signal;
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cstdarg.h b/libstdc++-v3/shadow/bits/std_cstdarg.h
new file mode 100644
index 0000000..29aee63
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cstdarg.h
@@ -0,0 +1,99 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#ifndef _CPP_CSTDARG
+#define _CPP_CSTDARG 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <stdarg.h>
+ }
+ typedef va_list _CPP_va_list_capture;
+# ifdef __GNUC__
+
+# elif
+ template <class T>
+ inline void _CPP_va_start_capture(va_list& __val, T& __v)
+ { va_start(__val, __v); }
+ template <class T>
+ inline void _CPP_va_arg_capture(va_list& __val, T& __arg)
+ { va_start(__val, __arg); }
+ template <class T>
+ inline T& _CPP_va_arg_capture(va_list& __val)
+ { return va_arg(__val, T); }
+ template <class T>
+ inline void _CPP_va_end(va_list& __val)
+ { va_end(__val); }
+# endif
+
+ // typedef size_t _CPP_size_t_capture; // handled in <cstddef>
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# ifdef __GNUC__
+
+# undef va_list
+ using _C_Swamp::__gnuc_va_list;
+
+# elif /* probably must be tailored for each compiler, as above. */
+
+# undef va_list
+# undef va_start
+# define va_start(a,b) ::_C_Swamp::_CPP_va_start_capture(a,b)
+# undef va_arg
+# define va_arg(a,b) ::_C_Swamp::_CPP_va_arg_capture<b>(a)
+# undef va_end
+# define va_end(a) ::_C_Swamp::_CPP_va_end_capture(a)
+
+# endif
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ typedef ::_C_Swamp::_CPP_va_list_capture va_list;
+ }
+ }
+ namespace std {
+ using ::_C_Swamp::_C_Shadow::va_list;
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cstddef.h b/libstdc++-v3/shadow/bits/std_cstddef.h
new file mode 100644
index 0000000..9ea0b6cc
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cstddef.h
@@ -0,0 +1,77 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.1 Types
+//
+
+#ifndef _CPP_CSTDDEF
+#define _CPP_CSTDDEF 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <stddef.h>
+ }
+ typedef ptrdiff_t _CPP_ptrdiff_t_capture;
+ typedef size_t _CPP_size_t_capture;
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+# undef ptrdiff_t
+# undef size_t
+# undef wchar_t
+# undef NULL
+# define NULL 0
+// # undef offsetof
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ typedef ::_C_Swamp::_CPP_ptrdiff_t_capture ptrdiff_t;
+ typedef ::_C_Swamp::_CPP_size_t_capture size_t;
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ using ::_C_Swamp::_C_Shadow::ptrdiff_t;
+ using ::_C_Swamp::_C_Shadow::size_t;
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cstdio.h b/libstdc++-v3/shadow/bits/std_cstdio.h
new file mode 100644
index 0000000..44e1633
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cstdio.h
@@ -0,0 +1,367 @@
+// -*- C++ -*- header wrapper.
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8.2 C Library files
+//
+
+// XXX problems? Uses size_t, va_list in interfaces.
+// Maybe <stdio.h> needs a size_t macro defined. Maybe it
+// clobbers va_list.
+//
+// Also,
+// uses va_start, va_end in implementation of vfprintf and
+// vfscanf. Maybe those shouldn't be inline.
+
+#ifndef _CPP_CSTDIO
+#define _CPP_CSTDIO 1
+
+# include <bits/std_cstddef.h> /* pick up size_t, NULL */
+# include <bits/std_cstdarg.h> /* pick up va_list, va_start, va_end */
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <stdio.h>
+ }
+ // size_t handled in <cstddef>
+ typedef FILE _CPP_FILE_capture;
+ typedef fpos_t _CPP_fpos_t_capture;
+ // NULL done in <stddef.h>
+ const int _CPP_IOFBF_capture = _IOFBF;
+ const int _CPP_IOLBF_capture = _IOLBF;
+ const int _CPP_IONBF_capture = _IONBF;
+ const int _CPP_BUFSIZ_capture = BUFSIZ;
+ const int _CPP_EOF_capture = EOF;
+ const int _CPP_FOPEN_MAX_capture = FOPEN_MAX;
+ const int _CPP_FILENAME_MAX_capture = FILENAME_MAX;
+ const int _CPP_L_tmpnam_capture = L_tmpnam;
+ const int _CPP_SEEK_CUR_capture = SEEK_CUR;
+ const int _CPP_SEEK_END_capture = SEEK_END;
+ const int _CPP_SEEK_SET_capture = SEEK_SET;
+ const int _CPP_TMP_MAX_capture = TMP_MAX;
+
+ inline FILE* _CPP_stderr_capture() { return stderr; }
+ inline FILE* _CPP_stdin_capture() { return stdin; }
+ inline FILE* _CPP_stdout_capture() { return stdout; }
+
+ inline int _CPP_getc_capture(FILE* __f) { return getc(__f); }
+ inline int _CPP_getchar_capture() { return getchar(); }
+ inline int _CPP_putc_capture(int __c, FILE* __f) { return putc(__c, __f); }
+ 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_Swamp::
+
+// # undef size_t /* handled in <cstddef> */
+# undef FILE
+# undef fpos_t
+# undef _IOFBF
+# define _IOFBF ::_C_Swamp::_CPP__IOFBF_capture
+# undef _IOLBF
+# define _IOLBF ::_C_Swamp::_CPP__IOLBF_capture
+# undef _IONBF
+# define _IONBF ::_C_Swamp::_CPP__IONBF_capture
+# undef BUFSIZ
+# define BUFSIZ ::_C_Swamp::_CPP_BUFSIZ_capture
+# undef EOF
+# define EOF ::_C_Swamp::_CPP_EOF_capture
+# undef FOPEN_MAX
+# define FOPEN_MAX ::_C_Swamp::_CPP_FOPEN_MAX_capture
+# undef FILENAME_MAX
+# define FILENAME_MAX ::_C_Swamp::_CPP_FILENAME_MAX_capture
+# undef L_tmpnam
+# define L_tmpnam ::_C_Swamp::_CPP_L_tmpnam_capture
+# undef SEEK_CUR
+# define SEEK_CUR ::_C_Swamp::_CPP_SEEK_CUR_capture
+# undef SEEK_END
+# define SEEK_END ::_C_Swamp::_CPP_SEEK_END_capture
+# undef SEEK_SET
+# define SEEK_SET ::_C_Swamp::_CPP_SEEK_SET_capture
+# undef TMP_MAX
+# define TMP_MAX ::_C_Swamp::_CPP_TMP_MAX_capture
+
+# undef remove
+# undef rename
+# undef tmpfile
+# undef tmpnam
+# undef fclose
+# undef fflush
+# undef fopen
+# undef freopen
+# undef setbuf
+# undef setvbuf
+# undef fprintf
+# undef fscanf
+# undef printf
+# undef scanf
+# undef sprintf
+# undef sscanf
+# undef vfprintf
+# undef vprintf
+# undef vsprintf
+# undef fgetc
+# undef fgets
+# undef fputc
+# undef fputs
+# undef getc
+# undef getchar
+# undef gets
+# undef putc
+# undef putchar
+# undef puts
+# undef ungetc
+# undef fread
+# undef fwrite
+# undef fgetpos
+# undef fseek
+# undef fsetpos
+# undef ftell
+# undef rewind
+# undef clearerr
+# undef feof
+# undef ferror
+# undef perror
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+
+ struct FILE : ::_C_Swamp::_CPP_FILE_capture { };
+ struct fpos_t { ::_C_Swamp::_CPP_fpos_t_capture _M_dummy; };
+
+ inline FILE* _CPP_stderr()
+ { return reinterpret_cast<FILE*>( ::_C_Swamp::_CPP_stderr_capture() ); }
+ inline FILE* _CPP_stdin()
+ { return reinterpret_cast<FILE*>( ::_C_Swamp::_CPP_stdin_capture() ); }
+ inline FILE* _CPP_stdout()
+ { return reinterpret_cast<FILE*>( ::_C_Swamp::_CPP_stdout_capture() ); }
+
+ using ::_C_Swamp::remove;
+ using ::_C_Swamp::rename;
+
+ inline FILE*
+ tmpfile() { return reinterpret_cast<FILE*>(::_C_Swamp::tmpfile()); }
+
+ using ::_C_Swamp::tmpnam;
+
+ inline int
+ fclose(FILE* __f) { return ::_C_Swamp::fclose(__f); }
+
+ inline int
+ fflush(FILE* __f) { return ::_C_Swamp::fflush(__f); }
+
+ inline FILE*
+ fopen(char const* __name, char const* __mode)
+ { return reinterpret_cast<FILE*>(::_C_Swamp::fopen(__name,__mode)); }
+
+ inline FILE*
+ freopen(char const* __name, char const* __mode, FILE* __f)
+ { return reinterpret_cast<FILE*>(
+ ::_C_Swamp::freopen(__name,__mode,__f)); }
+
+ inline void
+ setbuf(FILE* __f, char* __buf)
+ { return ::_C_Swamp::setbuf(__f, __buf); }
+
+ inline int
+ setvbuf(FILE* __f, char* __buf, int __mode, size_t __size)
+ { return ::_C_Swamp::setvbuf(__f, __buf, __mode, __size); }
+
+ inline int
+ fprintf(FILE* __f, char const* __fmt, ...)
+ { va_list __v; va_start(__v,__fmt);
+ int __i = ::_C_Swamp::vfprintf(__f, __fmt, __v); va_end(__v);
+ return __i; }
+
+ inline int
+ fscanf(FILE* __f, char const* __fmt, ...)
+ { va_list __v; va_start(__v,__fmt);
+ int __i = ::_C_Swamp::vfscanf(__f, __fmt, __v); va_end(__v);
+ return __i; }
+
+ using ::_C_Swamp::printf;
+ using ::_C_Swamp::scanf;
+ using ::_C_Swamp::sprintf;
+ using ::_C_Swamp::sscanf;
+
+ // using ::_C_Swamp::vfprintf;
+ inline int
+ vfprintf(FILE* __f, char const* __fmt, va_list __v)
+ { return ::_C_Swamp::vfprintf(__f, __fmt, __v); }
+
+ inline int
+ vprintf(char const* __fmt, va_list __v)
+ { return ::_C_Swamp::vprintf(__fmt, __v); }
+
+ inline int
+ vsprintf(char* __buf, char const* __fmt, va_list __v)
+ { return ::_C_Swamp::vsprintf(__buf, __fmt, __v); }
+
+ inline int
+ fgetc(FILE* __f) { return ::_C_Swamp::fgetc(__f); }
+
+ // using ::_C_Swamp::fgets;
+ inline char*
+ fgets(char* __buf, int __n, FILE* __f)
+ { return ::_C_Swamp::fgets(__buf, __n, __f); }
+
+ inline int
+ fputc(int __c, FILE* __f) { return ::_C_Swamp::fputc(__c, __f); }
+
+ inline int
+ fputs(char const* __s, FILE* __f)
+ { return ::_C_Swamp::fputs(__s, __f); }
+
+ inline int
+ getc(FILE* __f) { return ::_C_Swamp::_CPP_getc_capture(__f); }
+
+ inline int
+ getchar() { return ::_C_Swamp::_CPP_getchar_capture(); }
+
+ using ::_C_Swamp::gets;
+
+ inline int
+ putc(int __c, FILE* __f)
+ { return ::_C_Swamp::_CPP_putc_capture(__c, __f); }
+
+ inline int
+ putchar(int __c) { return ::_C_Swamp::_CPP_putchar_capture(__c); }
+
+ using ::_C_Swamp::puts;
+
+ // using ::_C_Swamp::ungetc;
+ inline int
+ ungetc(int __c, FILE* __f) { return ::_C_Swamp::ungetc(__c, __f); }
+
+ inline size_t
+ fread(void* __p, size_t __z, size_t __n, FILE* __f)
+ { return ::_C_Swamp::fread(__p,__z,__n,__f); }
+
+ inline size_t
+ fwrite(void const* __p, size_t __z, size_t __n, FILE* __f)
+ { return ::_C_Swamp::fwrite(__p,__z,__n,__f); }
+
+ inline int
+ fgetpos(FILE* __f, fpos_t* __pos)
+ { return ::_C_Swamp::fgetpos(__f,&__pos->_M_dummy); }
+
+ inline int
+ fseek(FILE* __f, long __off, int __how)
+ { return ::_C_Swamp::fseek(__f,__off,__how); }
+
+ inline int
+ fsetpos(FILE* __f, fpos_t const* __pos)
+ { return ::_C_Swamp::fsetpos(__f,&__pos->_M_dummy); }
+
+ inline long
+ ftell(FILE* __f) { return ::_C_Swamp::ftell(__f); }
+
+ inline void
+ rewind(FILE* __f) { return ::_C_Swamp::rewind(__f); }
+
+ inline void
+ clearerr(FILE* __f) { return ::_C_Swamp::clearerr(__f); }
+
+ inline int
+ feof(FILE* __f) { return ::_C_Swamp::_CPP_feof_capture(__f); }
+
+ inline int
+ ferror(FILE* __f) { return ::_C_Swamp::ferror(__f); }
+
+ using ::_C_Swamp::perror;
+
+ } // close namespace std::
+
+# undef stderr
+# define stderr ::std::_CPP_stderr()
+# undef stdin
+# define stdin ::std::_CPP_stdin()
+# undef stdout
+# define stdout ::std::_CPP_stdout()
+
+ namespace _C_Swamp {
+ 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_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cstdlib.h b/libstdc++-v3/shadow/bits/std_cstdlib.h
new file mode 100644
index 0000000..3427cd8
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cstdlib.h
@@ -0,0 +1,221 @@
+// -*- C++ -*- header wrapper
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+// Function decls in this header are overloaded on the
+// extern "C"-ness of arguments. This is a rich ground
+// for compiler bugs.
+
+#ifndef _CPP_CSTDLIB
+#define _CPP_CSTDLIB 1
+
+# include <bits/std_cstddef.h> /* pick up NULL, size_t */
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <stdlib.h>
+ typedef int (*_C_cmp_fun_ptr)(const void*, const void*); // C fn ptr
+ }
+ const int _CPP_EXIT_SUCCESS_capture = int(EXIT_SUCCESS);
+ const int _CPP_EXIT_FAILURE_capture = int(EXIT_FAILURE);
+ const int _CPP_RAND_MAX_capture = int(RAND_MAX);
+ inline int _CPP_MB_CUR_MAX_capture() { return int(MB_CUR_MAX); }
+ // typedef size_t _CPP_size_t_capture;
+ // typedef wchar_t _CPP_wchar_t_capture;
+ typedef div_t _CPP_div_t_capture;
+ typedef ldiv_t _CPP_ldiv_t_capture;
+
+ namespace _C_Shadow {
+ }
+ } // close namespace ::_C_Swamp::
+
+# undef size_t
+# undef wchar_t
+# undef div_t
+# undef ldiv_t
+
+// <cstddef>
+// # undef NULL
+// # define NULL 0
+# undef EXIT_SUCCESS
+# define EXIT_SUCCESS (::_C_Swamp::_CPP_EXIT_SUCCESS_capture)
+# undef EXIT_FAILURE
+# define EXIT_FAILURE (::_C_Swamp::_CPP_EXIT_FAILURE_capture)
+# undef RAND_MAX
+# define RAND_MAX (::_C_Swamp::_CPP_RAND_MAX_capture)
+# undef MB_CUR_MAX
+# define MB_CUR_MAX (::_C_Swamp::_CPP_MB_CUR_MAX_capture())
+
+# undef atof
+# undef atoi
+# undef atol
+# undef strtod
+# undef strtol
+# undef strtoul
+# undef rand
+# undef srand
+# undef calloc
+# undef free
+# undef malloc
+# undef realloc
+# undef abort
+# undef atexit
+# undef exit
+# undef getenv
+# undef system
+# undef bsearch
+# undef qsort
+# undef abs
+# undef div
+# undef labs
+# undef ldiv
+# undef mblen
+# undef mbtowc
+# undef wctomb
+# undef mbstowcs
+# undef wcstombs
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ // these come from <cstddef>
+ // typedef ::_C_Swamp::_CPP_size_t_capture size_t;
+ // typedef ::_C_Swamp::_CPP_wchar_t_capture wchar_t;
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ // using ::_C_Swamp::_C_Shadow::size_t;
+ // using ::_C_Swamp::_C_Shadow::wchar_t;
+
+ typedef ::_C_Swamp::_CPP_div_t_capture _CPP_div_t;
+ struct div_t : _CPP_div_t {};
+ typedef ::_C_Swamp::_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_Swamp::atof;
+ using ::_C_Swamp::atoi;
+ using ::_C_Swamp::atol;
+ using ::_C_Swamp::strtod;
+ using ::_C_Swamp::strtol;
+ using ::_C_Swamp::strtoul;
+ using ::_C_Swamp::rand;
+ using ::_C_Swamp::srand;
+ using ::_C_Swamp::calloc;
+ using ::_C_Swamp::free;
+ using ::_C_Swamp::malloc;
+ using ::_C_Swamp::realloc;
+ void abort(); // XXX must define this correctly for C++.
+
+#define _FUN_OVERLOAD_BUG
+ // extern "C" funs declared void f(int (*)()) overload OK with C++ funs,
+ // but not if declared void f(int (*)(void)).
+
+#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
+ using ::_C_Swamp::atexit; // XXX must redefine this one!
+#endif
+ int atexit(void (*)()); // XXX must define this.
+ // More precisely, we need an extern "C" atexit() that
+ // implements the correct semantics, but hides the link-name
+ // atexit found in the C library, and a C++ atexit too. If
+ // 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_Swamp::exit(__i); }
+
+ using ::_C_Swamp::getenv;
+ using ::_C_Swamp::system;
+
+ // XXX note that the raw conversion between C and C++ function
+ // pointers may not be portable to some targets; those targets need
+ // a forwarding function.
+
+#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
+ using ::_C_Swamp::bsearch; // overload
+#endif
+ inline void* bsearch(const void* __key, const void* __base, size_t __n,
+ size_t __size, int (*__cmp)(const void*, const void*))
+ { return ::_C_Swamp::bsearch(__key,__base,__n,__size,
+ reinterpret_cast< ::_C_Swamp::_C_cmp_fun_ptr>(__cmp)); } // XXX
+
+#if !defined(__GNUC__) || !defined(_FUN_OVERLOAD_BUG)
+ using ::_C_Swamp::qsort; // overload
+#endif
+ inline void qsort(void* __base, size_t __n, size_t __size,
+ int (*__cmp)(const void*, const void*))
+ { return ::_C_Swamp::qsort(__base,__n,__size,
+ reinterpret_cast< ::_C_Swamp::_C_cmp_fun_ptr>(__cmp)); } // XXX
+
+
+ inline int abs(int __x)
+ { return __x >= 0 ? __x : -__x; }
+ inline div_t div(int __n, int __d)
+ { _div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+ inline long labs(long __x)
+ { return __x >= 0 ? __x : -__x; }
+ inline ldiv_t ldiv(long __num, long __den)
+ { _ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+ using ::_C_Swamp::mblen;
+ using ::_C_Swamp::mbtowc;;
+ using ::_C_Swamp::wctomb;
+ using ::_C_Swamp::mbstowcs;
+ using ::_C_Swamp::wcstombs;
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ 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;
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cstring.h b/libstdc++-v3/shadow/bits/std_cstring.h
new file mode 100644
index 0000000..258082b
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cstring.h
@@ -0,0 +1,237 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6 C library
+//
+
+#ifndef _CPP_CSTRING
+#define _CPP_CSTRING 1
+# if defined __GLIBC__ && __GLIBC__ >= 2
+// We must not see the optimized string functions GNU libc defines.
+# define __NO_STRING_INLINES
+# endif
+
+# include <bits/std_cstddef.h> /* pick up size_t, NULL */
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <string.h>
+ }
+
+ // size_t
+ // NULL
+
+ // We do inline captures of most of these in case they
+ // have been optimized with macros.
+
+ inline void* _CPP_memcpy_capture(void* __s1, void const* __s2, size_t __n)
+ { return memcpy(__s1,__s2,__n); }
+ inline void* _CPP_memmove_capture(void* __s1, void const* __s2, size_t __n)
+ { return memmove(__s1,__s2,__n); }
+ inline void* _CPP_strcpy_capture(char* __s1, char const* __s2)
+ { return strcpy(__s1,__s2); }
+ inline char* _CPP_strncpy_capture(char* __s1, char const* __s2, size_t __n)
+ { return strncpy(__s1,__s2,__n); }
+ inline char* _CPP_strcat_capture(char* __s1, char const* __s2)
+ { return strcat(__s1,__s2); }
+ inline char* _CPP_strncat_capture(char* __s1, char const* __s2, size_t __n)
+ { return strncat(__s1,__s2,__n); }
+ inline int _CPP_memcmp_capture(void const* __s1,
+ void const* __s2, size_t __n)
+ { return memcmp(__s1,__s2,__n); }
+ inline int _CPP_strcmp_capture(char const* __s1, char const* __s2)
+ { return strcmp(__s1,__s2); }
+ inline int _CPP_strcoll_capture(char const* __s1, char const* __s2)
+ { return strcoll(__s1,__s2); }
+ inline int _CPP_strncmp_capture(char const* __s1,
+ char const* __s2, size_t __n)
+ { return strncmp(__s1,__s2,__n); }
+ inline size_t _CPP_strxfrm_capture(char* __b, char const* __s, size_t __n)
+ { return strxfrm(__b,__s,__n); }
+ inline void* _CPP_memchr_capture(void const* __s1, int __c, size_t __n)
+ { return memchr(__s1,__c,__n); }
+ inline char* _CPP_strchr_capture(char const* __s1, int __c)
+ { return strchr(__s1,__c); }
+ inline size_t _CPP_strcspn_capture(char const* __s1, char const* __s2)
+ { return strcspn(__s1,__s2); }
+ inline char* _CPP_strpbrk_capture(char const* __s1, char const* __s2)
+ { return strpbrk(__s1,__s2); }
+ inline char* _CPP_strrchr_capture(char const* __s1, int __c)
+ { return strrchr(__s1,__c); }
+ inline size_t _CPP_strspn_capture(char const* __s1, char const* __s2)
+ { return strspn(__s1,__s2); }
+ inline char* _CPP_strstr_capture(char const* __s1, char const* __s2)
+ { return strstr(__s1,__s2); }
+ inline char* _CPP_strtok_capture(char* __s1, char const* __s2)
+ { return strtok(__s1,__s2); }
+ inline void* _CPP_memset_capture(void* __s, int __c, size_t __n)
+ { return memset(__s,__c,__n); }
+ // inline char* _CPP_strerror_capture(int __num)
+ // { return strerror(__num); }
+ inline size_t _CPP_strlen_capture(char const* __s)
+ { return strlen(__s); }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+// size_t, NULL
+# undef memcpy
+# undef memmove
+# undef strcpy
+# undef strncpy
+# undef strcat
+# undef strncat
+# undef memcmp
+# undef strcmp
+# undef strcoll
+# undef strncmp
+# undef strxfrm
+# undef memchr
+# undef strchr
+# undef strcspn
+# undef strpbrk
+# undef strrchr
+# undef strspn
+# undef strstr
+# undef strtok
+# undef memset
+# undef strerror
+# undef strlen
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+ namespace std {
+
+ // Redefine most of these inline. Note that the
+ // C++ definition differs from C in some cases.
+
+ inline void* memcpy(void* __s1, void const* __s2, size_t __n)
+ { return ::_C_Swamp::_CPP_memcpy_capture(__s1,__s2,__n); }
+ inline void* memmove(void* __s1, void const* __s2, size_t __n)
+ { return ::_C_Swamp::_CPP_memmove_capture(__s1,__s2,__n); }
+ inline void* strcpy(char* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strcpy_capture(__s1,__s2); }
+ inline char* strncpy(char* __s1, char const* __s2, size_t __n)
+ { return ::_C_Swamp::_CPP_strncpy_capture(__s1,__s2,__n); }
+ inline char* strcat(char* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strcat_capture(__s1,__s2); }
+ inline char* strncat(char* __s1, char const* __s2, size_t __n)
+ { return ::_C_Swamp::_CPP_strncat_capture(__s1,__s2,__n); }
+ inline int memcmp(void const* __s1,
+ void const* __s2, size_t __n)
+ { return ::_C_Swamp::_CPP_memcmp_capture(__s1,__s2,__n); }
+ inline int strcmp(char const* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strcmp_capture(__s1,__s2); }
+ inline int strcoll(char const* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strcoll_capture(__s1,__s2); }
+ inline int strncmp(char const* __s1,
+ char const* __s2, size_t __n)
+ { return ::_C_Swamp::_CPP_strncmp_capture(__s1,__s2,__n); }
+ inline size_t strxfrm(char* __b, char const* __s, size_t __n)
+ { return ::_C_Swamp::_CPP_strxfrm_capture(__b,__s,__n); }
+
+ inline void const* memchr(void const* __s1, int __c, size_t __n)
+ { return ::_C_Swamp::_CPP_memchr_capture(__s1,__c,__n); }
+ inline void* memchr( void* __s1, int __c, size_t __n)
+ { return ::_C_Swamp::_CPP_memchr_capture(__s1,__c,__n); }
+
+ inline char const* strchr(char const* __s1, int __c)
+ { return ::_C_Swamp::_CPP_strchr_capture(__s1,__c); }
+ inline char* strchr( char* __s1, int __c)
+ { return ::_C_Swamp::_CPP_strchr_capture(__s1,__c); }
+
+ inline size_t strcspn(char const* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strcspn_capture(__s1,__s2); }
+
+ inline char const* strpbrk(char const* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strpbrk_capture(__s1,__s2); }
+ inline char* strpbrk( char* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strpbrk_capture(__s1,__s2); }
+
+ inline char const* strrchr(char const* __s1, int __c)
+ { return ::_C_Swamp::_CPP_strrchr_capture(__s1,__c); }
+ inline char* strrchr( char* __s1, int __c)
+ { return ::_C_Swamp::_CPP_strrchr_capture(__s1,__c); }
+
+ inline size_t strspn(char const* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strspn_capture(__s1,__s2); }
+
+ inline char const* strstr(char const* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strstr_capture(__s1,__s2); }
+ inline char* strstr( char* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strstr_capture(__s1,__s2); }
+
+ inline char* strtok(char* __s1, char const* __s2)
+ { return ::_C_Swamp::_CPP_strtok_capture(__s1,__s2); }
+ inline void* memset(void* __s, int __c, size_t __n)
+ { return ::_C_Swamp::_CPP_memset_capture(__s,__c,__n); }
+
+ using ::_C_Swamp::strerror;
+
+ inline size_t strlen(char const* __s)
+ { return ::_C_Swamp::_CPP_strlen_capture(__s); }
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ 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_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_ctime.h b/libstdc++-v3/shadow/bits/std_ctime.h
new file mode 100644
index 0000000..4caba88
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_ctime.h
@@ -0,0 +1,127 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Date and time
+//
+
+#ifndef _CPP_CTIME
+#define _CPP_CTIME 1
+
+# include <bits/std_cstddef.h> /* pick up size_t, NULL */
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <time.h>
+ }
+ inline clock_t _CPP_CLOCKS_PER_SEC_capture()
+ { return CLOCKS_PER_SEC; }
+ // typedef size_t _CPP_size_t_capture; // handled in <cstddef>
+ typedef clock_t _CPP_clock_t_capture;
+ typedef time_t _CPP_time_t_capture;
+ typedef struct tm _CPP_tm_capture;
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+// # undef NULL
+// # define NULL 0 /* handled in <cstddef> */
+# undef CLOCKS_PER_SEC
+# define CLOCKS_PER_SEC (::_C_Swamp::_CPP_CLOCKS_PER_SEC_capture())
+
+# undef size_t /* handled in <cstddef> */
+# undef clock_t
+# undef time_t
+# undef tm
+# undef clock
+# undef difftime
+# undef mktime
+# undef time
+# undef asctime
+# undef ctime
+# undef gmtime
+# undef localtime
+# undef strftime
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ // typedef ::_C_Swamp::_CPP_size_t_capture size_t;
+ typedef ::_C_Swamp::_CPP_clock_t_capture clock_t;
+ typedef ::_C_Swamp::_CPP_time_t_capture time_t;
+ }
+ }
+ namespace std {
+
+ // Adopt C names into std::
+ // using ::_C_Swamp::_C_Shadow::size_t;
+ using ::_C_Swamp::_C_Shadow::clock_t;
+ using ::_C_Swamp::_C_Shadow::time_t;
+
+ // note: still a POD type:
+ struct tm : ::_C_Swamp::_CPP_tm_capture { };
+
+ using ::_C_Swamp::clock;
+ using ::_C_Swamp::difftime;
+ using ::_C_Swamp::mktime;
+ using ::_C_Swamp::time;
+
+ inline char* asctime(const tm* __tp)
+ { return ::_C_Swamp::asctime(
+ static_cast< ::_C_Swamp::_CPP_tm_capture const*>(__tp)); }
+
+ using ::_C_Swamp::ctime;
+
+ inline tm* gmtime(time_t const* __tp)
+ { return reinterpret_cast<tm*>(::_C_Swamp::gmtime(__tp)); }
+
+ inline tm* localtime(const time_t* __tp)
+ { return reinterpret_cast<tm*>(::_C_Swamp::localtime(__tp)); }
+
+ inline size_t strftime(char* __buf, size_t __maxsz,
+ char const* __fmt, tm const* __tp)
+ { return ::_C_Swamp::strftime(__buf, __maxsz, __fmt,
+ static_cast< ::_C_Swamp::_CPP_tm_capture const*>(__tp)); }
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ using ::std::tm;
+ using ::std::asctime;
+ using ::std::gmtime;
+ using ::std::localtime;
+ using ::std::strftime;
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/std_cwchar.h b/libstdc++-v3/shadow/bits/std_cwchar.h
new file mode 100644
index 0000000..bd1ec65
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cwchar.h
@@ -0,0 +1,278 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21
+
+// XXX: this file still needs hackery for system version dependencies
+
+#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_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <wchar.h>
+ }
+ // NULL, size_t handled in <cstddef>
+
+ // wchar_t
+ typedef wint_t _CPP_wint_t_capture;
+ typedef mbstate_t _CPP_mbstate_t_capture;
+ const wint_t _CPP_WEOF_capture = (wint_t)(WEOF);
+
+#if 0 /* XXX glibc-2.0 does not implement these. */
+ inline wint_t _CPP_getwc_capture(FILE* __f)
+ { return getwc(__f); }
+ inline wint_t _CPP_getwchar_capture()
+ { return getwchar(); }
+ inline wint_t _CPP_putwc_capture(wint_t __c, FILE* __f)
+ { return putwc(__c,__f); }
+ inline wint_t _CPP_putwchar_capture(wint_t __c)
+ { return putwchar(__c); }
+#endif
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+// # undef size_t /* handled in <cstddef> */
+# undef wchar_t
+# undef wint_t
+# undef mbstate_t
+# undef WEOF
+# define WEOF ::_C_Swamp::_CPP_WEOF_capture
+
+// the following are not in glibc-2.0
+# undef fgetwc
+# undef fgetws
+# undef fputwc
+# undef fputws
+# undef ungetwc
+# undef getwc
+# undef getwchar
+# undef putwc
+# undef putwchar
+# undef wprintf
+# undef wsprintf
+# undef wvsprintf
+# undef wfsprintf
+# undef wscanf
+# undef wsscanf
+# undef wvsscanf
+# undef wfscanf
+// XXX etc.
+
+# undef wcscpy
+# undef wcscat
+# undef wcscmp
+# undef wcscoll
+# undef wcsxfrm
+# undef wcsdup
+# undef wcschr
+# undef wcscspn
+# undef wcspbrk
+# undef wcsstr
+# undef wcstok
+# undef wcslen
+# undef wmemchr
+# undef wmemcmp
+# undef wmemcpy
+# undef wmemmove
+# undef wmemset
+# undef btowc
+# undef wctob
+# undef mbsinit
+# undef mbrtowc
+# undef wcrtomb
+# undef mbrlen
+# undef mbsrtowcs
+# undef wcsrtombs
+#ifdef __USE_GNU
+# undef mbsnrtowcs
+# undef mbsnrtombs
+# undef wcwidth
+# undef wcswidth
+# undef wcscmpy
+#endif
+# undef wcstod
+# undef wcstol
+# undef wcstoul
+# undef wcsncat
+# undef wcsncmp
+# undef wcsncpy
+# undef wcsrchr
+# undef wcsspn
+
+ // XXX a bunch more names are required under C89 Amendment 1,
+ // but they are not uniformly implemented.
+
+ // XXX the following are not supposed to be defined in <wchar.h>,
+ // but Sun does anyway.
+# undef iswalpha
+# undef iswupper
+# undef iswlower
+# undef iswdigit
+# undef iswxdigit
+# undef iswalnum
+# undef iswspace
+# undef iswpunct
+# undef iswprint
+# undef iswgraph
+# undef iswcntrl
+# undef iswctype
+# undef towlower
+# undef towupper
+# undef wctype_t
+# undef wctype
+# undef wcspbrk
+# undef wcswcs
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ typedef ::_C_Swamp::_CPP_wint_t_capture wint_t;
+ // typedef ::_C_Swamp::_CPP_wctype_t_capture wctype_t;
+ }
+ }
+ namespace std {
+
+ // using ::_C_Swamp::wchar_t;
+ using ::_C_Swamp::_C_Shadow::wint_t;
+ // using ::_C_Swamp::WEOF;
+
+ // XXX this might better be replaced with one unrelated to the C mbstate_t.
+
+ struct mbstate_t {
+ _C_Swamp::_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)
+ { return ::_C_Swamp::fgetwc(__f); }
+ inline wchar_t* fgetws(wchar_t* __s, int __n, FILE* __f)
+ { return ::_C_Swamp::fgetws(__s,__n,__f); }
+ inline wint_t fputwc(wint_t __c, FILE* __f)
+ { return ::_C_Swamp::fputwc(__c,__f); }
+ inline int fputws(const wchar_t* __s, FILE* __f)
+ { return ::_C_Swamp::fputws(__s,__f); }
+ inline wint_t ungetwc(wint_t __c, FILE* __f)
+ { return ::_C_Swamp::ungetwc(__c,__f); }
+
+ inline wint_t getwc(FILE* __f)
+ { return ::_C_Swamp::_CPP_getwc_capture(__f); }
+ inline wint_t getwchar()
+ { return ::_C_Swamp::_CPP_getwchar_capture(); }
+ inline wint_t putwc(wint_t __c, FILE* __f)
+ { return ::_C_Swamp::_CPP_putwc_capture(__c,__f); }
+ inline wint_t putwchar(wint_t __c)
+ { return ::_C_Swamp::_CPP_putwchar_capture(__c); }
+
+ // similarly wprintf etc.
+#endif
+
+ using ::_C_Swamp::wcscpy;
+ using ::_C_Swamp::wcscat;
+ using ::_C_Swamp::wcscmp;
+ using ::_C_Swamp::wcscoll;
+ using ::_C_Swamp::wcsxfrm;
+ using ::_C_Swamp::wcschr;
+ using ::_C_Swamp::wcscspn;
+ using ::_C_Swamp::wcspbrk;
+ using ::_C_Swamp::wcstok;
+ using ::_C_Swamp::wcslen;
+#ifndef __sun
+ using ::_C_Swamp::wcsdup;
+ using ::_C_Swamp::wcsstr;
+ using ::_C_Swamp::wmemchr;
+ using ::_C_Swamp::wmemcmp;
+ using ::_C_Swamp::wmemcpy;
+ using ::_C_Swamp::wmemmove;
+ using ::_C_Swamp::wmemset;
+ using ::_C_Swamp::btowc;
+ using ::_C_Swamp::wctob;
+ using ::_C_Swamp::mbsinit;
+ using ::_C_Swamp::mbrtowc;
+ using ::_C_Swamp::wcrtomb;
+ using ::_C_Swamp::mbrlen;
+#endif
+#ifdef __USE_GNU
+ using ::_C_Swamp::mbsrtowcs;
+ using ::_C_Swamp::wcsrtombs;
+ using ::_C_Swamp::mbsnrtowcs;
+ using ::_C_Swamp::mbsnrtombs;
+ using ::_C_Swamp::wcscmpy
+ using ::_C_Swamp::wcwidth;
+ using ::_C_Swamp::wcswidth;
+#endif
+ using ::_C_Swamp::wcstod;
+ using ::_C_Swamp::wcstol;
+ using ::_C_Swamp::wcstoul;
+ using ::_C_Swamp::wcsncat;
+ using ::_C_Swamp::wcsncmp;
+ using ::_C_Swamp::wcsncpy;
+ using ::_C_Swamp::wcsrchr;
+ using ::_C_Swamp::wcsspn;
+ // using ::_C_Swamp::wcswcs;
+
+#if 0 /* not implemented in glibc-2 */
+ inline size_t wcsftime(wchar_t* __s, size_t __n,
+ char const* __fmt, struct tm const* __tmb)
+ { return ::_C_Swamp::wcsftime(__s,__n,__fmt,__tmb); }
+
+ using ::_C_Swamp::wctype;
+#endif
+
+ }
+
+ namespace _C_Swamp {
+ 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_SWAMP_
+
+#endif
diff --git a/libstdc++-v3/shadow/bits/std_cwctype.h b/libstdc++-v3/shadow/bits/std_cwctype.h
new file mode 100644
index 0000000..e3b1a29
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/std_cwctype.h
@@ -0,0 +1,117 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: ???
+//
+
+// XXX this is not complete
+
+#ifndef _CPP_CWCTYPE
+#define _CPP_CWCTYPE 1
+
+# include <bits/std_cwchar.h> /* pick up wint_t, WEOF */
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <wctype.h>
+ }
+ 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_Swamp::
+
+# undef size_t /* handled in <cstddef> */
+# undef wchar_t
+# undef wint_t
+# undef wctype_t
+# undef wctrans_t
+// # undef WEOF
+# undef iswalpha
+# undef iswupper
+# undef iswlower
+# undef iswdigit
+# undef iswxdigit
+# undef iswalnum
+# undef iswspace
+# undef iswpunct
+# undef iswprint
+# undef iswgraph
+# undef iswcntrl
+# undef iswctype
+# undef towlower
+# undef towupper
+
+// SunOS macros
+# undef iswascii
+# undef iscodeset0
+# undef iscodeset1
+# undef iscodeset2
+# undef iscodeset3
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ typedef ::_C_Swamp::_CPP_wctype_t_capture wctype_t;
+ typedef ::_C_Swamp::_CPP_wctrans_t_capture wctrans_t;
+ }
+ }
+ namespace std {
+ using ::_C_Swamp::_C_Shadow::wctype_t;
+ using ::_C_Swamp::_C_Shadow::wctrans_t;
+
+ // XXX probably should capture these to inlines.
+ using ::_C_Swamp::iswalpha;
+ using ::_C_Swamp::iswupper;
+ using ::_C_Swamp::iswlower;
+ using ::_C_Swamp::iswdigit;
+ using ::_C_Swamp::iswxdigit;
+ using ::_C_Swamp::iswalnum;
+ using ::_C_Swamp::iswspace;
+ using ::_C_Swamp::iswpunct;
+ using ::_C_Swamp::iswprint;
+ using ::_C_Swamp::iswgraph;
+ using ::_C_Swamp::iswcntrl;
+ using ::_C_Swamp::iswctype;
+ using ::_C_Swamp::towlower;
+ using ::_C_Swamp::towupper;
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
diff --git a/libstdc++-v3/shadow/bits/wrap_libio.h b/libstdc++-v3/shadow/bits/wrap_libio.h
new file mode 100644
index 0000000..3632043
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/wrap_libio.h
@@ -0,0 +1,70 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Date and time
+//
+
+// XXX incomplete
+
+#ifndef _CPP_WRAP_LIBIO_H
+#define _CPP_WRAP_LIBIO_H 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <libio.h>
+ }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+// # undef that
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ // typedef stuff
+ }
+ }
+ namespace std {
+
+ // using ::_C_Swamp::stuff
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ // using ::std::stuff
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/bits/wrap_unistd.h b/libstdc++-v3/shadow/bits/wrap_unistd.h
new file mode 100644
index 0000000..109a610
--- /dev/null
+++ b/libstdc++-v3/shadow/bits/wrap_unistd.h
@@ -0,0 +1,72 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Date and time
+//
+
+// XXX incomplete
+
+#ifndef _CPP_WRAP_UNISTD_H
+#define _CPP_WRAP_UNISTD_H 1
+
+ namespace _C_Swamp {
+ extern "C" {
+# define _IN_C_SWAMP_
+# include_next <unistd.h>
+ }
+
+ namespace _C_Shadow { }
+ } // close namespace ::_C_Swamp::
+
+// # undef that
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ // typedef stuff
+ }
+ }
+ namespace std {
+
+ using ::_C_Swamp::read;
+ using ::_C_Swamp::write;
+ using ::_C_Swamp::open;
+
+ } // close namespace std::
+
+ namespace _C_Swamp {
+ namespace _C_Shadow {
+ // using ::std::stuff
+ }
+ }
+
+# undef _IN_C_SWAMP_
+
+#endif
+
diff --git a/libstdc++-v3/shadow/sys/cdefs.h b/libstdc++-v3/shadow/sys/cdefs.h
new file mode 100644
index 0000000..ebcad9a
--- /dev/null
+++ b/libstdc++-v3/shadow/sys/cdefs.h
@@ -0,0 +1,42 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+
+#ifndef _CPP_SYS_CDEFS_H
+# define _CPP_SYS_CDEFS_H
+
+# include_next <sys/cdefs.h>
+
+// glibc-2 hackery. Other systems likely require other hacks.
+#undef __BEGIN_DECLS
+#define __BEGIN_DECLS
+#undef __END_DECLS
+#define __END_DECLS
+
+#endif