aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Kosnik <bkoz@redhat.com>2002-06-21 20:21:03 +0000
committerBenjamin Kosnik <bkoz@redhat.com>2002-06-21 20:21:03 +0000
commit55473e2c361f3baedf974687a6a2dc1d2148fda6 (patch)
tree5a37abad29c7d3b57928cf12073d1fc3f1aefe6f
parent5bb4020aad4cb4dfb6191882a3925ad37ff535ac (diff)
2002-06-21 Benjamin Kosnik <bkoz@redhat.com>
* include/c_compatibility: New. * include/c_compatibility/assert.h: New. * include/c_compatibility/ctype.h: New. * include/c_compatibility/errno.h: New. * include/c_compatibility/float.h: New. * include/c_compatibility/iso646.h: New. * include/c_compatibility/limits.h: New. * include/c_compatibility/locale.h: New. * include/c_compatibility/math.h: New. * include/c_compatibility/setjmp.h: New. * include/c_compatibility/signal.h: New. * include/c_compatibility/stdarg.h: New. * include/c_compatibility/stddef.h: New. * include/c_compatibility/stdio.h: New. * include/c_compatibility/stdlib.h: New. * include/c_compatibility/string.h: New. * include/c_compatibility/time.h: New. * include/c_compatibility/wchar.h: New. * include/c_compatibility/wctype.h: New. * include/c/std_cerrno.h: Get out of the way... define errno. * include/c/std_cmath.h: Add abs, modf overloads. Undefine C99 isms. Still not sure how to deal with this sanely. * include/c/std_csetjmp.h: Tweak. * include/c/std_cwchar.h: Include cstddef for size_t. * include/c_std/std_cmath.h: Remove extra function. Pendantic std usage in testsuites. * testsuite/17_intro/header_cstdlib.cc (test01): Qualify ldiv_t with std. * testsuite/17_intro/header_cwchar.cc: Tweak. * testsuite/22_locale/codecvt_members_char_char.cc (test03): Use std::setlocale. * testsuite/22_locale/ctype_to_wchar_t.cc (test05): Same. * testsuite/22_locale/ctype_to_char.cc (test05): Same. * testsuite/22_locale/ctype_is_wchar_t.cc (test05): Same. * testsuite/22_locale/ctype_is_char.cc (test05): Same. * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Same. * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Same. * testsuite/22_locale/time_get_members_char.cc (test08): Same. * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Same. * testsuite/22_locale/time_put_members_char.cc (test04): Same. * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Same. * testsuite/22_locale/num_put_members_char.cc (test04): Same. * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Same. * testsuite/22_locale/numpunct_members_char.cc (test03): Same. * testsuite/22_locale/num_get_members_wchar_t.cc: Same. * testsuite/22_locale/num_get_members_char.cc: Same. * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Same. * testsuite/22_locale/money_put_members_char.cc (test07): Same. * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Same. * testsuite/22_locale/moneypunct_members_char.cc (test03): Same. * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Same. * testsuite/22_locale/money_get_members_char.cc (test08): Same. * testsuite/22_locale/messages_members_char.cc (test03): Same. * testsuite/22_locale/collate_members_wchar_t.cc (test04): Same. * testsuite/22_locale/collate_members_char.cc (test04): Same. * testsuite/26_numerics/fabs_inline.cc: Use std::printf. * testsuite/27_io/istream_seeks.cc (test02): Qualify abort. * testsuite/27_io/istream_extractor_arith.cc (test11): Qualify strtol. git-svn-id: https://gcc.gnu.org/svn/gcc/trunk@54891 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog64
-rw-r--r--libstdc++-v3/include/c/std_cerrno.h14
-rw-r--r--libstdc++-v3/include/c/std_cmath.h83
-rw-r--r--libstdc++-v3/include/c/std_csetjmp.h8
-rw-r--r--libstdc++-v3/include/c/std_cstdio.h43
-rw-r--r--libstdc++-v3/include/c/std_cwchar.h2
-rw-r--r--libstdc++-v3/include/c_compatibility/assert.h30
-rw-r--r--libstdc++-v3/include/c_compatibility/ctype.h49
-rw-r--r--libstdc++-v3/include/c_compatibility/errno.h35
-rw-r--r--libstdc++-v3/include/c_compatibility/float.h35
-rw-r--r--libstdc++-v3/include/c_compatibility/iso646.h35
-rw-r--r--libstdc++-v3/include/c_compatibility/limits.h35
-rw-r--r--libstdc++-v3/include/c_compatibility/locale.h39
-rw-r--r--libstdc++-v3/include/c_compatibility/math.h74
-rw-r--r--libstdc++-v3/include/c_compatibility/setjmp.h38
-rw-r--r--libstdc++-v3/include/c_compatibility/signal.h40
-rw-r--r--libstdc++-v3/include/c_compatibility/stdarg.h37
-rw-r--r--libstdc++-v3/include/c_compatibility/stddef.h38
-rw-r--r--libstdc++-v3/include/c_compatibility/stdio.h85
-rw-r--r--libstdc++-v3/include/c_compatibility/stdlib.h67
-rw-r--r--libstdc++-v3/include/c_compatibility/string.h58
-rw-r--r--libstdc++-v3/include/c_compatibility/time.h60
-rw-r--r--libstdc++-v3/include/c_compatibility/wchar.h106
-rw-r--r--libstdc++-v3/include/c_compatibility/wctype.h55
-rw-r--r--libstdc++-v3/include/c_std/std_cmath.h7
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cstdlib.cc7
-rw-r--r--libstdc++-v3/testsuite/17_intro/header_cwchar.cc1
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_is_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_to_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/messages_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put_members_char.cc4
-rw-r--r--libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc4
-rw-r--r--libstdc++-v3/testsuite/26_numerics/fabs_inline.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc4
-rw-r--r--libstdc++-v3/testsuite/27_io/istream_seeks.cc4
55 files changed, 1190 insertions, 67 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 4199e999ecb..11cec993522 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,67 @@
+2002-06-21 Benjamin Kosnik <bkoz@redhat.com>
+
+ * include/c_compatibility: New.
+ * include/c_compatibility/assert.h: New.
+ * include/c_compatibility/ctype.h: New.
+ * include/c_compatibility/errno.h: New.
+ * include/c_compatibility/float.h: New.
+ * include/c_compatibility/iso646.h: New.
+ * include/c_compatibility/limits.h: New.
+ * include/c_compatibility/locale.h: New.
+ * include/c_compatibility/math.h: New.
+ * include/c_compatibility/setjmp.h: New.
+ * include/c_compatibility/signal.h: New.
+ * include/c_compatibility/stdarg.h: New.
+ * include/c_compatibility/stddef.h: New.
+ * include/c_compatibility/stdio.h: New.
+ * include/c_compatibility/stdlib.h: New.
+ * include/c_compatibility/string.h: New.
+ * include/c_compatibility/time.h: New.
+ * include/c_compatibility/wchar.h: New.
+ * include/c_compatibility/wctype.h: New.
+
+ * include/c/std_cerrno.h: Get out of the way... define errno.
+ * include/c/std_cmath.h: Add abs, modf overloads.
+ Undefine C99 isms. Still not sure how to deal with this sanely.
+ * include/c/std_csetjmp.h: Tweak.
+ * include/c/std_cwchar.h: Include cstddef for size_t.
+
+ * include/c_std/std_cmath.h: Remove extra function.
+
+ Pendantic std usage in testsuites.
+ * testsuite/17_intro/header_cstdlib.cc (test01): Qualify ldiv_t
+ with std.
+ * testsuite/17_intro/header_cwchar.cc: Tweak.
+ * testsuite/22_locale/codecvt_members_char_char.cc (test03): Use
+ std::setlocale.
+ * testsuite/22_locale/ctype_to_wchar_t.cc (test05): Same.
+ * testsuite/22_locale/ctype_to_char.cc (test05): Same.
+ * testsuite/22_locale/ctype_is_wchar_t.cc (test05): Same.
+ * testsuite/22_locale/ctype_is_char.cc (test05): Same.
+ * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test03): Same.
+ * testsuite/22_locale/time_get_members_wchar_t.cc (test08): Same.
+ * testsuite/22_locale/time_get_members_char.cc (test08): Same.
+ * testsuite/22_locale/time_put_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/time_put_members_char.cc (test04): Same.
+ * testsuite/22_locale/num_put_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/num_put_members_char.cc (test04): Same.
+ * testsuite/22_locale/numpunct_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/numpunct_members_char.cc (test03): Same.
+ * testsuite/22_locale/num_get_members_wchar_t.cc: Same.
+ * testsuite/22_locale/num_get_members_char.cc: Same.
+ * testsuite/22_locale/money_put_members_wchar_t.cc (test07): Same.
+ * testsuite/22_locale/money_put_members_char.cc (test07): Same.
+ * testsuite/22_locale/moneypunct_members_wchar_t.cc (test03): Same.
+ * testsuite/22_locale/moneypunct_members_char.cc (test03): Same.
+ * testsuite/22_locale/money_get_members_wchar_t.cc (test08): Same.
+ * testsuite/22_locale/money_get_members_char.cc (test08): Same.
+ * testsuite/22_locale/messages_members_char.cc (test03): Same.
+ * testsuite/22_locale/collate_members_wchar_t.cc (test04): Same.
+ * testsuite/22_locale/collate_members_char.cc (test04): Same.
+ * testsuite/26_numerics/fabs_inline.cc: Use std::printf.
+ * testsuite/27_io/istream_seeks.cc (test02): Qualify abort.
+ * testsuite/27_io/istream_extractor_arith.cc (test11): Qualify strtol.
+
2002-06-20 Benjamin Kosnik <bkoz@redhat.com>
* libsupc++/Makefile.am (libsupc__convenience_la_SOURCES): Add
diff --git a/libstdc++-v3/include/c/std_cerrno.h b/libstdc++-v3/include/c/std_cerrno.h
index 93ba8684389..646d6096574 100644
--- a/libstdc++-v3/include/c/std_cerrno.h
+++ b/libstdc++-v3/include/c/std_cerrno.h
@@ -31,6 +31,15 @@
// ISO C++ 14882: 19.3 Error numbers
//
+/** @file cerrno
+ * This is a Standard C++ Library file. You should @c #include this file
+ * in your programs, rather than any of the "*.h" implementation files.
+ *
+ * This is the C++ version of the Standard C Library header @c errno.h,
+ * and its contents are (mostly) the same as that header, but are all
+ * contained in the namespace @c std.
+ */
+
#ifndef _CPP_CERRNO
#define _CPP_CERRNO 1
@@ -38,4 +47,9 @@
#include_next <errno.h>
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef errno
+#define errno errno
+#endif
+
#endif
diff --git a/libstdc++-v3/include/c/std_cmath.h b/libstdc++-v3/include/c/std_cmath.h
index 33ac50b9f9a..beb7141625c 100644
--- a/libstdc++-v3/include/c/std_cmath.h
+++ b/libstdc++-v3/include/c/std_cmath.h
@@ -36,6 +36,89 @@
#pragma GCC system_header
+#include <bits/c++config.h>
+
#include_next <math.h>
+// Get rid of those macros defined in <math.h> in lieu of real functions.
+#undef abs
+#undef div
+#undef acos
+#undef asin
+#undef atan
+#undef atan2
+#undef ceil
+#undef cos
+#undef cosh
+#undef exp
+#undef fabs
+#undef floor
+#undef fmod
+#undef frexp
+#undef ldexp
+#undef log
+#undef log10
+#undef modf
+#undef pow
+#undef sin
+#undef sinh
+#undef sqrt
+#undef tan
+#undef tanh
+
+#undef fpclassify
+#undef isfinite
+#undef isinf
+#undef isnan
+#undef isnormal
+#undef signbit
+#undef isgreater
+#undef isgreaterequal
+#undef isless
+#undef islessequal
+#undef islessgreater
+#undef isunordered
+
+namespace std
+{
+ inline double
+ abs(double __x)
+ { return __builtin_fabs(__x); }
+
+ inline float
+ abs(float __x)
+ { return __builtin_fabsf(__x); }
+
+ inline long double
+ abs(long double __x)
+ { return __builtin_fabsl(__x); }
+
+#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
+
+#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
+}
#endif
diff --git a/libstdc++-v3/include/c/std_csetjmp.h b/libstdc++-v3/include/c/std_csetjmp.h
index 011907bbaa1..fe3f9c70bcd 100644
--- a/libstdc++-v3/include/c/std_csetjmp.h
+++ b/libstdc++-v3/include/c/std_csetjmp.h
@@ -38,4 +38,12 @@
#include_next <setjmp.h>
+// Get rid of those macros defined in <setjmp.h> in lieu of real functions.
+#undef longjmp
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef setjmp
+#define setjmp(env) std::setjmp (env)
+#endif
+
#endif
diff --git a/libstdc++-v3/include/c/std_cstdio.h b/libstdc++-v3/include/c/std_cstdio.h
index 542b92414ca..3d6272aa62e 100644
--- a/libstdc++-v3/include/c/std_cstdio.h
+++ b/libstdc++-v3/include/c/std_cstdio.h
@@ -38,4 +38,47 @@
#include_next <stdio.h>
+// Get rid of those macros defined in <stdio.h> in lieu of real functions.
+#undef clearerr
+#undef fclose
+#undef feof
+#undef ferror
+#undef fflush
+#undef fgetc
+#undef fgetpos
+#undef fgets
+#undef fopen
+#undef fprintf
+#undef fputc
+#undef fputs
+#undef fread
+#undef freopen
+#undef fscanf
+#undef fseek
+#undef fsetpos
+#undef ftell
+#undef fwrite
+#undef getc
+#undef getchar
+#undef gets
+#undef perror
+#undef printf
+#undef putc
+#undef putchar
+#undef puts
+#undef remove
+#undef rename
+#undef rewind
+#undef scanf
+#undef setbuf
+#undef setvbuf
+#undef sprintf
+#undef sscanf
+#undef tmpfile
+#undef tmpnam
+#undef ungetc
+#undef vfprintf
+#undef vprintf
+#undef vsprintf
+
#endif
diff --git a/libstdc++-v3/include/c/std_cwchar.h b/libstdc++-v3/include/c/std_cwchar.h
index 19739853736..bad9923fa1e 100644
--- a/libstdc++-v3/include/c/std_cwchar.h
+++ b/libstdc++-v3/include/c/std_cwchar.h
@@ -37,6 +37,8 @@
#pragma GCC system_header
#include <bits/c++config.h>
+#include <cstddef>
+#include <ctime>
#if _GLIBCPP_HAVE_WCHAR_H
#include_next <wchar.h>
diff --git a/libstdc++-v3/include/c_compatibility/assert.h b/libstdc++-v3/include/c_compatibility/assert.h
new file mode 100644
index 00000000000..cb5313fa97b
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/assert.h
@@ -0,0 +1,30 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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.
+
+#include <cassert>
diff --git a/libstdc++-v3/include/c_compatibility/ctype.h b/libstdc++-v3/include/c_compatibility/ctype.h
new file mode 100644
index 00000000000..1989347e2d8
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/ctype.h
@@ -0,0 +1,49 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_CTYPE_H_
+#define _CPP_CTYPE_H_ 1
+
+#include <cctype>
+
+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;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/errno.h b/libstdc++-v3/include/c_compatibility/errno.h
new file mode 100644
index 00000000000..f890b537549
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/errno.h
@@ -0,0 +1,35 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_ERRNO_H_
+#define _CPP_ERRNO_H_ 1
+
+#include <cerrno>
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/float.h b/libstdc++-v3/include/c_compatibility/float.h
new file mode 100644
index 00000000000..7d7b9d44f9f
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/float.h
@@ -0,0 +1,35 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_FLOAT_H_
+#define _CPP_FLOAT_H_ 1
+
+#include <cfloat>
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/iso646.h b/libstdc++-v3/include/c_compatibility/iso646.h
new file mode 100644
index 00000000000..25b6140ba53
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/iso646.h
@@ -0,0 +1,35 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_ISO646_H_
+#define _CPP_ISO646_H_ 1
+
+#include <ciso646>
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/limits.h b/libstdc++-v3/include/c_compatibility/limits.h
new file mode 100644
index 00000000000..9ddbce8990e
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/limits.h
@@ -0,0 +1,35 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_LIMITS_H_
+#define _CPP_LIMITS_H_ 1
+
+#include <climits>
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/locale.h b/libstdc++-v3/include/c_compatibility/locale.h
new file mode 100644
index 00000000000..4d7d72da7ab
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/locale.h
@@ -0,0 +1,39 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_LOCALE_H_
+#define _CPP_LOCALE_H_ 1
+
+#include <clocale>
+
+using std::lconv;
+using std::setlocale;
+using std::localeconv;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/math.h b/libstdc++-v3/include/c_compatibility/math.h
new file mode 100644
index 00000000000..4c4fd0a2178
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/math.h
@@ -0,0 +1,74 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_MATH_H_
+#define _CPP_MATH_H_ 1
+
+#include <cmath>
+
+using std::abs;
+using std::acos;
+using std::asin;
+using std::atan;
+using std::atan2;
+using std::cos;
+using std::sin;
+using std::tan;
+using std::cosh;
+using std::sinh;
+using std::tanh;
+using std::exp;
+using std::frexp;
+using std::ldexp;
+using std::log;
+using std::log10;
+using std::modf;
+using std::pow;
+using std::sqrt;
+using std::ceil;
+using std::fabs;
+using std::floor;
+using std::fmod;
+
+#if _GLIBCPP_USE_C99
+using std::fpclassify;
+using std::isfinite;
+using std::isinf;
+using std::isnan;
+using std::isnormal;
+using std::signbit;
+using std::isgreater;
+using std::isgreaterequal;
+using std::isless;
+using std::islessequal;
+using std::islessgreater;
+using std::isunordered;
+#endif
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/setjmp.h b/libstdc++-v3/include/c_compatibility/setjmp.h
new file mode 100644
index 00000000000..f194253f868
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/setjmp.h
@@ -0,0 +1,38 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_SETJMP_H_
+#define _CPP_SETJMP_H_ 1
+
+#include <csetjmp>
+
+using std::jmp_buf;
+using std::longjmp;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/signal.h b/libstdc++-v3/include/c_compatibility/signal.h
new file mode 100644
index 00000000000..724ac8a1d66
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/signal.h
@@ -0,0 +1,40 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_SIGNAL_H_
+#define _CPP_SIGNAL_H_ 1
+
+#include <csignal>
+
+using std::sig_atomic_t;
+
+using std::raise;
+using std::signal;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdarg.h b/libstdc++-v3/include/c_compatibility/stdarg.h
new file mode 100644
index 00000000000..a1a62b1699e
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/stdarg.h
@@ -0,0 +1,37 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_STDARG_H_
+#define _CPP_STDARG_H_ 1
+
+#include <cstdarg>
+
+using std::va_list;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/stddef.h b/libstdc++-v3/include/c_compatibility/stddef.h
new file mode 100644
index 00000000000..094c380ad02
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/stddef.h
@@ -0,0 +1,38 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_STDDEF_H_
+#define _CPP_STDDEF_H_ 1
+
+#include <cstddef>
+
+using std::size_t;
+using std::ptrdiff_t;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdio.h b/libstdc++-v3/include/c_compatibility/stdio.h
new file mode 100644
index 00000000000..930ffd4861d
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/stdio.h
@@ -0,0 +1,85 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_STDIO_H_
+#define _CPP_STDIO_H_ 1
+
+#include <cstdio>
+
+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::snprintf;
+using std::sprintf;
+using std::sscanf;
+using std::vfprintf;
+using std::vfscanf;
+using std::vprintf;
+using std::vscanf;
+using std::vsnprintf;
+using std::vsprintf;
+using std::vsscanf;
+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;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/stdlib.h b/libstdc++-v3/include/c_compatibility/stdlib.h
new file mode 100644
index 00000000000..d516034d9d7
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/stdlib.h
@@ -0,0 +1,67 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_STDLIB_H_
+#define _CPP_STDLIB_H_ 1
+
+#include <cstdlib>
+
+using std::div_t;
+using std::ldiv_t;
+
+using std::abort;
+using std::abs;
+using std::atexit;
+using std::atof;
+using std::atoi;
+using std::atol;
+using std::bsearch;
+using std::calloc;
+using std::div;
+using std::exit;
+using std::free;
+using std::getenv;
+using std::labs;
+using std::ldiv;
+using std::malloc;
+using std::mblen;
+using std::mbstowcs;
+using std::mbtowc;
+using std::qsort;
+using std::rand;
+using std::realloc;
+using std::srand;
+using std::strtod;
+using std::strtol;
+using std::strtoul;
+using std::system;
+using std::wcstombs;
+using std::wctomb;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/string.h b/libstdc++-v3/include/c_compatibility/string.h
new file mode 100644
index 00000000000..b639157ee59
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/string.h
@@ -0,0 +1,58 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_STRING_H_
+#define _CPP_STRING_H_ 1
+
+#include <cstring>
+
+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;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/time.h b/libstdc++-v3/include/c_compatibility/time.h
new file mode 100644
index 00000000000..6d07aa1aed6
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/time.h
@@ -0,0 +1,60 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_TIME_H_
+#define _CPP_TIME_H_ 1
+
+#include <ctime>
+
+// Get rid of those macros defined in <time.h> in lieu of real functions.
+#undef clock
+#undef difftime
+#undef mktime
+#undef time
+#undef asctime
+#undef ctime
+#undef gmtime
+#undef localtime
+#undef strftime
+
+using std::clock_t;
+using std::time_t;
+using std::tm;
+
+using std::clock;
+using std::difftime;
+using std::mktime;
+using std::time;
+using std::asctime;
+using std::ctime;
+using std::gmtime;
+using std::localtime;
+using std::strftime;
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/wchar.h b/libstdc++-v3/include/c_compatibility/wchar.h
new file mode 100644
index 00000000000..e9485a54ded
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/wchar.h
@@ -0,0 +1,106 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_WCHAR_H_
+#define _CPP_WCHAR_H_ 1
+
+#include <cwchar>
+
+using std::mbstate_t;
+
+#if _GLIBCPP_USE_WCHAR_T
+using std::wint_t;
+
+using std::btowc;
+using std::wctob;
+using std::fgetwc;
+using std::fgetwc;
+using std::fgetws;
+using std::fputwc;
+using std::fputws;
+using std::fwide;
+using std::fwprintf;
+using std::fwscanf;
+using std::swprintf;
+using std::swscanf;
+using std::vfwprintf;
+using std::vfwscanf;
+using std::vswprintf;
+using std::vswscanf;
+using std::vwprintf;
+using std::vwscanf;
+using std::wprintf;
+using std::wscanf;
+using std::getwc;
+using std::getwchar;
+using std::mbsinit;
+using std::mbrlen;
+using std::mbrtowc;
+using std::mbsrtowcs;
+using std::wcsrtombs;
+using std::putwc;
+using std::putwchar;
+using std::ungetwc;
+using std::wcrtomb;
+using std::wcstod;
+using std::wcstof;
+using std::wcstol;
+using std::wcstoul;
+using std::wcscpy;
+using std::wcsncpy;
+using std::wcscat;
+using std::wcsncat;
+using std::wcscmp;
+using std::wcscoll;
+using std::wcsncmmp;
+using std::wcsxfrm;
+using std::wcschr;
+using std::wcscspn;
+using std::wcslen;
+using std::wcspbrk;
+using std::wcsrchr;
+using std::wcsspn;
+using std::wcsstr;
+using std::wcstok;
+using std::wmemchr;
+using std::wmemcmp;
+using std::wmemcpy;
+using std::wmemmove;
+using std::wmemset;
+using std::wcsftime;
+
+#if _GLIBCPP_USE_C99
+using std::wcstold;
+using std::wcstoll;
+using std::wcstoull;
+#endif
+
+#endif //_GLIBCPP_USE_WCHAR_T
+
+#endif
diff --git a/libstdc++-v3/include/c_compatibility/wctype.h b/libstdc++-v3/include/c_compatibility/wctype.h
new file mode 100644
index 00000000000..2c75ec8e960
--- /dev/null
+++ b/libstdc++-v3/include/c_compatibility/wctype.h
@@ -0,0 +1,55 @@
+// -*- C++ -*- compatibility header.
+
+// Copyright (C) 2002 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_CWCTYPE_H_
+#define _CPP_CWCTYPE_H_ 1
+
+#include <cwctype>
+
+using std::wctype_t;
+using std::wctrans_t;
+using std::iswalpha;
+using std::iswupper;
+using std::iswlower;
+using std::iswdigit;
+using std::iswxdigit;
+using std::iswalnum;
+using std::iswspace;
+using std::iswpunct;
+using std::iswprint;
+using std::iswgraph;
+using std::iswcntrl;
+using std::iswctype;
+using std::towctrans;
+using std::towlower;
+using std::towupper;
+using std::wctrans;
+using std::wctype;
+
+#endif
diff --git a/libstdc++-v3/include/c_std/std_cmath.h b/libstdc++-v3/include/c_std/std_cmath.h
index 9e05900b180..b2f65c82d67 100644
--- a/libstdc++-v3/include/c_std/std_cmath.h
+++ b/libstdc++-v3/include/c_std/std_cmath.h
@@ -82,13 +82,6 @@ namespace std
// 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 double
abs(double __x)
{ return __builtin_fabs(__x); }
diff --git a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
index 32827cfbca0..f86f423d875 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cstdlib.cc
@@ -1,6 +1,6 @@
// 2000-01-01 bkoz
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2002 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
@@ -26,12 +26,13 @@
void test01()
{
long a = std::abs(1L);
- ldiv_t b = std::div(2L, 1L);
+ std::div(2L, 1L);
+ std::ldiv_t b;
}
void test02()
{
- // Make sure size_t is in namespace std
+ // Make sure size_t is in namespace std.
std::size_t i = 5;
}
diff --git a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
index 0f9974ddb13..8d65e024195 100644
--- a/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
+++ b/libstdc++-v3/testsuite/17_intro/header_cwchar.cc
@@ -22,7 +22,6 @@
#include <cwchar>
-
int main(void)
{
// Make sure size_t is in namespace std
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
index 38764d43795..9cf4e7d5c70 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_char_char.cc
@@ -102,12 +102,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
index 3d82fc5e4e9..1eb505fb6bd 100644
--- a/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/codecvt_members_wchar_t_char.cc
@@ -134,12 +134,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
index 0a2b29b6ebf..eccf7caae1c 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_members_char.cc
@@ -166,13 +166,13 @@ void test04()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test03();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
index b120397a649..c59ab329ebd 100644
--- a/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/collate_members_wchar_t.cc
@@ -166,13 +166,13 @@ void test04()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test03();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_is_char.cc b/libstdc++-v3/testsuite/22_locale/ctype_is_char.cc
index 5955cf3ed0e..1b97b4aac2f 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_is_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_is_char.cc
@@ -252,14 +252,14 @@ void test05()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test02();
test03();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc
index 50aa0dcdf1a..5ca171b51e8 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_is_wchar_t.cc
@@ -175,12 +175,12 @@ void test05()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_to_char.cc b/libstdc++-v3/testsuite/22_locale/ctype_to_char.cc
index b4eb8840db9..ed350955572 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_to_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_to_char.cc
@@ -121,12 +121,12 @@ void test05()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc
index 70ca529826e..52180356a0a 100644
--- a/libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/ctype_to_wchar_t.cc
@@ -122,12 +122,12 @@ void test05()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
index eeb6ef30679..62126557c16 100644
--- a/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/messages_members_char.cc
@@ -104,12 +104,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
index 9807a39002b..bf2e47e3a9c 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_char.cc
@@ -551,7 +551,7 @@ void test08()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -561,7 +561,7 @@ void test08()
test05();
test06();
test07();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
index 90a32cd4854..3ac25d0204a 100644
--- a/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_get_members_wchar_t.cc
@@ -552,7 +552,7 @@ void test08()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -562,7 +562,7 @@ void test08()
test05();
test06();
test07();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
index f1b2e5e9d5a..708ae4243ff 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_char.cc
@@ -373,7 +373,7 @@ void test07()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -382,7 +382,7 @@ void test07()
test03();
test05();
test06();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
index 034ae564c7c..1bfe86ba808 100644
--- a/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/money_put_members_wchar_t.cc
@@ -373,7 +373,7 @@ void test07()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -382,7 +382,7 @@ void test07()
test03();
test05();
test06();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
index 5beb5ee9fb0..3cb6c88a880 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_char.cc
@@ -128,12 +128,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
index c79e170de40..a81fe0a2362 100644
--- a/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/moneypunct_members_wchar_t.cc
@@ -129,12 +129,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
index 8786a2cb9b0..06e3322e0ad 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get_members_char.cc
@@ -418,7 +418,7 @@ void test06()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -426,7 +426,7 @@ void test06()
test02();
test04();
test05();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
index 6b7d1475666..088d4f8c9e3 100644
--- a/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_get_members_wchar_t.cc
@@ -420,7 +420,7 @@ void test06()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -428,7 +428,7 @@ void test06()
test02();
test04();
test05();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
index bd116e6c629..fcc1f79b31d 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put_members_char.cc
@@ -315,13 +315,13 @@ void test04()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test02();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
index 65bb70ecfb5..4fbf25f2121 100644
--- a/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/num_put_members_wchar_t.cc
@@ -315,13 +315,13 @@ void test04()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test02();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
index df1835707f6..926501c93b2 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_char.cc
@@ -106,12 +106,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
index 8b98ff90f8a..14e9321ecf0 100644
--- a/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/numpunct_members_wchar_t.cc
@@ -104,12 +104,12 @@ void test03()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
index 74b358bd294..b5c8f098031 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get_members_char.cc
@@ -704,7 +704,7 @@ void test08()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -714,7 +714,7 @@ void test08()
test04();
test05();
test06();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
index d8c568d29c4..89efdb9fea5 100644
--- a/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_get_members_wchar_t.cc
@@ -704,7 +704,7 @@ void test08()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
@@ -714,7 +714,7 @@ void test08()
test04();
test05();
test06();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
index 09a4d4f500d..c657706f714 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put_members_char.cc
@@ -255,13 +255,13 @@ void test04()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test02();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
index fa576be970a..347f41f526e 100644
--- a/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
+++ b/libstdc++-v3/testsuite/22_locale/time_put_members_wchar_t.cc
@@ -257,13 +257,13 @@ void test04()
{
bool test = true;
- const char* tentLANG = setlocale(LC_ALL, "ja_JP.eucjp");
+ const char* tentLANG = std::setlocale(LC_ALL, "ja_JP.eucjp");
if (tentLANG != NULL)
{
std::string preLANG = tentLANG;
test01();
test02();
- std::string postLANG = setlocale(LC_ALL, NULL);
+ std::string postLANG = std::setlocale(LC_ALL, NULL);
VERIFY( preLANG == postLANG );
}
}
diff --git a/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc b/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc
index bb84a5809f3..5dffb7d12c1 100644
--- a/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc
+++ b/libstdc++-v3/testsuite/26_numerics/fabs_inline.cc
@@ -1,4 +1,4 @@
-// Copyright (C) 1999 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2002 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
@@ -32,6 +32,6 @@ int main ()
double a = fabs (-2.4);
realfn myfn = fabs;
double b = myfn (-2.5);
- printf ("%f, %f, %p\n", a, b, myfn);
+ std::printf ("%f, %f, %p\n", a, b, myfn);
return 0;
}
diff --git a/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc b/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc
index c3181391850..c184b3fade2 100644
--- a/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc
+++ b/libstdc++-v3/testsuite/27_io/istream_extractor_arith.cc
@@ -1,6 +1,6 @@
// 1999-04-12 bkoz
-// Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2002 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
@@ -500,7 +500,7 @@ bool test11()
// sanity check via 'C' library call
char* err;
- long l = strtol(cstrlit, &err, 0);
+ long l = std::strtol(cstrlit, &err, 0);
std::istringstream iss(cstrlit);
iss.setf(std::ios::fmtflags(0), std::ios::basefield);
diff --git a/libstdc++-v3/testsuite/27_io/istream_seeks.cc b/libstdc++-v3/testsuite/27_io/istream_seeks.cc
index 6574b0a059b..cd0e0656748 100644
--- a/libstdc++-v3/testsuite/27_io/istream_seeks.cc
+++ b/libstdc++-v3/testsuite/27_io/istream_seeks.cc
@@ -1,6 +1,6 @@
// 2000-06-29 bkoz
-// Copyright (C) 2000, 2001 Free Software Foundation
+// Copyright (C) 2000, 2001, 2002 Free Software Foundation
//
// 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
@@ -108,7 +108,7 @@ void test02()
std::fstream ofstrm;
ofstrm.open("istream_seeks-3.txt", std::ios::out);
if (!ofstrm)
- abort();
+ std::abort();
write_rewind(ofstrm);
ofstrm.close();