OSDN Git Service

2000-12-21 Benjamin Kosnik <bkoz@redhat.com>
authorbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Dec 2000 23:54:19 +0000 (23:54 +0000)
committerbkoz <bkoz@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 21 Dec 2000 23:54:19 +0000 (23:54 +0000)
* configure.in: Change GLIBCPP_ENABLE_SHADOW to
GLIBCPP_ENABLE_CHEADERS.
* acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to
ENABLE_CHEADERS.  C_INCLUDE_DIR defaults to c_std from c.
* aclocal.m4: Regenerate.
* configure: Regenerate.
* include/c: Move to ...
* include/c_std: ...here.
* include/c_std: Move to ...
* include/c_shadow: ...here.
* include/c: Repopulate, with simple headers.
* docs/html/configopts.html: Adjust docs.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@38436 138bc75d-0d04-0410-961f-82ee72b054a4

17 files changed:
libstdc++-v3/include/c/bits/std_cassert.h
libstdc++-v3/include/c/bits/std_cctype.h
libstdc++-v3/include/c/bits/std_cerrno.h
libstdc++-v3/include/c/bits/std_cfloat.h
libstdc++-v3/include/c/bits/std_climits.h
libstdc++-v3/include/c/bits/std_clocale.h
libstdc++-v3/include/c/bits/std_cmath.h
libstdc++-v3/include/c/bits/std_csetjmp.h
libstdc++-v3/include/c/bits/std_csignal.h
libstdc++-v3/include/c/bits/std_cstdarg.h
libstdc++-v3/include/c/bits/std_cstddef.h
libstdc++-v3/include/c/bits/std_cstdio.h
libstdc++-v3/include/c/bits/std_cstdlib.h
libstdc++-v3/include/c/bits/std_cstring.h
libstdc++-v3/include/c/bits/std_ctime.h
libstdc++-v3/include/c/bits/std_cwchar.h
libstdc++-v3/include/c/bits/std_cwctype.h

index 3292838..e069274 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 
 #pragma GCC system_header
 #include <assert.h>
+
+
+
+
+
+
+
+
+
+
index 5a423a0..a6a882b 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #ifndef _CPP_CCTYPE
 #define _CPP_CCTYPE 1
 
+#include <bits/c++config.h>
+
 #pragma GCC system_header
 #include <ctype.h>
 
+// Get rid of those macros defined in <ctype.h> in lieu of real functions.
+#undef isalnum
+#undef isalpha
+#undef isblank
+#undef iscntrl
+#undef isdigit
+#undef isgraph
+#undef islower
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef tolower
+#undef toupper
+
+namespace std
+{
+  extern "C" int isalnum(int __c);
+  extern "C" int isalpha(int __c);
+  extern "C" int isblank(int __c);
+  extern "C" int iscntrl(int __c);
+  extern "C" int isdigit(int __c);
+  extern "C" int isgraph(int __c);
+  extern "C" int islower(int __c);
+  extern "C" int isprint(int __c);
+  extern "C" int ispunct(int __c);
+  extern "C" int isspace(int __c);
+  extern "C" int isupper(int __c);
+  extern "C" int isxdigit(int __c);
+  extern "C" int tolower(int __c);
+  extern "C" int toupper(int __c);
+}
+
 #endif 
+
+
+
+
+
+
+
+
+
+
+
+
index 23a0060..6828827 100644 (file)
@@ -1,6 +1,6 @@
 // The -*- C++ -*- error number header.
 
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// 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
 #pragma GCC system_header
 #include <errno.h>
 
+namespace std 
+{
+  extern "C" int errno;
+}
+
 #endif
+
+
+
+
index 7446997..1444be1 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
@@ -40,3 +40,4 @@
 #include <float.h>
 
 #endif
+
index 05795a6..071dd05 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
@@ -40,3 +40,8 @@
 #include <limits.h>
 
 #endif
+
+
+
+
+
index 69ea1f6..18d73dd 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <locale.h>
 
+namespace std
+{
+  using ::lconv;
+  extern "C" char* setlocale(int, const char*); 
+  extern "C" struct lconv* localeconv(void);
+}
+
 #endif
+
+
+
index 2625eac..01cf652 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- C math library.
 
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000 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
 
 #ifndef _CPP_CMATH
 #define _CPP_CMATH 1
+
+#include <bits/c++config.h>
+#include <bits/std_cstdlib.h>
  
 #pragma GCC system_header
 #include <math.h>
 
+namespace std 
+{
+  // Forward declaration of a helper function.  This really should be
+  // an `exported' forward declaration.
+  template<typename _Tp> _Tp __cmath_power(_Tp, unsigned int);
+
+  template<typename _Tp>
+  inline _Tp
+    __cmath_abs(_Tp __x)
+    {
+      return __x < _Tp() ? -__x : __x;
+    }
+
+  inline long 
+  abs(long __i) { return ::labs(__i); }
+
+  inline ldiv_t
+  div(long __i, long __j) { return ::ldiv(__i, __j); }
+
+#if _GLIBCPP_HAVE___BUILTIN_FABSF
+  inline float 
+  abs(float __x) { return __builtin_fabsf(__x); }
+#elif _GLIBCPP_HAVE_FABSF
+  inline float 
+  abs(float __x) { return ::fabsf(__x); }
+#else
+  inline float 
+  abs(float __x) { return __cmath_abs(__x); }
+#endif
+
+#if _GLIBCPP_HAVE_ACOSF
+  inline float 
+  acos(float __x) { return ::acosf(__x); }
+#else
+  inline float 
+  acos(float __x) { return ::acos(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ASINF
+  inline float 
+  asin(float __x) { return ::asinf(__x); }
+#else
+  inline float 
+  asin(float __x) { return ::asin(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATANF
+  inline float 
+  atan(float __x) { return ::atanf(__x); }
+#else
+  inline float 
+  atan(float __x) { return ::atan(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATAN2F
+  inline float 
+  atan2(float __y, float __x) { return ::atan2f(__y, __x); }
+#else
+  inline float 
+  atan2(float __y, float __x)
+  { return ::atan2(static_cast<double>(__y), static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_CEILF
+  inline float 
+  ceil(float __x) { return ::ceilf(__x); }
+#else
+  inline float 
+  ceil(float __x) { return ::ceil(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_COSF
+  inline float 
+  cos(float __x) { return __builtin_cosf(__x); }
+#elif _GLIBCPP_HAVE_COSF
+  inline float 
+  cos(float __x) { return ::cosf(__x); }
+#else
+  inline float 
+  cos(float __x) { return ::cos(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_COSHF
+  inline float 
+  cosh(float __x) { return ::coshf(__x); }
+#else
+  inline float 
+  cosh(float __x) { return ::cosh(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_EXPF
+  inline float 
+  exp(float __x) { return ::expf(__x); }
+#else
+  inline float 
+  exp(float __x) { return ::exp(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_FABSF
+  inline float 
+  fabs(float __x) { return __builtin_fabsf(__x); }
+#elif _GLIBCPP_HAVE_FABSF
+  inline float 
+  fabs(float __x) { return ::fabsf(__x); }
+#else
+  inline float 
+  fabs(float __x) { return __cmath_abs(__x); }
+#endif
+
+#if _GLIBCPP_HAVE_FLOORF
+  inline float 
+  floor(float __x) { return ::floorf(__x); }
+#else
+  inline float 
+  floor(float __x) { return ::floor(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_FMODF
+  inline float 
+  fmod(float __x, float __y) { return ::fmodf(__x, __y); }
+#else
+  inline float 
+  fmod(float __x, float __y)
+  { return ::fmod(static_cast<double>(__x), static_cast<double>(__y)); }
+#endif
+
+#if _GLIBCPP_HAVE_FREXPF
+  inline float 
+  frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); }
+#else
+  inline float 
+  frexp(float __x, int* __exp) { return ::frexp(__x, __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LDEXPF
+  inline float 
+  ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); }
+#else
+  inline float 
+  ldexp(float __x, int __exp)
+  { return ::ldexp(static_cast<double>(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LOGF
+  inline float 
+  log(float __x) { return ::logf(__x); }
+#else
+  inline float log(float __x)
+  { return ::log(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_LOG10F
+  inline float 
+  log10(float __x) { return ::log10f(__x); }
+#else
+  inline float 
+  log10(float __x) { return ::log10(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_MODFF
+  inline float 
+  modf(float __x, float* __iptr) { return ::modff(__x, __iptr); }
+#else
+  inline float 
+  modf(float __x, float* __iptr)
+  {
+    double __tmp;
+    double __res = ::modf(static_cast<double>(__x), &__tmp);
+    *__iptr = static_cast<float>(__tmp);
+    return __res;
+  }
+#endif
+
+  template<typename _Tp>
+    inline _Tp
+    __pow_helper(_Tp __x, int __n)
+    {
+      return __n < 0
+        ? _Tp(1)/__cmath_power(__x, -__n)
+        : __cmath_power(__x, __n);
+    }
+  
+#if _GLIBCPP_HAVE_POWF
+  inline float 
+  pow(float __x, float __y) { return ::powf(__x, __y); }
+#else
+  inline float 
+  pow(float __x, float __y)
+  { return ::pow(static_cast<double>(__x), static_cast<double>(__y)); }
+#endif
+
+  inline float 
+  pow(float __x, int __n)
+  {
+    return __pow_helper(__x, __n);
+  }
+
+#if _GLIBCPP_HAVE___BUILTIN_SINF
+  inline float 
+  sin(float __x) { return __builtin_sinf(__x); }
+#elif _GLIBCPP_HAVE_SINF
+  inline float 
+  sin(float __x) { return ::sinf(__x); }
+#else
+  inline float 
+  sin(float __x) { return ::sin(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_SINHF
+  inline float 
+  sinh(float __x) { return ::sinhf(__x); }
+#else
+  inline float 
+  sinh(float __x) { return ::sinh(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_SQRTF
+  inline float 
+  sqrt(float __x) { return __builtin_sqrtf(__x); }
+#elif _GLIBCPP_HAVE_SQRTF
+  inline float 
+  sqrt(float __x) { return ::sqrtf(__x); }
+#else
+  inline float 
+  sqrt(float __x) { return ::sqrt(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANF
+  inline float 
+  tan(float __x) { return ::tanf(__x); }
+#else
+  inline float 
+  tan(float __x) { return ::tan(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANHF
+  inline float 
+  tanh(float __x) { return ::tanhf(__x); }
+#else
+  inline float 
+  tanh(float __x) { return ::tanh(static_cast<double>(__x)); }
+#endif
+
+
+  extern "C" double acos(double __x);
+
+  extern "C" double asin(double __x);
+
+  extern "C" double atan(double __x);
+
+  extern "C" double atan2(double __y, double __x);
+
+  extern "C" double ceil(double __x);
+
+#if _GLIBCPP_HAVE___BUILTIN_COS
+  inline double 
+  cos(double __x) { return __builtin_cos(__x); }
+#else
+  extern "C" double cos(double __x);
+#endif
+
+  extern "C" double cosh(double __x);
+
+  extern "C" double exp(double __x);
+
+#if _GLIBCPP_HAVE___BUILTIN_FABS
+  inline double 
+  fabs(double __x) { return __builtin_fabs(__x); }
+#else
+  extern "C" double fabs(double __x);
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_FABS
+  inline double 
+  abs(double __x) { return __builtin_fabs(__x); }
+#else
+  inline double
+  abs(double __x) { return fabs(__x); }
+#endif
+
+  extern "C" double floor(double __x);
+
+  extern "C" double fmod(double __x, double __y);
+
+  extern "C" double frexp(double __x, int* __exp);
+
+  extern "C" double ldexp(double __x, int __exp);
+
+  extern "C" double log(double __x);
+
+  extern "C" double log10(double __x);
+
+  extern "C" double modf(double __x, double* __iptr);
+
+  extern "C" double pow(double __x, double __y);
+
+  inline double 
+  pow(double __x, int __i)
+  {
+    return __pow_helper(__x, __i);
+  }
+
+#if _GLIBCPP_HAVE___BUILTIN_SIN
+  inline double 
+  sin(double __x) { return __builtin_sin(__x); }
+#else
+  extern "C" double sin(double __x);
+#endif
+
+  extern "C" double sinh(double __x);
+
+#if _GLIBCPP_HAVE___BUILTIN_SQRT
+  inline double 
+  sqrt(double __x) { return __builtin_fsqrt(__x); }
+#else
+  extern "C" double sqrt(double __x);
+#endif
+
+  extern "C" double tan(double __x);
+
+  extern "C" double tanh(double __x);
+
+
+#if _GLIBCPP_HAVE___BUILTIN_FABSL
+  inline long double 
+  abs(long double __x) { return __builtin_fabsl(__x); }
+#elif _GLIBCPP_HAVE_FABSL
+  inline long double 
+  abs(long double __x) { return ::fabsl(__x); }
+#else
+  inline long double 
+  abs(long double __x) { return __cmath_abs(__x); }
+#endif
+
+#if _GLIBCPP_HAVE_ACOSL
+  inline long double 
+  acos(long double __x) { return ::acosl(__x); }
+#else
+  inline long double 
+  acos(long double __x) { return ::acos(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ASINL
+  inline long double 
+  asin(long double __x) { return ::asinl(__x); }
+#else
+  inline long double 
+  asin(long double __x) { return ::asin(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATANL
+  inline long double 
+  atan(long double __x) { return ::atanl(__x); }
+#else
+  inline long double 
+  atan(long double __x) { return ::atan(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATAN2L
+  inline long double 
+  atan2(long double __y, long double __x) { return ::atan2l(__y, __x); }
+#else
+  inline long double 
+  atan2(long double __y, long double __x) 
+  { return ::atan2(static_cast<double>(__y), static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_CEILL
+  inline long double 
+  ceil(long double __x) { return ::ceill(__x); }
+#else
+  inline long double 
+  ceil(long double __x) { return ::ceil(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_COSL
+  inline long double 
+  cos(long double __x) { return __builtin_cosl(__x); }
+#elif _GLIBCPP_HAVE_COSL
+  inline long double 
+  cos(long double __x) { return ::cosl(__x); }
+#else
+  inline long double 
+  cos(long double __x) { return ::cos(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_COSHL
+  inline long double 
+  cosh(long double __x) { return ::coshl(__x); }
+#else
+  inline long double 
+  cosh(long double __x) { return ::cosh(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_EXPL
+  inline long double 
+  exp(long double __x) { return ::expl(__x); }
+#else
+  inline long double 
+  exp(long double __x) { return ::exp(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_FABSL
+  inline long double 
+  fabs(long double __x) { return __builtin_fabsl(__x); }
+#elif _GLIBCPP_HAVE_FABSL
+  inline long double 
+  fabs(long double __x) { return ::fabsl(__x); }
+#else
+  inline long double 
+  fabs(long double __x) { return __cmath_abs(__x); }
+#endif
+
+#if _GLIBCPP_HAVE_FLOORL
+  inline long double 
+  floor(long double __x) { return ::floorl(__x); }
+#else
+  inline long double 
+  floor(long double __x) { return ::floor(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_FMODL
+  inline long double 
+  fmod(long double __x, long double __y) { return ::fmodl(__x, __y); }
+#else
+  inline long double 
+  fmod(long double __x, long double __y) 
+  { return ::fmod(static_cast<double>(__x), static_cast<double>(__y)); }
+#endif
+
+#if _GLIBCPP_HAVE_FREXPL
+  inline long double 
+  frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); }
+#else
+  inline long double 
+  frexp(long double __x, int* __exp) 
+  { return ::frexp(static_cast<double>(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LDEXPL
+  inline long double 
+  ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); }
+#else
+  inline long double 
+  ldexp(long double __x, int __exp) 
+  { return ::ldexp(static_cast<double>(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LOGL
+  inline long double 
+  log(long double __x) { return ::logl(__x); }
+#else
+  inline long double 
+  log(long double __x) { return ::log(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_LOG10L
+  inline long double 
+  log10(long double __x) { return ::log10l(__x); }
+#else
+  inline long double 
+  log10(long double __x) { return ::log10(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_MODFL
+  inline long double 
+  modf(long double __x, long double* __iptr) { return ::modfl(__x, __iptr); }
+#else
+  inline long double 
+  modf(long double __x, long double* __iptr) 
+  { 
+    double __tmp;
+    double __res = ::modf(static_cast<double>(__x), &__tmp);
+    * __iptr = static_cast<long double>(__tmp);
+    return __res;
+  }
+#endif
+
+#if _GLIBCPP_HAVE_POWL
+  inline long double 
+  pow(long double __x, long double __y) { return ::powl(__x, __y); }
+#else
+  inline long double 
+  pow(long double __x, long double __y) 
+  { return ::pow(static_cast<double>(__x), static_cast<double>(__y)); }
+#endif
+
+  inline long double 
+  pow(long double __x, int __n)
+  {
+    return __pow_helper(__x, __n);
+  }
+
+#if _GLIBCPP_HAVE___BUILTIN_SINL
+  inline long double 
+  sin(long double __x) { return __builtin_sinl(__x); }
+#elif _GLIBCPP_HAVE_SINL
+  inline long double 
+  sin(long double __x) { return ::sinl(__x); }
+#else
+  inline long double 
+  sin(long double __x) { return ::sin(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_SINHL
+  inline long double 
+  sinh(long double __x) { return ::sinhl(__x); }
+#else
+  inline long double 
+  sinh(long double __x) { return ::sinh(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE___BUILTIN_SQRTL
+  inline long double 
+  sqrt(long double __x) { return __builtin_sqrtl(__x); }
+#elif _GLIBCPP_HAVE_SQRTL
+  inline long double 
+  sqrt(long double __x) { return ::sqrtl(__x); }
+#else
+  inline long double 
+  sqrt(long double __x) { return ::sqrt(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANL
+  inline long double 
+  tan(long double __x) { return ::tanl(__x); }
+#else
+  inline long double 
+  tan(long double __x) { return ::tan(static_cast<double>(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANHL
+  inline long double 
+  tanh(long double __x) { return ::tanhl(__x); }
+#else
+  inline long double 
+  tanh(long double __x) { return ::tanh(static_cast<double>(__x)); }
+#endif
+
+
+} // std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+#  define export
+#  include <bits/cmath.tcc>
+#endif
+
 #endif
index 45e3da5..ea30d8d 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <setjmp.h>
 
+namespace std
+{
+  using ::jmp_buf;
+  extern "C" void longjmp(jmp_buf, int);
+}
+
 #endif
index da585dd..e54db8a 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <signal.h>
 
+namespace std
+{
+  using ::sig_atomic_t;
+  extern "C" void (*signal(int, void (*__func)(int)))(int); 
+  extern "C" int raise(int);
+}
+
 #endif
index 5d2a2d8..817cee5 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
@@ -39,4 +39,9 @@
 #pragma GCC system_header
 #include <stdarg.h>
 
+namespace std
+{
+  using ::va_list;
+}
+
 #endif
index 456f6ca..184a533 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <stddef.h>
 
+namespace std 
+{
+  using ::ptrdiff_t;
+  using ::size_t;
+}
+
 #endif
index b7b2970..62a19aa 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #ifndef _CPP_CSTDIO
 #define _CPP_CSTDIO 1
 
+#include <bits/std_cstdarg.h>
+
 #pragma GCC system_header
 #include <stdio.h>
 
+// Get rid of those macros defined in <stdio.h> in lieu of real functions.
+#undef clearerr
+#undef feof
+#undef ferror
+#undef fileno
+#undef getc
+#undef getchar
+#undef putc
+#undef putchar
+
+namespace std 
+{
+  using ::FILE;
+  using ::fpos_t;
+
+  extern "C" int remove(const char*); 
+  extern "C" int rename(const char*, const char*); 
+  extern "C" FILE* tmpfile(void); 
+  extern "C" char* tmpnam(char*); 
+  extern "C" int fclose(FILE*); 
+  extern "C" int fflush(FILE*); 
+  extern "C" FILE* fopen(const char*, const char*); 
+  extern "C" FILE* freopen(const char*, const char*, FILE*); 
+  extern "C" void setbuf(FILE*, char*);
+  extern "C" int setvbuf(FILE*, char*, int, size_t); 
+  extern "C" int fprintf(FILE*, const char*, ...); 
+  extern "C" int fscanf(FILE*, const char*, ...); 
+  extern "C" int printf(const char*, ...); 
+  extern "C" int scanf(const char*, ...); 
+  extern "C" int snprintf(char *, size_t, const char*, ...);
+  extern "C" int sprintf(char *, const char*, ...); 
+  extern "C" int sscanf(const char*, const char*, ...); 
+  extern "C" int vfprintf(FILE*, const char*, va_list); 
+  extern "C" int vfscanf(FILE*, const char*, va_list); 
+  extern "C" int vprintf(const char*, va_list); 
+  extern "C" int vscanf(const char*, va_list); 
+  extern "C" int vsnprintf(char*, size_t, const char*, va_list); 
+  extern "C" int vsprintf(char*, const char*, va_list); 
+  extern "C" int vsscanf(const char*, const char*, va_list); 
+  extern "C" int fgetc(FILE *); 
+  extern "C" char *fgets(char*, int, FILE*); 
+  extern "C" int fputc(int, FILE*); 
+  extern "C" int fputs(const char*, FILE*); 
+  extern "C" int getc(FILE*); 
+  extern "C" int getchar(void); 
+  extern "C" char *gets(char*); 
+  extern "C" int putc(int, FILE*); 
+  extern "C" int putchar(int); 
+  extern "C" int puts(const char*); 
+  extern "C" int ungetc(int, FILE*);
+  extern "C" size_t fread(void*, size_t, size_t, FILE*); 
+  extern "C" size_t fwrite(const void*, size_t, size_t, FILE*); 
+  extern "C" int fgetpos(FILE*, fpos_t*); 
+  extern "C" int fseek(FILE*, long int, int); 
+  extern "C" int fsetpos(FILE*, const fpos_t*); 
+  extern "C" long int ftell(FILE*); 
+  extern "C" void rewind(FILE*); 
+  extern "C" void clearerr(FILE*); 
+  extern "C" int feof(FILE*); 
+  extern "C" int ferror(FILE*); 
+  extern "C" void perror(const char*);
+}
+
 #endif
+
+
+
+
+
+
+
+
index 75402e4..a43c1c5 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #ifndef _CPP_CSTDLIB
 #define _CPP_CSTDLIB 1
 
+#include <bits/c++config.h>
+
 #pragma GCC system_header
 #include <stdlib.h>
 
+namespace std 
+{
+  using ::div_t;
+  using ::ldiv_t;
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+# ifdef _GLIBCPP_HAVE_LLDIV_T
+  using ::lldiv_t;
+# else
+  struct lldiv_t
+  {
+    long long quot;
+    long long rem;
+  };
+# endif
+#endif 
+
+  extern "C" double atof(const char*); 
+  extern "C" int atoi(const char*); 
+  extern "C" long int atol(const char*); 
+  extern "C" double strtod(const char*, char**); 
+  extern "C" float strtof(const char*, char**); 
+  extern "C" long int strtol(const char*, char**, int); 
+  extern "C" unsigned long int strtoul(const char*, char**, int);
+  extern "C" int rand(void); 
+  extern "C" void srand(unsigned int); 
+  extern "C" void* calloc(size_t, size_t); 
+  extern "C" void free(void*); 
+  extern "C" void* malloc(size_t); 
+  extern "C" void* realloc(void*, size_t); 
+  extern "C" void abort(void); 
+  extern "C" int atexit(void (*func)(void)); 
+  extern "C" void exit(int); 
+  extern "C" void _Exit(int); 
+  extern "C" char*getenv(const char*); 
+  extern "C" int system(const char*); 
+  extern "C" void* bsearch(const void*, const void*, size_t, size_t, 
+                          int (*comp)(const void *, const void *)); 
+  extern "C" void qsort(void*, size_t, size_t, 
+                       int (*comp)(const void *, const void *)); 
+  extern "C" int abs(int); 
+  extern "C" long int labs(long int); 
+  extern "C" div_t div(int, int); 
+  extern "C" ldiv_t ldiv(long int, long int); 
+  extern "C" int mblen(const char*, size_t); 
+  extern "C" int mbtowc(wchar_t*, const char*, size_t); 
+  extern "C" int wctomb(char*, wchar_t); 
+  extern "C" size_t mbstowcs(wchar_t*, const char*, size_t); 
+  extern "C" size_t wcstombs(char*, const wchar_t*, size_t);
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  inline long long 
+  abs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline long long 
+  llabs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline lldiv_t 
+  div(long long __n, long long __d)
+  { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  inline lldiv_t 
+  lldiv(long long __n, long long __d)
+  { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  extern "C" long long int atoll(const char*); 
+  extern "C" long long int strtoll(const char*, char**, int); 
+  extern "C" unsigned long long int strtoull(const char*, char**, int); 
+#endif
+
+#ifdef _GLIBCPP_HAVE_STRTOLD
+  extern "C" long double strtold(const char*, char**); 
+#endif
+}
+
 #endif 
+
+
+
+
+
+
+
index 1badbf8..581c7a7 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <string.h>
 
+namespace std 
+{
+  extern "C" void* memcpy(void*, const void*, size_t); 
+  extern "C" void* memmove(void*, const void*, size_t); 
+  extern "C" char* strcpy(char*, const char*); 
+  extern "C" char* strncpy(char*, const char*, size_t); 
+  extern "C" char* strcat(char*, const char*); 
+  extern "C" char* strncat(char*, const char*, size_t); 
+  extern "C" int memcmp(const void*, const void*, size_t); 
+  extern "C" int strcmp(const char*, const char*); 
+  extern "C" int strcoll(const char*, const char*); 
+  extern "C" int strncmp(const char*, const char*, size_t); 
+  extern "C" size_t strxfrm(char*, const char*, size_t); 
+  extern "C" void* memchr(const void*, int, size_t); 
+  extern "C" char* strchr(const char*, int); 
+  extern "C" size_t strcspn(const char*, const char*); 
+  extern "C" char* strpbrk(const char*, const char*); 
+  extern "C" char* strrchr(const char*, int); 
+  extern "C" size_t strspn(const char*, const char*); 
+  extern "C" char* strstr(const char*, const char*); 
+  extern "C" char* strtok(char*, const char*); 
+  extern "C" void* memset(void*, int, size_t); 
+  extern "C" char* strerror(int); 
+  extern "C" size_t strlen(const char*);
+}
+
 #endif
+
+
+
index bf53c50..f340c8e 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <time.h>
 
+namespace std
+{
+  using ::clock_t;
+  using ::time_t;
+  using ::tm;
+
+  extern "C" clock_t clock(void); 
+  extern "C" double difftime(time_t, time_t); 
+  extern "C" time_t mktime(struct tm*); 
+  extern "C" time_t time(time_t*); 
+  extern "C" char* asctime(const struct tm*); 
+  extern "C" char* ctime(const time_t*); 
+  extern "C" struct tm* gmtime(const time_t*); 
+  extern "C" struct tm* localtime(const time_t*); 
+  extern "C" size_t strftime(char*, size_t, const char*, const struct tm*);
+}
+
 #endif
index 713f444..c9ccc86 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000 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
 #ifndef _CPP_CWCHAR
 #define _CPP_CWCHAR 1
 
+#include <bits/c++config.h>
+#include <bits/std_cstdio.h>
+#include <bits/std_cstdarg.h>
+
+#if _GLIBCPP_USE_WCHAR_T
 #pragma GCC system_header
 #include <wchar.h>
 
+// Get rid of those macros defined in <wchar.h> in lieu of real functions.
+#undef getwchar
+
+namespace std
+{
+  using ::wint_t;
+  using ::mbstate_t;
+
+  extern "C" wint_t btowc(int); 
+  extern "C" int wctob(wint_t); 
+  extern "C" wint_t fgetwc(FILE*); 
+  extern "C" wchar_t* fgetws(wchar_t*, int, FILE*); 
+  extern "C" wint_t fputwc(wchar_t, FILE*); 
+  extern "C" int fputws(const wchar_t*, FILE*); 
+  extern "C" int fwide(FILE*, int); 
+  extern "C" int fwprintf(FILE*, const wchar_t*, ...); 
+  extern "C" int fwscanf(FILE*, const wchar_t*, ...); 
+  extern "C" int swprintf(wchar_t*, size_t, const wchar_t*, ...); 
+  extern "C" int swscanf(const wchar_t*, const wchar_t*, ...); 
+  extern "C" int vfwprintf(FILE*, const wchar_t*, va_list); 
+  extern "C" int vfwscanf(FILE*, const wchar_t*, va_list); 
+  extern "C" int vswprintf(wchar_t*, size_t, const wchar_t*, va_list); 
+  extern "C" int vswscanf(const wchar_t*, const wchar_t*, va_list); 
+  extern "C" int vwprintf(const wchar_t*, va_list); 
+  extern "C" int vwscanf(const wchar_t*, va_list); 
+  extern "C" int wprintf(const wchar_t*, ...); 
+  extern "C" int wscanf(const wchar_t*, ...); 
+  extern "C" wint_t getwc(FILE* stream); 
+  extern "C" wint_t getwchar(void); 
+  extern "C" int mbsinit(const mbstate_t*); 
+  extern "C" size_t mbrlen(const char*, size_t, mbstate_t*); 
+  extern "C" size_t mbrtowc(wchar_t*, const char*, size_t, mbstate_t*); 
+  extern "C" size_t mbsrtowcs(wchar_t*, const char**, size_t, mbstate_t*); 
+  extern "C" size_t wcsrtombs(char*, const wchar_t **, size_t, mbstate_t*);
+  extern "C" wint_t putwc(wchar_t, FILE*); 
+  extern "C" wint_t putwchar(wchar_t); 
+  extern "C" wint_t ungetwc(wint_t, FILE*);
+  extern "C" size_t wcrtomb(char*, wchar_t, mbstate_t*); 
+  extern "C" double wcstod(const wchar_t*, wchar_t**); 
+  extern "C" float wcstof(const wchar_t*, wchar_t**); 
+  extern "C" long int wcstol(const wchar_t*, wchar_t**, int); 
+  extern "C" unsigned long int wcstoul(const wchar_t*, wchar_t**, int); 
+  extern "C" wchar_t* wcscpy(wchar_t* s1, const wchar_t*); 
+  extern "C" wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t); 
+  extern "C" wchar_t* wcscat(wchar_t*, const wchar_t*); 
+  extern "C" wchar_t* wcsncat(wchar_t*, const wchar_t*, size_t); 
+  extern "C" int wcscmp(const wchar_t*, const wchar_t*); 
+  extern "C" int wcscoll(const wchar_t*, const wchar_t*); 
+  extern "C" int wcsncmp(const wchar_t*, const wchar_t*, size_t); 
+  extern "C" size_t wcsxfrm(wchar_t*, const wchar_t*, size_t); 
+  extern "C" wchar_t* wcschr(const wchar_t*, wchar_t); 
+  extern "C" size_t wcscspn(const wchar_t*, const wchar_t*); 
+  extern "C" size_t wcslen(const wchar_t*); 
+  extern "C" wchar_t* wcspbrk(const wchar_t*, const wchar_t*); 
+  extern "C" wchar_t* wcsrchr(const wchar_t*, wchar_t); 
+  extern "C" size_t wcsspn(const wchar_t*, const wchar_t*); 
+  extern "C" wchar_t* wcsstr(const wchar_t*, const wchar_t*); 
+  extern "C" wchar_t* wcstok(wchar_t*, const wchar_t*, wchar_t**); 
+  extern "C" wchar_t* wmemchr(const wchar_t*, wchar_t, size_t);
+  extern "C" int wmemcmp(const wchar_t*, const wchar_t*, size_t); 
+  //extern "C" int wmemcmp(wchar_t*, const wchar_t*, size_t); 
+  extern "C" wchar_t* wmemcpy(wchar_t*, const wchar_t*, size_t); 
+  extern "C" wchar_t* wmemmove(wchar_t*, const wchar_t*, size_t); 
+  extern "C" wchar_t* wmemset(wchar_t*, wchar_t, size_t); 
+  extern "C" size_t wcsftime(wchar_t*, size_t, const wchar_t*, const struct tm*); 
+
+#if 0
+  // Full C99 listing
+  extern "C" long double wcstold(const wchar_t*, wchar_t**); 
+  extern "C" long long int wcstoll(const wchar_t*, wchar_t**, int); 
+  extern "C" unsigned long long int wcstoull(const wchar_t*, wchar_t**, int); 
+#endif
+}
+
+#else
+extern "C" 
+{
+  typedef struct 
+  {
+    int __fill[6];
+  } mbstate_t;
+}
+
+namespace std 
+{
+  using ::mbstate_t;
+}
+#endif //_GLIBCPP_USE_WCHAR_T
+
+
 #endif 
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
index 6f8a7c8..fda9f45 100644 (file)
@@ -1,6 +1,6 @@
 // -*- C++ -*- forwarding header.
 
-// Copyright (C) 2000 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
 // software; you can redistribute it and/or modify it under the
 #pragma GCC system_header
 #include <wctype.h>
 
+// Get rid of those macros defined in <wctype.h> in lieu of real functions.
+#undef iswalnum
+#undef iswalpha
+#undef iswblank
+#undef iswcntrl
+#undef iswdigit
+#undef iswgraph
+#undef iswlower
+#undef iswprint
+#undef iswprint
+#undef iswpunct
+#undef iswspace
+#undef iswupper
+#undef iswxdigit
+#undef iswctype  
+#undef towlower
+#undef towupper
+#undef towctrans
+#undef wctrans
+
+namespace std
+{
+  using ::wctype_t;
+  using ::wctrans_t;
+
+  extern "C" int iswalnum(wint_t); 
+  extern "C" int iswalpha(wint_t); 
+  extern "C" int iswblank(wint_t); 
+  extern "C" int iswcntrl(wint_t); 
+  extern "C" int iswdigit(wint_t); 
+  extern "C" int iswgraph(wint_t); 
+  extern "C" int iswlower(wint_t); 
+  extern "C" int iswprint(wint_t); 
+  extern "C" int iswpunct(wint_t); 
+  extern "C" int iswspace(wint_t); 
+  extern "C" int iswupper(wint_t); 
+  extern "C" int iswxdigit(wint_t);
+  extern "C" int iswctype(wint_t, wctype_t); 
+  extern "C" wctype_t wctype(const char *); 
+  extern "C" wint_t towlower(wint_t); 
+  extern "C" wint_t towupper(wint_t); 
+  extern "C" wint_t towctrans(wint_t, wctrans_t); 
+  extern "C" wctrans_t wctrans(const char*);
+}
+
 #endif 
+
+
+
+
+
+
+