summaryrefslogtreecommitdiffstats
path: root/contrib/libstdc++/config/os
diff options
context:
space:
mode:
authorkan <kan@FreeBSD.org>2004-07-28 03:12:05 +0000
committerkan <kan@FreeBSD.org>2004-07-28 03:12:05 +0000
commit96bad46eee8bf907dceb152bbb9d128bed5a4956 (patch)
tree75ef0e6da73746d6849e25a0996ae34e1aeff51d /contrib/libstdc++/config/os
parent5e00ec74d8ce58f99801200d4d3d0412c7cc1b28 (diff)
downloadFreeBSD-src-96bad46eee8bf907dceb152bbb9d128bed5a4956.zip
FreeBSD-src-96bad46eee8bf907dceb152bbb9d128bed5a4956.tar.gz
Gcc 3.4.2 20040728 C++ support bits.
Diffstat (limited to 'contrib/libstdc++/config/os')
-rw-r--r--contrib/libstdc++/config/os/aix/atomicity.h42
-rw-r--r--contrib/libstdc++/config/os/aix/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/aix/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/aix/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/bsd/freebsd/os_defines.h16
-rw-r--r--contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h32
-rw-r--r--contrib/libstdc++/config/os/bsd/netbsd/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/djgpp/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/djgpp/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/djgpp/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/generic/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/generic/ctype_inline.h18
-rw-r--r--contrib/libstdc++/config/os/generic/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/generic/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/gnu-linux/ctype_base.h7
-rw-r--r--contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h55
-rw-r--r--contrib/libstdc++/config/os/gnu-linux/os_defines.h30
-rw-r--r--contrib/libstdc++/config/os/hpux/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/hpux/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/hpux/os_defines.h21
-rw-r--r--contrib/libstdc++/config/os/irix/atomic_word.h35
-rw-r--r--contrib/libstdc++/config/os/irix/atomicity.h42
-rw-r--r--contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/irix/irix5.2/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/irix/irix6.5/os_defines.h7
-rw-r--r--contrib/libstdc++/config/os/mingw32/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/mingw32/os_defines.h17
-rw-r--r--contrib/libstdc++/config/os/newlib/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/newlib/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h6
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h4
-rw-r--r--contrib/libstdc++/config/os/tpf/ctype_base.h55
-rw-r--r--contrib/libstdc++/config/os/tpf/ctype_inline.h69
-rw-r--r--contrib/libstdc++/config/os/tpf/ctype_noninline.h103
-rw-r--r--contrib/libstdc++/config/os/tpf/os_defines.h45
-rw-r--r--contrib/libstdc++/config/os/vxworks/ctype_base.h59
-rw-r--r--contrib/libstdc++/config/os/vxworks/ctype_inline.h71
-rw-r--r--contrib/libstdc++/config/os/vxworks/ctype_noninline.h91
-rw-r--r--contrib/libstdc++/config/os/vxworks/os_defines.h37
-rw-r--r--contrib/libstdc++/config/os/windiss/ctype_noninline.h18
-rw-r--r--contrib/libstdc++/config/os/windiss/os_defines.h5
53 files changed, 976 insertions, 221 deletions
diff --git a/contrib/libstdc++/config/os/aix/atomicity.h b/contrib/libstdc++/config/os/aix/atomicity.h
index af4fa5a..dad8aae 100644
--- a/contrib/libstdc++/config/os/aix/atomicity.h
+++ b/contrib/libstdc++/config/os/aix/atomicity.h
@@ -1,6 +1,6 @@
// Low-level functions for atomic operations: AIX version -*- C++ -*-
-// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2004 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
@@ -27,33 +27,35 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _BITS_ATOMICITY_H
-#define _BITS_ATOMICITY_H 1
+#include <bits/atomicity.h>
/* We cannot use the cpu/powerpc/bits/atomicity.h inline assembly
definitions for these operations since they depend on operations
that are not available on the original POWER architecture. AIX
still runs on the POWER architecture, so it would be incorrect to
- assume the existence of these instructions. */
+ assume the existence of these instructions.
-/* This should match the type pointed to by atomic_p in
- <sys/atomic_op.h>. */
-typedef int _Atomic_word;
+ The definition of _Atomic_word must match the type pointed to by
+ atomic_p in <sys/atomic_op.h>. */
-#include <sys/atomic_op.h>
-
-static inline int
-__attribute__ ((__unused__))
-__exchange_and_add (atomic_p __mem, int __val)
+extern "C"
{
- return fetch_and_add (__mem, __val);
+#include <sys/atomic_op.h>
}
-static inline void
-__attribute__ ((__unused__))
-__atomic_add (atomic_p __mem, int __val)
+namespace __gnu_cxx
{
- (void) fetch_and_add (__mem, __val);
-}
-
-#endif /* atomicity.h */
+ _Atomic_word
+ __attribute__ ((__unused__))
+ __exchange_and_add (volatile _Atomic_word* __mem, int __val)
+ {
+ return ::fetch_and_add (const_cast<atomic_p>(__mem), __val);
+ }
+
+ void
+ __attribute__ ((__unused__))
+ __atomic_add (volatile _Atomic_word* __mem, int __val)
+ {
+ (void) ::fetch_and_add (const_cast<atomic_p>(__mem), __val);
+ }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/os/aix/ctype_base.h b/contrib/libstdc++/config/os/aix/ctype_base.h
index ed41440..adcd1ce 100644
--- a/contrib/libstdc++/config/os/aix/ctype_base.h
+++ b/contrib/libstdc++/config/os/aix/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 1999 Free Software Foundation, Inc.
+// Copyright (C) 1999, 2000, 2003 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
@@ -48,8 +48,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/aix/ctype_noninline.h b/contrib/libstdc++/config/os/aix/ctype_noninline.h
index 7cf919a..edd8d82 100644
--- a/contrib/libstdc++/config/os/aix/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/aix/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/aix/os_defines.h b/contrib/libstdc++/config/os/aix/os_defines.h
index 6e4dbda..7888fa7 100644
--- a/contrib/libstdc++/config/os/aix/os_defines.h
+++ b/contrib/libstdc++/config/os/aix/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h b/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
index 98b6265..f44a7c7 100644
--- a/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
+++ b/contrib/libstdc++/config/os/bsd/freebsd/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2003 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
@@ -52,7 +52,7 @@
static const mask xdigit = _CTYPE_X;
static const mask space = _CTYPE_S;
static const mask print = _CTYPE_R;
- static const mask graph = _CTYPE_G;
+ static const mask graph = _CTYPE_A | _CTYPE_D | _CTYPE_P;
static const mask cntrl = _CTYPE_C;
static const mask punct = _CTYPE_P;
static const mask alnum = _CTYPE_A | _CTYPE_D;
@@ -65,7 +65,7 @@
static const mask xdigit = _X;
static const mask space = _S;
static const mask print = _R;
- static const mask graph = _G;
+ static const mask graph = _A | _D | _P;
static const mask cntrl = _C;
static const mask punct = _P;
static const mask alnum = _A | _D;
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h
index 0e108fd..ec5b575 100644
--- a/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/bsd/freebsd/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h b/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h
index 55040a7..1e46712 100644
--- a/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h
+++ b/contrib/libstdc++/config/os/bsd/freebsd/os_defines.h
@@ -28,17 +28,17 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
-#define _GLIBCPP_USE_C99_CHECK 1
-#define _GLIBCPP_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
-#define _GLIBCPP_USE_C99_LONG_LONG_CHECK 1
-#define _GLIBCPP_USE_C99_LONG_LONG_DYNAMIC (_GLIBCPP_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)
-#define _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1
-#define _GLIBCPP_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined _XOPEN_SOURCE
+#define _GLIBCXX_USE_C99_CHECK 1
+#define _GLIBCXX_USE_C99_DYNAMIC (!(__ISO_C_VISIBLE >= 1999))
+#define _GLIBCXX_USE_C99_LONG_LONG_CHECK 1
+#define _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC (_GLIBCXX_USE_C99_DYNAMIC || !defined __LONG_LONG_SUPPORTED)
+#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_CHECK 1
+#define _GLIBCXX_USE_C99_FLOAT_TRANSCENDENTALS_DYNAMIC defined _XOPEN_SOURCE
#endif
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
index 80138cb..70bf41c 100644
--- a/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/bsd/netbsd/ctype_noninline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 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,21 +32,35 @@
//
// Information as gleaned from /usr/include/ctype.h
-
+
+ extern "C" const u_int8_t _C_ctype_[];
+
const ctype_base::mask*
ctype<char>::classic_table() throw()
- { return 0; }
+ { return _C_ctype_ + 1; }
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
- { }
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
- _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
- { }
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h b/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h
index 03f760f..a7f2530 100644
--- a/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h
+++ b/contrib/libstdc++/config/os/bsd/netbsd/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/djgpp/ctype_base.h b/contrib/libstdc++/config/os/djgpp/ctype_base.h
index 018e20e..778847c 100644
--- a/contrib/libstdc++/config/os/djgpp/ctype_base.h
+++ b/contrib/libstdc++/config/os/djgpp/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2001 Free Software Foundation, Inc.
+// Copyright (C) 2001, 2003 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
@@ -49,8 +49,8 @@
static const mask digit = __dj_ISDIGIT; // Numeric
static const mask punct = __dj_ISPUNCT; // Punctuation
static const mask xdigit = __dj_ISXDIGIT; // Hexadecimal numeric
- static const mask alnum = __dj_ISALPHA; // Alphanumeric
- static const mask graph = __dj_ISGRAPH; // Graphical
+ static const mask alnum = __dj_ISALPHA | __dj_ISDIGIT; // Alphanumeric
+ static const mask graph = __dj_ISALPHA | __dj_ISDIGIT | __dj_ISPUNCT; // Graphical
};
diff --git a/contrib/libstdc++/config/os/djgpp/ctype_noninline.h b/contrib/libstdc++/config/os/djgpp/ctype_noninline.h
index 0ec0f84..eda2679 100644
--- a/contrib/libstdc++/config/os/djgpp/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/djgpp/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
_M_table(__table ? __table : __dj_ctype_flags)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
_M_table(__table ? __table : __dj_ctype_flags)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/djgpp/os_defines.h b/contrib/libstdc++/config/os/djgpp/os_defines.h
index ce0bf24..5a43c06 100644
--- a/contrib/libstdc++/config/os/djgpp/os_defines.h
+++ b/contrib/libstdc++/config/os/djgpp/os_defines.h
@@ -28,8 +28,8 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/generic/ctype_base.h b/contrib/libstdc++/config/os/generic/ctype_base.h
index 564093d..03fccce 100644
--- a/contrib/libstdc++/config/os/generic/ctype_base.h
+++ b/contrib/libstdc++/config/os/generic/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2003 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
@@ -48,10 +48,10 @@
static const mask xdigit = 1 << 4;
static const mask space = 1 << 5;
static const mask print = 1 << 6;
- static const mask graph = 1 << 7;
+ static const mask graph = (1 << 2) | (1 << 3) | (1 << 9); // alnum|punct
static const mask cntrl = 1 << 8;
static const mask punct = 1 << 9;
- static const mask alnum = 1 << 10;
+ static const mask alnum = (1 << 2) | (1 << 3); // alpha|digit
};
diff --git a/contrib/libstdc++/config/os/generic/ctype_inline.h b/contrib/libstdc++/config/os/generic/ctype_inline.h
index 0da0c7c..5f24fe6 100644
--- a/contrib/libstdc++/config/os/generic/ctype_inline.h
+++ b/contrib/libstdc++/config/os/generic/ctype_inline.h
@@ -49,16 +49,14 @@
return _M_table[static_cast<unsigned char>(__c)] & __m;
else
{
- bool __ret = true;
- bool __any_match = false;
- const size_t __bitmasksize = 10;
+ bool __ret = false;
+ const size_t __bitmasksize = 15;
size_t __bitcur = 0; // Lowest bitmask in ctype_base == 0
- for (;__ret && __bitcur <= __bitmasksize; ++__bitcur)
+ for (; __bitcur <= __bitmasksize; ++__bitcur)
{
- mask __bit = static_cast<mask>(1 << __bitcur);
+ const mask __bit = static_cast<mask>(1 << __bitcur);
if (__m & __bit)
{
- __any_match = true;
bool __testis;
switch (__bit)
{
@@ -99,10 +97,10 @@
__testis = false;
break;
}
- __ret &= __testis;
+ __ret |= __testis;
}
}
- return __ret & __any_match;
+ return __ret;
}
}
@@ -116,7 +114,7 @@
else
{
// Highest bitmask in ctype_base == 10.
- const size_t __bitmasksize = 10;
+ const size_t __bitmasksize = 15;
for (;__low < __high; ++__vec, ++__low)
{
mask __m = 0;
@@ -124,7 +122,7 @@
size_t __i = 0;
for (;__i <= __bitmasksize; ++__i)
{
- mask __bit = static_cast<mask>(1 << __i);
+ const mask __bit = static_cast<mask>(1 << __i);
if (this->is(__bit, *__low))
__m |= __bit;
}
diff --git a/contrib/libstdc++/config/os/generic/ctype_noninline.h b/contrib/libstdc++/config/os/generic/ctype_noninline.h
index d07dc8b..e30348e 100644
--- a/contrib/libstdc++/config/os/generic/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/generic/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/generic/os_defines.h b/contrib/libstdc++/config/os/generic/os_defines.h
index 143c07e..303049b 100644
--- a/contrib/libstdc++/config/os/generic/os_defines.h
+++ b/contrib/libstdc++/config/os/generic/os_defines.h
@@ -28,8 +28,8 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/gnu-linux/ctype_base.h b/contrib/libstdc++/config/os/gnu-linux/ctype_base.h
index a431f97..fc27a3f 100644
--- a/contrib/libstdc++/config/os/gnu-linux/ctype_base.h
+++ b/contrib/libstdc++/config/os/gnu-linux/ctype_base.h
@@ -1,6 +1,7 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2002, 2003
+// 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
@@ -48,8 +49,8 @@
static const mask xdigit = _ISxdigit;
static const mask space = _ISspace;
static const mask print = _ISprint;
- static const mask graph = _ISgraph;
+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
static const mask cntrl = _IScntrl;
static const mask punct = _ISpunct;
- static const mask alnum = _ISalnum;
+ static const mask alnum = _ISalpha | _ISdigit;
};
diff --git a/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h b/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h
index 8f06d13..925a5d0 100644
--- a/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/gnu-linux/ctype_noninline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2004
// Free Software Foundation, Inc.
//
// This file is part of the GNU ISO C++ Library. This library is free
@@ -34,13 +34,10 @@
// Information as gleaned from /usr/include/ctype.h
-#if _GLIBCPP_C_LOCALE_GNU
+#if _GLIBCXX_C_LOCALE_GNU
const ctype_base::mask*
ctype<char>::classic_table() throw()
- {
- locale::classic();
- return _S_c_locale->__ctype_b;
- }
+ { return _S_get_c_locale()->__ctype_b; }
#else
const ctype_base::mask*
ctype<char>::classic_table() throw()
@@ -59,20 +56,24 @@
}
#endif
-#if _GLIBCPP_C_LOCALE_GNU
+#if _GLIBCXX_C_LOCALE_GNU
ctype<char>::ctype(__c_locale __cloc, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ : facet(__refs), _M_c_locale_ctype(_S_clone_c_locale(__cloc)),
+ _M_del(__table != 0 && __del),
+ _M_toupper(_M_c_locale_ctype->__ctype_toupper),
+ _M_tolower(_M_c_locale_ctype->__ctype_tolower),
+ _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b),
+ _M_widen_ok(0), _M_narrow_ok(0)
{
- _M_c_locale_ctype = _S_clone_c_locale(__cloc);
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#else
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
{
char* __old=strdup(setlocale(LC_CTYPE, NULL));
setlocale(LC_CTYPE, "C");
@@ -87,22 +88,27 @@
#endif
setlocale(LC_CTYPE, __old);
free(__old);
- _M_c_locale_ctype = _S_c_locale;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#endif
-#if _GLIBCPP_C_LOCALE_GNU
- ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
- __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+#if _GLIBCXX_C_LOCALE_GNU
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+ _M_del(__table != 0 && __del),
+ _M_toupper(_M_c_locale_ctype->__ctype_toupper),
+ _M_tolower(_M_c_locale_ctype->__ctype_tolower),
+ _M_table(__table ? __table : _M_c_locale_ctype->__ctype_b),
+ _M_widen_ok(0), _M_narrow_ok(0)
{
- _M_c_locale_ctype = _S_c_locale;
- _M_toupper = _M_c_locale_ctype->__ctype_toupper;
- _M_tolower = _M_c_locale_ctype->__ctype_tolower;
- _M_table = __table ? __table : _M_c_locale_ctype->__ctype_b;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#else
- ctype<char>::ctype(const mask* __table, bool __del, size_t __refs) :
- __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del)
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_c_locale_ctype(_S_get_c_locale()),
+ _M_del(__table != 0 && __del), _M_widen_ok(0), _M_narrow_ok(0)
{
char* __old=strdup(setlocale(LC_CTYPE, NULL));
setlocale(LC_CTYPE, "C");
@@ -117,7 +123,8 @@
#endif
setlocale(LC_CTYPE, __old);
free(__old);
- _M_c_locale_ctype = _S_c_locale;
+ memset(_M_widen, 0, sizeof(_M_widen));
+ memset(_M_narrow, 0, sizeof(_M_narrow));
}
#endif
diff --git a/contrib/libstdc++/config/os/gnu-linux/os_defines.h b/contrib/libstdc++/config/os/gnu-linux/os_defines.h
index 21ea296..0e0194a 100644
--- a/contrib/libstdc++/config/os/gnu-linux/os_defines.h
+++ b/contrib/libstdc++/config/os/gnu-linux/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for GNU/Linux -*- C++ -*-
-// Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 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
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
@@ -38,30 +38,8 @@
#include <features.h>
-#if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
-
-// The types __off_t and __off64_t are not defined through <sys/types.h>
-// as _G_config assumes. For libc5 and glibc 2.0 instead use
-// <gnu/types.h> and the old name for __off64_t.
-#include <gnu/types.h>
-typedef __loff_t __off64_t;
-
-// These systems have declarations mismatching those in libio.h by
-// omitting throw qualifiers. Cleanest way out is to not provide
-// throw-qualifiers at all. Defining it as empty here will make libio.h
-// not define it.
-#undef __THROW
-#define __THROW
-
-// Tell Glibc not to try to provide its own inline versions of
-// some math functions. Those cause assembly-time clashes with
-// our definitions.
-#define __NO_MATH_INLINES
-
-#endif
-
-#if defined __GLIBC__ && __GLIBC__ >= 2
// We must not see the optimized string functions GNU libc defines.
+#if defined __GLIBC__ && __GLIBC__ >= 2
#define __NO_STRING_INLINES
#endif
diff --git a/contrib/libstdc++/config/os/hpux/ctype_base.h b/contrib/libstdc++/config/os/hpux/ctype_base.h
index f2f6ad0..53bbe23 100644
--- a/contrib/libstdc++/config/os/hpux/ctype_base.h
+++ b/contrib/libstdc++/config/os/hpux/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003 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
@@ -48,8 +48,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/hpux/ctype_noninline.h b/contrib/libstdc++/config/os/hpux/ctype_noninline.h
index a85bc9c..00e338b 100644
--- a/contrib/libstdc++/config/os/hpux/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/hpux/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : (const mask *) __SB_masks)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : (const mask *) __SB_masks)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/hpux/os_defines.h b/contrib/libstdc++/config/os/hpux/os_defines.h
index 6414b41..6cba739 100644
--- a/contrib/libstdc++/config/os/hpux/os_defines.h
+++ b/contrib/libstdc++/config/os/hpux/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for HPUX -*- C++ -*-
-// Copyright (C) 2000, 2002 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2002, 2004 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
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
@@ -58,7 +58,7 @@
unconditionally, which makes intmax_t and uintmax_t long long
types.
- We also force _GLIBCPP_USE_LONG_LONG here so that we don't have
+ We also force _GLIBCXX_USE_LONG_LONG here so that we don't have
to bastardize configure to deal with this sillyness. */
namespace std
{
@@ -75,12 +75,12 @@ namespace std
#endif
}
-#define _GLIBCPP_USE_LONG_LONG 1
+#define _GLIBCXX_USE_LONG_LONG 1
// HPUX on IA64 requires vtable to be 64 bit aligned even at 32 bit
// mode. We need to pad the vtable structure to achieve this.
#if !defined(_LP64) && defined (__ia64__)
-#define _GLIBCPP_VTABLE_PADDING 8
+#define _GLIBCXX_VTABLE_PADDING 8
typedef long int __padding_type;
#endif
@@ -91,16 +91,9 @@ typedef long int __padding_type;
#define _LIBUNWIND_STD_ABI 1
#endif
-/* We need explicit instantiation of the atomicity lock on HPPA if
- there is no weak support. */
-#if !defined(_GLIBCPP_SUPPORTS_WEAK) && defined (__hppa__)
-#define _GLIBCPP_INST_ATOMICITY_LOCK 1
-#endif
-
/* Don't use pragma weak in gthread headers. HP-UX rejects programs
with unsatisfied external references even if all of those references
are weak; gthread relies on such unsatisfied references being resolved
to null pointers when weak symbol support is on. */
-#define _GLIBCPP_GTHREAD_USE_WEAK 0
-
+#define _GLIBCXX_GTHREAD_USE_WEAK 0
#endif
diff --git a/contrib/libstdc++/config/os/irix/atomic_word.h b/contrib/libstdc++/config/os/irix/atomic_word.h
new file mode 100644
index 0000000..68b8101
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/atomic_word.h
@@ -0,0 +1,35 @@
+// Low-level type for atomic operations -*- C++ -*-
+
+// Copyright (C) 2004 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 _GLIBCXX_ATOMIC_WORD_H
+#define _GLIBCXX_ATOMIC_WORD_H 1
+
+typedef long _Atomic_word;
+
+#endif
diff --git a/contrib/libstdc++/config/os/irix/atomicity.h b/contrib/libstdc++/config/os/irix/atomicity.h
new file mode 100644
index 0000000..83e9e02
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/atomicity.h
@@ -0,0 +1,42 @@
+// Low-level functions for atomic operations: IRIX version -*- C++ -*-
+
+// Copyright (C) 2001, 2004 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 <mutex.h>
+#include <bits/atomicity.h>
+
+namespace __gnu_cxx
+{
+ _Atomic_word
+ __exchange_and_add(volatile _Atomic_word* __mem, int __val)
+ { return (_Atomic_word) test_then_add((unsigned long*) const_cast<_Atomic_word*>(__mem), __val); }
+
+ void
+ __atomic_add(volatile _Atomic_word* __mem, int __val)
+ { __exchange_and_add(__mem, __val); }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h b/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h
index 3cb29b6..2aeb50c 100644
--- a/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/irix/irix5.2/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h b/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h
index 1d7f968..87556f8 100644
--- a/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h
+++ b/contrib/libstdc++/config/os/irix/irix5.2/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h b/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h
index 08557d1..d4d2003 100644
--- a/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h
+++ b/contrib/libstdc++/config/os/irix/irix6.5/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2003 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
@@ -48,8 +48,8 @@
static const mask xdigit = _ISxdigit;
static const mask space = _ISspace;
static const mask print = _ISprint;
- static const mask graph = _ISgraph;
+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
static const mask cntrl = _IScntrl;
static const mask punct = _ISpunct;
- static const mask alnum = _ISalnum;
+ static const mask alnum = _ISalpha | _ISdigit;
};
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h b/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h
index 009e611..8fdf95e 100644
--- a/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/irix/irix6.5/ctype_noninline.h
@@ -39,18 +39,28 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ?
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(!__table ?
(const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h b/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h
index 838b747..6b0174b 100644
--- a/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h
+++ b/contrib/libstdc++/config/os/irix/irix6.5/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
@@ -51,5 +51,8 @@
// GCC does not use thunks on IRIX.
#define _G_USING_THUNKS 0
+// FINOREAD takes an "off_t *" as argument.
+#define _GLIBCXX_FIONREAD_TAKES_OFF_T
+
#endif
diff --git a/contrib/libstdc++/config/os/mingw32/ctype_noninline.h b/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
index 998547c..e493d40 100644
--- a/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/mingw32/ctype_noninline.h
@@ -43,16 +43,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/mingw32/os_defines.h b/contrib/libstdc++/config/os/mingw32/os_defines.h
index 5c99e09..38fd3c7 100644
--- a/contrib/libstdc++/config/os/mingw32/os_defines.h
+++ b/contrib/libstdc++/config/os/mingw32/os_defines.h
@@ -1,6 +1,6 @@
// Specific definitions for generic platforms -*- C++ -*-
-// Copyright (C) 2000 Free Software Foundation, Inc.
+// Copyright (C) 2000, 2001, 2002, 2003 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
@@ -28,10 +28,21 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-# define _GLIBCPP_OS_DEFINES
+#ifndef _GLIBCXX_OS_DEFINES
+# define _GLIBCXX_OS_DEFINES
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+// Define as 0, if you want, to enable inlining of gthread functions.
+// By default, don't pollute libstdc++ with win32api names.
+#if !defined (__GTHREAD_HIDE_WIN32API)
+# define __GTHREAD_HIDE_WIN32API 1
+#endif
+
+// Don't let win32api windef.h define min and max as macros
+// if included after stl_algobase.h.
+#undef NOMINMAX
+#define NOMINMAX 1
+
#endif
diff --git a/contrib/libstdc++/config/os/newlib/ctype_noninline.h b/contrib/libstdc++/config/os/newlib/ctype_noninline.h
index b511c4a..d0cce94 100644
--- a/contrib/libstdc++/config/os/newlib/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/newlib/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/newlib/os_defines.h b/contrib/libstdc++/config/os/newlib/os_defines.h
index 1277661..3b19787 100644
--- a/contrib/libstdc++/config/os/newlib/os_defines.h
+++ b/contrib/libstdc++/config/os/newlib/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h b/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h
index cf34bd4..2eef13a 100644
--- a/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/qnx/qnx6.1/ctype_noninline.h
@@ -39,14 +39,24 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _Ctype)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h b/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h
index 23cf097..929331c 100644
--- a/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h
+++ b/contrib/libstdc++/config/os/qnx/qnx6.1/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h
index a3c27b0..a808636 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h
index a9be0bf..7e5a14e 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h
index 5f8d10a..c1447e6 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003 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
@@ -49,8 +49,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h
index f65cfe7..694901a 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/ctype_noninline.h
@@ -39,16 +39,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h
index aa9ecd6..29d6cf5 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h
index 9b8bddc..22be358 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_base.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+// Copyright (C) 1997, 1998, 1999, 2000, 2003 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
@@ -50,8 +50,8 @@
static const mask xdigit = _ISXDIGIT;
static const mask space = _ISSPACE;
static const mask print = _ISPRINT;
- static const mask graph = _ISGRAPH;
+ static const mask graph = _ISALPHA | _ISDIGIT | _ISPUNCT;
static const mask cntrl = _ISCNTRL;
static const mask punct = _ISPUNCT;
- static const mask alnum = _ISALNUM;
+ static const mask alnum = _ISALPHA | _ISDIGIT;
};
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h
index c8b11a9..d4917f0 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(__trans_upper), _M_tolower(__trans_lower),
_M_table(__table ? __table : classic_table())
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h
index cf53fa4..9131aa6 100644
--- a/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/os_defines.h
@@ -27,8 +27,8 @@
// invalidate any other reasons why the executable file might be covered by
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
diff --git a/contrib/libstdc++/config/os/tpf/ctype_base.h b/contrib/libstdc++/config/os/tpf/ctype_base.h
new file mode 100644
index 0000000..0461f3a
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const int* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef unsigned short mask;
+ static const mask upper = _ISupper;
+ static const mask lower = _ISlower;
+ static const mask alpha = _ISalpha;
+ static const mask digit = _ISdigit;
+ static const mask xdigit = _ISxdigit;
+ static const mask space = _ISspace;
+ static const mask print = _ISprint;
+ static const mask graph = _ISalpha | _ISdigit | _ISpunct;
+ static const mask cntrl = _IScntrl;
+ static const mask punct = _ISpunct;
+ static const mask alnum = _ISalpha | _ISdigit;
+ };
diff --git a/contrib/libstdc++/config/os/tpf/ctype_inline.h b/contrib/libstdc++/config/os/tpf/ctype_inline.h
new file mode 100644
index 0000000..3f2f32d
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/ctype_inline.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return _M_table[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = _M_table[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && !(_M_table[static_cast<unsigned char>(*__low)] & __m))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && (_M_table[static_cast<unsigned char>(*__low)] & __m) != 0)
+ ++__low;
+ return __low;
+ }
diff --git a/contrib/libstdc++/config/os/tpf/ctype_noninline.h b/contrib/libstdc++/config/os/tpf/ctype_noninline.h
new file mode 100644
index 0000000..3735b56
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/ctype_noninline.h
@@ -0,0 +1,103 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2004 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from /usr/include/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ {
+ const ctype_base::mask* __ret;
+ char* __old = strdup(setlocale(LC_CTYPE, NULL));
+ setlocale(LC_CTYPE, "C");
+ __ret = *__ctype_b_loc();
+ setlocale(LC_CTYPE, __old);
+ free(__old);
+ return __ret;
+ }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del)
+ {
+ char* __old=strdup(setlocale(LC_CTYPE, NULL));
+ setlocale(LC_CTYPE, "C");
+ _M_toupper = *__ctype_toupper_loc();
+ _M_tolower = *__ctype_tolower_loc();
+ _M_table = __table ? __table : *__ctype_b_loc();
+ setlocale(LC_CTYPE, __old);
+ free(__old);
+ _M_c_locale_ctype = _S_get_c_locale();
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del)
+ {
+ char* __old=strdup(setlocale(LC_CTYPE, NULL));
+ setlocale(LC_CTYPE, "C");
+ _M_toupper = *__ctype_toupper_loc();
+ _M_tolower = *__ctype_tolower_loc();
+ _M_table = __table ? __table : *__ctype_b_loc();
+ setlocale(LC_CTYPE, __old);
+ free(__old);
+ _M_c_locale_ctype = _S_get_c_locale();
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ { return _M_toupper[static_cast<unsigned char>(__c)]; }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = _M_toupper[static_cast<unsigned char>(*__low)];
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ { return _M_tolower[static_cast<unsigned char>(__c)]; }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = _M_tolower[static_cast<unsigned char>(*__low)];
+ ++__low;
+ }
+ return __high;
+ }
diff --git a/contrib/libstdc++/config/os/tpf/os_defines.h b/contrib/libstdc++/config/os/tpf/os_defines.h
new file mode 100644
index 0000000..40ee13a
--- /dev/null
+++ b/contrib/libstdc++/config/os/tpf/os_defines.h
@@ -0,0 +1,45 @@
+// Specific definitions for TPF -*- C++ -*-
+
+// Copyright (C) 2004 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 _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+// TPF is a big endian OS, let it be known here.
+#define _BIG_ENDIAN 1
+
+// This keeps isanum, et al from being propagated as macros.
+#define __NO_CTYPE 1
+
+// We must not see the optimized string functions GNU libc defines.
+#define __NO_STRING_INLINES
+
+#endif
diff --git a/contrib/libstdc++/config/os/vxworks/ctype_base.h b/contrib/libstdc++/config/os/vxworks/ctype_base.h
new file mode 100644
index 0000000..2a34561
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/ctype_base.h
@@ -0,0 +1,59 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information extracted from target/h/ctype.h.
+
+ struct ctype_base
+ {
+ // Non-standard typedefs.
+ typedef const unsigned char* __to_type;
+
+ // NB: Offsets into ctype<char>::_M_table force a particular size
+ // on the mask type. Because of this, we don't use an enum.
+ typedef unsigned char mask;
+ static const mask upper = _C_UPPER;
+ static const mask lower = _C_LOWER;
+ static const mask alpha = _C_UPPER | _C_LOWER;
+ static const mask digit = _C_NUMBER;
+ static const mask xdigit = _C_HEX_NUMBER;
+ static const mask space = _C_WHITE_SPACE | _C_CONTROL;
+ static const mask print = (_C_UPPER | _C_LOWER | _C_NUMBER
+ | _C_WHITE_SPACE | _C_PUNCT);
+ static const mask graph = _C_UPPER | _C_LOWER | _C_NUMBER | _C_PUNCT;
+ static const mask cntrl = _C_CONTROL;
+ static const mask punct = _C_PUNCT;
+ static const mask alnum = _C_UPPER | _C_LOWER | _C_NUMBER;
+ };
+
+
+
diff --git a/contrib/libstdc++/config/os/vxworks/ctype_inline.h b/contrib/libstdc++/config/os/vxworks/ctype_inline.h
new file mode 100644
index 0000000..f5cc78b
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+
+// Information as gleaned from target/h/ctype.h
+
+// ctype bits to be inlined go here. Non-inlinable (ie virtual do_*)
+// functions go in ctype.cc
+
+ bool
+ ctype<char>::
+ is(mask __m, char __c) const
+ { return __ctype[static_cast<unsigned char>(__c)] & __m; }
+
+ const char*
+ ctype<char>::
+ is(const char* __low, const char* __high, mask* __vec) const
+ {
+ while (__low < __high)
+ *__vec++ = __ctype[static_cast<unsigned char>(*__low++)];
+ return __high;
+ }
+
+ const char*
+ ctype<char>::
+ scan_is(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && !(__ctype[static_cast<unsigned char>(*__low)] & __m))
+ ++__low;
+ return __low;
+ }
+
+ const char*
+ ctype<char>::
+ scan_not(mask __m, const char* __low, const char* __high) const
+ {
+ while (__low < __high
+ && (__ctype[static_cast<unsigned char>(*__low)] & __m))
+ ++__low;
+ return __low;
+ }
diff --git a/contrib/libstdc++/config/os/vxworks/ctype_noninline.h b/contrib/libstdc++/config/os/vxworks/ctype_noninline.h
new file mode 100644
index 0000000..acf91a4
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/ctype_noninline.h
@@ -0,0 +1,91 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003
+// Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library. This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING. If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction. Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License. This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1 Locales
+//
+// Information as gleaned from target/h/ctype.h
+
+ const ctype_base::mask*
+ ctype<char>::classic_table() throw()
+ { return __ctype; }
+
+ ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
+ size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
+ : facet(__refs), _M_del(__table != 0 && __del),
+ _M_toupper(NULL), _M_tolower(NULL),
+ _M_table(__table ? __table : classic_table())
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
+
+ char
+ ctype<char>::do_toupper(char __c) const
+ { return __toupper(__c); }
+
+ const char*
+ ctype<char>::do_toupper(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = __toupper(*__low);
+ ++__low;
+ }
+ return __high;
+ }
+
+ char
+ ctype<char>::do_tolower(char __c) const
+ { return __tolower(__c); }
+
+ const char*
+ ctype<char>::do_tolower(char* __low, const char* __high) const
+ {
+ while (__low < __high)
+ {
+ *__low = __tolower(*__low);
+ ++__low;
+ }
+ return __high;
+ }
diff --git a/contrib/libstdc++/config/os/vxworks/os_defines.h b/contrib/libstdc++/config/os/vxworks/os_defines.h
new file mode 100644
index 0000000..c5f04ff
--- /dev/null
+++ b/contrib/libstdc++/config/os/vxworks/os_defines.h
@@ -0,0 +1,37 @@
+// Specific definitions for VxWorks -*- C++ -*-
+
+// Copyright (C) 2000, 2003 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 _GLIBCPP_OS_DEFINES
+#define _GLIBCPP_OS_DEFINES 1
+
+// System-specific #define, typedefs, corrections, etc, go here. This
+// file will come before all others.
+
+#endif
diff --git a/contrib/libstdc++/config/os/windiss/ctype_noninline.h b/contrib/libstdc++/config/os/windiss/ctype_noninline.h
index 0d34695..cf75ddf 100644
--- a/contrib/libstdc++/config/os/windiss/ctype_noninline.h
+++ b/contrib/libstdc++/config/os/windiss/ctype_noninline.h
@@ -40,16 +40,26 @@
ctype<char>::ctype(__c_locale, const mask* __table, bool __del,
size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table == 0 ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
ctype<char>::ctype(const mask* __table, bool __del, size_t __refs)
- : __ctype_abstract_base<char>(__refs), _M_del(__table != 0 && __del),
+ : facet(__refs), _M_del(__table != 0 && __del),
_M_toupper(NULL), _M_tolower(NULL),
_M_table(__table == 0 ? classic_table() : __table)
- { }
+ {
+ memset(_M_widen, 0, sizeof(_M_widen));
+ _M_widen_ok = 0;
+ memset(_M_narrow, 0, sizeof(_M_narrow));
+ _M_narrow_ok = 0;
+ }
char
ctype<char>::do_toupper(char __c) const
diff --git a/contrib/libstdc++/config/os/windiss/os_defines.h b/contrib/libstdc++/config/os/windiss/os_defines.h
index dd8b008..136733e 100644
--- a/contrib/libstdc++/config/os/windiss/os_defines.h
+++ b/contrib/libstdc++/config/os/windiss/os_defines.h
@@ -28,10 +28,11 @@
// the GNU General Public License.
-#ifndef _GLIBCPP_OS_DEFINES
-#define _GLIBCPP_OS_DEFINES 1
+#ifndef _GLIBCXX_OS_DEFINES
+#define _GLIBCXX_OS_DEFINES 1
// System-specific #define, typedefs, corrections, etc, go here. This
// file will come before all others.
+#define __C9X__ 1 // for sinf etc
#endif
OpenPOWER on IntegriCloud