From efbfe7b228c18b8cc364aabaefd6f8253bc6b5ad Mon Sep 17 00:00:00 2001 From: cvs2svn Date: Fri, 17 May 2002 19:47:49 +0000 Subject: This commit was manufactured by cvs2svn to create branch 'VENDOR-gcc'. --- contrib/gcc/cp/cfns.h | 472 ++++++++++++++++++++++++++++++++++++++ contrib/libstdc++/FREEBSD-upgrade | 18 ++ 2 files changed, 490 insertions(+) create mode 100644 contrib/gcc/cp/cfns.h create mode 100644 contrib/libstdc++/FREEBSD-upgrade diff --git a/contrib/gcc/cp/cfns.h b/contrib/gcc/cp/cfns.h new file mode 100644 index 0000000..a139160 --- /dev/null +++ b/contrib/gcc/cp/cfns.h @@ -0,0 +1,472 @@ +/* C code produced by gperf version 2.7.2 */ +/* Command-line: gperf -o -C -E -k '1-6,$' -j1 -D -N libc_name_p /FBSD/src/gnu/usr.bin/cc/cc1plus/../../../../contrib/gcc/cp/cfns.gperf */ +/* $FreeBSD$ */ +#ifdef __GNUC__ +__inline +#endif +static unsigned int hash PARAMS ((const char *, unsigned int)); +#ifdef __GNUC__ +__inline +#endif +const char * libc_name_p PARAMS ((const char *, unsigned int)); +/* maximum key range = 1020, duplicates = 1 */ + +#ifdef __GNUC__ +__inline +#else +#ifdef __cplusplus +inline +#endif +#endif +static unsigned int +hash (str, len) + register const char *str; + register unsigned int len; +{ + static const unsigned short asso_values[] = + { + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 0, 1, + 0, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 247, 218, 144, + 0, 0, 40, 7, 126, 184, 2, 15, 146, 67, + 9, 60, 0, 0, 3, 0, 7, 8, 197, 1, + 40, 8, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, 1038, + 1038, 1038, 1038, 1038, 1038, 1038 + }; + register int hval = len; + + switch (hval) + { + default: + case 6: + hval += asso_values[(unsigned char)str[5]]; + case 5: + hval += asso_values[(unsigned char)str[4]]; + case 4: + hval += asso_values[(unsigned char)str[3]]; + case 3: + hval += asso_values[(unsigned char)str[2]]; + case 2: + hval += asso_values[(unsigned char)str[1]]; + case 1: + hval += asso_values[(unsigned char)str[0]]; + break; + } + return hval + asso_values[(unsigned char)str[len - 1]]; +} + +#ifdef __GNUC__ +__inline +#endif +const char * +libc_name_p (str, len) + register const char *str; + register unsigned int len; +{ + enum + { + TOTAL_KEYWORDS = 207, + MIN_WORD_LENGTH = 3, + MAX_WORD_LENGTH = 10, + MIN_HASH_VALUE = 18, + MAX_HASH_VALUE = 1037 + }; + + static const char * const wordlist[] = + { + "gets", + "puts", + "sqrt", + "strerror", + "strstr", + "strspn", + "exp", + "free", + "fgets", + "fputs", + "fgetws", + "fputws", + "pow", + "fseek", + "perror", + "strtod", + "toupper", + "towupper", + "frexp", + "strtok", + "fsetpos", + "ferror", + "freopen", + "fgetpos", + "fopen", + "wmemset", + "memset", + "system", + "wcsstr", + "wctype", + "strxfrm", + "wcsspn", + "strcspn", + "fmod", + "strcpy", + "strncpy", + "strlen", + "ungetwc", + "feof", + "ldexp", + "isupper", + "rewind", + "iswupper", + "sin", + "cos", + "modf", + "iswpunct", + "wcstod", + "log10", + "log", + "wcsrtombs", + "strcmp", + "fwide", + "towctrans", + "strncmp", + "strtoul", + "fwrite", + "exit", + "swprintf", + "wcstok", + "strftime", + "sprintf", + "wprintf", + "strpbrk", + "time", + "rand", + "srand", + "wmemmove", + "tan", + "tolower", + "fwprintf", + "towlower", + "wcstombs", + "printf", + "fprintf", + "strchr", + "strrchr", + "wmemcpy", + "fread", + "getwchar", + "putwchar", + "longjmp", + "memcpy", + "wcsxfrm", + "wcscspn", + "getc", + "putc", + "getwc", + "putwc", + "wcscpy", + "wcsncpy", + "wcslen", + "floor", + "setbuf", + "ungetc", + "rename", + "remove", + "gmtime", + "mktime", + "fgetc", + "fputc", + "fgetwc", + "fputwc", + "memcmp", + "iswctype", + "wmemcmp", + "ispunct", + "mbstowcs", + "wcscmp", + "mbsrtowcs", + "setlocale", + "wcsncmp", + "wcstoul", + "strtol", + "wcsftime", + "iswprint", + "wcspbrk", + "iswdigit", + "isprint", + "fclose", + "atof", + "islower", + "iswlower", + "ctime", + "wmemchr", + "memchr", + "wctrans", + "strcat", + "getenv", + "strncat", + "iswxdigit", + "wcschr", + "wcsrchr", + "isxdigit", + "vswprintf", + "raise", + "iswspace", + "vsprintf", + "vwprintf", + "vprintf", + "swscanf", + "sinh", + "tmpfile", + "asin", + "mblen", + "acos", + "mbrlen", + "cosh", + "difftime", + "memmove", + "abs", + "tmpnam", + "vfwprintf", + "setvbuf", + "vfprintf", + "scanf", + "sscanf", + "wscanf", + "fwscanf", + "ftell", + "fflush", + "atexit", + "iswcntrl", + "iscntrl", + "mbrtowc", + "wcrtomb", + "fabs", + "wcstol", + "strcoll", + "atan2", + "tanh", + "atan", + "fscanf", + "clock", + "getchar", + "putchar", + "abort", + "clearerr", + "wcscat", + "wcsncat", + "isdigit", + "isgraph", + "iswgraph", + "btowc", + "div", + "isspace", + "atol", + "labs", + "ceil", + "mbtowc", + "wcscoll", + "wctob", + "asctime", + "iswalnum", + "isalnum", + "mbsinit", + "atoi", + "wctomb", + "ldiv", + "signal", + "realloc", + "localtime", + "iswalpha", + "localeconv", + "isalpha", + "malloc", + "calloc" + }; + + static const short lookup[] = + { + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 0, 1, -1, 2, -1, -1, + -1, -1, -1, 3, -1, 4, -1, -1, + -1, -1, 5, -1, -1, -1, -1, -1, + -1, -1, -1, 6, -1, -1, -1, 7, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 8, 9, 10, 11, -1, + -1, 12, -1, -1, -1, -1, -1, -1, + -1, -1, -1, 13, -1, -1, 14, -1, + -1, -1, -1, 15, -1, 16, -1, 17, + 18, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 19, 20, -1, -1, -1, 21, 22, + -1, 23, -1, 24, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 25, -1, -1, + -1, -1, 26, 27, -1, -1, -1, -1, + -1, -1, -1, -1, 28, -1, 29, 30, + -1, 31, 32, 33, -1, -1, -1, -1, + 34, -1, 35, -1, 36, -1, -1, 37, + 38, -1, -1, -1, -1, -1, -1, 39, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 40, 41, 42, 43, -1, 44, + -1, -1, -1, 45, -1, -1, -1, -1, + -1, 46, 47, 48, -1, -1, -1, 49, + 50, -1, -1, 51, -1, -1, 52, 53, + -1, -1, -1, -1, -1, 54, 55, -1, + -1, 56, 57, -1, -1, 58, -1, -1, + 59, 60, 61, 62, -1, 63, -1, -1, + -1, -1, -1, -1, -1, -1, 64, 65, + 66, -1, -1, -1, -1, -1, 67, -1, + -1, -1, -1, 68, -1, -1, -1, -1, + -1, -1, -1, -1, 69, 70, 71, 72, + -1, 73, 74, -1, 75, 76, 77, 78, + 79, 80, 81, -1, 82, -1, 83, -1, + -1, 84, 85, 86, 87, 88, -1, 89, + -1, 90, -1, 91, -1, 92, -1, 93, + -1, -1, -1, -1, -1, 94, -1, -1, + -1, -1, -1, -1, 95, 96, -1, -1, + -1, -1, 97, -1, -1, -1, -1, -1, + -1, -1, 98, 99, 100, 101, 102, 103, + 104, 105, -1, -1, -1, -1, -1, 106, + -1, 107, 108, -1, 109, -1, 110, -1, + -1, -1, -1, -1, 111, 112, -1, 113, + -1, -1, -1, -1, -1, -1, -1, -1, + 114, -1, -1, 115, 116, -1, -1, 117, + -1, -1, 118, -1, 119, -1, 120, -1, + -1, 121, -1, 122, -1, -1, -1, 123, + -1, -1, -1, -1, -1, -1, -1, 124, + 125, -1, 126, -1, -1, 127, -1, 128, + 129, 130, -1, 131, 132, -1, 133, -1, + -1, -1, 134, -1, -1, -1, -1, 135, + 136, 137, 138, -1, -1, -1, -1, 139, + 140, 141, -1, 142, -1, 143, 144, 145, + -1, -1, 146, -1, 147, -1, -1, 148, + -1, 149, -1, -1, 150, -1, 151, -1, + -1, -1, 152, -1, -1, 153, -1, -1, + -1, 154, -1, -1, -1, 155, 156, 157, + 158, -1, 159, -1, 160, -1, -1, -1, + -1, -1, 161, 162, 163, -1, -1, -1, + -1, -1, -1, -719, -1, 166, 167, -43, + -2, 168, -1, 169, -1, -1, -1, 170, + -1, -1, -1, 171, -1, -1, 172, -1, + -1, 173, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 174, 175, -1, + -1, -1, -1, 176, -1, -1, -1, 177, + -1, -1, -1, -1, 178, -1, -1, 179, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 180, 181, -1, + 182, -1, -1, 183, -1, 184, 185, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, 186, -1, -1, -1, -1, 187, + -1, -1, -1, -1, -1, -1, -1, -1, + 188, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, 189, + 190, -1, -1, -1, -1, 191, -1, -1, + 192, -1, -1, -1, -1, -1, 193, -1, + -1, -1, -1, -1, 194, -1, -1, -1, + -1, -1, -1, -1, 195, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 196, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 197, -1, -1, -1, -1, -1, -1, + 198, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 199, -1, -1, -1, -1, -1, -1, + -1, 200, -1, -1, -1, -1, -1, 201, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, 202, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, 203, -1, + -1, -1, -1, -1, -1, 204, -1, -1, + 205, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, -1, -1, -1, + -1, -1, -1, -1, -1, 206 + }; + + if (len <= MAX_WORD_LENGTH && len >= MIN_WORD_LENGTH) + { + register int key = hash (str, len); + + if (key <= MAX_HASH_VALUE && key >= 0) + { + register int index = lookup[key]; + + if (index >= 0) + { + register const char *s = wordlist[index]; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return s; + } + else if (index < -TOTAL_KEYWORDS) + { + register int offset = - 1 - TOTAL_KEYWORDS - index; + register const char * const *wordptr = &wordlist[TOTAL_KEYWORDS + lookup[offset]]; + register const char * const *wordendptr = wordptr + -lookup[offset + 1]; + + while (wordptr < wordendptr) + { + register const char *s = *wordptr; + + if (*str == *s && !strcmp (str + 1, s + 1)) + return s; + wordptr++; + } + } + } + } + return 0; +} diff --git a/contrib/libstdc++/FREEBSD-upgrade b/contrib/libstdc++/FREEBSD-upgrade new file mode 100644 index 0000000..137023e --- /dev/null +++ b/contrib/libstdc++/FREEBSD-upgrade @@ -0,0 +1,18 @@ +# ex:ts=8 +$FreeBSD$ + +For the import of libstdc++, files were pruned by: + + tar xvypf gcc-2.95.1.tar.bz2 '*/libobjc' + +Then imported by: + cvs -d /home/ncvs import -m "Virgin import of GCC 2.95.2's libstdc++" \ + src/contrib/libstdc++ FSF gcc_2_95_2 + +To make local changes to libstdc++, simply patch and commit to the main +branch (aka HEAD). Never make local changes on the vendor (FSF) branch. + +All local changes should be submitted to "gcc-patches@gcc.gnu.org". + +obrien@NUXI.com +31-October-1999 -- cgit v1.1 From 0895e1acb698e05d503c26bec5471de2e88b7d93 Mon Sep 17 00:00:00 2001 From: obrien Date: Tue, 28 May 2002 16:16:03 +0000 Subject: Gcc 3.1.0 pre-release's C++ support bits from the FSF anoncvs repo on 9-May-2002 15:57:15 EDT. --- contrib/libstdc++/ChangeLog | 3582 +-- contrib/libstdc++/ChangeLog-2000 | 10130 +++++++++ contrib/libstdc++/ChangeLog-2001 | 6067 +++++ contrib/libstdc++/Makefile.am | 147 + contrib/libstdc++/Makefile.in | 926 +- contrib/libstdc++/README | 102 + contrib/libstdc++/acconfig.h | 430 + contrib/libstdc++/acinclude.m4 | 2186 ++ contrib/libstdc++/aclocal.m4 | 2898 +++ contrib/libstdc++/config.h.in | 1073 + .../libstdc++/config/cpu/alpha/bits/atomicity.h | 76 + .../libstdc++/config/cpu/alpha/bits/cpu_limits.h | 38 + contrib/libstdc++/config/cpu/arm/bits/atomicity.h | 221 + contrib/libstdc++/config/cpu/cris/bits/atomicity.h | 79 + .../libstdc++/config/cpu/cris/bits/cpu_limits.h | 33 + .../libstdc++/config/cpu/generic/bits/atomicity.h | 51 + .../libstdc++/config/cpu/generic/bits/cpu_limits.h | 41 + contrib/libstdc++/config/cpu/generic/bits/limits.h | 40 + contrib/libstdc++/config/cpu/i386/bits/atomicity.h | 59 + .../libstdc++/config/cpu/i386/bits/cpu_limits.h | 33 + contrib/libstdc++/config/cpu/i486/bits/atomicity.h | 57 + contrib/libstdc++/config/cpu/ia64/bits/atomicity.h | 51 + .../libstdc++/config/cpu/ia64/bits/cpu_limits.h | 36 + contrib/libstdc++/config/cpu/m68k/bits/atomicity.h | 158 + .../libstdc++/config/cpu/m68k/bits/cpu_limits.h | 35 + contrib/libstdc++/config/cpu/mips/bits/atomicity.h | 78 + .../libstdc++/config/cpu/mmix/bits/cpu_limits.h | 34 + .../libstdc++/config/cpu/powerpc/bits/atomicity.h | 112 + .../libstdc++/config/cpu/powerpc/bits/cpu_limits.h | 38 + contrib/libstdc++/config/cpu/s390/bits/atomicity.h | 60 + .../libstdc++/config/cpu/s390/bits/cpu_limits.h | 33 + .../config/cpu/sparc/sparc32/bits/atomicity.h | 88 + .../config/cpu/sparc/sparc64/bits/atomicity.h | 70 + .../libstdc++/config/cpu/x86-64/bits/atomicity.h | 55 + .../libstdc++/config/cpu/x86-64/bits/cpu_limits.h | 35 + contrib/libstdc++/config/io/basic_file_libio.cc | 194 + contrib/libstdc++/config/io/basic_file_libio.h | 498 + contrib/libstdc++/config/io/basic_file_stdio.cc | 187 + contrib/libstdc++/config/io/basic_file_stdio.h | 114 + contrib/libstdc++/config/io/c_io_libio.h | 113 + contrib/libstdc++/config/io/c_io_libio_codecvt.c | 153 + contrib/libstdc++/config/io/c_io_stdio.h | 93 + contrib/libstdc++/config/linker-map.dummy | 7 + contrib/libstdc++/config/linker-map.gnu | 113 + .../libstdc++/config/locale/generic/c_locale.cc | 220 + contrib/libstdc++/config/locale/generic/c_locale.h | 41 + .../locale/generic/codecvt_specializations.h | 38 + .../config/locale/generic/collate_members.cc | 72 + .../config/locale/generic/ctype_members.cc | 195 + .../config/locale/generic/messages_members.cc | 45 + .../config/locale/generic/messages_members.h | 58 + .../config/locale/generic/monetary_members.cc | 127 + .../config/locale/generic/numeric_members.cc | 73 + .../config/locale/generic/time_members.cc | 202 + contrib/libstdc++/config/locale/gnu/c_locale.cc | 185 + contrib/libstdc++/config/locale/gnu/c_locale.h | 46 + .../libstdc++/config/locale/gnu/collate_members.cc | 72 + .../libstdc++/config/locale/gnu/ctype_members.cc | 202 + .../config/locale/gnu/messages_members.cc | 57 + .../libstdc++/config/locale/gnu/messages_members.h | 78 + .../config/locale/gnu/monetary_members.cc | 501 + .../libstdc++/config/locale/gnu/numeric_members.cc | 106 + .../libstdc++/config/locale/gnu/time_members.cc | 336 + .../config/locale/ieee_1003.1-2001/c_locale.cc | 112 + .../config/locale/ieee_1003.1-2001/c_locale.h | 44 + .../ieee_1003.1-2001/codecvt_specializations.h | 460 + .../locale/ieee_1003.1-2001/messages_members.cc | 49 + .../locale/ieee_1003.1-2001/messages_members.h | 70 + contrib/libstdc++/config/os/aix/bits/atomicity.h | 59 + contrib/libstdc++/config/os/aix/bits/ctype_base.h | 55 + .../libstdc++/config/os/aix/bits/ctype_inline.h | 76 + .../libstdc++/config/os/aix/bits/ctype_noninline.h | 81 + contrib/libstdc++/config/os/aix/bits/os_defines.h | 67 + .../config/os/bsd/freebsd/bits/ctype_base.h | 76 + .../config/os/bsd/freebsd/bits/ctype_inline.h | 94 + .../config/os/bsd/freebsd/bits/ctype_noninline.h | 81 + .../config/os/bsd/freebsd/bits/os_defines.h | 39 + .../config/os/bsd/netbsd/bits/ctype_base.h | 58 + .../config/os/bsd/netbsd/bits/ctype_inline.h | 73 + .../config/os/bsd/netbsd/bits/ctype_noninline.h | 79 + .../config/os/bsd/netbsd/bits/os_defines.h | 38 + .../libstdc++/config/os/djgpp/bits/ctype_base.h | 57 + .../libstdc++/config/os/djgpp/bits/ctype_inline.h | 67 + .../config/os/djgpp/bits/ctype_noninline.h | 81 + .../libstdc++/config/os/djgpp/bits/os_defines.h | 45 + .../libstdc++/config/os/generic/bits/ctype_base.h | 58 + .../config/os/generic/bits/ctype_inline.h | 125 + .../config/os/generic/bits/ctype_noninline.h | 82 + .../libstdc++/config/os/generic/bits/os_defines.h | 37 + .../config/os/gnu-linux/bits/ctype_base.h | 69 + .../config/os/gnu-linux/bits/ctype_inline.h | 69 + .../config/os/gnu-linux/bits/ctype_noninline.h | 100 + .../config/os/gnu-linux/bits/os_defines.h | 76 + contrib/libstdc++/config/os/hpux/bits/cpu_limits.h | 35 + contrib/libstdc++/config/os/hpux/bits/ctype_base.h | 55 + .../libstdc++/config/os/hpux/bits/ctype_inline.h | 79 + .../config/os/hpux/bits/ctype_noninline.h | 82 + contrib/libstdc++/config/os/hpux/bits/os_defines.h | 79 + .../config/os/irix/irix5.2/bits/atomicity.h | 50 + .../config/os/irix/irix5.2/bits/ctype_base.h | 55 + .../config/os/irix/irix5.2/bits/ctype_inline.h | 72 + .../config/os/irix/irix5.2/bits/ctype_noninline.h | 83 + .../config/os/irix/irix5.2/bits/os_defines.h | 54 + .../config/os/irix/irix6.5/bits/atomicity.h | 50 + .../config/os/irix/irix6.5/bits/ctype_base.h | 55 + .../config/os/irix/irix6.5/bits/ctype_inline.h | 69 + .../config/os/irix/irix6.5/bits/ctype_noninline.h | 84 + .../config/os/irix/irix6.5/bits/os_defines.h | 62 + .../libstdc++/config/os/mingw32/bits/ctype_base.h | 58 + .../config/os/mingw32/bits/ctype_inline.h | 71 + .../config/os/mingw32/bits/ctype_noninline.h | 89 + .../libstdc++/config/os/mingw32/bits/os_defines.h | 37 + .../libstdc++/config/os/newlib/bits/ctype_base.h | 57 + .../libstdc++/config/os/newlib/bits/ctype_inline.h | 73 + .../config/os/newlib/bits/ctype_noninline.h | 88 + .../libstdc++/config/os/newlib/bits/os_defines.h | 36 + .../config/os/osf/osf5.0/bits/cpu_limits.h | 35 + .../config/os/solaris/solaris2.5/bits/ctype_base.h | 55 + .../os/solaris/solaris2.5/bits/ctype_inline.h | 69 + .../os/solaris/solaris2.5/bits/ctype_noninline.h | 81 + .../config/os/solaris/solaris2.5/bits/os_defines.h | 45 + .../config/os/solaris/solaris2.6/bits/ctype_base.h | 56 + .../os/solaris/solaris2.6/bits/ctype_inline.h | 76 + .../os/solaris/solaris2.6/bits/ctype_noninline.h | 81 + .../config/os/solaris/solaris2.6/bits/os_defines.h | 45 + .../config/os/solaris/solaris2.7/bits/ctype_base.h | 57 + .../os/solaris/solaris2.7/bits/ctype_inline.h | 69 + .../os/solaris/solaris2.7/bits/ctype_noninline.h | 82 + .../config/os/solaris/solaris2.7/bits/os_defines.h | 49 + contrib/libstdc++/configure | 21902 +++++++++++++++++++ contrib/libstdc++/configure.host | 31 + contrib/libstdc++/configure.in | 558 +- contrib/libstdc++/configure.target | 185 + contrib/libstdc++/include/Makefile.am | 463 + contrib/libstdc++/include/Makefile.in | 699 + contrib/libstdc++/include/backward/algo.h | 149 + contrib/libstdc++/include/backward/algobase.h | 95 + contrib/libstdc++/include/backward/alloc.h | 62 + .../libstdc++/include/backward/backward_warning.h | 39 + contrib/libstdc++/include/backward/bvector.h | 69 + contrib/libstdc++/include/backward/complex.h | 43 + contrib/libstdc++/include/backward/defalloc.h | 117 + contrib/libstdc++/include/backward/deque.h | 70 + contrib/libstdc++/include/backward/fstream.h | 52 + contrib/libstdc++/include/backward/function.h | 130 + contrib/libstdc++/include/backward/hash_map.h | 72 + contrib/libstdc++/include/backward/hash_set.h | 69 + contrib/libstdc++/include/backward/hashtable.h | 76 + contrib/libstdc++/include/backward/heap.h | 71 + contrib/libstdc++/include/backward/iomanip.h | 70 + contrib/libstdc++/include/backward/iostream.h | 60 + contrib/libstdc++/include/backward/istream.h | 43 + contrib/libstdc++/include/backward/iterator.h | 162 + contrib/libstdc++/include/backward/list.h | 70 + contrib/libstdc++/include/backward/map.h | 69 + contrib/libstdc++/include/backward/multimap.h | 69 + contrib/libstdc++/include/backward/multiset.h | 69 + contrib/libstdc++/include/backward/new.h | 42 + contrib/libstdc++/include/backward/ostream.h | 38 + contrib/libstdc++/include/backward/pair.h | 70 + contrib/libstdc++/include/backward/queue.h | 41 + contrib/libstdc++/include/backward/rope.h | 60 + contrib/libstdc++/include/backward/set.h | 69 + contrib/libstdc++/include/backward/slist.h | 56 + contrib/libstdc++/include/backward/stack.h | 72 + contrib/libstdc++/include/backward/stream.h | 38 + contrib/libstdc++/include/backward/streambuf.h | 40 + contrib/libstdc++/include/backward/strstream | 188 + contrib/libstdc++/include/backward/strstream.h | 41 + contrib/libstdc++/include/backward/tempbuf.h | 78 + contrib/libstdc++/include/backward/tree.h | 55 + contrib/libstdc++/include/backward/vector.h | 70 + contrib/libstdc++/include/bits/basic_ios.h | 210 + contrib/libstdc++/include/bits/basic_ios.tcc | 193 + contrib/libstdc++/include/bits/basic_string.h | 1084 + contrib/libstdc++/include/bits/basic_string.tcc | 981 + .../libstdc++/include/bits/boost_concept_check.h | 899 + contrib/libstdc++/include/bits/c++config | 77 + contrib/libstdc++/include/bits/char_traits.h | 280 + contrib/libstdc++/include/bits/codecvt.h | 336 + contrib/libstdc++/include/bits/concept_check.h | 86 + contrib/libstdc++/include/bits/cpp_type_traits.h | 300 + contrib/libstdc++/include/bits/fpos.h | 123 + contrib/libstdc++/include/bits/fstream.tcc | 589 + contrib/libstdc++/include/bits/functexcept.h | 85 + contrib/libstdc++/include/bits/generic_shadow.h | 59 + contrib/libstdc++/include/bits/gslice.h | 124 + contrib/libstdc++/include/bits/gslice_array.h | 176 + contrib/libstdc++/include/bits/indirect_array.h | 176 + contrib/libstdc++/include/bits/ios_base.h | 589 + contrib/libstdc++/include/bits/istream.tcc | 1228 ++ contrib/libstdc++/include/bits/locale_facets.h | 1813 ++ contrib/libstdc++/include/bits/locale_facets.tcc | 2401 ++ contrib/libstdc++/include/bits/localefwd.h | 476 + contrib/libstdc++/include/bits/mask_array.h | 167 + contrib/libstdc++/include/bits/ostream.tcc | 704 + contrib/libstdc++/include/bits/pthread_allocimpl.h | 525 + contrib/libstdc++/include/bits/slice.h | 85 + contrib/libstdc++/include/bits/slice_array.h | 180 + contrib/libstdc++/include/bits/sstream.tcc | 238 + contrib/libstdc++/include/bits/stl_algo.h | 4351 ++++ contrib/libstdc++/include/bits/stl_algobase.h | 820 + contrib/libstdc++/include/bits/stl_alloc.h | 941 + contrib/libstdc++/include/bits/stl_bvector.h | 726 + contrib/libstdc++/include/bits/stl_construct.h | 148 + contrib/libstdc++/include/bits/stl_deque.h | 1580 ++ contrib/libstdc++/include/bits/stl_function.h | 736 + contrib/libstdc++/include/bits/stl_heap.h | 308 + contrib/libstdc++/include/bits/stl_iterator.h | 733 + .../include/bits/stl_iterator_base_funcs.h | 179 + .../include/bits/stl_iterator_base_types.h | 162 + contrib/libstdc++/include/bits/stl_list.h | 989 + contrib/libstdc++/include/bits/stl_map.h | 503 + contrib/libstdc++/include/bits/stl_multimap.h | 491 + contrib/libstdc++/include/bits/stl_multiset.h | 277 + contrib/libstdc++/include/bits/stl_numeric.h | 215 + contrib/libstdc++/include/bits/stl_pair.h | 157 + contrib/libstdc++/include/bits/stl_pthread_alloc.h | 60 + contrib/libstdc++/include/bits/stl_queue.h | 244 + .../libstdc++/include/bits/stl_raw_storage_iter.h | 112 + contrib/libstdc++/include/bits/stl_relops.h | 141 + contrib/libstdc++/include/bits/stl_set.h | 274 + contrib/libstdc++/include/bits/stl_stack.h | 160 + contrib/libstdc++/include/bits/stl_tempbuf.h | 149 + contrib/libstdc++/include/bits/stl_threads.h | 236 + contrib/libstdc++/include/bits/stl_tree.h | 1462 ++ contrib/libstdc++/include/bits/stl_uninitialized.h | 290 + contrib/libstdc++/include/bits/stl_vector.h | 1083 + contrib/libstdc++/include/bits/stream_iterator.h | 156 + contrib/libstdc++/include/bits/streambuf.tcc | 250 + .../libstdc++/include/bits/streambuf_iterator.h | 201 + contrib/libstdc++/include/bits/stringfwd.h | 67 + contrib/libstdc++/include/bits/type_traits.h | 339 + contrib/libstdc++/include/bits/valarray_array.h | 630 + contrib/libstdc++/include/bits/valarray_array.tcc | 161 + contrib/libstdc++/include/bits/valarray_meta.h | 1075 + contrib/libstdc++/include/c/std_cassert.h | 38 + contrib/libstdc++/include/c/std_cctype.h | 41 + contrib/libstdc++/include/c/std_cerrno.h | 41 + contrib/libstdc++/include/c/std_cfloat.h | 41 + contrib/libstdc++/include/c/std_ciso646.h | 37 + contrib/libstdc++/include/c/std_climits.h | 41 + contrib/libstdc++/include/c/std_clocale.h | 41 + contrib/libstdc++/include/c/std_cmath.h | 41 + contrib/libstdc++/include/c/std_csetjmp.h | 41 + contrib/libstdc++/include/c/std_csignal.h | 41 + contrib/libstdc++/include/c/std_cstdarg.h | 41 + contrib/libstdc++/include/c/std_cstddef.h | 41 + contrib/libstdc++/include/c/std_cstdio.h | 41 + contrib/libstdc++/include/c/std_cstdlib.h | 41 + contrib/libstdc++/include/c/std_cstring.h | 41 + contrib/libstdc++/include/c/std_ctime.h | 41 + contrib/libstdc++/include/c/std_cwchar.h | 41 + contrib/libstdc++/include/c/std_cwctype.h | 41 + contrib/libstdc++/include/c_shadow/assert.h | 55 + .../libstdc++/include/c_shadow/bits/std_cassert.h | 61 + .../libstdc++/include/c_shadow/bits/std_cctype.h | 145 + .../libstdc++/include/c_shadow/bits/std_cerrno.h | 48 + .../libstdc++/include/c_shadow/bits/std_cfloat.h | 54 + .../libstdc++/include/c_shadow/bits/std_climits.h | 57 + .../libstdc++/include/c_shadow/bits/std_clocale.h | 70 + .../libstdc++/include/c_shadow/bits/std_cmath.h | 749 + .../libstdc++/include/c_shadow/bits/std_csetjmp.h | 63 + .../libstdc++/include/c_shadow/bits/std_csignal.h | 67 + .../libstdc++/include/c_shadow/bits/std_cstdarg.h | 54 + .../libstdc++/include/c_shadow/bits/std_cstddef.h | 59 + .../libstdc++/include/c_shadow/bits/std_cstdio.h | 283 + .../libstdc++/include/c_shadow/bits/std_cstdlib.h | 197 + .../libstdc++/include/c_shadow/bits/std_cstring.h | 279 + .../libstdc++/include/c_shadow/bits/std_ctime.h | 107 + .../libstdc++/include/c_shadow/bits/std_cwchar.h | 275 + .../libstdc++/include/c_shadow/bits/std_cwctype.h | 129 + .../libstdc++/include/c_shadow/bits/wrap_fcntl.h | 92 + .../include/c_shadow/bits/wrap_features.h | 51 + .../libstdc++/include/c_shadow/bits/wrap_iconv.h | 51 + .../libstdc++/include/c_shadow/bits/wrap_iolibio.h | 50 + .../include/c_shadow/bits/wrap_langinfo.h | 49 + .../libstdc++/include/c_shadow/bits/wrap_libio.h | 50 + .../libstdc++/include/c_shadow/bits/wrap_libioP.h | 50 + .../libstdc++/include/c_shadow/bits/wrap_pthread.h | 81 + .../libstdc++/include/c_shadow/bits/wrap_unistd.h | 47 + contrib/libstdc++/include/c_shadow/ctype.h | 67 + contrib/libstdc++/include/c_shadow/errno.h | 56 + contrib/libstdc++/include/c_shadow/fcntl.h | 63 + contrib/libstdc++/include/c_shadow/features.h | 58 + contrib/libstdc++/include/c_shadow/float.h | 54 + contrib/libstdc++/include/c_shadow/iconv.h | 66 + contrib/libstdc++/include/c_shadow/iolibio.h | 58 + contrib/libstdc++/include/c_shadow/langinfo.h | 55 + contrib/libstdc++/include/c_shadow/libio.h | 81 + contrib/libstdc++/include/c_shadow/libioP.h | 64 + contrib/libstdc++/include/c_shadow/limits.h | 54 + contrib/libstdc++/include/c_shadow/locale.h | 57 + contrib/libstdc++/include/c_shadow/math.h | 131 + contrib/libstdc++/include/c_shadow/pthread.h | 86 + contrib/libstdc++/include/c_shadow/setjmp.h | 56 + contrib/libstdc++/include/c_shadow/signal.h | 58 + contrib/libstdc++/include/c_shadow/stdarg.h | 55 + contrib/libstdc++/include/c_shadow/stddef.h | 60 + contrib/libstdc++/include/c_shadow/stdio.h | 97 + contrib/libstdc++/include/c_shadow/stdlib.h | 101 + contrib/libstdc++/include/c_shadow/string.h | 76 + contrib/libstdc++/include/c_shadow/sys/cdefs.h | 49 + contrib/libstdc++/include/c_shadow/time.h | 67 + contrib/libstdc++/include/c_shadow/unistd.h | 101 + contrib/libstdc++/include/c_shadow/wchar.h | 131 + contrib/libstdc++/include/c_shadow/wctype.h | 74 + contrib/libstdc++/include/c_std/cmath.tcc | 54 + contrib/libstdc++/include/c_std/std_cassert.h | 48 + contrib/libstdc++/include/c_std/std_cctype.h | 83 + contrib/libstdc++/include/c_std/std_cerrno.h | 55 + contrib/libstdc++/include/c_std/std_cfloat.h | 50 + contrib/libstdc++/include/c_std/std_ciso646.h | 37 + contrib/libstdc++/include/c_std/std_climits.h | 51 + contrib/libstdc++/include/c_std/std_clocale.h | 62 + contrib/libstdc++/include/c_std/std_cmath.h | 664 + contrib/libstdc++/include/c_std/std_csetjmp.h | 65 + contrib/libstdc++/include/c_std/std_csignal.h | 61 + contrib/libstdc++/include/c_std/std_cstdarg.h | 60 + contrib/libstdc++/include/c_std/std_cstddef.h | 56 + contrib/libstdc++/include/c_std/std_cstdio.h | 172 + contrib/libstdc++/include/c_std/std_cstdlib.h | 178 + contrib/libstdc++/include/c_std/std_cstring.h | 128 + contrib/libstdc++/include/c_std/std_ctime.h | 81 + contrib/libstdc++/include/c_std/std_cwchar.h | 243 + contrib/libstdc++/include/c_std/std_cwctype.h | 106 + contrib/libstdc++/include/ext/algorithm | 496 + contrib/libstdc++/include/ext/enc_filebuf.h | 61 + contrib/libstdc++/include/ext/functional | 395 + contrib/libstdc++/include/ext/hash_map | 445 + contrib/libstdc++/include/ext/hash_set | 435 + contrib/libstdc++/include/ext/iterator | 108 + contrib/libstdc++/include/ext/memory | 170 + contrib/libstdc++/include/ext/numeric | 136 + contrib/libstdc++/include/ext/rb_tree | 92 + contrib/libstdc++/include/ext/rope | 66 + contrib/libstdc++/include/ext/ropeimpl.h | 1548 ++ contrib/libstdc++/include/ext/slist | 952 + contrib/libstdc++/include/ext/stdio_filebuf.h | 113 + contrib/libstdc++/include/ext/stl_hash_fun.h | 126 + contrib/libstdc++/include/ext/stl_hashtable.h | 982 + contrib/libstdc++/include/ext/stl_rope.h | 2498 +++ contrib/libstdc++/include/std/std_algorithm.h | 75 + contrib/libstdc++/include/std/std_bitset.h | 1140 + contrib/libstdc++/include/std/std_complex.h | 1059 + contrib/libstdc++/include/std/std_deque.h | 77 + contrib/libstdc++/include/std/std_fstream.h | 558 + contrib/libstdc++/include/std/std_functional.h | 62 + contrib/libstdc++/include/std/std_iomanip.h | 249 + contrib/libstdc++/include/std/std_ios.h | 54 + contrib/libstdc++/include/std/std_iosfwd.h | 134 + contrib/libstdc++/include/std/std_iostream.h | 65 + contrib/libstdc++/include/std/std_istream.h | 290 + contrib/libstdc++/include/std/std_iterator.h | 79 + contrib/libstdc++/include/std/std_limits.h | 1926 ++ contrib/libstdc++/include/std/std_list.h | 77 + contrib/libstdc++/include/std/std_locale.h | 52 + contrib/libstdc++/include/std/std_map.h | 74 + contrib/libstdc++/include/std/std_memory.h | 204 + contrib/libstdc++/include/std/std_numeric.h | 75 + contrib/libstdc++/include/std/std_ostream.h | 278 + contrib/libstdc++/include/std/std_queue.h | 81 + contrib/libstdc++/include/std/std_set.h | 74 + contrib/libstdc++/include/std/std_sstream.h | 370 + contrib/libstdc++/include/std/std_stack.h | 77 + contrib/libstdc++/include/std/std_stdexcept.h | 148 + contrib/libstdc++/include/std/std_streambuf.h | 496 + contrib/libstdc++/include/std/std_string.h | 61 + contrib/libstdc++/include/std/std_utility.h | 73 + contrib/libstdc++/include/std/std_valarray.h | 743 + contrib/libstdc++/include/std/std_vector.h | 78 + contrib/libstdc++/libio/ChangeLog | 2774 +++ contrib/libstdc++/libio/Makefile.am | 67 + contrib/libstdc++/libio/Makefile.in | 426 + contrib/libstdc++/libio/_G_config.h | 136 + contrib/libstdc++/libio/filedoalloc.c | 101 + contrib/libstdc++/libio/fileops.c | 1049 + contrib/libstdc++/libio/genops.c | 1123 + contrib/libstdc++/libio/iofclose.c | 97 + contrib/libstdc++/libio/iofopen.c | 78 + contrib/libstdc++/libio/iofwide.c | 476 + contrib/libstdc++/libio/iolibio.h | 82 + contrib/libstdc++/libio/libio.h | 511 + contrib/libstdc++/libio/libioP.h | 821 + contrib/libstdc++/libio/stdfiles.c | 71 + contrib/libstdc++/libio/stdio.c | 43 + contrib/libstdc++/libio/wfiledoalloc.c | 108 + contrib/libstdc++/libio/wfileops.c | 754 + contrib/libstdc++/libio/wgenops.c | 756 + contrib/libstdc++/libmath/Makefile.am | 45 + contrib/libstdc++/libmath/Makefile.in | 393 + contrib/libstdc++/libmath/copysignf.c | 39 + contrib/libstdc++/libmath/mathconf.h | 314 + contrib/libstdc++/libmath/nan.c | 36 + contrib/libstdc++/libmath/signbit.c | 41 + contrib/libstdc++/libmath/signbitf.c | 41 + contrib/libstdc++/libmath/signbitl.c | 48 + contrib/libstdc++/libmath/stubs.c | 271 + contrib/libstdc++/libsupc++/Makefile.am | 189 + contrib/libstdc++/libsupc++/Makefile.in | 600 + contrib/libstdc++/libsupc++/cxxabi.h | 526 + contrib/libstdc++/libsupc++/del_op.cc | 40 + contrib/libstdc++/libsupc++/del_opnt.cc | 40 + contrib/libstdc++/libsupc++/del_opv.cc | 37 + contrib/libstdc++/libsupc++/del_opvnt.cc | 37 + contrib/libstdc++/libsupc++/eh_alloc.cc | 163 + contrib/libstdc++/libsupc++/eh_aux_runtime.cc | 57 + contrib/libstdc++/libsupc++/eh_catch.cc | 106 + contrib/libstdc++/libsupc++/eh_exception.cc | 44 + contrib/libstdc++/libsupc++/eh_globals.cc | 118 + contrib/libstdc++/libsupc++/eh_personality.cc | 485 + contrib/libstdc++/libsupc++/eh_terminate.cc | 87 + contrib/libstdc++/libsupc++/eh_throw.cc | 102 + contrib/libstdc++/libsupc++/eh_type.cc | 50 + contrib/libstdc++/libsupc++/exception | 116 + contrib/libstdc++/libsupc++/exception_defines.h | 42 + contrib/libstdc++/libsupc++/new | 94 + contrib/libstdc++/libsupc++/new_handler.cc | 47 + contrib/libstdc++/libsupc++/new_op.cc | 63 + contrib/libstdc++/libsupc++/new_opnt.cc | 66 + contrib/libstdc++/libsupc++/new_opv.cc | 37 + contrib/libstdc++/libsupc++/new_opvnt.cc | 37 + contrib/libstdc++/libsupc++/pure.cc | 51 + contrib/libstdc++/libsupc++/tinfo.cc | 721 + contrib/libstdc++/libsupc++/tinfo.h | 10 + contrib/libstdc++/libsupc++/tinfo2.cc | 167 + contrib/libstdc++/libsupc++/typeinfo | 150 + contrib/libstdc++/libsupc++/unwind-cxx.h | 171 + contrib/libstdc++/libsupc++/vec.cc | 336 + contrib/libstdc++/mkcheck.in | 447 + contrib/libstdc++/mkcshadow | 98 + contrib/libstdc++/mkinclosure | 102 + contrib/libstdc++/src/Makefile.am | 151 + contrib/libstdc++/src/Makefile.in | 521 + contrib/libstdc++/src/bitset.cc | 219 + contrib/libstdc++/src/cmath.cc | 47 + contrib/libstdc++/src/codecvt.cc | 202 + contrib/libstdc++/src/complex_io.cc | 93 + contrib/libstdc++/src/concept-inst.cc | 112 + contrib/libstdc++/src/ext-inst.cc | 40 + contrib/libstdc++/src/functexcept.cc | 151 + contrib/libstdc++/src/globals.cc | 226 + contrib/libstdc++/src/ios.cc | 359 + contrib/libstdc++/src/limits.cc | 449 + contrib/libstdc++/src/locale-inst.cc | 480 + contrib/libstdc++/src/locale.cc | 588 + contrib/libstdc++/src/localename.cc | 292 + contrib/libstdc++/src/misc-inst.cc | 274 + contrib/libstdc++/src/stdexcept.cc | 78 + contrib/libstdc++/src/stl-inst.cc | 47 + contrib/libstdc++/src/string-inst.cc | 135 + contrib/libstdc++/src/strstream.cc | 458 + contrib/libstdc++/src/valarray-inst.cc | 118 + contrib/libstdc++/src/vterminate.cc | 83 + contrib/libstdc++/src/wstring-inst.cc | 6 + contrib/libstdc++/testsuite_flags.in | 61 + 456 files changed, 144110 insertions(+), 1842 deletions(-) create mode 100644 contrib/libstdc++/ChangeLog-2000 create mode 100644 contrib/libstdc++/ChangeLog-2001 create mode 100644 contrib/libstdc++/Makefile.am create mode 100644 contrib/libstdc++/README create mode 100644 contrib/libstdc++/acconfig.h create mode 100644 contrib/libstdc++/acinclude.m4 create mode 100644 contrib/libstdc++/aclocal.m4 create mode 100644 contrib/libstdc++/config.h.in create mode 100644 contrib/libstdc++/config/cpu/alpha/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/alpha/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/arm/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/cris/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/cris/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/generic/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/generic/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/generic/bits/limits.h create mode 100644 contrib/libstdc++/config/cpu/i386/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/i386/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/i486/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/ia64/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/ia64/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/m68k/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/m68k/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/mips/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/mmix/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/powerpc/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/powerpc/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/s390/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/s390/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/cpu/sparc/sparc32/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/sparc/sparc64/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/x86-64/bits/atomicity.h create mode 100644 contrib/libstdc++/config/cpu/x86-64/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/io/basic_file_libio.cc create mode 100644 contrib/libstdc++/config/io/basic_file_libio.h create mode 100644 contrib/libstdc++/config/io/basic_file_stdio.cc create mode 100644 contrib/libstdc++/config/io/basic_file_stdio.h create mode 100644 contrib/libstdc++/config/io/c_io_libio.h create mode 100644 contrib/libstdc++/config/io/c_io_libio_codecvt.c create mode 100644 contrib/libstdc++/config/io/c_io_stdio.h create mode 100644 contrib/libstdc++/config/linker-map.dummy create mode 100644 contrib/libstdc++/config/linker-map.gnu create mode 100644 contrib/libstdc++/config/locale/generic/c_locale.cc create mode 100644 contrib/libstdc++/config/locale/generic/c_locale.h create mode 100644 contrib/libstdc++/config/locale/generic/codecvt_specializations.h create mode 100644 contrib/libstdc++/config/locale/generic/collate_members.cc create mode 100644 contrib/libstdc++/config/locale/generic/ctype_members.cc create mode 100644 contrib/libstdc++/config/locale/generic/messages_members.cc create mode 100644 contrib/libstdc++/config/locale/generic/messages_members.h create mode 100644 contrib/libstdc++/config/locale/generic/monetary_members.cc create mode 100644 contrib/libstdc++/config/locale/generic/numeric_members.cc create mode 100644 contrib/libstdc++/config/locale/generic/time_members.cc create mode 100644 contrib/libstdc++/config/locale/gnu/c_locale.cc create mode 100644 contrib/libstdc++/config/locale/gnu/c_locale.h create mode 100644 contrib/libstdc++/config/locale/gnu/collate_members.cc create mode 100644 contrib/libstdc++/config/locale/gnu/ctype_members.cc create mode 100644 contrib/libstdc++/config/locale/gnu/messages_members.cc create mode 100644 contrib/libstdc++/config/locale/gnu/messages_members.h create mode 100644 contrib/libstdc++/config/locale/gnu/monetary_members.cc create mode 100644 contrib/libstdc++/config/locale/gnu/numeric_members.cc create mode 100644 contrib/libstdc++/config/locale/gnu/time_members.cc create mode 100644 contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc create mode 100644 contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.h create mode 100644 contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h create mode 100644 contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc create mode 100644 contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.h create mode 100644 contrib/libstdc++/config/os/aix/bits/atomicity.h create mode 100644 contrib/libstdc++/config/os/aix/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/aix/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/aix/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/aix/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/bsd/freebsd/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/bsd/netbsd/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/djgpp/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/djgpp/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/djgpp/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/djgpp/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/generic/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/generic/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/generic/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/generic/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/gnu-linux/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/gnu-linux/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/gnu-linux/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/gnu-linux/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/hpux/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/os/hpux/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/hpux/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/hpux/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/hpux/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/irix/irix5.2/bits/atomicity.h create mode 100644 contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/irix/irix5.2/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/irix/irix6.5/bits/atomicity.h create mode 100644 contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/irix/irix6.5/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/mingw32/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/mingw32/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/mingw32/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/mingw32/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/newlib/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/newlib/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/newlib/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/newlib/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/osf/osf5.0/bits/cpu_limits.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.5/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.6/bits/os_defines.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_base.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_inline.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_noninline.h create mode 100644 contrib/libstdc++/config/os/solaris/solaris2.7/bits/os_defines.h create mode 100755 contrib/libstdc++/configure create mode 100644 contrib/libstdc++/configure.host create mode 100644 contrib/libstdc++/configure.target create mode 100644 contrib/libstdc++/include/Makefile.am create mode 100644 contrib/libstdc++/include/Makefile.in create mode 100644 contrib/libstdc++/include/backward/algo.h create mode 100644 contrib/libstdc++/include/backward/algobase.h create mode 100644 contrib/libstdc++/include/backward/alloc.h create mode 100644 contrib/libstdc++/include/backward/backward_warning.h create mode 100644 contrib/libstdc++/include/backward/bvector.h create mode 100644 contrib/libstdc++/include/backward/complex.h create mode 100644 contrib/libstdc++/include/backward/defalloc.h create mode 100644 contrib/libstdc++/include/backward/deque.h create mode 100644 contrib/libstdc++/include/backward/fstream.h create mode 100644 contrib/libstdc++/include/backward/function.h create mode 100644 contrib/libstdc++/include/backward/hash_map.h create mode 100644 contrib/libstdc++/include/backward/hash_set.h create mode 100644 contrib/libstdc++/include/backward/hashtable.h create mode 100644 contrib/libstdc++/include/backward/heap.h create mode 100644 contrib/libstdc++/include/backward/iomanip.h create mode 100644 contrib/libstdc++/include/backward/iostream.h create mode 100644 contrib/libstdc++/include/backward/istream.h create mode 100644 contrib/libstdc++/include/backward/iterator.h create mode 100644 contrib/libstdc++/include/backward/list.h create mode 100644 contrib/libstdc++/include/backward/map.h create mode 100644 contrib/libstdc++/include/backward/multimap.h create mode 100644 contrib/libstdc++/include/backward/multiset.h create mode 100644 contrib/libstdc++/include/backward/new.h create mode 100644 contrib/libstdc++/include/backward/ostream.h create mode 100644 contrib/libstdc++/include/backward/pair.h create mode 100644 contrib/libstdc++/include/backward/queue.h create mode 100644 contrib/libstdc++/include/backward/rope.h create mode 100644 contrib/libstdc++/include/backward/set.h create mode 100644 contrib/libstdc++/include/backward/slist.h create mode 100644 contrib/libstdc++/include/backward/stack.h create mode 100644 contrib/libstdc++/include/backward/stream.h create mode 100644 contrib/libstdc++/include/backward/streambuf.h create mode 100644 contrib/libstdc++/include/backward/strstream create mode 100644 contrib/libstdc++/include/backward/strstream.h create mode 100644 contrib/libstdc++/include/backward/tempbuf.h create mode 100644 contrib/libstdc++/include/backward/tree.h create mode 100644 contrib/libstdc++/include/backward/vector.h create mode 100644 contrib/libstdc++/include/bits/basic_ios.h create mode 100644 contrib/libstdc++/include/bits/basic_ios.tcc create mode 100644 contrib/libstdc++/include/bits/basic_string.h create mode 100644 contrib/libstdc++/include/bits/basic_string.tcc create mode 100644 contrib/libstdc++/include/bits/boost_concept_check.h create mode 100644 contrib/libstdc++/include/bits/c++config create mode 100644 contrib/libstdc++/include/bits/char_traits.h create mode 100644 contrib/libstdc++/include/bits/codecvt.h create mode 100644 contrib/libstdc++/include/bits/concept_check.h create mode 100644 contrib/libstdc++/include/bits/cpp_type_traits.h create mode 100644 contrib/libstdc++/include/bits/fpos.h create mode 100644 contrib/libstdc++/include/bits/fstream.tcc create mode 100644 contrib/libstdc++/include/bits/functexcept.h create mode 100644 contrib/libstdc++/include/bits/generic_shadow.h create mode 100644 contrib/libstdc++/include/bits/gslice.h create mode 100644 contrib/libstdc++/include/bits/gslice_array.h create mode 100644 contrib/libstdc++/include/bits/indirect_array.h create mode 100644 contrib/libstdc++/include/bits/ios_base.h create mode 100644 contrib/libstdc++/include/bits/istream.tcc create mode 100644 contrib/libstdc++/include/bits/locale_facets.h create mode 100644 contrib/libstdc++/include/bits/locale_facets.tcc create mode 100644 contrib/libstdc++/include/bits/localefwd.h create mode 100644 contrib/libstdc++/include/bits/mask_array.h create mode 100644 contrib/libstdc++/include/bits/ostream.tcc create mode 100644 contrib/libstdc++/include/bits/pthread_allocimpl.h create mode 100644 contrib/libstdc++/include/bits/slice.h create mode 100644 contrib/libstdc++/include/bits/slice_array.h create mode 100644 contrib/libstdc++/include/bits/sstream.tcc create mode 100644 contrib/libstdc++/include/bits/stl_algo.h create mode 100644 contrib/libstdc++/include/bits/stl_algobase.h create mode 100644 contrib/libstdc++/include/bits/stl_alloc.h create mode 100644 contrib/libstdc++/include/bits/stl_bvector.h create mode 100644 contrib/libstdc++/include/bits/stl_construct.h create mode 100644 contrib/libstdc++/include/bits/stl_deque.h create mode 100644 contrib/libstdc++/include/bits/stl_function.h create mode 100644 contrib/libstdc++/include/bits/stl_heap.h create mode 100644 contrib/libstdc++/include/bits/stl_iterator.h create mode 100644 contrib/libstdc++/include/bits/stl_iterator_base_funcs.h create mode 100644 contrib/libstdc++/include/bits/stl_iterator_base_types.h create mode 100644 contrib/libstdc++/include/bits/stl_list.h create mode 100644 contrib/libstdc++/include/bits/stl_map.h create mode 100644 contrib/libstdc++/include/bits/stl_multimap.h create mode 100644 contrib/libstdc++/include/bits/stl_multiset.h create mode 100644 contrib/libstdc++/include/bits/stl_numeric.h create mode 100644 contrib/libstdc++/include/bits/stl_pair.h create mode 100644 contrib/libstdc++/include/bits/stl_pthread_alloc.h create mode 100644 contrib/libstdc++/include/bits/stl_queue.h create mode 100644 contrib/libstdc++/include/bits/stl_raw_storage_iter.h create mode 100644 contrib/libstdc++/include/bits/stl_relops.h create mode 100644 contrib/libstdc++/include/bits/stl_set.h create mode 100644 contrib/libstdc++/include/bits/stl_stack.h create mode 100644 contrib/libstdc++/include/bits/stl_tempbuf.h create mode 100644 contrib/libstdc++/include/bits/stl_threads.h create mode 100644 contrib/libstdc++/include/bits/stl_tree.h create mode 100644 contrib/libstdc++/include/bits/stl_uninitialized.h create mode 100644 contrib/libstdc++/include/bits/stl_vector.h create mode 100644 contrib/libstdc++/include/bits/stream_iterator.h create mode 100644 contrib/libstdc++/include/bits/streambuf.tcc create mode 100644 contrib/libstdc++/include/bits/streambuf_iterator.h create mode 100644 contrib/libstdc++/include/bits/stringfwd.h create mode 100644 contrib/libstdc++/include/bits/type_traits.h create mode 100644 contrib/libstdc++/include/bits/valarray_array.h create mode 100644 contrib/libstdc++/include/bits/valarray_array.tcc create mode 100644 contrib/libstdc++/include/bits/valarray_meta.h create mode 100644 contrib/libstdc++/include/c/std_cassert.h create mode 100644 contrib/libstdc++/include/c/std_cctype.h create mode 100644 contrib/libstdc++/include/c/std_cerrno.h create mode 100644 contrib/libstdc++/include/c/std_cfloat.h create mode 100644 contrib/libstdc++/include/c/std_ciso646.h create mode 100644 contrib/libstdc++/include/c/std_climits.h create mode 100644 contrib/libstdc++/include/c/std_clocale.h create mode 100644 contrib/libstdc++/include/c/std_cmath.h create mode 100644 contrib/libstdc++/include/c/std_csetjmp.h create mode 100644 contrib/libstdc++/include/c/std_csignal.h create mode 100644 contrib/libstdc++/include/c/std_cstdarg.h create mode 100644 contrib/libstdc++/include/c/std_cstddef.h create mode 100644 contrib/libstdc++/include/c/std_cstdio.h create mode 100644 contrib/libstdc++/include/c/std_cstdlib.h create mode 100644 contrib/libstdc++/include/c/std_cstring.h create mode 100644 contrib/libstdc++/include/c/std_ctime.h create mode 100644 contrib/libstdc++/include/c/std_cwchar.h create mode 100644 contrib/libstdc++/include/c/std_cwctype.h create mode 100644 contrib/libstdc++/include/c_shadow/assert.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cassert.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cctype.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cerrno.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cfloat.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_climits.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_clocale.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cmath.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_csetjmp.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_csignal.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cstdarg.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cstddef.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cstdio.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cstdlib.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cstring.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_ctime.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cwchar.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/std_cwctype.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_fcntl.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_features.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_iconv.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_iolibio.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_langinfo.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_libio.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_libioP.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_pthread.h create mode 100644 contrib/libstdc++/include/c_shadow/bits/wrap_unistd.h create mode 100644 contrib/libstdc++/include/c_shadow/ctype.h create mode 100644 contrib/libstdc++/include/c_shadow/errno.h create mode 100644 contrib/libstdc++/include/c_shadow/fcntl.h create mode 100644 contrib/libstdc++/include/c_shadow/features.h create mode 100644 contrib/libstdc++/include/c_shadow/float.h create mode 100644 contrib/libstdc++/include/c_shadow/iconv.h create mode 100644 contrib/libstdc++/include/c_shadow/iolibio.h create mode 100644 contrib/libstdc++/include/c_shadow/langinfo.h create mode 100644 contrib/libstdc++/include/c_shadow/libio.h create mode 100644 contrib/libstdc++/include/c_shadow/libioP.h create mode 100644 contrib/libstdc++/include/c_shadow/limits.h create mode 100644 contrib/libstdc++/include/c_shadow/locale.h create mode 100644 contrib/libstdc++/include/c_shadow/math.h create mode 100644 contrib/libstdc++/include/c_shadow/pthread.h create mode 100644 contrib/libstdc++/include/c_shadow/setjmp.h create mode 100644 contrib/libstdc++/include/c_shadow/signal.h create mode 100644 contrib/libstdc++/include/c_shadow/stdarg.h create mode 100644 contrib/libstdc++/include/c_shadow/stddef.h create mode 100644 contrib/libstdc++/include/c_shadow/stdio.h create mode 100644 contrib/libstdc++/include/c_shadow/stdlib.h create mode 100644 contrib/libstdc++/include/c_shadow/string.h create mode 100644 contrib/libstdc++/include/c_shadow/sys/cdefs.h create mode 100644 contrib/libstdc++/include/c_shadow/time.h create mode 100644 contrib/libstdc++/include/c_shadow/unistd.h create mode 100644 contrib/libstdc++/include/c_shadow/wchar.h create mode 100644 contrib/libstdc++/include/c_shadow/wctype.h create mode 100644 contrib/libstdc++/include/c_std/cmath.tcc create mode 100644 contrib/libstdc++/include/c_std/std_cassert.h create mode 100644 contrib/libstdc++/include/c_std/std_cctype.h create mode 100644 contrib/libstdc++/include/c_std/std_cerrno.h create mode 100644 contrib/libstdc++/include/c_std/std_cfloat.h create mode 100644 contrib/libstdc++/include/c_std/std_ciso646.h create mode 100644 contrib/libstdc++/include/c_std/std_climits.h create mode 100644 contrib/libstdc++/include/c_std/std_clocale.h create mode 100644 contrib/libstdc++/include/c_std/std_cmath.h create mode 100644 contrib/libstdc++/include/c_std/std_csetjmp.h create mode 100644 contrib/libstdc++/include/c_std/std_csignal.h create mode 100644 contrib/libstdc++/include/c_std/std_cstdarg.h create mode 100644 contrib/libstdc++/include/c_std/std_cstddef.h create mode 100644 contrib/libstdc++/include/c_std/std_cstdio.h create mode 100644 contrib/libstdc++/include/c_std/std_cstdlib.h create mode 100644 contrib/libstdc++/include/c_std/std_cstring.h create mode 100644 contrib/libstdc++/include/c_std/std_ctime.h create mode 100644 contrib/libstdc++/include/c_std/std_cwchar.h create mode 100644 contrib/libstdc++/include/c_std/std_cwctype.h create mode 100644 contrib/libstdc++/include/ext/algorithm create mode 100644 contrib/libstdc++/include/ext/enc_filebuf.h create mode 100644 contrib/libstdc++/include/ext/functional create mode 100644 contrib/libstdc++/include/ext/hash_map create mode 100644 contrib/libstdc++/include/ext/hash_set create mode 100644 contrib/libstdc++/include/ext/iterator create mode 100644 contrib/libstdc++/include/ext/memory create mode 100644 contrib/libstdc++/include/ext/numeric create mode 100644 contrib/libstdc++/include/ext/rb_tree create mode 100644 contrib/libstdc++/include/ext/rope create mode 100644 contrib/libstdc++/include/ext/ropeimpl.h create mode 100644 contrib/libstdc++/include/ext/slist create mode 100644 contrib/libstdc++/include/ext/stdio_filebuf.h create mode 100644 contrib/libstdc++/include/ext/stl_hash_fun.h create mode 100644 contrib/libstdc++/include/ext/stl_hashtable.h create mode 100644 contrib/libstdc++/include/ext/stl_rope.h create mode 100644 contrib/libstdc++/include/std/std_algorithm.h create mode 100644 contrib/libstdc++/include/std/std_bitset.h create mode 100644 contrib/libstdc++/include/std/std_complex.h create mode 100644 contrib/libstdc++/include/std/std_deque.h create mode 100644 contrib/libstdc++/include/std/std_fstream.h create mode 100644 contrib/libstdc++/include/std/std_functional.h create mode 100644 contrib/libstdc++/include/std/std_iomanip.h create mode 100644 contrib/libstdc++/include/std/std_ios.h create mode 100644 contrib/libstdc++/include/std/std_iosfwd.h create mode 100644 contrib/libstdc++/include/std/std_iostream.h create mode 100644 contrib/libstdc++/include/std/std_istream.h create mode 100644 contrib/libstdc++/include/std/std_iterator.h create mode 100644 contrib/libstdc++/include/std/std_limits.h create mode 100644 contrib/libstdc++/include/std/std_list.h create mode 100644 contrib/libstdc++/include/std/std_locale.h create mode 100644 contrib/libstdc++/include/std/std_map.h create mode 100644 contrib/libstdc++/include/std/std_memory.h create mode 100644 contrib/libstdc++/include/std/std_numeric.h create mode 100644 contrib/libstdc++/include/std/std_ostream.h create mode 100644 contrib/libstdc++/include/std/std_queue.h create mode 100644 contrib/libstdc++/include/std/std_set.h create mode 100644 contrib/libstdc++/include/std/std_sstream.h create mode 100644 contrib/libstdc++/include/std/std_stack.h create mode 100644 contrib/libstdc++/include/std/std_stdexcept.h create mode 100644 contrib/libstdc++/include/std/std_streambuf.h create mode 100644 contrib/libstdc++/include/std/std_string.h create mode 100644 contrib/libstdc++/include/std/std_utility.h create mode 100644 contrib/libstdc++/include/std/std_valarray.h create mode 100644 contrib/libstdc++/include/std/std_vector.h create mode 100644 contrib/libstdc++/libio/ChangeLog create mode 100644 contrib/libstdc++/libio/Makefile.am create mode 100644 contrib/libstdc++/libio/Makefile.in create mode 100644 contrib/libstdc++/libio/_G_config.h create mode 100644 contrib/libstdc++/libio/filedoalloc.c create mode 100644 contrib/libstdc++/libio/fileops.c create mode 100644 contrib/libstdc++/libio/genops.c create mode 100644 contrib/libstdc++/libio/iofclose.c create mode 100644 contrib/libstdc++/libio/iofopen.c create mode 100644 contrib/libstdc++/libio/iofwide.c create mode 100644 contrib/libstdc++/libio/iolibio.h create mode 100644 contrib/libstdc++/libio/libio.h create mode 100644 contrib/libstdc++/libio/libioP.h create mode 100644 contrib/libstdc++/libio/stdfiles.c create mode 100644 contrib/libstdc++/libio/stdio.c create mode 100644 contrib/libstdc++/libio/wfiledoalloc.c create mode 100644 contrib/libstdc++/libio/wfileops.c create mode 100644 contrib/libstdc++/libio/wgenops.c create mode 100644 contrib/libstdc++/libmath/Makefile.am create mode 100644 contrib/libstdc++/libmath/Makefile.in create mode 100644 contrib/libstdc++/libmath/copysignf.c create mode 100644 contrib/libstdc++/libmath/mathconf.h create mode 100644 contrib/libstdc++/libmath/nan.c create mode 100644 contrib/libstdc++/libmath/signbit.c create mode 100644 contrib/libstdc++/libmath/signbitf.c create mode 100644 contrib/libstdc++/libmath/signbitl.c create mode 100644 contrib/libstdc++/libmath/stubs.c create mode 100644 contrib/libstdc++/libsupc++/Makefile.am create mode 100644 contrib/libstdc++/libsupc++/Makefile.in create mode 100644 contrib/libstdc++/libsupc++/cxxabi.h create mode 100644 contrib/libstdc++/libsupc++/del_op.cc create mode 100644 contrib/libstdc++/libsupc++/del_opnt.cc create mode 100644 contrib/libstdc++/libsupc++/del_opv.cc create mode 100644 contrib/libstdc++/libsupc++/del_opvnt.cc create mode 100644 contrib/libstdc++/libsupc++/eh_alloc.cc create mode 100644 contrib/libstdc++/libsupc++/eh_aux_runtime.cc create mode 100644 contrib/libstdc++/libsupc++/eh_catch.cc create mode 100644 contrib/libstdc++/libsupc++/eh_exception.cc create mode 100644 contrib/libstdc++/libsupc++/eh_globals.cc create mode 100644 contrib/libstdc++/libsupc++/eh_personality.cc create mode 100644 contrib/libstdc++/libsupc++/eh_terminate.cc create mode 100644 contrib/libstdc++/libsupc++/eh_throw.cc create mode 100644 contrib/libstdc++/libsupc++/eh_type.cc create mode 100644 contrib/libstdc++/libsupc++/exception create mode 100644 contrib/libstdc++/libsupc++/exception_defines.h create mode 100644 contrib/libstdc++/libsupc++/new create mode 100644 contrib/libstdc++/libsupc++/new_handler.cc create mode 100644 contrib/libstdc++/libsupc++/new_op.cc create mode 100644 contrib/libstdc++/libsupc++/new_opnt.cc create mode 100644 contrib/libstdc++/libsupc++/new_opv.cc create mode 100644 contrib/libstdc++/libsupc++/new_opvnt.cc create mode 100644 contrib/libstdc++/libsupc++/pure.cc create mode 100644 contrib/libstdc++/libsupc++/tinfo.cc create mode 100644 contrib/libstdc++/libsupc++/tinfo.h create mode 100644 contrib/libstdc++/libsupc++/tinfo2.cc create mode 100644 contrib/libstdc++/libsupc++/typeinfo create mode 100644 contrib/libstdc++/libsupc++/unwind-cxx.h create mode 100644 contrib/libstdc++/libsupc++/vec.cc create mode 100755 contrib/libstdc++/mkcheck.in create mode 100755 contrib/libstdc++/mkcshadow create mode 100755 contrib/libstdc++/mkinclosure create mode 100644 contrib/libstdc++/src/Makefile.am create mode 100644 contrib/libstdc++/src/Makefile.in create mode 100644 contrib/libstdc++/src/bitset.cc create mode 100644 contrib/libstdc++/src/cmath.cc create mode 100644 contrib/libstdc++/src/codecvt.cc create mode 100644 contrib/libstdc++/src/complex_io.cc create mode 100644 contrib/libstdc++/src/concept-inst.cc create mode 100644 contrib/libstdc++/src/ext-inst.cc create mode 100644 contrib/libstdc++/src/functexcept.cc create mode 100644 contrib/libstdc++/src/globals.cc create mode 100644 contrib/libstdc++/src/ios.cc create mode 100644 contrib/libstdc++/src/limits.cc create mode 100644 contrib/libstdc++/src/locale-inst.cc create mode 100644 contrib/libstdc++/src/locale.cc create mode 100644 contrib/libstdc++/src/localename.cc create mode 100644 contrib/libstdc++/src/misc-inst.cc create mode 100644 contrib/libstdc++/src/stdexcept.cc create mode 100644 contrib/libstdc++/src/stl-inst.cc create mode 100644 contrib/libstdc++/src/string-inst.cc create mode 100644 contrib/libstdc++/src/strstream.cc create mode 100644 contrib/libstdc++/src/valarray-inst.cc create mode 100644 contrib/libstdc++/src/vterminate.cc create mode 100644 contrib/libstdc++/src/wstring-inst.cc create mode 100755 contrib/libstdc++/testsuite_flags.in diff --git a/contrib/libstdc++/ChangeLog b/contrib/libstdc++/ChangeLog index 02b950c..19658c1 100644 --- a/contrib/libstdc++/ChangeLog +++ b/contrib/libstdc++/ChangeLog @@ -1,1421 +1,2447 @@ -Fri Mar 16 12:46:19 GMT 2001 Bernd Schmidt (bernds@redhat.com) +2002-05-09 Jakub Jelinek - * gcc-2.95.3 Released. + * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Append all + multilib dirs containing libgcc_s*.so.1 below gcc object dir to + LD_LIBRARY_PATH. -2001-01-01 Bernd Schmidt +2002-05-08 Alexandre Oliva - 1999-12-07 Martin v. Löwis - * stl_deque.h (_Deque_base::const_iterator): Change third - template argument to pointer type. - Reported by Carlo Wood + * configure.in (ORIGINAL_LD_FOR_MULTILIBS): Preserve LD at + script entry, and set LD to it when configuring multilibs. + * configure: Rebuilt. - 1999-11-10 Benjamin Kosnik - Matthias Klose - * stl_rope.h: Fix initialization order. - * stl_deque.h: Use static_casts(signed_type). +2002-05-06 Phil Edwards -2000-11-24 Magnus Fromreide + * docs/html/documentation.html: Fix broken link. - * sstream: Backport libstdc++-V3 sstream to V2. +2002-05-03 Benjamin Kosnik -2000-04-24 Magnus Fromreide + PR libstdc++/6549. + * include/bits/fstream.tcc (filebuf::_M_underflow_common): Revert. + * testsuite/27_io/narrow_stream_objects.cc (test07): Add. - * sstream: New file. - * Makefile.in (HEADERS): Add it. +2002-05-02 Phil Edwards -2000-03-12 Gabriel Dos Reis + * docs/html/faq/index.html: Update list in #4.1. + * docs/html/faq/index.txt: Regenerated. - * std/bastring.h (basic_string<>::push_back): Define. +2002-05-01 Phil Edwards -Tue Mar 7 21:37:56 2000 Jeffrey A Law (law@cygnus.com) + * include/std/std_bitset.h: Fix doxygen comments. + * docs/html/documentation.html: Minor tweaks for 3.1. + * docs/html/27_io/howto.html: Likewise. + * docs/html/ext/howto.html: Likewise, mention stdio_filebuf. + * docs/html/faq/index.html: Likewise. + * docs/html/faq/index.txt: Regenerated. - 1999-11-19 Gabriel Dos Reis - * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): Don't forget - to define tanh. +2002-05-01 Benjamin Kosnik - 1999-11-05 Gabriel Dos Reis - * std/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): When - building meta-expressions don't forget to take the contained - closures. + PR libstdc++/6533 + * include/bits/streambuf_iterator.h (istreambuf_iterator::_M_get): New. + (istreambuf_iterator::equal): Use it. + (istreambuf_iterator::operator*): Use it. - 1999-10-19 Gabriel Dos Reis - * std/valarray_meta.h: (_BinClos::_BinClos): Fix typo. - - 1999-09-17 Gabriel Dos Reis - * std/complext.cc (pow): Don't expect floating point promotion - in presence of template argument deduction. There is no such - thing. - -2000-02-06 Gabriel Dos Reis - * std/valarray_array.h (__valarray_copy): Fix typo. - -1999-12-14 Martin v. Löwis - * std/bastring.h (basic_string::basic_string): Rename parameters - to avoid shadow warnings. - * std/bastring.cc (alloc): Likewise. - -Sun Oct 24 23:54:10 PDT 1999 Jeff Law (law@cygnus.com) - - * gcc-2.95.2 Released. - -Mon Aug 16 01:29:24 PDT 1999 Jeff Law (law@cygnus.com) - - * gcc-2.95.1 Released. - -Thu Aug 5 02:00:13 1999 Loren Rittle - - * Makefile.in (MARLINK, MSHLINK): Handle library version - number components with more than one numeric digit. - -Mon Aug 2 00:40:10 1999 Jeffrey A Law (law@cygnus.com) - - 1999-07-16 Markus Gyger (mgyger@gmu.edu) - * stdexcepti.cc (__out_of_range): Use std:: qualifier for names - in std. - (__length_error): Likewise. - -Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com) - - * gcc-2.95 Released. - -Sun Jul 25 23:40:51 PDT 1999 Jeff Law (law@cygnus.com) - - * gcc-2.95 Released. - -Sat Jul 17 23:49:59 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (INTERFACE): Bump to 3. - -Fri Jul 9 01:20:23 1999 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (VERSION): Bump to 2.10.0. - -Tue Jun 8 00:21:11 1999 Jeffrey A Law (law@cygnus.com) - - * configure.in (*-*-freebsd2*): Add missing '*' at end of configure - string. - -1999-06-05 Gabriel Dos Reis - - * std/std_valarray.h: Don't #include unconditionally - -1999-06-05 Gabriel Dos Reis - - * std/std_valarray.h: New file. - * std/slice.h: New file. - * std/slice_array.h: New file. - * std/gslice.h: New file. - * std/gslice_array.h: New file. - * std/mask_array.h: New file. - * std/indirect_array.h: New file. - * std/valarray_array.h: New file. - * std/valarray_array.tcc: New file. - * std/valarray_meta.h: New file. - * valarray.cc: New file. - * valarray: New file - - * Makefile.in (OBJS): add valarray.o - (HEADERS): add valarray - (valarray.o): define dependency on valarray.cc - (install): make it possible to install valarray file. +2002-05-01 Paolo Carlini -Wed Jun 2 00:21:54 1999 Robert Lipe - - * std/bastring.h (class basic_string:Rep): Encode xlock opcode - as .bytes instead of mnemonics. - -1999-05-20 Angela Marie Thomas - - * configure.in: Test for ${compiler_name}.exe as well. - -1999-05-15 Mark Kettenis - - * configure.in: Add shared library support for the Hurd - (*-*-gnu*). - * config/gnu.ml: New file. - -1999-05-12 Jason Merrill - - * configure.in (compiler_name): Don't do the skip-this-dir thing - if we're reconfiguring. - -1999-05-07 Ulrich Drepper - - * std/bastring.h (class basic_string::Rep): Make release member - function thread-safe for ix86 (x>=4) and UltraSPARC. - - * stlinst.cc: Make it possible to compile with __USE_MALLOC. - -Mon Apr 26 02:24:47 1999 "Loren J. Rittle" - - * config/freebsd.ml (LIBS): Add ARLINK. - * config/openbsd.ml (LIBS): Add ARLINK. - -Fri Apr 2 15:12:14 1999 H.J. Lu (hjl@gnu.org) - - * libstdc++/configure.in (gxx_include_dir): Handle it. - * libstdc++/Makefile.in: Likewise. - -Wed Mar 24 22:36:45 1999 Mumit Khan - - * configure.in (EXEEXT): Define. - (compiler_name): Use. - -Thu Mar 11 01:07:55 1999 Franz Sirl - - * configure.in: Add mh-*pic handling for alpha, arm, powerpc - -Fri Mar 5 02:16:39 1999 Doug Rabson - - * configure.in: Support shared libs on FreeBSD 3.x and 4.x - * config/freebsd.ml: A copy of config/linux.ml since they are both - ELF and both have a shared libm. - -1999-02-24 Jason Merrill - - * configure.in: Fix INSTALLDIR sed pattern for Solaris sed. - -Sat Feb 20 13:17:17 1999 Jeffrey A Law (law@cygnus.com) - - * string, std/straits.h, std/bastring.h: Revert recent change. Needs - some libiberty support before it can be re-enabled. - -Thu Feb 18 19:53:17 1999 Marc Espie - - * configure.in: Handle OpenBSD with and without threads. - * config/openbsd.ml: New file. - * config/openbsd.mt: New file. - -1999-02-04 Ulrich Drepper - - * configure.in: Recognize --enable-threads=posix for all - platforms. - * config/posix.mt: New file. - - * configure.in: Add fragments for Solaris defining macro specifying - thread library to be used. - * config/sol2pth.mt: New file - * config/sol2solth.mt: New file. - * stl/stl_alloc.h: Add support for Solaris thread library. - * stl/stl_config.h: Recognize _SOLTHREADS and define internal macros - appropriately. - -1999-01-28 Baron Roberts - - * string: Uncomment wstring declaration. - - * std/straits.h: Remove #if 0/#endif from around - struct string_char_traits . - #include . - Add missing definition for wchar_t move method. - Add empty() method for trait-based empty string return. - - * std/bastring.h (c_str): Change return of "" to return of - traits::empty() call so that proper empty string is returned - based on the character type (i.e. "" or L""). - -1999-02-07 Jason Merrill - - * Makefile.in (stuff2): Tweak. - -1999-02-04 Ulrich Drepper - - * configure.in: Recognize --enable-threads=posix for all - platforms. - * config/posix.mt: New file. - - * configure.in: Add fragments for Solaris defining macro specifying - thread library to be used. - * config/sol2pth.mt: New file - * config/sol2solth.mt: New file. - * stl/stl_alloc.h: Add support for Solaris thread library. - * stl/stl_config.h: Recognize _SOLTHREADS and define internal macros - appropriately. - -Sat Jan 30 08:05:46 1999 Mumit Khan - - * config/x86-interix.ml: New file. - * configure.in (i[3456]86-*-interix*): Add shared library support. - -1999-01-13 Ulrich Drepper - - * configure.in: Test for "ln -s" and set LN_S in generated Makefile. - * Makefile.in: Use $(LN_S) instead of explicitly ln -s. - -Sun Jan 03 03:16:02 1999 Robert Lipe - - * configure.in: (*-*-sysv5, *-*-*udk*): Treat like sysv4. - -Tue Dec 8 00:59:09 1998 Marc Espie - - * Makefile.in: Be more selective about what files to install. - -1998-11-30 Ulrich Drepper - - * std/bastring.cc (operator>>): Correct cast in last patch. - (getline): Likewise. - -1998-11-27 Alexandre Oliva - - * Makefile.in (HEADERS): Install bitset. - -1998-11-26 Manfred Hollstein - - * configure.in (compiler_name): Add check to detect if this - language's compiler has been built. - -1998-11-23 Ulrich Drepper - - * std/bastring.cc (operator>>): Cast new character to char before - adding to string. - (getline): Likewise. - -Thu Sep 17 01:29:46 1998 H.J. Lu (hjl@gnu.org) - - * Makefile.in ($(ARLINK), $(SHLINK)): Don't rely on 'ln -f'. - - * Makefile.in (install): Don't rely on 'ln -f'. - -1998-09-09 Manfred Hollstein - - * Makefile.in (install): Initialize RELINSTALLDIR correctly - even for multilib and cross configurations. - - * configure.in (INSTALLDIR): Don't change INSTALLDIR's init - value if --enable-version-specific-runtime-libs has been specified. - -Wed Sep 2 21:11:15 1998 H.J. Lu (hjl@gnu.org) - - * Makefile.in (RELINSTALLDIR): New. Use it to make symlinks. - - * configure.in: Fix INSTALLDIR replacement for cross-compile. - -Sun Aug 30 22:17:41 1998 H.J. Lu (hjl@gnu.org) - - * Makefile.in (INTERFACE): New, set to 2. - (ARLIB): Set to libstdc++.a.$(VERSION) - (ARLINK, MARLINK): New macros. - (LIBS): Add $(ARLINK). - ($(ARLINK), marlink): New targets. - (install): Don't check $(libsubdir). Handle versioned libraries. - - * config/linux.ml (ARLIB, MARLINK, SHLIB, MSHLINK): New macros. - (LIBS): Add marlink $(ARLINK). - - * config/aix.ml (ARLIB): Set to libstdc++-ar.a.$(VERSION) - (ARLINK): New macros. - (BUILD_LIBS): Add $(ARLINK). - - * config/dec-osf.ml (LIBS): Add $(ARLINK). - * config/elf.ml (LIBS): Likewise. - * config/elfshlibm.ml (LIBS): Likewise. - * config/hpux.ml (LIBS): Likewise. - * config/iris5.ml (LIBS): Likewise. - * config/sol2shm.ml (LIBS): Likewise. - * config/sunos4.ml (LIBS): Likewise. - - * configure.in: Use ${topsrcdir}/config.if to put - LIBSTDCXX_INTERFACE, CXX_INTERFACE, LIBC_INTERFACE in - ${package_makefile_frag}. - -1998-08-25 Martin von Löwis - - * stdexcept: Remove __HONOR_STD. - -1998-08-23 Mark Mitchell - - * sinst.cc: Don't explicitly instantiation string_char_traits. - * cinst.cc: Likewiwse, for complex, complex, - complex. - -1998-08-17 Mark Mitchell - - * stdexcept: Put things in the std namespace, if appropriate. - -1998-07-12 Jason Merrill - - * Makefile.in (VERSION): Bump to 2.9.0. - -1998-07-12 Lars Albertsson - - * std/bastring.cc (find_last_of): Fix. - (find_last_not_of): Likewise. - -1998-07-06 Manfred Hollstein - - * configure.in (INSTALLDIR): Make sed pattern failsafe. - -1998-07-06 Ulrich Drepper - - * std/bastring.h (class basic_string): Correct iterator return - values in insert member functions. - -1998-07-02 Ulrich Drepper - - * std/bastring.h (class basic_string): Return correct iterators in - erase member functions. - -1998-06-24 Manfred Hollstein - - * Makefile.in (INSTALLDIR): Add comment to document the fact, - this macro will be properly initialized at make's runtime. - (install): Add initialization of INSTALLDIR depending on $(libsubdir) - and ${enable_version_specific_runtime_libs}; use $${INSTALLDIR} shell - variable instead of the $(INSTALLDIR) make macro. - -Tue Mar 24 10:13:07 1998 Jason Merrill - - * std/bastring.cc (basic_string::copy): Mark const here, too. - -1998-03-23 15:59 Ulrich Drepper - - * std/bastring.h (basic_string::copy): Mark copy function as const. - Reported by Scott Schurr . - -Thu Mar 5 09:23:28 1998 Manfred Hollstein - - * configure.in: Make locating frag files failsafe even for the - special case if configuring and building in srcdir. - -1998-03-04 12:37 Ulrich Drepper - - * cinst.cc [INSERT] (operator<<): Correct type of numeric argument. - -Fri Feb 6 01:36:21 1998 Manfred Hollstein - - * Makefile.in (piclist): Check value of enable_shared, not PICFLAG. - (stmp-string, ...): Dito. - (bigstmp-string, ...): Dito. - -Sun Feb 1 13:38:07 1998 H.J. Lu (hjl@gnu.org) - - * config/linux.mt: Don't define _PTHREADS, but define - _IO_MTSAFE_IO. - -Wed Jan 28 10:27:11 1998 Manfred Hollstein - - * tests/configure.in, testsuite/configure.in: Update with yesterday's - toplevel configure.in changes. - -Tue Jan 27 23:27:32 1998 Manfred Hollstein - - * configure.in (package_makefile_rules_frag): New variable - which is used in the call to config.shared; redirect file descriptor 2 - to ${package_makefile_rules_frag}. - -Tue Jan 27 10:11:27 1998 Jason Merrill - - * Makefile.in (install): Remove the shared library symlink even if - we aren't installing it. - -Tue Jan 27 10:29:44 1998 H.J. Lu (hjl@gnu.org) - - * configure.in (topsrcdir): New. - (configdirs): Check ${topsrcdir}/gcc instead. - (config-ml.in): Use ${topsrcdir}/config-ml.in. - - * tests/configure.in (topsrcdir): New. - (check): Check ${topsrcdir}/gcc instead. - -Sun Jan 25 14:01:50 1998 Jason Merrill - - * std/bastring.h (unique): We only need length bytes. - (c_str): Avoid writing over random memory. - #include . - Lose _G_ALLOC_CONTROL. - * std/bastring.cc: Likewise. - (nilRep): Add initializer for selfish. - * sinst.cc: Just #include . - -Tue Jan 13 21:23:05 1998 H.J. Lu (hjl@gnu.org) - - * configure.in (configdirs): Include testsuite only if - ${srcdir}/../gcc exists. - - * tests/configure.in (check): Set to ${CHECK} if - ${srcdir}/../../gcc doesn't exists. - -1998-01-05 Brendan Kehoe - - * std/bastring.cc (basic_string::Rep::operator delete): Don't claim - to return from deallocate, since this is a void method. - -Sat Jan 3 12:15:41 1998 Franz Sirl - - * configure.in: Finalize support for {alpha|powerpc}*-*-linux-gnulibc1 - -Sun Dec 7 02:34:40 1997 Jody Goldberg - - * libstdc++/std/bastring.h : Move closer to the draft standard - implementation of basic_string by adding 3 paramter 'Allocator'. - NOTE: this still differs from the standard in not offering per - instance allocators. - * libstdc++/std/bastring.cc : Likewise. - * libstdc++/stlinst.cc : Handle thread safe allocators if they are the - default. - -Sun Dec 7 02:32:20 1997 Jason Merrill - - * iosfwd: New header. - * Makefile.in (HEADERS): Add it. - -Sun Dec 7 02:32:20 1997 Gregory L. Galloway (gregg@eoeml.gtri.gatech.edu) - - * Makefile.in (HEADERS): Modified list of headers to - install to include all of SGI STL headers especially hash_set and - hash_map, and added ANSI C++ style wrappers for fstream, iomanip, - iostream, and strstream. - - * fstream, iomanip, iostream, strstream: New forwarding headers - added. - -Thu Nov 27 01:33:55 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (install): Change gxx_includedir to gxx_include_dir. - -Tue Nov 25 23:16:44 1997 Jason Merrill - - London changes to string: - * std/bastring.cc (check_realloc): Don't be selfish anymore. - * std/bastring.h (non-const operator[]): Be selfish. - (iterator forms of insert and erase): Stay selfish. - -Tue Nov 25 14:03:43 1997 H.J. Lu (hjl@gnu.org) - - * Makefile.in (stmp-complex, bigstmp-complex): Changed to - xxxx-complx. - -Mon Nov 24 14:41:33 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in: Use ln -f -s, not ln -s -f. - -Fri Nov 21 12:56:24 1997 Manfred Hollstein - - * Makefile.in (bigstmp-complex): Name changed to bigstmp-complx to - cope with filesystem not capable to handle names longer than - 14 characters. - -Sun Nov 16 22:41:55 1997 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (SHLIB): Build with CC instead of CXX. - -Sun Nov 2 23:34:09 1997 Manfred Hollstein - - * configure.in: Use delta.mt for m68k-motorola-sysv. - * config/delta.mt: New makefile fragment. - -Sun Nov 2 12:14:37 1997 Jason Merrill - - * Makefile.in (install): Some of HEADERS come from the stl dir now. - * algorithm, deque, functional, iterator, list, map, memory, numeric, - queue, set, stack, utility, vector: Now in stl dir. - -Fri Oct 10 00:40:00 1997 Jason Merrill - - * std/bastring.h: Use ibegin internally. Return passed iterator - instead of recalculating it where appropriate. - * std/bastring.cc: Adjust for erase. - - From Yotam Medini: - * std/bastring.h: Replace remove with erase. - -Thu Oct 9 23:24:36 1997 Jason Merrill - - * stdexcepti.cc (__out_of_range): New fn. - (__length_error): New fn. - - * std/bastring.h (OUTOFRANGE): Fix logic. Use throwing functions. - (LENGTHERROR): Likewise. - Revert Oct 2 changes. - * string: Revert Oct 2 changes. - -Tue Oct 7 00:51:51 1997 Jason Merrill - - * std/{f,d,ld}complex.h: Replace guiding fns if not -ansi. - -Thu Oct 2 00:08:18 1997 Jason Merrill - - * std/bastring.h: Move exception stuff after definition of string. - Move typedef of string here. - * string: From here. - -Sat Sep 27 16:48:00 1997 Jason Merrill - - * std/complext.h: Lose injection decls. - * std/fcomplex.h: Likewise. - * std/dcomplex.h: Likewise. - * std/ldcomplex.h: Likewise. - -Sat Sep 27 16:47:35 1997 Mark Mitchell - - * std/complext.h: Declare templates before making them - friends. Use new friend <> syntax. - * std/complext.cc: Don't rely on guiding declarations. - * std/fcomplex.h: Use new friend <> syntax. - * std/dcomplex.h: Likewise. - * std/ldcomplex.h: Likewise. - -Thu Sep 25 19:55:56 1997 Jason Merrill - - * std/bastring.h: Enable exceptions. - (assign, append, insert, replace): Implement member template versions. - -1997-09-15 02:37 Ulrich Drepper - - * config/linux.mt: New file. Make sure _PTHREADS is defined - if necessary. - * configure.in: Find linux.mt file. - -Thu Sep 11 15:03:20 1997 Jason Merrill - - * std/bastring.h (class basic_string): Add global scope to - use of reverse_iterator. - -Tue Sep 9 19:47:07 1997 Jason Merrill - - * std/bastring.h: Adjust use of reverse_iterator template. - -Wed Aug 27 00:04:33 1997 Alexandre Oliva (oliva@dcc.unicamp.br) - - * Makefile.in: Create correct multiple links to - shared libstdc++. - -Tue Aug 26 12:24:01 1997 H.J. Lu (hjl@gnu.ai.mit.edu) - - * testsuite/Makefile.in (check): Don't depend on site.exp. - (just-check): Depend on site.exp. - -Mon Aug 25 14:26:45 1997 Jason Merrill - - * Makefile.in (CXXFLAGS): Add -Weffc++. - -Sat Aug 23 21:25:37 1997 Mark Mitchell - - * bastring.h: Enable reverse_iterator and its ilk. - - * bastring.h: Provide specializations of member function templates - for const_iterator. - -Wed Jul 30 10:59:00 1997 Benjamin Kosnik - - * stlinst.cc: Add instantiation file for - __default_alloc_template and - __malloc_alloc_template<0> - -Sun Jun 1 17:03:40 1997 Jason Merrill - - * std/bastring.cc (find_last_of): Correct handling of POS. - (find_last_not_of): Likewise. - -Thu May 1 17:37:10 1997 Jason Merrill - - * Makefile.in ($(SHLIB)): Add $(LIBCXXFLAGS). - -Wed Apr 30 12:06:23 1997 Jason Merrill - - * Makefile.in (IO_DIR): Remove $(MULTIBUILDTOP). - (LIBIBERTY_DIR): Likewise. - * configure.in: Don't turn on multilib here. - -Fri Apr 25 16:09:15 1997 Bob Manson - - * testsuite/libstdc++.tests/test.exp, testsuite/lib/libstdc++.exp, - testsuite/configure.in, testsuite/Makefile.in, - testsuite/config/default.exp, testsuite/ChangeLog: New files. - - * configure.in: Add new testsuite directory to be configured. - -Tue Apr 22 19:03:39 1997 Alexandre Oliva - - * Makefile.in (install): Fix handling of mshlink. - -Fri Apr 4 03:25:13 1997 Ulrich Drepper - - * Makefile.in (IO_DIR): Prepend $(MULTIBUILDTOP) to - support multilib build. - (LIBIBERTY_DIR): Likewise. - - * configure.in: Enable multilibing by default. - Update multilib template to read config-ml.in. - -Wed Mar 12 16:09:34 1997 Jason Merrill - - * configure.in (XCXXINCLUDES): Add the STL directory. - -Thu Jan 23 08:08:43 1997 Brendan Kehoe - - * stdexcept: Delete dtors for all of the error classes, to match - their removal in the Apr 1995 WP. - (class overflow_error): Define missing class, added in May 1996 WP. - -Mon Nov 18 16:57:25 1996 Jason Merrill - - * Makefile.in (stuff[12]): More rules for my own evil purposes. - (CXXFLAGS, CFLAGS): Use -O instead of -O3 so debugging works. - -Wed Oct 16 13:47:45 1996 Jason Merrill - - * config/irix5.ml: Do link against the math library. - * configure.in: Support shared libs on Irix 6. - -Fri Oct 11 18:06:09 1996 Jason Merrill - - * config/linux.ml: Lose version overrides. - - * Makefile.in (MSHLINK): Defaults to .so.2.x - (mshlink): Indirect rule for making it. - -Tue Sep 24 17:58:31 1996 Jason Merrill - - * Remove new, typeinfo, exception, stddef*. - * Move public headers from std/*.h to *. - -Sun Sep 22 05:35:55 1996 Jason Merrill - - * Makefile.in: Remove new, exception, typeinfo handling. - * exceptioni.cc, newi.cc, typeinfoi.cc, std/exception.h, std/new.h, - std/typeinfo.h, new.h: Remove. - * typeinfo, new, exception: Refer to the files with .h in gcc. - -Fri Sep 20 14:39:19 1996 Jason Merrill - - * Makefile.in: Remove references to stl.list. - * configure.in (configdirs): Remove stl. - -Sat Sep 14 09:42:08 1996 Jason Merrill - - * Makefile.in (stuff): Convenience for me. - - * std/bastring.h: Remove kludge obsoleted by new overloading code. - -Fri Sep 6 16:43:21 1996 Jason Merrill - - * typeinfoi.cc (__dynamic_cast): Fix static_cast. - (__rtti_si): Likewise. - (dcast): Likewise. - -Thu Aug 29 17:06:23 1996 Michael Meissner - - * configure.in (i[345]86-*-*): Recognize i686 for pentium pro. - -Tue Jul 23 14:27:44 1996 Mike Stump - - * Makefile.in (exceptioni.o): Use -fexceptions now. - -Mon Jun 17 13:57:24 1996 Per Bothner - - * std/bastring.h (class basic_string::remove): Add casts. - - * configure.in: Use EXTRA_DISTCLEAN rather than DISTCLEAN. - -Fri Jun 7 14:09:20 1996 Jason Merrill - - * typeinfoi.cc (BUILTIN): Align typeinfo object like a pointer. - -Wed May 29 16:48:35 1996 Mike Stump - - * exceptioni.cc (__throw_bad_exception): Add. - * std/exception.h (bad_exception): Add. - * std/typeinfo.h: Remove leftovers of bad_cast_object. - -Mon May 6 14:04:42 1996 Jason Merrill - - * std/complext.h: s/FLOAT/_FLT/g. - -Thu May 2 17:26:24 1996 Mike Stump - - * exceptioni.cc (uncaught_exception): New routine. - * std/exception.h: Declare it. - -Thu Apr 25 13:20:57 1996 Jason Merrill - - * Makefile.in (typeinfoi.o, stdexcepti.o): Use default rule. - -Wed Apr 24 18:38:24 1996 Mike Stump - - * exceptioni.cc: Add #pragma implementation. - * std/exception.h: Add #pragma interface. Moved exception from - stdexcept. - * std/stdexcept.h: Moved exception to exception. Fix all constructor - arguments to take strings to match ANSI. Moved bad_cast and bad_typeid - to typeinfo. - * std/typeinfo.h: Moved bad_cast and bad_typeid from stdexcept. - -Wed Apr 24 10:43:07 1996 Doug Evans - - * Makefile.in (newi.o,cstringi.o,stddefi.o,cstdlibi.o,cmathi.o): Add - rules for SunOS VPATH. - -Fri Apr 19 17:24:51 1996 Jason Merrill - - * Version 2.8.0b3. - -Wed Apr 10 14:38:05 1996 Jason Merrill - - * typeinfoi.cc (base_info): Pack the latter three fields into 32 bits. - -Tue Apr 9 15:49:38 1996 Jason Merrill - - * typeinfoi.cc: Add 'const'. - (__class_type_info): Now just one pointer to an array of structs, - rather than four pointers to arrays. - - * typeinfoi.cc (__throw_type_match_rtti): Check for conversion to - void* before conversion to base*. - (dcast): Handle downcasting to X* given other X subobjects in - the most derived type. Ack. - -Mon Apr 8 15:20:32 1996 Ian Lance Taylor - - * configure.in: Permit --enable-shared to specify a list of - directories. - -Sun Apr 7 22:50:53 1996 Jason Merrill - - * typeinfoi.cc (__rtti_array): New entry point. - -Sat Apr 6 14:41:18 1996 Jason Merrill - - * exceptioni.cc (__throw_bad_cast): New entry point for compiler. - * typeinfoi.cc: Remove __bad_cast_object. - - * typeinfoi.cc: Add nodes for unsigned builtins. - -Fri Apr 5 18:16:22 1996 Jason Merrill - - * typeinfoi.cc, std/typeinfo.h: Total overhaul. Move most - everything out of the header, move name field into type_info, add - single-inheritance case, rewrite pointer handling, add new - compiler interface. Compare addresses to check for equality. - -Wed Mar 27 11:54:08 1996 Jason Merrill - - * Version 2.8.0b2. - -Fri Mar 8 13:56:18 1996 Jason Merrill - - * std/[cs]inst.h: Remove. - -Thu Mar 7 07:29:00 1996 Lee Iverson - - * Makefile.in (install): Restore deleted chdir to stl subdir. - -Thu Mar 7 15:02:58 1996 Jason Merrill - - * std/complext.h: Fix __attribute__ usage. - -Wed Feb 28 10:00:24 1996 Jason Merrill - - * Version 2.8.0b1. - -Mon Feb 26 17:26:26 1996 Jason Merrill - - * std/cstring.h: New approach to changing signatures of string - manipulation functions. Still disabled. - -Tue Feb 20 18:29:30 1996 Jason Merrill - - * std/complext.h (__doapl, __doami, __doaml, __doadv): Helper - templates to implement +=, -=, *= and /=, respectively, since - member function templates do not apply to class specializations. - * std/{f,d,ld}complex.h, std/complext.cc, cinst.cc: Adjust. - - * std/bastring.h: The representation class is now a nested class. - * std/bastring.cc: Add templates for static data members. - * sinst.cc: Don't provide specializations for static data members. - * std/string.h: Use default template parameters. - - * Makefile.in (CXXFLAGS): Remove -pedantic -ansi. - (CFLAGS): Ditto. - -Wed Feb 14 14:39:07 1996 Jason Merrill - - * std/bastring.cc (check_realloc): Fix for sizeof (charT) > 1. - From John Hickin . - -Wed Jan 10 11:05:04 1996 Jason Merrill - - * std/bastring.h (insert): Fix iterator handling. - From Joe Buck . - -Mon Jan 8 11:48:03 1996 Jason Merrill - - * std/bastring.h (max_size): Fix for sizeof (charT) > 1. - * std/bastring.cc (replace): Use it. - - * std/bastring.cc (rfind): Fix for n > length (). - -Tue Dec 19 15:13:08 1995 Jason Merrill - - * config/aix.ml (SHFLAGS): Add -Wl,-unix. - -Mon Dec 18 12:48:25 1995 Mike Stump - - * Makefile.in (exceptioni.o): Compile with -fhandle-exceptions, so - we can unwind through unexpected on machines that don't have a - working __unwind_function. - -Sun Dec 17 00:28:31 1995 Jeffrey A Law (law@cygnus.com) - - * Makefile.in (install): Make sure shared libraries - are installed with mode 555. - -Mon Nov 27 15:01:56 1995 Jason Merrill - - * Makefile.in (install): Make shared library links relative. - (install): Break up -sf into -s -f. - ({M,}SHLINK): Ditto. - -Sun Nov 26 22:48:06 1995 Jason Merrill - - * queue: Include instead of . - -Sat Nov 25 11:33:13 1995 Doug Evans - - * Makefile.in (install): Fix setting of rootme. - -Tue Nov 21 14:20:34 1995 Ian Lance Taylor - - * configure.in: Check ${with_cross_host} rather than comparing - ${host} and ${target}. - -Tue Nov 14 01:50:52 1995 Doug Evans - - * Makefile.in (IO_DIR): Delete MULTITOP, MULTISUBDIR. - (LIBIBERTY_DIR): Likewise. - (INSTALLDIR): Delete MULTISUBDIR. - * configure.in: Delete call to cfg-ml-com.in. Call config-ml.in - instead of cfg-ml-pos.in. - (XCXXINCLUDES): Delete MULTITOP. - * stl/configure.in (XCXXINCLUDES): Delete MULTITOP. - (config-ml.in): Call instead of cfg-ml-pos.in. - -Sun Nov 12 16:44:25 1995 Per Bothner - - * Makefile.in (VERSION): Set to 2.7.1. - -Thu Nov 9 17:39:28 1995 Jason Merrill - - * config/{aix,dec-osf,irix5,linux,sol2shm}.ml: Remove LDLIBS defn; - no longer needed now that make check sets LD_LIBRARY_PATH. - -Wed Nov 8 19:46:35 1995 Brendan Kehoe - - * std/bastring.h: Wrap with #ifndef/#define/#endif. - * std/cassert.h: Likewise. - * std/cinst.h: Likewise. - * std/complext.h: Likewise. - * std/dcomplex.h: Likewise. - * std/fcomplex.h: Likewise. - * std/ldcomplex.h: Likewise. - * std/sinst.h: Likewise. - -Wed Nov 8 16:15:48 1995 Jason Merrill - - * std/bastring.cc (getline): Update to September 95 WP. Now we - don't set failbit when reading an empty line. - -Tue Nov 7 16:09:04 1995 Jason Merrill - - * std/bastring.cc (new): Fix for sizeof (charT) != 1. - -Sat Nov 4 17:37:16 1995 Jason Merrill - - * std/complext.cc (operator / (FLOAT, const complex&)): - Reimplement along the lines of the other operator / templates. - From John Eaton . - -Sat Nov 4 13:33:50 1995 Per Bothner - - * configure.in (DISTCLEAN): New, to add target-mkfrag. - -Tue Oct 31 13:59:32 1995 Jason Merrill - - * std/bastring.h: Use size_t for the reference count. - * std/bastring.cc (create): Set selfish. - From Joe Buck (jbuck@synopsys.com). - -Mon Oct 30 23:09:48 1995 Per Bothner - - * configure.in: Don't bother changing LIBIBERTY for cross, - now that we are using target-libiberty instead. - * Makefile.in (LIBIBERTY_DIR): Simplify. - (LIBIBERTY): Remove. - -Wed Oct 11 14:56:49 1995 Brendan Kehoe - - * config/sol2shm.ml: New files with -rpath. - * configure (*-*-solaris*): Use sol2shm.ml. - -Thu Sep 28 09:26:52 1995 Jason Merrill - - * std/straits.h (compare, copy, move, set): Fix for non-char charT's. - * std/bastring.h (basic_string::remove): Fix for non-char charT's. - -Tue Sep 26 15:22:56 1995 Jason Merrill - - * config/irix5.ml: Pass -rpath to links. - -Fri Sep 15 00:17:47 1995 Jason Merrill - - * config/linux.ml: Conform to Linux shared library numbering - scheme. - * Makefile.in: Ditto. - -Tue Sep 12 00:28:56 1995 Mike Stump - - * typeinfoi.cc: (__pointer_type_info::__rtti_match): Moved from - the headerfile, include all sorts of pointer conversions from 15.3 - para 2. - * std/typeinfo.h (__pointer_type_info::__rtti_match): Moved from here. - -Mon Sep 11 23:27:59 1995 Mike Stump - - * std/typeinfo.h (__pointer_type_info::__rtti_match): We no longer - have to dereference the object pointer, as the pointer is always - passed directly. - -Mon Sep 11 19:29:51 1995 Mike Stump - - * std/typeinfo.h (__pointer_type_info::__rtti_match): Define so - that pointer conversions can happen on catch type matching. - * typeinfoi.cc (__throw_type_match_rtti): Arrange for __rtti_match - to be used on pointers. - -Tue Sep 5 14:49:19 1995 Jason Merrill - - * string.h: Remove for now. - -Thu Aug 31 14:14:01 1995 Jason Merrill - - * std/bastring.cc (operator>>): Simplify and fix. - (resize): Fix order of arguments to append. - (getline): Simplify and fix. - -Thu Aug 24 17:44:09 1995 Jason Merrill - - * std/cstdlib.h (abs): Provide default implementation for peons - without labs. - -Tue Aug 22 08:43:07 1995 Jason Merrill - - * std/cstdlib.h: Comment out definition of div(long,long) for now, - since not all targets have ldiv. - -Mon Aug 21 11:46:03 1995 Jason Merrill - - * std/cmath.h: Wrap abs(double) with #if ! _G_MATH_H_INLINES. - - * stl.h: Add, for compatibility with ObjectSpace STL. - - * std/complext.cc (operator /): Use abs instead of fabs. - - * std/bastring.h (replace): Update single-character replace method - as per my proposal. - - * std/cmath.h: Add abs(float), abs(double) and abs(long double). - Add commented-out declarations for other float and long double - math functions. - - * std/cstdlib.h: Add abs(long) and div(long,long). - - * Makefile.in (install): Make shared library executable and - non-writable. Tidy. - (OBJS): Add cstdlibi.o and cmathi.o. - - * Rename implementation files to have different basenames. - -Mon Aug 21 00:57:03 1995 Jeffrey A. Law - - * Makefile.in (install): Use "cd stl"; no need for $(srcdir) - prefix because we're already in $(srcdir). - -Tue Jul 25 18:41:29 1995 Per Bothner - - * std/stddef.h: Remove obsolete definition of enum capacity. - -Sat Jul 22 13:37:01 1995 Doug Evans - - * Makefile.in (IO_DIR): Add multilib support. - (LIBIBERTY, LIBIBERTY_OBJS, INSTALLDIR, stdlist): Likewise. - (libiberty.a, install): Likewise. - * configure.in: Likewise. - (XCXXINCLUDES): Likewise. - * stl/configure.in: Likewise. - (XCXXINCLUDES): Likewise. - -Mon Jul 17 09:29:31 1995 Brendan Kehoe - - * Makefile.in (typeinfo.o, stdexcept.o): Put an else for the if - stmt checking PICFLAG. - (stmp-string, bigstmp-string, stmp-complex, bigstmp-complex): Likewise. - -Wed Jun 28 17:05:29 1995 Jason Merrill - - * std/*.h: Wrap with extern "C++". - - * std/ciso646.h: Don't worry about #undefing the keywords. - -Mon Jun 26 19:05:38 1995 Jason Merrill - - * std/bastring.h (operator!=): If they've included the STL - function.h, don't overload the operator templates that it defines. - -Fri Jun 23 16:54:17 1995 Jason Merrill - - * Makefile.in (SHLINK): Force link. - (install): Ditto. - - * std/bastring.h (terminate): Never reallocate. - (alloc): No longer const. - - * std/bastring.cc (create): Always allocate an extra byte. - (check_realloc): Always leave room for an extra byte. - (*find*): Add missing 'const'. - - * Makefile.in (SHARLIB): Provide a default value. - -Tue Jun 20 16:29:52 1995 Jason Merrill - - * std/cstring.h: Don't bother tweaking prototypes for now. When - we do, we will use new-style casts. - -Fri Jun 16 13:57:53 1995 Jason Merrill - - * Makefile.in (VERSION): Update to 2.7.0. - - * config/aix.ml: Build both shared and archive libraries. - -Wed Jun 14 21:44:21 1995 Jason Merrill - - * configure.in (frags): Use linux.ml for Linux/ELF. - * config/linux.ml: New file. + PR libstdc++/6513 + * include/bits/stl_uninitialized.h + (uninitialized_copy(_InputIter, _InputIter, _ForwardIter)): + Fix typo in 2001-07-17 commit: typedef _ValueType to + iterator_traits<_ForwardIter> not <_InputIter>. + * testsuite/23_containers/vector_ctor.cc: Add test04. + +2002-04-30 John David Anglin + + PR libstdc++/6501 + * include/c_std/std_cctype.h: Include bits/c++config.h. + * config/os/hpux/bits/os_defines.h (_SB_CTYPE_MACROS): Define. + +2002-04-30 Benjamin Kosnik + + * include/ext/stdio_filebuf.h: New file. + * include/ext/enc_filebuf.h: New file. + * config/io/basic_file_stdio.h (__basic_file::sys_open): Add fd ctor. + * config/io/basic_file_stdio.cc: Same. + * include/bits/fstream.tcc (filebuf::_M_allocate_internal_buffer): + Remove _M_unbuf hacks. + (filebuf::_M_destroy_internal_buffer): Same. + (filebuf::filebuf(cfile, openmode, int_type): Remove definition. + (filebuf::fd): Remove. + * include/std/std_fstream.h (filebuf::_M_unbuf): Remove. + (filebuf::filebuf(__c_file*, openmode, int_type)): Remove. + (filebuf::fd): Remove. + * src/ios.cc (ios_base::_S_ios_create): Change to use specialized + filebufs. + (ios_base::_S_ios_destroy): Same. + * src/misc-inst.cc (file_filebuf): Add instantiation. + * include/Makefile.am (ext_headers): Add ext_filebuf.h, + stdio_filebuf.h. * include/Makefile.in: Regenerate. + +2002-04-30 Benjamin Kosnik -Wed Jun 14 17:56:23 1995 Niclas Andersson + PR libstdc++/6511 + * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Fix typo. + +2002-04-29 Benjamin Kosnik + + PR libstdc++/5820 + * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common): + Check for eof. + * include/bits/streambuf_iterator.h: Match stream_iterator.h. + (istreambuf_iterator::operator++): Invalidate on eof. + (istreambuf_iterator::operator++(int)): Same. + (istreambuf_iterator::operator*): Same. + +2002-04-29 Benjamin Kosnik + + PR libstdc++/5820 + * config/io/basic_file_stdio.h (__basic_file::sys_getc): Return int. + (__basic_file::sys_ungetc): Take int. + * config/io/basic_file_stdio.cc (__basic_file::sys_ungetc): Same. + * include/bits/fstream.tcc (basic_filebuf::_M_underflow_common): + Use sys_getc for unbuffered input. + * testsuite/27_io/narrow_stream_objects.cc (test06): New. + + * src/ios.cc (_M_grow_words): Adjust error checking. + * testsuite/27_io/ios_base_storage.cc: Same. + +2002-04-29 Rainer Orth + + * testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set all + of LD_LIBRARY_PATH, SHLIB_PATH, LD_LIBRARYN32_PATH, + LD_LIBRARY64_PATH. + +2002-04-28 Peter Schmid + + * include/ext/stl_hashtable.h: Import __iterator_category + +2002-04-28 Paolo Carlini + Peter Schmid + + * testsuite/ext/hash_set.cc: New testfile. + +2002-04-26 Paolo Carlini + + * include/bits/basic_string.h (replace(__pos, __n1, __s, __n2): + Fix and tighten __throw_length_error check. + * testsuite/21_strings/replace.cc (test04): New. + * testsuite/21_strings/replace.cc (test02, test03): Tweak. + +2002-04-23 Loren J. Rittle + + * include/std/std_fstream.h (basic_filebuf::sync): Hoist + unconditional flush on lower-layer handle to here... + * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow): + ...from here. Optimize remaining _M_file.sync() call pattern. + * testsuite/27_io/narrow_stream_objects.cc (test04): New test. + (test05): Likewise. + +2002-04-23 Jason Merrill + + * include/bits/fstream.tcc (basic_filebuf::seekoff): Fix for + output-only filebufs. + * include/std/std_fstream.h (basic_filebuf::_M_set_indeterminate): + Likewise. + (basic_filebuf::_M_set_determinate): Likewise. + + PR libstdc++/6414 + * include/bits/fstream.tcc (basic_filebuf::seekoff): Adjust return + value properly in the trivial case. + * testsuite/27_io/istream_seeks.cc (test04): Make sure that + tellg() returns the right value after a read. + +2002-04-23 Hans-Peter Nilsson + + * config/cpu/mmix/bits/cpu_limits.h: New file. + * configure.target (CPULIMITSH): Use it. + +2002-04-20 Jason Merrill + + PR libstdc++/4150 + * include/std/std_streambuf.h (basic_streambuf::_M_set_indeterminate): + Move to filebuf. + (basic_streambuf::_M_set_determinate): Likewise. + (basic_streambuf::_M_is_indeterminate): Likewise. + * include/bits/std_fstream.h (basic_filebuf::_M_filepos): New + non-static data member. + (basic_filebuf::_M_underflow_common): New non-static member function. + (basic_filebuf::_M_underflow, _M_uflow): Call it. + (basic_filebuf::sync): Avoid useless seeking. + (basic_filebuf::_M_set_indeterminate): Move here from streambuf. + Set _M_filepos. + (basic_filebuf::_M_set_determinate): Likewise. + (basic_filebuf::_M_is_indeterminate): Likewise. + * include/bits/fstream.tcc (basic_filebuf::_M_really_overflow): Seek + back to _M_out_beg if necessary. + (basic_filebuf::seekoff): Likewise. + (basic_filebuf::_M_underflow_common): Generalization of old + underflow(). Don't seek back to _M_in_beg. + * src/ios.cc: Lose _GLIBCPP_AVOID_FSEEK stuff. + * config/os/solaris/solaris2.?/bits/os_defines.h: Likewise. + * config/os/bsd/freebsd/bits/os_defines.h: Likewise. + * config/os/mingw32/bits/os_defines.h: Likewise. + * testsuite/27_io/filebuf_virtuals.cc (test05): Don't overspecify + ungetc test. + +2002-04-22 Benjamin Kosnik + + * include/bits/istream.tcc (istream::read): Fix. + * testsuite/27_io/istream_unformatted.cc (main): Add. + +2002-04-20 Benjamin Kosnik + + PR libstdc++/6360 + * include/bits/istream.tcc (istream::ignore): Streamline, use + delimiter as is. + * include/bits/streambuf.tcc: Use this->gptr. + * testsuite/27_io/istream_unformatted.cc (test08): Add test. + +2002-04-19 Benjamin Kosnik + + * include/bits/localefwd.h (locale::id::_M_id): Do this correctly, + as type safety is important, especially on solaris. + * include/bits/istream.tcc (istream::read): Clean. + (istream::readsome): Same. + * locale.cc: Wrap lines. + + * testsuite/21_strings/inserters_extractors.cc: Tweaks. + * testsuite/27_io/instantiations.cc (test): Add bool variable... + * testsuite/21_strings/capacity.cc: Clean. + +2002-04-19 Benjamin Kosnik + + * testsuite/27_io/filebuf_virtuals.cc: Add _S_pback_size instantiation. + +2002-04-19 Benjamin Kosnik + + * config/linker-map.gnu (__malloc_alloc_template): Add. + (__default_alloc_template): Same. + * include/bits/stl_alloc.h (__malloc_alloc_template): Add extern + template. + (__default_alloc_template): Same. + +2002-04-19 Benjamin Kosnik + + * src/concept-inst.cc (vector): Remove instantiations. + * src/stl-inst.cc (vector::_M_insert_aux): Remove instantiation. + (__malloc_alloc_template): Conditionalize. + + * include/bits/istream.tcc: Remove sputbackc calls. + + * testsuite/19_diagnostics/stdexceptions.cc: Fix comment. + +2002-04-19 Benjamin Kosnik + + PR libstdc++/4164 + Valgrind fixes. + * config/io/basic_file_stdio.cc (__basic_file::~__basic_file): + Call close. + (__basic_file::close): Call fflush. Correct return if fclose ok. + (__basic_file::is_open): Make const. + Change __c_file_type to __c_file. + * config/io/basic_file_stdio.h: Change __c_file_type to __c_file. + (__basic_file::is_open): Make const. + * config/io/c_io_stdio.h: Change __c_file_type to __c_file. + * include/std/std_fstream.h (filebuf::_M_allocate_file): Remove. + (filebuf::_M_unbuf): Add. + (filebuf::_M_file): Change to non-pointer. + (filebuf::_M_allocate_pback_buffer): Remove. + * include/bits/fstream.tcc (filebuf::_M_allocate_file): Remove. + (filebuf::_M_allocate_internal_buffer): Use _M_unbuf. + Change initialization list for _M_file change. + (filebuf::_M_allocate_pback_buffer): Remove. + Change _M_file usage to reflect non-pointer data member. + + * config/locale/generic/c_locale.cc + (locale::facet::_S_create_c_locale): Add parameter. + * config/locale/generic/collate_members.cc: Change + _M_compare_helper to _M_compare. + Change _M_transform_helper to _M_transform. + * config/locale/generic/monetary_members.cc: Changeup data types. + Add dtors. + * config/locale/generic/numeric_members.cc: Add dtors. + * config/locale/generic/time_members.cc: Add dtors. + * config/locale/gnu/c_locale.cc: Add parameter. + * config/locale/gnu/collate_members.cc:Change + _M_compare_helper to _M_compare. + Change _M_transform_helper to _M_transform. + * config/locale/gnu/ctype_members.cc: Better error checking. + * config/os/gnu-linux/bits/ctype_noninline.h: Better error checking. + * config/locale/gnu/messages_members.cc: Tweak comment. + * config/locale/gnu/monetary_members.cc: Change data types. + Add dtors. + * config/locale/gnu/numeric_members.cc: Add dtors, better error + checking. + * config/locale/gnu/time_members.cc: Same. + * config/locale/ieee_1003.1-2001/c_locale.cc + (locale::facet::_S_create_c_locale): Add parameter. + * config/locale/ieee_1003.1-2001/c_locale.h: Correct typedef. + * config/locale/ieee_1003.1-2001/codecvt_specializations.h: Remove + bogus ctor. + + * include/bits/locale_facets.h (moneypunct): Use string literals. + Don't define dtor. + (numpunct): Same. + (__timepunct): Same. + (locale::_Impl::_M_facets): Change from vector to array. + (locale::_Impl::_M_names): Change from array of strings to array + of string literals. + (locale::facet::_S_create_c_locale): Add parameter. + (locale::locale::_S_num_facets): Move to... + (locale::_Impl::_M_facets_size): Here. + * include/bits/locale_facets.tcc: Fixups for _M_facets, _M_name + changes. + * include/bits/localefwd.h: (locale::id::_M_id): Add member function. + (locale::_Impl::_Impl(facet**, size_t, bool)): Add. + (locale::_Impl::_Impl(string, size_t)): Change to + (locale::_Impl::_Impl(const char*, size_t)): This. + + * include/bits/streambuf.tcc (streambuf::_S_pback_size): Define. + * include/std/std_streambuf.h (streambuf::_M_pback_size): Change to + (streambuf::_S_pback_size): This. + + * src/globals.cc: Add pre-allocations for "C" facets. + * src/locale-inst.cc: Remove vector instantiations. + * src/locale.cc: Remove vector include. Fixups for _M_names, + _M_facets changes. + * src/localename.cc: Same. + + * include/bits/stl_vector.h: Fix odd formatting. + + * include/bits/basic_string.tcc: Tweak comment. + + * libsupc++/new: Make sure parameters are uglified. + * libsupc++/typeinfo: Same. + + * testsuite/22_locale/num_get_members_char.cc: Fixup. + * testsuite/22_locale/num_get_members_wchar_t.cc: Same. + * testsuite/27_io/filebuf_members.cc: Same. + +2002-04-17 Phil Edwards - * configure.in: Use xiberty when building cross-compiler. + * docs/doxygen/doxygroups.cc: New group on binary searching. + * include/bits/stl_algo.h: Document binary searches and merges. + * include/bits/stl_deque.h: The 'map' member is not the 'map' class. -Wed Jun 14 12:57:47 1995 Jason Merrill +2002-04-17 Phil Edwards - * std/*complex*, std/cinst.h, cinst.cc: Pass by reference to const - rather than by value. - * std/*complex*: Add member functions real() and imag(). + * docs/doxygen/mainpage.html: Doxygen logo is now a PNG file. + * docs/doxygen/run_doxygen: Bump required version. + * docs/doxygen/user.cfg.in: Revert accidental change. + * docs/html/faq/index.html: Reindent a block of links. + (4.4): New note on using dlsym. + * docs/html/faq/index.txt: Regenerated. -Sat Jun 10 12:14:38 1995 Jason Merrill +2002-04-16 Paolo Carlini - * Makefile.in (bigstmp-string): Call main string object cstrmain.o - instead of cstring.o. + * testsuite/24_iterators/rel_ops.cc: New test. + +2002-04-16 Gabriel Dos Reis + + * include/bits/type_traits.h (__normal_iterator): Declare in + __gnu_cxx. Adjust use at global namespace. + * include/bits/stl_iterator.h (__normal_iterator): Move definition + into __gnu_cxx::. Add more operator overloads. Tidy existing ones. + * include/bits/basic_string.h (basic_string): Adjust use of + __normal_iterator. + * include/bits/stl_vector.h (_Alloc>): Likewise. + * src/concept-inst.cc (__gnu_cxx): __normal_iterator<> is now here. + * src/locale-inst.cc (__gnu_cxx): Likewise. + * src/string-inst.cc (operator==): Instantiate in __gnu_cxx. + +2002-04-15 Steve Ellcey + + * gcc/libstdc++-v3/config/os/hpux/bits/os_defines.h + (strtoll, strtoull): In 64 bit mode HP-UX (IA64 and HPPA) + does not define strtoll or strtoull, but does define strtol + and strtoul which are the same since in 64 bit mode + sizeof(long) == sizeof(long long). + +2002-04-12 Phil Edwards + + * include/std/std_bitset.h: Doxygenate std::bitset<>. Clean up + trailing spaces, indentation, and macro names. Make exception + messages more informative. + +2002-04-11 Richard Henderson + + * include/bits/fstream.tcc (basic_filebuf<>::open): Fix & ordering. + * include/bits/ostream.tcc (basic_ostream<>::operator<<(long)): Same. + (basic_ostream<>::operator<<(long long)): Same. + +2002-04-11 Richard Henderson + + * config/linker-map.gnu: Add __gxx_personality_sj0. + +2002-04-09 Benjamin Kosnik + + libstdc++/1072 + * include/bits/localefwd.h (locale::_Impl::_M_facets): Change from + pointer to vector. + Remove forward declaration of vector. + Include vector. + * include/bits/locale_facets.tcc: Remove vector include. + (use_locale): Adjust. + (has_locale): Adjust. + * src/locale.cc: Adjust. + * src/localename.cc: Same. + +2002-04-09 Benjamin Kosnik + Richard Henderson + + * include/bits/sstream.tcc: Clean up bit ops. + * include/bits/fstream.tcc: Same. + +2002-04-09 Jakub Jelinek + + * include/bits/locale_facets.h (__num_base::_S_scale_hex): Remove. + (__num_base::_S_scale_oct): Remove. + * src/locale.cc (__num_base::_S_scale_hex): Remove. + (__num_base::_S_scale_oct): Remove. + +2002-04-09 Benjamin Kosnik + + libstdc++/6124 + * testsuite/23_containers/bitset_members.cc: New test. + * include/std/std_bitset.h (_Bit_count::_S_bit_count): Move.. + (_S_bit_count): Here. + (_First_one::_S_first_one): Move... + (_S_first_one): Here. + Format. + * src/bitset.cc: Adjust. + * config/linker-map.gnu: Export. + +2002-04-08 Benjamin Kosnik + + libstdc++/5180 + * include/bits/fstream.tcc (filebuf::seekpos): Fix. + * include/std/std_fstream.h: Clean. + * include/bits/ostream.tcc: Remove extraneous variables. + * include/bits/sstream.tcc (stringbuf::seekoff): Be strict about + open modes and which modes. + (stringbuf::seekpos): Same. + * testsuite/27_io/stringbuf_virtuals.cc: New tests. + +2002-04-05 Jonathan Wakely -Wed Jun 7 11:15:15 1995 Jason Merrill + * include/bits/stl_algo.h (unique_copy, __gcd, rotate, rotate_copy, + random_shuffle, partition, stable_partition, sort, stable_sort, + partial_sort, partial_sort_copy, nth_element): Doxygenate. - * std/cstring.h: Use #include_next to pick up . +2002-04-05 David S. Miller - * string.h: New file. + * config/os/gnu-linux/bits/os_defines.h + (__glibcpp_long_double_bits): Set to 64 on 32-bit Sparc. - * Makefile.in (MOSTLYCLEAN_JUNK): Remove piclist. +2002-04-04 Benjamin Kosnik - * configure.in (MOSTLYCLEAN): Remove stamp-picdir. + libstdc++/3457 + via gawrilow@math.tu-berlin.de + * acinclude.m4 (version_specific_libs): Fix combo usage with + --with-gxx-include-dir. + * aclocal.m4: Regenerate. + * configure: Same. + +2002-04-03 Benjamin Kosnik -Mon Jun 5 18:36:39 1995 Jason Merrill + As per DR 184, libstdc++/3139 + * include/std/std_limits.h (__glibcpp_bool_digits): Change to 1. + (numeric_limits::is_iec559): False. + (numeric_limits::is_modulo): False. - * config/*.ml: Build both shared and archive libraries. + * testsuite/27_io/ios_init.cc: Add instantiations. - * configure.in (MOSTLYCLEAN): Remove pic. - (frags): Use toplevel pic frags. +2002-04-02 Benjamin Kosnik + + libstdc++/5268 + * src/ios.cc: (ios_base::Init::_S_ios_destroy): Remove flush calls. + * testsuite/27_io/ios_init.cc (tests04): Add test. + + libstdc++/3983 + * include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove. + (basic_ios::_M_ios_fctype): Consistently name to _M_fctype. + * include/bits/basic_ios.tcc: Same. Remove outdated comments. + * include/bits/istream.tcc: Use _M_fctype, make consistent with + ostream. + * testsuite/27_io/ios_init.cc (tests03): Add test. + +2002-04-02 Phil Edwards - * Makefile.in (piclist): New rule. - (SHLIB): Use it. - (stl.list): Removed. - (typeinfo.o): Also build pic version. - (stdexcept.o): Ditto. - (*stmp-*): Ditto. + * include/Makefile.am (install-data-local): Use mkinstalldirs. + * include/Makefile.in: Regenerate. -Tue May 30 12:01:14 1995 Jason Merrill +2002-04-01 Benjamin Kosnik - * std/{complext,{f,d,ld}complex}.h: To declare specializations, - use friend declarations in the class body... - * std/cinst.h: ...rather than macro hackery. + libstdc++/5542 + * acinclude: More extensive checks for msgfmt, --enable-nls. + * aclocal.m4: Regenerate. + * configure: Regenerate. - * Makefile.in (stdlist): Renamed from list. +2002-04-01 Phil Edwards - * cstdarg: Don't define __CSTDARG__. - * complex.h: Similarly. + * libsupc++/exception (__verbose_terminate_handler): Point to docs. + * docs/doxygen/doxygroups.cc: Doxygen hooks for abi::__cxa_demangle. + * docs/html/18_support/howto.html: Document the demangler. + * docs/html/17_intro/howto.html: And link to it. -Tue May 9 19:31:20 1995 Jason Merrill + * docs/doxygen/mainpage.html: Describe user-vs-maintainer docs. + * docs/doxygen/run_doxygen: Print user-vs-maintainer. - * std/bastring.cc (operator>>): Use an int to store the return value - of streambuf::sbumpc. - (getline): Ditto. - * std/bastring.* (replace): Reverse size_t and charT arguments. +2002-04-01 Phil Edwards - * configure.in (enable_shared): Support enable_shared under AIX. + * include/bits/c++config: Fix misplaced leading blanks on first line. - * Makefile.in (SHARLIB): New variable and rule for building an - archive library containing a single shared object (for AIX). +2002-04-01 Phil Edwards -Mon May 8 01:43:19 1995 Jason Merrill + * config/linker-map.gnu: Export __verbose_terminate_handler. + * libsupc++/Makefile.am (sources): Add cxa_demangle.c, dyn-string.c. + Make new LTCOMPILE variable, use it in new special build rules. + * libsupc++/Makefile.in: Rebuild. + * src/vterminate.cc (__verbose_terminate_handler): Enable use of + runtime __cxa_demangle. - * std/bastring.h (remove): Forgot one. - (empty): And this. - Disable copy-on-write if someone takes an iterator. + * docs/html/install.html: Update prereqs and instructions. + * docs/html/19_diagnostics/howto.html: Bring naming for + verbose_terminate_handler into line with reality. - * std/bastring.cc (getline): Avoid resizing down if unnecessary. - (operator>>): Don't use private methods. +2002-04-01 Benjamin Kosnik + + libstdc++/3129 + * include/bits/basic_ios.h (basic_ios::_M_exception): Move. + (basic_ios::_M_streambuf_state): Move. + * include/bits/ios_base (ios_base): To here. + * include/bits/ios_base.h (ios_base::_S_local_words): To + _S_local_word_size. + (ios_base::_M_word_array): To _M_local_word. + (ios_base::_M_words_limit): To _M_word_size. + (ios_base::_M_words): To _M_word. + Comment. + * include/bits/basic_ios.tcc: Adjust. + * src/ios.cc (ios_base::_M_grow_words): Tweak. + * testsuite/27_io/ios_base_storage.cc: Add tests. + + libstdc++/5207 + Kenny Simpson + * include/bits/ios_base.h: Fix. + + Richard Henderson + * include/bits/ostream.tcc (ostream::operator<<(_CharT)): Correct + last change. -Sun May 7 02:39:56 1995 Jason Merrill + * include/bits/basic_string.h: Tweak formatting. + +2002-04-01 Paolo Carlini - * std/bastring.h (insert, replace): Fix. - * std/bastring.cc (find_*_of): Fix. + * config/locale/ieee_1003.1-2001/codecvt_specializations.h + (codecvt::do_out, codecvt::do_unshift, codecvt::do_in): + By definition, sizeof(char) == 1. + * include/bits/locale_facets.tcc (money_get::do_get, + money_put::do_put): Ditto. + * testsuite/21_strings/inserters_extractors.cc + (test04): Ditto. -Fri May 5 01:45:10 1995 Jason Merrill +2002-03-30 Richard Henderson - * std/bastring.h: Add iterator remove fn. Remove evil default - arguments. + PR c++/3719 + * libsupc++/eh_personality.cc (__cxa_call_unexpected): Copy handler + data out of the exception struct before calling unexpectedHandler. - * std/*complex*, std/cinst.h, cinst.cc: s/__complex/complex/g. - complex is now specialized. Lose _*_complex in favor of - 'explicit' constructors. - * std/complex.h: Lose typedef of complex. - * std/fcomplex.h: New file. - * std/complext.cc (operator<<): Accept more input forms. +2002-03-28 Roger Sayle - * std/bastring.h: Add iterator insert fns. + * include/c_std/std_cmath.h: To prevent problems overloading + g++ builtins, use the double variants from the global namespace + before defining float and long double variants in std::. -Thu May 4 02:30:04 1995 Jason Merrill +2002-03-28 Loren J. Rittle - * std/bastring.*: Update to current draft. + * testsuite/18_support/numeric_limits.cc (test_extrema): Fix typo. - * std/bastring.*: Reorganize so that the pointer in a string - object points to the data rather than the bsrep object, for - debugging. +2002-03-28 Paolo Carlini -Tue Apr 25 17:15:09 1995 Jason Merrill + * testsuite/24_iterators/istream_iterator.cc + (test02): New tests. - * configure.in: Update to stay in sync with config.shared. +2002-03-28 Ulrich Weigand + Paolo Carlini -Mon Apr 24 13:08:46 1995 Jason Merrill + * testsuite/22_locale/codecvt_members_unicode_wchar_t.cc + (test01): Protect the test with _GLIBCPP_USE_WCHAR_T; + fix i_lit_base e_lit_base arrays, making them independent + from the endianness of the platform; tweak UCS4 to UCS-4BE. - * std/complext.h: Declare hypot. Declare appropriate functions const. +2002-03-27 Benjamin Kosnik -Wed Apr 12 15:26:25 1995 Jason Merrill + * include/bits/ostream.tcc (ostream::operator<<(_CharT)): Always + allocate at least a byte. - * Makefile.in (typeinfo.o): Don't use $<. - (stdexcept.o): Ditto. + * testsuite/18_support/numeric_limits.cc (test_extrema): Make + debugger-friendly. + * testsuite/27_io/streambuf.cc (test07): Fix. + (test06): Enable. -Sat Apr 8 15:35:00 1995 Mike Stump +2002-03-27 Phil Edwards - * std/typeinfo.h: Move bad_cast, bad_typeid and __bad_cast_object - from here to stdexcept. - * std/stdexcept.h: Ditto. - * Makefile.in (stdexcept.o): Added rule to build typeinfo.o with - -frtti to support matching of thrown objects with rtti info for - bad_cast. + Bulk documentation merge (copy) from trunk. + * docs/doxygen/Intro.3, docs/doxygen/TODO, docs/doxygen/doxygroups.cc, + docs/doxygen/mainpage.html, docs/doxygen/run_doxygen, + docs/doxygen/tables.html, docs/doxygen/user.cfg.in, + docs/html/Makefile, docs/html/17_intro/howto.html, + docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html: + Merge from trunk. -Mon Apr 3 18:13:14 1995 Jason Merrill +2002-03-27 Phil Edwards - * typeinfo: New file. + * include/bits/stl_algo.h: Remove @maint and @endmaint. + * include/bits/stl_alloc.h: Likewise. + * include/bits/stl_construct.h: Likewise. + * include/bits/stl_deque.h: Likewise. + * include/bits/stl_iterator_base_types.h: Likewise. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_relops.h: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/std/std_memory.h: Likewise. - * Makefile.in (HEADERS): Add typeinfo. + * include/bits/stl_deque.h: Point into tables.html and add @ingroup. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_vector.h: Likewise. -Mon Apr 3 15:06:58 1995 Mike Stump +2002-03-26 Benjamin Kosnik - * Makefile.in (typeinfo.o): Added rule to build typeinfo.o with - -frtti to support matching of thrown objects with rtti info for - bad_cast. + * include/c/: Guard with _CPP_. + * include/c_std/: Same. + * include/Makefile.am: Fixup install, link routines for null + c_base_headers_extra scenarios. + * include/Makefile.in: Regerate. -Wed Mar 29 15:56:06 1995 Mike Stump +2002-03-25 Paolo Carlini + Richard Henderson - * typeinfo.cc: (__throw_type_match_rtti): Added to support - matching of thrown objects with rtti info. + * testsuite/22_locale/codecvt_members_unicode_char.cc + (test01, test02): make sure that the i_lit_base array + is sufficiently aligned. -Thu Mar 23 18:42:30 1995 Jason Merrill +2002-03-25 Benjamin Kosnik - * Makefile.in (HEADERS): Add stdexcept. + * config/os/newlib/bits/ctype_noninline.h (ctype::classic): Set to + _ctype_. -Sun Mar 12 01:25:27 1995 Jason Merrill +2002-03-25 Paolo Carlini - * std/typeinfo.h: Add return statements to dummy methods. + * testsuite/22_locale/collate_byname.cc + (test01): compare the result of collate::compare with + that of collate::transform + string::compare, not with + that of collate::transform + collate::compare; values + returned by collate::compare are normalized, therefore + test against +-1. -Wed Mar 8 16:09:50 1995 Jason Merrill +2002-03-25 Jakub Jelinek - * config/dec-osf.ml: Use -rpath flag. + PR target/5676 + * acinclude.m4 (GLIBCPP_ENABLE_SJLJ_EXCEPTIONS): Pass -fexceptions + explicitly. + * aclocal.m4: Rebuilt. + * configure: Rebuilt. + * configure.target (mcore-*-pe*): Add -frtti -fno-exceptions + by default to c++ flags. -Fri Feb 17 18:16:46 1995 Jason Merrill +2002-03-25 Benjamin Kosnik + Jakub Jelinek - * std/typeinfo.h: Add copyright header. + * config/locale/gnu/messages_members.h: Correct conditional. + * config/locale/gnu/messages_members.cc: Same. + * config/locale/gnu/time_members.cc: Same. - * Makefile.in (CXXFLAGS): Add a bunch of warning options to keep - me honest. +2002-03-25 Ulrich Weigand + Paolo Carlini -Thu Feb 16 00:04:49 1995 Jason Merrill + * testsuite/22_locale/codecvt_members_unicode_char.cc + (test01, test02): Fix i_lit_base arrays, making them + independent from the endianness of the platform. + +2002-03-22 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPP): Just test for + signbit and __signbit directly. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config.h.in: Regenerate. + * libmath/Makefile.am: Simplify. + * libmath/Makefile.in: Regenerate. + * include/c_std/std_cmath.h: Update paths for include of cmath.tcc. + + * include/Makefile.am: Clean up handling of extra "C" header files. + Add hooks for "C" compatibility headers. + * include/Makefile.in: Regenerate. + + * include/c/*: Formatting tweaks, cleanups. + * include/c_std/*: Same. + +2002-03-22 Benjamin Kosnik + + * config/locale/gnu/messages_members.h: Add __uselocale bits. + * config/locale/gnu/messages_members.cc: Same. + * config/locale/gnu/time_members.cc: Same. + +2002-03-22 Benjamin Kosnik + + * src/vterminate.cc: Format, -fno-exceptions cleanup. + +2002-03-21 Rainer Orth + + * acinclude.m4 (GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3): New. + (GLIBCPP_CONFIGURE_TESTSUITE): Use it to check for setenv. + * aclocal.m4: Regenerate. + * configure: Likewise. + +2002-03-19 Paolo Carlini + Ulrich Drepper + + * src/locale-inst.cc (__convert_from_v): Add an additional + __size parameter in the declarations. + * include/bits/locale_facets.tcc + (__convert_from_v): When available (that is, + _GLIBCPP_USE_C99 defined) use snprintf instead of sprintf. + (num_put::_M_convert_float): Depending on _GLIBCPP_USE_C99 + being defined or not, call and use __convert_from_v in the + appropriate way. + (num_put::_M_convert_int): Same here. + (money_put::do_put(long double)): Same here. - * Makefile.in, config/*.ml: Generate shared library on most hosts - as libstdc++.so.$(VERSION), with a symlink to libstdc++.so, so that - multiple versions can coexist. +2002-03-19 Phil Edwards -Fri Feb 10 02:59:39 1995 Jason Merrill + * docs/html/faq/index.html (#3.6): Rewrap and close tags. + * docs/html/faq/index.txt: Regenerate. - * std/exception.h: {set_,}{terminate,unexpected} have C++ linkage. +2002-03-19 Steve Ellcey - * Makefile.in: Allow string and complex to be split up either by - individual function or into I/O and non-I/O. Default to the - latter. + * acinclude.m4 (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Define + GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS to set LIBUNWIND_FLAG if + --enable-libunwind-exceptions is set. + * configure.in (GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS): Call new + macro to check for libunwind. + * configure: Regenerate. + * src/Makefile.am (libstdc___la_LDFLAGS): Add + LIBUNWIND_FLAG to libstdc link line. + * src/Makefile.in: Regenerate. -Wed Feb 8 02:39:47 1995 Jason Merrill +2002-03-19 Benjamin Kosnik - * std/bastring.h: Start thinking about throwing exceptions. + * docs/html/faq/index.html: Add OS X workaround. + * docs/html/17_intro/TODO: Update. - * typeinfo.cc: Remove private functions; defining them to call - abort () just delays errors until runtime. Define - __bad_cast_object. +2002-03-18 Paolo Carlini - * std/exception.h: Standard exceptions are now defined in - stdexcept.h. This header now contains declarations of terminate() - et al. - * exception.cc: Move code from libg++/src/except.c here. - * std/typeinfo.h: Define RTTI-related exceptions here. - * stdexcept{,.cc},std/stdexcept.h: New files. + * include/bits/locale_facets.tcc + (money_put::do_put(long double)): Fix dimensioning of + temporary buffers to avoid risk of overruns. + (money_put::do_put(string)): Same for the buffer used to + add the grouping chars. + * testsuite/22_locale/money_put_members_char.cc: Add test06. + * testsuite/22_locale/money_put_members_wchar_t.cc: Ditto. -Mon Feb 6 18:51:31 1995 Jason Merrill + * include/bits/locale_facets.tcc + (collate::do_transform): Simplify. - * Makefile.in (HEADERS): Resurrect, add new STL header names. - (install): Install extensionless headers again. - * extensionless headers: Resurrect, add new STL headers. - Currently only forward to std/whatever or stl/whatever. +2002-03-18 Phil Edwards -Mon Jan 30 13:53:22 1995 Jason Merrill + * acinclude.m4 (GLIBCPP_CONFIGURE): Make indentation/spacing uniform. + * configure.in: Add comments pointing the way for autoconf 2.5x. + * aclocal.m4, config.h.in, configure: Regenerate. - * std/bastring.h (basic_string (charT, size_t)): Mark explicit. +2002-03-18 Philipp Thomas - * Makefile.in (install): Set rootme when installing stl headers. - Only install *.* from std. + * include/backward/hash_map.h: hash, hashtable, hash_map and + hash_multimap are in namespace __gnu_cxx. + include/backward/hash_set.h: hash, hashtable, hash_set and + hash_multiset are in namespace __gnu_cxx. + include/backward/hashtable.h: hash and hashtable are in + namespace __gnu_cxx. + include/backward/rope.h: char_producer, sequence_buffer, + rope, crope and wrope are in namespace __gnu_cxx. + include/backward/slist.h: slist is in namespace __gnu_cxx. + * testsuite/backward/header_hash_map_h.cc + testsuite/backward/header_hash_set_h.cc + testsuite/backward/header_hashtable_h.cc + testsuite/backward/header_rope_h.cc + testsuite/backward/header_slist_h.cc + testsuite/backward/header_tempbuf_h.cc: New tests for + checking that we're using the correct namespace. -Wed Jan 25 02:29:30 1995 Jason Merrill +2002-03-17 Jason Merrill - * std/bastring.h (operator=): grab before releasing. + PR c++/4381 + * libsupc++/eh_personality.cc (get_adjusted_ptr): New static fn. + (check_exception_spec): Call it. Take the thrown pointer. + (__cxa_call_unexpected): Pass it. + (PERSONALITY_FUNCTION): Likewise. Use get_adjusted_ptr. -Mon Jan 23 19:54:02 1995 Ronald F. Guilmette +2002-03-15 Anthony Green - * Makefile.in (install): Also install STL headers. + * configure.in: Remove useless is_mingw32. + * configure: Rebuilt. -Mon Jan 23 04:09:35 1995 Jason Merrill +2002-03-15 Paolo Carlini - * Makefile.in (list): Set $rootme before calling make. + * testsuite/22_locale/collate_members_char.cc + (test01): compare the result of collate::compare with + that of collate::transform + string::compare, not with + that of collate::transform + collate::compare. + (test01): values returned by collate::compare are + normalized, therefore test against +-1. + * testsuite/22_locale/collate_members_wchar_t.cc: Ditto. + +2002-03-12 Loren Rittle + + reported by Peter Schmid + * testsuite/thread/pthread4.cc: Lower nominal iteration counter. + +2002-03-12 Benjamin Kosnik + Per Liboriussen + + * config/os/gnu-linux/bits/ctype_noninline.h: Cast to + unsigned char. + * config/os/gnu-linux/bits/ctype_inline.h: Same. + + * config/os/irix/irix6.5/bits/ctype_inline.h: Same. + + * config/os/solaris/solaris2.5/bits/ctype_inline.h: Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. + + * config/os/solaris/solaris2.6/bits/ctype_inline.h: Same. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. + + * config/os/solaris/solaris2.7/bits/ctype_inline.h: Same. + * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. + + * testsuite/22_locale/ctype_members_char.cc (main): Add tests. + +2002-03-12 Benjamin Kosnik + + * include/bits/basic_string.tcc (string::_S_construct(_InIter, + _InIter, const _Alloc&, forward_iterator_tag): Check for null. + (string::basic_string(const _CharT* __s, const _Alloc& __a)): Same. + * testsuite/21_strings/ctor_copy_dtor.cc (test01): Re-enable, now + that memory limits are in place. + (test03): Add tests. + +2002-03-11 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for wctype.h. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * configure: Regenerate. + * include/c_std/std_cwctype.h: Guard. + +2002-03-11 Chris Demetriou + + * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Enhance check for + whether GLIBCPP_CHECK_LINKER_FEATURES has been used. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2002-03-11 Benjamin Kosnik + + * include/bits/stl_bvector.h: Fix warning. + +2002-03-11 Richard Henderson + + * include/bits/stl_bvector.h (_Bit_type): New. Use throughout. + +2002-03-11 Paolo Carlini + + * include/bits/locale_facets.tcc (collate::do_transform): + Rewrite to fix problems with long transformed strings. + + * include/bits/locale_facets.tcc (time_put::do_put): + Consider sizeof(char_type) in allocating the buffer. + +2002-03-10 Anthony Green + + * configure.in: Support cross builds to mingw32 target. + * configure: Rebuilt. + +2002-03-08 Benjamin Kosnik + + * c_locale_generic.cc: Move to... + * generic/c_locale.cc + * c_locale_generic.h: Move to... + * generic/c_locale.h + * codecvt_specializations_generic.h: Move to... + * generic/codecvt_specializations.h + * collate_members_generic.cc: Move to... + * generic/collate_members.cc + * ctype_members_generic.cc: Move to... + * generic/ctype_members.cc + * messages_members_generic.cc: Move to... + * generic/messages_members.cc + * messages_members_generic.h: Move to... + * generic/messages_members.h + * moneypunct_members_generic.cc: Move to... + * generic/monetary_members.cc + * numpunct_members_generic.cc: Move to... + * generic/numeric_members.cc + * time_members_generic.cc: Move to... + * generic/time_members.cc + * c_locale_gnu.cc: Move to... + * gnu/c_locale.cc + * c_locale_gnu.h: Move to... + * gnu/c_locale.h + * collate_members_gnu.cc: Move to... + * gnu/collate_members.cc + * ctype_members_gnu.cc: Move to... + * gnu/ctype_members.cc + * messages_members_gnu.cc: Move to... + * gnu/messages_members.cc + * messages_members_gnu.h: Move to... + * gnu/messages_members.h + * moneypunct_members_gnu.cc: Move to... + * gnu/monetary_members.cc + * numpunct_members_gnu.cc: Move to... + * gnu/numeric_members.cc + * time_members_gnu.cc: Move to... + * gnu/time_members.cc + * c_locale_ieee_1003.1-200x.cc: Move to... + * ieee_1003.1-2001/c_locale.cc + * c_locale_ieee_1003.1-200x.h: Move to... + * ieee_1003.1-2001/c_locale.h + * codecvt_specializations_ieee_1003.1-200x.h: Move to... + * ieee_1003.1-2001/codecvt_specializations.h + * messages_members_ieee_1003.1-200x.cc: Move to... + * ieee_1003.1-2001/messages_members.cc + * messages_members_ieee_1003.1-200x.h: Move to... + * ieee_1003.1-2001/messages_members.h + + * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Make consistent. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.am (sources): Change to monetary and numeric. + * src/Makefile.in: Regenerate. + * docs/html/configopts.html: Update to ieee_1003.1-2001. + +2002-03-08 scott snyder + + libstdc++/5875 + * include/bits/locale_facets.tcc (num_put::_M_convert_float): + Allow one more digit of precision. + * testsuite/27_io/ostream_inserter_arith.cc: Test that we can + write a double and read back in the same value. + +2002-03-08 Benjamin Kosnik + + * include/std/std_limits.h: Move static const data members out of + generic template, into base class __numeric_limits_base. + * src/limits.cc: Add definitions. + * config/linker-map.gnu: Add __numeric_limits_base. + * testsuite/18_support/numeric_limits.cc: Declare test in scope. + +2002-03-07 Benjamin Kosnik + + * include/bits/stl_alloc.h: Add extern implicit allocator + instantiations. + * include/bits/basic_string.tcc: Tweak. + * include/bits/loqcale_facets.tcc: Remove default args. Add + has_facet, use_facet extern instantiations. + * src/stl-inst.cc: Add explicit instantiation. + * src/locale-inst.cc: Clean. Remove locale member template + instantiations. + + * testsuite/22_locale/operators.cc (test02): Enable. + +2002-03-06 Benjamin Kosnik + Stephen M. Webb + + * include/bits/stl_tree.h (_S_rb_tree_red): Make enum. + (_S_rb_tree_black): Make enum. + Clean. Format. + * include/bits/stl_bvector.h (__WORD_BIT): To _M_word_bit, enum. + * include/bits/stl_algo.h (__stl_chunk_size): _M_chunk_size, enum. + (__stl_threshold): _M_threshold, enum. + * src/stl-inst.cc: Same. + * config/linker-map.gnu: Remove. + + * testsuite/23_containers/vector_bool.cc: New. + +2002-03-08 Phil Edwards + + * include/bits/basic_string.h (basic_string::_S_construct): Fix + names in declaration. + (basic_string::compare): These are no longer optional. + * include/bits/ostream.tcc: Tweak closing brace placement. + * include/bits/stl_algo.h: Lots of initial doxygen comment hooks. + * include/std/std_sstream.h: Fix typo in comment. + * include/bits/locale_facets.tcc: Remove unneeded header inclusion. + * src/locale.cc: Likewise. + +2002-03-08 Phil Edwards + + PR libstdc++/5734 + * include/bits/stl_vector.h (vector::push_back()): Guard with + _GLIBCPP_DEPRECATED. + +2002-03-05 Benjamin Kosnik + + * docs/html/17_intro/RELEASE-NOTES: Fix usage. + * README (libmath): Make clear. + +2002-03-05 Jakub Jelinek + + * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Check for version + script globbing in ld. + * aclocal.m4: Rebuilt. + * configure: Rebuilt. + +2002-03-05 Benjamin Kosnik + + * docs/html/17_intro/RELEASE-NOTES: Update. + * README: Format subdirectories. + +2002-03-05 Paolo Carlini + + libstdc++/5816 + * include/bits/locale_facets.tcc + (num_get::_M_extract_float): Fix the parsing of __dec, since + the standard prescribes that if no grouping characters are + seen, no grouping check is applied. + * testsuite/22_locale/num_get_members_char.cc: Add test05 + distilled from the PR. + * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto. -Wed Jan 11 19:24:47 1995 Jason Merrill +2002-03-04 Craig Rodrigues - * typeinfo.cc (__rtti_match): Don't try to do pointer arithmetic - with a void *. + * docs/html/17_intro/porting-howto.xml: Refer to + http://www.oasis-open.org for docbookx.dtd. + * docs/html/17_intro/porting-howto.html: Regenerated. - * move all headers into std subdirectory and update files accordingly. +2002-03-03 Phil Edwards -Thu Jan 5 01:51:49 1995 Jason Merrill + PR libstdc++/2955 + * include/std/std_sstream.h: Remove trailing spaces. + (basic_stringbuf::_M_stringbuf_init): Also check for ios_base::app. + * testsuite/27_io/stringbuf.cc (test05, test06): New tests. - * bastring.ccI (basic_string (size_t, capacity)): s/reserve/::reserve/. +2002-03-03 Paolo Carlini -Wed Jan 4 17:27:32 1995 Jason Merrill + * testsuite/22_locale/num_get_members_char.cc (test04): + Use a named locale expecting grouping (de_DE). + * testsuite/22_locale/num_get_members_wchar_t.cc (test04): + Ditto. + * testsuite/27_io/ios_manip_basefield.cc (test01): + Extend coverage, uniform treatment of hexs and octs. - * exception: s/string/__string/g. +2002-03-01 Paolo Carlini - * configure.in (MOSTLYCLEAN): Add so_locations. + * include/bits/locale_facets.tcc (num_get::_M_extract_int): + Admit grouping for octals and hexadecimals too. + * testsuite/22_locale/num_get_members_char.cc: Add test04. + (test01): Tweak "." -> "," in void* test. + * testsuite/22_locale/num_get_members_wchar_t.cc: Ditto. - * bastring.ccI (basic_string (size_t, capacity)): Fix thinko. - (various find functions): Ditto. + * testsuite/27_io/ios_manip_basefield.cc: Remove static keyword. + * testsuite/27_io/ios_manip_fmtflags.cc: Remove two of them. -Fri Dec 30 18:04:00 1994 Mike Stump + * testsuite/27_io/ios_manip_basefield.cc (test01): + Fix for 64 bit machines. - * typeinfo.h: Add support for the built-in type bool. +2002-02-28 Richard Henderson -Fri Dec 30 14:57:02 1994 Mike Stump + * config/linker-map.gnu: Export operator new with unsigned long, + and with std::nothrow_t. Likewise operator delete. - * typeinfo.{cc, h}: Guard against multiple inclusions, and add #p i/i. +2002-02-26 Benjamin Kosnik -Fri Dec 2 17:56:05 1994 Mike Stump + libstdc++/3983 + * include/bits/basic_ios.tcc (basic_ios::init): Set _M_fill to zero. + Adjust comment. + * include/bits/basic_ios.h (basic_ios::_M_fill): Make mutable. + (basic_ios::_M_fill_init): New. + (basic_ios::fill()): Delay dealing with _M_fill. + Adjust comment. + * ios.cc (ios_base::ios_base()): Initialize _M_callbacks, _M_words. + (ios_base::_M_call_callbacks): Adjust. + * testsuite/27_io/ios_init.cc (test02): Adjust testcase. - * libg++ 2.6.2 released. +2002-02-28 Loren Rittle - * typeinfo.{cc, h} (__rtti_match): Change interface to compiler - for dynamic_casting to gear up for exception handling's use of - rtti for argument matching. + * include/Makefile.am (thread_target_headers): Unconditionally + stage and install gthr-posix.h. + (${target_builddir}/gthr-posix.h): New rule cloned off + ${target_builddir}/gthr-default.h. + (${target_builddir}/gthr-default.h): Support chained inclusion + of gthr support headers. + * include/Makefile.in: Rebuilt. -Tue Nov 29 16:49:32 1994 Per Bothner +2002-02-26 Paolo Carlini - * configure.in (configdirs): Add stl. - * Makefile.in: Build stl, and merge .o files from it. + * include/bits/locale_facets.tcc (num_put::_M_widen_int): + Group all the integral types, not only decs. + * testsuite/27_io/ios_manip_basefield.cc (test01): Tweak existing + tests, add a few more. -Thu Nov 17 15:30:57 1994 Jason Merrill +2002-02-25 Benjamin Kosnik - * bastring.hI: Add iterator, const_iterator, begin() and end() to - basic_string. + * src/ios.cc (ios_base::~ios_base): Tweak. + (ios_base::_M_call_callbacks): Deal with null __p. + (ios_base::ios_base): Set _M_callbacks. + * include/bits/basic_ios.tcc (basic_ios::init): Adjust comment. + * testsuite/27_io/ios_init.cc (test02): Fix. -Mon Nov 7 16:50:33 1994 Jason Merrill + * mkcheck.in (static_fail): Failed links go to output file. - * Makefile.in, configure.in, config/*.ml, tests/Makefile.in, - tests/configure.in: Various changes to handle --enable-shared. +2002-02-25 Phil Edwards -Fri Nov 4 19:13:33 1994 Mike Stump + * docs/html/faq/index.html: Update. + * docs/html/faq/index.txt: Regenerate. - * exception{,.cc}: Added to support catching bad_cast's. +2002-02-22 Phil Edwards -Thu Nov 3 17:42:13 1994 Mike Stump + * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Fix comment. + * aclocal.m4: Regenerate. + * docs/html/configopts.html: Document --enable-symvers. + * config/linker-map.gnu: Break libsupc++ symbols out to their own tag. - * typeinfo.h (type_info::{name, before}): Add to match draft. +2002-02-22 Philipp Thomas -Thu Nov 3 00:56:34 1994 Jason Merrill (jason@phydeaux.cygnus.com) + * include/backward/tempbuf.h: get_temporary_buffer and + return_temporary_buffer are in namespace std, not in __gnu_cxx. - * Makefile.in (LIBIBERTY_OBJS): Add strerror.o. +2002-02-21 Benjamin Kosnik -Mon Oct 31 15:33:06 1994 Kung Hsu (kung@mexican.cygnus.com) + * configure.in (target_alias): Default to yes. + * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): Add check for shared + libgcc to default case. - * typeinfo.cc: Fix a bug in the final return. - * typeinfo.cc: Fix the ANSI header version number. - * typeinfo.h: ditto. +2002-02-20 Phil Edwards -Fri Oct 28 14:23:12 1994 Mike Stump + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Also check version. + (GLIBCPP_ENABLE_SYMVERS): Redo logic, use linker version. + * configure.in (GLIBCPP_ENABLE_SYMVERS): Move later in the script. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config/linker-map.dummy: New file. Contains nothing useful. - * type_info.{cc,h}: Rename to typeinfo to better match current draft. +2002-02-20 Benjamin Kosnik -Wed Oct 26 11:13:53 1994 Kung Hsu (kung@mexican.cygnus.com) + * testsuite/22_locale/money_put_members_char.cc: Fix. + * testsuite/22_locale/money_put_members_wchar_t.cc: Fix. - * type_info.h: new header file for rtti. - * type_info.cc: new code file for rtti. - * Makefile.in: change to include type_info.o in libstdc++ for rtti. + * testsuite/27_io/standard_manipulators.cc: New file. -Sat Oct 15 16:09:51 1994 Jason Merrill (jason@phydeaux.cygnus.com) + * testsuite/27_io/ios_manip_basefield.cc: Check results, now failing. + * testsuite/27_io/ios_manip_fmtflags.cc: Use locale::classic(). - * libg++ 2.6.1 released. +2002-02-20 Danny Smith - * cinst.hI: Also declare instantiations of out-of-line functions. + * config/os/mingw32/bits/ctype_noninline.h + (ctype::ctype): Remove default args from parm list. + * config/os/djgpp/bits/ctype_noninline.h: Same. -Fri Oct 14 15:00:09 1994 Jason Merrill (jason@phydeaux.cygnus.com) +2002-02-19 Benjamin Kosnik - * configure.in (CXXINCLUDES): Use {} to wrap variable name. - * tests/configure.in (CXXINCLUDES): Ditto. + * include/std/std_iomanip.h: Inline, tweaks. + * config/linker-map.gnu: Remove hacks. - * cinst.hI: Declare instantiations of two-argument functions so - overload resolution will work. - * complext.hI: Always include cinst.hI. + * testsuite/21_strings/capacity.cc: Add explicit instantiations. + * testsuite/27_io/ios_init.cc: Same. + * testsuite/22_locale/money_get_members_char.cc (test07): Fix. + * testsuite/22_locale/money_get_members_wchar_t.cc (test07): Same. + +2002-02-19 Benjamin Kosnik - * bastring.ccI (operator>>): Tweak. + * config/linker-map.gnu: Export global vtable, typeinfo, guard + variable, and thunk info as per CXXABI docs. + +2002-02-19 Loren Rittle + + * include/Makefile.am: Use CONFIG_HEADER instead of ad hoc names. + * include/Makefile.in: Rebuilt. -Tue Oct 11 17:07:49 1994 Jason Merrill (jason@phydeaux.cygnus.com) +2002-02-18 Peter Schmid - * stddef*: Do the #pragma i/i thang. + * testsuite/22_locale/collate_byname.cc (test01): Replace size4 + with size3 for the string collations of str5. - * bastring.hI (basic_string::put_at): Use operator[]. - (basic_string::terminate): Don't necessarily copy the rep. +2002-02-18 Paolo Carlini - * bastring.ccI (operator>>): Avoid shrinking and then re-expanding - the string. + libstdc++/5708 + * include/bits/locale_facets.tcc (money_put::do_put): + For the space field use __fill instead of ' ', uniformly. + * testsuite/22_locale/money_put_members_char.cc: + Add test05 distilled from PR. + (test01-02-03): Trim some '*' to ' '. + * testsuite/22_locale/money_put_members_wchar_t.cc: Ditto. - * bastring.*I, sinst.cc: Only allow allocation policy control if - _G_ALLOC_CONTROL is defined. +2002-02-18 Loren Rittle - * Makefile.in (libstdc++.a): Depend on iostream.list and libiberty.a. - (../libio/iostream.list): New rule. - (../libiberty/libiberty.a): New rule. - (OBJS): Add stddef.o. + libstdc++/5697 + * include/Makefile.am (thread_builddir): Remove (map all + existing uses to target_builddir). + (thread_headers): Rename to... + (thread_target_headers): ...this. + (stamp-thread): Remove. + (stamp-target): Correctly state the position as built. + Update all dependencies to match the new reality. Remove all + dependency calculations on directories. + * include/Makefile.in: Rebuilt. -Sat Oct 8 23:59:45 1994 Jason Merrill (jason@phydeaux.cygnus.com) +2002-02-16 Benjamin Kosnik - * *: First checkin. + * include/bits/locale_facets.tcc: Add pragma GCC system_header. + * include/bits/fstream.tcc: Same. + * include/bits/sstream.tcc: Same. + * include/bits/ostream.tcc: Same. + * include/bits/istream.tcc: Same. + * include/bits/streambuf.tcc: Same. + * include/bits/basic_ios.tcc: Same. + * include/bits/basic_string.tcc: Same. + +2002-02-15 Benjamin Kosnik + + * include/std/std_iosfwd.h: Don't guard typedefs with + _GLIBCPP_USE_WCHAR_T + * include/bits/stringfwd.h: Same. + +2002-02-15 Benjamin Kosnik + + * src/locale.cc (moneypunct_byname): Remove definitions. + * include/std/std_streambuf.h (streambuf::operator=): Return. + +2002-02-15 Benjamin Kosnik + + Tune for size. + * src/string-inst.cc (string::_Rep::_S_terminal): Remove redundant + explicit instantiation. + (string::_Rep::_S_max_size): Same. + * include/bits/basic_string.tcc: Add extern explicit + instantiations for string, wstring. + * include/bits/basic_ios.tcc: Add extern explicit instantiations + for ios, wios. + * include/bits/streambuf.tcc: Same, for streambuf, wstreambuf. + * include/bits/istream.tcc: Same, for istream, wistream. + * include/bits/ostream.tcc: Same for ostream, wostream, iostream, + wiostream. + * include/bits/sstream.tcc: Same, for stringbuf, wstringbuf, + istringstream, wistringstream, ostringstream, wostringstream, + stringstream, wstringstream. + * include/bits/fstream.tcc: Same, for filebuf, wfilebuf, ifstream, + wifstream, ofstream, wofstream, fstream, wfstream. + * src/misc-inst.cc: Correct comments. + Add iomanip instantiations for wide streams. + * include/std/std_iomanip.h: Same. + * include/bits/locale_facets.tcc: Same. + + * include/std/std_streambuf.h: Correct + _GLIBCPP_FULLY_COMPLIANT_HEADERS guard. + * include/std/std_sstream.h: Same. + * include/std/std_ostream.h: Same. + * include/std/std_istream.h: Same. + * include/std/std_fstream.h: Same. + + * include/std/std_streambuf.h: Add definitions for private copy + ctor and assignment operator. + * include/std/std_istream.h: Remove declared but undefined copy + ctor and assignment operator. This is taken care of in ios_base, + so adding it in the derived class as well is superfluous. + * include/std/std_ostream.h: Same. + + * include/bits/basic_ios.h (basic_ios::clear): Don't inline. + * include/bits/basic_ios.tcc (basic_ios::clear): Move definition here. + +2002-02-14 Benjamin Kosnik + + * config/linker-map.gnu: Change tag from GCC_3.1 to GLIBCPP_3.1. + Add typeinfo bits. Smooth. + * aclocal.m4: Regenerate. + * configure: Same. + * src/Makefile.in: Same. + +2001-02-14 Joel Sherrill + + * config/cpu/m68k/bits/atomicity.h: Corrected for RTEMS targets + which do not have a CAS instruction. + +2002-02-14 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_SYMVERS): New macro, initial revision. + * configure.in: Call it. + * config/linker-map.gnu: New file, initial incomplete revision. + * src/Makefile.am: Optionally pass version script to the linker. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.in: Regenerate. + +2002-02-13 Benjamin Kosnik + + * src/localename.cc: Remove stdexcept include. + * src/locale-inst.cc: Same. + * src/locale.cc: Same. + * src/functexcept.cc: Remove string includes. + * include/std/std_bitset.h: Remove stdexcept include. + * testsuite/23_containers/bitset_members.cc: Add stdexcept. + * testsuite/23_containers/bitset_ctor.cc: Same. + +2002-02-11 Benjamin Kosnik + + * include/bits/stl_algo (__stl_threshold): Declare external. + (__stl_chunk_size): Same. + * include/bits/stl_bvector.h (__WORD_BIT): Same. + * include/bits/stl_tree.h (_S_rb_tree_red): Same. + (_S_rb_tree_black): Same. + * src/stl-inst.cc (__stl_threshold): Define. + (__stl_chunk_size): Same. + (__WORD_BIT): Same. + (_S_rb_tree_red): Same. + (_S_rb_tree_black): Same. + + * config/io/basic_file_libio.h (__basic_file): Add declarations. + * include/bits/basic_file.h: Remove. + * config/io/c_io_stdio.h: Remove _GLIBCPP_BASIC_FILE_ENCAPSULATION + Declare generic types, specialization. + * config/io/basic_file_stdio.cc: Definitions. + * config/io/c_io_libio.h: Remove _GLIBCPP_BASIC_FILE_INHERITANCE. + Declare generic types. + * include/Makefile.am (bits_headers): Remove basic_file.h. + (extra_target_headers): Change basic_file_model.h to basic_file.h. + (stamp-target): Same. + + * include/bits/stl_alloc.h: Tweaks. + * include/bits/localefwd.h: Same. + +2002-02-11 Aaron W LaFramboise + + * include/bits/locale_facets.tcc (collate::do_hash): Fix. + * testsuite/22_locale/collate_members_char.cc (test03): New test. + * testsuite/22_locale/collate_members_wchar_t.cc (test03): Same. + +2002-02-10 Phil Edwards + + * include/bits/stl_algo.h (transform (both signatures), generate_n): + Use __typeof__ in concept checks. + +2002-02-10 Jonathan Wakely + + * include/bits/stl_algo.h (__median, for_each, find, find_if, + adjacent_find, count, count_if, search, search_n, swap_ranges, + transform, replace, replace_if, replace_copy, replace_copy_if, + generate, generate_n, remove_copy, remove_copy_if, remove, remove_if, + unique, unique_copy, reverse, reverse_copy): Doxygenate. + +2002-02-08 Benjamin Kosnik + + * include/bits/locale_facets.h + (numpunct<_CharT>::_M_initialize_numpunct): Remove definition. + (__timepunct<_CharT>::_M_initialize_timepunct): Same. + (__timepunct<_CharT>::_M_put_helper): Same. + (moneypunct<_CharT, _Intl>::_M_initialize_moneypunct): Same. + + * include/bits/fstream.tcc (filebuf::underflow): Remove + __codecvt_type typedef. + (filebuf::_M_convert_to_external): Same. + +2002-02-08 Phil Edwards + + * docs/doxygen/TODO: Update. + * docs/doxygen/doxygroups.cc: Tweak __gnu_cxx description. + * docs/doxygen/mainpage.html: Add TODO list link. + * docs/doxygen/user.cfg.in: Add @doctodo hook. + * docs/doxygen/tables.html: New file, emoty structure only. + + * include/bits/stl_iterator.h: Doxygenate just about everything. + * include/bits/stl_iterator_base_funcs.h: Ditto, clean up spaces. + * include/bits/stl_iterator_base_types.h: Add notes. + +2002-02-07 Stephan Buys + + * include/bits/stl_map.h: Tweak doxygen markup. + * include/bits/stl_multimap.h: Doxygenate and remove extra spaces. + * include/bits/stl_vector.h: Likewise. + +2002-02-07 Benjamin Kosnik + + libstdc++/5286 + libstdc++/3860 + * include/std/std_fstream.h (filebuf::__file_type): Change to + __basic_file. + (filebuf::_M_convert_to_external): Declare. + * include/bits/fstream.tcc (filebuf::_M_convert_to_external): Define + codecvt bits for wide streams. + (filebuf::_M_really_overflow): Use it. + (filebuf::underflow): Use codecvt. + * config/locale/codecvt_specializations_ieee_1003.1-200x.h: + (codecvt<__enc_traits>::do_out): Deal with partial. + (codecvt<__enc_traits>::do_encoding): Return something useful. + * src/codecvt.cc (codecvt::do_encoding): Return sizeof + wchar_t. + * testsuite/22_locale/codecvt_members_unicode_char.cc (test01): + Change expected encoding output. + (test02): Same. + * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test01): Same. + (test02): Same. + +2002-02-07 Benjamin Kosnik + Wolfgang Bangerth + + * include/bits/basic_ios.tcc (basic_ios::narrow): Add default value. + (basic_ios::widen): Same. + +2002-02-07 Paolo Carlini + + * testsuite/22_locale/money_get_members_char.cc: + Add comment, tidy up. + (test01): more "en_HK" tests (without showbase). + * testsuite/22_locale/money_get_members_wchar_t.cc: Ditto. + +2002-02-06 Loren Rittle + + * config/locale/c_locale_generic.cc: Do not trust + _GLIBCPP_HAVE_STRTOF or _GLIBCPP_HAVE_STRTOLD as + set by configure. + +2002-02-06 Loren Rittle + + * acinclude.m4: Add C++ linkage check for strtof. + * aclocal.m4: Rebuilt. + * config.h.in: Rebuilt. + * configure: Rebuilt. + * config/locale/c_locale_generic.cc: Conditionally include + . Improve handling and error checking of float + and long double input for non-C99 configurations. + +2002-02-06 Paolo Carlini + + * include/bits/locale_facets.tcc (money_get::do_get(string)): + In case money_base::symbol deal properly with multi-char sign + for patterns {X,Y,Z,symbol} and {X,Y,symbol,none}. + * testsuite/22_locale/money_get_members_char.cc: Add test07. + * testsuite/22_locale/money_get_members_wchar_t.cc: Add test07. + +2002-02-05 Paolo Carlini + + * include/bits/locale_facets.tcc (money_get::do_get(string)): + First construct a tentative returned string, then, only if the + parsing succeeds, copy it into the string passed by reference. + * testsuite/22_locale/money_get_members_char.cc: Add test06. + * testsuite/22_locale/money_get_members_wchar_t.cc: Add test06. + +2002-02-04 Phil Edwards + + * docs/doxygen/TODO: Impl-defined behavior now documented... + * docs/html/17_intro/howto.html: ...here. + * docs/doxygen/mainpage.doxy: Remove, rename... + * docs/doxygen/mainpage.html: ...to this. Tweak HTML, add license. + * docs/doxygen/style.css: Add small text. + * docs/doxygen/run_doxygen: Adjust for new mainpage. + * docs/doxygen/user.cfg.in: Likewise. + +2002-02-04 Stephan Buys + + * include/bits/stl_map.h: Initial doxygen markup. + * include/std/std_fstream.h: Initial doxygen markup. + +2002-02-04 Paolo Carlini + + libstdc++/5579 + * include/bits/locale_facets.tcc (money_get::do_get(string)): + Deal correctly with !(__io.flags() & ios_base::showbase) + for case money_base::symbol. + * testsuite/22_locale/money_get_members_char.cc: Add test05. + * testsuite/22_locale/money_get_members_wchar_t.cc: Add test05. + +2002-02-02 Paolo Carlini + + * testsuite/22_locale/operators.cc + (gnu_collate::do_compare()): Add return statement to + suppress "no return statement" warning. + +2002-02-01 Paolo Carlini + + * testsuite/27_io/ostream_manip.cc: Enable test02. + +2002-02-01 Phil Edwards + + * docs/html/documentation.html: Update for 3.0.96. + * docs/html/faq/index.html: Update for 3.0.96. + * docs/html/faq/index.txt: Regenerated. + * docs/doxygen/TODO: Update notes. + * docs/html/17_intro/howto.html: Initial impl-specific listing. + +2002-01-31 Benjamin Kosnik + + * config/locale/codecvt_specializations_ieee_1003.1-200x.h: + Initialize all data members in copy ctor. Make ctors explicit. + (__enc_traits::__enc_traits()): Default ctor does nothing. + (__enc_traits::_M_init): Guard against multiple iconv_opens. + * include/std/std_sstream.h (basic_stringbuf): Make data members + protected. + * include/std/std_fstream.h (basic_filebuf): Same. + * include/std/std_streambuf.h: Tweak. + * include/bits/streambuf.tcc: Same. + * include/bits/sstream.tcc: Same. + * include/bits/fstream.tcc: Same. + +2002-01-31 Loren Rittle + + * testsuite/22_locale/codecvt_members_char_char.cc: Do not + allow NULL argument to be passed to setenv(). + * testsuite/22_locale/codecvt_members_wchar_t_char.cc: Likewise. + * testsuite/22_locale/collate_members_char.cc: Likewise. + * testsuite/22_locale/collate_members_wchar_t.cc: Likewise. + * testsuite/22_locale/ctype_members_char.cc: Likewise. + * testsuite/22_locale/ctype_members_wchar_t.cc: Likewise. + * testsuite/22_locale/messages_members_char.cc: Likewise. + * testsuite/22_locale/money_get_members_char.cc: Likewise. + * testsuite/22_locale/money_get_members_wchar_t.cc: Likewise. + * testsuite/22_locale/money_put_members_char.cc: Likewise. + * testsuite/22_locale/money_put_members_wchar_t.cc: Likewise. + * testsuite/22_locale/moneypunct_members_char.cc: Likewise. + * testsuite/22_locale/moneypunct_members_wchar_t.cc: Likewise. + * testsuite/22_locale/num_get_members_char.cc: Likewise. + * testsuite/22_locale/num_get_members_wchar_t.cc: Likewise. + * testsuite/22_locale/num_put_members_char.cc: Likewise. + * testsuite/22_locale/num_put_members_wchar_t.cc: Likewise. + * testsuite/22_locale/numpunct_members_char.cc: Likewise. + * testsuite/22_locale/numpunct_members_wchar_t.cc: Likewise. + * testsuite/22_locale/time_get_members_char.cc: Likewise. + * testsuite/22_locale/time_get_members_wchar_t.cc: Likewise. + * testsuite/22_locale/time_put_members_char.cc: Likewise. + * testsuite/22_locale/time_put_members_wchar_t.cc: Likewise. + +2002-01-30 Benjamin Kosnik + + * config/locale/c_locale_gnu.cc: Same errno fixes as generic. + + * ChangeLog-2001: Fix spelling errors... + * docs/html/17_intro/RELEASE-NOTES: Update. + * docs/html/17_intro/TODO: Update. + * README (file): Update. + +2002-01-30 Loren Rittle + + * config/locale/c_locale_generic.cc: Check errno for ERANGE + instead of non-zero to aid portability. + +2002-01-30 Peter Schmid + + * docs/html/22_locale/messages.html: Fix example code. + +2002-01-30 Richard Henderson + + * testsuite/27_io/ostream_inserter_arith.cc (test03_check): Break + out from test03 and templatize. + (test03): Use it. + +2002-01-30 Paolo Carlini + + * config/locale/numpunct_members_gnu.cc + (numpunct::_M_initialize_numpunct()): + Fix initialization of _M_grouping for locales which have + _M_thousands_sep == '\0'(L'\0', respectively). + * testsuite/22_locale/numpunct_byname.cc (test02): Add test. + +2002-01-30 Paolo Carlini + + * testsuite/27_io/ostream_inserter_arith.cc (test03): + Better fix for 32/64 bit architectures, avoiding the + implicit assumption that CHAR_BIT == 8. + +2002-01-28 Phil Edwards + + * Makefile.am (doxygen, doxygen-maint, doxygen-man): Tweak targets. + * Makefile.in: Regenerate. + + * docs/doxygen/run_doxygen: Update, mostly for man pages. + * docs/doxygen/Intro.3: Update. + * docs/doxygen/TODO: Update. + * docs/doxygen/doxygroups.cc: Add namespace hook for __gnu_cxx. + * docs/doxygen/mainpage.doxy: Update. + * docs/doxygen/user.cfg.in: Update for header rename. Also + regenerate comments and variables with 1.2.12. + * docs/doxygen/maint.cfg.in: Remove file. + + * include/bits/stl_relops.h: Doxygenate. + * include/bits/stl_tempbuf.h (std::_Temporary_buffer): Likewise. + + * include/c_std/std_cassert.h, include/c_std/std_cctype.h, + include/c_std/std_cerrno.h, include/c_std/std_cfloat.h, + include/c_std/std_ciso646.h, include/c_std/std_climits.h, + include/c_std/std_clocale.h, include/c_std/std_cmath.h, + include/c_std/std_csetjmp.h, include/c_std/std_csignal.h, + include/c_std/std_cstdarg.h, include/c_std/std_cstddef.h, + include/c_std/std_cstdio.h, include/c_std/std_cstdlib.h, + include/c_std/std_cstring.h, include/c_std/std_ctime.h, + include/c_std/std_cwchar.h, include/c_std/std_cwctype.h, + include/ext/algorithm, include/ext/functional, include/ext/hash_map, + include/ext/hash_set, include/ext/iterator, include/ext/memory, + include/ext/numeric, include/ext/rb_tree, include/ext/rope, + include/ext/ropeimpl.h, include/ext/slist, include/ext/stl_hash_fun.h, + include/ext/stl_hashtable.h, include/ext/stl_rope.h, + include/std/std_algorithm.h, include/std/std_bitset.h, + include/std/std_complex.h, include/std/std_deque.h, + include/std/std_fstream.h, include/std/std_functional.h, + include/std/std_iomanip.h, include/std/std_ios.h, + include/std/std_iosfwd.h, include/std/std_iostream.h, + include/std/std_istream.h, include/std/std_iterator.h, + include/std/std_limits.h, include/std/std_list.h, + include/std/std_locale.h, include/std/std_map.h, + include/std/std_memory.h, include/std/std_numeric.h, + include/std/std_ostream.h, include/std/std_queue.h, + include/std/std_set.h, include/std/std_sstream.h, + include/std/std_stack.h, include/std/std_stdexcept.h, + include/std/std_streambuf.h, include/std/std_string.h, + include/std/std_utility.h, include/std/std_valarray.h, + include/std/std_vector.h: Add/correct @file doxygen hook. + + * include/ext/memory: Doxygenate most of rest of file. + * libsupc++/exception: Doxygen output formatting. + * libsupc++/new: Say which header it is. + + * testsuite/lib/libstdc++-v3-dg.exp: Fix spacing. + * docs/html/19_diagnostics/howto.html: Describe concept-checks switch. + * docs/html/23_containers/howto.html: Describe O(n) list::size(). + * docs/html/27_io/howto.html: Also link to Langer and Kreft text. + +2002-01-28 Paolo Carlini + Charles Leggett + + * testsuite/27_io/filebuf_members.cc (test_05): Add test. + +2002-01-28 Paolo Carlini + + * testsuite/27_io/ostream_inserter_arith.cc (test03): + Fix to deal correctly with both 32 bit and 64 bit architectures + +2002-01-25 Loren Rittle + + * testsuite/thread/pthread1.cc: Use one condition variable + per predicate instead of tricky use of one condition variable. + +2002-01-25 Benjamin Kosnik + + * include/bits/fstream.tcc (filebuf::close()): Fix close for input + streams. + (filebuf::_M_really_overflow): Match indeterminate and sync calls. + * testsuite/27_io/filebuf.cc: Compile only. + * testsuite/27_io/filebuf_members.cc: Move tests to here. + * testsuite/27_io/filebuf_virtuals.cc: And here. + Revert sungetc, sync changes for expected values. + * testsuite/27_io/filebuf-*: Move to... + * testsuite/27_io/filebuf_virtuals-*: ...here. + * testsuite/27_io/istream.cc: Compile only, activate. + * testsuite/27_io/ostream.cc: Same. + * testsuite/27_io/iostream.cc: New. + * testsuite/27_io/iostream_members.cc: New. + +2002-01-25 David Billinghurst + + * testsuite/thread/pthread1.cc: Enable on cygwin. + * testsuite/thread/pthread2.cc: Likewise. + * testsuite/thread/pthread3.cc: Likewise. + * testsuite/thread/pthread4.cc: Likewise. + * testsuite/thread/pthread5.cc: Likewise. + * testsuite/thread/pthread6.cc: Likewise. + +2002-01-24 Benjamin Kosnik + + * testsuite/27_io/ostream_inserter_char.cc (test07): New. + +2002-01-24 Benjamin Kosnik + + * include/bits/basic_ios.h (basic_ios::_M_check_facet): Make + const, tweak. + (basic_ios::fill(char_type)): Use fill(). + * include/bits/basic_ios.tcc (basic_ios::widen): Use _M_check_facet. + (basic_ios::narrow): Same. + (basic_ios::_M_cache_facets): Explicitly set cached facets to zero + if they are invalid. + (basic_ios::init): Comment. + * testsuite/27_io/ios_init.cc (test02): New. + +2002-01-24 Phil Edwards + + * include/bits/stl_tempbuf.h (_Temporary_buffer): Add doxygen hook. + * include/bits/stl_algo.h: Include stl_tempbuf.h. + * include/ext/memory: Do not include stl_tempbuf.h. + (temporary_buffer): Add doxygen hook. + (__get_temporary_buffer, get_temporary_buffer, + return_temporary_buffer): Move back to std:: header... + * include/std/std_memory.h: ...here. Do not include stl_tempbuf.h. + * include/ext/rope: Do not include stl_tempbuf.h. + * include/ext/stl_hashtable.h: Likewise. + * include/std/std_algorithm.h: Likewise. + * testsuite/20_util/temporary_buffer.cc: New file. + +2002-01-24 andrew@andypo.net + (tweaks, test and commit by Loren J. Rittle ) + + libstdc++/5432 + * include/bits/ios_base.h: Use _Atomic_word for reference counts. + * include/bits/localefwd.h: Likewise. + Also use for std::locale::id::_S_highwater. + * src/ios.cc (ios_base::xalloc): Use _Atomic_word. + * src/locale.cc: Support new usage of _Atomic_word. + (std::locale::classic): Guard entire function against reentry. + * src/localename.cc: Support new usage of _Atomic_word. + +2002-01-24 Benjamin Kosnik + + * testsuite/22_locale/num_put_members_wchar_t.cc (test03): Use + _GLIBCPP_HAVE_SETENV. + * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): Same. + * testsuite/22_locale/collate_members_char.cc (test02): Same. + * testsuite/22_locale/ctype_members_char.cc (test03): Same. + * testsuite/22_locale/ctype_members_wchar_t.cc (test03): Same. + * testsuite/22_locale/messages_members_char.cc (test02): Same. + * testsuite/22_locale/moneypunct_members_char.cc (test02): Same. + * testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): Same. + * testsuite/22_locale/money_put_members_char.cc (test04): Same. + * testsuite/22_locale/money_put_members_wchar_t.cc (test04): Same. + * testsuite/22_locale/num_get_members_char.cc (test03): Same. + * testsuite/22_locale/num_get_members_wchar_t.cc (test03): Same. + * testsuite/22_locale/numpunct_members_char.cc (test02): Same. + * testsuite/22_locale/numpunct_members_wchar_t.cc (test02): Same. + * testsuite/22_locale/time_get_members_char.cc (test07): Same. + * testsuite/22_locale/time_get_members_wchar_t.cc (test07): Same. + * testsuite/22_locale/time_put_members_char.cc (test03): Same. + * testsuite/22_locale/time_put_members_wchar_t.cc (test03): Same. + * testsuite/22_locale/num_put_members_char.cc (test03): Same. + * acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE): Check for setenv. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config.h.in: Regenerate. + +2002-01-23 Loren Rittle + + * testsuite/thread/pthread1.cc: New test. + * testsuite/thread/pthread2.cc: New test adapted from libstdc++/5347. + * testsuite/thread/pthread3.cc: Likewise. + * testsuite/thread/pthread4.cc: New test adapted from + http://gcc.gnu.org/ml/gcc-bugs/2002-01/msg00679.html + * testsuite/thread/pthread5.cc: New test adapted from libstdc++/5464. + * testsuite/thread/pthread6.cc: New test adapted from libstdc++/5444. + +2002-01-23 Richard Henderson + + PR libstdc++/5198 + * config/cpu/m68k/bits/atomicity.h (__exchange_and_add): Only use + CAS on the cpu variants that support it. Add versions that use + TAS and that disable interrupts. + (__atomic_add): Use __exchange_and_add to guarantee atomicity. + +2002-01-23 Matt Kraai + + * include/bits/locale_facets.tcc: Remove old comments. + +2002-01-23 Andreas Tobler + + * include/bits/locale_facets.tcc (__convert_to_v): Change template + parameter to _Tv. + (__convert_from_v): Same. + +2002-01-23 Benjamin Kosnik + + * include/bits/locale_facets.h (num_get::_M_extract_int): Change + prototype. + * include/bits/locale_facets.tcc (num_get::_M_extract_int): Remove + __max_digits checks, adjust arguments. + (num_get::do_get(*)): Changeup. + +2002-01-23 Loren Rittle + + * config/locale/c_locale_generic.cc: Fix typename usage. + +2002-01-22 Benjamin Kosnik + + * config/locale/c_locale_generic.cc: Fix. + +2002-01-22 Benjamin Kosnik + + * docs/html/22_locale/messages.html: Remove angle brackets. + * docs/html/17_intro/TODO: Add. + +2002-01-22 Paolo Carlini + + * testsuite/27_io/ios_manip_basefield.cc: Enable test02. + * testsuite/27_io/ostream_inserter_arith.cc: Enable test03. + * testsuite/27_io/ostream_inserter_char.cc: Enable test01. + * testsuite/27_io/ostream_inserter_other.cc: Enable test04. + +2002-01-22 Benjamin Kosnik + + Audit for LANG independence. + * include/bits/localefwd.h: Tweaks. + * include/bits/locale_facets.tcc (money_get::do_get(long double)): + Use __convert_to_v. + (time_get::do_get_year): Same. + (__convert_from_v): Add. + (num_put::_M_convert_float): Use. + (num_put::_M_convert_int): Same. + (money_put::do_put): Same. + + * src/locale-inst.cc: Add instantiations for __convert_from_v. + * config/locale/time_members_gnu.cc: Cleanup setlocale usage. + * config/locale/time_members_generic.cc: + * config/locale/messages_members_gnu.cc: Same. + * config/locale/messages_members_gnu.h: Same. + + * testsuite/22_locale/codecvt_members_wchar_t_char.cc (test02): New. + * testsuite/22_locale/codecvt_members_char_char.cc (test02): New. + * testsuite/22_locale/collate_members_wchar_t.cc (test02): New. + * testsuite/22_locale/collate_members_char.cc (test02): New. + * testsuite/22_locale/ctype_members_wchar_t.cc (test03): New. + * testsuite/22_locale/ctype_members_char.cc (test03): New. + * testsuite/22_locale/messages_members_char.cc (test02): New. + * testsuite/22_locale/moneypunct_members_wchar_t.cc (test02): New. + * testsuite/22_locale/moneypunct_members_char.cc (test02): New. + * testsuite/22_locale/money_get_members_wchar_t.cc (test04): New. + * testsuite/22_locale/money_get_members_char.cc (test04): New. + * testsuite/22_locale/money_put_members_wchar_t.cc (test04): New. + * testsuite/22_locale/money_put_members_char.cc (test04): New. + * testsuite/22_locale/numpunct_members_wchar_t.cc (test02): New. + * testsuite/22_locale/numpunct_members_char.cc (test02): New. + * testsuite/22_locale/time_put_members_wchar_t.cc (test03): New. + * testsuite/22_locale/time_put_members_char.cc (test03): New. + * testsuite/22_locale/time_get_members_wchar_t.cc (test07): New. + * testsuite/22_locale/time_get_members_char.cc (test07): New. + * testsuite/22_locale/num_get_members_wchar_t.cc (test03): New. + * testsuite/22_locale/num_get_members_char.cc (test03): New. + * testsuite/22_locale/num_put_members_wchar_t.cc (test03): New. + * testsuite/22_locale/num_put_members_char.cc (test03): New. + + * testsuite/22_locale/time_get_members_char.cc: Fixups for global + locale issues. + * testsuite/22_locale/time_get_members_char.cc: Same. + +2002-01-22 Benjamin Kosnik + + libstdc++/5280 + * include/bits/localefwd.h: Tweak comments. + * include/bits/locale_facets.h (__convert_to_v): Add. + * include/bits/locale_facets.tcc (num_get::do_get(double)): Use it. + (num_get::do_get(float)): Same. + (num_get::do_get(long double)): Same. + (num_get::do_get(bool)): Same. + (num_get::do_get(long)): Same. + (num_get::do_get(long long)): Same. + (num_get::do_get(unsigned int)): Same. + (num_get::do_get(unsigned short)): Same. + (num_get::do_get(unsigned long)): Same. + (num_get::do_get(unsigned long long)): Same. + * config/locale/c_locale_gnu.cc (__convert_to_v): Specialize. + * config/locale/c_locale_generic.cc: Same. + +2002-01-22 Loren Rittle + + * include/Makefile.am (c_base_builddir): Remove redundant slash. + (std_builddir): Likewise. + (std_headers_rename): Fix cut-n-paste typo. + (install-data-local): Concat path per element instead of once to + first element of list. + * include/Makefile.in: Rebuilt. + +2002-01-22 Benjamin Kosnik + + * config/os/aix/bits/ctype_noninline.h: Fix formatting. + * config/os/bsd/netbsd/bits/ctype_noninline.h: Fix typo. + * config/os/bsd/freebsd/bits/ctype_noninline.h: Fix formatting. + +2002-01-20 Benjamin Kosnik + + * include/bits/locale_facets.h (ctype::classic_table): + Remove definition. + (ctype::_S_ctable): Remove. + * config/os/gnu-linux/bits/ctype_noninline.h + (ctype::_S_table): Remove definition. + (ctype::classic_table): Define. + (ctype::ctype): Replace _S_ctable with classic_table(). + * config/os/aix/bits/ctype_noninline.h: Same. + * config/os/bsd/freebsd/bits/ctype_noninline.h: Same. + * config/os/bsd/netbsd/bits/ctype_noninline.h: Same. + * config/os/djgpp/bits/ctype_noninline.h: Same. + * config/os/generic/bits/ctype_noninline.h: Same. + * config/os/gnu-linux/bits/ctype_noninline.h: Same. + * config/os/hpux/bits/ctype_noninline.h: Same. + * config/os/irix/irix5.2/bits/ctype_noninline.h: Same. + * config/os/irix/irix6.5/bits/ctype_noninline.h: Same. + * config/os/mingw32/bits/ctype_noninline.h: Same. + * config/os/newlib/bits/ctype_noninline.h: Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. + * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. + +2002-01-20 Danny Smith + + * config/os/mingw32/bits/ctype_noninline.h: Declare _ctype instead + of _pctype. Use to define _S_ctable. Add definition for alternate + ctor. Initialise _M_ctable to _S_ctable in ctors. + (do_toupper, do_tolower): Use inline code appropriate for C-locale + rather than ::toupper, ::tolower. + +2002-01-18 Loren Rittle + + * testsuite/18_support/numeric_limits.cc (test_extrema): + Add specialization for FreeBSD systems only to avoid losing test + only due to extra precision unmentioned in system headers. + +2002-01-18 David Billinghurst + + * config/os/irix/irix6.5/bits/ctype_noninline.h: Fix typo + +2002-01-17 Nick Clifton + + * testsuite/testsuite_hooks.h: Fix comment typo. Memory + limiting is only attempted if _GLIBCPP_MEM_LIMIT is defined. + +2002-01-17 Peter Schmid + + * testsuite/22_locale/ctor_copy_dtor.cc: Remove check. + +2002-01-17 David Edelsohn + + * configure.target: Define OPT_LDFLAGS for AIX case. + +2002-01-17 Gabriel Dos Reis + + * include/std/std_limits.h (__glibcpp_float_has_quiet_NaN, + __glibcpp_double_has_quiet_NaN): Correct mispelling. + +2002-01-17 Andreas Tobler + + * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Fix. + +2002-01-16 David Edelsohn + + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Do not clear + SECTION_LDFLAGS and OPT_LDFLAGS. Fix ac_sectionLDflags type. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2002-01-16 Benjamin Kosnik + + * include/Makefile.am (c_base_headers_rename): New. + (c_base_headers_extra): New. + (stamp-c_base): Modify. + (install-data-local): Use both. + * include/Makefile.in: Regenerate. + * include/c/[cctype ciso646 cmath cstdarg cstdlib cerrno climits + csetjmp cstddef cstring cwchar cassert cfloat clocale csignal + cstdio ctime cwctype]: Move to.. + * include/c/std_*: Here. + * include/c_std/[cctype ciso646 cmath cstdarg cstdlib cerrno climits + csetjmp cstddef cstring cwchar cassert cfloat clocale csignal + cstdio ctime cwctype]: Move to.. + * include/c_std/std_*: Here. + + Alexandre Oliva + * include/Makefile.am (.PRECIOUS): Add rule. + * include/Makefile.in: Regenerate. + +2002-01-16 Benjamin Kosnik + Peter Schmid + + * include/bits/stl_iterator.h (reverse_iterator::_M_current): + Deuglify, should be current. + (back_insert_iterator::_M_container): Deuglify, should be container. + (front_insert_iterator::_M_container): Same. + (insert_iterator::_M_container): Same. + * testsuite/24_iterators/reverse_iterator.cc: Add check. + * testsuite/24_iterators/back_insert_iterator.cc: Add check. + * testsuite/24_iterators/front_insert_iterator.cc: Same. + * testsuite/24_iterators/insert_iterator.cc: Same. + +2002-01-16 Benjamin Kosnik + + * include/bits/locale_facets.h (ctype::classic_table): Make + static. + (ctype::_M_ctable): Make static, change name to _S_ctable. + * config/os/gnu-linux/bits/ctype_noninline.h: Define _S_ctable. + * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Same. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h: Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h: Same. + * config/os/newlib/bits/ctype_noninline.h: Same. + * config/os/irix/irix6.5/bits/ctype_noninline.h: Same. + * config/os/irix/irix5.2/bits/ctype_noninline.h: Same. + * config/os/hpux/bits/ctype_noninline.h: Same. + * config/os/djgpp/bits/ctype_noninline.h: Same. + * config/os/bsd/netbsd/bits/ctype_noninline.h: Same. + * config/os/bsd/freebsd/bits/ctype_noninline.h: Same. + * config/os/aix/bits/ctype_noninline.h: Same. + + Testcase by Dietmar Kühl via Peter Schmid + * testsuite/22_locale/ctype_members_char.cc (char>): Add test for + classic_table(). + +2002-01-16 Benjamin Kosnik + + * libmath/signbitl.c: Copyright years as list, not range. + * libmath/Makefile.am: Same. + * libmath/Makefie.in: Regenerate. + * libmath/signbit.c: Same. + * libmath/nan.c: Same. + * libmath/copysignf.c: Same. + * libmath/signbitf.c: Same. + * testsuite/22_locale/money_get_members_char.cc: Same. + * testsuite/22_locale/money_get_members_wchar_t.cc: Same. + * testsuite/22_locale/money_put_members_char.cc: Same. + * testsuite/22_locale/money_put_members_wchar_t.cc: Same. + * testsuite/22_locale/time_get_members_char.cc: Same. + * testsuite/22_locale/time_get_members_wchar_t.cc: Same. + * testsuite/22_locale/time_put_members_char.cc: Same. + * testsuite/22_locale/time_put_members_wchar_t.cc: Same. + * testsuite/21_strings/nonmember.cc: Same. + * testsuite/21_strings/compare.cc: Same. + * testsuite/27_io/stringstream.cc: Same. + * testsuite/27_io/stringbuf.cc: Same. + * testsuite/27_io/filebuf.cc: Same. + * testsuite/27_io/ios_manip_basefield.cc: Same. + * testsuite/27_io/ios_manip_fmtflags.cc: Same. + * include/bits/cpp_type_traits.h: Same. + * include/bits/generic_shadow.h: Same. + * include/bits/gslice_array.h: Same. + * include/bits/gslice.h: Same. + * include/bits/indirect_array.h: Same. + * include/bits/slice_array.h: Same. + * include/bits/sstream.tcc: Same. + * include/bits/streambuf_iterator.h: Same. + * include/bits/valarray_array.tcc: Same. + * include/bits/valarray_meta.h: Same. + * include/bits/valarray_array.h: Same. + * config/os/mingw32/bits/ctype_noninline.h: Same. + * config/os/mingw32/bits/ctype_base.h: Same. + * config/os/hpux/bits/ctype_noninline.h: Same. + * config/os/hpux/bits/ctype_base.h: Same. + * config/os/gnu-linux/bits/ctype_noninline.h: Same. + * config/os/gnu-linux/bits/ctype_base.h: Same. + * config/os/generic/bits/ctype_noninline.h: Same. + * config/os/generic/bits/ctype_base.h: Same. + + * libsupc++/tinfo.h: Tweaks. + +2002-01-15 Benjamin Kosnik + + * testsuite/22_locale/num_put_members_wchar_t.cc (test02): Same. + * testsuite/22_locale/num_put_members_char.cc (test01): Tweak. + * testsuite/22_locale/ctype_members_char.cc: Tweak. + +2002-01-15 Benjamin Kosnik + + * include/bits/locale_facets.tcc (num_put::do_put(bool): Fix. + (num_put::do_put(void*)): Fix. + * testsuite/22_locale/num_put_members_char.cc (test02): Add. + * testsuite/22_locale/num_put_members_wchar_t.cc (test02): Add. + * testsuite/22_locale/num_get_members_char.cc (test02): Add + long double, void, bool types. + * testsuite/22_locale/num_get_members_wchar_t.cc (test02): Add. + +2002-01-15 Benjamin Kosnik + Alexandre Oliva + + * libmath/Makefile.am (LINK): Add --tag CC. + * libmath/Makefile.in: Regenerate. + +2002-01-15 John David Anglin + + * config/os/hpux/bits/ctype_noninline.h: Use __SB_masks for address + of character to attribute mapping table. + +2002-01-15 David Billinghurst + + * testsuite/26_numerics/c99_classification_macros_c.cc + Remove dg-error and dg-excess-errors comments. + +2002-01-14 Benjamin Kosnik + + * include/bits/locale_facets.tcc (time_put::put): Correct output + iterator positions. + * testsuite/22_locale/time_put_members_char.cc (test02): Add. + * testsuite/22_locale/time_put_members_wchar_t.cc (test02): Add. + * testsuite/22_locale/time_get_members_wchar_t.cc (test06): Add. + * testsuite/22_locale/time_get_members_char.cc (test06): Add. + +2002-01-14 Craig Rodrigues + + * docs/html/17_intro/porting-howto.xml: Update filebuf section. + +2002-01-14 Paolo Carlini + Nathan Myers + + * include/bits/basic_string.h + (replace(__pos, __n1, __s, __n2)): Optimize by avoiding + temporaries (i.e., call _M_replace_safe) when possible. + (replace(__pos, __n, __str)): Call replace(__pos, __n1, __s, __n2). + (replace(__pos, __n1, __s)): Call replace(__pos, __n1, __s , __n2). + (replace(__i1, __i2, __str)): Call replace(__i1, __i2, __s, __n). + (replace(__i1, __i2, __s)): Call replace(__i1, __i2, __s, __n). + (replace(__i1, __i2, __s, __n)): Call replace(__pos1, __n1, __s, __n2). + * include/bits/basic_string.tcc + (replace(__pos1, __n1, __str, __pos2, __n2)): Call + replace(__pos, __n1, __s, __n2). + * testsuite/21_strings/replace.cc (test03): New testcases. + + * include/bits/basic_string.h (insert(__pos, __s, __n)): + Adjust comparison wrt overflow. + +2002-01-12 Benjamin Kosnik + + * include/Makefile.am (std_headers_rename): New variable. + (install-data-local): Use it. + * include/Makefile.in: Regenerate. + +2002-01-12 Benjamin Kosnik + + * include/bits/locale_facets.tcc (money_put::do_put(string): + Correct output iterator value. + * testsuite/22_locale/money_put_members_char.cc (test03): Add. + * testsuite/22_locale/money_put_members_wchar_t.cc: Same. + +2002-01-11 Phil Edwards + + * include/Makefile.am, include/Makefile.in (stamp-std): Fix typo from + previous commit. + +2002-01-11 Phil Edwards + + * include/Makefile.am (std_headers): Update list with new names. + (stamp-std): Link to standardized name. + * include/Makefile.in: Regenerate. + + * include/std/algorithm, include/std/bitset, include/std/complex, + include/std/deque, include/std/fstream, include/std/functional, + include/std/iomanip, include/std/ios, include/std/iosfwd, + include/std/iostream, include/std/istream, include/std/iterator, + include/std/limits, include/std/list, include/std/locale, + include/std/map, include/std/memory, include/std/numeric, + include/std/ostream, include/std/queue, include/std/set, + include/std/sstream, include/std/stack, include/std/stdexcept, + include/std/streambuf, include/std/string, include/std/utility, + include/std/valarray, include/std/vector: Rename to... + + * include/std/std_algorithm.h, include/std/std_bitset.h, + include/std/std_complex.h, include/std/std_deque.h, + include/std/std_fstream.h, include/std/std_functional.h, + include/std/std_iomanip.h, include/std/std_ios.h, + include/std/std_iosfwd.h, include/std/std_iostream.h, + include/std/std_istream.h, include/std/std_iterator.h, + include/std/std_limits.h, include/std/std_list.h, + include/std/std_locale.h, include/std/std_map.h, + include/std/std_memory.h, include/std/std_numeric.h, + include/std/std_ostream.h, include/std/std_queue.h, + include/std/std_set.h, include/std/std_sstream.h, + include/std/std_stack.h, include/std/std_stdexcept.h, + include/std/std_streambuf.h, include/std/std_string.h, + include/std/std_utility.h, include/std/std_valarray.h, + include/std/std_vector.h: ...this. + +2002-01-11 Loren Rittle + + * include/Makefile.am (extra_target_headers): New list of all + target files built with ad hoc naming rules. + (stamp-*): Handle LN_S failure in manner portable across make + implementations. + (install-data-local): Install header files from human-maintained + file lists and directory components instead of non-robust find. + * include/Makefile.in: Rebuilt. + +2002-01-11 Benjamin Kosnik + + * include/bits/locale_facets.tcc (money_get::do_get(string)): + Check for zero-length negative sign before adding it to output + string. + (money_get::do_get(long double)): Return beg. + * testsuite/22_locale/money_get_members_char.cc (test02): Add + iterator checks. + * testsuite/22_locale/money_get_members_wchar_t.cc: Same. + +2002-01-10 David Seymour + + libstdc++/5331 + * include/bits/locale_facets.h (num_get<>): Return advanced iterator + for _M_extract_float and _M_extract_int + * include/bits/locale_facets.tcc (num_get<>::_M_extract_float) + (num_get<>::_M_extract_int): Likewise, all callers changed + * testsuite/22_locale/num_get_members_char.cc: Testcase + +2002-01-09 Paolo Carlini + + * libsupc++/exception (bad_exception): Add comment. + * libsupc++/new (bad_alloc): Same. + * libsupc++/typeinfo (bad_cast, bad_typeid): Same. + +2002-01-09 Paolo Carlini + + libstdc++/3150: revert 2001-11-30 commit. DR266 only means + that the destructors should be removed from the descriptions + in the standard: writing them explicitly allows the vtable + heuristic to work. For additional information see: + http://gcc.gnu.org/ml/libstdc++/2002-01/msg00090.html + http://gcc.gnu.org/ml/libstdc++/2002-01/msg00110.html + http://gcc.gnu.org/ml/libstdc++/2002-01/msg00155.html + * libsupc++/exception (bad_exception::~bad_exception()): + Reintroduce declaration. + * libsupc++/new (bad_alloc::~bad_alloc()): Same. + * libsupc++/typeinfo (bad_cast::~bad_cast()): Same. + (bad_typeid::~bad_typeid()): Same. + * libsupc++/eh_exception.cc (bad_exception::~bad_exception()): + Reintroduce definition. + * libsupc++/new_handler.cc (bad_alloc::~bad_alloc()): Same. + * libsupc++/tinfo.cc (bad_cast::~bad_cast()): Same. + (bad_typeid::~bad_typeid()): Same. + +2002-01-09 Benjamin Kosnik + + * include/Makefile.am (c_base_srcdir): Remove duplicate '/'. + * include/Makefile.in: Regenerate. + +2002-01-09 Bo Thorsen + + * config/cpu/x86-64/bits/cpu_limits.h (__glibcpp_long_bits): Add + definition. + +2002-01-08 Benjamin Kosnik + + libstdc++/2913 + libstdc++/4879 + * include/bits/fstream.tcc (filebuf::_M_really_overflow): Test + return value of _M_file->sync(). + (filebuf::showmanyc): Check for is_open. + * include/std/fstream (filebuf::sync): Tweak. + * testsuite/27_io/filebuf.cc: Tweak. + +2002-01-08 John Fardo + Brad Garcia + + * testsuite/27_io/filebuf_members.cc: Add test. + +2002-01-07 Benjamin Kosnik + Craig Rodrigues + + libstdc++/5174 + * po/Makefile.am (mkinstalldirs): Add. + * po/Makefile.in: Regenerate. + +2002-01-07 David Billinghurst + + * testsuite_flags.in: Add -fmessage-length=0 to CXXFLAGS * + testsuite/lib/prune.exp: Delete lines ":In function ..." from + compiler output. + * testsuite/23_containers/map_operators.cc: Remove + dg-excess-errors comment. + * testsuite/23_containers/set_operators.cc: Likewise. + +2002-01-06 Paolo Carlini + + * include/bits/stl_function.h: Remove two lines of comments; + adjust copyright years. + +2002-01-04 Benjamin Kosnik + + * include/Makefile.am (std_headers): Remove cXXX from list. + (c_base_srcdir): No bits subdirectory. + (c_base_builddir): Same. + (c_base_headers): Adjust names, add ciso646. + (bits_headers): Remove std_xxx.h headers. + * include/Makefile.in: Regenerate. + + * include/ext/iterator: Adjust includes. + * include/ext/ropeimpl.h: Same. + * include/ext/stl_hash_fun.h: Same. + * include/ext/algorithm: Same. + + * include/backward/bvector.h: Adjust includes. + * include/backward/vector.h: Same. + * include/backward/strstream: Same. + * include/backward/streambuf.h: Same. + * include/backward/stack.h: Same. + * include/backward/set.h: Same. + * include/backward/queue.h: Same. + * include/backward/multiset.h: Same. + * include/backward/multimap.h: Same. + * include/backward/map.h: Same. + * include/backward/list.h: Same. + * include/backward/iterator.h: Same. + * include/backward/iostream.h: Same. + * include/backward/iomanip.h: Same. + * include/backward/fstream.h: Same. + * include/backward/deque.h: Same. + * include/backward/complex.h: Same. + + * include/bits/std_algorithm.h: Move to... + * include/std/algorithm: ...here. + * include/bits/std_iosfwd.h, std_locale.h, std_stack.h, + std_bitset.h, std_ios.h, std_map.h, std_stdexcept.h, + std_complex.h, std_iostream.h, std_memory.h, std_streambuf.h, + std_deque.h, std_istream.h, std_numeric.h, std_string.h, + std_fstream.h, std_ostream.h, std_utility.h, std_iterator.h, + std_queue.h, std_valarray.h, std_functional.h, std_limits.h, + std_set.h, std_vector.h, std_iomanip.h, std_list.h, std_sstream.h: + Same. + + * include/c_std/bits/std_cassert.h: Move to... + * include/c_std/cassert: Here. + * include/c_std/std_cctype.h, std_cerrno.h, std_cfloat.h, + std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, + std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, + std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, + std_cwctype.h: Same. + * include/c_std/cmath: Adjust cmath.tcc include. + * include/c_std/cstdlib: Adjust includes. + * include/c_std/cwchar: Same. + * include/c_std/ctime: Same. + * include/c_std/cstring: Same. + * include/c_std/cstdio: Same. + * include/c_std/bits: Remove directory. + + * include/c/bits/std_cassert.h: Move to... + * include/c/cassert: Here. + * include/c/std_cctype.h, std_cerrno.h, std_cfloat.h, + std_climits.h, std_clocale.h, std_cmath.h, std_csetjmp.h, + std_csignal.h, std_cstdarg.h, std_cstddef.h, std_cstdio.h, + std_cstdlib.h, std_cstring.h, std_ctime.h, std_cwchar.h, + std_cwctype.h: Same. + * include/c/bits: Remove directory. + + * include/std/cwctype: Remove. + * include/std/cwchar: Remove. + * include/std/ctime: Remove. + * include/std/cstring: Remove. + * include/std/cstdlib: Remove. + * include/std/cstdio: Remove. + * include/std/cstddef: Remove. + * include/std/cstdarg: Remove. + * include/std/csignal: Remove. + * include/std/csetjmp: Remove. + * include/std/cmath: Remove. + * include/std/clocale: Remove. + * include/std/climits: Remove. + * include/std/ciso646: Remove. + * include/std/cfloat: Remove. + * include/std/cerrno: Remove. + * include/std/cctype: Remove. + * include/std/cassert: Remove. + + * include/bits/fpos.h: Adjust includes, removing + files and subsituting . + * include/bits/valarray_array.h: Same. + * include/bits/stl_uninitialized.h: Same. + * include/bits/stl_alloc.h: Same. + * include/bits/stl_algobase.h: Same. + * include/bits/sstream.tcc: Same. + * include/bits/pthread_allocimpl.h: Same. + * include/bits/ostream.tcc: Same. + * include/bits/localefwd.h: Same. + * include/bits/locale_facets.tcc: Same. + * include/bits/locale_facets.h: Same. + * include/bits/istream.tcc: Same. + * include/bits/char_traits.h: Same. + * include/bits/boost_concept_check.h: Same. + * include/bits/basic_file.h: Same. + * include/std/bitset: Same. + * include/std/complex: Same. + * include/std/fstream: Same. + * include/std/functional: Same. + * include/std/ios: Same. + * include/std/iostream: Same. + * include/std/ostream: Same. + * include/std/sstream: Same. + * include/std/streambuf: Same. + * include/std/string: Same. + * include/std/iterator: Same. + * include/std/valarray: Same. + + * src/ios.cc: Adjust includes. + * src/valarray-inst.cc: Same. + * src/string-inst.cc: Same. + * src/stl-inst.cc: Same. + * src/stdexcept.cc: Same. + * src/misc-inst.cc: Same. + * src/localename.cc: Same. + * src/locale-inst.cc: Same. + * src/locale.cc: Same. + * src/limits.cc: Same. + * src/concept-inst.cc: Same. + * src/complex_io.cc: Same. + * src/codecvt.cc: Same. + * src/bitset.cc: Same. + * src/cmath.cc: Same. + +2002-01-04 Paolo Carlini + + * include/bits/stl_tree.h (rb_tree): Move to... + * include/ext/rb_tree: ...here, new file. + * include/Makefile.am (ext_headers): Add new file. + * include/Makefile.in: Regenerate. + * include/bits/stl_tempbuf.h (get_temporary_buffer + helper, + return_temporary_buffer, struct temporary_buffer): Move to... + * include/ext/memory: ...here. + * testsuite/ext/headers.cc: Include . + * include/backward/tempbuf.h: Include , tweak. + * include/backward/tree.h: Include + + * include/bits/stl_numeric.h (power + helpers, iota): Move to... + * include/ext/numeric: ...here, new file. + * include/bits/stl_function.h (identity_element, unary_compose, + binary_compose, compose1, compose2, identity, select1st, + select2nd, project1st + helper, project2nd + helper, + constant_void_fun + helper, constant_unary_fun + helper, + costant_binary_fun + helper, constant0, constant1, constant2, + subtractive_rng, mem_fun1, mem_fun1_ref): Move to... + * include/ext/functional: ...here, new file. + * include/Makefile.am (ext_headers): Add new files. + * include/Makefile.in: Regenerate. + * testsuite/ext/headers.cc: Include and + . + * include/backward/algo.h: Include , tweak. + * include/backward/function.h: Include , tweak. + * include/ext/ropeimpl.h: Include . + +2002-01-03 Jeffrey A Law + + * config/os/hpux/bits/os_defines.h: Prefix __strtoll and + __strtoull declarations with __extension__. + +2002-01-03 David Billinghurst + + * testsuite/lib/prune.exp: Correct regular expression for + -ffunction-sections + +2002-01-02 Phil Edwards + + * include/bits/stl_algo.h (upper_bound, equal_range, binary_search): + Change concept checks, as with lower_bound and PR 2054. + * testsuite/ext/concept_checks.cc: Expand test to include those. + +2002-01-02 Phil Edwards + + * include/bits/boost_concept_check.h: Import some changes from + upsteam (Boost) version. + +2002-01-02 Paolo Carlini + + * include/bits/stl_algobase.h (copy_n + helpers, + lexicographical_compare_3way + helpers): Move to... + * include/ext/algorithm: ...here. + * include/bits/stl_uninitialized.h (uninitialized_copy_n + + helpers): Move to... + * include/ext/memory: ...here, new file. + * include/Makefile.am (ext_headers): Add new file. + * include/Makefile.in: Regenerate. + * testsuite/ext/headers.cc: Include . + * include/backward/algobase.h: Include and + , tweak. + * include/ext/ropeimpl.h: Include , tweak. + * include/ext/stl_rope.h: Include , tweak. + +2002-01-01 Roger Sayle + + * libmath/stubs.c (sinf,cosf): Implement stubs to enable the + equivalent ___builtin__ versions. + + * include/c_shadow/bits/std_cmath.h: All __builtin math functions + are available in libstdc++ as the necessary stub implementations + are provided by libmath/stubs.c. + +2002-01-01 Jason Thorpe + + * configure.in: Add support for NetBSD cross compiles. + * configure: Regenerate. diff --git a/contrib/libstdc++/ChangeLog-2000 b/contrib/libstdc++/ChangeLog-2000 new file mode 100644 index 0000000..d21b530 --- /dev/null +++ b/contrib/libstdc++/ChangeLog-2000 @@ -0,0 +1,10130 @@ +2000-12-31 Alexandre Oliva + + * include/c_std/bits/std_cstdlib.h (mblen): Protect against macro. + +2000-12-23 Benjamin Kosnik + + * src/Makefile.am (CSTD_INCLUDES): Change from CSHADOW_INCLUDES. + (strstream.cc): Add special rule for deprecated files. + * libsupc++/Makefile.am (INCLUDES): Sync. + * acinclude.m4 (GLIBCPP_EXPORT_INCLUDES): And here. + + Reported by Fred Fish + * include/backward/iomanip.h: Remove backward from include + * include/backward/strstream.h: Same. + * include/backward/stream.h: Same. + * include/backward/ostream.h: Same. + * include/backward/istream.h: Same. + * src/strstream.cc: And here. + + Reported by Brad Garcia + * src/string-inst.cc (_S_find): Use generic template. + * include/bits/string.tcc (_S_find): Remove specializations + +2000-12-22 Benjamin Kosnik + + Attempt to make locale visible in gdb. + * include/bits/std_locale.h: Remove codecvt.h include. + * include/bits/locale_facets.h: Add here, after ctype decls. + * include/bits/codecvt.h: Remove std namespace, as assumed to be + in std now. + + * include/bits/locale_facets.h: Consistently move generic static + member definitions directly after generic facet declarations. + * include/bits/locale_facets.tcc: From here. + + * src/locale.cc: Organize locale::id static definitions for + required facets. + * src/codecvt.cc (codecvt): Remove locale::id definition. + (codecvt): Same. + * src/localename: And here. + + * include/bits/localefwd.h (_Count_ones): Change _S_count to _M_count. + Same for _M_halfcount. + +2000-12-22 Alexandre Oliva + + * mknumeric_limits: Output to temporary files, and rename them at + the end. + +2000-12-21 Benjamin Kosnik + + * configure.in: Change GLIBCPP_ENABLE_SHADOW to + GLIBCPP_ENABLE_CHEADERS. + * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to + ENABLE_CHEADERS. C_INCLUDE_DIR defaults to c_std from c. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * include/c: Move to ... + * include/c_std: ...here. + * include/c_std: Move to ... + * include/c_shadow: ...here. + * include/c: Repopulate, with simple headers. + * docs/html/configopts.html: Adjust docs. + +2000-12-21 Joseph S. Myers + + * acinclude.m4, configure.in, mkcheck.in, + testsuite/21_strings/ctor_copy_dtor.cc, + testsuite/21_strings/inserters_extractors.cc, + testsuite/23_containers/map_operators.cc, + testsuite/23_containers/vector_element_access.cc, + testsuite/25_algorithms/lower_bound.cc, + testsuite/27_io/ifstream_members.cc, + testsuite/27_io/istream_extractor_arith.cc, + testsuite/27_io/istream_unformatted.cc, + testsuite/27_io/ofstream_members.cc, + testsuite/27_io/ostream_inserter_char.cc, + testsuite/27_io/ostream_inserter_other.cc, + testsuite/27_io/ostream_manip.cc, testsuite/27_io/streambuf.cc: + Change sourceware.cygnus.com and sources.redhat.com URLs for + libstdc++ web pages and list archives to point to gcc.gnu.org + * aclocal.m4, configure: Regenerate. + +2000-12-21 Gabriel Dos Reis + + * src/Makefile.am (sources): Remove complex.cc, complexf.cc and + complexl.cc from list. + * src/Makefile.in: Regenerate. + * src/complex.cc: Remove. + * src/complexf.cc: Likewise. + * src/complexl.cc: Likewise. + + * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove csqrtl.c + (EXTRA_DIST): Remove csqrt.c and csqrtf.c. + * libmath/Makefile.in: Regenerate. + * libmath/complex-stub.h: Remove. + * libmath/csqrt.c: Likewise. + * libmath/sqrtf.c: Likewise. + * libmath/sqrtl.c: Likewise. + * libmath/mathconf.h: Remove and "complex-stub.h" + #inclusion. + + * include/bits/std_complex.h (sqrt<>): Define primary template. + (complex<>): Remove sqrt friend declarations. + + * configure.in: Initialize with src/ios.cc. + * configure: Regenerate. + * acinclude.m4: Remove check for csqrt* and + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * Makefile.in: Regenerate. + +2000-12-20 Phil Edwards + + * acinclude.m4 (SECTION_FLAGS, OPT_LDFLAGS): Fix minor thinko. + * aclocal.m4: Regenerate. + * configure: Ditto. + * Makefile.in: Ditto. + * libio/Makefile.in: Ditto. + * libmath/Makefile.in: Ditto. + * libsupc++/Makefile.in: Ditto. + * src/Makefile.in: Ditto. + + * include/bits/istream.tcc: Fix clause reference in comment. + +2000-12-20 Benjamin Kosnik + + * testsuite/17_intro/headers_c.cc (main): New file. + + * acinclude.m4 (SECTION_FLAGS): Only set if --enable-debug is not + passed. + (OPT_LDFLAGS): And here. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-12-19 Curtis Janssen + + * src/ios.cc (ios_base::_M_grow_words(int ix)): Fix libstdc++/1089. + * testsuite/27_io/ios_base_storage.cc (test01): New file. + +2000-12-19 Benjamin Kosnik + + * configure.in: Don't turn on long long by default. + (gxx_target_include_dir): Adjuse comment. + * configure: Regenerate. + * include/c/bits/std_cstdio.h: Remove c++config.h include. + * src/locale.cc: Formatting tweaks. + * testsuite/22_locale/ctype.cc (char): Provide + member functions. + +2000-12-19 Loren J. Rittle + + * testsuite/22_locale/ctype.cc (test01): Correct ~ operator usage. + +2000-12-19 Mark Kettenis + + * configure.target: Support the Hurd. + +2000-12-19 Benjamin Kosnik + + * config/os/solaris/solaris2.5/bits/ctype_inline.h (is): Same. + * config/os/solaris/solaris2.6/bits/ctype_inline.h (is): Same. + * config/os/solaris/solaris2.7/bits/ctype_inline.h (is): Same. + * config/os/newlib/bits/ctype_inline.h (is): Same. + * config/os/irix/bits/ctype_inline.h (is): Same. + * config/os/bsd/netbsd/bits/ctype_inline.h (is): Same. + * config/os/bsd/freebsd/bits/ctype_inline.h (is): Same. + * config/os/aix/bits/ctype_inline.h (is): Same. + * config/os/gnu-linux/bits/ctype_inline.h (is): Revert. + * config/os/generic/bits/ctype_inline.h (is): Non-table based + implementation. + + * testsuite/22_locale/ctype_char_members.cc (test01): Use binary + operator correctly. + (test01): Check 'A' for alnum, upper, alpha. + +2000-12-19 Gabriel Dos Reis + + * include/bits/std_complex.h (complex::operator-=): Fix + thinko. + +2000-12-18 Benjamin Kosnik + + * configure.in: Set os_include_dir for cross_compiles. + * configure: Regenerate. + * configure.target (l_glibcpp_cxxflags): Don't try to be clever + when assigning ATOMICITYH. Only special case the special cases... + +2000-12-18 Joseph S. Myers + + * docs/html/17_intro/COPYING: Update to current + ftp://ftp.gnu.org/pub/gnu/Licenses/COPYING-2.0 (fixes references + to 19yy as example year in copyright notice). + +2000-12-15 Benjamin Kosnik + + * configure.in (gxx_target_include_dir): Install target-dependent + include files in a target-dependent place. + * configure: Regenerate. + * src/Makefile.am: Add in support here. + * src/Makefile.in: Regenerate. + +2000-12-14 Benjamin Kosnik + + * src/Makefile.am (myinstallheaders): Install backwards headers in + prefix, not prefix/backward. + * src/Makefile.in: Regenerate. + +2000-12-14 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Revert changes + touching copysignf, atan2f, expf. + (GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT): Add it back here. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-12-14 Benjamin Kosnik + + * configure.in (CXX): Exit out if mknumeric_limits fails. + * mknumeric_limits (CXX): Use BUILD_DIR/g++, not g++ in + path. Consistency with tests_flags.in. + +2000-12-14 Benjamin Kosnik + + * include/c/bits/*.h: Remove include_next, replace with include, + as include_next does not work host-x-host, and include_next not + necessary. + +2000-12-13 Benjamin Kosnik + + * include/bits/locale_facets.h (ctype): Remove throw specs not in + base class signature. + * config/os/*/bits/ctype_inline.h (is): Same. + +2000-12-13 Benjamin Kosnik + + * config/os/generic/bits/ctype_base.h (ctype_base): Consistency + with linux. + * config/os/generic/bits/ctype_inline.h (is): Same. + * config/os/solaris/solaris2.5/bits/ctype_inline.h (is): Same. + * config/os/solaris/solaris2.5/bits/ctype_base.h: Same. + * config/os/solaris/solaris2.6/bits/ctype_inline.h (is): Same. + * config/os/solaris/solaris2.6/bits/ctype_base.h: Same. + * config/os/solaris/solaris2.7/bits/ctype_inline.h (is): Same. + * config/os/solaris/solaris2.7/bits/ctype_base.h: Same. + * config/os/irix/bits/ctype_inline.h (is): Same. + * config/os/irix/bits/ctype_base.h (ctype_base): Same. + * config/os/aix/bits/ctype_inline.h (is): Same. + * config/os/aix/bits/ctype_base.h (ctype_base): Same. + * config/os/bsd/netbsd/bits/ctype_inline.h (is): Same. + * config/os/bsd/netbsd/bits/ctype_base.h (ctype_base): Same. + * config/os/bsd/freebsd/bits/ctype_base.h (ctype_base): Same. + * config/os/bsd/freebsd/bits/ctype_inline.h (is): Same. + * config/os/newlib/bits/ctype_inline.h (is): Same. + * config/os/newlib/bits/ctype_base.h (ctype_base): Same. + + * testsuite/22_locale/ctype_char_members.cc (test01): Add tests, fix. + * testsuite/22_locale/ctype.cc (test01): Add tests for + ctype_base::mask bitmask features. + * src/locale.cc: Define const static data for ctype_base. + * config/os/gnu-linux/bits/ctype_base.h (ctype_base): Make + ctype_base::mask type an integer type, not an enum. + * config/os/gnu-linux/bits/ctype_inline.h (is): Implement correctly. + * include/bits/locale_facets.h: Tweaks. + + * include/bits/ios_base.h: Formatting tweaks. + + * docs/html/17_intro/C++STYLE: Add. + +2000-12-12 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Don't link ctype + files here... + * configure.in: Rather, do it once for all targets here. Clean up + canadian cross and cross compile targets for linux-targeted + crosses. + * configure: Regenerate. + * aclocal.m4: Regnerate. + * acconfig.h: Add more defines. + * config.h.in: Regenerate. + +2000-12-12 Angela Marie Thomas + + * configure.in: Fix case for host-x-linux + * configure: Regenerate. + +2000-12-10 Alexandre Petit-Bianco + + * src/Makefile.am (libstdc++.INC:): 2000-12-05 reverted to include + 2000-11-12 hunk. + * src/Makefile.in: Rebuilt. + +2000-12-09 Jason Merrill + + * testsuite/20_util/auto_ptr.cc (test07): Remove test that tries + to copy-initialize an auto_ptr from an auto_ptr; it + isn't supposed to work anymore. + +2000-12-09 Phil Edwards + + Move the HTML-containing subdirs from 'docs' to 'docs/html'. + * README: Update the locations of instructions. + * docs/doxygen/run_doxygen: New file, stub. + + * docs/Makefile: Moved... + * docs/configopts.html: Likewise. + * docs/documentation.html: Likewise. + * docs/install.html: Likewise. + * docs/lib3styles.css: Likewise. + * docs/17_intro/BADNAMES: Likewise. + * docs/17_intro/BUGS: Likewise. + * docs/17_intro/C++STYLE: Likewise. + * docs/17_intro/CHECKLIST: Likewise. + * docs/17_intro/COPYING: Likewise. + * docs/17_intro/DESIGN: Likewise. + * docs/17_intro/HEADER_POLICY: Likewise. + * docs/17_intro/PROBLEMS: Likewise. + * docs/17_intro/RELEASE-NOTES: Likewise. + * docs/17_intro/TODO: Likewise. + * docs/17_intro/contribute.html: Likewise. + * docs/17_intro/headers_cc.txt: Likewise. + * docs/17_intro/howto.html: Likewise. + * docs/17_intro/libstdc++-assign.txt: Likewise. + * docs/17_intro/organization: Likewise. + * docs/17_intro/porting-howto.html: Likewise. + * docs/18_support/howto.html: Likewise. + * docs/19_diagnostics/howto.html: Likewise. + * docs/20_util/howto.html: Likewise. + * docs/21_strings/gotw29a.txt: Likewise. + * docs/21_strings/howto.html: Likewise. + * docs/21_strings/stringtok_h.txt: Likewise. + * docs/21_strings/stringtok_std_h.txt: Likewise. + * docs/22_locale/codecvt.html: Likewise. + * docs/22_locale/ctype.html: Likewise. + * docs/22_locale/howto.html: Likewise. + * docs/22_locale/locale.html: Likewise. + * docs/23_containers/howto.html: Likewise. + * docs/23_containers/wrappers_h.txt: Likewise. + * docs/24_iterators/howto.html: Likewise. + * docs/25_algorithms/howto.html: Likewise. + * docs/26_numerics/howto.html: Likewise. + * docs/27_io/howto.html: Likewise. + * docs/27_io/iostreams_hierarchy.pdf: Likewise. + * docs/ext/howto.html: Likewise. + * docs/faq/index.html: Likewise. + * docs/faq/index.txt: Likewise. + * docs/html/Makefile: ...to here. + * docs/html/configopts.html: Likewise. + * docs/html/documentation.html: Likewise. + * docs/html/install.html: Likewise. + * docs/html/lib3styles.css: Likewise. + * docs/html/17_intro/BADNAMES: Likewise. + * docs/html/17_intro/BUGS: Likewise. + * docs/html/17_intro/C++STYLE: Likewise. + * docs/html/17_intro/CHECKLIST: Likewise. + * docs/html/17_intro/COPYING: Likewise. + * docs/html/17_intro/DESIGN: Likewise. + * docs/html/17_intro/HEADER_POLICY: Likewise. + * docs/html/17_intro/PROBLEMS: Likewise. + * docs/html/17_intro/RELEASE-NOTES: Likewise. + * docs/html/17_intro/TODO: Likewise. + * docs/html/17_intro/contribute.html: Likewise. + * docs/html/17_intro/headers_cc.txt: Likewise. + * docs/html/17_intro/howto.html: Likewise. + * docs/html/17_intro/libstdc++-assign.txt: Likewise. + * docs/html/17_intro/organization: Likewise. + * docs/html/17_intro/porting-howto.html: Likewise. + * docs/html/18_support/howto.html: Likewise. + * docs/html/19_diagnostics/howto.html: Likewise. + * docs/html/20_util/howto.html: Likewise. + * docs/html/21_strings/gotw29a.txt: Likewise. + * docs/html/21_strings/howto.html: Likewise. + * docs/html/21_strings/stringtok_h.txt: Likewise. + * docs/html/21_strings/stringtok_std_h.txt: Likewise. + * docs/html/22_locale/codecvt.html: Likewise. + * docs/html/22_locale/ctype.html: Likewise. + * docs/html/22_locale/howto.html: Likewise. + * docs/html/22_locale/locale.html: Likewise. + * docs/html/23_containers/howto.html: Likewise. + * docs/html/23_containers/wrappers_h.txt: Likewise. + * docs/html/24_iterators/howto.html: Likewise. + * docs/html/25_algorithms/howto.html: Likewise. + * docs/html/26_numerics/howto.html: Likewise. + * docs/html/27_io/howto.html: Likewise. + * docs/html/27_io/iostreams_hierarchy.pdf: Likewise. + * docs/html/ext/howto.html: Likewise. + * docs/html/faq/index.html: Likewise. + * docs/html/faq/index.txt: Likewise. + +2000-12-08 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): New conditional, + GLIBCPP_BUILD_LIBIO, true iff building libio. + * libio/Makefile.am: Use; set noinst_LTLIBRARIES empty if false. + * aclocal.m4: Regenerated. + * config.h.in: Regenerated. + * configure: Regenerated. + * libio/Makefile.in: Regenerated. + * libmath/Makefile.in: Regenerated. + +2000-12-08 Gabriel Dos Reis + + * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove ccosl, + cexpl, clog10l, csinhl, ctanhl, ctanl. + (EXTRA_DIST): Remove ccos, ccosf, csin, csinf, ccosh, ccoshf, + csing, csinhf, clog10, clog10f, ctan, ctanf, ctanh, ctanhf. + * libmath/Makefile.in: Regenarate. + * libmath/ccos.c: Remove. + * libmath/ccosf.c: Likewise. + * libmath/ccosl.c: Likewise. + * libmath/csin.c: Likewise. + * libmath/csinf.c: Likewise. + * libmath/csinl.c: Likewise. + * libmath/ctan.c: Likewise. + * libmath/ctanf.c: Likewise. + * libmath/ctanl.c: Likewise. + * libmath/ccosh.c: Likewise. + * libmath/ccoshf.c: Likewise. + * libmath/ccoshl.c: Likewise. + * libmath/csinh.c: Likewise. + * libmath/csinhf.c: Likewise. + * libmath/csinhl.c: Likewise. + * libmath/ctanh.c: Likewise. + * libmath/ctanhf.c: Likewise. + * libmath/ctanhl.c: Likewise. + * libmath/cexp.c: Likewise. + * libmath/cexpf.c: Likewise. + * libmath/cexpl.c: Likewise. + * libmath/clog10.c: Likewise. + * libmath/clog10f.c: Likewise. + * libmath/clog10l.c: Likewise. + * libmath/complex-stub.h: Remove forward declaration of functions + mentioned above. + + * include/bits/std_complex.h(tan, tanh): Define primary templates. + (complex<>): Remove friend declarations for tan<> and tanh<>. + * src/complex.cc(tan, tanh): Remove specializations. + + * acinclude.m4: Remove check for ccos, ccosf, ccosl, ccosh, + ccoshf, ccoshl, csin, csinf, csinl, csinh, csinhf, csinhl, cexp, + cexpf, cexpl, ctan, ctanf, ctanl, ctanh, ctanhf, ctanhl. + * aclocal.m4: Regenarate. + * configure: Regenarate. + +2000-12-08 Gabriel Dos Reis + + * acinclude.m4: Don't forget to remove check for cpowl as it is no + longer needed, nor is the corresponding stub existent. + * aclocal.m4: Regenarate. + * configure: Regenarate. + +2000-12-07 Benjamin Kosnik + + * config/os/generic/bits/ctype_base.h (ctype_base): Change space mask. + + * config/os/generic/bits/ctype_noninline.h (ctype): Remove default + arguments in definition. + * config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same. + * config/os/newlib/bits/ctype_noninline.h (ctype): Same. + * config/os/irix/bits/ctype_noninline.h (ctype): Same. + * config/os/hpux/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same. + * config/os/aix/bits/ctype_noninline.h (ctype): Same. + + * include/bits/locale_facets.h: Tweak. + +2000-12-06 Benjamin Kosnik + + * include/bits/locale_facets.h (ctype): Remove _Ctype_nois and + _Ctype and replace with common __ctype_abstract_base. + (ctype::_M_convert_to_wmask): Move to locale.cc. + * config/os/gnu-linux/bits/ctype_noninline.h (ctype::ctype): + And here. + * config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same. + * config/os/newlib/bits/ctype_noninline.h (ctype): Same. + * config/os/irix/bits/ctype_noninline.h (ctype): Same. + * config/os/hpux/bits/ctype_noninline.h (ctype): Same. + * config/os/generic/bits/ctype_noninline.h (ctype): Same. + * config/os/aix/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same. + * src/locale-inst.cc: Clean instantiations. + * src/locale.cc (ctype): Add definitions here. + (ctype::_M_wmask): Move definitions here. + + * config/os/generic/bits/ctype_inline.h (ctype::is): + Implement in a generic way, with only "C" functionality and no + knowlege of the target os. + * config/os/generic/bits/os_defines.h: Change comments to C++ style. + * testsuite/22_locale/ctype_char_members.cc (test01): Add tests. + + * include/bits/codecvt.h (ctype_byname): Remove specializations, + as not required. + * include/bits/localefwd.h (codecvt_byname): And here. + * src/codecvt.cc: Remove codecvt_byname specializations. + + * include/c/bits/std_cstdio.h: Include c++config.h. + +2000-12-06 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_*_DECL_AND_LINKAGE_*): Pre-test + whether the cached result is present. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * Makefile.in: Regenerate. + * libio/Makefile.in: Regenerate. + * libmath/Makefile.in: Regenerate. + * libsupc++/Makefile.in: Regenerate. + * src/Makefile.in: Regenerate. + +2000-12-06 Richard Earnshaw + + * configure.target (*-*-freebsd, *-*-netbsd): Correct paths to + os_include_dir. + +2000-12-05 Jeffrey A Law + + * configure.target (hpux): Set os_include_dir. + * config/os/hpux/bits/ctype_base.h: New file + * config/os/hpux/bits/ctype_inline.h: New file + * config/os/hpux/bits/ctype_noinline.h: New file + * config/os/hpux/bits/os_defines.h: New file + +2000-12-05 Alexandre Petit-Bianco + + * src/Makefile.am (libstdc++.INC): Revert for libjava builds. + * src/Makefile.in: Regenerate. + +2000-12-05 Benjamin Kosnik + + * acinclude.m4 (EXTRA_CXX_FLAGS): And here. + * include/c/bits/std_cstdlib.h (std ): Change macro to + _GLIBCPP_NEED_LLDIV_T. + * acconfig.h: Remove unused MBSTATE_T bits. + * configure.in: Same. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config.h.in: Regenerate. + +2000-12-05 Benjamin Kosnik + + * acinclude.m4: Change up to reflect new directory organization. + Add in bits for NetBSD. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config/os/bsd: New directory. + * config/os/netbsd: Move to... + * config/os/bsd/netbsd: ...here. + * config/os/freebsd: Move to... + * config/os/bsd/freebsd: ...here. + +2000-12-05 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Check for + lldiv_t. Allow the use of os-specific defines while checking for + long-long functions by the inclusion of os_defines.h. + * aclocal.m4: Regenerate. + * configure.in: Add comments. + * configure: Regenerate. + * acconfig.h: Add _GLIBCPP_HAVE_LLDIV_T. + * config.h.in: Regenerate. + * config/os/gnu-linux/bits/os_defines.h: Fix typos and + duplications in comments. + +2000-12-05 Richard Earnshaw + + * config/os/freebsd/bits/ctype_base.h: Update comments about other + BSD variants. + +2000-12-05 Richard Earnshaw + + * config/os/freebsd/bits/*.h: Move here from config/os/bsd/bits. + * aclocal.m4: Adjust accordingly. + * configure.target: Likewise. + * configure: Regenerate. + +2000-12-05 Richard Earnshaw + + * config/cpu/arm/bits/atomicity.h: Add support for compiling Thumb + code. + +2000-12-05 Richard Earnshaw + + Support for NetBSD. + * aclocal.m4: Add test for NetBSD's ctype support. + * configure: Regenerate. + * configure.target: Support NetBSD. + * config/os/netbsd/bits/ctype_base.h: New file. + * config/os/netbsd/bits/ctype_inline.h: New file. + * config/os/netbsd/bits/ctype_noinline.h: New file. + * config/os/netbsd/bits/os_defines.h: New file. + +2000-12-05 Gabriel Dos Reis + + * src/complex.cc (pow): Remove definitions for explicit + specializations. + * libmath/mathconf.h: Remove declarations for c_log, c_logf, + c_logl. + * libmath/complex-stub.h: Remove declarations for cpow, cpowf, + cpowl. + * libmath/cpow.c: Remove. + * libmath/cpowf.c: Remove. + * libmath/cpowl.c: Remove. + * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove c_logl, + cpowl, + (EXTRA_DIST): Remove c_log, c_logf, carg, cargf. + * libmath/Makefile.in: Regenarate. + * libmath/c_log.c: Remove + * libmath/c_logf.c: Likewise. + * libmath/c_logl.c: Likewise. + * libmath/carg.c: Likewise. + * libmath/cargf.c: Likewise. + * libmath/cargl.c: Likewise. + * include/bits/std_complex.h (pow): Define primary templates. + (complex<>): Remove friend declarations for pow<>(). + * acinclude.m4: Remove check for c_log, c_logf, c_logl, carg, + cargf. + * aclocal.m4: Regenarate. + * configure: Regenarate. + +2000-12-03 Joseph S. Myers + + * docs/configopts.html, docs/documentation.html, + docs/install.html, docs/17_intro/BADNAMES, + docs/17_intro/contribute.html, docs/17_intro/howto.html, + docs/18_support/howto.html, docs/19_diagnostics/howto.html, + docs/20_util/howto.html, docs/21_strings/howto.html, + docs/22_locale/howto.html, docs/23_containers/howto.html, + docs/24_iterators/howto.html, docs/25_algorithms/howto.html, + docs/26_numerics/howto.html, docs/27_io/howto.html, + docs/ext/howto.html, docs/faq/index.html, docs/faq/index.txt: Sync + with wwwdocs. + +2000-12-01 Phil Edwards + + * docs/download.html: Remove. + * docs/footer.ihtml: Remove. + * docs/header.ihtml: Remove. + * docs/index.html: Remove. + * docs/links.html: Remove. + * docs/mail.html: Remove. + * docs/status.html: Remove. + * docs/thanks.html: Remove. + +2000-12-01 Phil Edwards + + * mkcheck.in: Count static and shared results separately. + +2000-12-01 Loren J. Rittle + + * mkcheck.in: Correct typo. + +2000-12-01 Gabriel Dos Reis + + * src/cmath.cc: Remove. + * src/Makefile.am (c_base_headers): Add bits/cmath.tcc. + (sources): Remove cmath.cc + * src/Makefile.in: Regenerate. + + * include/c/bits/std_cmath.h (__cmath_power<>): Declare. + (__cmath_abs<>): New function. + (abs, fabs): Use __cmath_abs when no direct support is available. + (__pow_helper<>): New function. + (pow): Define here. Use __pow_helper<>. + + * include/c/bits/cmath.tcc: New file. + +2000-11-29 Benjamin Kosnik + + Fixes for build directories with colons, AIX build problems. + * src/Makefile.am: Cleanups, add documentation. + (libstdc++.INC): Simplify rule. + (myinstallheaders): Consolidate install rules. + (myinstalldirs): New, make directores. + (base_headers): Subdivide based on install directory. + (ext_headers): New. + (backward_headers): New. + (headers): Remove. + (c_headers): Remove, unused. + (c_shadow_headers): Split up, deal with conditional usage in a + sane manner. + * src/Makefile.in: Regenerate. + +2000-11-29 Phil Edwards + + Sync with the documentation from wwwdocs. + * docs/Makefile: New file (rebuilds FAQ text version). + * docs/configopts.html: Update. + * docs/documentation.html: Update. + * docs/download.html: Update. + * docs/index.html: Update. + * docs/install.html: Update. + * docs/links.html: Update. + * docs/mail.html: Update. + * docs/status.html: Update. + * docs/thanks.html: Update. + * docs/27_io/howto.html: Update. + * docs/faq/index.html: Update for 2.91. + * docs/faq/index.txt: Update for 2.91. + * docs/footer.html: Removed. + * docs/footer.ihtml: New file. + * docs/gccrebuild.html: Removed. + * docs/header.html: Removed. + * docs/header.ihtml: New file. + +2000-11-29 Loren J. Rittle + + * tests_flags.in: Correct typo. + +2000-11-29 Gabriel Dos Reis + + * tests_flags (SH_FLAGS, ST_FLAGS): Move them back to ... + * mkcheck.in (SH_FLAGS, ST_FLAGS): ...here + +2000-11-29 Gabriel Dos Reis + + * src/Makefile.am (sources): Add bitset.cc + * src/Makefile.in: Regenrate. + + * include/bits/std_bitset.h (_GLIBCPP_BITSET_BITS_PER_WORD): New + macro. Replace __BITS_PER_WORDS throughout. + (__BITS_PER_WORDS): Remove. + (bitset<>::_M_do_find_first, bitset<>::_M_do_find_next): Move + definitions to src/bitset.cc. + + * src/bitset.cc (bitset<>::_M_do_find_first, + bitset<>::_M_do_find_next): Define here. + (_Bit_count<>::_S_bit_count, _Find_one<>::_S_first_one): Define + here. Explicitly instantiate definitions. + +2000-11-28 Franz Sirl + + * config/cpu/powerpc/bits/atomicity.h (__exchange_and_add): Silence + preprocessor multi-line string warnings. + (__atomic_add): Likewise. + (__compare_and_swap): Likewise. + (__always_swap): Likewise. + (__test_and_set): Likewise. + * config/cpu/arm/bits/atomicity.h (__exchange_and_add): Likewise. + (__atomic_add): Likewise. + (__compare_and_swap): Likewise. + (__always_swap): Likewise. + (__test_and_set): Likewise. + +2000-11-28 Benjamin Kosnik + + Update for 2.91 release. + * include/bits/c++config (__GLIBCPP__): Update. + * docs/17_intro/RELEASE-NOTES: Update. + * docs/status.html: Update, remove bogus autotools disinformation. + +2000-11-27 Benjamin Kosnik + + * tests_flags.in (LTCXX): Change CXX_FLAG to CXXFLAGS. + + * testsuite/22_locale/ctor_copy_dtor.cc: Adjust formatting. + * testsuite/27_io/istream_extractor_arith.cc (test11): New + testcase, based on libstdc++/90. + +2000-11-27 Franz Sirl + + * config/cpu/arm/bits/atomicity.h (__exchange_and_add): Add + __volatile__ to asm. + (__atomic_add): Likewise. + (__compare_and_swap): Likewise. + (__always_swap): Likewise. + (__test_and_set): Likewise. + + * config/cpu/powerpc/bits/atomicity.h: Replace '__ATOMICITY_INLINE' + with 'inline'. + (__exchange_and_add): Add __volatile__ to asm. + (__atomic_add): Likewise. + (__compare_and_swap): Likewise. + (__always_swap): Likewise. + (__test_and_set): Likewise. + +2000-11-27 Gabriel Dos Reis + + * tests_flags.in: Update documentation to reflect the change + below. + +2000-11-26 Benjamin Kosnik + + * tests_flags.in: Export CXX, CXXFLAGS. + * mkcheck.in: Grab them. + +2000-11-26 David Billinghurst + Benjamin Kosnik + + * mkcheck.in: Add exe extension to printnow executable, abstract + out call to this with TIMER_COMMAND. + * configure.target (l_glibcpp_cxxflags): Add cygwin support. + * acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Correct paths. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-11-26 Benjamin Kosnik + + * testsuite/27_io/istream_unformatted.cc (test05): Fixup. + +2000-11-26 Benjamin Kosnik + + * acinclude.m4: Only sanity check for compiler version when + configuring. More fixes for 'make clean'. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-11-26 Gabriel Dos Reis + + * libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove cabsl.c + * libmath/Makefile.in: Regenerate. + * libmath/cabs.c: Remove. + * libmath/cabsf.c: Likewise. + * libmath/cabsl.c: Likewise. + * libmath/complex-stub.h: Remove declarations for cabs*. + + * acinclude.m4: Remove check for cabs*. + * aclocal.m4: Regenerate. + + * Makefile.in: Regenerate. + +2000-11-26 Gabriel Dos Reis + + * tests_flags.in: New file. Split out of ... + * mkcheck.in: ... this. Move flags computation into + tests_flags.in. + * configure.in: Add support for tests_flags. + * confiigure: Regenerate. + +2000-11-25 Joseph S. Myers + + * acinclude.m4: Change C9X references to refer to C99. + * aclocal.m4, configure: Regenerate. + * config/os/gnu-linux/bits/os_defines.h, src/complex.cc, + testsuite/22_locale/codecvt_wchar_t_char.cc, + include/bits/stl_config.h, include/c/bits/std_cwchar.h, + libmath/mathconf.h: Change C9X references to refer to C99. + +2000-11-25 Benjamin Kosnik + Richard Earnshaw + + * src/Makefile.am (INCLUDES): Remove unconditional use of + _GNU_SOURCE and _ISOC99_SOURCE macros. + * src/Makefile.in: Regenerate. + +2000-11-24 Benjamin Kosnik + + * testsuite/22_locale/codecvt_wchar_t_char.cc (main): Add + _GLIBCPP_USE_WCHAR_T guards. + + * configure.in (AC_OUTPUT_COMMANDS): Remove, just run scripts as + is, so that checks for existence of generated files actually work. + * configure: Regenerate. + +2000-11-23 Hans-Peter Nilsson + + * config/os/gnu-linux/bits/os_defines.h: Include . + If not glibc 2.1 or higher, include and define + __off64_t as __loff_t and #define __THROW as empty. + + * libio/libio.h [__P]: Move __THROW and __PMT into their own + ifndef:s. + +2000-11-23 David Edelsohn + + * porting.texi: Expand libtool information. + +2000-11-23 Gabriel Dos Reis + + * include/bits/ios_base.h (ios_base::failure::~failure, + ios_base::failure::what): Move definition to ... + + * src/ios.cc (ios_base::failure::~failure): ... here. + src/ios.cc (ios::failure::what): Likewise. + +2000-11-22 Benjamin Kosnik + + Make deprecated strstream header consistent with new and new.h. + * include/backward/strstream.h: Add. Use using declarations to + scope strstreambuf, istrstream, ostrstream, strstream to global + scope. + * include/backward/strstream: Remove using declarations. + * src/Makefile.am (base_headers): Add strstream. + * src/Makefile.in: Regenerate. + + * include/backward/new.h (_CPP_BACKWARD_NEW_H): Change macro guard + to be consistent with other headers. + +2000-11-22 Richard Henderson + + * config/os/bsd/bits/ctype_inline.h (is): Fix order of expressions. + +2000-11-22 Phil Edwards + + * porting.texi: Minor tweaks to vocabulary. + +2000-11-22 Loren J. Rittle + + * include/backward/strstream.h: Reinstate the `using' + statements. + +2000-11-22 Loren J. Rittle + + * src/Makefile.am (base_headers): Add missing backwards headers. + * src/Makefile.in: Regenerate. + +2000-11-21 scott snyder + + * config/c_io_stdio.cc (seekoff): Fix return value. + (seekpos): Likewise. + (sys_seek): Likewise. + +2000-11-21 Loren J. Rittle + + * mkcheck.in (explanation): Retain output of all failing + compiles. Don't add gratuitous space to the log file. + +2000-11-21 Benjamin Kosnik + + * src/strstream.cc: Adjust includes. + * src/Makefile.am (base_headers): Remove std_strstream.h, add + backwards/strstream.h. + (std_headers): Remove strstream. + * src/Makefile.in: Regenerate. + * libsupc++/Makefile.am (headers): Remove new.h + * libsupc++/Makefile.in: Regenerate. + * include/std/strstream: Remove. + * include/backward/strstream.h: Replace with... + * include/bits/std_strstream.h: ...this. Move. + * include/backward/complex.h: Remove SGIisms. + * include/backward/streambuf.h: Same. + * include/backward/stream.h: Same. + * include/backward/ostream.h: Same. + * include/backward/istream.h: Same. + * include/backward/iostream.h: Same. + * include/backward/iomanip.h: Same. + * include/backward/fstream.h: Same. + * libsupc++/new.h: Add using declarations for bad_alloc, + nothrow_t, and nothrow, move to ... + * include/backward/new.h: ...here. + +2000-11-21 Mark Mitchell + + * porting.texi: New file. + +2000-11-21 Branko Cibej + + * config/os/solaris/solaris2.6/bits/os_defines.h: Define + _XOPEN_SOURCE, _LARGEFILE64_SOURCE, __EXTENSIONS__, __off_t, + __off64_t and __ssize_t. + * config/os/solaris/solaris2.5/bits/os_defines.h: For now, use the + same configuration as above. + +2000-11-21 Benjamin Kosnik + + * acinclude.m4 (AC_LC_MESSAGES): Check for locale.h. + * aclocal.m4: Regenerate. + * configure: Renerate. + +2000-11-20 Benjamin Kosnik + + * mkcheck.in (explanation): Don't paste output of passing compiles + into log file. Use -static. Get version info. + + * testsuite/23_containers/vector_ctor.cc (test02): Fix thinko. + +2000-11-20 Gabriel Dos Reis + + * include/bits/std_complex.h (complex): Constructor + complex::complex(const complex&) is not explicit; + since it is a promotion. + (complex): Constructors taking complex and + complex are not explicit. + +2000-11-20 Benjamin Kosnik + + * include/bits/std_complex.h: Tweaks, include cmath for abs overloads. + * src/complex.cc: Remove cmath include, formatting tweaks, remove + dead code. + * include/c/bits/std_cmath.h: Formatting tweaks. + * testsuite/26_numerics/complex_value.cc: New file, for catching + bits gleaned from libstdc++/106. + + * testsuite/23_containers/vector_ctor.cc (test02): Add test from + libstdc++/102. + +2000-11-20 Joseph S. Myers + + * include/bits/c++config, include/bits/ios_base.h, + include/bits/std_streambuf.h: Correct spelling of "deprecated". + +2000-11-19 Mark Mitchell + + * libsupc++/exception_support.cc (__throw_bad_cast): Name it + __cxa_bad_cast under the new ABI. + (__throw_bad_typeid): Name it __cxa_bad_typeid under the new ABI. + * libsupc++/pure.cc (__pure_virtual): Name it __cxa_pure_virtual + under the new ABI. + +2000-11-18 Mark Mitchell + + * libsupc++/exception_support.h: New header file. + * libsupc++/vec.cc: Include it. + (__cxa_vec_new2): Recatch exceptions before rethrows. + (__cxa_vec_new3): Likewise. + (__cxa_vec_ctor): Likewise. + (__cxa_vec_cctor): Likewise. + (__cxa_vec_dtor): Likewise. + (__cxa_vec_delete2): Likewise. + (__cxa_vec_delete3): Likewise. + +2000-11-17 Theodore Papadopoulo + + * include/bits/stl_tree.h: Overload operators == and != to be able + to handle the case (const_iterator,iterator) and + (iterator,const_iterator), thus fixing libstdc++/737 and the like. + * testsuite/23_containers/map_operators.cc (test02): New tests. + +2000-11-17 Loren J. Rittle + + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Correct last patch + to ``make --enable-cstdio=stdio the default''. + * libstdc++-v3/aclocal.m4: Rebuilt. + * libstdc++-v3/configure: Rebuilt. + +2000-11-17 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_ATOMICITY): Move switch statement + contents to... + * configure.target: ...here. Enable generic atomic ops, and warn. + * aclocal.m4: Regenerated. + * configure: Ditto. + * Makefile.in: Ditto. + * libio/Makefile.in: Ditto. + * libmath/Makefile.in: Ditto. + * libsupc++/Makefile.in: Ditto. + * src/Makefile.in: Ditto. + +2000-11-16 Loren J. Rittle + + * include/bits/locale_facets.tcc (num_get<_CharT, + _InIter>::do_get(...)): Add missing typename keyword. + +2000-11-16 Mark Mitchell + + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Make + --enable-cstdio=stdio the default. Disable wide character support + in that event. + * configure.in: Move GLIBCPP_ENABLE_C_MBCHAR after + (GLIBCPP_ENABLE_CSTDIO). + * config/c_io_stdio.h: Don't include , don't define + __c_wfile_type. + * aclocal.m4: Regenerated. + * configure: Likewise. + * Makefile.in: Likewise. + * libio/Makefile.in: Likewise. + * libmath/Makefile.in: Likewise. + * libsupc++/Makefile.in: Likewise. + * src/Makefile.in: Likewise. + +2000-11-16 Gerald Pfeifer + + * config/c_io_stdio.h: Include stddef.h. + +2000-11-16 Mark Mitchell + + * config/c_io_stdio.h (streamsize): Make it a typedef for + ptrdiff_t. + (wstreamsize): Likewise. + + * config/c_io_stdio.h: Include libio.h. + +2000-11-15 Mark P Mitchell + + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Substitute libio_la. + * src/Makefile.am (libstdc___la_LIBADD): Use it. + * aclocal.m4: Regenerated. + * configure: Likewise. + * Makefile.in: Likewise. + * libio/Makefile.in: Likewise. + * libmath/Makefile.in: Likewise. + * libsupc++/Makefile.in: Likewise. + * src/Makfile.in: Likewise. + +2000-11-15 Mark Mitchell + + * mkcheckin.in: Move check for bash version 2 later in the file. + + * include/bits/basic_string.h (basic_string::_Rep::_S_max_size): + Make it const. + (basic_string::_Rep::_S_terminal): Likewise. + * include/bits/string.tcc (basic_string::_Rep::_S_max_size): + Likewise. + (basic_string::_Rep::_S_terminal): Likewise. + +2000-11-15 David Billinghurst + + * mkcheck.in: Add function size_command() for irix. + +2000-11-14 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPOR): Set LIBS back to + initial value. + (GLIBCPP_EXPORT_INCLUDES): Only export TOPLEVEL_INCLUDES if + building a canadian cross. This should fix the remaining java + build issues. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * include/bits/c++config (__GLIBCPP__): Set release version for 2.91. + +2000-11-14 Phil Edwards + + * mkcheck.in: On a platform where we don't know how to extract + section sizes, just set them to zero. Use old method of reading + file contents. + +2000-11-13 Loren J. Rittle + + * config/c_io_stdio.h: Don't define __c_wfile_type + when _GLIBCPP_USE_WCHAR_T is not defined. + +2000-11-13 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_TARGET): New macro, replacing + GLIBCPP_CHECK_CPU and GLIBCPP_CHECK_OS, sourcing configure.target. + (GLIBCPP_CONFIGURE): Call new macro here. + * configure.host: Cleanup. + * configure.in: Remove those two macros. + * configure.target: New file. + * aclocal.m4: Regenerated. + * configure: Ditto. + * Makefile.in: Ditto. + * libio/Makefile.in: Ditto. + * libmath/Makefile.in: Ditto. + * libsupc++/Makefile.in: Ditto. + * src/Makefile.in: Ditto. + + * mkcheck.in: Use libtool. Split things out into functions. + +2000-11-12 Alexandre Petit-Bianco + + * Makefile.am (tmp-libstdsc++.INC:): Do not use -I$(top_builddir). + * Makefile.in: Regenerate. + +2000-11-12 David Edelsohn + + * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Add test for + libiconv.a providing wchar_t support functions. + * aclocal.m4: Regenerate. + +2000-11-12 Loren J. Rittle + + * acinclude.m4 (GLIBCPP_ENABLE_ATOMICITY): Handle FreeBSD. + * aclocal.m4, configure: Rebuilt. + +2000-11-12 Brent Verner + + * include/c_std/bits/wrap_langinfo.h: New file. + * include/c_std/langinfo.h: New file. + * include/bits/codecvt.h (__enc_trants::__enc_traits()): Bring in + CODESET from _C_legacy::CODESET if using shadow headers. + * src/Makefile.am: Add new files. + * src/Makefile.in: Regenerate. + +2000-11-12 Mark Mitchell + + * include/c/bits/std_cmath.h (abs): Change extern "C" declaration + of `abs (double)' to ... + (fabs): this. + + * config/os/solaris/solaris2.7/bits/os_defines.h: Define + __EXTENSIONS__. + +2000-11-11 Mark P Mitchell + + * include/bits/basic_file.h (__basic_file): Don't use __c_wfile_type + when _GLIBCPP_USE_WCHAR_T is not defined. + +2000-11-10 Phil Edwards + + * include/bits/codecvt.h (__iconv_adaptor): New adaptor function, + courtesy of Alexandre Oliva, to handle const/non-const signatures. + (codecvt::do_out): Use. + (codecvt::do_in): And here. + +2000-11-10 Gabriel Dos Reis + + * include/bits/cpp_type_traits.h: Fix typos. Adjust formatting. + +2000-11-10 Gabriel Dos Reis + + * include/bits/localefwd.h (_Count_ones<>::_S_halfcount, + _Count_ones<>::_S_count): Turn into enumerators. + +2000-11-08 Mark Mitchell + + * include/bits/codecvt.h (codecvt::do_out): Make it const-correct. + (codecvt::do_in): Likewise. + +2000-11-08 David Edelsohn + + * src/locale-inst.cc: Add explicit instantiations of + _M_fill_insert and fill_n<..., unsigned long,...> . + +2000-11-06 Gabriel Dos Reis + + * include/bits/std_complex.h (conj): Undo double removal. + +2000-11-06 Alexandre Oliva + + * acinclude.m4 (LIB_AC_PROG_CXX): Remove CXX from the list of + alternatives for CXX_libstdcxx, now that it is useless. + * aclocal.m4, configure: Rebuilt. + +2000-11-04 Mark Mitchell + + * acinclude.m4 (LIB_AC_PROG_CXX): Set CXX_libstdcxx from CXX. + * aclocal.m4: Regenerated. + * configure: Likewise. + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Fix punctuation in + use of `test'. + * aclocal.m4: Regenerated. + * configure: Likewise. + +2000-11-04 Alexandre Oliva + + * acinclude.m4 (CXX): Prevent it from being cached. + * aclocal.m4, configure, */Makefile.in: Rebuilt. + +2000-11-03 David Edelsohn + + * acinclude.m4 (GLIBCPP_CHECK_OS): Add AIX target selecting threads + flag based on multilib definition of $CXX. + * mknumeric_limits (LDFLAGS): Add AIX target linking with pthreads + based on multilib definition of $CXX. + * config/os/aix/bits/os_defines.h (_G_USING_THUNKS): Define as 0. + +2000-11-03 Phil Edwards + + * acinclude.m4: Cleanups. + * aclocal.m4: Regenerated. + * configure: Ditto. + * Makefile.in: Ditto. + * libio/Makefile.in: Ditto. + * libmath/Makefile.in: Ditto. + * libsupc++/Makefile.in: Ditto. + * src/Makefile.in: Ditto. + + * docs/install.html: Removal of EGCS. + * docs/23_containers/wrappers_h.txt: Likewise. + * docs/faq/index.html: Likewise. + * docs/faq/index.txt: Regenerated. + * docs/thanks.html: More people. + +2000-11-03 David Edelsohn + + * include/c/bits/std_cwchar.h: Undefine macro that conflicts + with function name defined in this file. + +Thu Nov 2 23:19:20 2000 Mark P Mitchell + + * include/c/bits/std_cctype.h: Undefine macros that conflict + with function names defined in this file. + * include/c/bits/std_cstdio.h: Likewise. + +2000-11-02 Mark Mitchell + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Fix typo. + +Thu Nov 2 10:11:45 2000 Mark P Mitchell + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Add support for IRIX. + * aclocal.m4: Regenerated. + * Makefile.in: Regenerated. + * libio/Makefile.in: Likewise. + * libmath/Makefile.in: Likewise. + * libsupc++/Makefile.in: Likewise. + * src/Makefile.in: Likewise. + * configure: Likewise. + * config/os/irix/bits/ctype_base.h: Revise. + * config/os/irix/bits/ctype_inline.h: Likewise. + * config/os/irix/bits/ctype_noninline.h: Likewise. + + * testsuite/22_locale/codecvt_unicode_char.cc: Don't run it + if not _GLIBCPP_USE_WCHAR_T. + * testsuite/22_locale/codecvt_unicode_wchar_t.cc: Likewise. + * testsuite/22_locale/ctor_copy_dtor.cc: Likewise. + * testsuite/22_locale/ctype_wchar_t_members.cc: Likewise. + + * mkcheck.in: Fix echoing of -rpath option. + + * config/os/irix/bits/atomicity.h (_Atomic_word): Make it a + signed type. + (__exchange_aand_add): Adjust accordingly. + (__atomic_add): Likewise. + +2000-11-02 Benjamin Kosnik + + * src/locale.cc: Match orderings for static members. + * include/bits/fstream.tcc: Fixes for cin. + +2000-11-02 Gabriel Dos Reis + + * include/bits/std_complex.h (complex<>): Remove (cos<>, cosh<>, + exp<>, log<>, log<>, sin, sinh<>) friend declarations. + (cos, cosh, sin, sinh): Define primary templates. + + * src/complex.cc (cos<>, cosh<>, sin<>, sinh<>): Comment out + definitions. + +2000-11-01 Benjamin Kosnik + + * bits/basic_file.h (_M_open_mode): Change signature, move + specializations to.. + * config/c_io_libio.cc: ...here. + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Add sdtio option, remove wince. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config/c_io_stdio.h: New file. + * config/c_io_stdio.cc: New file. + * docs/configopts.html: Modify documentation. + +2000-10-31 Benjamin Kosnik + + * include/c/bits/std_cwctype.h: Add more undefs. + +2000-10-31 Gabriel Dos Reis + + * include/bits/std_complex.h (norm): Forward declare. + (complex<>): Comment out friend declaration of conj<>. + (conj<>): Comment out specialization. + (exp, log, log10): Define primary templates. + + * src/complex.cc (exp<>, log<>, log10<>): Comment out + specializations. + +2000-10-31 Benjamin Kosnik + + * include/bits/std_complex.h: Remove duplicate definition of conj. + * include/c/bits/std_cwctype.h: Consistent placement of undefs. + +2000-10-31 Gabriel Dos Reis + + * src/complex.cc (arg, polar): Comment out specializations. + + * include/bits/std_complex.h (complex<>): Remove arg<> friend + declaration. + (arg): Define primary template. + (polar): Likewise. + (conj): Likewise. + +2000-10-31 Gabriel Dos Reis + + * include/c/bits/std_cwctype.h: #undef possible function-like + macro definitions of iswxxx functions, which might be brought in + by . Those macro definitions prevent build on some + linux-based systems. + + * include/bits/std_complex.h (complex<>): Comment out friend + declarations of abs<> specializations. + (abs): Define primary template. + + * src/complex.cc (abs): Comment out specialization definition. + +2000-10-30 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): Raise debugging level from + the default of 2 to 3. + * configure.in: Fix minor typos. SUBST the values of enable_shared + and enable_static so that mkcheck will be aware of them. Put the + test for gconv.h in with all the other header tests. + * aclocal.m4: Regenerate. + * configure: Ditto. + * Makefile.in: Ditto. + * libio/Makefile.in: Ditto. + * libmath/Makefile.in: Ditto. + * libsupc++/Makefile.in: Ditto. + * src/Makefile.in: Ditto. + + * config/os/solaris/solaris2.7/bits/os_defines.h: Define + _G_USING_THUNKS to 0. + +2000-10-30 Benjamin Kosnik + + * src/complex_io.cc : Remove ancient defines. + * config/os/gnu-linux/bits/os_defines.h: Add defines. + * libsupc++/tinfo2.cc: Change to cstddef. + + * include/bits/codecvt.h: Add include of c++config.h, so that + __USE_GNU gets defined. (Important for alpha.) + + * include/c/bits/std_cwctype.h: Same. + * include/c/bits/std_ctime.h: And here. + * include/c/bits/std_cstdarg.h: Same. + * include/c/bits/std_csignal.h: Same. + * include/c/bits/std_csetjmp.h: Same. + * include/c/bits/std_clocale.h: Same. + * include/c/bits/std_climits.h: Touch. + * include/c/bits/std_cfloat.h: Same. + * include/c/bits/std_cerrno.h: Same. + * include/c/bits/std_cwchar.h: Same. + * include/c/bits/std_cassert.h: Same. + * include/c/bits/std_cctype.h: Same. + * include/c/bits/std_cstddef.h: And here. + * include/c/bits/std_cstdlib.h: And here. + * include/c/bits/std_cstdio.h: Same. + * include/c/bits/std_cstring.h: Add names to namespace std::. + + * include/bits/c++config (_GNU_SOURCE): Move linux-specific macros + from here... + (_ISOC99_SOURCE): And this one.... + * config/os/gnu-linux/bits/os_defines.h: ...to here. + + * include/bits/codecvt.h (codecvt<_InternT, _ExternT, + __enc_traits>::do_in): Don't cast to const, this is a bug in glibc + prior to 2.2. + (codecvt<_InternT, _ExternT, __enc_traits>::do_out): Same. + * include/c/bits/std_cwchar.h: Add using declarations for mbstate_t. + +2000-10-30 Steven King + + * include/bits/codecvt.h: Add cast. + * include/c_std/stdio.h: Re-add printf using declaration. + * include/c_std/bits/std_cstdio.h: Same + * testsuite/22_locale/codecvt_wchar_t_char.cc: Fixup testsuite. + * testsuite/22_locale/ctor_copy_dtor.cc: Same. + * testsuite/22_locale/facet.cc: Same. + * testsuite/22_locale/global_templates.cc: Same. + * testsuite/22_locale/operators.cc: Same. + * testsuite/22_locale/static_members.cc: Same. + * testsuite/26_numerics/c_math.cc: Same. + * testsuite/26_numerics/complex_inserters_extractors.cc: Same. + * testsuite/27_io/fpos.cc: Same. + * testsuite/27_io/istream_extractor_arith.cc: Same. + * testsuite/27_io/istream_unformatted.cc: Same. + * testsuite/27_io/ostream_inserter_arith.cc: Same. + * testsuite/27_io/streambuf.cc: Same. + +2000-10-30 Mark Mitchell + + * acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT): Check + for cabs, cabsf, and cabsl, too. + * aclocal.m4: Regenerated. + * config.h.in: Likewise. + * configure: Likewise. + * libmath/Makefile.am (libmath_la_SOURCES): Remove cabs.c and + cabsf.c. + * libmath/Makefile.in: Regenerated. + * libmath/complex-stub.h (cabs): Don't declare if the system + already provides this function. + (cabsf): Likewise. + (cabsl): Likewise. + * src/complex.cc (abs): Directly use `hypot' since we can't call + cabs on IRIX. + +2000-10-30 Joseph S. Myers + + * acinclude.m4: Update URL on egcs.cygnus.com to point to + gcc.gnu.org. + * aclocal.m4, configure: Regenerate. + * src/gen-num-limits.cc, include/bits/c++config, + include/bits/stl_config.h: Remove EGCS references. + +2000-10-29 Mark Mitchell + + * mkcheck.in (test_file): Use -rpath, rather than --rpath, when + building shared executables. + +2000-10-29 Mark Harig + + * src/Makefile.am: Change logic for include dir options. + * src/Makefile.in: Regenerate. + * libsupc++/Makefile.am: Ditto. + * libsupc++/Makefile.in: Regenerate. + +2000-10-29 Benjamin Kosnik + + * configure.in: Simplify use of AC_CACHE_SAVE. Put linked files + in $(top_builddir)/include/bits, not $(top_builddir)/bits, to help + with libgcj build issues and improve consistency with the source + directory's include directory setup. + * configure: Regenerate. + * acinclude.m4: Same here. + * aclocal.m4: Regenerate. + * mknumeric_limits (OUT_H): Also change paths here. + * mkcheck.in (C_DIR): And here. + * mkc++config (OUT_H): And here. + * libmath/Makefile.am (INCLUDES): And here. + * src/Makefile.am (INCLUDES): Change to $(top_builddir)/include. + * libio/Makefile.am: Ditto. + * libsupc++/Makefile.am (INCLUDES): Ditto. + +2000-10-29 Mark Mitchell + + * config/c_io_libio.cc (basic_file::__basic_file): + Don't pass a NULL _IO_wide_data to _IO_no_init when + _GLIBCPP_USE_WCHAR_T is not defined. + * config/c_io_libio.h (_IO_codecvt): Don't declare when + _GLIBCPP_USE_WCHAR_T is not defined. + * config/c_io_libio_codecvt.c: Don't compile it + when _GLIBCPP_USE_WCHAR_T is not defined. + * include/bits/codecvt.h (codecvt<_InternT, _ExternT, __enc_traits): + Don't define this specialization when _GLIBCPP_USE_WCHAR_T + is not defined. + * include/bits/locale_facets.h (): Don't + include it when _GLIBCPP_USE_WCHAR_T is not defined. + * src/codecvt.cc (__enc_traits::_S_max_size): Don't define + when _GLIBCPP_USE_WCHAR_T is not defined. + * src/localename.cc (locale::_Impl::_M_construct_collate): + Don't call wide-character functions when _GLIBCPP_USE_WCHAR_T is + not defined. + (locale::_Impl::_M_construct_ctype): Likewise. + (locale::_Impl::_M_construct_monetary): Likewise. + (locale::_Impl::_M_construct_numeric): Likewise. + (locale::_Impl::_M_construct_time): Likewise. + (locale::_Impl::_M_construct_messages): Likewise. + + * acinclude.m4 (GLIBCPP_ENABLE_ATOMICITY): Handle IRIX. + * aclocal.m4: Regenerated. + * configure: Likewise. + * config/os/irix/bits/atomicity.h: New file. + * config/os/irix/bits/os_defines.h (_POSIX_SOURCE): Undefine. + (__off_t): Define. + (__off64_t): Likewise. + (__ssize_t): Likewise. + (_G_USING_THUNKS): Define to zero. + +2000-10-28 Mark Mitchell + + * src/string-inst.cc (basic_string::npos): Explicitly + instantiate it. + +2000-10-26 Benjamin Kosnik + + * include/c/bits/std_cmath.h: Fix double declarations in namespace std. + + Clean up naming, consistency in "C" library autoconf testing. + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): For consistency, change to + GLIBCPP_CHECK_CTYPE_SUPPORT. + (GLIBCPP_CHECK_STDLIB_SUPPORT): Add. + * aclocal.m4: Regenerate. + * configure.in: And here. + Add call to GLIBCPP_CHECK_STDLIB_SUPPORT. + * configure: Regenerate. + +2000-10-26 David Edelsohn + + * acinclude.m4 (GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2): New macro. + (GLIBCPP_CHECK_MATH_SUPPORT): Use it to test for strtold. + +2000-10-26 Phil Edwards + David Edelsohn + + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Comment out + --gc-sections stuff entirely to avoid misleading people. + (GLIBCPP_ENABLE_CSTDIO): Merge need_libio and need_xtra_libio. + * libio/Makefile.am (LIBIO_SRCS,LIBIO_WSRCS,LIBIO_XTRA_SRCS): + Rearrange and merge. + * libio/libio.h: Simplify, make fewer assumptions. Define those + macros which must be defined. + * config/os/solaris/solaris2.7/bits/os_defines.h: Simplify as a + result. + +2000-10-26 Mark Mitchell + + * include/backward/streambuf.h: New file. + +2000-10-26 David Edelsohn + + * config/os/aix/bits/ctype_inline.h (is): Use __OBJ_DATA directly. + * config/os/aix/bits/ctype_noninline.h (do_tolower): Fix typo. + * config/os/aix/bits/os_defines.h: Add AIX defines. + +2000-10-26 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Remove. + * aclocal.m4: Regenerate. + * configure.in: Remove GLIBCPP_ENABLE_LONG_DOUBLE. + * configure: Regenerate. + * docs/configopts.html: Remove. + * src/complexl.cc: Revert. + * config.h.in: Remove. + * include/c_std/bits/std_cmath.h: Remove guards based on + _GLIBCPP_USE_LONG_DOUBLE. + * include/c/bits/std_cmath.h: Same. Format. Match c_std behavior + with respect to long double signatures. + + * config/os/aix/bits/ctype_noninline.h (ctype): Remove throw + specification. + * config/os/newlib/bits/ctype_noninline.h (ctype): And here. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same. + * config/os/generic/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/bits/ctype_noninline.h (ctype): Same. + +2000-10-26 Gabriel Dos Reis + + * include/bits/std_valarray.h (valarray::valarray): Fix thinko. + Use __valarray_copy_construct only where appropriate. + +2000-10-25 Mark Mitchell + + * Makefile.in (check): Don't make mkcheck executable. + (check-install): Likewise. + * configure.in (AC_OUTPUT): Make mkcheck executable. + * mkcheck.in (top_srcdir): New variable. + (INC_PATH): Set the path to the backward and ext directories + correctly. + +2000-10-25 Phil Edwards + + * configure.in: Check for gconv.h. + * libio/wfileops.c: Wrap gconv.h in HAVE_GCONV_H. + + * config/c_io_libio_codecvt.c: Change __mbstate_t to __c_mbstate_t. + * libio/_G_config.h: And here. + * libio/iofwide.c: And here. + * libio/libio.h: And here. + + * config/os/solaris/solaris2.7/bits/ctype_noninline.h: Remove + exception specification to match declaration. + * include/bits/locale_facets.tcc: Include bits/std_clocale.h. + +2000-10-24 Mark Harig + + * docs/configopts.html: Added documentation for the + "--enable-version-specific-runtime-libs" and + "--with-gxx-include-dir" configuration switches. + +2000-10-24 Benjamin Kosnik + + * include/bits/stl_pair.h (make_pair): Add LWG solution. + + * testsuite/21_strings/compare.cc (test01): Inject namespace std + into the mix. + + * mkcheck.in (MAX_MEM_USAGE): Bump up to 3072. Strangely enough, + this works. + +2000-10-24 Levente Farkas + + * include/bits/std_bitset.h (_M_do_find_next): Fix typo. + +2000-10-24 Phil Edwards + + * acconfig.h: List _GLIBCPP_USE_THREADS. + * acinclude.m4: General formatting cleanup (tabs/spaces), typo + correction, etc. Add comments about following *real* changes + where they are used. + (GLIBCPP_ENABLE_C_MBCHAR): New test... + (GLIBCPP_CHECK_WCHAR_T_SUPPORT): ...results used here. + (GLIBCPP_ENABLE_CSTDIO): Define need_wlibio iff wide characters + are requested. + (GLIBCPP_ENABLE_THREADS): If threads are used, define new + macro _GLIBCPP_USE_THREADS in c++config.h. + (GLIBCPP_ENABLE_SHADOW): For C_INCLUDE_DIR, change () to {} as + this is used in both makefiles and shell scripts (mkcheck). + * configure.in: Call GLIBCPP_ENABLE_C_MBCHAR. + + * libio/_G_config.h: Wrap _IO_MTSAFE_IO in _GLIBCPP_USE_THREADS. + * config/c_io_libio.h: In nonthreaded case, typedef __c_lock to + something harmless, like int. + + * config/os/aix/bits/os_defines.h: Guard with _GLIBCPP_OS_DEFINES, + add comment/instructions. + * config/os/bsd/bits/os_defines.h: Ditto. + * config/os/generic/bits/os_defines.h: Ditto. + * config/os/gnu-linux/bits/os_defines.h: Ditto. + * config/os/irix/bits/os_defines.h: Ditto. + * config/os/newlib/bits/os_defines.h: Ditto. + * config/os/solaris/solaris2.5/bits/os_defines.h: Ditto. + * config/os/solaris/solaris2.6/bits/os_defines.h: Ditto. + + * mkcheck.in: Limit the available heap size for testsuite + binaries, initially at 2MB. + +2000-10-23 Benjamin Kosnik + + * testsuite/21_strings/compare.cc (test01): Add using declarations. + + * include/c_std/bits/std_cerrno.h: And here. + * include/c_std/bits/std_cassert.h: Tweaks. + + * mkcheck.in: Simplify. + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Simplify. + (GLIBCPP_ENABLE_LONG_LONG): Same. + * aclocal.m4: Regenerate. + + * src/Makefile.am (c_shadow_headers): Add features.h, + bits/wrap_features.h. + * src/Makefile.in: Regenerate. + * include/c_std/features.h: New file. + * include/c_std/bits/wrap_features.h (_CPP_WRAP_FEATURES_H): New + file. Need to have c++config.h included before this file so + _ISOC99_SOURCE around. + + * include/c_std/sys/cdefs.h: Hack. + * include/c_std/stdlib.h: Same, use c++config.h. + * include/c_std/bits/std_cstdlib.h: Use _GLIBCPP_HAVE_STRTOLD. + + * include/c_std/bits/std_cassert.h: Fix. + * include/c_std/bits/std_cerrno.h: Make consistent. + + * include/c_std/bits/std_csetjmp.h (setjmp): Unscope global + declaration from ::_C_legacy to _C_legacy. + + * include/c_std/bits/std_cstdio.h: same with printf. + * include/c_std/stdio.h: And here. + + * include/c_std/bits/std_cstdlib.h: abort, exit comment. + * include/c_std/stdlib.h: Same here. + +2000-10-23 Benjamin Kosnik + + * testsuite/21_strings/compare.cc (test01): Add using declarations. + + * include/c_std/bits/std_cerrno.h: And here. + * include/c_std/bits/std_cassert.h: Tweaks. + + * mkcheck.in: Simplify. + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): Simplify. + (GLIBCPP_ENABLE_LONG_LONG): Same. + * aclocal.m4: Regenerate. + + * src/Makefile.am (c_shadow_headers): Add features.h, + bits/wrap_features.h. + * src/Makefile.in: Regenerate. + * include/c_std/features.h: New file. + * include/c_std/bits/wrap_features.h (_CPP_WRAP_FEATURES_H): New + file. Need to have c++config.h included before this file so + _ISOC99_SOURCE around. + + * include/c_std/sys/cdefs.h: Hack. + * include/c_std/stdlib.h: Same, use c++config.h. + * include/c_std/bits/std_cstdlib.h: Use _GLIBCPP_HAVE_STRTOLD. + + * include/c_std/bits/std_cassert.h: Fix. + * include/c_std/bits/std_cerrno.h: Make consistent. + + * include/c_std/bits/std_csetjmp.h (setjmp): Unscope global + declaration from ::_C_legacy to _C_legacy. + + * include/c_std/bits/std_cstdio.h: same with printf. + * include/c_std/stdio.h: And here. + + * include/c_std/bits/std_cstdlib.h: abort, exit comment. + * include/c_std/stdlib.h: Same here. + +2000-10-21 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_DOUBLE): New macro. + * aclocal.m4: Regenerate. + * configure.in: Use it. + * configure: Regenerate. + * src/complexl.cc: Fixup. + * include/c_std/bits/std_cmath.h: Fixup. + * include/c/bits/std_cmath.h: Fixup. + * docs/configopts.html: Add docs. + + * docs/links.html: Add links to defects list, standards FAQ. + + * testsuite/21_strings/ctor_copy_dtor.cc (test01): Disable tests + with string creation that allocate huge ammounts of memory. + + * include/c/bits/std_cstddef.h: Put size_t, ptrdiff_t in + namepace std. + +2000-10-21 Theodore Papadopoulo + + * libsupc++/exception.cc: Use namespace std. + * libsupc++/new: DITTO. + * libsupc++/new_op.cc: DITTO. + * libsupc++/new_opnt.cc: DITTO. + * libsupc++/new_opv.cc: DITTO. + * libsupc++/new_opvnt.cc: DITTO. + * libsupc++/tinfo.cc: DITTO. + * libsupc++/tinfo.h: DITTO. + * libsupc++/vec.cc: DITTO. + * libsupc++/Makefile.am: Blank lines removal. + +2000-10-21 Joseph S. Myers + + * docs/configopts.html, docs/install.html, docs/17_intro/BADNAMES, + docs/17_intro/howto.html, docs/18_support/howto.html, + docs/19_diagnostics/howto.html, docs/20_util/howto.html, + docs/21_strings/howto.html, docs/22_locale/howto.html, + docs/23_containers/howto.html, docs/24_iterators/howto.html, + docs/25_algorithms/howto.html, docs/26_numerics/howto.html, + docs/27_io/howto.html, docs/ext/howto.html, docs/faq/index.html: + Remove many EGCS references; use current absolute URLs on + gcc.gnu.org or sources.redhat.com for messages in list archives. + * docs/faq/index.txt: Regenerate. + +2000-10-19 Benjamin Kosnik + + * testsuite/22_locale/codecvt_unicode_char.cc (test01): Adjust + creation of state_type for unicode_codecvt to take into account + the byte order markings. Add distinct tests for UCS-2BE and UCS-2LE. + * testsuite/22_locale/codecvt_unicode_wchar_t.cc (test01): Same. + * include/bits/codecvt.h (__enc_traits): Add support for encodings + that need a byte order marker. Needed for correct unicode support. + + * src/locale.cc: Remove explicit qualification std::. + (locale::locale(const char* __name)): Revert, as named locale + support not finished. + * src/localename.cc (locale::_Impl:: _Impl(size_t __numfacets, + size_t __refs, bool __has_name = false, string __name): Move + default argument... + * include/bits/localefwd.h: Here. + +2000-10-18 Chip Salzenberg + + * libio/libio.h (_IO_USER_LOCK): Define. + +2000-10-18 Benjamin Kosnik + + * libsupc++/Makefile.am (exception): Change exception.cc to + exception_support.cc. + (CXXLINK): Remove bogus --tag CC. + * libsupc++/Makefile.in: Regenerate. + * libsupc++/exception.cc: Move to... + * libsupc++/exception_support.cc: ...here. + + * src/Makefile.am: Remove bogus --tag CC. + * src/Makefile.in: Regenerate. + + * include/bits/locale_facets.tcc (use_facet): Simplify. + * include/bits/locale_facets.h (use_facet >): Correct + use_facet declaration. Replace 'const ctype' with ctype. + (use_facet >): Same. + * src/locale-inst.cc: Remove explicit instantiation. + * src/locale.cc: Correct signature here too. + (_Bad_use_facet::what()): Correct error string. + * include/bits/localefwd.h: Correct comment. + + * mkcheck.in (C_DIR): Change libsupc++/include to libsupc++. + +2000-10-17 Martin Buchholz + + * testsuite/27_io/istream_seeks.cc: Fix spelling typo. + * testsuite/27_io/ostream_seeks.cc: Similarly. + +2000-10-17 Benjamin Kosnik + + via Alexandre Oliva + * libsupc++/Makefile.am: Add --tag CXX, --tag CC, comments. + * libsupc++/Makefile.in: Regenerate. + * src/Makefile.am: Duplicate code. + * src/Makefile.in: Regenerate. + + * acinclude.m4 (GLIBCPP_ENABLE_RELIBGCC): Take this out. + * aclocal.m4: Regenerate. + * configure.in: And here. + * configure: Regenerate. + + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Disable + test for SECTION_LDFLAGS. + +2000-10-16 Benjamin Kosnik + + Shadow headers would work if libsupc++ was strict about namespaces. + This only possible if g++ maps std::size_t -> size_t. (Hint hint.) + * include/c_std/assert.h: Add guards. + * include/c_std/bits/std_climits.h: Correct typo. + * include/c_std/ctype.h: Remove #error. + + * libio/libioP.h: Break up extern "C" bits around includes. + * libio/libio.h: Only include C headers, or else _C_legacy namespaces + will be nested. + * libio/libioP.h: Same here. + +2000-10-15 Theodore Papadopoulo + + * include/c_std/unistd.h: Define some types only when defined in + the original unistd.h. + * include/c_std/bits/std_cstddef.h: Explicitly ask for the + definition of size_t, ptrdiff_t and NULL. + * include/c_std/bits/wrap_unistd.h: Blank lines removal. + +2000-10-15 Phil Edwards + + * docs/configopts.html: Remove libgcc-rebuild; HTML formatting. + +2000-10-13 Benjamin Kosnik + Mark Harig + + * src/Makefile.am (toolexeclibdir): Add support fo + VERSION_SPECIFIC_LIBS and --with-gxx-include-dir. + * src/Makefile.in: Regenerate. + * libsupc++/Makefile.am: Same. + (glibcppinstalldir): Adjust. + * libsupc++/Makefile.in: Regenerate. + * Makefile.am: Remove gxx_include_dir. Remove INCLUDE. + * Makefile.in: Regenerate. + * docs/configopts.html: Add descriptions of flags. + +2000-10-11 Benjamin Kosnik + + * libsupc++/Makefile.am: Use it. + * libio/Makefile.am: Use it. + * libmath/Makefile.am: Use it. + * src/Makefile.am: Use it. + * Makefile.am (AM_MAKEFLAGS): Remove includes. + + * acinclude.m4 (GLIBCPP_EXPORT_INCLUES): Move include macros here. + (GLIBCPP_EXPORT_FLAGS): Move CXX flag setting here. + * configure.in: Use it. + + * mkcheck.in (SRC_DIR): Use C_INCLUDE_DIR. + + * src/Makefile.am (CXXCOMPILE): Remove. + * src/Makefile.in: Regenerate. + * libsupc++/Makefile.am (CXXCOMPILE): Same here. + * libsupc++/Makefile.in: Regenerate. + + * include/c_std/*: Merge with shadow. + * include/c_std/bits/*: Same. + + * shadow: Remove directory. + * shadow/*: De-populate. + +2000-10-11 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Comment out + exception-throwing code for linker test. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-10-10 Benjamin Kosnik + + * Makefile.am (LIBSUPCXX_INCLUDES): Adjust. + * libsupc++/include: Remove + * libsupc++/include/*: Move to ... + * libsupc++: Here. + * libsupc++/Makefile.am (glibcppinstall_HEADERS): Install headers. + (glibcppinstalldir): New. + + * src/Makefile.am (c_base_headers): New. + (c_shadow_headers): New + (c_headers): New. + (myinstallheaders): Correct install issues. + * src/Makefile.in: Regenerate. + + * Makefile.am (CSHADOW_INCLUDES): Simplify. + * Makefile.in: Regenerate. + * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add c_include_dir. + * aclocal.m4: Regenerate. + * mkcheck.in (SRC_DIR): Use it. + + * include/bits/std_stdexcept.h: And here. + * include/bits/std_ios.h: Change std_exception.h to exception. + * src/locale.cc: And here. + * src/locale-inst.cc: And here. + + * include/bits/valarray_array.h: And here. + * include/bits/stl_alloc.h: And here. + * include/bits/stl_algobase.h: And here. + * include/bits/pthread_allocimpl.h: And here. + * include/bits/stl_construct.h: Change to std_new.h to new. + + * include/bits/locale_facets.h: Change std_typeinfo.h to typeinfo. + + * src/Makefile.am (INCLUDES): Add LIBSUPCXX_INCLUDES. + (headers): Remove duplicated headers. + (std_headers): And here. + * src/Makefile.in: Regenerate. + * libsupc++/Makefile.am (LIBSUPCXX_INCLUDES): Remove. + * libsupc++/Makefile.in: Regenerate. + * Makefile.am (LIBSUPCXX_INCLUDES): Add here. + (AM_MAKEFLAGS): And here. + * Makefile.in: Regenerate. + * include/bits/std_typeinfo.h: Remove. + * include/bits/std_new.h: Remove + * include/bits/std_exception.h: Remove. + * std/new: Remove. + * std/typeinfo: Remove. + * std/exception: Remove. + + * libio/_G_config.h (__need_ptrdiff_t): Add. + + * libsupc++/include/new: Change stddef.h to cstddef. + * libsupc++/tinfo.h: Change limits.h to climits. + * libsupc++/pure.cc: Comment out _GNU_LIBRARY_ bits, as this + renders the file uncompilable. Add copyright. + + * include/c_std/bits/std_cstddef.h: Don't bring wchar_t into std + namespace, as it is a fundamental type. + +2000-10-09 Richard Henderson + + * libsupc++/pure.cc: New file. + * libsupc++/Makefile.am (INCLUDES): Add top_builddir. + (sources): Add pure.cc. + * libsupc++/Makefile.in: Regenerate. + +2000-10-09 Benjamin Kosnik + + * docs/configopts.html: Edit. + + * libio/Makefile.am (INCLUDES): Remove duplicates, simplify. + * libio/Makefile.in: Regenerate. + * libmath/Makefile.am (INCLUDES): Remove duplicates, simplify. + * libmath/Makefile.in: Regenerate. + * libsupc++/Makefile.am (INCLUDES): Remove duplicate. + * libsupc++/Makefile.in: Regenerate. + + * Makefile.am (AM_MAKEFLAGS): Add GLIBCPP_INCLUDES, + TOPLEVEL_INCLUDES, LIBMATH_INCLUDES, LIBIO_INCLUDES, + CSHADOW_INCLUDES up here. + * Makefile.in: Regenerate. + * src/Makefile.am (CSHADOW_INCLUDES): Add include/c_std, include/c + for shadow headers. + (myinstallheaders): Change glibcpp_includedir to GLIBCPP_INCLUDES. + Move GLIBCPP_INCLUDES, TOPLEVEL_INCLUDES, LIBMATH_INCLUDES, + LIBIO_INCLUDES, CSHADOW_INCLUDES up Makefile hierarchy. + * src/Makefile.in: Regenerate. + + * include/c: New directory. + * include/c/bits/(std_cassert.h, std_cctype.h, std_cerrno.h, + std_cfloat.h, std_climits.h, std_clocale.h, std_cmath.h, + std_csetjmp.h, std_csignal.h, std_cstdarg.h, std_cstddef.h, + std_cstdio.h, std_cstdlib.h, std_cstring.h, std_ctime.h, + std_cwchar.h, std_cwctype.h): Add, moving from... + * include/bits: ...here. + * include/c_std: New directory. + * include/c_std/bits/*: Populate from... + * shadow: ...here. Remove directory. + +2000-10-08 Benjamin Kosnik + + * libsupc++/Makefile.am (INCLUDES): Add toplevel include directory. + (INCLUDES): Add glibcpp_includedir. + * libsupc++/Makefile.in: Regenerate. + + * acinclude.m4 (GLIBCPP_CHECK_OS): Link to os_defines.h. + * aclocal.m4: Regenerate. + * config/os/*/bits/os_defines: Adjust copyright dates. + +2000-10-08 Phil Edwards + + * include/bits/c++config: Include + * config/os/aix/bits/os_defines.h: New file. + * config/os/bsd/bits/os_defines.h: Ditto. + * config/os/generic/bits/os_defines.h: Ditto. + * config/os/gnu-linux/bits/os_defines.h: Ditto. + * config/os/irix/bits/os_defines.h: Ditto. + * config/os/newlib/bits/os_defines.h: Ditto. + * config/os/solaris/solaris2.5/bits/os_defines.h: Ditto. + * config/os/solaris/solaris2.6/bits/os_defines.h: Ditto. + * config/os/solaris/solaris2.7/bits/os_defines.h: Ditto. + +2000-10-07 David Edelsohn + + * config/os/aix/bits/atomicity.h: New file. + +2000-10-07 Benjamin Kosnik + + * acinclude.m4: Remove CPU_FLAGS + * libio/Makefile.am: Here too. + * Makefile.am: Here too. + + * src/Makefile.am (CONFIG_INCLUDES): Remove. + (INCLUDES): Remove CONFIG_INCLUDES. + (cpu_headers): Remove. + (myinstallheaders): Remove cpu_headers. + (generated_headers): Rename to build_headers. + (build_headers): Add atomicity.h, ctype_base.h, + ctype_specializations.h. + + * config/os: New directory. + * config/aix: Move to... + * config/bsd: Move to... + * config/generic: Move to... + * config/gnu-linux: Move to... + * config/irix: Move to... + * config/newlib: Move to... + * config/solaris: Move to... + * config/os/*: Here. + +2000-10-07 Benjamin Kosnik + + * acinclude.m4: Remove CPU_FLAGS + * libio/Makefile.am: Here too. + * Makefile.am: Here too. + + * src/Makefile.am (CONFIG_INCLUDES): Remove. + (INCLUDES): Remove CONFIG_INCLUDES. + (cpu_headers): Remove. + (myinstallheaders): Remove cpu_headers. + (generated_headers): Rename to build_headers. + (build_headers): Add atomicity.h, ctype_base.h, + ctype_specializations.h. + + * config/os: New directory. + * config/aix: Move to... + * config/bsd: Move to... + * config/generic: Move to... + * config/gnu-linux: Move to... + * config/irix: Move to... + * config/newlib: Move to... + * config/solaris: Move to... + * config/os/*: Here. + +2000-10-06 Benjamin Kosnik + + * src/Makefile.am: Remove OPTIMIZE_CXXFLAGS, WARN_CXXFLAGS, + CONFIG_CXXFLAGS from here, and move to... + * src/Makefile.in: Regenerate. + * Makefile.am: ... here. Clean. + (OPTIMIZE_CXXFLAGS): Move up Makefile hierarchy to here. + (WARN_CXXFLAGS): Same. + (CONFIG_CXXFLAGS): Same. + * Makefile.in: Regenerate. + * libsupc++/Makefile.am: Use top-level OPTIMIZE_CXXFLAGS, + WARN_CXXFLAGS, CONFIG_CXXFLAGS as part of local AM_CXXFLAGS. + * libsupc++/Makefile.in: Regenerate. + + Change math to libmath. + * math: Move to libmath, delete. + * libmath: New directory. + * libmath/*: Populate. + * src/Makefile.am (LIBMATH_INCLUDES): Change to libmath. + (libstdc___la_LIBADD): Same. + * src/Makefile.in: Regenerate. + * configure.in: Add AC_OUTPUT for libmath/Makefile. + * configure: Regenerate. + * Makefile.am (SUBDIRS): Add libmath. + * Makefile.in: Regenerate. + * README (file): Change name. + +2000-10-06 Benjamin Kosnik + Richard Henderson + Alexandre Oliva + + * libsupc++: New directory. + * libsupc++/*: Populate. + * libsupc++/Makefile.am (INCLUDES): Add -I../../gcc for + eh-common.h, gansidecl.h. + * configure.in: Add in libsupc++/Makefile to AC_OUTPUT. + * configure: Regenerate. + * Makefile.am (SUBDIRS): Add libsupc++. + * Makefile.in: Regenerate. + * src/Makefile.am (libstdc___la_LIBADD): Add in libsupc++.la + * src/Makefile.in: Regenerate. + * libio/Makefile.am: Remove extraneous, confusing bits. + * libio/Makefile.in: Regenerate. + +2000-10-05 Brent Verner + + * bits/istream.tcc [basic_istream::get(basic_streambuf&)]: Removed + test for _M_gcount < in_avail(), as in_avail() only reports info + for current buffer, causing method to return at end of buffer. + * testsuite/27_io/istream_unformatted.cc [test07()]: New test. + * testsuite/27_io/istream_unformatted-3.txt: New file. + * testsuite/27_io/istream_unformatted-3.tst: New file. + +2000-10-05 Benjamin Kosnik + + * README (file): Adjust directory structures. + * mkcheck.in (INC_PATH): Adjust for header changes. + +2000-10-05 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Tweaks to message texts + for public relations purposes. + * aclocal.m4: Regenerated. + * configure: Regenerated. + + * docs/ext/howto.html: Additional explanation about hashing. + +2000-10-05 Benjamin Kosnik + + * include: New directory. + * include/backward: New directory. + * include/bits: New directory. + * include/ext: New directory. + * include/std: New directory. + * include/*/*: Populate. + + * backwards: Move to include/backwards, delete. + * bits: Move to include/bits, delete. + * ext: Move to include/ext, delete. + * std: Move to include/std, delete. + + * src/complex.cc: Adjust include of mathconf. + + * mkc++config (BASE_H): Add include. + + * src/Makefile.am: Support for topleve sources include directory. + (INCLUDES): Add LIBMATH_INCLUDE. + * src/Makefile.in: Regenerate. + * math/Makefile.am (INCLUDES): Append /include. + * math/Makefile.in: Regenerate. + * libio/Makefile.am (INCLUDES): Add glibcpp_includedir. + * libio/Makefile.in: Regenerate. + +2000-10-04 Benjamin Kosnik + + * libio/_G_config.h : Re-guard the __mbstate_t declaration. + +2000-10-03 Benjamin Kosnik + + * docs/22_locale/howto.html: Add link to proto-documentation on + locales. + * docs/documentation.html: Rename links for clarity. + + * src/Makefile.am (headers): Remove unistd.h, wrap_unistd.h. Add + fcntl.h, iolibio.h, libioP.h, pthread.h, iconv.h. + * src/Makefile.in: Regenerate. + +2000-10-02 Steven King + + * mkcshadow: Fixed script to output proper include guard. + * bits/char_traits.h: Cleaned up types in char_traits functions. + * libio/_G_config.h: Hacked to make work with shadow heraders. + * shadow/*: Hacked to make shadow headers work. + +2000-10-02 Benjamin Kosnik + + Self-compile with shadow headers. + * acconfig.h (_GLIBCPP_USE_SHADOW_HEADERS): Define. Eventually, + like _GLIBCPP_USE_NAMESPACES before it, this macro will die when + it becomes the default way the library is built. + * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): New macro. + * config/gnu-linux/bits/ctype_base.h (ctype_base): Use it. + * config/gnu-linux/ctype.cc (ctype): Use it. + + * src/localename.cc (locale::_Impl::_M_replace_categories): Remove + call to assert. + * src/locale.cc: Explicitly cast mbstate_t to void* in calls to + memset. This should not be necessary, but an ambiguous overload + with it in. + + * shadow/bits/std_cwchar.h: Fix. + * shadow/wchar.h: Fix. + + * config/gnu-linux/bits/ctype_base.h (ctype_base): Inject ctype + enums into namespace std:: for ctype_base enum. Other OS types + will have to do this as well. + * config/gnu-linux/ctype.cc (ctype): Inject ctype data into + namespace std, in particular __ctype_toupper, __ctype_tolower, + __ctype_b. + + * shadow/iolibio.h: New file. + * shadow/bits/wrap_iolibio.h: New file. + * shadow/libioP.h: New file. + * shadow/bits/wrap_libioP.h: New file. + * shadow/bits/wrap_fcntl.h: New file. + * shadow/fcntl.h: New file. + * shadow/iconv.h: New file. Inject iconv names into the global + namespace, unmangled for the moment. + * shadow/bits/wrap_iconv.h: New file. + * shadow/unistd.h: Remove. Useless. + * shadow/bits/wrap_unistd.h: Remove. + + * src/Makefile.am: Take out machine-ansi.h, add fcntl.h unistd.h. + * src/Makefile.in: Regenerate. + + * config/c_io_libio.h (_IO_codecvt): Change to normal C++ decl. + + * shadow/libio.h: Fix. + * shadow/bits/wrap_libio.h: Fix. + + * shadow/bits/std_clocale.h: Remove typedef struct construct, + which will not compile. + * shadow/bits/std_ctime.h: Same. + + * shadow/pthread.h: New file. Put pthreads types and functions + into global scope, which is probably not the correct long-term + solution but has to be done at the moment before libio wrappers + can even be started. + * shadow/bits/wrap_pthread.h: New file. + + * bits/std_ios.h: Formatting tweak. + * shadow/bits/std_cstdio.h: Format. Remove extraneous bits. + + * acinclude.m4 (GLIBCPP_CHECK_COMPILER_FEATURES): Add -Werror to + tests for compiler features. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * config/c_io_libio.cc: Remove fcntl.h include, as SEEK_SET + redefined. + * libio/libioP.h: Comment out fcntl.h include. + + * shadow/math.h: Add in float and long declarations, as per ISO C9X. + + * bits/c++config: Define _ISOC99_SOURCE. + + * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Add -fno-builtins to + CSHADOWFLAGS, as well as _ISOC99_SOURCE. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.am (CSHADOW_INCLUDES): Enable, again. + (CSHADOW_INCLUDES): Add -I$(top_srcdir)/std before shadow include dir. + (CXXCOMPILE): Remove $(DEFS), which searches $(top_srcdir) before + std or shadow directories. + (LTCXXCOMPILE): Same. + (INCLUDES): Add $(top_builddir) before $(top_srcdir). + (AC_CXXFLAGS): Add CSHADOWFLAGS. + * src/Makefile.in: Regenerate. + + * src/complex.cc (FCT): Change ::name to name. + * src/complexl.cc (FCT): Same. Use _GLIBCPP_USE_LONG_LONG here. + * src/complexf.cc (FCT): Same. + + * src/complexf.cc: Remove FCT define, as things are properly + overloaded in the std namespace with the shadow headers. + * src/complexl.cc: Same. + * src/complex.cc: Same. + +2000-09-25 Phil Edwards + + * docs/documentation.html: Add link to... + * docs/ext/howto.html: ...this. New dir/file, describing library + extensions (both ours and SGI's). + * docs/faq/index.html: Small updates. + * docs/faq/index.txt: Regenerate. + +2000-09-25 Theodore Papadopoulo + + * bits/basic_file.h (_M_open_mode): Remove extra qualifier. + +2000-09-25 Levente Farkas + + * ext/stl_hashtable.h (_M_copy_from): Change __copy to __local_copy. + +2000-09-19 Benjamin Kosnik + + * src/localename.cc (locale::_Imp) : Remove typedefs. + * bits/localefwd.h (locale::locale(const locale& __other, _Facet* + __f): Consistency check, call _Imp ctor with reference argument + of 1. + * bits/localefwd.h: Change _S_num_categories to + _S_categories_num. Add new data member, _S_facets_num, which is + the number of standard facets. + +2000-09-19 Phil Edwards + + * docs/21_strings/howto.html: Fix editor lossage from last commit. + +2000-09-19 Phil Edwards + + * docs/thanks.html: More thanks. + * docs/18_support/howto.html: Fix thinko. + * docs/21_strings/howto.html: Minor tweaks and updates to URLs. + Redo the string transformation notes and link to... + * docs/22_locale/howto.html: ...here. + +2000-09-18 Benjamin Kosnik + + * src/locale-inst.cc: Add time_put_byname and + time_get_byname instantiations. + * bits/locale_facets.h: Correct default, private derivation to + public derivation in _byname declarations. + * src/locale.cc (locale::classic()): Simplify. + * src/localename.cc (locale::_Impl:: _Impl(const _Impl& __other, + const string& __name, category __cat, size_t __refs): Re-work for + named locales. + (_M_normalize_category_names): Remove. + + * testsuite/22_locale/global_templates.cc (test01): Tweaks. + * testsuite/22_locale/ctor_copy_dtor.cc (test01): More tests. + +2000-09-18 Yuri V. Baskakov + + * bits/std_bitset.h (operator>>): Change to char_type. + +2000-09-15 Benjamin Kosnik + + * src/locale.cc (locale::locale(const char* __name)): Consolidate + name setting. Add checks for NULL __name pointers. Remove calls to + _S_initialize() as initial locale initialization can either be + assumed, or needs to be made consistent throughout locale + constructors. + (locale::locale(const locale& __other, const char* __name, + category __cat): Add checks for NULL name. Add checks for + assignment to self. + * src/localename.cc (locale::_Impl:: _Impl(const _Impl& __other, + const string& __name, category __cat, size_t __refs)): Set correct + name, has_name values. + * testsuite/22_locale/ctor_copy_dtor.cc (test01): More tests. + * docs/22_locale/locale.html: New file, more unfinished docs... + +2000-09-14 Benjamin Kosnik + + * src/locale.cc (locale::name()): Implement. + (_Impl(size_t __numfacets, size_t __refs, bool __namep = false, + string __name = "*")): Change signature. + (locale::classic): Initialize the "C" locale as a named locale. + * bits/localefwd.h (locale): Change _M_num_references to + _M_references. Eliminate _M_cached_name_ok. Rename _M_cached_name + to _M_name. + * bits/localefwd.h: Tweaks. + * src/localename.cc: Tweaks. + * testsuite/22_locale/ctor_copy_dtor.cc (test01): Add tests. + (test01): Fix. + + * bits/basic_string.h: Consistency check, change _M_state -> + _M_references. + +2000-09-14 Brendan Kehoe + + * bits/string.tcc (_Rep::_S_max_size): Use typename for its size_type + return type. + + * src/Makefile.an (headers): Also install backward/fstream.h. + * src/Makefile.in: Regenerate. + + * bits/char_traits.h (char_traits<_CharT>::get_state, + char_traits::get_state, char_traits::get_state): Pass + argument in by reference, not by value. Uglify to _S_get_state. + (char_traits<*>::__eos): Uglify to _S_eos. + * bits/std_ostream.h (ends(basic_ostream<_CharT, _Traits>& __os)): + Change __eos to _S_eos. + +2000-09-13 Benjamin Kosnik + + * testsuite/22_locale/static_members.cc: New file. + * testsuite/22_locale/ctor_copy_dtor.cc: New file. + * src/locale.cc: Minor formatting tweaks. + +2000-09-12 Benjamin Kosnik + + * testsuite/22_locale/global_templates.cc (test01): Add negative + tests for use_facet. + + * bits/localefwd.h (locale::operator()): Minor tweaks. + * bits/locale_facets.tcc (locale::operator()): Same. + * testsuite/22_locale/operators.cc: New file. + + * testsuite/22_locale/facet.cc (output_iterator): Remove + gnu_input_iterator, gnu_output_iterator. + +2000-09-11 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_GNU_MAKE): Remove test != "0". + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * bits/c++config (__GLIBCPP__): Update, in the hopes of making a + snapshot release soon. + (_GNU_SOURCE): Define this in the header files, as ISO C99 support + is pretty much assumed. + + * testsuite/22_locale/global_templates.cc: New file. Add tests for + use_facet and has_facet. + + * bits/codecvt.h (codecvt<_InT, _ExT, __enc_traits>::do_out): + Modify/correct iconv signatures for glibc2.2. + +2000-09-10 Branko Cibej + + * acinclude.m4 (GLIBCPP_CHECK_GNU_MAKE): Replace "grep -q" with + "grep -c". + +2000-09-09 Benjamin Kosnik + + * bits/localefwd.h (locale::_Impl): Scope out types to public. + (locale): Make _Impl declaration public. + +2000-09-08 Felix Natter + + * docs/17_intro/porting-howto.html: New version. + +2000-09-07 Benjamin Kosnik + + * config/cpu/i386/bits/atomicity.h (__exchange_and_add): Change unused + to __unused__. + * config/cpu/ia64/bits/atomicity.h (__exchange_and_add): And here. + * config/cpu/i486/bits/atomicity.h (__exchange_and_add): And here. + +2000-09-07 Phil Edwards + + Add bits for --enable-maintainer-mode: + - turns on enable_debug + (doing "--enable-maint --disable-debug" will DTRT) + - turns on -Werror, now off by default + * acinclude.m4: Add bits. + * aclocal.m4: Regenerate. + * configure.in: Add defaults for GLIBCPP_ENABLE_DEBUG. + * configure: Regenerate. + +2000-09-07 Benjamin Kosnik + + * bits/std_cwctype.h: Remove yesterday's hacks. + +2000-09-07 Brad Garcia + + * bits/stl_tree.h: Make operators !=, == type safe for map, set. + * testsuite/23_containers/set_operators.cc: New file. Should not + compile. + * testsuite/23_containers/map_operators.cc: New file. Ditto. + +2000-09-06 Richard Henderson + Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_CPU): Add ia64 support. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config/cpu/ia64: New directory. + * config/cpu/ia64/bits: New directory. + * config/cpu/ia64/bits/atomicity.h: New file. + +2000-09-06 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Force glibc_satisfactory + to no, so that libstdc++-v3's libio will be built on glibc-2.2 + systems. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * */Makefile.in: Regenerate. + + * bits/std_cwctype.h: Put in temporary hack to work around -O2 + + glibc 2.1.x unsigned errors. Or disable -Werror by default... + + * testsuite/23_containers/vector_element_access.cc: New file. + * bits/stl_config.h (__STL_THROW_RANGE_ERRORS): Define. + +2000-09-06 Levente Farkas + + * bits/string.tcc: Fix up more parameter names. + +2000-09-06 Alexandre Oliva + + * configure: Rebuilt with new libtool.m4. + +2000-09-01 Benjamin Kosnik + + * src/locale-inst.cc: Remove pre-instantiation of unicode + codecvt types. Now unnecessary, as locale header now correct. + +2000-08-31 Benjamin Kosnik + + * bits/locale_facets.tcc (_S_build_float_format): Move ... + * src/locale.cc: Here. + * bits/locale_facets.tcc (num_get::_M_extract): Clean up generic + definition. Move specialization to ... + * src/locale.cc: Here. + * bits/locale_facets.tcc: Move _Format_cache specializations to ... + * src/locale.cc: Here. + * bits/locale_facets.tcc: Move use_facet specializations to ... + * src/locale.cc: Here. + + * bits/std_locale.h: Note that locale_facets.tcc should be + included here, for standards conformance. It may increase + compile times though. For the time being, enable. + * testsuite/22_locale/facet.cc: New file, some parts commented out + for the time being. + + * mkcheck.in: Append total time to test summary file. + + * bits/sbuf_iter.h : Formatting tweaks. + + Clean up static const data member definitions. + * src/locale.cc: Add definitions for all missing locale, + locale::_Imp, and locale::id static data members. + (ctype): Add table_size define. + (money_base): Add _S_default_pattern, uglify. + * bits/localefwd.h: Add definitions for static members of _Count_ones. + * bits/locale_facets.h: Tweaks. + * bits/locale_facets.tcc: Tweaks. + * bits/string.tcc: Add definition for npos. + * bits/ios_base.h: Tweaks. + * bits/ios_base.h (ios_base::Init::_M_ios_base_init): Change to + _S_ios_base_init. + * src/ios.cc: And here. Add _S_local_words definition. + Add definitions for __ios_flags const static data. + * src/codecvt.cc: Same for __enc_traits. + * src/locale-inst.cc: Remove money_base data member definition + here. + +2000-08-30 Benjamin Kosnik + + * testsuite/22_locale/ctype_wchar_t_members.cc (test01): New file. + + * docs/22_locale/codecvt.html: Re-number. + * docs/22_locale/howto.html: Add entry for ctype + documentation. Add entry for Nathan's introduction to locales + paper. + * docs/22_locale/ctype.html: New file. In progress... + + * docs/22_locale/codecvt.html: Formatting cleanups. + * src/locale.cc (ctype::do_is): Fix thinko. + +2000-08-30 Phil Edwards + + * docs/22_locale/codecvt.html: Behind-the-scenes ASCII->HTML + tweaks for certain browsers. + +2000-08-29 Benjamin Kosnik + + * bits/locale_facets.h (ctype): Remove __table_type. + Add include for bits/std_cwctype.h, for wctype_t. + * src/locale.cc (ctype): Implement. + * config/gnu-linux/bits/ctype_base.h (ctype_base): Remove mask + typedef, instead name enum. + * config/gnu-linux/bits/ctype_specializations.h: Tweak. + * config/gnu-linux/ctype.cc: Tweak. + * testsuite/22_locale/ctype.cc: Tweak. + + * bits/codecvt.h (__enc_traits): Uglify names. + +2000-08-28 Benjamin Kosnik + + * docs/22_locale/codecvt.html: Add more bits, format. + * bits/codecvt.h: Add copy ctor, rename types. + * testsuite/22_locale/codecvt_unicode_char.cc: Tweak. + + * libio/iofwide.c: Tweak. + +2000-08-28 Phil Edwards + + * docs/configopts.html: Mention new options. + * docs/install.html: Formatting changes for platform-specific + pre-reqs, previously only Cygwin. + * docs/mail.html: Fix new link. + * docs/thanks.html: A couple more people. + * docs/26_numerics/howto.html: Fix typo. + +2000-08-24 Benjamin Kosnik + + * docs/22_locale/howto.html: Add notes on codecvt implementation. + * docs/22_locale/codecvt.html: New file. In progress. + +2000-08-24 Benjamin Kosnik + + * acconfig.h: Revert. + * acinclude.m4: Revert. + * libio/_G_config.h: Revert. + * libio/libio.h: Revert. + +2000-08-23 Benjamin Kosnik + + * bits/codecvt.h: Tweaks. + * testsuite/22_locale/codecvt_unicode_wchar_t.cc (test01): Fix up + initial string literals for UCS4. + +2000-08-23 Phil Edwards + + * acconfig.h: _GLIBCPP_USING_THREADS and some workaround types added. + * acinclude.m4: New macro, GLIBCPP_ENABLE_WCHAR. Set the threads + definition as well, and some minor spelling/spacing fixes. If + building libio, check for certain typedefs. + * libio/_G_config.h: Wrap _IO_MTSAFE_IO in _GLIBCPP_USING_THREADS. + Conditionally define _LARGEFILE64_SOURCE, otherwise the 64-bit types + will never be there. + * libio/libio.h: In the null case, _IO_lock_t can't just be void. + * src/string-inst.cc: Use _GLIBCPP_USE_WCHAR_T. + + * configure.in: Update the cache a bit more often. + + * mkcheck.in: For check-install, also need to -I the testsuite dir. + +2000-08-22 Benjamin Kosnik + + * src/locale-inst.cc: Add codecvt instantiations for has_facet and use_facet. + * testsuite/22_locale/codecvt_unicode_wchar_t.cc: New file, for + testing two-byte unicode encodings converted to four-byte UCS4 + encodings. + + * bits/codecvt.h (codecvt<__enc_traits>): Fix do_unshift. + * testsuite/22_locale/codecvt_unicode_char.cc (test01): Add + correct state/encoding information. + + * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Add wcsrtombs, + mbsrtowcs checks as codecvt needs them + now. + Add checks for langinfo.h, nl_langinfo function call. + * libio/iofwide.c (_IO_fwide): Simplify, as nl_langinfo is assumed. + +2000-08-22 Richard B. Kreckel + + * config/cpu/alpha/bits/atomicity.h: Change __attribute__ + ((unused)) to __attribute__ ((__unused__)). + * config/cpu/arm/bits/atomicity.h: Same. + * config/cpu/generic/bits/atomicity.h: Same. + * config/cpu/i386/bits/atomicity.h: Same. + * config/cpu/i486/bits/atomicity.h: Same. + * config/cpu/powerpc/bits/atomicity.h: Same. + * config/cpu/sparc/sparc32/bits/atomicity.h: Same. + * config/cpu/sparc/sparc64/bits/atomicity.h: Same. + +2000-08-22 Levente Farkas + + * bits/basic_string.h: Fix up parameter names. + +2000-08-22 Brent Verner + + * src/Makefile.am (INCLUDES): Put $(CSHADOW_INCLUDES) before + $(top_srcdir) + * src/Makefile.in: Regenerate. + +2000-08-21 Benjamin Kosnik + + * bits/codecvt.h: Implement codecvt. Fix + up __enc_traits template so as to be marginally useful. + * src/codecvt.cc: And here. + * bits/char_traits: Tweak. + * bits/locale_facets.h: Tweak. + * bits/locale_facets.tcc: Tweak. + * bits/localefwd.h: Tweak. + * src/locale-inst.cc: Add use_facet/has_facet instantiations here. + * testsuite/22_locale/codecvt_wchar_t_cc.cc: New file. + * testsuite/22_locale/codecvt_char_char.cc: New file. + * testsuite/22_locale/codecvt_unicode_char.cc: New file. + +2000-08-21 Gabriel Dos Reis + + * bits/std_cmath.h (std::abs): Overload for int and long. + +2000-08-20 Benjamin Kosnik + + * src/string-inst.cc: Tweak instantiations for new-gxx-abi. + +2000-08-19 Gabriel Dos Reis + + * bits/valarray_array.h (__valarray_min, __valarray_max): Fix + thinko. Diagnostic messages really need to be improved for + template argument deduction. + +2000-08-18 Benjamin Kosnik + + * bits/valarray_meta.h: Fix typos... + +2000-08-18 Gabriel Dos Reis + + * bits/valarray_meta.h (_Expr<>::shift, _Expr::cshift, + _Expr<>::apply): Implement. + +2000-08-18 Gabriel Dos Reis + + * bits/valarray_meta.h (_Expr<>::min, _Expr<>::max): Implement. + + * bits/valarray_array.h (__valarray_min, __valarray_max): New + function. + +2000-08-17 Mark Mitchell + + * bits/localefwd.h (std::locale): Use explicit `class' specified + when declaring friends. + * bits/std_fstream.h (std::basic_filebuf): Likewise. + +2000-08-16 Alexandre Oliva + + * src/Makefile.am (libstdc++.INC): Renamed from INCLUDES. + * src/Makefile.in: Regenerate. + +2000-08-15 Benjamin Kosnik + + * bits/codecvt.h: New file. + * src/codecvt.cc: New file. + * bits/std_locale.h: Add include here. + * src/Makefile.am (headers): Add codecvt.h + (sources): Add codecvt.cc. + * src/Makefile.in: Regenerate. + * bits/locale_facets.h (codecvt): Re-implement. Rename _Codecvt to + __codecvt_abstract_base in an attempt to point some light this way... + Move __enc_traits and codecvt bits to codecvt.h. + * src/locale-inst.cc: Remove codecvt + explicit instantiation. Separate out codecvt instantiations, simplify. + * src/locale.cc: Move codecvt bits to codecvt.cc + +2000-08-15 Alexandre Oliva + + * src/Makefile.am (INCLUDES): New target file, with all -I flags. + * src/Makefile.in: Regenerate. + +2000-08-14 Benjamin Kosnik + + C/C++ io merge/sync. + * libio/fileops.c + * libio/genops.c + * libio/iofclose.c + * libio/iofopen.c + * libio/iofwide.c + * libio/libio.h + * libio/libioP.h + * libio/stdio.c + * libio/wfileops.c + * libio/wgenops.c + * config/c_io_libio.cc (__basic_file): Add hacky casts to + ((struct _IO_FILE_plus *) in ctors. + (__basic_file): Adjust _wide_data->_codecvt to just _codecvt. + * libio/Makefile.am: Fix copyright. Remove cleanup.c. + * libio/cleanup.c: Remove. + * libio/filedoalloc.c (_IO_file_doallocate): Don't call + _IO_cleanup_registration_needed, even if not libc. + + * testsuite/27_io/stringstream.cc (test02): Fix. + +2000-08-14 Brent Verner + + * testsuite/debug_assert.h: new file + * testsuite/*/*.cc: s/test\s*&=([^;]+);/VERIFY($1);/g + changed conditional #include to + unconditional #include + * mkcheck.in: added $SRC_DIR/testsuite to include search path + for testsuite compile command. + +2000-08-14 Levente Farkas + + * bits/std_fstream.h: Remove duplicate typdefs for ofstream and + wofstream, filebuf, wfilebuf, fstream, wfstream. + * bits/std_streambuf.h: Same for streambuf, wstreambuf. + * bits/std_sstream.h: Same for stringstream and wstringstream. + Same for stringbuf, wstringbuf, istringstream, wistringstream, + ostringstream, wostringstream. + + * testsuite/26_numerics/valarray.cc: Add test. + +2000-08-14 Zack Weinberg + + * configure: Regenerate after change to ../libtool.m4. + +2000-08-10 Benjamin Kosnik + + * bits/locale_facets.tcc: Formatting tweaks. + * bits/locale_facets.h (__enc_traits): Start integrating this + into codecvt, ctype. Formatting tweaks. + +2000-08-09 Benjamin Kosnik + + Preliminary wchar_t implementation, with trivial encodings. + * docs/configopts.html: Add bits about canonical configure option + checking. + + * testsuite/27_io/iostream_objects.cc: Replace this file (which + has newly-declared-illegal mixing of wide/narrow stdstreams) with... + * testsuite/27_io/narrow_stream_objects.cc: New file. + * testsuite/27_io/wide_stream_objects.cc: New file. + + * bits/fstream.tcc (underflow): Temporarily hack a solution + together that writes from the external file to the internal + buffers. This removes codecvt from the loop, and is incorrect. + (_M_really_overflow): Same here. + + * testsuite/21_strings/inserters_extractors.cc (test05): Tweaks. + +2000-08-08 Benjamin Kosnik + Ulrich Drepper + + * config/c_io_libio.h: Tweak. + * config/c_io_libio_codecvt.c: New file. + * libio/Makefile.am: Add c_codecvt.c. + * libio/Makefile.in: Regenerate. + * libio/genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the + stream is not orientated. + + * acinclude.m4: Add config/c_io_libio_codecvt.c dummy file, until + encoding gets fleshed out. + + * bits/basic_file.h: Add specialization declarations. + * config/c_io_libio.cc: Add specializations for pbackfail, uflow. + + * config/c_io_libio.h: Add __c_wfile_type. + * bits/basic_file.h: Add _M_wfile. + + * config/c_io_libio.cc (__basic_file): Initialize the + streams without setting the orientation of the underlying FILE to + either wide or narrow. + (__basic_file)): Enable tricky wchar_t io bits. + +2000-08-07 Felix Natter + + * docs/17_intro/porting-howto.html: New version. + +2000-08-03 Mark Mitchell + + * bits/locale_facets.h (ctype::ctype): Don't name unused + parameters. + +2000-08-01 Benjamin Kosnik + + * docs/install.html: Edit bits about requiring a special version + of the autotools. + +2000-07-31 Benjamin Kosnik + + * libio/fileops.cc: Update to current glibc sources. + * libio/genops.c: Same. + * libio/iofwide.c: Same. + * libio/libio.h: Same. + * libio/libioP.h: Same. + * libio/wfiledoalloc.c: Same. + * libio/wgenops.c: Same. + +2000-07-28 Alexandre Oliva + + * acinclude.m4: Include ../libtool.m4. + * aclocal.m4, configure: Rebuilt. + +2000-07-26 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Test for GNU ld + before trying to use any of its options. + (CHECK_MATH_DECL*,CHECK_BUILTIN_MATH_DECL*): Cache tests. + * aclocal.m4: Regenerate. + * configure.in: Having found GNU make, name it. + * configure: Regenerate. + * docs/install.html: Mention possible problems with caching. + * src/Makefile.am (CXXLINK): Use new OPT_LDFLAGS. + * src/Makefile.in: Regenerate. + * libio/Makefile.in: Regenerate. + * math/Makefile.in: Regenerate. + * Makefile.in: Regenerate. + +2000-07-26 Benjamin Kosnik + + * src/misc-inst.cc (std): Remove instantiations. + + * acinclude.m4: Add forward-looking bits for autoconf. + * aclocal.m4: Regenerate. + + * bits/ostream.tcc (ostream::operator<<): Fix const char* case. + +2000-07-25 Benjamin Kosnik + + * configure.in: Change AM_PROG_LIBTOOL to AC_PROG_LIBTOOL. Change + it back for current versions of maintainer-tools... + * acinclude.m4: Some cleanups... + * aclocal: Regenerated. + * configure: Regenerated. + + * src/Makefile.am (CXXLINK): Add -Wl,-01 to the link line for + optimizing/adapting the hash table using GNU ld. + * src/Makefile.in: Regenerate. + +2000-07-24 H.J. Lu + + * src/Makefile.am (LIBIO_INCLUDES): Set to -I$(top_srcdir)/libio + even if GLIBCPP_NEED_LIBIO is false. The installed glibc header + files don't include private libio header files needed by + libstdc++ v3. + * src/Makefile.in: Rebuild. + +2000-07-24 Benjamin Kosnik + + * bits/std_fstream.h: Parameterize __basic_file. + * config/c_io_libio.cc: Add wchar_t methods for parameterization. + * bits/basic_file.h: Same here. + + * bits/istream.tcc (getline): Tweaks. + + * bits/fstream.tcc: Shorten __retval to __ret. + * bits/ostream.tcc: Same. + * bits/sbuf_iter.h: Same. + * bits/sstream.tcc: Same. + * bits/streambuf.tcc: Same. + * bits/std_fstream.h: Same. + * src/string-inst.cc: Same. + * src/ios.cc: Same. + * config/c_io_libio.cc: Same. + * bits/string.tcc: Same. + * bits/std_streambuf.h: Same. + +2000-07-23 Brent Verner + + * bits/istream.tcc: istream::getline(char_type*, streamsize, + char_type) make compliant + * testsuite/27_io/istream_unformatted.cc: test for compliant behavior + +2000-07-23 Benjamin Kosnik + + * acinclude.m4 (enable_cshadow_headers): Fix problems with blddir + and srcdir used to define CSHADOW_INCLUDES.. + + * configure.in: For consistency, change .sanity_warned to + stamp-sanity-warned. + + * acinclude.m4: Tweak formatting. + * Makefile.am (check): Call mkcheck with full pathname for build + directory... + (check-install): And here. + * Makefile.in: Regenerate. + +2000-07-22 Gabriel Dos Reis + + Line up with libstdc++-v2 version of valarray. + * bits/valarray_array.h (__valarray_product): Make inline. + * src/valarray-inst.cc (__valarray_product): Remove explicit + instantiation. + +2000-07-21 Benjamin Kosnik + + * src/stl-inst.cc: Change __sink_unused_warning to unsigned int + for alpha. + + * testsuite/26_numerics/complex_inserters_extractors.cc (testall): + Change return type to void. + * testsuite/25_algorithms/lower_bound.cc: Add return values. + * testsuite/17_intro/header_ciso646.cc: Modify. + * bits/locale_facets.h: Add return values for the generic cases. + +2000-07-21 H.J. Lu (hjl@gnu.org) + + * acinclude.m4: Include for glibc testing. + * aclocal.m4: Likewise. + + * configure: Rebuild. + +2000-07-20 H.J. Lu (hjl@gnu.org) + + * acinclude.m4: Change "#pragma system_header" to + "#pragma GCC system_header". + * aclocal.m4: Likewise. + * bits/std_cmath.h: Likewise. + * bits/std_cassert.h: Likewise. + * bits/std_cctype.h: Likewise. + * bits/std_cerrno.h: Likewise. + * bits/std_cfloat.h: Likewise. + * bits/std_climits.h: Likewise. + * bits/std_clocale.h: Likewise. + * bits/std_cwchar.h: Likewise. + * bits/std_csetjmp.h: Likewise. + * bits/std_csignal.h: Likewise. + * bits/std_cstdarg.h: Likewise. + * bits/std_cstddef.h: Likewise. + * bits/std_cstdio.h: Likewise. + * bits/std_cstdlib.h: Likewise. + * bits/std_cstring.h: Likewise. + * bits/std_ctime.h: Likewise. + * bits/std_cwctype.h: Likewise. + * bits/std_exception.h: Likewise. + * bits/std_new.h: Likewise. + * bits/std_typeinfo.h: Likewise. + * shadow/bits/std_cassert.h: Likewise. + * shadow/bits/std_cctype.h: Likewise. + * shadow/bits/std_cerrno.h: Likewise. + * shadow/bits/std_cfloat.h: Likewise. + * shadow/bits/std_climits.h: Likewise. + * shadow/bits/std_clocale.h: Likewise. + * shadow/bits/std_cmath.h: Likewise. + * shadow/bits/std_csetjmp.h: Likewise. + * shadow/bits/std_csignal.h: Likewise. + * shadow/bits/std_cstdarg.h: Likewise. + * shadow/bits/std_cstddef.h: Likewise. + * shadow/bits/std_cstdio.h: Likewise. + * shadow/bits/std_cstdlib.h: Likewise. + * shadow/bits/std_cstring.h: Likewise. + * shadow/bits/std_ctime.h: Likewise. + * shadow/bits/std_cwchar.h: Likewise. + * shadow/bits/std_cwctype.h: Likewise. + * shadow/bits/wrap_libio.h: Likewise. + * shadow/bits/wrap_unistd.h: Likewise. + * shadow/sys/cdefs.h: Likewise. + + * configure: Rebuild. + +2000-07-20 Jakub Jelinek + + * config/cpu/sparc/sparc64/bits/atomicity.h (__exchange_and_add): + Use extended word instructions to match 64bit _Atomic_word. + (__atomic_add): Likewise. + * math/clog10l.c (clog10l): Use M_PIl if defined. + * math/c_logl.c (c_logl): Likewise. + * math/signbitl.c (__signbitl): Adapt for IEEE quad long doubles. + * math/mathconf.h (ieee_quad_double_shape_type): New type. + (GET_LDOUBLE_MSW64): New define. + +2000-07-20 Benjamin Kosnik + + * bits/std_streambuf.h: Add bits for pback buffers here, so that + in_avail, etc can use them. + * bits/std_fstream.h: Ditto. + * bits/fstream.tcc: Ditto. + * testsuite/27_io/filebuf.cc: Tweaks. + * testsuite/27_io/filebuf-3.tst: Correct for pbackfail bits. + +2000-07-19 Benjamin Kosnik + + * src/localename.cc: Same. + * src/locale.cc: Same. + * bits/localefwd.h: _M_init_facet to _M_facet_init. + + * bits/locale_facets.h: _M_init_boolnames to _M_boolnames_init. + + * bits/std_sstream.h: Change _M_init_stringbuf to _M_stringbuf_init. + + * bits/fstream.tcc: Change _M_init_filebuf to _M_filebuf_init. + * bits/std_fstream.h: Same. + + * bits/basic_string.h: Tweaks. + +2000-07-19 Phil Edwards + + * docs/18_support/howto.html: Update. + +2000-07-19 Benjamin Kosnik + + Internal consistency checks..... + * bits/ios_base.h: Change _M_locale_ios to _M_ios_locale. + * src/ios.cc: Same. + + * bits/basic_ios.h: Change _M_fctype_ios to _M_ios_fctype. + * bits/basic_ios.tcc: Same. + + * bits/std_streambuf.h: Change _M_locale_buf to _M_buf_locale. + Change _M_fctype_buf to _M_buf_fctype. + * bits/fstream.tcc: Same. + + * bits/std_streambuf.h: Change _M_buf_bump to _M_out_cur_move. + Change _M_locale_set to _M_buf_locale_init. + * bits/streambuf.tcc: Same. + * bits/sstream.tcc: Same. + * bits/fstream.tcc: Same. + + * bits/std_streambuf.h: Make typedefs consistent. + (_M_buf_bump): Be more careful with input sequence. + + * bits/std_sstream.h: Same. + * bits/std_fstream.h: Same. + +2000-07-18 Benjamin Kosnik + + * acinclude.m4: Tweaks. + * config/c_io_libio.cc: Tweaks. + * bits/sstream.tcc (stringbuf::pbackfail): Simplify. + * libio/_G_config.h: Don't define _G_HAVE_ST_BLKSIZE. + * libio/[iofwide.c, wfiledoalloc.c, wfiteopos.c, wgenops.c]: New files. + * libio/iofclose.c iofopen.c, stdio.c: New files. + * libio/Makefile.am: Add files, add flags, etc. + * src/Makefile.am (sources): Add filebuf.cc. + * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): + (GLIBCPP_ENABLE_CSTDIO): Versioning testing, etc etc. + +2000-07-17 Phil Edwards + + * acinclude.m4: Import CHECK_GNU_MAKE from autoconf macro archive. + * configure.in: Use it. Also print reminders one time. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-07-15 Gabriel Dos Reis + + * bits/valarray_array.h (__valarray_get_storage): New function. + (_Array<>::Array): Use it. + * bits/std_valarray.h (valarray<>::valarray): Likewise. + (valarray<>::resize): Likewise. Tweak. + * src/valarray-inst.cc (__valarray_product): Tweak. + +2000-07-11 Phil Edwards + + * docs: Update sourceware->sources in every HTML file. Minor updates. + +2000-07-07 Benjamin Kosnik + + Clean up configure/build longstanding issues. + * src/Makefile.am (AC_CXXFLAGS): Don't set @SECTION_LDFLAGS@ here. + (CXXLINK): Add here, instead. + + * Makefile.am (check-install): Make sure mkcheck has execute privs. + (check): Same here. + * configure.in (AC_OUTPUT_COMMANDS): Remove hacks here. + + * configure.in (AC_OUTPUT_COMMANDS): Link c_io_libio.h and + c_io_libio.cc instead of copying. + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Do link here. + + * configure.in (AC_OUTPUT_COMMANDS): Link $THREADS.h and + c++threads.h instead of copying. + * acinclude.m4 (GLIBCPP_ENABLE_THREADS): Do link here. + Tweaks. + + * config/c_io_libio.cc (__basic_file::_M_open_mode): Consolidate. + * bits/basic_file.h: Declare. + + * mkcheck.in (TESTS_FILE): Use -v instead of --version. + +2000-07-07 brent verner + + * testsuite/27_io/istream_unformatted.cc (test05): New test. + +2000-07-07 Benjamin Kosnik + + * bits/istream.tcc (istream::getline): Minor tweaks. + +2000-07-07 Phil Edwards + + * docs/download.html: Mention gcc_update. + * docs/configopts.html: Minor updates. + * docs/gccrebuild.html: Ditto. + * docs/18_support/howto.html: More tips, explanations, and reminders. + * docs/19_diagnostics/howto.html: Ditto. + * docs/21_strings/howto.html: Ditto. + * docs/24_iterators/howto.html: Ditto. + * docs/25_algorithms/howto.html: Ditto. + * docs/26_numerics/howto.html: Ditto. + +2000-07-05 brent verner + + * testsuite/27_io/ifstream_members.cc (test01): Add tests. + * testsuite/27_io/ofstream_members.cc (test01): Add tests. + * config/c_io_libio.cc (__basic_file::open): Unset + ~_IO_DELETE_DONT_CLOSE. + +2000-07-05 Zack Weinberg + + * bits/gslice_array.h, bits/indirect_array.h, bits/mask_array.h, + bits/slice_array.h, bits/std_valarray.h, bits/valarray_meta.h: + Do not paste anything after 'operator' keyword. + +2000-07-03 Benjamin Kosnik + + * bits/std_memory.h: Revert. + +2000-07-03 Brendan Kehoe + + * bits/std_complex.h: Fix parens. Format. + +2000-07-03 scott snyder + + * bits/locale_facets.tcc (_M_extract): Only figure out the base + from the input if base == 0. + * testsuite/27_io/istream_extractor_arith.cc: Test reading a + number with a leading `0' in hex mode. + + * shadow/bits/std_cmath.h: Fix typo in _GLIBCPP_HAVE_CEILL test. + + * mkinclosure: Change `==' to `=' in test. + +2000-07-03 Chip Salzenberg + + * src/Makefile.am (libio_headers): _G_config.h is found in srcdir, + not builddir. + * src/Makefile.in: Regenerate. + +2000-07-01 Benjamin Kosnik + Ulrich Drepper + + Sync libio to glibc-2.2 current CVS. + * libio/_G_config.h: New file. + * libio/wfileops.c: New file. + * libio/wfiledoalloc.c: New file. + * libio/wgenops.c: New file. + * libio/iofwide.c: New file. + * libio/Makefile.am: Tweaks. + * libio/Makefile.in: Regenerate. + * libio/gen-params: Remove. Generic replacement for this yet undone. + * libio/[filedoalloc.c, fileops.c, genops.c, iolibio.h, libio.h, + libioP.h, stdfiles.c]: Update. + * config/c_io_libio.cc: Tweaks. + * acinclude.m4: Complete hacks to test wide io. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.am: Update. + * src/Makefile.in: Regenerate. + + * math/cargl.c: Remove underscores. + + * bits/locale_facets.h: Tweaks. Start adding iconv details + and notes. + * bits/locale_facets.tcc: Tweaks. + * bits/std_cwchar.h: Tweaks. + +2000-06-29 scott snyder + + * bits/concept_checks.h + (__less_then_comparable_requirement_violation): Only check for <. + * testsuite/25_algorithms/lower_bound.cc: New file. + +2000-06-29 Benjamin Kosnik + + * testsuite/27_io/ostream_manip.cc (test02): Add tests. + * bits/ostream.tcc: Tweak. + * bits/std_fstream.h (basic_filebuf::setbuf): Reset + _M_buf_size_opt too. + * bits/std_streambuf.h (basic_streambuf::~basic_streambuf): Zero + out _M_buf_size_opt. + * bits/std_sstream.h (basic_stringbuf::_M_init_stringbuf): Set + _M_buf_size_opt out here. + * bits/char_traits.h (char_traits::eos): Non standard member + function, uglify to __eos. Return char_type(). + * bits/std_ostream.h: Change. + + * testsuite/27_io/ostream_seeks.cc: New file. + * testsuite/27_io/ostream_seeks-1.tst: New file. + * testsuite/27_io/istream_unformatted.cc (main): Move test04 and + test05 to... + * testsuite/27_io/istream_seeks.cc: New file. + +2000-06-29 Branko Cibej + + * bits/std_memory.h (auto_ptr_ref): Reworked and defined only if + _GLIBCPP_RESOLVE_LIB_DEFECTS. + (auto_ptr): _M_ptr changed to void*. + (suto_ptr::get): Cast _M_ptr to element type. + (auto_ptr::auto_ptr(auto_ptr)): Test implicit convetsion. + (auto_ptr::~auto_ptr): Use this->get() instead of _M_ptr. + (auto_ptr::operator*): Likewise. + (auto_ptr::operator->): Likewise. + (auto_ptr::release): Likewise. + (auto_ptr::reset): Likewise. + (auto_ptr::auto_ptr(auto_ptr_ref)): Initialize from __ref._M_release. + (auto_ptr::operator auto_ptr_rev<_Tp1>): Updated. + Define nested auto_ptr_ref unless _GLIBCPP_RESOLVE_LIB_DEFECTS. + Define operator=(auto_ptr_ref) if _GLIBCPP_RESOLVE_LIB_DEFECTS. + +2000-06-28 Benjamin Kosnik + + * testsuite/27_io/filebuf.cc: Tweak. + * testsuite/27_io/filebuf_members.cc (test_01): Fix. + * config/c_io_libio.cc (__basic_file::~__basic_file): Match libio + filebuf dtor. + (__basic_file::basic_file): Clean, add calls similar to + _IO_file_attach. + (__basic_file::open): Clean. + (__basic_file::sys_open): Clean. + + * bits/std_fstream.h: Revert. + * bits/fstream.tcc (filebuf::close()): Revert. + (filebuf::basic_filebuf()): Revert. + +2000-06-27 Benjamin Kosnik + + Update to SGI STL 3.3 + * ext/hash_map, ext/hash_set, ext/slist, ext/stl_bvector.h, + ext/stl_rope.h, ext/ropeimpl.h: Update. + * bits/std_bitset.h, bits/std_map, bits/std_memory.h, + bits/stl_algo.h, bits/stl_algobase.h, bits/stl_alloc.h, + bits/stl_config.h, bits/stl_construct.h, bits/stl_deque.h, + bits/stl_function.h, bits/stl_heap.h, bits/stl_iterator.h, + bits/stl_iterator_base.h, bits/stl_list.h, bits/stl_map.h, + bits/stl_multimap.h, bits/stl_multiset.h, bits/stl_numeric.h, + bits/stl_queue.h, bits/stl_set.h, bits/stl_stack.h, + bits/stl_string_fwd.h, bits/stl_threads.h, bits/stl_three.h, + bits/stl_uninitialized.h, bits/stl_vectory.h: Update. + + * src/Makefile.am (headers): Add new files. + * src/Makefile.in: Regenerate. + * src/stl-inst.cc (std): Add instantiation for __sink_unused_warning. + * bits/concept_checks.h: New file. + * bits/container_concepts.h: New file. + * bits/sequence_concepts.h: New file. + +2000-06-27 H.J. Lu + Loren J. Rittle + + * mkcheck.in: Add support to print standard flags needed to + test g++ in build tree. Enhance command line error checking. + +2000-06-27 Phil Edwards + + * docs/install.html: Fix minor typo as reported. + +2000-06-26 Brent Verner + + * bits/string.tcc (string::rfind): Fix. + * testsuite/21_strings/rfind.cc: New file. + +2000-06-26 Anthony Williams + + * testsuite/21_strings/ctor_copy_dtor.cc: Fixed logic error. + +2000-06-26 Branko Cibej + + * testsuite/27_io/filebuf_members.cc (test_01): Fixed typos. + + * mkcheck.in: Make the *.txt and *.tst files writable after + copying them to $TEST_DIR. + + * testsuite/27_io/ostream_inserter_arith.cc: Renamed + __TEST_NUMPUT_VERBOSE to TEST_NUMPUT_VERBOSE. Define + TEST_NUMPUT_VERBOSE only if DEBUG_ASSERT. + +2000-06-23 Benjamin Kosnik + + * bits/fstream.tcc (basic_filebuf::basic_filebuf(fd)): Use it. + (basic_filebuf::close): Use it. + * bits/std_fstream.h (basic_filebuf): Remove default arguments for + filebuf ctor. + (basic_filebuf): Add _M_fileno_based data member. + As reported by brent verner + * testsuite/27_io/filebuf_members.cc: New file. + * testsuite/27_io/filebuf_members-1.tst: New file. + + * bits/std_fstream.h: Formatting tweaks. + * testsuite/27_io/ofstream_members.cc: New file. + * testsuite/27_io/ofstream_members-1.tst: New file. + * testsuite/27_io/ifstream_members.cc: New file. + * testsuite/27_io/ifstream_members-1.tst: New file. + +2000-06-23 Benjamin Kosnik + Ulrich Drepper + + * acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Add -D_GNU_SOURCE, so + that all the freaky stuff like sincos will be around... + +2000-06-22 Branko Cibej + + * Makefile.am (AM_MAKEFLAGS): Added WERROR to list of flags. + +2000-06-22 Steven King + + * acinclude.m4: Check for sinl, _sinl using 1 parameter. + +2000-06-22 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT): Redo. Use the + same approach as GLIBCPP_CHECK_MATH_SUPPORT, only don't try to + link against libm and don't use -fno-builtins... + * math/mathconf.h: Change up builtin macros to new schema. + * bits/std_cmath.h: And here. Wheee! + * shadow/bits/std_cmath.h: And here. + * acconfig.h: Change up builtin macros here. + * math/cosf.c: Remove. + * math/fabsf.c: Likewise. + * math/sinf.c: Likewise. + * math/sqrtf.c: Likewise. + * math/Makefile.am (EXTRA_DIST): Remove those four files. + * math/Makefile.in: Regenerate. + +2000-06-22 Anthony Williams + + * testsuite/21_strings/find.cc: Patch. + +2000-06-22 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHEC_LINKER_FEATURES): Use gcc + -x c++ as + an easy way to get at g++ without having to link in libstdc++. + +2000-06-21 Benjamin Kosnik + + Fix alpha, powerpc build failures. + * acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Substantially + re-write. Need to check for both proper declaration when using a + c++ compiler, and "C" linkage when linking. Do both, and if both + exist, then define the HAVE_* bits in config.h. + (GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE): New, uber-macro. Does all. + (GLIBCPP_CHECK_LINKER_FEATURES): Actually link and run this + program, doh. + +2000-06-20 Anthony Williams + + * bits/string.tcc: Fix find. + * testsuite/21_strings/find.cc: Patch. + +2000-06-20 Benjamin Kosnik + + * docs/install.html: Update where to get automake, where to get + binutils. + * acinclude.m4: Need -fno-builtins too, so gcc doesn't recognize + builtins. + +2000-06-19 Benjamin Kosnik + + * acinclude.m4 ((GLIBCPP_CHECK_MATH_SUPPORT): Revert last change. + Add -Werror-implicit-function-declaration instead. + + Regenerate with fixed maintainer-tools. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * libio/Makefile.in: Regenerate. + * src/Makefile.in: Regenerate. + +2000-06-19 Russell Davidson + + * testsuite/27_io/istream_extractor_arith.cc: Patch. + * bits/locale_factets.tcc: Tweak. + +2000-06-19 Raja R Harinath + + * src/Makefile.am: change @WERROR@ to $(WERROR) so that this can + be overridden on the command line for individual files. + +2000-06-19 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Can't use + AC_LANG_CPLUSPLUS as this tries to link in libstdc++, which we are + building. Use -x c++ instead, which does not attempt to link + libstdc++. + + * acinclude.m4 (GLIBCPP_CHECK_LINKER_FEATURES): Actually check for + not coring when we hit a try/throw block, which was the problem + with the linker support... + + * docs/17_intro/contribute.html: Add bits about getting to the LWG + issues pages. + * docs/documentation.html: Rename link to make more accurate and scary. + * docs/gccrebuild.html: Edit for clarity as these are no longer + separate projects. + * docs/install.html: Add bits about binutils for + -ffunction-sections, -fdata-sections, -Wl,--gc-sections + + * configure.in: Add call for GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT. + * math/Makefile.am (EXTRA_DIST): Change USE_LONG_DOUBLE to + USE_COMPLEX_LONG_DOUBLE. + * acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Break into + GLIBCPP_CHECK_MATH_SUPPORT and GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT. + Works around irregularies in powerpc "C" compiler, but a good idea + anyway. + + * acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT): + New. Merge both old compiler bug checks for complex into this. + +2000-06-19 Anthony Williams + + * testsuite/21_strings/find.cc: Empty strings can be found at all + positions. Modified. + +2000-06-19 Branko Cibej + + * testsuite/20_utilities: New directory. + * testsuite/20_utilities/auto_ptr.cc: New file. + +2000-06-14 Benjamin Kosnik + + * src/Makefile.am (string_sources): Simplify, assuming that with + -ffunction-sections, -fdata-sections, -Wl,--gc-sections, all this + hacking is not necessary. + (wstring_sources): Same. + (OPTIMIZE_CXXFLAGS): Enable -fdata-sections -ffunction-sections + -Wl,--gc-sections. + * src/string-inst.cc: Remove macro blocks. + * mkcheck.in (CXX_FLAG): Add bits here. + + * src/string-inst.cc: Remove iostream-related string instantiations. + * src/misc-inst.cc: Add here. + + * acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): Change FMTFLAGS + to WFMT_FLAGS. + * aclocal.m4: Regenerate. + * configure.in: Change up. + * configure: Regenerate. + +2000-06-13 Steven King + + * acinclude.m4: Fixup some of the builtin math tests and add tests for + __builtin_fmod* and test libm for fmodf, fmodl or _fmodf, _fmodl. + * acconfig.h: Add entries for fmod*. + +2000-06-13 Branko Cibej + + * bits/std_cmath.h: Fix typos in tests (*_FMODFF -> *_FMODF). + Test *_MODFF not *_MODF for modf(float, float*). + (modf(float, float*)): Remove reference to _C_legacy. + +2000-06-13 Benjamin Kosnik + + * acinclude.m4 (enable_cshadow_headers): Change CSHADOWFLAGS to + _GNU_SOURCE instead of _ISOC9X_SOURCE, as _GNU_SOURCE is the + superset, and already defined at top level. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * docs/17_intro/contribute.html: Plead with people to use -cp. + +2000-06-13 Anthony Williams + + * testsuite/23_containers/bitset_ctor.cc: Qualify reverse wth std::. + + * testsuite/27_io/filebuf.cc: Changed calls to + fpos<>._M_position() to implicit calls to operator streamoff(). + * testsuite/27_io/iostream_objects.cc: Removed #include , + as not needed. Revert, as part of standard. + * testsuite/27_io/ostream_inserter_arith.cc: Replaced explicit + call to numpunct<>._M_init() with overrides of the appropriate + virtual functions. + + * testsuite/27_io/stringstream.cc: Removed unnecessary char * + pointers from test01, so no need to call base(), which isn't + guaranteed to be implemented as iterators may themselves be pointers + * testsuite/27_io/stringbuf.cc: Removed unnecessary calls to + _M_position() - use implicit conversion to streamoff instead + +2000-06-13 Thomas Holenstein + + * bits/stl_iterator.h: Added inline to operators == to >=. + +2000-06-13 Brent Verner + + * bits/streambuf.tcc: repaired _S_copy_streambufs() + * testsuite/27_io/ostream_inserter_other.cc (test03): Added testcase. + +2000-06-12 Benjamin Kosnik + + * bits/locale_facets.h (ctype): Remove unnecessary data + members. + * src/locale.cc: Add cwchar include here. Remove incorrect + definitions, and stub them out. + * config/generic/ctype.cc (ctype): Remove ctype bits. + * config/solaris/solaris2.7/ctype.cc (ctype): Same. + * config/solaris/solaris2.5/ctype.cc (ctype): Same. + * config/newlib/ctype.cc: Same. + * config/gnu-linux/ctype.cc: Same. + * config/bsd/ctype.cc: Same. + * config/aix/ctype.cc: Same. + +2000-06-12 Branko Cibej + + * config/solaris/solaris2.6/ctype.cc (do_toupper, do_tolower): Use + towupper and towlower to convert wide characters. + +2000-06-12 Benjamin Kosnik + + * mkcheck.in: Clean up confusion regarding NAME, PRE_NAME. + +2000-06-08 Branko Cibej + + * acinclude.m4 (GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT): Check for + sinf, cosf, fabsf, and sqrtf; add to LIBMATHOBJS if missing. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * math/cosf.c: New file. + * math/fabsf.c: Likewise. + * math/sinf.c: Likewise. + * math/sqrtf.c: Likewise. + * math/Makefile.am (EXTRA_DIST): Add those four files. + * math/Makefile.in: Regenerate. + +2000-06-08 Phil Edwards + + * testsuite/26_numerics/complex_inserters_extractors.cc: Need cmath. + +2000-06-06 Steven King + + * acconfig.h: Added defines for HAVE_BUILTIN math functs for float, + double and long double. Added defines for HAVE libm math functs for + float and long double. + * aclocal.m4: Added configure checks for builtin math funcs and libm + support for float and long double versions of the math functions. + * config.h.in: Added undefs for math functs. + * configure: Regenerate. + * math/mathconf: Changed the _GLIBCPP_HAS_BUILTIN_* to + _GLIBCPP_HAVE_BUILTIN_*. + * bits/std_cmath.h: Added long double support. Use builtins for + float, double and long if available, otherwise, use libm versions if + availible, otherwise, punt. + * shadow/bits/std_cmath.h: ditto + +2000-06-02 Benjamin Kosnik + + * bits/locale_facets.h: Tweak. + * src/locale.cc (codecvt): Tweak. + + * bits/locale_facets.h (_Format_cache): _S_ecks -> _S_x. + * bits/locale_facets.tcc (num_get::_M_extract): Fix for hex. + + * bits/basic_string.h: Move data member up. + * src/string-inst.cc: Fix instantiations. + * bits/string.tcc: Fix types. + +2000-06-02 Anthony Williams + + * testsuite/21_strings/replace.cc (test01): Qualify find with std::. + +2000-06-01 Benjamin Kosnik + + * bits/std_cwctype.h: Clean. + * bits/std_cwchar.h: Clean, remove cruft. + + * acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Re-work, add bits + for beginning iconv support. + Remove _GLIBCPP_HAS_WCHAR_MIN_MAX, roll into _GLIBCPP_USE_WCHAR_T + macro. + * acconfig.h: Remove _GLIBCPP_HAS_WCHAR_MIN_MAX. + * bits/limits_generic.h: Remove. + * src/gen-num-limits.cc: Same. + + * src/locale.cc: Tweaks. + + * bits/char_traits.h: Tweaks. + +2000-05-31 Russell Davidson + + * bits/locale_facets.tcc (num_get::_M_extract): Fix signage, + exponent, scientific formatting issues. + * testsuite/27_io/istream_extractor_arith.cc (test09): Add tests. + +2000-05-31 Branko Cibej + + * bits/limits_generic.h (numeric_limits): Use WCHAR_MIN + and WCHAR_MAX instead of WCHART_MIN and WCHART_MAX. + +2000-05-31 Nathan Myers + + * docs/thanks.html: edit own credits + +2000-05-31 Benjamin Kosnik + + * bits/generic_shadow.h: Remaining _C_Shadow -> _C_shadow fix. + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Add strtoull checks... + + * mkcheck.in (SH_FLAG): Add in -Wl,--rpath -Wl,$LIB_PATH. Tweaks. + +2000-05-31 Steven King + + * shadow/time.h: fix typo + * shadow/wchar.h: ifdef __USE_GNU for wcsdup + * shadow/bits/std_cwchar.h: ditto + * shadow/bits/std_cstdlib.h: add overloads of abs and div for long + and long long. + +2000-05-26 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): If strtoll isn't + available, force --disable. Need to flesh this out; make smarter. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * mkcheck.in: Minor tweaks. + * docs/download.html: Fix typo. + +2000-05-25 Benjamin Kosnik + + * inclosure: Change to... + * mkinclosure: This. + Fix paths to bash. + * mkcshadow: Fix paths to bash. + + * src/Makefile.am: Tweaks. Do cshadow header trickery at build time. + * src/Makefile.in: Regnerate. + * acinclude.m4 (GLIBCPP_COMPILER_VERSION): Fix typo. + (GLIBCPP_ENABLE_SHADOW): Do a less gross hack. + * aclocal.m4: Regenerate. + * mkcheck.in (INC_PATH): Tweak. + + * configure.in: Enable long long by default. + * configure: Regenerate. + + * mkcheck.in (LIB_PATH): Revert. + +2000-05-24 Nathan "I don't write ChangeLog Entries" Myers + + * config/cpu/i486: New directory. + * config/cpu/i486/bits: New directory. + * config/cpu/i486/bits/atomicity.h: New file. + * config/cpu/i386/bits/atomicity.h (__compare_and_swap): Delete + 'cmpxchgl' asm. + * acinclude.m4 (GLIBCPP_CHECK_CPU): Enable i386. + +2000-05-24 Loren J. Rittle + + * backward/alloc.h (__default_alloc_template): Only expose + implementation-specific symbol, if it exists in the + configuration. + * backward/iostream.h (ends): Expose symbol. + * backward/strstream.h: New file. + * backward/stream.h: New file. + * backward/ostream.h: New file. + * backward/istream.h: New file. + * backward/fstream.h: New file. + * backward/complex.h: New file. + * backward/iomanip.h: New file. + + * mkcheck.in (LIB_PATH): Add -R bits. + + * math/carg.c (carg): Replace __atan2 with atan2. + +2000-05-24 Benjamin Kosnik + + * Makefile.am (TAGS): Construct. + * Makefile.in: Rengerate. + * src/Makefile.am: Tweak. + * src/Makefile.in: Tweak. + * configure.in: Tweak. + + * bits/c++config.h: Rename to ... + * bits/c++config: This. + * mkc++config: Adjust. + + * m4: Remove. + * m4/lc_message.m4: Merge into acinclude.m4. + * m4/mathfcts.m4: Same. + * m4/stringfcts.m4: Same. + * acinclude.m4: Add here. + * configure: Regnerate. + + * acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): Remove + OPTLEVEL. Add FMTFLAGS. + * aclocal.m4: Regenerate. + * src/Makefile.am (AC_CXXFLAGS): Take out OPTLEVEL, as this has + been disabled due to higher-level Makefiles running amuck over + this bit, and add in FMTFLAGS so that formatting is clear. + * src/Makefile.in: Regenerate. + * configure: Regenerate. + + * src/ios.cc (ios_base::sync_with_stdio): Clean up buffers from + initialization. + + * docs/download.html: Remove references to Cygwin-specific bits, + as this can now be built natively. + Update with current information. + +2000-05-24 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): If we can use + -fdiagnostics-show-location=once, do so. Expand AC_LANG_* to + enclose other tests in this macro, including future ones. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * docs/faq/index.html: Update location of libg++ FAQ. + * docs/faq/index.txt: Regenerate. + +2000-05-22 Benjamin Kosnik + + * docs/17_intro/libstdc++-assign.txt: Change Cygnus to FSF. + +2000-05-22 Phil Edwards + + * mkcheck.in: Tweak for Solaris 8. Additional minor output comment. + +2000-05-22 Phil Edwards + + * acinclude.m4: If the new pragma isn't supported, don't kill -Werror; + keep -Werror and add -Wno-unknown-pragma. -Werror Is Good. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-05-19 Nathan C. Myers + + * bits/generic_shadow.h: s/swamp/legacy/ + +2000-05-19 Phil Edwards + + * acinclude.m4: Clean up comments on newer checks. + (GLIBCPP_CHECK_COMPILER_VERSION): Check for system_header + pragma support. Remove WERRORSUPPRESS variable, add WERROR. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * Makefile.in: Regenerate. + * libio/Makefile.in: Regenerate. + * math/Makefile.in: Regenerate. + * src/Makefile.am: Tell make's WERROR to depend on configure's WERROR. + * src/Makefile.in: Regenerate. + * docs/configopts.html: Document changes to --enable names. + +2000-05-18 Chip Salzenberg + + * bits/ostream.tcc (_S_pad_char): Function template should not be + static. + * bits/streambuf.tcc (_S_copy_streambufs): Likewise. + * src/string-inst.cc (__destroy_aux): Instantiate for string*. + +2000-05-18 Nathan C. Myers + + * mkcshadow: Change C_Swamp to C_legacy. + * shadow/*: Same. + * shadow/bits/*: Same. + s/C_Swamp/C_legacy/g + s/SWAMP/LEGACY/g + s/_Shadow/_shadow/g + +2000-05-18 Anthony Williams + + * bits/locale_facets.tcc (num_get::_M_extract): Change char* to + const char*. + * src/string-inst.cc (string::_S_find): Same. + +2000-05-18 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): Change to + --enable-cshadow-headers. Add output messages. + (GCC_ENABLE_LONG_LONG): Change to --enable-long-long, no + underscores (like the rest of the enable options.) Add output messages. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * configure.in: Touch. + +2000-05-17 Benjamin Kosnik + + * mkcheck.in: Enable shared library testing. + +2000-05-17 Nathan C. Myers + + * bits/std_cmath.h: fix sqrt(float) + +2000-05-16 Loren J. Rittle + + * bits/std_cassert.h: Use system_header pragma. + * bits/std_cctype.h: Likewise. + * bits/std_cerrno.h: Likewise. + * bits/std_cfloat.h: Likewise. + * bits/std_climits.h: Likewise. + * bits/std_clocale.h: Likewise. + * bits/std_cmath.h: Likewise. + * bits/std_csetjmp.h: Likewise. + * bits/std_csignal.h: Likewise. + * bits/std_cstdarg.h: Likewise. + * bits/std_cstddef.h: Likewise. + * bits/std_cstdio.h: Likewise. + * bits/std_cstdlib.h: Likewise. + * bits/std_cstring.h: Likewise. + * bits/std_ctime.h: Likewise. + * bits/std_cwchar.h: Likewise. + * bits/std_cwctype.h: Likewise. + * bits/std_exception.h: Likewise. + * bits/std_new.h: Likewise. + * bits/std_typeinfo.h: Likewise. + * shadow/bits/std_cassert.h: Likewise. + * shadow/bits/std_cctype.h: Likewise. + * shadow/bits/std_cerrno.h: Likewise. + * shadow/bits/std_cfloat.h: Likewise. + * shadow/bits/std_climits.h: Likewise. + * shadow/bits/std_clocale.h: Likewise. + * shadow/bits/std_cmath.h: Likewise. + * shadow/bits/std_csetjmp.h: Likewise. + * shadow/bits/std_csignal.h: Likewise. + * shadow/bits/std_cstdarg.h: Likewise. + * shadow/bits/std_cstddef.h: Likewise. + * shadow/bits/std_cstdio.h: Likewise. + * shadow/bits/std_cstdlib.h: Likewise. + * shadow/bits/std_cstring.h: Likewise. + * shadow/bits/std_ctime.h: Likewise. + * shadow/bits/std_cwchar.h: Likewise. + * shadow/bits/std_cwctype.h: Likewise. + * shadow/bits/wrap_libio.h: Likewise. + * shadow/bits/wrap_unistd.h: Likewise. + * shadow/sys/cdefs.h: Likewise. + +2000-05-16 Nathan C. Myers + + It appears that gcc-2.96 supports the keyword "and" now. + * bits/std_ciso646.h: remove. + * std/ciso646: gut. + * testsuite/17_intro/header_ciso646.c: enable testing. + * src/Makefile.am, src/Makefile.in: remove mention of + bits/std_ciso646.h + +2000-05-16 Nathan C. Myers + + * mkcshadow: fix typo s/_C_Swamp_/_C_Swamp/. + +2000-05-16 Phil Edwards + + * acinclude.m4: Fix typo, switch to decaf... + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-05-16 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_SHADOW): New macro, stub. + * aclocal.m4: Regenerate. + * configure.in: Call. + * configure: Regenerate. + * docs/configopts.html: Stub documentation. + +2000-05-14 Nathan Myers + + * mkcshadow: build in more-correct directory, create cshadow/ + directory if needed, report progress. + +2000-05-14 LLeweLLyn Reese + + * src/Makefile.am: Fix tr commands. + * src/Makefile.am: Remove references to [w]stringCTORDUPAL.[lo,cc] + * src/string-inst.cc: Remove extra instantiation of + S::basic_string(S::size_type, C, S::allocator_type const&); + * src/string-inst.cc: Remove extra template keyword. + +2000-05-14 Loren J. Rittle + + * config/bsd/bits/ctype_base.h: Add support for plain BSD4.4. + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Enhance bsd tests. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * */Makefile.in: Regenerate. + +2000-05-11 Phil Edwards + + * acinclude.m4: Fix minor typo with ctypes, add more sanity to + enable-cxx-flags, and remove GLIBCPP_ENABLE_NAMESPACES altogether. + * aclocal.m4: Regenerate. + * configure.in: Non-blank arguments break fewer Linuxes. + * configure: Regenerate. + * src/Makefile.am: Re-order AC_CXXFLAGS components. + * src/Makefile.in: Regenerate. + +2000-05-10 Benjamin Kosnik + + * bits/std_cmath.h: Tweaks. + * math/mathconf.h: Tweaks and fixes for HP-UX 11. + (sqrtf): Define away iff !builtin and !in . + (sinf): Same. + (cosf): Same. + (fabsf): Same. + At some point this directory should be converted to c++, the + autoconf tests should be run by the c++ compiler (not c), and + should be used instead of math.h. + Move declaration of nan() here. + * math/complex-stub.h (cabsl): Remove nan() declaration. + + Finish up FreeBSD4.0 support. + * config/bsd/ctype.cc: Scope out toupper, tolower calls. + * config/generic/ctype.cc: And here. + * testsuite/21_strings/char_traits.cc (test02): Guard with + _GLIBCPP_USE_WCHAR_T. + + via Phil Edwards + * bits/std_cctype.h: Remove _GLIBCPP_USE_NAMESPACES. + * acconfig.h: And here. + * acinclude.m4: Same. + * testsuite/27_io/istream.cc: And here. + * testsuite/27_io/ostream.cc: And here. + +2000-05-09 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_CPU): Change powerpc bits to + -mcpu=powerpc. + * src/Makefile.am: Disable ENABLE_CXX_FLAGS stuff for the moment. + + * config/generic/bits/ctype_specializations.h (ctype::is): + Make more generic. + + * config/bsd: New directory. + * config/bsd/ctype.cc: New. + * config/bsd/bits/ctype_base.h (ctype_base): New. + * config/bsd/bits/ctype_specializations.h: New. + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Add bsd tests. + +2000-05-09 Phil Edwards + + * acinclude.m4: New macro, GLIBCPP_ENABLE_CXX_FLAGS. + * configure.in: Call. + * src/Makefile.am: Append results of macro to AC_CXXFLAGS. + * aclocal.m4: Regenerate. + * configure: Ditto. + * src/Makefile.in: Ditto. + * docs/configopts.html: Document. + * docs/download.html: Fix typo (close quote). + * docs/footer.html: Update. + +2000-05-09 Loren J. Rittle + + * backward/iostream.h: Expose endl. Guard wide types. + * src/Makefile.am (headers): Update list to match files. + * src/Makefile.in: Regenerate. + +2000-05-09 Vadim Egorov + Benjamin Kosnik + Nathan Myers + Dietmar Kuehl + + * bits/streambuf.tcc (basic_streambuf::xsgetn): Fix uflow case. + (basic_streambuf::xsputn): Make consistent. + * testsuite/27_io/filebuf.cc: Add tests. + +2000-05-08 Steven King + + * bits/char_traits.h: Use wchar_t utility functions for + char_traits methods. + * testsuite/21_string/char_traits.cc: New (test02): test + char_traits + +2000-05-08 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CXXFLAGS): Add bits for solaris2.8. + + * bits/fstream.tcc (filebuf::_M_init_filebuf): Don't set + _M_buf_size based on macro, instead use _M_buf_size_opt. + * bits/std_streambuf.h (basic_streambuf): Add _M_buf_size_opt. + (basic_streambuf()): Set _M_buf_size_opt. + * testsuite/27_io/filebuf.cc (filebuf): Use _M_buf_size_opt + instead of _M_buf_size. + +2000-05-04 Branko Cibej + + * src/complex_io.cc: Don't instantiate inserters and extractors + for wide-character streams unless _GLIBCPP_USE_WCHAR_T is defined. + +2000-05-03 Phil Edwards + Felix Natter + + * docs/footer.html: Update to see if it takes effect. + * docs/thanks.html: More people. + * docs/17_intro/headers_cc.txt: Copy from testsuite, since that can't + be seen from the web pages. Rename for browser-friendliness... + * docs/17_intro/howto.html: ...and update here. + * docs/17_intro/porting-howto.html: Changes from Felix. + * docs/gccrebuild.html: Mention v3->egcs move. + * docs/faq/index.html: Ditto. Also misc tweaks and URL updates. + * docs/faq/index.txt: Regenerate. + +2000-05-01 Benjamin Kosnik + + * config/cpu/powerpc/bits/atomicity.h (__exchange_and_add): More + fixes. + +2000-05-01 Vadim Egorov + + * bits/char_traits.h: Fix parameter types. + * bits/string.tcc: Avoid traits_type::move. + +2000-05-01 Benjamin Kosnik + + * src/Makefile.am (AC_CXXFLAGS): Add CPUFLAGS here. + * src/Makefile.in: Regenerate. + * acinclude.m4 (GLIBCPP_ENABLE_DEBUG): Revert. + +2000-04-30 Steven King + + * bits/locale_facets.h: Fix syntax error. + * bits/std_fstream.h: ditto + +2000-04-30 Benjamin Kosnik + + * config/cpu/powerpc/bits/atomicity.h (__compare_and_swap): Fix typo. + + * mknumeric_limits (trait_name): Fix copyright notice. + * src/gen-num-limits.cc: Explicitly instantiate epsilon and + round_error data members of struct value. This works around + weak-linking issues on AIX, HPUX. + +2000-04-29 Phil Edwards + + * docs/download.html: Add link to list of mirror sites. + +2000-04-28 Loren J. Rittle + + * mkcheck.in: Rely on exit status instead of the presence of a + core file. Added comments on how/where to save core and exe + files. Move shell wildcards outside quotes and fix core path. + +2000-04-27 scott snyder + + * src/misc-inst.cc: Explicitly instantiate ifstream and ofstream + classes. + +2000-04-26 Nathan C. Myers + + * bits/basic_string.h: include instead + of , and use the uglified names. + * config/cpu/*/atomicity.h: replace with bits/atomicity.h; + uglify names, eliminate dependence on . + * src/Makefile.in, src/Makefile.am: refer to correct place + for atomicity.h header. + +2000-04-25 Steven King + + * bits/basic_string.h: Fix syntax error. + +2000-04-25 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_MATH_SUPPORT): Improve checks for + USE_LONG_DOUBLE. + (GLIBCPP_ENABLE_DEBUG): If alpha, use -gdwarf-2. + * math/Makefile.am (EXTRA_LONG_DOUBLE_yes): Add all the long + versions to this as copysignl is needed anyway for these targets. + * math/Makefile.in: Regenerate. + + * bits/streambuf.tcc (streambuf::xsgetn): Tweak. + * bits/fstream.tcc (underflow): Cast to libio types. + * bits/basic_file.h (seekoff): Fixes for alpha: use __c_streamoff. + * config/c_io_libio.cc (seekoff): And here. + +2000-04-24 Loren J. Rittle + + * mkcheck.in: Report compiler version used for test. Find + the built _G_config.h instead of any old installed version. + +2000-04-24 Loren J. Rittle + + * config/generic/ctype.cc (do_toupper): Remove dependence on + non-portable/non-existent lookup table. + (do_tolower): Same. + +2000-04-24 Nathan Myers + + * src/string-inst.cc: More fixing. + +2000-04-24 Benjamin Kosnik + + * bits/stl_iterator.h: Pedantic fixing. + * bits/std_sstream.h: And here. + * bits/string.tcc: And here. + +2000-04-24 Felix Natter + + * docs/17_intro/howto.html: Add bits. + * docs/17_intro/porting-howto.html: New file. + +2000-04-24 Branko Cibej + + * acinclude.m4(GLIBCPP_CHECK_WCHAR_T_SUPPORT): Expand + @libinst_wstring_la@ to libinst-wstring.la when specializing for + wchar_t, to empty string otherwise. + * src/Makefile.am: (EXTRA_LTLIBRARIES): New. + (sources): Remove $(string_sources) and $(wstring_sources). + (libstdc___la_LIBADD): Add libinst-string.la and @libinst_wstring_la@. + (libstdc___la_DEPENDENCIES): New. + (libinst_string_la_SOURCES, libinst_wstring_la_SOURCES): New. + +2000-04-20 Benjamin Kosnik + + * bits/std_sstream.h: Tweak formatting. + * bits/std_fstream.h: Make types public. + + * testsuite/27_io/streambuf.cc: Fix for alpha. + + Brad Garcia + * bits/locale_facets.h (numpunct::numpunct(size_t)): Fix bool + initialization. + * testsuite/27_io/ios_manip_fmtflags.cc (test02): Add test for + bool formatting. + +2000-04-19 Nathan Myers + + * src/string-inst: consolidate _S_create, + destroy, leak, clone members into stringMAIN and stringMUTATE + object files. + * src/Makefile.am: Above, and eliminate dependence on + wstring-inst.cc. + * src/wstring-inst.cc: Remove. + +2000-04-18 Benjamin Kosnik + + * src/Makefile.am (AC_CXXFLAGS): Activate debugging code, again. + Add flags for specialized rules dealing with instantiations. + + * src/string-inst.cc: Add instantiations missing from shared + libraries--see stringEQ, stringCONSC. + * src/Makefile.am (wstring_sources): Add. + (string_sources): Same. + * src/Makefile.in: Regenerate. + + * stl/*: Integrate contents of this directory into top-level + directories. + * ext/bvector hash_map hash_set rope ropeimpl.h slist + stl_bvector.h stl_hash_fun.h stl_hashtable.h stl_rope.h tree: Add. + * bits/pthread_allocimpl.h std_algorithm.h std_bitset.h + std_deque.h std_functional.h std_iterator.h std_list.h std_map.h + std_memory.h std_numeric.h std_queue.h std_set.h std_stack.h + std_stdexcept.h std_strstream.h std_utility.h std_vector.h + stl_algo.h stl_algobase.h stl_alloc.h stl_config.h stl_construct.h + stl_deque.h stl_function.h stl_heap.h stl_iterator.h + stl_iterator_base.h stl_list.h stl_map.h stl_multimap.h + stl_multiset.h stl_numeric.h stl_pair.h stl_pthread_alloc.h + stl_queue.h stl_range_errors.h stl_raw_storage_iter.h stl_relops.h + stl_set.h stl_stack.h stl_string_fwd.h stl_tempbuf.h stl_threads.h + stl_tree.h stl_uninitialized.h stl_vector.h type_traits.h: Add. + * backward/algo.h algobase.h alloc.h bvector.h defalloc.h deque.h + function.h hash_map.h hash_set.h hashtable.h heap.h iterator.h + list.h map.h multimap.h multiset.h pair.h rope.h set.h slist.h + stack.h tempbuf.h tree.h vector.h: Add. + * README (file): Update. + * docs/documentation.html: README not being found. + * src/Makefile.am (sources): Take out stl directory. + * mkcheck.in (SRC_DIR): And here. + * src/Makefile.in: Regenerate. + +2000-04-18 Levente Farkas + + * stl/bits/stl_function.h: Add bits so that const and non-const + both work. + +2000-04-18 scott snyder + + * stl/bits/stl_map.h (class map): Fix default for _Alloc template + parameter. Get rid of use of __STL_DEFAULT_ALLOCATOR and + __STL_LIMITED_DEFAULT_TEMPLATES macros. + * stl/bits/stl_multimap.h (class multimap): Likewise. Get rid of + use of __STL_DEPENDENT_DEFAULT_TMPL macro. + +2000-04-18 scott snyder + + * stl/bits/stl_config.h (__STL_DEPENDENT_DEFAULT_TMPL): Deleted + this macro. + + * stl/ext/hash_map (class hash_map, class hash_multimap): Get rid + of use of __STL_DEPENDENT_DEFAULT_TMPL macro. + * stl/ext/hash_set (class hash_set, class hash_multiset): + Likewise. + * stl/bits/stl_function.h (struct constant_unary_fun, struct + constant_binary_fun): Likewise. + * stl/bits/stl_queue.h (class queue, class priority_queue): Likewise. + * stl/bits/stl_stack.h (class stack): Likewise. + * stl/bits/stl_set.h (class set): Likewise. + * stl/bits/stl_multiset.h (class multiset): Likewise. + + * stl/bits/stl_iterator.h (class reverse_bidirectional_iterator, + class reverse_iterator): Get rid of use of + __STL_LIMITED_DEFAULT_TEMPLATES macro. + + * stl/bits/stl_config.h (__STL_DEFAULT_ALLOCATOR): Deleted this + macro. + + * stl/bits/stl_deque.h (class deque): Get rid of use of + __STL_DEFAULT_ALLOCATOR macro. + * stl/bits/stl_list.h (class list): Likewise. + * stl/bits/stl_multiset.h (class multiset): Likewise. + * stl/bits/stl_set.h (class set): Likewise. + * stl/bits/stl_string_fwd.h (class basic_string): Likewise. + * stl/bits/stl_tree.h (class _Rb_tree, class rb_tree): Likewise. + * stl/bits/stl_vector.h (class vector): Likewise. + * stl/ext/ropeimpl.h (rotate): Likewise. + * stl/ext/hash_map (class hash_map, class hash_multimap): + Likewise. + * stl/ext/hash_set (class hash_set, class hash_multiset): + Likewise. + * stl/ext/slist (class slist): Likewise. + * stl/ext/stl_bvector.h (class bit_vector): Likewise. + * stl/ext/stl_rope.h (class rope): Likewise. + * src/locale.cc (_Impl): Likewise. + * src/localename.cc (_Impl): Likewise. + * bits/localefwd.h (_Impl): Likewise. + +2000-04-18 Phil Edwards + + * docs/install.html: Cleanup, minor changes. + * docs/17_intro/howto.html: Ditto. + +2000-04-18 Nathan Myers + + * bits/basic_string.h: Remove "inline" from member _S_find. + + * src/string-inst.cc: Rewrite to reflect non-inline template + instantiations in string.tcc. + + * src/stringADDCS.cc, stringADDPS.cc, stringADDSC.cc, stringADDSP.cc, + stringADDSS.cc, stringBIST.cc, stringBOST.cc, stringCHTR.cc, + stringEQPS.cc, stringEQSP.cc, stringEQSS.cc, stringEXTRA.cc, + stringGEPS.cc, stringGESP.cc, stringGESS.cc, stringGETLI.cc, + stringGTPS.cc, stringGTPS.cc, stringGTSP.cc, stringGTSS.cc, + stringINSER.cc, stringLEPS.cc, stringLESP.cc, stringLESS.cc, + stringLESP.cc, stringLTPS.cc, stringLTPS.cc, stringLTSP.cc, + stringLTSS.cc, stringMAIN.cc, stringNEPS.cc, stringNESP.cc, + stringNESS.cc, stringSCOPY.cc: Remove. + * src/wstringADDCS.cc, etc: Remove. + + Benjamin Kosnik + * src/Makefile.am: Modify to reflect above. + * src/Makefile.in: Regenerate. + +2000-04-17 Benjamin Kosnik + + * docs/install.html (--enable-libstdcxx-v3): Clean up install docs. + +2000-04-13 Benjamin Kosnik + + * bits/std_fstream.h (filebuf::sync): Need to use the abstracted + io interface here instead of the libio particulars. + + * config/threads-posix.h: Consistency with stl_config.h. + + * mkcheck.in (CXX_FLAG): Add DDEBUG_ASSERT back in. + +2000-04-13 Loren J. Rittle + + * mknumeric_limits: Rename generic type template parameter name + '_T' to '_Tp'. + * stl/bits/type_traits.h: Ditto. + +2000-04-06 Benjamin Kosnik + + * mkcheck.in (SRC_DIR): Change default mkcheck behavior, so that + it is more useful for --enable-libstdcxx-v3. Use the built + compilers with v3, instead of compilers in PATH, and don't + re-include include directories for checking the install. + +2000-04-05 Benjamin Kosnik + + * src/Makefile.am (AM_CXXFLAGS): Disable NAMESPACES, as this is on + by default when using --enable-libstdcxx-v3. + * src/Makefile.in: Regenerate. + * configure.in: Disable GLIBCPP_ENABLE_NAMESPACES, + GLIBCPP_ENABLE_RELIBGCC for --enable-libstdcxx-v3 flag. + * configure: Regenerate. + * mkcheck.in: Deal with NAMESPACES. + +2000-04-05 Petter Urkedal + + * src/cmath.cc: New file... + (pow(*, int)): Define functions... + * src/Makefile.am (sources): ...register file. + * src/Makefile.in: Regenerate. + * bits/std_cmath.h (pow): ...declare functions here, and remove + old definitions. + +2000-04-04 Benjamin Kosnik + + * acinclude.m4 (GCC_OBJDIR): Tweaks + +2000-04-03 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_CPU): Add arm configure bits. + * config/cpu/arm: New directory. + + Jesper Skov + * config/cpu/arm/atomicity.h: New file. + +2000-03-31 Benjamin Kosnik + + * stl/bits/stl_config.h: Make _STL_THREADS depend on _REENTRANT. + Remove unused bits. Clean. + +2000-03-29 Benjamin Kosnik + + * testsuite/25_algorithms: New directory. + * testsuite/25_algorithms/min_max.cc: New file. + +2000-03-29 scott snyder + + * bits/locale_facets.tcc (do_put): Allow a couple extra digits of + precision beyond that which we get from numeric_limits::digits10. + + * stl/bits/stl_algobase.h (max, min): Don't use comparison + operator. + + * testsuite/23_containers/bitset_shift.cc: Fix. + + * testsuite/27_io/ios_manip_fmtflags.cc (test01): Don't give a + temporary to imbue(). + + * bits/std_fstream.h (sync): Resync libio's idea of the current + file position with the external file. + +2000-03-28 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_arith.cc.cvs: Fix merge + mistake. + + * bits/std_fstream.h (filebuf::is_open): Check for _M_file before + attempting calls to it. + * bits/fstream.tcc (ctors): Don't call _M_init_filebuf in + ctors. Instead, call _M_init_filebuf ... + (open): Here, as suggested by 27.8.1.3. + * src/ios.cc (ios_base::Init::Init()): Clean up default filebufs + properly when initializing cout/cin/cerr. + +2000-03-27 Russell Davidson + + * testsuite/23_containers/multiset.cc (main): Clean up for namespaces. + * testsuite/22_locale/ctype_char_members.cc: And here. + * testsuite/27_io/streambuf.cc (streambuf): And here. + * testsuite/27_io/ostream_inserter_char.cc (test06): And here. + * testsuite/27_io/istream_unformatted.cc (test05): And here. + * testsuite/27_io/istream_extractor_arith.cc: And here. + * testsuite/27_io/ios_manip_basefield.cc (test02): And here. + * testsuite/27_io/ios_base_members_static.cc: And here. + * bits/std_climits.h (_CPP_CLIMITS): Fix typo. + +2000-03-27 Chris Faylor + + * configure.in: Remove setting of CXX if canadian cross. + * configure: Regenerate. + +2000-03-27 Nathan Myers + + * bits/sstream.tcc: Optimize. + * bits/basic_string.h(string::append): Don't inline. + * bits/string.tcc: Move out-of-line. + +2000-03-27 Phil Edwards + + * acinclude.m4: (GLIBCPP_CHECK_COMPILER_VERSION) When using <2.96, + define WERRORSUPPRESS so that the inlining warnings won't kill us. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.am: Use WERRORSUPPRESS for the files that need it. + * src/Makefile.in: Regenerate. + + * docs/install.html: Almost complete rewrite. + +2000-03-25 Phil Edwards + + * docs/install.html: Explain -Werror problem at "#Werror" mark. + * docs/faq/index.html: Testsuite will die horribly if new libgcc.a + not installed. + * docs/faq/index.txt: Regenerate. + +2000-03-24 Alexandre Oliva + + * src/Makefile.am (libio_headers_install): Fix. + * src/Makefile.in: Regenerate. + +2000-03-24 Benjamin Kosnik + + * docs/17_intro/RELEASE-NOTES: Fix typos. + * docs/index.html: Update. + * docs/17_intro/BUGS: Update. + * docs/status.html: Update for 2.90.8 release. + +2000-03-23 Phil Edwards + + * Makefile.am: Better error message when missing libgcc2.ready. + * Makefile.in: Regenerate. + * acinclude.m4: Fastidious nitpicking reformatting. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * mkcheck.in: Must use same namespace settings as the library being + tested. Also log ST_FLAG, since it's being passed. + * docs/install.html: Add brief chunk on configuration. + * docs/17_intro/RELEASE-NOTES: Fix minor Cygwin typo. + * docs/23_containers/howto.html: Mention MT-safe string. + * docs/faq/index.html: Minor updates. + * docs/faq/index.txt: Regerarate. + +2000-03-22 Benjamin Kosnik + + * bits/sstream.tcc (seekoff): Fix for gptr() null cases. + Return newoff. + * bits/fstream.tcc (seekoff): Sync. + (seekpos): Sync. + * testsuite/27_io/ostream_unformatted.cc: New file. + * testsuite/27_io/stringbuf.cc: Fix. + * testsuite/27_io/istream_unformatted.cc (test04): Fix. + + * config/newlib/bits/ctype_base.h (ctype_base): Fix. + * config/newlib/ctype.cc (ctype): Change __ctype -> _ctype_. + + * src/complex_io.cc (operator>>complex): Tweak. + + * config/cpu/alpha/atomicity.h: Explicitly typedef uint32_t, int32_t if + does not exist. + * config/cpu/sparc/sparc64/atomicity.h: Same. + * config/cpu/sparc/sparc32/atomicity.h: Same. + * config/cpu/powerpc/atomicity.h: Same. + * config/cpu/i386/atomicity.h: Same. + * config/cpu/generic/atomicity.h: Same. + * configure.in: Check for inttypes.h. + * configure: Regnerate. + +2000-03-21 Benjamin Kosnik + + * bits/std_sstream.h (_M_init_stringbuf): Set initial ate position + correctly. + * testsuite/27_io/ostream_inserter_char.cc (test06): Add tests for ate. + + * docs/17_intro/RELEASE-NOTES (New): Add bits. + + * configure.in: Move AC_CHECK_HEADERS to a point where we know we + are compiling natively. + + * libio/*: Update to CVS libio from egcs. + +2000-03-21 Phil Edwards + + * docs/download.html: Document use of -z9 for CVS. + * docs/index.html: Add target date (no link) for future snapshot. + +2000-03-21 Gabriel Dos Reis + + * bits/slice_array.h: Rename generic type template parameter name + '_T' to '_Tp'. + * bits/mask_array.h: Ditto + +2000-03-20 Benjamin Kosnik + + * *: Change copyright holder from "Cygnus Solutions" to "Free + Software Foundation, Inc." + + * docs/configopts.html: Explain what "hella versions" means. + * docs/install.html: Some tweaks--nice job on this Phil. + * docs/documentation.html: Add a direct link to configuration options. + + * src/Makefile.am (OPTIMIZE_CXXFLAGS): Add in extras. + * docs/17_intro/RELEASE-NOTES (New): Add. + * bits/c++config.h (__GLIBCPP__): Bump version. + + * config/c_io_libio.cc (__basic__file(__c_lock*)): Change argument + type to match prototype. + +2000-03-20 Phil Edwards + + * docs/install.html: Update for new funky build procedure. Move + description of 'configure' options to... + * docs/configopts.html: ...here. New file. + * docs/17_intro/howto.html: Updates for new snapshot. + * docs/20_util/howto.html: Ditto. + * docs/21_strings/howto.html: Ditto. + * docs/21_strings/stringtok_std_h.txt: Fix example typos. + * docs/22_locale/howto.html: Ditto. + * docs/23_containers/howto.html: Ditto. + * docs/faq/index.html: Ditto. + +2000-03-18 Petter Urkedal + Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_CHECK_COMPLEX_SUPPORT): Move code for main + to the right place. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-03-16 Benjamin Kosnik + scott snyder + + * config/c_io_libio.h: Add __c_lock. + * config/threads-no.h: Same here. + * config/threads-posix.h: Add __mutext_type typedef. + * config/c_io_libio.cc: basic_file ctor takes lock arg. + * bits/basic_file.h: Ctor takes lock arg. + * bits/std_fstream.h: Add _M_lock. + * bits/fstream.tcc: Supply it to basic_file ctor. + + * mkcheck.in (resultstext): Change [[ to [. + + * testsuite/27_io/ostream_inserter_char.cc (test06): Tweak. + + * bits/locale_facets.h: Tweak. + + * stl/bits/stl_config.h: Fix defines. + +2000-03-16 Benjamin Kosnik + + * mkcheck.in (INC_PATH): Add paths from cpu_include_dir to find + atomicity.h + * configure: Regenerate. + * aclocal.m4: Regnerate. + +2000-03-16 Nathan Myers + + * bits/string.tcc: Add MT support. + * bits/basic_string.h: Same. + +2000-03-16 Phil Edwards + + * configure.in: Make --enable-namespaces and -libgcc-rebuild=../.. + the defaults. + * configure: Regenerate. + + * config/solaris/solaris2.7/ctype.cc: Fix unsigned/signed comparison. + +2000-03-16 Phil Edwards + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): If Sol2.5 ctype is found, keep + checking for 2.[67]. (GLIBCPP_ENABLE_RELIBGCC): No longer ignore + any defaults passed in. + * aclocal.m4: Regenerate. + +2000-03-16 Phil Edwards + + * mkcheck.in: Report total successes and failures. + +2000-03-15 Benjamin Kosnik + + * config/cpu: New directory, intended to be used to provide + cpu-specific configuration files. In particular, assembly language + primitives for thread safety. + * config/cpu/alpha: Populate. + * config/cpu/alpha/atomicity.h: New file. + * config/cpu/arm: Populate. + * config/cpu/generic: Populate. + * config/cpu/generic/atomicity.h: New file. + * config/cpu/hppa: Populate. + * config/cpu/i386: Populate. + * config/cpu/i386/atomicity.h: New file, take from i486. + * config/cpu/m68k: Populate. + * config/cpu/mips: Populate. + * config/cpu/powerpc: Populate. + * config/cpu/powerpc/atomicity.h: New file. + * config/cpu/sparc: Populate. + * config/cpu/sparc/sparc32: Populate. + * config/cpu/sparc/sparc64: Populate. + * config/cpu/sparc/sparc32/atomicity.h: New file. + * config/cpu/sparc/sparc64/atomicity.h: New file. + + * src/Makefile.am (myinstallheaders): Add install routines. + * acinclude.m4 (GLIBCPP_CHECK_CPU):Add configuration for the + cpu dir. + * configure.in: Add. + + * config/default: Adopt glibc naming conventions, and so move to + * config/generic: Here. + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Modify default case to generic. + +2000-03-15 Bill Thompson + + * testsuite/27_io/ostream_inserter_char.cc (test06): Add test. + +2000-03-14 Phil Edwards + + * docs/17_intro/howto.html: Add missing "TOC" entry, and new section. + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Fixup. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2000-03-13 scott snyder + Jason Merrill + + * bits/locale_facets.h (class ctype, class ctype, class + ctype): More mask fixes. + * testsuite/22_locale/ctype.cc: Test for the problem. + +2000-03-13 Benjamin Kosnik + + * acconfig.h: Add bits. + * configure.in: Move AM_PROG_LIBTOOL up in file. + Tweak cross compiling info. + * configure: Regenerate. + + * mknumeric_limits (XCOMPILE): Echo compilation line for + gen-num-limits.cc + + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Add aix checks. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * config/aix/ctype.cc (ctype): Tweak. + * config/aix/bits/ctype_base.h (ctype_base): Tweak. + * config/aix/bits/ctype_specializations.h: New file. + +2000-03-10 scott snyder + + * stl/bits/stl_vector.h (_M_assign_aux): Fix for __normal_iterator + conversions. + * testsuite/23_containers/vector_modifiers.cc (test01): Add a + regression test for the problem. + +2000-03-09 Benjamin Kosnik + + * testsuite/27_io/streambuf.cc (class testbuf): Same here. + * bits/fpos.h: And here. + * bits/std_ostream.h: Same here. + * bits/std_istream.h: Same here. + * bits/basic_ios.h: Same here. + * bits/std_fstream.h: Same here. + * bits/sbuf_iter.h (std): Here too. + * bits/std_sstream.h: Make types public. + + * src/misc-inst.cc: Use size_t instead of unsigned int. + * bits/locale_facets.tcc (_S_format): For now, cast to char. I + suppose this should be ctype::narrow... all the ctype + stuff needs to be cleaned up. + +2000-03-09 Phil Edwards + + * docs/gentop: Remove entire directory, finally. + +2000-03-09 scott snyder + + * bits/std_cmath.h (modf): Fix pointer overrun. + * testsuite/26_numerics/c_math.cc (test04, main): Add a regression + test for the problem. + +2000-03-09 Phil Edwards + + Looks like changes to the #include'd files must be followed by a + change to the #include'ing files to take effect. Caveat emptor. + * docs/header.html: New file, for server-side include. + * docs/footer.html: New file, for server-side include. + * docs/documentation.html: Change to use SSI. + * docs/download.html: Ditto. + * docs/index.html: Ditto. + * docs/mail.html: Ditto. + * docs/status.html: Ditto. + * docs/thanks.html: Ditto, plus minor updates. + * docs/how.html: Remove. + +2000-03-09 Benjamin Kosnik + + Preliminary alpha-linux support. + * src/locale.cc (ctype): Use correct types... + * bits/locale_facets.h (ctype): Add __table_type typedef. + (ctype): Same. + * bits/locale_facets.h (ctype): Have char and wchar_t + types match for table_size (size_t). + + * config/gnu-linux/ctype.cc (ctype): Change char_type to wchar_t + as per char specialization. + * config/*/ctype.cc: Same. + +2000-03-09 Gabriel Dos Reis + + * bits/locale_facets.h (_Ctype<>::mask): Import from base class + _Ctype_nois<>. Template base classes are never examinated in + first-phase name-lookup. + +2000-03-08 Benjamin Kosnik + + Add Solaris 2.5.1 support. + * config/solaris/solaris2.5/bits/ctype_base.h (ctype_base): And here. + * config/solaris/solaris2.5/ctype.cc: Fixup. + * config/solaris/solaris2.5/bits/ctype_specializations.h: Add. + * acinclude.m4 (GLIBCPP_CHECK_CTYPE): Add bits for solaris2.5.1. + * aclocal.m4: Regenerate. + * configure: Regenerate. + + * config/default/ctype.cc (ctype): Fixup. + +2000-03-07 Benjamin Kosnik + + * testsuite/27_io/filebuf.cc: Activate init code from yesterday... + * testsuite/27_io/ostream_inserter_arith.cc (testcases): Fix for + non-wchar_t case. + +2000-03-07 Gabriel Dos Reis + + * bits/cpp_type_traits.h: Expand on this file purpose. + +2000-03-06 Benjamin Kosnik + + * bits/locale_facets.h (ctype): Remove static members, and + re-work initialization code. + (ctype): Same. + Move _S_touppper to _M_toupper and initialize in ctor. + Move _S_tolower to _M_tolower and initialize in ctor. + Move _S_table to _M_ctable and initialize in ctor. + * bits/locale_facets.h (std): And here. + * src/locale.cc (std): Tweak. + * config/gnu-linux/ctype.cc: Change initialization here. + * config/newlib/ctype.cc: And here. + * config/solaris/solaris2.7/ctype.cc: And here. + * config/solaris/solaris2.6/ctype.cc: And here. + + * bits/localefwd.h: Tweak. + * bits/std_streambuf.h: Tweak formatting. + + * testsuite/27_io/filebuf.cc: Remove BUFSIZ dependencies. + +2000-03-05 Chip Salzenberg + + * src/misc-inst.cc (basic_iostream<>): Instantiate. + +2000-03-02 Phil Edwards + Kevin Atkinson + + Initial grab of SGI's strstream implementation with minor + modifications. + * src/strstream.cc: New file. + * std/strstream: New file. + * stl/bits/std_strstream.h: New file. + * bits/std_streambuf.h: Add public access. + * src/Makefile.am: Add strstream sources to list of dependencies. + * src/Makefile.in: Regenerate. + +2000-03-03 2000 Gabriel Dos Reis + + * bits/valarray_meta.h: Fix typo. + +2000-03-02 Alexandre Oliva + Chip Salzenberg + Petter Urkedal + + * src/Makefile.am (myinstallheaders): Hack to avoid + `for i in ; do'. + * src/Makefile.in: Regenerate. + +2000-03-02 Chip Salzenberg + + * libio/Makefile.an, math/Makefile.an, src/Makefile.am + (LINK): Put quotes around "$(CC)" for libtool link mode, + so libtool will use "-B" options during GCC bootstrap. + * */Makefile.in: Regenerate. + +2000-03-02 Petter Urkedal + + * config/c_io_libio.h: Enclose it all in ::std. + * bits/basic_string.h (basic_string<>): Make types and + `npos' public. + * mkc++config: Truncate output file before writing. + +2000-03-01 Benjamin Kosnik + + * math/cabsf.c (__mycabsf): Rename to cabsf. + * math/cabs.c (__mycabs): Rename to cabs. + +2000-02-29 LLeweLLyn Reese + + * bits/basic_string.h: Move declarations of __out_of_range(), + __length_error() and accompanying macros ... + * bits/exception_support.h: here. (Newly created file). + * bits/basic_string.h: #include + * stl/bits/stl_vector.h: #include + * src/Makefile.am (headers): Add. + * src/Makefile.in: Regenerate. + +2000-02-29 Benjamin Kosnik + + * bits/cpp_type_traits.h: Rename structs so they don't clash with + type_traits.h. + * bits/valarray_array.h: Synch. Fix typos. + + * libio/Makefile.am: Change to only compile source files that + config/c_io_libio.cc actually needs. + * libio/Makefile.in: Regnerate. + * libio/PlotFile.hes SFile.h builtinbuf.h editbuf.h floatconv.c + floatio.h fstream.h indstream.h iofclose.c iofdopen.c iofeof.c + ioferror.c iofflush.c iofgetpos.c iofgets.c iofopen.c iofprintf.c + iofputs.c iofread.c iofscanf.c iofsetpos.c ioftell.c iofwrite.c + iogetc.c iogetdelim.c iogetline.c iogets.c ioignore.c iomanip.h + iopadn.c ioperror.c iopopen.c ioprims.c ioprintf.c ioputc.c + ioputs.c ioscanf.c ioseekoff.c ioseekpos.c iosetbuffer.c + iosetvbuf.c iosprintf.c iosscanf.c iostream.h iostrerror.c + ioungetc.c iovfprintf.c iovfscanf.c iovsprintf.c iovsscanf.c + istream.h list.out ostream.h outfloat.c parsestream.h peekc.c + pfstream.h procbuf.h stdiostream.h stream.h streambuf.h strfile.h + strops.c strstream.h: Delete. + + * bits/basic_file.h: Stub out or delete unused bits in this + interface. + (filepos_beg): Remove. + (filepos_cur): Remove. + (filepos_valid): Remove. + * config/c_io_libio.cc: Resynch with the changes to basic_file. + +2000-02-29 Gabriel Dos Reis + + * bits/cpp_type_traits.h: Correct typo. + +2000-02-29 Gabriel Dos Reis + + * bits/cpp_type_traits.h: New file. + + * bits/valarray_array.h: Tweak. #include + Improve array construction. + (_Array_default_ctor): New dispatcher class. + (__valarray_default_construct): New function. + (_Array_copy_ctor): New dispatcher class. + (__valarray_copy_construct): New function. + (_Array<>::free_data): Remove. + + * src/Makefile.am (headers): Add cpp_type_traits.h + * src/Makefile.in: Regenerate. + +2000-02-28 Benjamin Kosnik + + Prune libio directory to match files in libio/Makefile. + * libio/PlotFile.cc,indstream.cc, isgetsb.cc, sbform.cc, + stream.cc, SFile.cc, ioassign.cc, isscan.cc, sbgetline.cc, + streambuf.cc, builtinbuf.cc, ioextend.cc, osform.cc, sbscan.cc, + strstream.cc, editbuf.cc, iomanip.cc, parsestream.cc, + stdiostream.cc, filebuf.cc, iostream.cc, pfstream.cc, + stdstrbufs.cc, fstream.cc, isgetline.cc, procbuf.cc, + stdstreams.cc: Remove. + * libio/floatio.h, iolibio.h, iostdio.h, iostreamP.h: Remove. + * libio/iofflush_u.c: Remove. + + * libio/dbz: Remove. + * libio/include: Remove. + * libio/stdio: Remove. + * libio/tests: Remove. + * libio/testsuite: Remove. + + * config/c_io_libio.cc: Add fcntl.h include for Solaris. + + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Add bits. + * configure.in: Replace 'grep -e' with 'grep' for Solaris. + * configure: Regenerate. + +2000-02-25 Benjamin Kosnik + + Abstract out the underlying "C" io bits. + * bits/std_new.h: Remove include, as well as . + * stl/bits/stl_string_fwd.h: Remove include. + * bits/std_cwchar.h: Wrap with _GLIBCPP_USE_WCHAR_T guards. Don't + include . + * stl/bits/stl_config.h: Don't include _G_config.h. + + * bits/basic_file.h: Allow for non-inheritance based __basic_files. + * config/c_io_libio.h (_GLIBCPP_BASIC_FILE_INHERITANCE): Define. + * config/c_io_libio.cc: Tweak. + + * src/Makefile.am (TOPLEVEL_INCLUDES): Add includedir. + * src/Makefile.in: Regenerate. + * Makefile.am (AM_MAKEFLAGS): Define includedir so that + prefix/include files will be picked up. + * Makefile.in: Regenerate. + * math/Makefile.am (TOPLEVEL_INCLUDES): And here. + * libio/Makefile.am (TOPLEVEL_INCLUDES): And here. + + * bits/std_ios.h: Include instead of libio. + * bits/fpos.h: And here. + * bits/basic_file.h (get_fileno): Move definition from ... + * src/basic_file.cc (std): To here. + * bits/fpos.h: Move types for streamoff, streampos to.. + * bits/basic_file.h: Move __c_file_type and fpos typedefs to... + * config/c_io_libio.h: ...here. + (_GLIBCPP_[BOOLALPHA, HEX, DEC, FIXED, INTERNAL, LEFT, OCT, RIGHT, + SCIENTIFIC, SHOWBASE, SHOWPOINT, SHOWPOS, SKIPWS, UNITBUF, + UPPERCASE, ADJUSTFIELD, BASEFIELD, FLOATFIELD, BADBIT, EOFBIT, + FAILBIT, GOODBIT, APP, ATE, BINARY, IN, OUT, TRUNC): New macros to + abstract out bits in ios_base. + * bits/ios_base.h: Re-macrofy. + * src/basic_file.cc : Rename, move to + * config/c_io_libio.cc: Here. + * config/c_io_libio.h: New file. Include libio. + * bits/c++config.h: Don't define _GLIBCPP_USE_LIBIO. + * configure.in (blddir): Add enabling bits for GLIBCPP_ENABLE_CSTDIO. + * configure: Regenerate. + * src/Makefile.am (sources): Take out basic_file.cc and add c++io.cc. + (generated_headers): Add c++io.h + * acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): New function to select + underlying "C" io library. + * acinclude.m4 (GLIBCPP_CHECK_LIBIO): Roll functionality into + GLIBCPP_ENABLE_CSTDIO. + + * configure.in: Add configure bits for cross compiling non-newlib + targets. . + GLIBCPP_CHECK_COMPILER_VERSION: Take out this test for this + target, as we assume g++ support is not the limiting factor. + GLIBCPP_CHECK_LIBIO: Same, know we don't need libio. + * configure: Regenerate. + +2000-02-22 Benjamin Kosnik + + * Makefile.am (INTERFACE): Define. + * Makefile.in: Regenerate. + * libio/ChangeLog: Add entry. + +2000-02-21 Benjamin Kosnik + + * docs/install.html: Update install directions. + + * docs/status.html: Fix sidebar to be consistent. + * docs/thanks.html: Same. + * docs/links.html: Same. + * docs/mail.html: Same. + * docs/download.html: Same. + + * testsuite/27_io/filebuf.cc: Change BUFSIZ to buffer_size, and + kill the macro BUFSIZ. I think the solaris fails lie elsewhere + however, in the ctype_char_members.cc fail (for instance.) + * testsuite/17_intro/headers.cc: Remove extraneous fails for hosts + that do not have wchar_t enabled. + * testsuite/27_io/ostream_inserter_arith.cc (struct _TestCase): + Same here. + * testsuite/27_io/iostream_objects.cc: And here. + + * libio/gen-params (CONFIG_NM): Specifically add in nm as the + default CONFIG_NM. + +2000-02-18 Benjamin Kosnik + Tom Tromey + + * configure.in: Manually add MULTISUBDIR. + * configure: Regenerate. + * src/Makefile.am (MULTISUBDIR): Add the lesser evil of Tom's two + "Eww" hacks to get multilib installs working correctly. + ($(headers): Test for MULTISUBDIR before installing. + * Makefile.am (AM_MAKEFLAGS): Don't define MULTISUBDIR, instead + have configure hack it in. + * Makefile.in: Regenerate. + * acinclude.m4 (GLIBCPP_CXXFLAGS): Tweak wording. + Add enabling bits for native Cygwin ctypes, and other newlib-based + Oses. + +2000-02-17 Benjamin Kosnik + + * mkc++config (OUT_H): Remove EOF in cygwin. + * acinclude.m4 (LIBS): Tweaks to allow cygwin to configure. + + Tom Tromey + * src/Makefile.am: Tweaks for installing multilibs. + +2000-02-17 Benjamin Kosnik + + * src/Makefile.am: + (toolexeclib_LTLIBRARIES): Use this instead of lib_LTLIBRARIES. + Add USE_LIBDIR bits here, not... + * src/Makefile.in: Regenerate. + * Makefile.am: ...here. + * Makefile.in: Regenerate. + +2000-02-17 Benjamin Kosnik + + * acinclude.m4 (LIBS): Fix typos. + * configure.in: _GLIBCPP_BUGGY_FLOAT_COMPLEX, + _GLIBCPP_BUGGY_COMPLEX for crosses. + * src/Makefile.am (std_headers): Add libio.h as install include, + as with _G_config.h + * src/Makefile.in: Regenerate. + + * mkcheck.in: Add bits to set CXX to cross compiler. + + * src/complex_io.cc: Tweak. + * configure.in: _GLIBCPP_BUGGY_COMPLEX for crosses. + * configure: Regenerate. + + * config/newlib/ctype.cc: Tweaks. + * config/newlib/bits/ctype_base.h (ctype_base): Set mask to char, + not const char. + * src/complex_io.cc (operator>>(istream, complex): Define out if + BUGGY_COMPLEX. + +2000-02-16 Benjamin Kosnik + + * config/newlib/bits/ctype_base.h: Correct _S_table. + + Reconfigure ctype support for "C" libraries that don't use arrays. + * testsuite/22_locale/ctype_char_members.cc: New file. Test for + basic ctype functionality. + * src/locale.cc: Move host-specific ctype functions that are not + inlines to config/*/ctype.cc files. + (ctype::do_tolower): For instance. + (ctype::do_toupper): For instance. + (ctype::do_tolower): For instance. + (ctype::do_toupper): For instance. + * config/gnu-linux/ctype.cc: Modify. + * config/default/ctype.cc: Modify. + * config/newlib/ctype.cc: Modify. + * config/solaris/solaris2.6/ctype.cc: Modify. + * config/solaris/solaris2.7/ctype.cc: Modify. + + * bits/locale_facets.h (ctype::is): Mark inline, move + out-of-line. + (ctype::scan_is): Here too. + (ctype::scan_not): Here too. + Move out of line defs to config/*/bits/ctype_specializations.h. + * config/gnu-linux/bits/ctype_specializations.h: ...here. New file. + * config/default/bits/ctype_specializations.h: ...here. New file. + * config/newlib/bits/ctype_specializations.h: ...here. New file. + * config/solaris/solaris2.6/bits/ctype_specializations.h: New file. + * config/solaris/solaris2.7/bits/ctype_specializations.h: New file. + * src/Makefile.am (headers): Add ctype_specializations.h. + * src/Makefile.in: Regenerate. + + Aaron Weiss + * Makefile.am (AM_MAKEFLAGS): Add NM_FOR_BUILD, NM_FOR_TARGET, and + CONFIG_NM for Solaris builds. + * Makefile.in: Regenerate. + + * src/locale.cc: Tweak formatting. + +2000-02-15 Benjamin Kosnik + + Jim Parsons + * testsuite/27_io/istream_unformatted.cc (test06): Add test. + * bits/istream.tcc (read): Set failbit if !good(). Don't increment + gcount if eof. + (readsome): Same. + + Michel Decima + * testsuite/27_io/streambuf.cc: Add test. + * bits/streambuf.tcc (xsgetn): Don't test for valid mode. + (xsputn): Same. + + * src/Makefile.am (AM_CXXFLAGS): Pass down AC_CXXFLAGS, + OPTIMIZE_CXXFLAGS, etc. So --enable-debug and --enable-namespaces + will work correctly, for instance. + * src/Makefile.in: Regenerate. + + * bits/locale_facets.h: Fix merge error. + (num_put::put(unsigned long long): And here. + * mknumeric_limits (trait_name): Same. + +2000-02-15 Chip Salzenberg + + Support 'configure --enable-long-long'. + * bits/c++config.h (_GLIBCPP_USE_LONG_LONG): Remove. + * stl/bits/stl_config.h (__STL_LONG_LONG): Remove '#if 0'. + * acconfig.h (_GLIBCPP_USE_LONG_LONG): Add. Default to undef. + * acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Define flag macro. + * configure.in (GLIBCPP_ENABLE_LONG_LONG): Use it. + + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * configure: Regenerate. + +2000-02-15 Chip Salzenberg + + Improve (complete?) 'long long' support. + * mknumeric_limits: Call $CXX with $CPPFLAGS. Define statics + for {,unsigned} long long if the limits header declares them. + * src/gen-num-limits.cc: Include early. + (__USE_GNU, _GNU_SOURCE): Define if _GLIBC_USE_LONG_LONG. + (long long, unsigned long long): Gen limits if _GLIBC_USE_LONG_LONG. + * bits/locale_facets.h (num_get<>::get(..., long long &)): Define. + (num_put<>::put(..., long long)): Likewise. + (num_put<>::put(..., unsigned long long)): Likewise. + * bits/locale_facets.tcc (_S_format): Rename from _S_format_long. + Templatize last parameter to support 'long long'. + (num_put<>::put(...)): Call _S_format with new name. + (num_put<>::put(..., long long)): Define. + (num_put<>::put(..., unsigned long long)): Likewise. + * src/locale-inst.cc (_S_format): Instantiate under new name. + +2000-02-15 Petter Urkedal + + * src/complex.cc (operator<<, operator>>): Moved from here... + * src/complex_io.cc: ...to new file. + (operator>>): Stub replaced by the real thing. + * src/Makefile.am (sources): Inserted complex_io.cc. + * src/Makefile.in: Regenerate. + * testsuite/26_numerics/complex_inserters_extractors.cc: Check it. + +2000-02-14 Benjamin Kosnik + + Add in ctype information for newlib "C" libraries. + * config/newlib: New directory + * config/newlib/bits/ctype_base.h: New file. + * config/newlib/ctype.cc: New file. + + * ctype/config/linux/*: Rename, move to... + * ctype/config/gnu-linux/*: Here. + + Finish off multilib work. + * configure.in: Don't set CXX if not Canadian cross. + * configure: Regenerate. + * acinclude.m4 (GLIBCPP_CHECK_LIBIO): Tweak messages. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + + * install-sh: Remove, as AC_CONFIG_AUX_DIR(..) picks this out of + the top-level gcc directory now. + * mkinstalldirs: Remove. + * missing: Remove + * ltconfig: Remove. + * ltmain.sh: Remove. + * config.guess: Remove. + * config.sub: Remove. + +2000-02-13 Benjamin Kosnik + + * configure.in (glibcpp_basedir): Add glibcpp_basedir. + * Makefile.am: Move mutlilib stuff to src/Makefile.am. + * Makefile.in: Regenerate. + * src/Makefile.am: Add multilib bits. + * src/Makefile.in: Regenerate. + +2000-02-12 Benjamin Kosnik + + * configure.in: Clean, add some multilib support. + * configure: Regenerate. + * configure.host: New file. + + * acinclude.m4: GLIBCPP_CHECK_LIBIO. Take bits from configure.in and + roll a new function, checks for presence of libio. + GLIBCPP_CHECK_COMPILER_VERSION: Same. + GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT: Same. + GLIBCPP_CHECK_MATH_SUPPORT: Same. + GLIBCPP_CHECK_WCHAR_T_SUPPORT: Same. + GLIBCPP_CHECK_LIBIO: Same. + GLIBCPP_CHECK_CTYPE: Same. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + + * Makefile.am: Tweaks. + * Makefile.in: Regenerate. + +2000-02-11 Benjamin Kosnik + + * configure.in: Make outputing the libio/Makefile + conditional. Haha, yeah right. Anyway, we instead do this thing + where if libio is found, then we build a null library, as there is + no point in duplicating the found libio. + * Makefile.am: Tweak. + * Makefile: Regenerate. + * libio/Makefile.am: Add _G_config.h stuff. Now cross compilers + are happy happy happy. + * libio/Makefile.am: Regenerate. + * libio/gen-params: New file. + * src/Makefile.am: Make libio.la non-conditional, as it is now a + null library if it's not needed. At least we are being consistent, + if not as elegant as we could be. + * src/Makefile: Regenerate. + +2000-02-10 Benjamin Kosnik + + * Makefile.am (SUBDIRS): Add libio again. + * Makefile.in: Regenerate. + * configure.in (BUILD_LIBIO_INCLUDE): And here. + (AC_OUTPUT): Generate libio/Makefile again. + * configure: Regnerate. + * src/Makefile.am (libstdc___la_LIBADD): Change path so that + libio.la is referring back to the libio subdir again. + (LIBIO_INCLUDES): And here. + * src/Makefile.in: Regenerate. + +2000-02-09 Benjamin Kosnik + + * math/complex-stub.h: Missed one. Change __mycabs* to cabs*. + +2000-02-09 Gabriel Dos Reis + + * bits/valarray_array.h (): #include. + (__valarray_get_memory): New function. + (__valarray_release_memory): Likewise. + (__valarray_default_construct): New functions. + (__valarray_fill_construct): New function. + (__valarray_copy_construct): New funstions. + (__valarray_destroy_elements): New function. + + * bits/valarray_array.tcc (__valarray_copy_construct): New + functions. + + * bits/std_valarray.h (valarray<>::valarray): Use + __valarray_get_memory and __valarray_fill_construct, + __valarray_copy_construct, __valarray_default_construct to + properly construct valarrays. + (valarray<>::~valarray): Use __valarray_destroy_elements to + destroy elements and __valarray_release_memory to return memory. + (valarray<>::shift): Tweak. + (valarray<>::cshift): Likewise. + (valarray<>::resize): Robustify. + +2000-02-09 Benjamin Kosnik + + * mknumeric_limits (XCOMPILE): Add support for cross compiling. + * bits/limits_generic.h: New file, defaults. + * src/limits_generic.cc: New file, defaults. + * configure.in (LIBS): Run mknumeric_limits at configure time. + * acconfig.h: Remove PACKAGE VERSION HAVE_COMPLEX + HAVE_LC_MESSAGES, tidy, clean, etc. + * src/Makefile.am (geberated_sources): Remove. + + * bits/fpos.h: Use _GLIBCPP_USE_LIBIO guards for libio typenames + (_IO_off_t, _IO_ssize_t) + + * src/complex.cc: Use glibc's if + possible. . . apparently this was not being done before. Include + tweaks. + (abs): Enable cabs if it's around, instead of mycabs. + * src/complexf.cc (FCT): Add global scope to match complex.cc. + * src/complexl.cc (FCT): Same. + * math/Makefile.am (EXTRA_LONG_DOUBLE_yes): Change mycabsl to cabsl. + (libmath_la_SOURCES): And here. + * math/(mycabs.c, mycabsf.c, mycabsl.c): Move to. . . + * math/(cabs.c, cabsf.c, cabsl.c): . . . Here. + * math/complex-stub.h: Move c_log declarations into. . . + * math/mathconf.h: Here. This is because glibc's + declares cclog, not c_log. The case of the dueling standards. . . + * math/mathconf.h: Add _GLIBCPP_HAVE_* to macros. + * math/Makefile.am: Change. + * math/nan.c (nan): Change signature. + * math/mathconf.h (NAN): Same. + * math/complex-stub.h (nan): And here. + + * Makefile.am (rebuild-stamp): Remove libio and libio + dependencies. Plan to take out libio subdir and just merge with + libio in top level gcc directory. Of course, this assumes there is + a libio in the top level directory (ie ../src_dir). This will + probably change the way this library is configured by default. + * libio/*: Remove. + +2000-02-09 Chip Salzenberg + + * localefwd.h (locale): Make public: facet, id, category. + +2000-02-09 Gabriel Dos Reis + + * testsuite/26_numerics/buggy_complex.cc: Fix Origin:. + + * acinclude.m4: Patch only once! + +2000-02-09 Gabriel Dos Reis + + * testsuite/26_numerics/buggy_complex.cc: New file. + +2000-02-05 Petter Urkedal + + * acinclude.m4: New GLIBCPP_CHECK_COMPLEX_SUPPORT macro. Based + on the 1999-11-21 entries by Mumit Khan. + * configure.in: Use. + * acconfig.h: New _GLIBCPP_BUGGY_COMPLEX macro. + * bits/std_complex.h: Use. + +2000-02-04 Philip Martin + + * stl/bits/stl_algobase.h: Add traits based dispatch for + __normal_iterator in the copy_backward()algorithm + * stl/bits/stl_vector.h: Reduce use of __normal_iterator + base() function. + +2000-02-04 Mumit Khan + + * src/gen-num-limits.cc (signal_handler): Work around signal + handling problem on Cygwin. + Thanks to Chris Faylor . + +2000-02-03 Benjamin Kosnik + + * configure.in: Add (preliminary) support for cross compiles and + multilibs. + Remove AC_C_BIGENDIAN tests. Why is this necessary? Cross + compilation freaks on this. + * configure: Regenerate. + * src/Makefile.am: Add support for cross compiles. + * src/Makefile: Regenerate. + * Makefile.am: Add support for cross compiles. + * Makefile.in: Regenerate. + +2000-02-02 Benjamin Kosnik + + * configure.in (LIBS): Remove unused subdirs. + * configure: Regenerate. + * Makefile.am (SUBDIRS): And here. + * Makefile.in: Regenerate. + * src/Makefile.am (sources): And here. + * src/Makefile.in: Regenerate. + * string/*: Remove. + * amm1/*: Remove. + * generic/*: Remove. + * glibc/*: Remove. + * mkcheck.in (INC_PATH): Include $BUILD_DIR before any source dirs. + + * libtool: Update to libtool-1.3.4. + * ltconfig: Same + * ltmain.sh: Same + * config.sub: Same. + * config.guess: Same. + +2000-02-02 Benjamin Kosnik + Alexandre Petit-Bianco + + * mkc++config: New file. Put autoconf macros into _GLIBCPP_ + namespace instead of polluting global namespace with duplicate + autoconf output. + * configure.in (AC_OUTPUT): Don't need to generate bits/config.h + here anymore. . . + (AC_OUTPUT_COMMANDS): Make it here. + * configure: Regenerate. + * bits/c++config.h.in (_CPP_CPPCONFIG): Change. Tweak. Remove + endif, as now we will add it manually. + Move to this file. . . + * bits/c++config.h: New file. Same as old c++config.h.in except + the ending macro guard is now appended manually. + + * bits/locale_facets.tcc: Change HAVE_* macros to _GLIBCPP_HAVE_*. + * bits/std_cmath.h: Same here. + * bits/std_cwchar.h: And here. + * src/locale.cc: And here. + * src/complexl.cc: And here. + * math/mathconf.h: Change to include "config.h" instead of + bits/c++config.h. + +2000-02-01 Benjamin Kosnik + + * configure.in: Add support for threads. Try a model closer to + libjava, as hopefully if the thread bits are added carefully + enough, the source code will not have gross hacks. Besides, the + libstdc++-v2 model could be easily emulated without the necessity + of linking files in (as currently done)--all that needs to be done + is AC_DEFINE(-D_PTHREADS) etc. However, let's try something + new. . . and see if we arrive at a more elegant solution. + * configure: Regenerated. + * config/threads-no.h: New file. + * config/threads-posix.h: New file. + * src/Makefile.am (myinstallheaders): Install c++threads.h. + * src/Makefile.in: Regenerated. + +2000-01-31 Benjamin Kosnik + + META-QUESTION: Can we just make a "header.html" file and a + "footer.html" and just include them in all the doc sub-pages. The + duplication of the header info is kind of gross, and weak + considering that if you change order or layout then all this stuff + has to be changed in all the sub-files. + + * docs/17_intro/contribute.html: Take out duplicate file info. + * README: Should just contain a link to the docs/index.html + page. Duplicate information removed. + * docs/faq/index.html: Remove indexes into HOWTOS. + * docs/17_intro/howto.html: Make intro and docs part more + centralized. Move intro stuff to documentation.html. + * docs/how.html: Tweak. Does this file need to exist? What calls it? + * docs/README.html: Move documentation files to + documentation.html. Should this file be renamed + "config_and_install.html" as that is what is apparently covered + here. . . + * docs/install.html: Yes. New file, moved and renamed README.html. + * docs/documentation.html: New file. This is the index file for + the documentation. + * docs/index.html: Edit sidebar order. Insert new link to new + documentation spine, documentation.html. + +2000-01-31 Scott Snyder + + * bits/istream.tcc (operator>>(istream&, string&)): Set failbit if + we don't extract any characters. + * testsuite/21_strings/inserters_extractors.cc (main): New tests. + +2000-01-31 Anders Widell + + * stl/bits/std_bitset.h (_M_do_left_shift): Handle case when shift + step is a multiple of the word size. + (_M_do_right_shift): Same. + * testsuite/23_containers/bitset_shift.cc: New file. + +2000-01-31 Nathan Myers + + * README (Documentation): Add path info, fix typos. + +2000-01-26 Benjamin Kosnik + + * bits/locale_facets.tcc (num_get::_M_extract): Add the freaking + crazy group checking for numpunct, for real this time. At some + point, the local variable __grp should probably get replaced a + char array, or something a bit more lightweight. + (num_get::do_get(bool)): Simplify. Don't set bool reference to + parsed value unless err isn't failbit. + (num_get::do_get(*)): Same, make consistent. + + Nathan Myers + Jim Parsons + * testsuite/27_io/istream_extractor_arith.cc (test08): Add + more grouping tests, tweak, scold, wine. + +2000-01-24 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_arith.cc (test07): Add + grouping tests. + * bits/locale_facets.tcc (num_get::_M_extract): Change to fix + grouping bugs. Only allow thousands_sep if _M_use_groupings is + true. + + via + * stl/bits/stl_vector.h (vector::_M_range_check): Throw + out_of_range instead of range_error. + +2000-01-17 Gabriel Dos Reis + + * bits/std_iomanip.h (setw): Fix typo. + +2000-01-14 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_arith.cc: Fix. + * bits/locale_facets.tcc (do_get(...void)): Change to strtoul. + * testsuite/27_io/istream_unformatted.cc (test04): Tweak. + +2000-01-14 Phil Edwards + + * docs/README.html: Reformat, more installation instructions. + * docs/gccrebuild.html: New file. + * docs/faq/index.html: Update for new testsuite output filenames. + * docs/faq/index.txt: Regenerate. + +2000-01-14 Phil Edwards + + * Makefile.am (rebuild-stamp, all-local): New targets. + * Makefile.in: Regenerated. + * acinclude.m4: New macro, GLIBCPP_ENABLE_RELIBGCC. + * aclocal.m4: Regenerated. + * configure.in: Call new macro. Also do some sanity checks + for combinations of --enable's that may not make sense. + * configure: Regenerated. + +2000-01-13 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_arith.cc: Add checks for void*. + * bits/locale_facets.tcc (do_get::(...void)): Set fmtflags + correctly for hex-formatted input. + + * testsuite/27_io/istream_manip.cc (test01): Fix, as per setting + eofbit instead of eofbit | failbit. + * testsuite/27_io/istream_unformatted.cc (test04): Fix, as + ifstreams now are opened or'd with ios_base::in (as is correct). + * bits/fstream.tcc (filebuf::seekoff): Simplify. + * testsuite/27_io/ios_base_members_static.cc (test01): Fix thinko. + +2000-01-12 Benjamin Kosnik + + * bits/std_fstream.h: Add ios_base as a friend to basic_filebuf. + * bits/basic_file.h (basic_file::filepos_cur): Remove incorrect + (misleading) code. + (__basic_file::filepos_valid): Same. + (__basic_file::filepos_beg): Same. + (__baseic_file::get_fileno): New function. + * bits/ios_base.h (ios_base::sync_with_stdio): Implement, including + feedback from LWG 49. + * src/ios.cc: Move definition here. + * testsuite/27_io/ios_base_members_static.cc (test01): Add tests. + + * bits/std_sstream.h (_M_really_sync): Simplify argument list. Set + output part of internal buffer based on string size, so that + _M_out_end is set consistently with filebufs. Correct comments. + * bits/sstream.tcc (stringbuf::overflow): Update here too. + * testsuite/27_io/stringbuf.cc: Changes. + +2000-01-11 Benjamin Kosnik + + * bits/sstream.tcc (seekoff): Set based on end of written buffer, + not buffer size. + * testsuite/27_io/stringbuf.cc: Add tests for seekoff(end). + + * bits/std_fstream.h (ifstream::open): Add ios_base::in to openmode. + (ofstream::open): Add ios_base::out to openmode. + + * bits/locale_facets.tcc (_M_extract): Have consistency between + istream::sentry and extractors, where failbit | eofbit is + set. Don't change this, but instead change. . (do some formatting + tweaks.) + * bits/istream.tcc (istream::sentry): Only set eofbit. + +2000-01-10 Benjamin Kosnik + + * testsuite/27_io/istringstream_members.cc: New file. + +2000-01-09 Benjamin Kosnik + + * bits/istream.tcc (istream::sentry): Flush. + + * configure.in (AC_OUTPUT_COMMANDS): Simplify. + * configure: Regenerate. + * src/Makefile.am (generated_headers): Remove bits/c++config.h so + that make clean will not delete it. + * src/Makefile: Regenerate. + +2000-01-07 Phil Edwards + + * mkcheck.in: Use host-specific invocation of size(1); + GNU binutils isn't necessarily there (more's the pity). + +2000-01-06 Benjamin Kosnik + + * configure.in (LIBS): Better tests for solaris2.6. + * configure: Regenerate. + + + * bits/std_sstream.h: As per libstdc++20. + +2000-01-06 Benjamin Kosnik + + Break out configuration on solaris. + * configure.in (ctype_solaris): Add in bits for solaris2.6 and 2.7. + * config/solaris/ctype.cc: Delete and move to proper version. + * config/solaris/bits: Same. + * config/solaris/solaris2.5: Add this directory, with subdir bits + and file ctype.cc. Probably doesn't work. + * config/solaris/solaris2.6: Same. + * config/solaris/solaris2.7: Same, as per specs via Phil Edwards. + + * Makefile.am: Change paths to mkcheck. + * Makefile: Regenerate. + * configure.in (AC_OUTPUT_COMMANDS): Build mkcheck here. + * configure: Regenerate. + * src/Makefile.am (generated_headers): Add bits/c++config.h. + + * mkcheck: Now autogenerated by configure and renamed. . . + * mkcheck.in (INC_PATH): Add glue for ctype_include_dir. + Have longer-style dates. + Raja R Harinath + * mkcheck: Change path to #!/usr/clocal/bin/bash. + + * docs/README.html: Correct links, maybe. FAQ, install notes, and + general documentation need to be organized around each other, not + fight against each other. . . + +2000-01-04 Phil Edwards + Nicolai Josuttis + + * README: Add a note referring to README.html. + * docs/README.html: New file from Nicolai. + * docs/faq/index.html: Move "how to get a copy" to here. + * docs/gentop/footchunk.html: Update. + * docs/gentop/headchunk.html: New links according to + bkoz's idea for "How to..." stuff. + * docs/gentop/thanks: Actually put people here. + * docs/download.html: Regenerated. + * docs/index.html, docs/links.html, docs/mail.html, + docs/status.html, docs/thanks.html, docs/faq/index.txt: Ditto. + * docs/how.html: Ditto. (This file should go away soon.) + +1999-12-26 Phil Edwards + + * docs/gentop/status: Add snapshot version column, update + for Solaris 7. + * docs/status.html: Regenerated. + +1999-12-26 Phil Edwards + + * docs/faq/index.html: Turn README and RELEASE-NOTES into links + from installation FAQ, and specify location of text files. + * docs/faq/index.txt: Regenerated. + +1999-12-23 Phil Edwards + + * docs/gentop/download: Add links to prebuilds for Cygwin/Mingw32. + * docs/download.html: Regenerated. + +1999-12-22 Phil Edwards + + * docs/faq/index.html: Update 'what works' for .7 snapshot, + clean up various links. + * docs/faq/index.txt: Regenerated. + * docs/gentop/gentop: Smarter regeneration script. + * docs/gentop/{head,foot}chunk.html: Updated with new + contributors link and mod date. + * docs/gentop/index: Snapshot relase date. + * docs/gentop/thanks: New contributors page added. + * docs/{download,how,index,links,mail,status,thanks}.html: + Regenerated from gentop; thanks.html created. + +1999-12-21 Benjamin Kosnik + + * bits/c++config.h.in (__GLIBCPP__): 19991221. + * docs/index.html: Add correct information. + + * config/irix: New directory. + * config/irix/ctype.cc: Add irix-6.5 info. Not tested. + * config/irix/bits/ctype_base.h: And here. + + * config/aix: New directory. + * config/aix/ctype.cc: Add aix-4.2 info. Not tested. + * config/aix/bits/ctype_base.h: And here. + +1999-12-21 Philip Martin + + * bits/basic_string.h: Add special case handling for integral + "iterators". + * bits/std_string.h: include type_traits.h + * testsuite/21_strings/ctor_copy_dtor.cc: Tweak. + +1999-12-21 Benjamin Kosnik + + * bits/fstream.tcc (seekoff): Output buffer based on _M_*_in and + _M_*_end now. + * bits/std_fstream.h (sync): And here. + * testsuite/27_io/filebuf.cc: Revisions. + * testsuite/27_io/filebuf-2.tst: Correct, remove weird character + at the end of the file. + * testsuite/27_io/filebuf-3.tst: Correct. + +1999-12-21 Phil Edwards + + * docs/gentop/index: Hold off on .7 announcement date. + * docs/index.html: Regenerate. + +1999-12-21 Benjamin Kosnik + + * bits/std_fstream.h (sync): Move _M_file->sync() to + _M_really_overflow(). + * bits/fstream.tcc (seekoff): Call sync, not _M_really_overflow so + as to get the _M_file->sync action, which forces the external + buffer to update itself. + (underflow): Same here. + +1999-12-21 Phil Edwards + + * bits/c++config.h.in: Uncomment _GLIBCPP_USE_NAMESPACES and move... + * acconfig.h: ...to here. + * config.h.in: Regenerate from aclocal. + * acinclude.m4: Add GLIBCPP_ENABLE_DEBUG, GLIBCPP_ENABLE_NAMESPACES. + * aclocal.m4: Regenerate from acinclude. + * configure.in: Use ENABLE macros here. + * configure: Regenerate. + * src/Makefile.am: Use results from ENABLE macros. + * src/Makefile.in: Regenerate. + +1999-12-20 Benjamin Kosnik + + * mkcheck (SRC_DIR): Now have to include config/* dir if "make + check" and not "make check-install." Temporarily hack in linux + support. + + * bits/std_streambuf.h: Tweaks. + * bits/streambuf.tcc (xsgetn): Tweaks. + * bits/std_fstream.h (sync): Make _M_really_overflow consistent. + * bits/fstream.tcc (filebuf::underflow): Simplify. + * bits/std_sstream.h (streambuf::underflow): Minor change to make + checks for read position precisely implement the standard. + * bits/basic_file.h (filepos_cur): Base this on _offset. + * testsuite/21_strings/inserters_extractors.cc (test05): Tweaks. + * testsuite/27_io/filebuf.cc: Tweak. + +1999-12-20 Benjamin Kosnik + + * docs/17_intro/RELEASE-NOTES: Fix typos. + + * bits/locale_facets.h (ctype): Modify, use __to_type to abstract + out platform-specific bits. + * config/default/ctype.cc: And here. + * config/defaults/bits/ctype_base.h: And here. + * config/linux/ctype.cc: And here. + * config/linux/bits/ctype_base.h (ctype_base): And here. + * config/solaris/bits/ctype_base.h (ctype_base): Add + __to_type. Comment, as it looks like this is for solaris2.6 and + above: solaris2.5.1 doesn't seem to have the same definitions. + * config/solaris/ctype.cc: And here. + +1999-12-19 Benjamin Kosnik + Ulrich Drepper + + * acconfig.h: Remove _GLIBCPP_USE_CTYPE_ISBIT. + + * src/locale.cc: Take out platform-specific hacks. + * config/linux/ctype.cc: Put here. + * config/solaris/ctype.cc: Put here. + * config/default/ctype.cc: Put here. + + * bits/locale_facets.h: Take out platform-specific hacks. + * config/linux/bits/ctype_base.h: Put here. + * config/solaris/bits/ctype_base.h: Put here. + * config/default/bits/ctype_base.h: Put here. + + * configure.in: Bump version. + Add tests for top-level config directory. + * configure: Regenerated. + * src/Makefile.am (INCLUDES): Add platform-specific dir. + * src/Makefile: Regenerate. + +1999-12-19 Benjamin Kosnik + Ulrich Drepper + + * bits/locale_facets.h: Hack in solaris support. + * src/locale.cc: Here too. + +1999-12-18 Gabriel Dos Reis + + * docs/17_intro/TODO: Update + * docs/17_intro/RELEASE-NOTES (New): Update. + +1999-12-17 Benjamin Kosnik + + * bits/c++config.h.in (__GLIBCPP__): Bump. + * docs/17_intro/RELEASE-NOTES: Update, Gaby please add your stuff. + * docs/17_intro/TODO: Update. + + * bits/locale_facets.h: Touch this too. + * bits/localefwd.h: Add typedefs for loooooong vector names. + * bits/locale_facets.tcc (locale::operator()): Need parens. + (has_facet): Simplify. + * src/locale-inst.cc: Add instantiations. + * src/locale.cc: Tweaks. + + * bits/std_streambuf.h: Move indeterminates into. . + * bits/std_fstream.h: Here. + * bits/fstream.tcc (underflow): Rewind just for ios_base::out + streams. + * bits/sstream.tcc: Very minor formatting tweaks. + * bits/std_streambuf.h (_M_set_determinate): If exclusively an + input buffer, set _M_buf to offset. + * bits/istream.tcc (std): Tweaks. + * testsuite/27_io/istream_unformatted.cc (test05): More tweaks, + include fstream. + * testsuite/27_io/filebuf.cc: Tweaks. + +1999-12-17 Phil Edwards + + * configure.in: Add OPTLEVEL, -O2 for gcc 2.96+, nothing otherwise. + * configure: Regenerate. + * src/Makefile.am: Use OPTLEVEL in CXXFLAGS. + * src/Makefile.in: Regenerate. Also picks up OTHER_CXXFLAGS rename + to OPTIMIZE_CXXFLAGS from a previous revision (1.96) to Makefile.am. + +1999-12-17 Phil Edwards + + * docs/21_strings/stringtok_std_h.txt: New algorithm + suggested by Chris King. + * docs/21_strings/howto.html: Link to new version. + +1999-12-16 Gabriel Dos Reis + + * bits/valarray_array.h (__valarray_sum): Use operator+=, not + operator+. + * docs/17_intro/TODO: Update. + +1999-12-15 Phil Edwards + + * docs/gentop/footchunk.html: Updated, fixed CRLFs. + * docs/gentop/gentop: Ditto. + * docs/gentop/headchunk.html: Ditto. + * docs/*.html: Regenerated from gentop. + * docs/*/howto.html: Updated as test. + * docs/faq/index.html: Updated, fixed CRLFs. + * docs/faq/index.txt: Regenerated. + +1999-12-15 Gabriel Dos Reis + + * mknumeric_limits (OUT_C): restart only if $OUT_C is present. + + * bits/std_complex.h + (complex::complex(const complex&), + complex::complex(const complex&)): Define. + + * docs/17_intro/TODO: Update. + +1999-12-13 Benjamin Kosnik + + * bits/istream.tcc (seekg): Don't set _M_gcount. + (tellg): Same. + * bits/fstream.tcc (filebuf::underflow): Re-sync + external byte sequence's input buffer only. . . + * testsuite/27_io/istream_unformatted.cc (test04): New tests for + tellg, seekg and filebufs. + (test05): Same for stringbufs. + * testsuite/27_io/istream_unformatted-2.tst: New file. + * testsuite/27_io/istream_unformatted-1.tst: New file. + * testsuite/27_io/istream_unformatted-1.txt: New file. + * testsuite/21_strings/inserters_extractors.cc (test05): Change + output file. + +1999-12-13 Phil Edwards + + * docs/gentop/*: New directory, containing bits for the homepages. + * docs/*.html: Regenerated from gentop. + * docs/*/*.html: Entries added and regenerated. + +1999-12-13 Benjamin Kosnik + + Efforts to get -O2 to work with -Winline -Werrors. + * bits/valarray_array.h (__valarray_fill(_Tp*, size_t, const + _Tp&): Remove inline declaration, as cannot be inlined and + -Winline -Werror complains. An interesting question is why this + cannot be inlined, as I can see no real reason to disqualify it. + (__valarray_product(const _Tp*, const _Tp*)): Same here. + * bits/std_valarray.h (valarray::operator[](size_t)): Same here. + + * docs/17_intro/TODO: Update. + +1999-12-12 Benjamin Kosnik + + * bits/std_fstream.h (seekpos): Tweaks, fixes. Move definition to + fstream.tcc. + * bits/basic_file.h (filepos_cur()): Make pointers themselves be + the resultant position. + * bits/fstream.tcc (seekoff): Explicitly set return value to + resultant external byte sequence position, not value returned from + _M_file->seekoff. Need to make + (seekpos): New definition. + + * bits/istream.tcc (seekg): As per Library Issues List 136, set to + just istream. Necessary, or else tellg will give an invalid stream + position, but seekg will return a valid stream position, which is + not groovy: see testcase addition. + * bits/ostream.tcc (seekp): Same. + + * bits/streambuf.tcc (_S_copy_streambufs): Simplify. + * bits/sstream.tcc: Tweaks. + * bits/locale_facets.tcc: Tweaks. + (num_put::do_put(iter_type, ios_base, char_type, const void*)): + Re-write in a way that is easier for the inliner to work with. + * bits/ios_base.h: Use explicit static_cast(...) notation. + +1999-12-10 Benjamin Kosnik + + * bits/locale_facets.tcc: Tweaks. + * bits/locale_facets.h (use_facet): Can't inline, remove inline + from declaration. + * bits/localefwd.h: And here. + * bits/std_ostream.h: Tweaks, sentry ctor can't be inlined. + * bits/ostream.tcc: Put here. + + Frank Ch. Eigler + * src/Makefile.am: Adjust CXXFLAGS, add AM_CXXFLAGS. + +1999-12-08 Benjamin Kosnik + + * bits/sstream.tcc (stringbuf::seekoff): Long overdue revamp. Make + in and out buffers update independently. + + * bits/basic_ios.h: Minor formatting. + * bits/fstream.tcc (std): Fix indentation. + +1999-12-08 Chip Salzenberg + + * bits/char_traits.h (char_traits<>): Move not_eof() functions + after corresponding eof() functions, so they're easier for the + compiler to inline. + * bits/locale_facets.h (money_base::__default_pattern): Move + static variable out of inline functions. + (_Moneypunct<>::do_{pos,neg}_format): Use it. + * src/locale-inst.cc (money_base::__default_pattern): Define it. + +1999-12-08 Benjamin Kosnik + + * bits/std_fstream.h (filebuf::open): Tweak. + * bits/fstream.tcc (filebuf::seekoff): Simplify, fix. + * bits/std_ios.h: Minor tweaks for headers. + +1999-12-06 Benjamin Kosnik + + * bits/c++config.h.in (_GLIBCPP_FULLY_COMPLIANT_HEADERS): New macro. + * src/string-inst.cc: Add guards . . . + * src/misc-inst.cc: And here. + * bits/std_sstream.h: And here. + * bits/std_fstream.h: And here. + * bits/std_streambuf.h: And here. + * bits/std_istream.h: And here. + * bits/std_ostream.h: And here. + +1999-12-06 Scott Snyder + + * bits/istream.tcc (basic_istream::read): Try to handle __n == 0 + case. + (basic_istream::readsome): And here as well. + * testsuite/27_io/istream_unformatted.cc: Test a zero-length + read(). + +1999-12-06 Mumit Khan + + * bits/istream.tcc (basic_istream::ignore): streamsize is not + necessarily an `int'. + +1999-12-06 Gabriel Dos Reis + + * mknumeric_limits: Don't use $CXXFLAGS when building + gen-num-limits. It's definitely wrong to use it since $CXXFLAGS + generally instructs the compiler not to emit template + instantiations and we end up with undefined symbols. Sigh. + +1999-12-05 Benjamin Kosnik + + * bits/locale_facets.tcc: Tweak. + (_S_format_long): Adjust showpos formatting for hex and oct. + * bits/std_ostream.h (operator<<(short)): Correctly deal with hex + and oct by formatting as unsigned. + (operator<<(int)): Same here. + * bits/ostream.tcc (operator<<(long)): Same. + (operator<<(long long)): Same. + (_S_pad_char): Actually treat ios_base::internal as something + worth doing correctly. Remove const designation on ios argument. + * testsuite/27_io/ios_manip_basefield.cc (test02): Add tests. + * testsuite/27_io/ostream_inserter_arith.cc (test03): Add tests. + +1999-12-04 Benjamin Kosnik + + * bits/std_sstream.h (streambuf::underflow): Check for mode == in. + +1999-12-03 Benjamin Kosnik + + * bits/locale_facets.tcc (num_put::do_put(bool): Fix. + + * bits/sstream.tcc (streambuf::seekoff): Add parens. + * bits/istream.tcc (istream::get(sb)): Handle exceptional events. + (operator>>(istream, _CharT*)): Change streamsize to int_type. + (operator>>(istream, _CharT&)): Fix typedef'd type to be _CharT. + * bits/ostream.tcc (ostream::operator<<(const char*)): Stub out + unused argument. + (ostream::operator<<(_CharT)): Fix. + + * bits/std_sstream.h: Temporarily disable including sstream.tcc to + see if this will increase compile speed. + * bits/std_ostream.h: Likewise. . . + * bits/std_istream.h: And here. + * bits/std_fstream.h: And here. + * src/misc-inst.cc: Add relevant header file includes for + instantiation purposes. + * src/string-inst.cc: And here. + * testsuite/27_io/ostream_inserter_arith.cc: Add test case. + +1999-12-02 Benjamin Kosnik + + * testsuite/27_io/istream_unformatted.cc (test03): Add tests. + * bits/istream.tcc (get(streambuf)): More fixes. + (istream::ignore): Get specific about numeric_limits::max() + requirements. + + * bits/fstream.tcc (filebuf::open): Tweaks for _M_last_overflowed. + (filebuf::close): Same. + * testsuite/27_io/filebuf.cc: Add tests for ios_base::ate. + +1999-12-01 Phil Edwards + + * mkcheck: Support for compilation/execution timing. + * testsuite/printnow.c: New file. + +1999-12-01 Phil Edwards + + * bits/std_cwchar.h: Test for _GLIBCPP_USE_WCHAR_T. + * configure.in: Test for presence of wchar.h before testing + for any of its features. + * configure: Regenerate. + +1999-11-30 Benjamin Kosnik + + Preliminary istream validations complete. + * bits/istream.tcc (istream::getline): Fixes. Tweaks to make + formatting more consistent. Removal of if-statements inside of for + loops. + (ignore): Fix. + (get): Same. + (putback): Same. + * bits/std_istream.h: Same. + * bits/sstream.tcc (stringbuf::pbackfail): Fix. + * testsuite/27_io/stringbuf.cc: Tweak. + * testsuite/27_io/istream_unformatted.cc (test02): Mo' tests. + + * bits/ostream.tcc (ostream::operator<<(arith)): Set badbit, not + failbit on failure, as per 27.6.2.5.2. + + * stl/bits/std_vector.h: Allow bool specializations. Should move + ext/std_bvector to bits, not ext, maybe. + +1999-11-30 Mumit Khan + + * configure.in: Fix checks for mbstate_t and WCHAR_MIN/MAX. + * configure: Regenerate. + +999-11-29 Benjamin Kosnik + + * bits/istream.tcc (get(streambuf, char)): Fix. + * testsuite/27_io/istream_unformatted.cc (test03): Add tests. + +1999-11-29 Scott Snyder + + * bits/basic_string.h (append(const _Char*, size_type)): The + length of the appended string is given exactly by the second arg, + regardless of the data in the character array. + * bits/string.tcc (basic_string(const _CharT*, size_type, const + _Alloc&)): Likewise. + * testsuite/21_strings/append.cc (test01): Remove erroneous test + of basic_string::append. + +1999-11-29 Chip Salzenberg + + * Makefile.in: Tweaks for CXXFLAGS. + * */Makefile.in: Same. + +1999-11-29 Mumit Khan + + * conficd bgure.in: Check for wide character support. + * bits/c++config.h.in (_GLIBC_USE_WCHAR_T): Move from here ... + * acconfig.h (_GLIBC_USE_WCHAR_T): to here. + * bits/string.tcc (wstring::_S_find): Guard wchar_t specialization. + +1999-11-29 Mumit Khan + + * acinclude.m4: Fix typo. + * src/complex.cc: Fix macro line continuation. + +1999-11-29 Petter Urkedal + + * src/Makefile.am (CXXFLAGS): Add -Wno-format to allow non- + string literals in format, as used in locale-facets.tcc. + +1999-11-28 Benjamin Kosnik + + * testsuite/27_io/istream_unformatted.cc (test03): Add tests. + * bits/istream.tcc (istream::get): Extract to argument minus one. + Various tweaks and fixes. + +1999-11-22 Mumit Khan + + * bits/locale_facets.tcc: Workaround for compiler crash on + ix86-*-mingw32. + +1999-11-21 Mumit Khan + + * acinclude.m4: New file. New _GLIBCPP_CHECK_FLOAT_SUPPORT macro. + * configure.in: Use. + * acconfig.h: New _GLIBCPP_BUGGY_FLOAT_COMPLEX macro. + * src/complexf.cc: New _GLIBCPP_FLOAT_SPECIALIZATION macro. + * bits/std_complex.h: Use. + * src/complex.cc: Use. + +1999-11-19 Mumit Khan + + * testsuite/18_support/numeric_limits.cc: Add missing std:: prefix. + * testsuite/21_strings/inserters_extractors.cc: Likewise. + * testsuite/22_locale/ctype.cc: Likewise. + * testsuite/23_containers/multiset.cc: Likewise. + * testsuite/23_containers/vector_ctor.cc: Likewise. + * testsuite/26_numerics/binary_closure.cc: Likewise. + * testsuite/27_io/fpos.cc: Likewise. + * testsuite/27_io/ios_base_callbacks.cc: Likewise. + * testsuite/27_io/istream_extractor_arith.cc: Likewise. + * testsuite/27_io/istream_extractor_char.cc: Likewise. + * testsuite/27_io/istream_extractor_other.cc: Likewise. + * testsuite/27_io/istream_sentry.cc: Likewise. + * testsuite/27_io/ostream_inserter_char.cc: Likewise. + * testsuite/27_io/ostream_inserter_other.cc: Likewise. + * testsuite/27_io/streambuf.cc: Likewise. + * testsuite/27_io/stringstream.cc: Likewise. + +1999-11-19 Gabriel Dos Reis + + * bits/valarray_meta.h: Don't forget to define tanh + +1999-11-18 Philip Martin + + * src/stl-inst.cc: Use typedef to refer to iterator + * stl/bits/stl_algobase.h: Add traits based dispatch for + __normal_iterator in the copy()algorithm + * stl/bits/type_traits.h: Add _Is_normal_iterator trait support + +1999-11-18 Kevin Ediger + + * src/locale.cc (locale::_Imp::_Imp): Use auto_ptr to make + constructors for locale::_Impl exception safe. + +1999-11-18 Scott Snyder + + * stl/bits/stl_queue.h: The C++ standard gives the default for the + _Sequence template argument of priority_queue<> as vector<>, not + deque<>. + +1999-11-18 Benjamin Kosnik + + * bits/std_sstream.h (stringbuf::_M_really_sync): Add __iend as a + parameter. + * bits/sstream.tcc: Adjust here too. + +1999-11-17 Benjamin Kosnik + + * bits/sbuf_iter.h (istreambuf_iter::equal): Tweak. + * bits/istream.tcc (operator>>): Replace iostate(0) with + iostate(ios_base::goodbit), which is the same thing, but hopefully + a bit clearer. + * bits/locale_facets.tcc (do_get(bool)): Streamline, deal with + libraries issue list 17. + (do_gets): Don't set goodbit explicitly, instead only set on + failures as good bit is the default setting. + * bits/ios_base.h (setf): Set correctly. + * bits/fstream.tcc: Tweak. + * bits/std_sstream.h (_M_really_sync): Fix ibuffer positioning for + in|out bufs that are empty. . . + * testsuite/27_io/istream_extractor_arith.cc (test03): Add. + +1999-11-16 Benjamin Kosnik + + * testsuite/27_io/streambuf.cc (class testbuf): Don't set _M_buf_size. + * bits/std_streambuf.h (setp): Set _M_buf_size, _M_mode. + Add comments "all about _M_buf." + (setg): Set _M_mode. + +1999-11-16 Kevin Ediger + + * bits/locale_facets.tcc (_S_build_float_format): New function. + (_S_output_float): New function. + (num_put::do_put(double)): Use 'em. + (num_put::do_put(long double)): Use 'em. + * testsuite/27_io/ostream_inserter_arith.cc: New file. + +1999-11-15 Scott Snyder + + * bits/basic_file.h: Type of __off parm should be __c_streampos, to + match how libio is calling us. + * src/basic_file.cc (sys_seek): Likewise. + * bits/std_fstream.h (basic_filebuf::sync): Restore sync call. + +1999-11-15 Benjamin Kosnik + + * docs/17_intro/contribute.html: Add link to assignment form. + * docs/17_intro/libstdc++-assign.txt: New file. + + * mkcheck (TESTS_FILE): Move a copy of test files as well as + output files. + + * bits/std_streambuf.h (_M_buf_bump): New function. + * bits/streambuf.tcc: Mods to support _M_buf_bump. + (xsputn): Here. Also add checks for output valid. + (xsgetn): Add checks for input valid. + (sputc): Here. + (sgetc): Set _M_in_end to _M_buf + _M_buf_end. + * bits/std_sstream.h (_M_really_sync): Set _M_buf. + Set _M_out_end to variable-length-end. + * bits/sstream.tcc (overflow): Use _M_buf_bump. + (seekpos): Same. + (seekoff): Same. + * bits/fstream.tcc (std): Tweak formatting. + (filebuf::overflow): Simplify. + (filebuf::showmanyc): Same. + (filebuf::underflow): Same. + * testsuite/27_io/filebuf.cc: Fix. + * testsuite/27_io/ostream_inserter_other.cc: Fix. + * testsuite/27_io/ostream_inserter_other-2.tst: New file. + * testsuite/27_io/stringbuf.cc: Tweak. + * testsuite/27_io/streambuf.cc: Tweak. + * testsuite/27_io/istream_extractor_other.cc: Fix. + +1999-11-11 Matthias Klose + + * stl_deque.h: Use static_casts(signed_type). + +1999-11-11 Benjamin Kosnik + + Cleanups for callbacks, more regression hunting. Remaining + failures (1) due to last unresolved stringstream issues, not + regressions per se. + * bits/std_fstream.h: Revert. Disable call to _M_file->sync as + killing 27_io/filebuf.cc tests. . . need another solution. + + * bits/streambuf.tcc (_S_copy_streambufs): Fix. + * testsuite/27_io/istream_extractor_other.cc: Tweak comments. + + * bits/basic_ios.h: Add cached facets here. UGH. The standard + foils all attempts at a graceful, minimal implementation. + * bits/basic_ios.tcc: Tweaks. + * bits/istream.tcc: Fix. + * bits/ostream.tcc: Fix. + * bits/std_istream.h: Fix. + * bits/std_ostream.h: Fix. + * src/ios.cc (ios_base::imbue): Set _M_locale_ios before calling + callbacks. + * bits/locale_facets.tcc (std): Minor, minor formatting tweak. + (_S_pad_numeric): Make comprehensible. + +1999-11-10 Benjamin Kosnik + + * bits/std_ostream.h: Add callbacks for _M_fnumput. + (_S_ostream_fcache): New function. + Move functions out-of-line. + * bits/ostream.tcc: Put here. + + * bits/std_istream.h: Add callbacks for _M_fnumget. + (_S_istream_fcache): New function. + Move functions out-of-line. + * bits/istream.tcc: Put here. + + * bits/basic_ios.tcc (basic_ios::imbue): Tweaks, remove call to + _M_call_callbacks(), as ios_base::imbue does this already. + * src/ios.cc (register_callback): Clean. + (_M_call_callbacks): Same. + * bits/ios_base.h: Callback work. + * testsuite/27_io/ios_base_callbacks.cc (test01): New file. + +1999-11-10 Benjamin Kosnik + Matthias Klose + + * stl/ext/stl_rope.h: Fix initialization order. + +1999-11-09 Scott Snyder + + * bits/std_fstream.h (basic_filebuf::sync): Unconditionally call + _M_file->sync() so that redirection works correctly. + +1999-11-09 Benjamin Kosnik + + * bits/istream.tcc: Re-order. + * bits/std_istream.h: Fix getline problems. + * testsuite/27_io/istream_unformatted.cc: New tests. + + Clean up regressions. + * bits/std_sstream.h: Set initial stringbufs correctly. + +1999-11-09 Scott Snyder + + * stl_vector.h (_M_range_insert): Fix mixing pointers and + vector::iterator. + * testsuite/23_containers/vector_modifiers.cc (test01): New file, + tests. + +1999-11-09 Benjamin Kosnik + + * src/Makefile.am (CXXFLAGS): Add -Winline. + * src/Makefile.in: Regenerate. + +1999-11-05 Gabriel Dos Reis + + * bits/valarray_meta.h (_DEFINE_EXPR_UNARY_FUNCTION): When + building meta-expressions don't forget to take the contained + closures. + +1999-11-02 Benjamin Kosnik + + * configure: Regenerate. + +1999-11-02 Gabriel Dos Reis + + * bits/valarray_meta.h (_Expr<>::sum): Tweak. Use copy-initialization + syntax. + * bits/valarray_meta.h (min): Likewise. + * bits/valarray_meta.h (max): Likewise. + +1999-11-01 Benjamin Kosnik + + * bits/std_sstream.h (_M_really_sync): Take into account in | out bufs. + * bits/std_streambuf.h (_S_copy_streambufs): New function. + * bits/streambuf.tcc: Define. + * bits/istream.tcc (istream::operator>>(streambuf)): Rewrite. + * bits/ostream.tcc (ostream::operator<<(streambuf)): Rewrite. + * testsuite/27_io/ostream_inserter_other.cc: Add tests. + * testsuite/27_io/ostream_inserter_other-1.tst: New file. + + * bits/basic_string.h: Explicitly cast npos to unsigned type, + reported by Richard Atterer. + * bits/char_traits.h: For consistency's sake, here too. + + * configure.in: Bump version to 2.90.7. + +1999-10-31 Benjamin Kosnik + + * testsuite/27_io/ostream_inserter_char-1.tst: Check file output. + * testsuite/27_io/ostream_inserter_char.cc (test05, test01): Add tests. + * bits/streambuf.tcc (xsputn): Treat--size const char for long loops. + (xsgetn): Same. + * bits/sstream.tcc (seekpos): Tricks, mostly: check _M_mode before + writing into buffer. + (seekoff): Same. + +1999-10-29 Gabriel Dos Reis + + * bits/valarray_array.h (__valarray_sum): New function. + * bits/valarray_array.h (__valarray_product): Same. + + * bits/std_valarray.h (valarray::product): Comment out. + * bits/std_valarray.h (valarray::sum): Use __valarray_sum + instead of accumulate. + + * src/valarray-inst.cc: Remove explicit intantiation of + class multiplies, accumulate, valarray::product. + * src/valarray-inst.cc (__valarray_product): Instantiate + explicitly. + * src/valarray-inst.cc (__valarray_product(const + valarray&)): New function. + * src/valarray-inst.cc (gslice::_Indexer::_Indexer): Don't use + valarray::product. Use __valarray_product instead. + + +1999-10-25 Benjamin Kosnik + + * bits/std_ostream.h (ostream.inserters.char): Correctly pad output. + (_S_pad_char): New function. Not done: ios_base::internal. + * bits/ostream.tcc: Clean for above. + * bits/locale_facets.tcc (_S_fill): Remove ostreambufiterator + specialization that was commented out, as ostreams now have to + correctly deal with padding. + * testsuite/27_io/ostream_inserter_char.cc (main): Add tests. + + * testsuite/21_strings/ctor_copy_dtor.cc(test02): Add test case + from mailing list. This is a bug, and should be fixed. + * testsuite/21_strings/inserters_extractors.cc (main): Tweak, fix typo. + +1999-10-22 Petter Urkedal + + * stl/bits/stl_numeric.h (__power): Replaced argument name `__opr' + to avoid conflict with gcc name mangling. + * stl/bits/stl_algo.h (__transform): Same. + +1999-10-21 Benjamin Kosnik + + * bits/ios_base.h: Change argument names. + * docs/17_intro/BADNAMES: Add __opr. + +1999-10-20 Benjamin Kosnik + + Work on compilation slowdowns from 10-5 to 10-12, which are + related to the _Callback_list inlining/merge-ifcation, which is + still a pending issue, but this stuff is necessary cleanup anyway. + + * src/ios.cc: Re-arrange. + * bits/ios_base.h: Tweak. + * bits/basic_ios.tcc: Move out of line definitions here, move + small out-of-line definitions inline. + * bits/basic_ios.h: From here. + + * bits/streambuf.tcc (pbackfail, overflow): Move back inline. + * bits/std_streambuf.h: From here. + +1999-10-19 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_char.cc: Add tests. + * bits/std_istream.h: Tweaks--set eofbit on eof condition. + * bits/istream.tcc (operator>>(istream&, string&): Remove + vestigial issspace hacks and use ctype::is instead. + (getline): Remove unnecessary loops, fortify and pasteurize. + (ws): Same. + +1999-10-18 Benjamin Kosnik + + * bits/istream.tcc (operator>>): Tweak. + * bits/std_istream.h: Fix according to library issues list 68. + Add typedefs. + + * bits/locale_facets.h: Fix table_size to be non-zero. + +1999-10-18 Vadim Egorov + + * src/basic_file.cc: ifdef instead of comment for binary mode + +1999-10-18 Russell Davidson + + * bits/std_sstream.h: Stringbuf initialization based on actual, + not allocated, size. + * testsuite/21_strings/inserters_extractors.cc (test06): Add test + case. + +1999-10-17 Benjamin Kosnik + + * testsuite/26_numerics/c_math.cc (test03): Tweak. + * testsuite/27_io/istream_manip.cc (test01): Corrections due to + sentry change. + * testsuite/21_strings/inserters_extractors.cc (test01): Same. + +1999-10-14 Benjamin Kosnik + + * bits/std_istream.h: Tweaks. + * bits/istream.tcc (istream::sentry::sentry()): Simplify, correct + as per issues list addition--set failbit, eof on empty buffers. + * testsuite/27_io/istream_sentry.cc: New file. + +1999-10-12 Chris Prince + + * bits/std_cstdio.h: Remove Solaris hacks. + +1999-10-12 Phil Edwards + + * docs/index.html: Fix minor typos and tweaks. + * docs/17_intro/contribute.html: Ditto. + * docs/*/howto.html: Ditto. More "EGCS"->"GCC" conversion, notes on + thread safety and binary I/O, links to external sites. + * docs/faq/index.html: EGCS/GCC cleanup, new entries for Cygwin + and MT. + +1999-10-12 Petter Urkedal + + * bits/std_cmath.h (abs(float)): When ::absf is not present, call + ::fabs(double) rather than ::abs(int). + +1999-10-11 Benjamin Kosnik + + * bits/std_streambuf.h: Fix minor blip--should explicitly return + *gptr(), not the result of underflow. + (pbackfail): Conform to default behavior. + (overflow): Same. + * bits/streambuf.tcc: Add out-of-line streambuf members. + (xsputn): Tweak. + (xsgetn): Tweak. + * testsuite/27_io/streambuf.cc: New file. + * testsuite/27_io/filebuf.cc: Correct test. + +1999-10-08 Benjamin Kosnik + + * bits/std_cmath.h: Correctly cast int to double. + * testsuite/26_numerics/c_math.cc: Add test. + + * mknumeric_limits (OUT_C): Tweaks. + * src/gen-num-limits.cc: Checks for WCHAR_MIN, WCHAR_MAX before + trying to instantiate type_traits. + * acconfig.h: Add _GLIBCPP_HAS_WCHAR_MIN_MAX. + * configure.in (LIBS): Plus checks for WCHAR_MIN, WCHAR_MAX. + * configure: Regenerate. + +1999-10-06 Benjamin Kosnik + + * bits/streambuf.tcc (streambuf::xsgetn): Rewrite. + (streambuf::xsputn): Put in break. + Aiming for parity between these two (mostly) similar functions. + Need to re-write tests. + + * bits/ios_base.h (ios_base::_M_copy_base): Remove declaration. + Make data members protected, not private. + * src/ios.cc (ios_base::_M_copy_base): Move _Callback_list into + ios_base.h. As called only once, collapse into . . . + * bits/basic_ios.h (basic_ios::copyfmt): Fix. + (basic_ios::clear): Throw ios_base::failure on occasion. + (basic_ios::exceptions): Fix. + * testsuite/27_io/ios_members.cc (test02): Add tests. + + * bits/fpos.h: Default initialize. + * testsuite/27_io/fpos.cc (test03): Add test. + +1999-10-04 Russell Davidson + + * src/basic_file.cc: Fix open modes. + +1999-10-04 Gabriel Dos Reis + + * bits/locale_facets.tcc (num_get<>::do_get): Fix typo. + +1999-09-23 Benjamin Kosnik + + * bits/streambuf.tcc: Yea. Fix this for real. + * testsuite/27_io/ostream_inserter_other.cc: Add file. + * src/Makefile.*: Regenerate. + +1999-09-22 Benjamin Kosnik + + * bits/std_cstdlib.h: Add more linux-specif hacks to the header + files so that stdtof and strtold will be declared. Some hacks + already exits in bits/std_cctype.h -- these should all be removed + at a later date. + * bits/locale_facets.tcc: Add cstring.h include. + _S_format_long: Use long, not int. + Add std_limits.h include, for numeric_limits. + * testsuite/27_io/istream.cc: Make instantiations work when using + -fhonor-std. + * testsuite/27_io/ostream.cc: Same. + +1999-09-21 Benjamin Kosnik + + * bits/fpos.h (fpos::operator streamoff): Make const, don't return + a reference. Same for operators == and !=. + * testsuite/27_io/fpos.cc: Add tests. + +1999-09-21 Gabriel Dos Reis + + * bits/valarray_array.h: Fix typo. + + * mknumeric_limits: Make sure we are regenerating things from + scratch. Otherwise things get redefined. Not good. + +1999-09-20 Benjamin Kosnik + + * bits/std_ostream.h: Fix typo. + * bits/std_istream.h: Same. + * bits/std_iomanip.h: Same. + + * bits/istream.tcc (sentry::sentry()): Remove optional tie with + ostream, as happens with underflow anyway. + * testsuite/27_io/istream.cc (main): New file. + * testsuite/27_io/ostream.cc (main): New file. + * testsuite/27_io/istream_unformatted.cc: Add tests. + + * src/Makefile.am (headers): Add new file. + * src/Makefile.in (headers): Regenerated. + + * bits/basic_ios.h: Remove local-related files. + * bits/basic_ios.tcc: New file, add locale-related items. + * src/misc-inst.cc: Add include of basic_ios.tcc, as a hack for now. + * testsuite/27_io/ios_members_static.cc: Change to + * testsuite/27_io/ios_base_members_static.cc: This. + * testsuite/27_io/ios_members.cc: New file. + * testsuite/27_io/stdios_basefield_manip: Change to + * testsuite/27_io/ios_manip_basefield.cc: This. + * testsuite/27_io/stdios_fmtflags_manip: Change to + * testsuite/27_io/ios_manip_fmtflags.cc: This. + + * bits/fpos.h: Fix discarding qualifiers on this when + using _M_position with a const fpos. + * bits/std_iosfwd.h: Tweak. + * testsuite/27_io/fpos.cc: New file. + +1999-09-17 Benjamin Kosnik + + * bits/streambuf.tcc (streambuf::xsputn): Tweak. + * bits/ostream.tcc: Tweak. + * testsuite/21_strings/inserters_extractors.cc (test04, test05): + Add new regressions. + +1999-09-16 Benjamin Kosnik + + * bits/basic_ios.h: Inline, tweak. + * bits/fstream.tcc (basic_filebuf::_M_really_overflow): Tweak, + pass back accurate return value to basic_filebuf::overflow. + * bits/streambuf.tcc (streambuf::xsputn): Fix overflow accounting. + This fixes sstream problems reported in libstdc++/9, but screws up + filebufs. That solution is pending. + +1999-09-15 Vadim Egorov + + * bits/streambuf.tcc (basic_streambuf::xsputn): Add check for + zero count puts. + * testsuite/21_strings/inserters_extractors.cc (test01): Add test. + +1999-09-08 Benjamin Kosnik + + * bits/c++config.h.in: Add emacs hints. + + * stl/bits/stl_range_errors.h: Don't define here, for now define + in stdexcept.cc along with string inlines __length_error, etc. + * src/stdexcept.cc: Define here. + * stl/bits/stl_config.h (__STL_CAN_THROW_RANGE_ERRORS): Enable, so + at(size_t) will be declared/defined. + (__STL_THREADS): Fix mess surrounding use of this, enable. + +1999-08-31 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_arith.cc: Fix. + * src/localename.cc: Tweak formatting, fix assignment to + const compiler errors. + +1999-08-25 Benjamin Kosnik + + * acconfig.h: Add absf, cosf. + * configure.in (use_builtin_sinf): Same. + * configure: Regenerate. + * bits/std_cmath.h: Add mess of defines. + * testsuite/26_numerics/modf_float.cc: Change to + * testsuite/26_numerics/c_math.cc: This. + + * src/locale.cc: Change. + * bits/locale_facets.h: Fix. + * testsuite/22_locale/ctype.cc: Add temporary tests. + +1999-08-24 Benjamin Kosnik + + * bits/fpos.h: Test. + + * docs/index.html: Add powerpc-linux-gnu results with gcc-2.95.1. + Fix database name for "libstdc++". + +1999-08-23 Benjamin Kosnik + + * mknumeric_limits (numeric_limits): Add default definitions to + member functions. + * testsuite/18_support/numeric_limits.cc: New file. + +1999-08-18 Benjamin Kosnik + + * bits/std_istream.h: Correct initialization. + * bits/std_ostream.h: Likewise. + * bits/std_sstream.h: Likewise. + * bits/std_fstream.h: Likewise. + * testsuite/27_io/stringstream.cc: Add test case. + + * bits/std_sstream.h: Replace ____string_type with __string_type. + * bits/basic_ios.h (basic_ios::rdbuf(sb*): Call clear(), as required. + * bits/std_ostream.h: Tweak dtor. + +1999-08-17 Benjamin Kosnik + + * src/Makefile.am (CXXFLAGS): Add -O2. + * src/Makefile.in: Likewise. + + * src/gen-num-limits.cc: Conditionally allow wchar_t. See what + this breaks. . . + * mknumeric_limits (numeric_limits): Uglify. + + * bits/std_istream.h: Fix warnings. + * bits/locale_facets.tcc: Collateral damage from + char_traits::int_type change. + + * testsuite/27_io/istream_extractor_char.cc: Terminate strings. + +1999-08-17 Benjamin Kosnik + + * docs/index.html: Add mailing list form. + * docs/27_io/howto.html: Add link to iostreams_hierarchy.pdf. + +1999-08-16 Benjamin Kosnik + + * bits/streambuf.tcc (streambuf::xsputn): Allow copies to continue + if overflow successfully allocates more space. + * bits/std_sstream.h: Adjust comments. + * bits/sstream.tcc (stringbuf::overflow): Copy buffer into string + before overflow forces a resize. + * testsuite/27_io/ostream_inserter_char.cc: New file. + + * bits/std_fstream.h: Remove declaration. + * bits/fstream.tcc: Move uflow. + * bits/std_streambuf.h: To here. + * bits/streambuf.tcc: Make consistent. + + * src/Makefile.am (WERROR): Enable. + * src/Makefile.in: Regenerate. + * bits/sbuf_iter.h: Tweak. + * bits/char_traits.h: (char_traits::eof): Use WEOF. + Use unsigned int as char_traits::int_type. + + * bits/ostream.tcc (ostream::putc(char)): Tweak. + * testsuite/27_io/iostream_objects.cc: Terminate string. + Move cin::operator>>(char*) test to extractor_char.cc. + * testsuite/27_io/stringstream.cc: Add stringstream instantiation. + * bits/std_istream.h (basic_iostream): Make explicit definition + for default ctor. + * bits/std_sstream.h: Fix typos. + * bits/fstream.tcc (_M_init_filebuf): Set to indeterminate for + basic_filebuf ctor with fileno open arguments. Thus, filebufs are + initialized in a consistent manner, no matter if the underlying + FILE/bit bucket is a tty or a text file or some other imaginary + construct. This and setting _M_buf_size to 1 for cin allows + istream::get(char) to work in a manner consistent with what others + expect. + + * docs/index.html: Link Stroustrup's C++ page. + +1999-08-12 Michael Cook + + * bits/fstream.tcc: Fix signed/unsigned -Wall warning. + * bits/istream.tcc: ditto. + * bits/sbuf_iter.h: ditto. + * bits/std_istream.h: ditto. + * src/Makefile.am: Add -Wall to CXXFLAGS. + * src/Makefile.in: ditto. + +1999-08-12 Benjamin Kosnik + Russell Davidson + + * bits/locale_facets.tcc (_M_extract): Finish off patch from yesterday. + * src/Makefile.am (myinstallheaders): Tweak, remove PHONY. + +1999-08-11 Benjamin Kosnik + + * testsuite/27_io/istream_unformatted.cc: New file. + + * testsuite/27_io/istream_extractor_arith.cc (test02): Add more + elaborate tests for int types with noskipws. + + * testsuite/27_io/istream_extractor_other-1.txt: New file. + * testsuite/27_io/istream_extractor_other-1.tst: New file. + * testsuite/27_io/istream_extractor_other-2.tst: New file. + * testsuite/27_io/istream_extractor_other.cc: Add tests. + * bits/istream.tcc: Fix operator>>(streambuf*). + + * testsuite/23_containers/vector_ctor.cc (test01): Add. + + * docs/index.html: Remove references to egcs. + * docs/17_intro/DESIGN: Same. + * docs/17_intro/contribute.html: Same. + * docs/17_intro/RELEASE-NOTES: Ditto. + * docs/17_intro/howto.html: Same here. + + Russell Davidson + * stl/bits/stl_vector.h (_M_insert_aux): + * bits/locale_facets.tcc (_M_extract): Tweaks for preliminary + decimal/floating point support. + * bits/locale_facets.h: Change _M_extract prototype. + * bits/char_traits.h (char_traits::to_int_type): Cast to unsigned. + * bits/std_istream.h (istream::read(char_type, streamsize)): Fix. + +1999-08-10 Michael Cook + + * bits/fstream.tcc: Fix for unused variable warning (-Wall). + * bits/ios_base.h: ditto. + * bits/istream.tcc: ditto. + * bits/locale_facets.h: ditto. + * bits/locale_facets.tcc: ditto. + * bits/std_streambuf.h: ditto. + * src/basic_file.cc: ditto. + * src/locale.cc: ditto. + * src/localename.cc: ditto. + +1999-08-10 Kirat Singh + + * bits/std_iomanip.h: Inline. + +1999-08-10 Alfred Minarik + + * bits/std_streambuf.h: Correct member initialization order. + * src/ios.cc: Add definitions for ios_base data members. + +1999-08-06 Phil Edwards + + * docs/index.html: Seventh snapshot updates. Minor tweaks. + * docs/faq/index.html: Ditto. Removed bugs sections that have + been fixed for a long time... Lots of "egcs" references still + exist. + * docs/faq/index.txt: Regenerated. + +1999-08-05 Gabriel Dos Reis + Andreas Amann + + * testsuite/26_numerics/binary_closure.cc (main): new test. + +1999-07-29 Andreas Amann + + * bits/valarray_meta.h: (_BinClos<>::_Binclos): fix typo causing + segmentation fault. + +1999-08-04 Benjamin Kosnik + + * docs/index.html (host): Put in testing status. + +1999-08-03 Benjamin Kosnik + + * docs/index.html: Update for libstdc++-2.90.6 release. + * docs/17_intro/RELEASE-NOTES (New): Update. + * docs/17_intro/BUGS: Update. + * bits/c++config.h.in (__GLIBCPP__): Bump version number. + * README (file): Update. + +1999-08-03 Benjamin Kosnik + + * src/Makefile.am (generated_headers): Remove bits/c++config.h as + a target. + ($(generated_headers)): Same. + * src/gen-c++config.cc: Remove, rename to + * bits/c++config.h.in: New file. Bump version number. + * configure.in: Generate bits/c++config.h at configure time. + * math/mathconf.h: include bits/c++config.h, not config.h. + + * bits/std_cmath.h: Fix remaining link error for solaris shared + builds. _GLIBCPP_HAS_BUILTIN_SINF has to be disabled for the time + being, as on Solaris this silently calls sinf, which does not + exist. + + * src/complex.cc: More tweaks. + +1999-08-03 Benjamin Kosnik + + * src/complex.cc: Same. + * math/complex-stub.h: Change. + * math/c_log10*.c: Change back to clog10*.c. + + * configure.in (NEED_C_LOG10): Delete. + * configure: Regenerate. + * math/Makefile.am: Change. + +1999-07-30 Benjamin Kosnik + + * math/Makefile.am: Fix, for real. + * configure.in (use_builtin_sinf): Ok, make autoconf solution. + * math/clog.c: Move to c_log.c. + * math/clog*: Ditto. + * math/c_log10l.c (c_log10l): Change function name. + * math/c_log10f.c (c_log10f): Change function name. + * math/c_log10.c (c_log10): Change function name. + + * math/complex-stub.h: Change to c_log* variants. + * src/complex.cc: And here. + +1999-07-29 Benjamin Kosnik + + * testsuite/27_io/istream_extractor_other.cc: Correct last test. + * bits/sstream.tcc (stringbuf::overflow): Don't update the input + sequence, just the output sequence. + * bits/std_sstream.h (stringbuf::str()): Only in stringbufs return + the original string, all others use complicated heuristic. + + * src/complex.cc: Assume c_log10. + * math/Makefile.am (EXTRA_yes): Fix c_log/c_logf unresolved + symbols in shared libraries by making c_log/c_log10 part of the + "must cmpile" sources. This may not work on solaris, must check. + +1999-07-29 Benjamin Kosnik + + * bits/istream.tcc (operator>>(streambuf*)): Re-do. + * bits/std_istream.h: Fix char extractors. + * testsuite/27_io/istream_extractor_char.cc: Change. + * testsuite/27_io/istream_extractor_other.cc: Add tests. + +1999-07-28 Benjamin Kosnik + + * bits/std_cctype.h: Fix for solaris2.6 builds. + + * bits/istream.tcc: Fix, thanks Alfred. + * bits/std_istream.h: Formatting changes. + + * libio/Makefile.am (libio_la_SOURCES): Remove cleanup.c, so that + _IO_cleanup will not be undefined. + * libio/*: Regenerate. + + * bits/basic_string.h: More namespace-safety stuff. + * testsuite/27_io/istream_extractor_char.cc: Fix. + * testsuite/27_io/istream_extractor_arith.cc: Fix. + * testsuite/27_io/iostream_objects.cc: Fix. + * testsuite/27_io/ios_ctor.cc: Fix. + * testsuite/27_io/istream_manip.cc: Make namespace safe. + * testsuite/27_io/istream_extractor_other.cc: New file. + + * mkcheck (TESTS_FILE): Tweaks. + +1999-07-27 Benjamin Kosnik + + * src/gen-c++config.cc: Note here, change version. + * acconfig.h( _GLIBCPP_USE_CTYPE_ISBIT): New macro. + * src/locale.cc: Used here. + * configure.in (use_builtin_sinf): Check for _ISBit using autoconf. + + * aclocal.m4: Regenerate by running `aclocal -I m4.` + + * bits/istream.tcc: Fix. + * bits/std_istream.h: More changes to extractors. + + * testsuite/27_io/istream_extractor_char.cc: More. + * testsuite/21_strings/inserters_extractors.cc (test01): Fix logic + error in testsuite construction. + + * bits/std_istream.h: Partially revert. + * bits/std_ostream.h: Same. + * bits/std_sstream.h: Revert. + +1999-07-26 Benjamin Kosnik + + * bits/std_sstream.h: Change initialization. + * bits/std_ostream.h: Make default ctor/assign/operator= private. + * bits/std_istream.h: Same, also correct sentry args. + * bits/istream.tcc: Add correct sentry args. + + * testsuite/27_io/istream_extractor_char.cc: New file. + * testsuite/27_io/istream_extractor_arith.cc: New file, old file, + name changes making me dizzy. + +1999-07-26 Ulrich Drepper + Benjamin Kosnik + + * aclocal.m4, config.guess, config.sub, ltconfig ltmain.sh: Update + to libtool 1.3.3. + +1999-07-26 Gabriel Dos Reis + + * bits/std_complex.h: Tweak. Make the primary template class + complex work with user-defined numerical types. Provide member + definitions. Restructure. + (class complex): Uglify. Remove __value(). Rename __val + to _M_value. Rename __complex_value_type to _ComplexT. Make it + private. Remove dependency on __value(). Fix various explicit + specialization syntax. Declare a some functions friend. Now the + implementation is nearly comforming. + (class complex): Likewise. + (class complex): Likewise. + + * src/complex.cc: Tweak. Remove dependency on complex::__value(). + (sin, sinh, tan, than): Fix call to corresponding C9x function + syntax. + +1999-07-24 Benjamin Kosnik + + * bits/istream.tcc (ws): Fix error with failbit being set. + + Disabled due to egcs/gcc-2_95 internal compiler errors. + * src/Makefile.am (CXXFLAGS): Add -fsquangle -fhonor-std + -fnew-exceptions. Compiling with namespaces enabled will now be + the default. + * mkcheck (CXX_FLAG): Same. + * src/gen-c++config.cc (_GLIBCPP_USE_NAMESPACES): Yup. New macro. + * bits/std_cctype.h: Not enough to just define in namespace std if + ctype-isms are macros. Need to also define in namespace std:: if + the C functions are just plain functions. + + * src/gen-num-limits.cc: Fix spelling inconsistencies. + +1999-07-24 Gabriel Dos Reis + + * docs/18_support/howto.html: Start documentation. Need to keep + track of the ongoing discussion in th LWG reflector. + + * src/gen-num-limits.cc: Tweak. + (class predicate): New class. + (class value): Likewise. + Make the whole machinery more flexible. Add comments. + +1999-07-23 Benjamin Kosnik + + * bits/ios_base.h: Move state/exception functions into basic_ios. + * bits/basic_ios.h: Same. + * src/ios.cc: And here. Callbacks don't attempt to reset + state now. + + * bits/std_streambuf.h: Separate ios and streambuf locale data + members and cached facets. Using this convention: _M_locale_buf for + the streambuf-related classes, and _M_locale_ios for the ios + hierarchy. + * bits/fstream.tcc: And here. + * bits/basic_ios.h: And here. Also, add cached ctype. + * src/ios.cc: Ditto. + * bits/ios_base.h: Ditto. + * bits/std_istream.h: Use cached ctype facet. + * docs/27_io/iostreams_hierarchy.pdf: Update for new data member + arraignment. + + * testsuite/27_io/ios_ctor.cc: New file. + * src/ios.cc: Move _M_state init to basic_ios::init(). + * bits/basic_ios.h: To here. + + Attempt for some consistency in naming for testsuite/27_io/*.cc. + * testsuite/27_io/boolfmt.cc: Rename to stdios_fmtflags_manip.cc + * testsuite/27_io/octfmt.cc: Rename to stdios_basefield_manip.cc + * testsuite/27_io/istream_manip.cc: Rename to istringstream_manip.cc. + * testsuite/27_io/ostream_manip.cc: Rename to ostringstream_manip.cc. + +1999-07-22 Benjamin Kosnik + + * src/ios.cc: Tweak initializations of standard iostream + objects to closely match the standard. Tie cin/wcin, set flags on + cerr/wcerr + * bits/char_traits.h: Change from size_t to int_type, as per + standard. As per wide streams. + * bits/basic_ios.h: Infect with __ctype_type, as a preparation + for caching a bunch of ctype info. For instance, ctype_base::space + info needs to be stored somewhere, somehow. + * bits/std_istream.h: Also here. + * bits/std_ostream.h: Ditto. + * bits/std_istream.h (operator>>(istream, char): Aggh. Fixup. + * testsuite/27_io/iostream_objects.cacc (test01): Oh yeah. Fix + stream states. + + * bits/istream.tcc (ws): Fix. + * testsuite/27_io/istream_manip.cc: New file, test ws. + * testsuite/27_io/ostream_manip.cc: New file, test endl, ends, flush. + + * bits/basic_string.h: Provide a specialized member function for + _S_find using strchr. + * src/string-inst.cc: Put specializations here. + * bits/string.tcc: Small fix for find, remove typo. + * testsuite/21_strings/find.cc (test01): Add tests to catch this + find bug. . . + +1999-07-20 Benjamin Kosnik + + * bits/basic_ios.h: Put into basic_ios namespace. + Tweak widen/narrow. + +1999-07-19 Benjamin Kosnik + + * bits/std_sstream.h (stringbuf::sync): Change to _M_really_sync, + adjust _M_*_cur pointers inside the function, so callee doesn't + have to adjust. + * bits/sstream.tcc (stringbuf::overflow): Tweak. + + * mkcheck: Tweak. Add execution time field, even though it is not + implemented yet. Simplify pass/fail status notation. + +1999-07-18 Mumit Khan + + * configure.in: Check for float.h and underscored version of + math functions. + * acconfig.h: Add @BOTTOM@ section for handling underscored + math functions. + * configure: Regenerate. + * config.h.in: Regenerate. + * math/mathconf.h (float.h): Include conditionally. + (M_PI): Define conditionally. + (INFINITE_P): Define for Mingw. + * bits/locale_facets.tcc: Workaround for compiler crash on + ix86-*-mingw32. + * bits/std_cwchar.h (bits/std_cstddef.h): Include. + * src/locale.cc (bits/std_istream.h): Include. + (bits/std_ostream.h): Likewise. + +1999-07-18 Phil Edwards + + * docs/faq/index.html: Updated __black_count notes, fixed typos. + * docs/faq/index.txt: Regenerated. + +1999-07-15 Benjamin Kosnik + + * testsuite/27_io/stringbuf.cc: Cccchanges, latent bugs. + + * bits/sstream.tcc (stringbuf::overflow): Modify accounting of + newly-allocated buffer. + * bits/streambuf.tcc (streambuf::xsgetn): Aaaaaah. Fix final + overflow condition bits. + +1999-07-14 Benjamin Kosnik + + * bits/std_sstream.h (stringbuf::_M_init_stringbuf): Set + _M_buf_size to initial _M_string.size(), even though for + ostringstreams it is pretty pointless. It's necessary for + istringstreams. + (stringbuf::str()): Adjust. + (stringbuf::str()): Adjust, call _M_init_stringbuf. + * bits/streambuf.tcc (streambuf::xsgetn): Adjust return value for + overflow's possible success. + (streambuf::xsputn): Adjust. + + * testsuite/27_io/filebuf.cc: Adjust for the xsgetn re-write from + yesterday. + * testsuite/27_io/stringbuf.cc: Tweak. + * testsuite/21_strings/inserters_extractors.cc (test01): Remove + notes to myself. + * testsuite/23_containers/vector_cons.cc: Rename to be consistent + with other constructor tests to. . . + * testsuite/23_containers/vector_ctor.cc: New file. + +1999-07-14 Alfred Minarik + + * testsuite/*: Changes to make the testsuit compilable with + -fhonor-std. Contains direct qualification of library names with + std::. + +1999-07-13 Benjamin Kosnik + + * bits/streambuf.tcc: Tweaks. + (streambuf::xsputn): Optimize, fix for sstreams. + (streambuf::xsgetn): Same. + * bits/sstream.tcc (stringbuf::overflow): Adjust _M_buf_size + correctly, handle overflow/reallocate conditions correctly. + * bits/std_sstream.h: Fix typo. + _M_init_stringbuf(): Fix _M_buf_size initialization. + (stringbuf::str()): Construct return string if output has occurred. + + * bits/basic_string.h: Fix typo from yesterday's patch. + +1999-07-12 Ryszard Kabatek + + * bits/string.tcc: _M_mutate - clear _M_state again. + * bits/basic_string.h: In the three functions that return + an iterator set _M_state to -1 before return. + Also optimized two cases of operator+. + +1999-07-12 Phil Edwards + + * docs/index.html: Expand egcs-1.1.2 notes/links. + * docs/faq/index.html: And here. Add links to LWG issues-list. + * docs/faq/index.txt: Regenerate. (lynx rocks) + * docs/21_strings/howto.html: Fix notes on case conversion. + * docs/21_strings/stringtok_h.txt: Goodly spelling... + * docs/23_containers/howto.html: Stub for bitmasks. + * docs/27_io/howto.html: Add section on buffering, stub binary. + +1999-07-12 Nathan Myers + + * stl/bits/stl_tree.h (__black_count): Optimize. + +1999-07-09 Vadim Egorov + + * src/basic_file.cc: Cleanup in __basic_file destructor. + +1999-07-08 Benjamin Kosnik + + * bits/std_streambuf.h: Changes. . . + * bits/streambuf.tcc: Merge xsputn from filebuf into xsputn in + basic_streambuf, to be used for both filebufs and streambufs. + * bits/std_fstream.h (_M_init_filebuf): New function. + Take out specialized xsputn, put into basic_streambuf. + * bits/fstream.tcc: Define, call from both ctors. + * bits/std_sstream.h (_M_init_stringbuf): New function. + * bits/sstream.tcc: Tweak. + + * docs/27_io/iostreams_hierarchy.pdf: New file. + + * docs/17_intro/CHECKLIST (basic_string): Validation and + acceptance. Wooo-hoo! + + * bits/char_traits.h: Change int_type for char_traits general + template, so that 21_strings/capacity.cc will compile. + * testsuite/21_strings/capacity.cc: Add operators. + + * bits/string.tcc (string::compare): Clean up, re-implement. + * testsuite/21_strings/compare.cc: Tweak. + + * bits/string.tcc (string:_M_mutate): Keep leaked value in + _M_state, which means that whenever begin() or end() has been + called, the string is unshareable, period. By doing this, insert + and erase member functions that return iterators can remain + footloose and fancy free. + * testsuite/21_strings/invariants.cc: Update. + + * bits/basic_string.h (string::append): Fix self-referential + problems, ie when "this" is also an argument to a member function. + * bits/string.tcc: Tweak, same. + * testsuite/21_strings/append.cc: New file. + +1999-07-07 Benjamin Kosnik + + * bits/char_traits.h: Tweaks. + * bits/basic_string.h: Tweak. + * bits/fstream.tcc: Remove warning for _M_buf_size assignment. + +1999-07-06 Benjamin Kosnik + + * bits/std_streambuf.h: Absorb/acquire data members previously + working in basic_filebuf. + * bits/streambuf.tcc: Tweaks. + * bits/fstream.tcc: Adjust. + * bits/std_fstream.h: Move and rename the following functions: + _M_set_ideterminate, _M_is_indeterminate, _M_set_determinate are + now declared and defined in the base class, basic_streambuf. Oh + fuck it, move data members _M_buf, and _M_buf_size into + basic_streambuf as well. + + * bits/ostream.tcc: Tweak. + * bits/locale_facets.tcc: Fix typo in comments. + + * testsuite/21_strings/inserters_extractors.cc (test01): Change + state from good to not good, as eof() is set. + +1999-07-05 Benjamin Kosnik + + * bits/char_traits.h (char_traits::compare). Fix. + + * config.guess, config.sub: Update. + +1999-07-02 Ryszard Kabatek + + * bits/string.tcc: Check the __res_arg for a length error. + +1999-07-01 Benjamin Kosnik + + * bits/std_streambuf.h: Tweaks. Need to move _M_is_indeterminate + and related functions into basic_streambuf, from basic_filebuf to + take care of ostringstreams and empty strings. So that's groovy, + or will be groovy. + * bits/std_istream.h: Tweaks. + * bits/istream.tcc: Implement ws, getline, operator>> for string. + * bits/std_ostream.h: And here. + * bits/ostream.tcc: Same. + * src/misc-inst.cc: Add instantiations for ws. + + * src/string-inst.cc: Add instantiations for inserters and + extractors (operators << and >>, getline). + + * testsuite/21_strings/inserters_extractors.cc: Amazingly enough, + a testcase for getline and operators << and >>. Ostream tests are + failing right now, but istream tests should work. . . + + * bits/string.tcc: Change _S_max_size, as GNU malloc won't budge. + * bits/std_sstream.h: Revert. + + * testsuite/17_intro: header_[iosfwd, ios, iostream, iomanip, + istream, ostream, streambuf, fstream, sstream].cc: New files. + +1999-06-30 Ryszard Kabatek + + * bits/std_sstream.h (stringbuf::sync): Don't use string::begin() + and string::end(). + + * bits/basic_string.h (basic_string<>::_S_copy_chars): Add + specializations for _CharT*, iterator and const_iterator. + * src/string-inst.cc: Remove explicit instantiation, as + now explicitly specialized. + + * bits/basic_string.h: Add a size_type parameter to _M_clone with + a default value set to 0. + * bits/string.tcc: In _M_clone by the call of _S_create add the + value of the new parameter to _M_length. In reserve check + _M_state and use _M_clone instead of _M_mutate. + +1999-06-30 Benjamin Kosnik + + * bits/basic_string.h: Fix _S_max_size. + * bits/string.tcc: Add def here. + * testsuite/21_strings/insert.cc: Fix. + + * bits/sbuf_iter.h: Remove detritus. + * testsuite/24_iterators/istreambuf_iterator.cc: Add tests. + + * src/locale-inst.cc: Elaborate iterator/locale instantiations + to resolve alpha-osf4 build problems. + +1999-06-29 Benjamin Kosnik + + * bits/string.tcc: Fix signed/unsigned issues in compares. + * stl/bits/stl_deque.h: And here. + * stl/bits/stl_string_fwd.h: Remove __get_c_string. + +1999-06-29 Ryszard Kabatek + + * bits/string.tcc: New implementation and interface of _M_mutate. + Adapt the change in all functions that call _M_mutate. + * bits/basic_string.h: And here. + +1999-06-29 Benjamin Kosnik + + * testsuite/21_strings/capacity.cc (test01): Fix. + +1999-06-29 Phil Edwards + + * mknumeric_limits: Exit script if gen-num-limits isn't built. + +1999-06-29 Andreas Gruenbacher + + * stl/bits/stl_vector.h: Fix. + * testsuite/23_containers/vector_cons.cc: Add. + +1999-06-29 Gabriel Dos Reis + + * mknumeric_limits (LDFLAGS): fix. + +1999-06-29 Gabriel Dos Reis + + * mknumeric_limits (LDFLAGS): set it according to the system. + + * math/mathconf.h (NAN): Check whether host is running under + Cygwin and make the appropriate definition. + * math/complex-stub.h (nan): protect declaration. + +1999-06-28 Benjamin Kosnik + + * bits/sbuf_iter.h: Rename internal data structure to prevent + confusion between basic_ios and istreambuf_iterators internal + basic_streambuf data member. + * testsuite/24_iterators/istreambuf_iterator.cc: New file. + + * bits/basic_string.h: Remove conditionals, add input_iterator + version of S_construct again. + * bits/string.tcc: Same. + * src/string-inst.cc: And add explicit instantiation here. + + * src/gen-c++config.cc (_GNU_SOURCE): Take out both _GNU_SOURCE + and __USE_GNU macro defines, as single __USE_GNU use leading to + confusion on glibc2.1 systems (ie, RedHat 6.0). + + * src/Makefile.am (headers): Add std_utility to installed headers. + +1999-06-25 John Potter + + * stl/bits/stl_tree.h (insert_unique): Revert, just fix insert_equal. + +1999-06-25 Gilles Zunino + + * mknumeric_limits (LDFLAGS): Swap -lc and -lgcc. + +1999-06-24 Benjamin Kosnik + + * src/gen-c++config.cc (_GLIBCPP_*): Change all + macros to include _GLIBCPP as a distinct namespace. + * bits/*: And here. + * src/*: And here. + + * stl/bits/std_stdexcept.h: Forward-declare __Named_exception ctor. + * bits/basic_string.h: Remove __get_c_string. + * src/stdexcept.cc: Define ctor here. + * bits/ios_base.h: And fix ios_base::failure as well. + * src/ios.cc: Define here. + + * bits/std_streambuf.h: Add a private copy ctor and assignment + operator wrapped in _G_RESOLVE_LIB_DEFECTS. + * bits/ios_base.h: And here too. + + * bits/basic_string.h: Tweak. + * testsuite/21_strings/nonmember.cc: Add operator+ tests. + + * src/valarray.cc: Rename to. . . + * src/valarray-inst.cc: This. + * src/Makefile.am (sources): Change here. + * src/Makefile.in: Regenerated. + +1999-06-24 Vadim Egorov + + * bits/string.tcc(basic_string<>::_Rep::_S_create): Fixed + allocated size + +1999-06-24 Benjamin Kosnik + Tom Tromey + + * configure.in (use_glibc2): Eek, correct for non-glibc systems. + Use AM_CONDITIONAL to get us out of this jam. . + * libio/Makefile.am: Same. + * */Makefile: Regenerated. + +1999-06-24 Benjamin Kosnik + John Potter + + * stl/bits/stl_tree.h (insert_equal): Fix. + * testsuite/23_containers/multiset.cc: New file. + +1999-06-23 Benjamin Kosnik + + * configure.in (test for glibc2): Correct AC_TRY_COMPILE so that + this works correctly on glibc-2 systems. This should allow + simplified linking on these systems, and successful linking on Red + Hat 6.0 systems. + * configure, Makefile: Regenerate. + + * bits/std_cwctype.h: Add missing 'w' to _S_iswpunct_helper name. + + * testsuite/ext: New directory. + * testsuite/ext/headers.cc: New file. + +1999-06-23 Vadim Egorov + + * stl/ext/hash_set: include missing headers + * stl/ext/hash_map: Same + * stl/ext/slist: Same + +1999-06-17 Gabriel Dos Reis + + * bits/std_cmath.h: comment out modf. Kills build on hpux10.20 + +1999-06-15 Benjamin Kosnik + + * src/Makefile.am (sources): Regenerate. + * mkcheck: Add TESTS_FILE as a way of controlling what testcases + are run. + +1999-06-14 Benjamin Kosnik + + * src/string-inst.cc: Change _S_construct signature, to + track requested allocation size versus valid input iterator range. + * bits/basic_string.h: Here too. + * bits/string.tcc: And here. + +1999-06-12 Benjamin Kosnik + + * mkcheck (LOG_FILE): Correctly append errors. + + * stl/bits/stl_iterator.h: Revert previous, delirious, change. + + * bits/basic_string.h: Change _Rep::_M_data to _Rep::_M_refdata, + to clarify differences between basic_string::_M_data() calls and + _Rep::_M_data() calls. + * bits/std_string.h: Fix. + Put in check for out_of_range in substr. + * bits/string.tcc: Fix for _S_find. + + * testsuite/21_strings/compare.cc: Add tests. + * testsuite/21_strings/find.cc: New file. + * testsuite/21_strings/substr: New file. + * testsuite/21_strings/replace.cc: New file. + +1999-06-11 Gabriel Dos Reis + + * bits/valarray_array.h: __restrict__ify pointers. + + * bits/std_valarray.h: Tweak. + (valarray::cshift, valarray::shift): use __builtin_alloca. + + * bits/gslice_array.h: Tweak. Reflect changes in bits/gslice.h + + * bits/gslice.h: Tweak. + (class gslice::_Indexer): new class. + (gslice::gslice(const gslice&)): implement copy-ctor to support + ref-counted index. + (gslice::operator=(const gslice&)): support ref-counted index. + (gslice::_M_convert_to_index): delete. + + * src/valarray.cc: New file. + (__gslice_to_index): turn a gslice into a valarray + (ctor gslice::_Indexer::_Indexer): implement. + + * src/Makefile.am (sources): add valarray.cc + * src/Makefile.in: regenerate. + +1999-06-08 Benjamin Kosnik + + * stl/bits/stl_iterator.h (__normal_iterator::const_iterator + ctor): Put in a const_cast. + + * testsuite/21_strings/invariants.cc: New file. + + * testsuite/21_strings/insert.cc: Add exception handling bits. + * testsuite/21_strings/ctor_copy_dtor.cc: Same. + + * src/wstring-inst.cc: Add c++config.h include. + + * bits/basic_string.h: Fix const operator[] for size == pos. + Add _M_leak for rbegin, non-const. + Add _M_leak for rend, non-const. + Make member function at standards conformant. + Add _S_terminal to _Rep for operator[] const, add this into + c_str() as well. + * bits/string.tcc: Add static member definition here, + temporarily. + + * testsuite/21_strings/element_access.cc: Add tests. + +1999-06-08 Vadim Egorov + + * bits/fstream.tcc (_M_really_overflow): Fixed size of + conversion buffer. + +1999-06-08 Phil Edwards + + * bits/fstream.tcc (basic_filebuf::xsputn): Fix off-by-one count + caused when __testinit is true. + * bits/ostream.tcc (basic_ostream::op<<(streambuf*)): Write buffer + using rdbuf()->sputn rather than _M_fnumput->put. + +1999-06-08 Benjamin Kosnik + + * testsuite/23_containers/bitset_ctor.cc: New file. + * stl/bits/std_bitset.h (__BITSET_WORDS): Fix integration bug. + +1999-06-08 Phil Edwards + + * bits/fstream.tcc (basic_filebuf::underflow): Fix, rename local vars. + +1999-06-07 Benjamin Kosnik + + * testsuite/21_strings/element_access.cc: Finish off these tests. + * testsuite/21_strings/insert.cc (test01): Uncomment. + * testsuite/21_strings/ctor_copy_dtor.cc (test01): Finish off ctors. + * bits/basic_string.h: Tweak, okay, fix for real this time. + * bits/string.tcc: Same. + * bits/char_traits.h: Tweak. + +1999-06-07 Benjamin Kosnik + + * bits/std_cmath.h: Example of how to use the generated macro. + * acconfig.h: Add macro for sinf here. + * configure.in (LIBS): Add test for builtin math function sinf. + * configure: Regenerated. + + * bits/basic_string.h: Fix _S_max_size. + +1999-06-06 Benjamin Kosnik + + * bits/basic_string.h: Fixes for out-of-memory segv for large strings. + Remove _S_construct signature for forward_iterator_tag and + input_iterator_tag. + Clean _M_fold. + * src/string-inst.cc: Same, tweaks. + * bits/string.tcc: Same, tweaks. + + * testsuite/21_strings/ctor_copy_dtor.cc: Add/clarify tests. + * mkcheck (LOG_FILE): Fix filebuf-[2,3].tst checks. + * mknumeric_limits (LD_FLAGS): Add -nodefaultlibs -lc -lgcc as per + Gaby. + + * src/locale.cc: Final separation for char/wchar_t bits. + +1999-06-05 Phil Edwards + + * docs/index.html: Added link to book upon request'n'agreement. + * docs/23_containers/wrappers_h.txt: Added. + * docs/{23_containers,27_io}/howto.html: Added sections. + + * bits/std_fstream.h: Tweak. + +1999-06-05 Benjamin Kosnik + + * src/ios.cc: Same here. + * bits/std_iosfwd.h: More wchar_t defines. + + * bits/basic_string.h: Tweaks. + * bits/string.tcc: Tweak. Fix _S_construct to check for max_size + when doing error checking, as per LWG defect #83. + + * src/gen-c++config.cc: Fix comment. + + * testsuite/21_strings/ctor_copy_dtor.cc: New file, checks ctors, + assignments, dtors. + * testsuite/21_strings/element_access.cc: New file, checks for + operator[], at(...). + * testsuite/21_strings/insert.cc: New file, tests string::insert. + * testsuite/21_strings/char_traits.cc: New file, tests + for char_traits. + + * bits/utility.h: Remove, again. + * src/Makefile.am (std_headers): Remove utility.h. + * src/Makefile.in (std_headers): Regenerate. + + Alfred Minarik + * bits/basic_string.h: Move __out_of_range and __length_error into + namespace std. + +1999-06-05 Gabriel Dos Reis + + * testsuite/26_numerics/modf_float.cc: New file. + + * bits/std_cmath.h (modf(float, float*)): Fix signature. Correct + typo: use ::modff, not ::modf. + +1999-06-03 Vadim Egorov + + * bits/string.tcc (basic_string::_M_mutate): Fixed memory + allocation error + * testsuite/21_strings/capacity.cc (test01): Test. + +1999-06-03 Phil Edwards + + * bits/fstream.tcc: Re-order inits to stop warnings. Comment/move + unused variables to within #if 0 blocks to do the same. + * bits/std_fstream.h: Fix typos (one prevents compilation). + +1999-06-03 Benjamin Kosnik + + * src/wstring-inst.cc: Fix. + +1999-06-02 Benjamin Kosnik + + * bits/char_traits.h: Add _G_USE_WCHAR_T macro guards. + * stl/bits/stl_string_fwd.h: Same. + * bits/locale_facets.h: Same. + * bits/locale_facets.tcc: Same. + * src/wstring-inst.cc: And here. + + * src/gen-c++config.cc: Comment _G_USE_WCHAR_T. Leading to + problems on HPUX 10.20. + * your-build-directory-here/bits/c++config.h: Just kidding, do it + here as a temporary hack till the compiler/host problems get + worked out. + + * bits/locale_facets.tcc (num_get::do_get): Change from ifdef + HAVE_STRTOLD to HAVE_STRTOLD && !(__hpux). Apparently, problems + converting "long double" to struct long_double. Probably should be + done with one macro (HAVE_STRTOLD) at configure time. + + * bits/std_cmath.h: Comment out pow(double, int) definition as + gives re-declaration under hpux10.20. Revert previous change, as + kills linux/x86, solaris 2.7, hpux builds. These should be done + using autoconf, see std_cctype.h and the solutions started in + configure.in (see config.h for the generated file.) + + * mknumeric_limits (LDFLAGS): Remove '-nodefaultlibs -lc', as + -nodefaultlibs prevents linking under HPUX 10.20 as __main is not + defined. + + * docs/index.html: Add some useful links. + * docs/17_intro/contribute.html: Fix broken links. + +1999-06-02 Benjamin Kosnik + + * mkcheck (LOG_FILE): Add !/bin/bash instead of cygnus-style + paths. The rest of the world should be able to run this script + now. + + * src/Makefile.am ($(generated_headers)): Remove comment. + * Makefile*: Regenerate. + + * bits/std_locale.h: Remove detritus. + * bits/localefwd.h: Add include to undefine the isspace + macro. + +1999-06-01 Benjamin Kosnik + + * src/gen-c++config.cc: New file. Making c++config.h at configure + time by catting this file (nee bits/config.h) with the build + directories config.h. This is not a complete or perfect solution + but is better than what was in place previously. + * bits/c++config.h: Rename/move to above. + * src/Makefile.am (headers): Remove c++config.h. + (myinstallheaders). Add. + * Makefile*: Regenerated. + + * bits/std_cwchar.h: Add include of c++config.h for HAVE_* + definitions, so that wmemcmp, wcslen, wmemchr, etc are properly + declared only if not present in the host's wchar.h. + + * bits/locale_facets.tcc (std): Change _G_USE_STRTO* to HAVE_STRTO*. + + * bits/std_cmath.h: Define out, for the moment. Linux has no + __buitin_fsqrtl? Probably need some kind of configure trickery + here as well. + + * src/Makefile.*: Regenerate. + * bits/c++config.h: Add config.h include. + + * bits/std_cwchar.h: Remove remaining #error guard. + + * acconfig.h: Add bits for HAVE_LC_MESSAGES. + + * configure.in (LIBS): Replace previous effort for mbstate_t and + strtold/strtof with this implementation. + +1999 06-01 Gabriel Dos Reis + + * bits/std_cmath.h: Tweak. Add more functions. Use __builtin_xxx + whenever possible. + +1999-05-28 Benjamin Kosnik + + * bits/locale_facets.tcc (std): Eek: this left in. Autoconf bits + for determining mbstate_t differences across various hosts not + finished. + +1999-05-26 Benjamin Kosnik + + * bits/locale_facets.tcc: Change to ifdef. + + * bits/std_sstream.h (stringbuf::setbuf): Remove dynamic_cast. + * bits/std_fstream.h (filebuf::setbuf): Same. + + * bits/std_istream.h: Add ws declaration. + * bits/istream.tcc: Stub out definition. + + * docs/index.html: Fix broken link for design.txt. + + * configure.in: Test for mbstate_t. If wchar.h doesn't have it, + then set _G_NEED_MBSTATE_T. + * configure: Regenerate. + * bits/c++config.h: Move mbstate_t define. + * bits/std_cwchar.h: To here. + +1999-05-25 Ryszard Kabatek + + * bits/std_sstream.h: + basic_stringbuf<>::basic_stringbuf: fix. + basic_stringbuf<>::setbuf: + remove the temporary __string_type object, + remove the unnecessary dynymic_cast in the return value, + change the type of the returned value from __streambuf_type* + to basic_stringbuf<_CharT, _Traits, _Alloc>*. + +1999-05-25 Phil Edwards + + * bits/std_streambuf.h (streambuf::setbuf): Always return streambuf*. + +1999-04-25 Gabriel Dos Reis + + * bits/std_cmath.h: Tweak. Add float versions of the math functions + in . still incomplete and incorrekt. + +1999-05-24 Gabriel Dos Reis + + * mknumeric_limits (LDFLAGS): set appropriate link flags. + +1999-05-23 Phil Edwards + + * docs/17_intro/howto.html: Added links to text docs, + e.g., BUGS. + * docs/21_strings/howto.html: Updated sections and links. + * docs/21_strings/{gotw29a.txt,stringtok_h.txt}: Added. + * docs/faq/index.html: Updated what-works for sixth + snapshot. Also a number of "internal" links have been + fixed, now that the web pages are the docs directory... + * docs/faq/index.txt: Regenerated. + +1999-05-21 Benjamin Kosnik + + * bits/basic_string.h: Add Nathan's documentation on the string class. + + * testsuite/27_io/ios_members_static.cc: New file, for testing + ios_base::sync_with_stdio. + +1999-05-21 Benjamin Kosnik + + * bits/std_locale.h: Simplify includes. + * bits/loccore.h: Delete. + * bits/localefwd.h: Renamed, trimmed. + * bits/locfacets.h: Delete. + * bits/locale_facets.h: Rename, expanded. + * bits/loccore.tcc: Deleted. + * bits/locfacets.tcc: Deleted. + * bits/locale_facets.tcc: Resultant merge. + * bits/std_fstream.h: Modify include. + * bits/ostream.tcc: Same. + * bits/istream.tcc: Same. + + * src/locale-inst.cc: And here. + * src/locale.cc: Ditto. + * src/Makefile.am: Updated. + * src/Makefile.in: Rengenerated. + + * bits/std_istream.h: Move istream::sentry ctor definition. + * bits/istream.tcc: Move istream::sentry ctor here. + Add more detailed locale include here for ctype member functions. + * bits/ostream.tcc (std): And here. + + * bits/sbuf_iter.h: Include std_streambuf.h + + * bits/locfacets.h: Start separating this into a localeimp.h file. + * bits/loccore.h: Start separating this into a localefwd.h file. + Add std_climits for CHAR_BIT. + + * bits/ios_base.h (ios_base::sync_with_stdio): Stub in. + + * bits/char_traits.h: Tweak. + + * bits/ios_base.h: Remove INT_MAX, use 1<<16. + + * bits/std_ostream.h: Remove c++config.h include. + * bits/std_istream.h: Same. + * bits/std_streambuf.h: Same. + * bits/std_fstream.h: Same. + * bits/std_sstream.h: And here. + + * bits/std_iosfwd.h: Add _G_RESOLVE_LIB_DEFECTS here for streampos. + * bits/char_traits.h: Add include of std_cwchar.h for mbstate_t. + * bits/fpos.h: Tweak, format. + + * std/ciso646: New file. + * bits/std_ciso646.h: New file. + * src/Makefile.am (std_headers): Add ciso646. + (headers): Add bits/std_ciso646.h. + * src/Makefile.in: Regenerate. + * testsuite/17_intro/header_ciso646.cc: New file, disable + equivalance tests. + + * bits/fpos.h: Remove libio.h include. + * bits/basic_file.h: And here. + * bits/std_ios.h: Put here. + + * src/ios.cc: Simplify includes, tweak. + * bits/std_ios.h: Simplify include order. + * bits/ios_base.h: Modify ios_base::failure. + + * stl/bits/std_numeric.h: Change include from stl_iterator to + std_iterator. + +1999-05-19 Benjamin Kosnik + + * std/iostream: Remove static member __ioint. + * bits/std_iostream.h: Put here. + + * stl/bits/std_numeric.h: Remove unneccessary std_iostream.h include. + * stl/bits/stl_algobase.h: Same. + * testsuite/27_io/iostream_objects.cc: Regression tests. + * testsuite/27_io/hello.cc: Remove, subset of above. + +1999-05-19 Phil Edwards + + * docs/index.html: Tweak, update. + +1999-05-18 Gabriel Dos Reis + + * docs/17_intro/RELEASE-NOTES: remove outdated + documentation about numeric_limits. Correct CXXINCLUDE setting + documentation. + +1999-05-18 Phil Edwards + + * docs/{17_intro,18_support,19_diagnostics,20_util,21_strings, + 22_locale,23_containers,24_iterators,25_algorithms,26_numerics, + 27_io}/howto.html: Created, with some initial entries. + * docs/faq/index.html: Fixed some links. + * docs/faq/index.txt: Regenerated. + +1999-05-18 Benjamin Kosnik + + * bits/c++config.h (__GLIBCPP__): Set version to 19990518. + + * docs/17_intro/RELEASE-NOTES: Update. + * docs/index.html: Correct link to mailing list help page, update News. + * docs/faq/index.html: Change fifth to sixth for snapshot. + + * src/Makefile.am (myinstallheaders): Bring over Gaby's changes to + install $(top_builddir)/bits/std_limits.h into + $(myincludepfx)/bits. This was mistakenly omitted from yesterday's + Makefile.am changes. + * *Makefile*: Regenerate using automake. + + * mkcheck (LOG_FILE): Fix filebuf directory oddness. + * testsuite/27_io/filebuf.cc: Same. + +1999-05-18 Gabriel Dos Reis + + * docs/17_intro/CHECKLIST: update. + * docs/17_intro/TODO: update. + +1999-05-17 Phil Edwards + + * docs/{17_intro,18_support,19_diagnostics,20_util,21_strings, + 22_locale,23_containers,24_iterators,25_algorithms,26_numerics, + 27_io}/howto.html: Created, with some initial entries. + * docs/faq/index.html: Fixed some links. + * docs/faq/index.txt: Regenerated. + +1999-05-17 Benjamin Kosnik + + * src/Makefile.am (myinstallheaders): Missed removing missing.h. + * Makefile.in*: Regenerate. + +1999-05-17 Benjamin Kosnik + + * bits/std_streambuf.h: Same. + + * bits/loccore.h (_Bad_use_facet): Remove bits warned about. + * bits/locfacets.h (std): Same. + * bits/sstream.tcc: Same. + * testsuite/27_io/stringstream.cc: Tweak. + + * testsuite/27_io/filebuf.cc: Adjust. + * testsuite/21_strings/capacity.cc (test01): Add more + string::reserve tests. + + * bits/c++config.h: Remove broken CCTYPE. + * bits/std_cctype.h: Tweak, remove de-macroization, enable + sequestered topper implementation. + * bits/std_cwctype.h: Same. + + * bits/missing.h: Remove. + * bits/std_locale.h: Remove missing.h include. + + * stl/bits/std_bitset.h (bitset::bitset(string): Tweak to compile. + + * src/Makefile.am (headers): Add bits/std_cwctype.h. + INCLUDES: Add top_builddir. + * src/Makefile.in: Regenerate. + + * Makefile.am: Add check and check-install as new targets. + * testsuite/make_check_libfree++: Move to. . . + * mkcheck: Here. + * configure.in: Tweak versions. + * mknumeric_limits: Set paths correctly. + +1999-05-17 Gabriel Dos Reis + + * src/Makefile.in (myinstallheaders): add rule to install + std_limits.h. + + * bits/slice.h (class slice): don't const-qualify data members + since the copy and assignment operator is implicitly used. The + valarray specification is definitively a bad one. + + * Makefile.in (generate-limits-sources): fix typo. + + * docs/text/TODO: update. + * docs/text/CHECKLIST: update. + + * bits/gslice.h (gslice): fix bugglet. + (gslice::gslice): set _M_index_size to 0 whenever given lengths + (lj) of size zero. + + * src/Makefile.am (libstdc___la_SOURCES): add gen-num-limits. + * src/Makefile.in (libstdc___la_SOURCES): keep in sync. + [Note: **/Makefile.in should be generated from the corresponding + Makefile.am. The current situation is a litte chaotic. ] + +1999-05-16 Gabriel Dos Reis + + * mknumeric_limits: tweak. + + * Makefile.in (all): add target generate-limits-sources. + (generate-limits-sources): make a directory bits/ in top_builddir + where the generated std_limits.h is put; generate limitsMEMBERs.cc + directly under $(top_builddir)/src. Remains to put the appropriate + rule for installing std_limits.h. + + * src/Makefile.in (headers): remove bits/std_limits.h to this list. + (INCLUDES): add -I$(top_builddir) for bits/std_limits.h which is + now generated at build-time in the build directory + (libstdc___la_SOURCES): remove limitsMEMBERS.cc form this list + * src/Makefile.am: reflect changes in src/Makefile.in + +1999-05-12 Phil Edwards + + * docs/faq/index.html: Add more entries (5.4,5.5), finish + all but one empty entry. Add links for HOWTOs, but no files yet. + (Corrected HOWTO links are for bkoz's new scheme.) + * docs/faq/index.txt: Regenerated. + +1999-05-12 Benjamin Kosnik + + * testsuite/17_intro/headers.cc: New file. + * stl/bits/std_queue.h: Change stl_bvector.h include path. + * bits/std_cwctype.h: New file. + + * testsuite/27_io/filebuf.cc: Need to tweak directory structure. + +1999-05-11 Benjamin Kosnik + + * stl/bits/stl_config.h (__USE_MALLOC): Change underlying allocator. + Check __USE_MALLOC before defining specializations containing + __default_alloc_template. + * src/stl-inst.cc: Here too. + + * bits/basic_string.h: Change. + + * testsuite/make_check_libfree++: More tweaks. + * testsuite/21/capacity.cc: New file. + + * src/string.cc: Rename to be consistent with other inst files. + Rename to string-inst.cc. + * src/string*.cc: Change include. + * src/wstring.cc: Rename to wstring-inst.cc. + * src/wstring*.cc: Ditto. + * src/Makefile.in: Also here. + * src/Makefile.am: Ditto. + + * src/traits.cc: Remove. + * src/wtraits.cc: Same. + + Try a new way of organizing documentation, one with synchronicity + between testsuites and docs subdirectories, and see who yelps. + * docs/html: Remove, use chapter and subject specific directories + instead of forcing things immediately into format of + documentation. + * docs/text: Same. + * docs/image: Same. + * docs/faq/text, docs/faq/html: Remove, put in the docs/faq + directory and sort by filename and extension. + * docs/17_intro, 18_support, 19_diagnostics, 20_util, 21_strings, + 22_locale, 23_containers, 24_iterators, 25_algorithms, + 26_numerics, 27_io: Add. + * docs/17_intro/*: Populate with all the text files. . . + * docs/index.html: Construct. + + * testsuite/*: Update with same names as the docs subdir. + * testsuite/results: Where to stash conformance results for the + different snapshots, so that progress/size/speed issues can be + tracked over time. + +1999-05-10 Benjamin Kosnik + + * src/string.cc: Add _S_copy_chars instantiation, as well as + string::binary operators !=, ==, etc. + + * src/Makefile.am (CXXFLAGS): Remove -fvtable-thunks. + * src/Makefile.in (CXXFLAGS): Same here. + * testsuite/make_check_libfree++ (CXX_FLAG): And here. + +1999-05-07 Benjamin Kosnik + + * src/string.cc: Add missing member functions to instantiation list. + +1999-05-07 Benjamin Kosnik + + * src/misc-inst.cc: Remove unused string instantiations. + + * bits/string.tcc: Tweak, fix. + * bits/basic_string.h: Format. Fix reported error with c_str(). + + * testsuite/make_check_libfree++: Tweak for shared builds. + * testsuite/21/operations.cc: New file for testing c_str() etc. + +1999-05-06 Benjamin Kosnik + Ryszard Kabatek + + * stl/bits/stl_vector.h: Fix the code of vector<> for usage with + an iterator class. Delineate pointer versus iterator differences + in implementation. + * 23/vector_capacity.cc: New file, tests for above. + +1999-05-06 Gabriel Dos Reis + + * mknumeric_limits: Fix typo. 'unsigned lont' should read + 'unsigned long'. + * src/Makefile.am (libstdc___la_SOURCES): add limitsMEMBERS.cc, + generated by mknumeric_limits to the list. Now std_limits.h is + basically working. + * src/Makefile.in (generate-numeric-limits): new target to handle + automatic generation of bits/std_limits.h and src/limitsMEMBERS.cc. + (all): add target generate-numeric-limits. + (libstdc___la_OBJECTS): add limitsMEMBERS.lo + (libstdc___la_SOURCES): add limitsMEMBERS.cc + +1999-05-05 Benjamin Kosnik + + Irix build issues. + * bits/c++config.h (_G_USE_CTYPE_ISBIT): Defines new macro for + mask values in ctype_base. Move hacks for _ISBit to locfacets.h. + * bits/locfacts.h: Here. + +1999-05-05 Benjamin Kosnik + Ulrich Drepper + + Solaris build issues. + * bits/c++config.h: Define new macros, _G_USE_STRTOF and + _G_USE_STRTOLD. + + * bits/locfacets.tcc (num_get::do_get): Tweak long double and + float overloads to use the above macros. Account for the lack of + strtold on some systems, and revert back to using sscanf. + +1999-05-04 Ryszard Kabatek + + * bits/locfacets.tcc (num_get::do_get): Check the errno variable. + Use strtoul/strtoull for unsigned types. Check the ranges for + short/unsigned short and if necessary for int/unsigned int. + +1999-05-04 Benjamin Kosnik + + * src/gen-num-limits.cc (round_style): Need to use mknumericlimits + to generate bits/std_limits.h now, as the SGI std_limits.h is + being depricated. Not done, but should be done immediately: need + to make sure this script is run as part of the configuration + process, because without it "make" in a configured build directory + will fail. Also tweaked: added a space for float_round_style, and + used static_cast of zero to default-initialize, which should be ok + according to the standard. (see 8.5 p5 and 20.1.3). + * mknumeric_limits (OUT_C): Need this for x86 long + double extensions. + + * bits/basic_file.h: Include libio.h, not libioP.h. + * src/basic_file.cc: And add libioP.h include here, so that + _IO_init, et. al are well-declared. + + * testsuite/make_check_libfree++ (LIB_PATH): Test installed + headers, not source directory headers. + + * src/Makefile.am (headers): Add stl_range_errors.h, also adjust + for ext/*. Also add basic_file.h. + * src/Makefile.in (headers): Same. + + * bits/std_string.h: Reduce dependencies for faster + pre-processing. Move istream and ostream specific defines into + istream.tcc and ostream.tcc respectively. + * bits/string.tcc: And here. + * bits/basic_string.h: Move getline inline out-of-line, and to + istream.tcc. + * bits/istream.tcc: Move string::getline and operator>> here. + * bits/ostream.tcc: And here too. + + * bits/utility.h: Remove, as clashes with a standard header. Put + __OUTOFRANGE and __LENGTHERROR macros into string.tcc for the time + being, until this can be combined with SGI's approach. + * bits/string.tcc: Add macros, as above. + * bits/loccore.h: Add _Count_ones defines. + * bits/std_string.h: And here too. + * bits/std_locale.h: And here. + * bits/std_ios.h: Take out include here. + * src/Makefile.am (headers): Remove utility.h + * src/Makefile.in (headers): Remove utility.h + + * stl/bits/*: Update to SGI STL 3.20. + * stl/ext/pthread_alloc: Delete this file. + +1999-05-04 Phil Edwards + + * docs/faq/html/index.html: Add more entries + * docs/faq/html/index.txt: regenerated. + +1999-05-04 Gabriel Dos Reis + + * src/gen-num-limits.cc (DO_DEFINE_MIN_MAX): fix typo. + +1999-04-29 Benjamin Kosnik + + * bits/locfacets.tcc (num_get::do_get): Re-implement, with input + from Ulrich and Nathan. Remove extraneous string class usage, + tweak, clean, simplify and consolidate with a eye towards removing + duplcate code. Use strto[l, ll, f, d, ld] instead of sscanf. + Not done: dealing with leading zeros, wchar_t work. + * bits/locfacets.h: And here too. + + * doc: Remove. + +1999-04-29 Gabriel Dos Reis + + * docs/: add a FAQ. + * docs/faq/: New directory. + * docs/faq/html/: Likewise. + * docs/faq/text/: Likewise. + * docs/faq/html/index.html: New file. + * docs/faq/html/index.txt: Likewise. Generated from + docs/faq/html/index.html by lynx. + +1999-04-28 Benjamin Kosnik + Ryszard Kabatek and Branko Cibej + + * bits/locfacets.tcc: Modify. + +1999-04-27 Benjamin Kosnik + + * bits/sbuf_iter.h: Clean, fix istreambuf_iterator, make + conformant to 14882, wrap non-standard extensions with + _G_RESOLVE_LIB_DEFECTS, remove detritus and cruft, rennovate. + * bits/locfacets.tcc (num_get::do_get(bool)): Return correct iterator. + + * testsuite/27/istringstream_formatted.cc: Add tests. + + * bits/locfacets.h: Remove cruft from _Format_cache, continue + commenting, simplify. + * bits/locfacets.tcc: Same. + + 1999-04-27 Ryszard Kabatek + * bits/locfacets.tcc (num_get::do_get): + Fix the sscanf format parameter + for long long 'll' (as in C9X) instead of 'l'. + Fix the order of sscanf format parameters: "%dl" --> "%ld". + Change the type of the local variable '__conv' from 'string' + to 'const char*' and adapt the change. + +1999-04-26 Benjamin Kosnik + + * bits/locfacets.h: Document _Format_cache, and name data members + after the corresponding functions in numpunct. For instance: + _M_grsep -> _M_thousands_sep, and _M_decsep -> _M_decimal_point. + Break apart _M_boolnames{2] into _M_truename and _M_falsename. + * bits/locfacets.tcc: Same. + + * bits/locfacets.h (num_get::_M_extract): Don't allow groupings to + stop parsing--store for later analysis. + * testsuite/27/istringstream_formatted.cc: Add cases. + +1999-04-25 Gabriel Dos Reis + + * bits/valarray_meta.h: tweak. + (_UnFunBase, _BinFunBase, _BinFunBase1, _BinFunBase2, _BinBase1, + _BinFunBase2): rename typedef-name _Tp to _Vt to keep the compiler + happy -- boggus warning. + * bits/std_valarray.h: Fix. + (valarray::shift): Fix. Update comment. + (valarray::cshift): Fix. + +1999-04-23 Benjamin Kosnik + + * testsuite/27filebuf-2.txt: Delete. + * testsuite/27/filebuf.cc: Put output files directly into the + correct subdirectory (27). + + Alexandre Petit-Bianco + * testsuite/make_check_libfree++: Check generated (*.txt) file + against stored results file (*.tst). + +1999-04-22 Benjamin Kosnik + + * bits/locfacets.tcc: Fix. + + * bits/fstream.tcc (filebuf::seekoff): Output current out pointer. + (filebuf::overflow): Simplify. + (filebuf::xsputn): Correctly handle indeterminate state. + + * testsuite/27/istringstream_formatted.cc: Tweak. + * testsuite/27/filebuf.cc: Tweak. + * testsuite/27/filebuf-3.tst: Correct: this is the canonical + results file, please use this in the future to guarantee filebuf + positioning accuracy. + * testsuite/27/filebuf-2.tst: Same. + +1999-04-21 Benjamin Kosnik + + * bits/fstream.tcc (filebuf::xsputn): Add. + * bits/std_fstream.h: Declare. + + * src/basic_file.cc (__basic_file::open): Add O_CREAT to open + calls using ios_base::trunc. + + * bits/sstream.tcc (streambuf::overflow): Fix crasher. + + * testsuite/make_check_libfree++ (LOG_FILE): Ugh. Another fix. + * testsuite/27/27stringstream.cc: Same. + * testsuite/27/27stringbuf.cc: More tweaks. + * testsuite/27/27filebuf-2.txt: Remove. + + * testsuite/27/27filebuf-1.tst: Append, to force byte size over + BUFSIZE so that overflows/underflow can be tested with default + buffer setting. + * testsuite/27/27filebuf-1.tst: Add. + + * testsuite/*/*: Remove pre-pended chapter names, as they + duplicate the chapter info contained in the enclosing directory + anyway. + +1999-04-20 Benjamin Kosnik + + * bits/streambuf.tcc (streambuf::xsputn): Re-implement to conform + to sputc conditions. + + * bits/ios_base.h: Define here. + * src/ios.cc (ios_base::_M_clear): Remove hack. + * bits/basic_ios.h: Fix rdstate(). + + * bits/sstream.tcc (streambuf::seekoff): Fix. + * bits/fstream.tcc (filebuf::seekoff): Tweak comments. + + * testsuite/make_check_libfree++ (LOG_FILE): More c-c-c-changes. + * testsuite/24/24iterator.cc: Add/Fixes for DEBUG_ASSERT. + * testsuite/27/27stringstream.cc: Same. + * testsuite/27/27stringbuf.cc: Same. + * testsuite/27/27istringstream_formatted.cc: Same. + * testsuite/27/27filebuf.cc: Same. + + * bits/locfacets.h: Remove specializations for messages and + messages ctors. Same for moneypunct. Not required, not used. + * src/locale.cc: Remove definitions for above. + * src/misc-inst.cc: Revert, take out iomanip.h include. + * bits/std_iomanip.h: Tweak, format. + +1999-04-19 Benjamin Kosnik + + * bits/loccore.h: Format, move inline. + * bits/locfacets.tcc: Same. + * bits/locfacets.h: Same. + + Ulrich Drepper + * aclocal.m4: Re-generate. + * configure, configure.in: Same. + * m4/lc_messages.m4: New file. + +1999-04-18 Benjamin Kosnik + + * bits/std_ostream.h: Fix typedef for wchar_t instantiations. + * bits/sstream.tcc: Tweak. + + * std/iostream: Put __ioinit inside macro guards. + + * src/stlinst.cc: Delete and move to . . . + * src/stl-inst.cc: New file, plus wrapping in namespace std. + * src/Makefile.in: Change. + * src/Makefile.am: Same. + * src/misc-inst.cc: Add istringstream/ostringstream instantiations. + + * testsuite/make_check_libfree++: Efficiently format for minimal + space. Enforce stricter execution tests by enabling + -DDEBUG_ASSERT. + +1999-04-16 Benjamin Kosnik + + * docs/text/RELEASE-NOTES: Fix include typo. + + * src/Makefile.am (headers): Add istream.tcc. + * src/Makefile.in (headers): Add istream.tcc. + + * ltconfig, ltmain.sh, libtool: Update to libtool-1.2g. + +1999-04-16 Benjamin Kosnik + + * bits/locfacets.tcc (num_get::do_get(long)): Finish roughing in. + * bits/locfacets.h (num_get::_M_extract): New functin: + consolidate logic for do_get(...) members. + + * bits/sbuf_iter.h (istreambuf_iterator::operator++()): Fix. + * testsuite/27/27istringstream_formatted.cc: Add. + +1999-04-16 Martin v. Loewis + + * src/basic_file.cc (__basic_file::open): Fix thinko in + _G_HAVE_IO_FILE_OPEN bits. + * bits/std_istream.h (sentry::sentry(istream, bool)): Fix isspace bug. + * bits/std_cmath.h: Add stdlib.h include for ldiv_t. + * src/complex.cc (FCT): Qualify all functions with global namespace. + * src/locale.cc: Don't qualify memcpy and setlocale. + * src/stdexcept.cc (__out_of_range): Qualify out_of_range with std::. + (__length_error): Likewise, for length_error. + * src/stlinst.cc: Qualify instantiations with std::. + +1999-04-15 Benjamin Kosnik + + * C++STYLE: Add ChangeLog guidelines for member functions. + + * doc/* : Delete. + * BADNAMES, BUGS, C++STYLE, CHECKLIST, COPYING, + DESIGN, HEADER_POLICY, PROBLEMS, RELEASE-NOTES, TODO: Moved into + docs/text and made less strident. + + * bits/fstream.tcc: Change non-standard ctor to match Sun's sematics. + * bits/std_fstream.h: Same. + * src/ios.cc: Same. + + * bits/locfacets.h: Touch. + +1999-04-15 Ulrich Drepper + + * math/cexp.c (cexp): Use NAN instead of nan(""). + Reported by joel reed . + + * libio/libioP.h: Define _IO_seek_fpos_t and _IO_seek_off_t based on + _G_IO_IO_FILE_VERSION. Use these types in the prototypes. + * libio/fileops.c: Use _IO_seek_fpos_t and _IO_seek_off_t types + instead of #if cascades. + * libio/genops.c: Likewise. + * libio/ioseekoff.c: Likewise. + * libio/ioseekpos.c: Likewise. + * libio/strops.c: Likewise. + Patch by Chip Salzenberg . + +1999-04-15 Gabriel Dos Reis + + * docs: New directory. + * docs/html: Likewise. + * docs/text: Likewise. + * docs/image: Likewise. + + * bits/std_cmath.h: Add new functions. + (abs): overload for long and double. + (div): overload for long. + + * bits/valarray_array.h: Fix. + * bits/gslice.h: Adjust friend. + * bits/slice_array.h: likewise. + * bits/valarray_meta.h: likewise. + +1999-04-13 Benjamin Kosnik + + * bits/locfacets.h: More changes, for num_get for insertion + operators for integral types. Comment fields in _Format_cache. + * bits/locfacets.tcc: And here too: add preliminary long version. + * testsuite/27/27istringstream_formatted.cc: Add cases. + +1999-04-13 Mark Elbrecht + + * configure.in: Add locale.h to AC_CHECK_HEADERS argument. Call + AC_LC_MESSAGES macro. + * aclocal.m4 (AC_LC_MESSAGES): New. Determines if a target + supports LC_MESSAGES. + * config.h.in: Add entry for HAVE_LC_MESSAGES. + * src/locale.cc (locale::_S_normalize_category): Use the + HAVE_LC_MESSAGES macro to check for LC_MESSAGES support instead of + _G_NO_CLOCALE_HAS_MESSAGES. + * aclocal.m4 (AM_PROG_LD): For DOS style paths, simplify test to + '?:' from '?:\\' so any path beginning with a drive name matches. + +1999-04-12 Mark Elbrecht + + * src/basic_file.cc(sys_open) [O_BINARY]: Declare __testb. + +1999-04-12 Benjamin Kosnik + + * bits/locfacets.h: Tweak. + * bits/locfacets.tcc(do_get): Clean/fix bool method. + + * testsuite/21/21nonmember.cc: Same. + * testsuite/21/21compare.cc: Fix license. + * testsuite/27/27istringstream_formatted.cc: New file. + +1999-04-12 Gabriel Dos Reis + + * bits/valarray_meta.h: _BinFunBase1, _BinFunBase2, _BinBase1, + _BinBase2: new template classes; put in there to work around a + compiler limitation. The whole valarray architecture is now + working. + +1999-04-08 Benjamin Kosnik + + * bits/locfacets.tcc: Fix, format. + * bits/locfacets.h: Fix. + * src/locale.cc: Same, plus format. + + * bits/basic_string.h: Re-add definition here. + * src/string.cc: Take out. + +1999-04-08 Gabriel Dos Reis + + * bits/std_valarray.h: tweak. + * bits/valarray_array.h tweak. use _Expr. + * bits/slice_array.h: likewise. + * bits/gslice_array.h: likewise. + * bits/mask_array.h: likewise. + * bits/indirect_array.h: likewise. + * bits/valarray_meta.h: tweak. + _UnFunBase, _UnFunClos, _BinFunBase, _FunBase, _ValFunClos, + _RefFunClos, _UnBase, _UnClos, _BinBase, _BinClos, _SClos, _GClos, + _IClos: new template classes. + _Meta: renamed to _Expr. Made template with args. + _Constant: made template with two args. + +1999-04-05 Gabriel Dos Reis + + * bits/valarray_array.h: tweak. + +1999-04-06 Benjamin Kosnik + + * bits/basic_string.h: Whoops--fix blip. + +1999-04-06 Benjamin Kosnik + + Update to SGI STL 3.13 + * bits/basic_string.h: Add __get_c_string definition. + * stl/bits/stl_range_errors.h: New file. + * stl/bits/std_bvector.h: Same. + * stl/bits/*: Update. + +1999-04-04 1999 Gabriel Dos Reis + + * bits/slice_array.h: tweak. + * bits/gslice_array.h: tweak. + * bits/mask_array.h: tweak. + * bits/indirect_array.h: tweak. + * bits/valarray_array.h: tweak. + (__valarray_copy): replace copy with memcpy. + * bits/std_valarray.h: use __valarray_copy whenever possible. + use __valarray_fill instead of fill. + +1999-04-02 Gabriel Dos Reis + + * src/gen-num-limits.cc: new file + * mknumeric_limits: Ditto. + +1999-03-30 Benjamin Kosnik + + * bits/locfacets.tcc: Do a stub version of num_get for short, int, + and long types. + * bits/locfacets.h: Add num_get::get methods overloaded for int + and short, to resolve ambiguous overloads in istream insertion + operators. + +1999-03-30 Benjamin Kosnik + + * bits/std_istream.h: Fix. + * bits/istream.tcc: Fix. + +1999-03-30 Philip Martin + + * testsuite/24/24iterator.cc: fix ++/-- tests + +1999-03-29 Benjamin Kosnik + + * bits/std_ostream.h: Looks like this, actually: Fix up eh-isms. + * bits/ostream.tcc: Same. + + * bits/std_istream.h: Bring over ostream changes, implement member + functions. Baseline. + * bits/istream.tcc: New file. + +1999-03-26 Gabriel Dos Reis + + * bits/gslice.h (class gslice): fix friends template. + +1999-03-23 Benjamin Kosnik + + * bits/std_ostream.h: Fix sentry objects, implement seekp, tellp, + delete cruft, etc. + * bits/ostream.tcc: Same. + + * bits/std_istream.h: Minor tweaks. + +1999-03-18 Benjamin Kosnik + + * src/locale-inst.cc: Remove duplicate instantiations. + * bits/locfacets.tcc: Tweak definitions of static member. + +1999-03-18 Benjamin Kosnik + + * bits/std_fstream.h: Format: prepend "__" in front of + non-standard typedefs. + * bits/fstream.tcc: Match. + * bits/std_streambuf.h: Format: prepend "__" in front of + non-standard typedefs. + + * bits/sstream.tcc: Match. + * bits/std_istream.h: Format. + * src/locale-inst.cc: Add num_get instantiations. + + * bits/std_sstream.h: Fix crash in stringstreams. Remove member + _M_sb, a basic_stringbuf object, and use the basic_ios pointer + _M_streambuf instead. Make initializations sane. Fix + allocation/deallocation of _M_streambuf. + * bits/std_ostream.h: Fix initialization code. + (ctor): Eliminate redundant this->init(), let base class initialize. + (default ctor): New. Assume base classes already initialzed. + * bits/std_istream.h: Parallel work to ostream. + (ctor): Eliminate redundant this->init(), let base class initialize. + (default ctor): New. Assume base classes already initialzed. + Fix initialization of basic_iostream. + + * bits/std_fstream.h: While we're at it, make initializations sane + here too. Now matches sstream.h. + + * bits/string.tcc: Fix crash in basic_string::compare. + * bits/basic_string.h: And here. + * bits/c++config.h: Add comment about _G_USE_EXCEPTIONS. + + * testsuite/make_check_libfree++: Check shared as well. + * testsuite/27/27stringstream.cc: Add bits. + * testsuite/27/27boolfmt.cc: Add bits. + * testsuite/27/27octfmt.cc: Add bits. + +1999-03-17 Benjamin Kosnik + + * configure.in (USE_LONG_DOUBLE): signbitl link error. + + * bits/locfacets.h: Fix errors that cause build problems + with current egcs (template parameters have class scope). + * bits/locfacets.tcc: Same. + * src/locale-inst.cc: Same, clean. + * src/misc-inst.cc: Same, clean. + +1999-03-17 Ryszard Kabatek + + * stl/bits/std_memory.h: Modify auto_ptr::reset to reflect the + standard. Re-apply this previous patch. + +1999-03-17 Philip Martin + + * bits/basic_string.h: Use __normal_iterator<> for iterators. + * bits/std_sstream.h: Support __normal_iterator<> iterators. + * bits/string.tcc: Ditto. + * src/misc-inst.cc: Ditto. + * src/locale-inst.cc: Ditto. + * stl/bits/stl_iterator.h: Add __normal_iterator<>. + * stl/bits/stl_vector.h: Use __normal_iterator<> for iterators. + * testsuite/24/24iterator.cc: Add test cases for basic_string and + vector iterators. + +1999-03-16 Benjamin Kosnik + + * bits/locfacets.tcc: Remove macro hack. + * bits/locfacets.h: Tweaks. + * src/misc-inst.cc: Weed out locale-related instantiations. + * src/locale-inst.cc: Same. + + * RELEASE-NOTES: Make more changes. + * bits/c++config.h: Bump version number. + + * testsuite/make_check_libfree++: Collect diagnostics. + + * bits/std_ostream.h: Fix ostream initialization/destruction + problem, related to dtor cleanup and new cached facets, agggggggh. + * bits/ostream.tcc: Tweak. + * bits/locfacets.h: Remove all friends of iostream classes. + * bits/ios_base.h: Same. + * bits/streambuf.tcc: Tweak. + * bits/std_streambuf.h: Tweak. + * bits/std_fstream.h: Tweak. + * bits/fstream.tcc: Tweak. + * src/stdstreams.cc: Tweak. + * src/ios.cc: Close streams. + + * math/Makefile.in: Add missing files for shared link errors. + * math/Makefile.am: Same. + +1999-03-15 Benjamin Kosnik + + * src/locale-inst.cc: More wchar_t instantiations. + * src/misc-inst.cc: Missed a few bits. + * testsuite/make_check_libfree++: Add static and shared runs. + * src/ios.cc: Add clarity to ios_base::Init::~Init(). + +1999-03-15 Benjamin Kosnik + + * bits/std_ostream.h: Format, expunge, simplify. Add cached + facets. Resolve link errors. + * bits/ostream.tcc: Same. + * src/misc-inst.cc: Add ostream, wostream instantiations. + * src/Makefile.am: Add missing bits for stdstreams.cc. + * src/Makefile.in: Same. + * bits/std_iosfwd.h: Format. + * bits/locfacets.h (num_put): Add basic_ostream as a friend to + num_put so that cached _M_fnumput pointer can be deleted in + basic_ostream's dtor. Now everybody plays nice. + +1999-03-12 Gabriel Dos Reis + + * bits/gslice.h (class gslice): Make friends valarray, + gslice_array and _GliceExpression. + +1999-03-11 Benjamin Kosnik + + * RELEASE-NOTES: Update. + * src/ios.cc: Use do proper init. + * bits/std_streambuf.h: Tweak. + * bits/std_iostream.h: Take out static member. + * std/iostream: Put here. + * bits/std_ostream.h: Non-default ctor shouldn't smash _M_streambuf. + * bits/std_istream.h: Ditto. + * bits/basic_ios.h: Format. + * bits/ostream.tcc(write): Fix. + * bits/fstream.tcc: Fix stdstreams ctor to do a proper + initialization of the fstream class. + * src/stdstreams.cc: I'm baaaaaaaack. + +1999-03-10 Benjamin Kosnik + + * bits/ios_base.h: Correct comments. Add ios_base::init() + functionality. Format, tweak, expunge, clean, bathe, and hang to dry. + * src/misc-inst.cc: Add instantiations here. + * src/ios.cc: Clean. + * bits/std_iostream.h: Add wrappers, global ios_base::Init object. + * src/stdstreams.cc: Delete this file, as now unnecessary. + * bits/fstream.tcc: Add missing initialization bits for ctor. + * src/Makefile.am (libstdc___la_SOURCES): Delete here as well. + * src/Makefile.in (libstdc___la_OBJECTS): And here. + + * bits/streambuf.tcc: Tweak. + * bits/sstream.tcc: Here too. + + * bits/fstream.tcc: And change definition as well. + * bits/std_fstream.h: Change ctor. + * src/basic_file.cc (sys_open): Add call that opens a specific fileno. + * bits/basic_file.h: Add declarations. + + * testsuite/27/27hello.cc: New file. + + * bits/std_ostream.h: Move flush() inline. + * bits/ostream.tcc: From here. + + * bits/char_traits.h: Add include of fpos.h for streamoff/streampos. + * bits/std_ios.h: Change include libio to only when necessary. + * bits/fpos.h: Like here. + * ios_base.h: And here. + + * bits/locfacets.h: Change _Iostate to _Ios_Iostate. + * bits/locfacets.tcc: Same. + * bits/std_locale.h: Include std_ios.h not std_iosfwd.h. + * bits/std_iosfwd.h: Move _Ios_Iostate to ios_base.h + +1999-03-09 Benjamin Kosnik + + * bits/basic_ios.h: Change _M_ctype to _M_fctype. + + * bits/std_streambuf.h: Clean, tweak. + * bits/std_fstream.h: Same. + * bits/std_sstream.h: Same. + * bits/streambuf.tcc: Move most member functions out-of-line. + * bits/fstream.tcc: Same. + * bits/streambuf.tcc: Same. + + * bits/basic_file.h(filepos_cur): Set correctly. + (filepos_beg): Same. + (seekpos): Change to __c_streampos. + * src/basic_file.cc (std): Change to __c_streampos. + + * testsuite/27/27filebuf.cc: Round one is finished. + * testsuite/27/27filebuf-2.tst: New file, final output should match. + * testsuite/27/27filebuf-3.tst: Same. + +1999-03-08 Benjamin Kosnik + + * bits/basic_file.h: Fix typo, add comments about what to expect + from the various member functions in __basic_file. + + * bits/std_fstream.h: Re-do sync/underflow to work + together. Change from sys_read to xsgetn and from sys_write to + xsputn. As it should have been from the beginning. . . + +1999-03-06 Benjamin Kosnik + + * bits/c++config.h (__GLIBCPP__): Add versioning macro. + + * bits/basic_file.h(file_beg): New function. + (file_cur): Ditto. + + * testsuite/27/27filebuf.cc: Test in, out, in | out. + * bits/std_fstream.h: More _M_mode refinements. + (synch): Add bits for out mode only. + * bits/std_streambuf.h(xsputn): Correct for filebufs. + * bits/std_sstream.h: Ditto. + +1999-03-03 Benjamin Kosnik + + * bits/std_fstream.h: Fix _M_mode AND with ios_base::openmode. + * testsuite/27/27filebuf.cc: Modify. + * bits/c++config.h: Fix. + +1999-03-02 Benjamin Kosnik + + * bits/c++config.h: New macro, _G_RESOLVE_LIB_DEFECTS, used to put + code in place that diverges from the final standard, but has been + brought up on the library mailing list. + + * bits/std_fstream.h(underflow): Position all three internal + buffer pointers at the same initial position. Re-implement with + basic_filebuf abstraction. + (overflow): Ditto. + (seekoff): Ditto. + (seekpos): Ditto. + * bits/std_sstream.h: Move _M_mode down into base class + basic_streambuf. + * bits/sstream.tcc: Ditto. + * bits/std_streambuf.h: Ditto. + + * testsuite/27/27filebuf.cc: Tweak. + +1999-02-27 Benjamin Kosnik + + * bits/std_sstream.h: Ditto. + * bits/std_fstream.h: Fix blip. + +1999-02-26 Benjamin Kosnik + + * C++STYLE: Add cases. + * bits/std_fstream.h: Format. + * bits/std_streambuf.h: Ditto. + * bits/std_sstream.h: Ditto. + + * src/basic_file.cc(sys_seek): Fix stack delirium, by keeping + return type for _IO_file_seek and __basic_file::seek the same size. + * bits/basic_file.h: Ditto. + +1999-02-26 Benjamin Kosnik + + * bits/fstream.tcc: Add include guards. + * src/misc-inst.cc: Add instantiations for shared libes. + * src/locale-inst.cc: Add instantiaions for use_facet. + * bits/loccore.h: Remove specialization foward decls for + use_facet: perhaps add the whole lot of them later on. + * bits/std_fstream.h: Fix. + * bits/locfacets.h: Ditto. + * src/stdstreams.cc: Disable wide streams for now. + + * src/Makefile.am (CXXFLAGS): Change up. + * src/Makefile.in (CXXFLAGS): Ditto. + +1999-02-25 Benjamin Kosnik + + * src/basic_file.cc: Change to ios_base::seekdir from int. + * bits/basic_file.h: Ditto. + * bits/locfacets.h : Fix blip with new guard macros. + +1999-02-25 Benjamin Kosnik + + * stl/bits/stl_config.h (__STL_USE_STD_ALLOCATORS): Minor tweaking. + * bits/c++config.h: Clean. Remove _G_NO_STREAMBUF_ITERATORS and + _G_USE_NAMESPACE. + * amm1/locale: Remove unused defines. + * generic/locale: Ditto. + * src/ios.cc: Ditto. + * src/locale.cc: Ditto. + * src/locale-inst.cc: Ditto. + * src/localename.cc: Ditto. + * src/stdstreams.cc: And here. + + * bits/c++config.h (_G_USE_WCHAR_T): Fix. + * bits/loccore.h: Simplify, clean, add wchar_t guards. + * bits/loccore.tcc: Ditto. + * bits/locfacets.h: Ditto. + * src/locale-inst.cc: Ditto. + * bits/locfacets.tcc: Add do_put long long here. + +1999-02-24 Benjamin Kosnik + + * bits/std_streambuf.h: Add cached ctype facet, _M_ctype. + * bits/basic_ios.h: Clean. Replace _M_strbuf with + _M_streambuf. Use cached _M_cvt in basic_streambuf. + * bits/std_istream.h: Replace _M_strbuf with _M_streambuf. + * bits/std_fstream.h: Tweak. + + * bits/char_traits.h: Remove fpos definitions from here. . . + * bits/fpos.h: New file, put them here. Eventually, this may allow + the severing of char_traits and fpos dependencies. + * src/Makefile.in: Add fpos.h. + * src/Makefile.am: Ditto. + * bits/std_string.h: Add fpos.h include here. + * bits/std_ios.h: And here. + + * bits/std_streambuf.h: Change _M_init to _M_initialized. + * bits/ios_base.h: Remove cstdio include. + * bits/std_ios.h: ... Place here. + +1999-02-23 Benjamin Kosnik + + * src/Makefile.in (CXXFLAGS): Re-add -fvtable-thunks. + * src/Makefile.am (CXXFLAGS): Re-add -fvtable-thunks. + + * bits/basic_file.h: Comment, adjust arguments. + * src/basic_file.cc: Ditto. + + * bits/std_fstream.h(seekoff): Error is of fpos type, not integral + type: check and convert accordingly. Re-interpet "resultant stream + position" to indicate external byte sequence location, not internal + buffer info. + +1999-02-22 Benjamin Kosnik + + * mkcshadow: And change copyright here. + * src/Makefile.am (CXXFLAGS): Add -g -O2. Add new header + dependencies for stl_pthread_alloc.h, pthread_allocimpl.h, + stl_thread.h, and stl_iterator_base.h. + * src/Makefile.in (CXXFLAGS): Ditto. + * stl/backward/pthread_alloc.h: Remove. + +1999-02-19 Benjamin Kosnik + + * bits/std_streambuf.h (sungetc): Use standard defs for putback + position. + * bits/std_fstream.h (pbackfail): Correct. + (sungetc): Test. + (seekoff): Implement. + (seekpos): Re-do. + * testsuite/27/27filebuf.cc: Add test cases. + +1999-02-18 Benjamin Kosnik + + * bits/std_fstream.h: Go with basic_file's interfaces for dealing + with the external buffers, and stop mucking around with setting + and re-setting the external buf's pointers. Aka, clarity and + simplicity rule the day. + * src/locale.cc: Use memcpy in codecvt::do_in and codecvt::do_out. + Remove partial result and support code. + +1999-02-18 Ulrich Drepper + + * configure.in: Add hypot, hypotf, atan2f, expf, and copysignf to + list of function which have to be replaced. + Remove expf from list of functions to test for. + Define USE_LONG_DOUBLE in case the libm has partial support for long + doubles. + * Makefile.in: Regenerated. + * config.h.in: Likewise. + * configure: Likewise. + * libio/Makefile.am (LIBIO_SRCS): Add missing backslash. + * libio/Makefile.in: Regenerated. + * src/Makefile.in: Regenerated. + * string/Makefile.in: Regenerated. + * math/Makefile.am (EXTRA_DIST): Add hypot.c, hypotf.c, hypotl.c, + atan2f.c, expf.c, and $(EXTRA_yes). + (EXTRA_yes): Add signbitl.c mycabsl.c. + (libmath_la_LIBADD): Add $(EXTRA_$(USE_LONG_DOUBLE)). + (libmath_la_SOURCES): remove long double versions. + * math/Makefile.in: Regnerated. + * math/atan2f.c: New file. + * math/copysignf.c: New file. + * math/expf.c: New file. + * math/hypot.c: New file. + * math/hypotf.c: New file. + * math/hypotl.c: New file. + * math/cargf.c: Use correct function and macro names. + * math/ccos.c: Likewise. + * math/ccosh.c: Likewise. + * math/ccoshf.c: Likewise. + * math/ccoshl.c: Likewise. + * math/cexp.c: Likewise. + * math/cexpf.c: Likewise. + * math/cexpl.c: Likewise. + * math/clog.c: Likewise. + * math/clog10.c: Likewise. + * math/clog10f.c: Likewise. + * math/clog10l.c: Likewise. + * math/clogf.c: Likewise. + * math/clogl.c: Likewise. + * math/copysignf.c: Likewise. + * math/csin.c: Likewise. + * math/csinf.c: Likewise. + * math/csinh.c: Likewise. + * math/csinhf.c: Likewise. + * math/csinhl.c: Likewise. + * math/csinl.c: Likewise. + * math/csqrt.c: Likewise. + * math/csqrtf.c: Likewise. + * math/csqrtl.c: Likewise. + * math/ctan.c: Likewise. + * math/ctanf.c: Likewise. + * math/ctanh.c: Likewise. + * math/ctanhf.c: Likewise. + * math/ctanhl.c: Likewise. + * math/ctanl.c: Likewise. + +1999-02-17 Benjamin Kosnik + + * testsuite/27/27filebuf.cc: Add cases. + * testsuite/27/27filebuf-1.txt: Remove inadvertent garbage. + * bits/std_streambuf.h: Simplify, always have one return statement. + * bits/std_fstream.h: Tweak comments in underflow. + +1999-02-17 Ulrich Drepper + + * ltmain.sh: Update from libtool 1.2d and fix Solaris problems. + * ltconfig: Likewise. + +1999-02-16 Christophe Pierret + + * src/locale.cc: Fix assert. + +1999-02-16 Benjamin Kosnik + + FIXME: Still need some kind of solution for undefined math symbols. + * src/Makefile.in (locale-inst.lo): Compile with + -fimplicit-templates to fix Solaris link problem. + * src/Makefile.am: Ditto. + * libio/Makefile.in: Add stdfiles.c so that _IO_list_all is defined. + * libio/Makefile.am: Ditto. + * src/locale.cc: Provide some kind of def for _S_tolower. + * bits/locfacets.h: Fix declarations of ctype to + match ctype for _S_tolower, _S_toupper, _S_table. + +1999-02-10 Benjamin Kosnik + + * bits/loccore.tcc: Move member-template ctor inline... + * bits/loccore.h: ...here. + * src/locale-inst.cc: Add instantiation here. + + * testsuite/27/27stringstream.cc: Tweak. + + * bits/ostream.tcc: Include sbuf_iter.h. + + * bits/ostream.tcc: Convert *this to ostreambuf_iterator before + passing to num_put, as num_put's first argument is an interator, + not basic_ostream. + + * testsuite/make_check_libfree++: New file, runs through the + existing test files in the testsuite directory and makes sure + they link. + +1999-02-10 Brendan Kehoe + + * testsuite/21/21compare.cc: Fix typo. + * src/locale.cc (ctype::_S_{toupper,tolower,table}): + Don't try to provide non-linux versions, since it's impossible to + initialize their const references with the integer 0, no matter + how we try to cast it. + +1999-02-10 Benjamin Kosnik + + * bits/std_locale.h: Move std_vector.h dependency. + * bits/std_ios.h: ...from here. + * bits/std_string.h: ...and here. + * src/locale.cc: ..to here. + * bits/loccore.h: Ditto, add vector forward declaration, + make locale::_Impl data members pointers not containers. + * bits/loccore.tcc: Move out-of-line for now. + * bits/locfacets.h: Move vector dependency from here... + * bits/locfacets.tcc: ...to here. + * src/localename.cc: ..and here. + * src/locale-inst.cc: Add include of locfacets.tcc here. + + * stl/bits/stl_string_fwd.h: Make __get_c_string non-static. + * bits/basic_string.h: Can't use sizeof on an incomplete type. + * bits/string.tcc: Tweak. + * src/string.cc: And add __get_c_string def here. + + * bits/std_fstream.h: Yeah, comment the fill_n idea out as impractical. + + * src/stlinst.cc: Add include of stl_config.h. + +1999-02-09 Benjamin Kosnik + + * stl/bits/std_bitset.h: Update to SGI STL 3.12. + * stl/bits/stl_config.h: Tweak, update. + * stl/bits/std_stdexcept.h: Ditto, change stl_exception to + std_exception. + * stl/bits/std_memory.h: Reconstructed auto_ptr, Ditto. + * stl/bits/std_functional.h: Ditto. + + * stl/bits/stl_string.h: New file, SGI's string + implementation. For reference only, corresponding to string in + 3.12 source. + * stl/bits/stl_char_traits.h: As above. + + * stl/bits/pthread_allocimpl.h: New file corresponding to + pthread_alloc. + * stl/bits/stl_pthread_alloc.h: New file corresponding to + pthread_alloc.h + * stl/bits/stl_threads.h: New file. + + Note that SGI STL 3.12's file iterator.h is not used. + * stl/bits/std_iterator.h: Ditto. + * stl/bits/stl_iterator.h: Drop in replace. + * stl/bits/stl_iterator_base.h: New file, drop in replace. + + * stl/bits/stl_queue.h, stl_rope.h, stl_set.h, stl_stack.h, + stl_string_fwd.h, stl_tempbuf.h, stl_tree.h, stl_vector.h, + stl_pair.h, stl_multimap.h, stl_multiset.h, stl_list.h, + stl_hashtable.h, stl_hash_set.h, stl_hash_map.h, stl_function.h, + stl_deque.h, stl_alloc.h, stl_algo.h, stl_algobase.h, ropeimpl.h: + Drop-in replace (ie, stop changing __SGI_STL_* to _CPP_BITS_* for + preprocessor guards, but fixup include paths and names according + to new directory layout). + +1999-02-05 Benjamin Kosnik + + * bits/std_fstream.h: Remove _M_open data member. + * bits/fstream.tcc: Ditto. + + * src/locale.cc: Tweak. + + * bits/std_sstream.h: Simplify. + + * bits/std_streambuf.h: Simplify. + (sputc): Use correct definition of "write area." + + * bits/std_fstream.h: Fix uflow. + * src/basic_file.cc: Tweak. + * testsuite/27/27filebuf.cc: Add tests. + * testsuite/27/27filebuf-3.txt: Rename to *-2.txt. + +1999-02-02 Ryszard Kabatek + + * bits/ios_base.h: Make protected. + +1999-02-01 Ryszard Kabatek + + * bits/ios_base.h: Changes in the class ios_base: + Rename _M_exceptions member to _M_exceptions_data. + Make the member functions rdstate(), clear(), exceptions() + and exceptions(iostate) protected and add the "_M_" prefix. + * src/ios.cc: Ditto. + * bits/basic_ios.h: Adapt the changes from ios_base. + +1999-01-29 Benjamin Kosnik + + * bits/std_fstream.h: Remove _M_flags, _M_equilibrate as unnecessary. + * bits/fstream.tcc: Ditto. + + * bits/std_fstream.h (underflow): Resize deallocates memory and + resets pointers in the internal cache according to new _M_buf. . dooh! + * src/locale.cc: Mas changes with codecvt::do_in, do_out. + +1999-01-29 Ryszard Kabatek + + * stl/bits/std_memory.h: Modify auto_ptr::reset to reflect the + standard. + +1999-01-28 Benjamin Kosnik + + * src/locale.cc (codecvt::do_in): Finer-grained tuning to take + into account partial returns. + (codecvt::do_out): Likewise. + + * bits/char_traits.h: Change streamsize to be a signed type, as + required by 27.4.1 Types p 2. (Changing to _IO_ssize_t.) + * bits/std_streambuf.h: Make + in_avail() and showmanyc() have streamsize as return types, so + that showmanyc()'s return of eof won't underflow in_avail's return + value and give a bogus result. + * src/misc-inst.cc: And more changes. . . + + * bits/std_streambuf.h (basic_streambuf): Add _M_buf_unified to keep + track of joint in/out pointers into the internal buffer. + (sbumpc): Add check for _M_buf_unified. + (sputbackc): Ditto. + (sungetc): Ditto. + + * testsuite/27/27filebuf.cc: Add cases. + * testsuite/27/27stringbuf.cc: Add showmanyc case. + + * bits/std_fstream.h (close): Fix logic error. + (open): Initialize internal pointers based on _M_buf and _M_buf_size. + (showmanyc): Add underflow component, to match the standard. + + * bits/fstream.tcc: Ditto. + +1999-01-27 Benjamin Kosnik + + * bits/basic_file.h: Match vtables w/ _IO_FILE_plus. + * src/basic_file.cc: Ditto. + * src/Makefile.in: Add -fvtable-thunks to CXXFLAGS: preferred + format for dealing with _IO_file in libio. + +1999-01-27 Ulrich Drepper + + * src/basic_file.cc: Include fcntl.h. + +1999-01-27 Benjamin Kosnik + + * libio/Makefile.in: Add fileops.lo, genops.lo to objects to debug + libio calls. + * bits/std_streambuf.h: Redefine read posion. + + * bits/std_fstream.h: Temporary hack to get vtables working again. + * bits/basic_file.h: Revert. + * src/basic_file.cc: Ditto. + * testsuite/27/27filebuf.cc: Tweak. + +1999-01-26 Benjamin Kosnik + + * bits/basic_file.h: Add showmanyc, underflow. . + * src/basic_file.cc: Ditto. + + * bits/std_fstream.h (showmanyc): Add bits to ping libio to see if more + chars can be read. + + * testsuite/27/27filebuf.cc: Add testcases. + * src/basic_file.cc: Add O_CREAT to open calls with + ios_base::trunc as part of the open mode. + +1999-01-26 Ryszard Kabatek + + * bits/basic_ios.h: fix basic_ios::exceptions(iostate) + +1999-01-25 Benjamin Kosnik + + * src/ios.cc (clear): Correct typo. + * bits/ios_base.h: Tweak spacing. + +1999-01-25 Ryszard Kabatek + + * bits/basic_ios.h: fix basic_ios::fail() + +1999-01-25 Benjamin Kosnik + + * bits/basic_file.h: Include libioP.h from libio instead of here. + * bits/iolibio.h: Remove. + * bits/libio.h: Remove. + +1999-01-22 Benjamin Kosnik + + * bits/std_fstream.h: Tweak cvt-> in call for newer egcs compilers. + +1999-01-22 Ulrich Drepper + + * Makefile.am (SUBDIRS): Add libio. + * configure.in: Add rule to test for glibc2. + + * src/Makefile.am (INCLUDES): Add -I to libio subdir. + (libstdc___la_LIBADD): Add libio.la. + +1999-01-21 Benjamin Kosnik + + * bits/basic_file.h: Make new abstraction for underlying C library + FILE, named __basic_file. + * src/basic_file.cc: New file. + * bits/os_raw.h: Delete. + * src/os_raw.cc: Delete. + * src/Makefile.in: Tweak. + * src/Makefile.am: Tweak. + * bits/iolibio.h: Add this here, for the time being. + * bits/libioP.h: Ditto. + + * bits/ios_base.h: Delete unused defines. + * src/locale.cc (codecvt::do_in): Use + strcpy to copy between the two buffers. + + * testsuite/27/27stringbuf.cc: Change license, fix in_avail tests. + * testsuite/27/27filebuf.cc: New file. + * testsuite/27/27filebuf-1.txt: Data file for above test. + * testsuite/27/27filebuf-2.txt: Ditto. + + * bits/std_streambuf.h (uflow): Re-implement default. + * bits/std_fstream.h: Set _M_buf_size based on cstdio's BUFSIZ. + Re-implement virtual functions. + * bits/fstream.tcc: Delete unused mf's. + +1998-12-31 Benjamin Kosnik + + * bits/fstream.tcc: Add fstream ctor for cin/cout/etc. + * bits/std_fstream.h: Ditto. + * src/stdstreams.cc: Ditto. + + * math/cpowl.c: Fix header typo with last change. + +1998-12-31 Benjamin Kosnik + + * COPYING: New file (GPL v 2). + * LICENSE.STD: Remove. + * ./*: Change license. + +1998-12-30 Benjamin Kosnik + + * bits/std_streambuf.h (std): Remove static on _M_init. + * bits/streambuf.tcc (std): Ditto. + + * bits/std_fstream.h: Add changes as discussed with Nathan, including + state_type and codecvt_type members, the allocation of an internal + buffer, the streamlined codecvt calls, etc. + +1998-12-21 Benjamin Kosnik + + * bits/std_sstream.h: Tweak. + * bits/fstream.tcc: Remove unused stubs. + * bits/std_fstream.h: Tweak. + +1998-12-17 Benjamin Kosnik + + * bits/std_streambuf.h: Move _IO_file_flags into basic_filebuf. + Remove unused _IO_* members, possibly put into filebuf, which may + need them. + * bits/std_fstream.h: Add _M_flag. + * bits/sbuf_iter.h: Tweak. + + * bits/std_cstdio.h: Add SEEK_SET, SEEK_END, SEEK_CUR. + * bits/ios_base.h: Use. + + * src/stdstreams.cc: Modify to reflect standard ctors for + filebuf. + * src/misc-inst.cc: Ditto. + + * bits/os_raw.h: Wrap in std namespace. Model parameters on + underlying C library calls instead of the underlying unix + filesystem. + * src/os_raw.cc (_S_os_open): Use fopen, and compute a mode + string as per p.659. + (_S_os_close): Model on fopen. + (_S_os_read): Model on fread. + (_S_os_write): Model on fwrite. + (_S_os_seek): Model on fseek. + + * bits/ios_base.h: Tweak. + * bits/std_iosfwd.h: Wrap libio.h include with extern "C". + * bits/std_sstream.h: Tweak. + * bits/sstream.tcc: Remove old, uncalled code. + * bits/std_fstream.h: Major reconstruction. + * bits/fstream.tcc: Disable for the time being. + +1998-12-11 Benjamin Kosnik + + * bits/basic_string.h: Fix insert method. + * stl/bits/stl_iterator.h: Remove previous hack. + * bits/std_streambuf.h (sbumpc): Correct increment/return oddness. + * bits/std_sstream.h: Fix more regressions. + * testsuite/27/27stringbuf.C: Add (almost) complete tests. + +1998-12-09 Benjamin Kosnik + + * bits/basic_string.h: Tweak. + + * stl/bits/stl_iterator.h: Specialize iterator_traits for int so + that string::append can be instantiated. HACK--checkin + basic_string::iterator class. + +1998-12-07 Benjamin Kosnik + + * bits/std_sstream.h: Tweak. + * bits/sstream.tcc: Tweak ctors. + + FIXME invalid friend defs. . WHERE ARE THEY?? + + * bits/sbuf_iter.h (istreambuf_iterator::equal): Change to new + names for basic_streambuf data members. + + * bits/std_streambuf.h: Add getloc() initialization bits. + basic_streambuf(): Initialize with global locale data. + imbue(): Set _M_init. + + * bits/std_streambuf.h(seekoff, seekpos): Complete with invalid + stream pos == pos_type(off_type(-1)). + in_avail(): Complete default implementation. + snextc, sbumpc, sputbackc, sungetc, sputc, setg, xsputn, + underflow, uflow, xsgetn, showmany, sync: Ditto. + + * bits/std_streambuf.h: _M_snextc_helper(): Remove. + + * bits/streambuf.tcc (sputbackc): Temporarily remove, need to + re-populate with in-line member functions that are too big. Add + initialization for _M_init. + +1998-12-03 Benjamin Kosnik + + * bits/sstream.tcc: Convert _Allocator to _Alloc. Add typedefs + for basic_string and basic_streambuf. Scope _IO_buf_* pointers to + streambuf_type. + + * src/stdstreams.cc (std): Disable wchar_t instantiations. + + * bits/c++config.h (_G_DEPRICATED): Add. + (_G_USE_WCHAR_T): Add. + * bits/std_streambuf.h: Radical reconstruction of basic_streambuf. + Take out _Streambuf_base. Put _IO_FILE data member in basic_filebuf. + * bits/streambuf.tcc (sputbackc): Remove ctor anti-def, Tweak. + * bits/std_fstream.h: Add comment for implementation. + * src/streambuf.cc: Remove. + * src/Makefile.in: Remove streambuf.lo. + * src/misc-inst.cc: Tweak. + +1998-12-02 Benjamin Kosnik + + * bits/std_sstream.h: Add const_cast to rdbuf returns. + * testsuite/27stringstream.C: Modify. + +1998-11-25 Benjamin Kosnik + + * src/Makefile.in (libstdc___la_OBJECTS): Add streambuf.lo. + (libstdc___la_SOURCES): Ditto. + + * bits/streambuf.tcc: Tweak. + + * src/streambuf.cc: New file, add out-of-line definitions for + _Streambuf_base. + + * src/misc-inst.cc: Remove _Streambuf_base instantiations. + Comment out wchar_t versions of the buffer instantiations, for now. + + * bits/std_streambuf.h: Wrap libio.h include with extern "C". + Remove template wrapper around _Streambuf_base. + Move IO_* data members into _Streambuf_base. + Move _Streambuf_base members into streambuf.tcc. + + * bits/c++config.h (_G_USE_LIBIO): Enable. + +1998-11-02 Nathan Myers + + * CHECKLIST: downgrade iterator implementations + * DESIGN: fill out notes about unimplemented features + +1998-10-31 Nathan Myers + + * CHECKLIST: itemized list of all interfaces, and status of each. + +1998-10-30 Nathan Myers + + * RELEASE-NOTES: add notes about optional includes, linking, running + * src/Makefile.am: handle header installs properly + * src/Makefile.in: regenerate from new src/Makefile.am + +1998-10-30 Benjamin Kosnik + + * bits/basic_string.h: Revert npos pending ciso646. + * src/Makefile.am: Revert CXX flags for now. + * src/Makefile.in: Ditto. + +1998-10-30 Brendan Kehoe + + * bits/std_sstream.h: Re-order ctors to put base before member + inits. + +1998-10-30 Ryszard Kabatek + + * stl/bits/std_memory.h: Fix typo. + +1998-10-30 Nathan Myers + + * src/string[A-Z]+.cc: change back to include "string.cc". + * src/Makefile.am: revert filename changes. We need a different + way to keep filenames in std/ from confusing Make. + * bits/basic_string.h: define _S_max_size right, return it from + string::max_size(); churn definition of npos again. + * bits/string.tcc: fix _S_frob_size to avoid uint overflow. + * bits/ios.cc: remove #ifdef on ios_base locale member initialization + * BUGS: clear cruft. + * C++STYLE: Touchup for release. + * CHECKLIST: Touchup for release. + * DESIGN: New file. + * LICENSE.STD: Add requirement to retain copyrights and to provide + the license with any copies. + * README: Update for release. + * TODO: Minor touchup for release. + * RELEASE-NOTES: prepare for release + +1998-10-29 Ulrich Drepper + + * src/string[A-Z]+.cc: Include stdstring.cc, not string.cc. + + * src/Makefile.am (CXXFLAGS): Define _GNU_SOURCE. + + * src/Makefile.am (CXXLINK): New variable. Make sure we don't use + CXX to generate the shared object. + + * src/Makefile.am (headers): Remove duplicated char_traits.h. + +1998-10-29 Brendan Kehoe + + * bits/basic_string.h (basic_string<>::max_size): Subtract 1, not + 2, from npos, solving infinite loop problems. + +1998-10-29 18:41 Ulrich Drepper + + * src/Makefile.am: Add rules to install headers. + +1998-10-29 Nathan Myers + + * bits/std_ostream.h: Remove #ifdef on operator<< for long double + * bits/ostream.tcc: Remove #ifdef on operator<< for long double + * shadow/libio.h: + * shadow/unistd.h: + * shadow/bits/wrap_libio.h: + * shadow/bits/wrap_unistd.h: New files. + +1998-10-29 Brendan Kehoe + + * bits/ostream.tcc (operator<<): Wrap with #ifdef + _G_HAVE_LONG_DOUBLE_IO, to match bits/std_ostream.h. + +1998-10-29 Ulrich Drepper + + * src/Makefile.am: Add temporarily rules to make sure misc-inst.cc + is not compiled with -fno-implicit-templates in effect. + + * src/Makefile.am (EXTRA_SOURCES): Add string.cc and wstring.cc here. + (libstdc___la_SOURCES): Add all the string*.cc and wstring*.cc files. + * src/stringADDCS.cc: Wrapper around string.cc to define individual + function. + * src/stringADDPS.cc: Likewise. + * src/stringADDSC.cc: Likewise. + * src/stringADDSP.cc: Likewise. + * src/stringADDSS.cc: Likewise. + * src/stringBIST.cc: Likewise. + * src/stringBOST.cc: Likewise. + * src/stringCHTR.cc: Likewise. + * src/stringEQPS.cc: Likewise. + * src/stringEQSP.cc: Likewise. + * src/stringEQSS.cc: Likewise. + * src/stringEXTRA.cc: Likewise. + * src/stringGEPS.cc: Likewise. + * src/stringGESP.cc: Likewise. + * src/stringGESS.cc: Likewise. + * src/stringGETLI.cc: Likewise. + * src/stringGTPS.cc: Likewise. + * src/stringGTSP.cc: Likewise. + * src/stringGTSS.cc: Likewise. + * src/stringINSER.cc: Likewise. + * src/stringLEPS.cc: Likewise. + * src/stringLESP.cc: Likewise. + * src/stringLESS.cc: Likewise. + * src/stringLTPS.cc: Likewise. + * src/stringLTSP.cc: Likewise. + * src/stringLTSS.cc: Likewise. + * src/stringMAIN.cc: Likewise. + * src/stringNEPS.cc: Likewise. + * src/stringNESP.cc: Likewise. + * src/stringNESS.cc: Likewise. + * src/stringSCOPY.cc: Likewise. + * src/wstringADDCS.cc: Wrapper around wstring.cc to define individual + functions. + * src/wstringADDPS.cc: Likewise. + * src/wstringADDSC.cc: Likewise. + * src/wstringADDSP.cc: Likewise. + * src/wstringADDSS.cc: Likewise. + * src/wstringBIST.cc: Likewise. + * src/wstringBOST.cc: Likewise. + * src/wstringCHTR.cc: Likewise. + * src/wstringEQPS.cc: Likewise. + * src/wstringEQSP.cc: Likewise. + * src/wstringEQSS.cc: Likewise. + * src/wstringEXTRA.cc: Likewise. + * src/wstringGEPS.cc: Likewise. + * src/wstringGESP.cc: Likewise. + * src/wstringGESS.cc: Likewise. + * src/wstringGETLI.cc: Likewise. + * src/wstringGTPS.cc: Likewise. + * src/wstringGTSP.cc: Likewise. + * src/wstringGTSS.cc: Likewise. + * src/wstringINSER.cc: Likewise. + * src/wstringLEPS.cc: Likewise. + * src/wstringLESP.cc: Likewise. + * src/wstringLESS.cc: Likewise. + * src/wstringLTPS.cc: Likewise. + * src/wstringLTSP.cc: Likewise. + * src/wstringLTSS.cc: Likewise. + * src/wstringMAIN.cc: Likewise. + * src/wstringNEPS.cc: Likewise. + * src/wstringNESP.cc: Likewise. + * src/wstringNESS.cc: Likewise. + * src/wstringSCOPY.cc: Likewise. + * src/string.cc: Remove now unneeded #defines now. + +1998-10-29 Nathan Myers + + * bits/locfacets.tcc: Define num_put::put(... const void*), improve + integer formatting. + * bits/ostream.tcc: Delete cruft, rewrite various op<< as members, + add definitions for double, long double, const void*. + * bits/std_ostream.h: Move op<<'s back into class ostream, + define some in-line. + * bits/string.tcc: fix unnecessary-copying bug in op[], typos in + string construction from input iterators that Brendan reported. + + +1998-10-28 Brendan Kehoe + + * stl/bits/stl_pair.h (op!=, op>, p<=, op>=): Add missing definitions. + + * bits/valarray_meta.h (class _Constant): Move declaration to the + top, so the rest of the file can grok it. + (_ApplyBinaryFunction::operator[]): Add missing parenthesis. + + * bits/std_sstream.h (basic_ostringstream::str): Fix typo of extra + semicolon. + (basic_stringstream::str, both instances): Likewise. + +1998-10-28 Nathan Myers + + * bits/locfacets.h: fix num_put<>::falsename() + * bits/locfacets.tcc: fix _Format_cache<>::_M_populate bool name init + * testsuite/27/27octfmt.C, testsuite/27/27octfmt.C: new tests + * bits/locfacets.tcc: touch up _S_group_digits. + * src/misc-inst.cc: adjust _S_group_digits insts to match. + +1998-10-27 Nathan Myers + + * stl/bits/stl_config.h: Turn off long long support, for now. + * src/locale-inst.cc: Instantiate num_put<> only for + ostreambuf_iterator, num_get only for istreambuf_iterator. + * src/misc-inst.cc: Delete duplicate locale-related instantiations, + add lots of new instantiations for num_put support function templates; + remove junk about __match_parallel for ostreambuf_iterator. + +1998-10-27 Nathan Myers + + * bits/locfacets.tcc: Make num_put's digit grouping work. + * bits/string.tcc: More uglification. + * src/ios.cc: initialize format cache right + +1998-10-26 Nathan Myers + + * bits/basic_string.h: Uglify more names. + * bits/fstream.tcc: Rewrite some filebut output handling. + * bits/ios_base.h: Cosmetic. + * bits/locfacets.h: Changes to _Format_cache for support of num_put. + Also, specialize its default ctor for optimal default case. + #ifdef out "long long" prototypes for now. + * bits/locfacets.tcc: Do complete, optimized num_put<>::do_put + implementation for integer types. (Still needs optimized + std::copy() applied to ostreambuf_iterator to be optimal.) + * bits/ostream.tcc: Write operator<< for long, bool types. + Make other operators<< non-members, per spec. (Many still + not implemented.) Identify those that fail to create a sentry. + * bits/sbuf_iter: Cosmetic. + * bits/std_fstream.h: Add some filebuf members. + * bits/std_locale.h: Include for use in bits/locfacets.h + * bits/std_ostream.h: Make member operators<< global, per spec. + (Should do the same in std_istream.h.) + * bits/std_string.h: Include for use in bits/locfacets.h + * bits/string.tcc: Uglify names + * shadow/bits/std_cstdlib.h: Optimize std::div and std::ldiv. + * src/ios.cc: Specialize _Format_cache<> for char and wchar_t, + for optimal default behavior. + +1998-10-26 Benjamin Kosnik + + * src/Makefile.in (libstdc___la_SOURCES): Add misc-inst.cc again. + +1998-10-21 Nathan Myers + + * src/locale.cc: make ctype operations actually work for glibc + * CHECKLIST: add a comprehensive (i.e. huge) implementation + checklist of stdlib facilities. Not filled in yet. + +1998-10-20 Nathan Myers + + * bits/string.tcc: fix patching NULs on string ends. + +1998-10-19 Nathan Myers + + * bits/std_iosfwd.h: eliminate "basic_" prefix on streambuf + iterator forward declarations + * bits/sbuf_iter.h: eliminate default template argument definitions + on streambuf iterators (rely on decls). + * TODO: add note about lazy facet construction + * bits/basic_ios.h: hit operator void* again. This should be the + last time we need to touch it. + * bits/basic_ios.h: copyfmt now returns *this. + * bits/basic_string.h: fix npos again. npos cannot be defined as zero. + * bits/basic_string.h: put back overloaded constructors; adjust + behavior for default allocator on copy constructor. + * bits/char_traits.h: make not_eof return correct type. + * bits/loccore.h: remove call to bits/std_stdexcept.h; subincludes + cannot be in non-standard headers or we get include loops (bad) + * bits/loccore.h: delete ifdef'd out workarounds for old compiler bugs. + * bits/loccore.h: add apparatus to support lazy construction of + facets. + * bits/locfacets.tcc: Uglify names in __match_parallel decl. + * bits/std_ios.h: add include of to get bad_cast for + locale use_facet<> failure. + * bits/std_locale.h: same. + * bits/std_string.h: same. + * bits/std_stdexcept.h: change exception member __msg from a + reference to a regular object. + * bits/string.tcc: add pasting a NUL on the end of strings after + each operation. We had already left room for it, but previously + plugged it only on a call to c_str(), but the WG changed the + requirement when I wasn't looking. (Can't leave them alone for + a second without they break something else.) + * bits/valarray_meta.h: add Gaby's changes from 981018. + * src/locale.cc: add new type _Bad_use_facet to be thrown on + failure of use_facet<>(). + * src/stdexcept.cc: remove pragma, remove bkoz's #if 0, + comment out leftover member definitions + +1998-10-16 Ulrich Drepper + + * string/Makefile.am: Revert last change. + * math/Makefile.am: Likewise. + +1998-10-15 Benjamin Kosnik + + * bits/std_sstream.h: Fix typo. + +1998-10-15 Benjamin Kosnik + + * src/Makefile.am (libstdc___la_SOURCES): Add misc-inst.cc. + + * bits/std_sstream.h: Add typedefs, member definitions. Clean. + * bits/std_stdexcept.h: Remove. + +1998-10-15 Benjamin Kosnik + + * src/misc-inst.cc: Tweak again. + + * bits/std_sstream.h: Move out-of-line definitions to sstream.tcc. + * bits/sstream.tcc: New file. + +1998-10-15 Ulrich Drepper + + * configure.in: Test for machine/param.h, sys/machine.h and fp.h. + Don't run AC_C_BIGENDIAN if machine/param.h or sys/machine.h are + available. + + * math/mathconf.h: Include sys/machine.h, machine/param.h and fp.h + if available. + (INFINITE_P): Use IS_INF macro if available. + +1998-10-15 Ulrich Drepper + + * math/Makefile.am (EXTRA_LTLIBRARIES): Renamed from + noinst_LTLIBRARIES. + * string/Makefile.am: Likewise. + +1998-10-15 Ulrich Drepper + + * configure.in (AC_CHECK_FUNCS): Add finite, qfinite, fpclass, and + qfpclass. + (AC_CHECK_HEADERS): Add machine/endian.h. If no header specifying + endianess is available run AC_C_BIGENDIAN. + + * math/clog10l.c: Add ugly hack around bug in Irix 6.2 header until + fixincludes is fixed. + * math/clogl.c: Likewise. + * math/csqrtl.c: Likewise. + * math/mycabsl.c: Likewise. + + * math/mathconf.h: Include machine/endian.h if possible. If no + header describing endianess is available rely on WORDS_BIGENDIAN + macro. + (FINITE_P, FINITEF_P, FINITEL_P): Use finite functino if available. + (INFINITE_P, INFINITEF_P, INFINITEL_P): Use fpclass function if + available. + + * src/complex.cc (polar): Don't use sincos on OSF machines. + +1998-10-09 Benjamin Kosnik + + * src/locale-inst.cc: Don't instantiate time_get for + ostreambuf_iterators as time_get::do_get_weekday and + time_get::do_get_monthname use __match_parallel, which is illegal + for ostreambuf_iterators to use, as they don't have operator== or + operator!=. + * bits/std_stdexcept.h: Add dtor definitions. + Use stl/bits/std_stdexcept.h instead of this file? + * bits/sbuf_iter.h : Tweak. + * src/misc-inst.cc: Tweak. + +1998-10-09 Benjamin Kosnik + + * bits/std_stdexcept.h: New file. + * src/stdexcept.cc: Define the following: + logic_error::what() + runtime_error::what() + + * src/misc-inst.cc: New file. + * src/Makefile.in (libstdc___la_SOURCES): Add misc-inst.cc. + (libstdc___la_OBJECTS): Add misc-inst.lo. + + * bits/basic_string.h: Disable non-standard ctor declarations. + * bits/string.tcc: Disable definitions as well. + * src/string.cc: Disable dependencies. + * bits/sbuf_iter.h (std): Add default to template parameter for + ostreambuf_iterator and istreambuf_iterator. + * bits/std_iosfwd.h: Change istreambuf_iterator to + basic_istreambuf_iterator. Likewise for ostreambuf. + * bits/locfacets.tcc (__match_parallel): Fix typo. + * src/ios.cc (imbue): Remove the _G_HAVE_LOCALE guards around + ios_base::imbue. + * bits/std_streambuf.h: Define _Streambuf_base::getloc(). + * bits/std_istream.h: Define the following: + get (basic_streambuf& __sb, char_type __delim) + get (char_type* __s, streamsize __n, char_type __delim); + getline (char_type* __s, streamsize __n, char_type __delim) + * bits/loccore.h : FIXME friend template code for use_facet. + Add std_stdexcept.h include so that range_error will be defined. + Add explicit conversion to string for range_error throws. (HACK?) + +1998-10-8 Ulrich Drepper + + * configure.in: Check for sincos, sincosf, and sincosl. + * src/complex.cc (polar): Use sincos if available. + + * bits/c++config.h: Fix hack to get LONG_LONG* definitions on Linux. + * stl/bits/std_limits.h: Include bits/c++config.h. HACK!!! + + * math/clog10.c: Fix typo (FP_INIFITE_P -> INFINITE_P). + + * math/cpow.c: Use c_log, not clog. + * math/cpowf.c: Likewise. + * math/cpowl.c: Likewise. + + * math/cexp.c: Remove unused fpclassify calls. Use FINITE_P instead + of isfinite call. + + * math/mathconf.h (FINITE_P, FINITEF_P, FINITEL_P): Define using + isfinite macro if it is available. + (INFINITE_P, INFINITEF_P, INFINITEL_P): Define using isinf macro. + + * math/ccosf.c: Use appropriate test macros for this type. + * math/ccoshf.c: Likewise. + * math/ccoshl.c: Likewise. + * math/ccosl.c: Likewise. + * math/cexpf.c: Likewise. + * math/cexpl.c: Likewise. + * math/clog10f.c: Likewise. + * math/clog10l.c: Likewise. + * math/clogf.c: Likewise. + * math/clogl.c: Likewise. + * math/csinf.c: Likewise. + * math/csinhf.c: Likewise. + * math/csinhl.c: Likewise. + * math/csinl.c: Likewise. + * math/csqrtf.c: Likewise. + * math/csqrtl.c: Likewise. + * math/ctanf.c: Likewise. + * math/ctanhf.c: Likewise. + * math/ctanhl.c: Likewise. + * math/ctanl.c: Likewise. + +1998-10-06 Benjamin Kosnik + + * bits/basic_ios.h: Fix previous change. + +1998-10-06 Benjamin Kosnik + + * bits/basic_ios.h: Add const_cast + (operator void*): As per 5.2.9 p 2, make sure static_cast is + well-formed. + * bits/char_traits.h: No _CharT for specialization, change to 0. + * bits/basic_string.h: As per 9.4.2 p4, initialize with + constant-initializer. + * bits/locfacets.tcc: Add template parameter to initialization list. + +1998-10-02 Benjamin Kosnik + + * bits/basic_string.h: Should just be <, not <=. + +1998-10-01 Benjamin Kosnik + + * bits/string.tcc (compare): Fix for strings that are similar, but + not the same length. + +1998-09-04 Brendan Kehoe + + * bits/c++config.h: For __linux__, define _GNU_SOURCE. This is + required for us to get LONG_LONG_{MIN,MAX} out of gcc's limits.h. + We can't check for __GLIBC__ here, since this header can be read + before any system one (that would lead to features.h) being used. + + * stl/bits/stl_config.h (__STL_LONG_LONG): Re-enabled + + * stl/bits/std_limits.h [__STL_LONG_LONG]: Fix usage to use + LONG_LONG_MIN, LONG_LONG_MAX, and ULONG_LONG_MAX. + + * stl/bits/stl_config.h: Don't do __STL_LONG_LONG, it uses + LONGLONG_{MIN,MAX} which I can't find the origin of. + +1998-09-03 Brendan Kehoe + + * stl/bits/stl_iterator.h: Add extern decl of cin for now; where + should this come from, if not iostream.h? + (class istream_iterator): Make the new operator!= a friend also. + + * stl/bits/stl_config.h: Define __STL_HAS_WCHAR_T, + __STL_MEMBER_TEMPLATE_CLASSES, and __STL_LONG_LONG. Don't include + _G_config.h like the egcs one does. + +1998-09-01 Brendan Kehoe + + * bits/string.tcc: Call `_M_destroy' instead of `destroy'. + + * bits/valarray_meta.h: Throughout, rename _Expr typedefs to be + _Expr1 (or _Expr_def if it's taken), and change definitions. + Avoids redecl of the template parm. + + * bits/string.tcc (basic_string copy ctor): Fix typo in declaration. + (operator>>): Initialize __ERROR with ios_base::goodbit, not 0. + + * bits/std_streambuf.h (_POSIX_SOURCE): Only define if it's not + already done. + + * src/locale-inst.cc: New file, **TOTAL HACK**. There has GOT to + be a better way to do this. + + * src/stlinst.cc: New file. + + * BUGS: New file, with various discovered bugs that need to be + fixed. + + * Makefile.in, math/Makefile.in, string/Makefile.in, + src/Makefile.in: Reran automake. + + Workarounds, these may not all be the final fixes: + + * bits/basic_ios.h (class basic_ios): Make _M_strbuf be protected, + not private, for basic_istream::get() in std_istream.h to be able + to use it. + (basic_ios::operator void*): Don't use static_cast for the false + case. + (basic_ios::copyfmt): Fix `rhs.except' to be `rhs.exceptions ()'. + This appears to have been in sep94, but didn't get corrected + afterwards. + + * bits/basic_string.h (npos): Don't init here. + * bits/string.tcc: Instead, do initialization here, to -1 instead + of the size_type destructor. + + * src/traits.cc, src/wtraits.cc: New files. + * bits/char_traits.h: For char_traits and + char_traits, declare static, but define over in the src + files. + + * bits/gslice.h: Comment out forward decls of _Array, valarray, + gslice_array, and _GsliceExpression. + + * bits/std_cstdio.h [__sparc__ && __svr4__]: #undef all of + clearerr, feof, ferror, getc, getchar, putc, putchar, stdin, + stdout, and stderr. Note we do get unresolved refs to stdin, but + that'll get fixed by the "true" solution. + + * bits/std_ios.h: Include to get the + definition of basic_streambuf.h, which is used in basic_ios.h to + call pubimbue. + + * bits/std_streambuf.h: Don't include libio.h for now. + (class basic_streambuf): Define missing methods pubimbue and + getloc. + + * src/Makefile.am (libstdc___la_SOURCES): Add stdexcept.cc, + ios.cc, os_raw.cc, stdstreams.cc, locale.cc, localename.cc, + locale-inst.cc, stlinst.cc, traits.cc, wtraits.cc. + + * src/ios.cc: Instantiate basic_ios and basic_ios. + + * src/locale.cc: Come up with munged versions of _S_toupper, + _S_tolower, and _S_table instead of the glibc-specific ones, so + they're at least defined, if not necessarily usable. The glibc + ones on any other system will yield unresolved refs to + __ctype_{b,toupper,tolower}. + + * src/string.cc: Define all of ADDCS, ADDPS, et al. Add + basic_ios, basic_istream, basic_ostream. Don't do char_traits + anymore cuz of the explicit specialization in char_traits.h. + Also add _S_string_copy, but this doesn't fix it -- cf the BUGS + file for the details. + + * stl/bits/stl_algobase.h (equal): Fix to do `! (x==y)'. + * stl/bits/stl_iterator.h (__distance): Likewise. + + * stl/bits/stl_iterator.h: As with 8/18 set, define missing op!=, + op>, op<=, and op>= for reverse_iterator. Also add op!= for + istream_iterator. + +1998-08-26 Brendan Kehoe + + * bits/string.tcc (basic_string::compare (const char*)): Fix to + return 0, not 1. + +1998-08-25 Brendan Kehoe + + This should really be fixed with __asm__ directives renaming the + symbol, but keeping the function. + * math/clogf.c (c_logf): Renamed from `clogf'. + * math/clogl.c (c_logl): Renamed from `clogl'. + * math/complex-stub.h (c_logf, c_logl): Change decls. + + * bits/locfacets.h (class _Numeric_get): For friend decls, rename + _CharT and _InIter parms, since they duplicate the enclosing ones. + +1998-08-19 Brendan Kehoe + + Deal with conflict of the iostreams `clog' and our internal + complex number `clog'. + * src/complex.cc: Call `c_log' instead of `clog'. + * math/clog.c (c_log):: Renamed from clog. + * math/complex-stub.h (c_log): Renamed from clog decl. + + * bits/locfacets.h (class _Numeric_get): Tweak fwd decls of the + get/put classes. + (num_put::put): #if 0 long long version, since we don't declare or + define the long long version of do_put. + +1998-08-18 Nathan Myers + + * bits/basic_string.h: add basic_string<>::push_back(), fix return + type of get_allocator (thanks to Ryszard Kabatek). + * bits/char_traits.h: make init order of fpos<> members + match decl order. + * bits/ios_base.h: fix decls of ios_base bitmask & enum types, add + flags _S_fd_in etc. for special filebuf ctor. + * bits/locfacets.h: make _Numeric_get and _Format_cache public + to work around problems in friend declarations. + * bits/locfacets.tcc: qualify _S_get_cache in num_get<>::get(..bool&), + fix random type errors & typos + * bits/std_fstream.h: major refitting to bypass libio (for now), + instrument to use bits/fstream.tcc template definitions + * bits/std_iosfwd.h: mess with wrappers + * bits/std_istream.h: remove meaningless comment + * bits/std_ostream.h: instrument to work with ostream.tcc. + * bits/std_streambuf.h: instrument to work with streambuf.tcc + * bits/fstream.tcc: template defs for + * bits/ostream.tcc: template defs for + * bits/streambuf.tcc: template defs for + * bits/os_raw.h: thin OS interface wrapper, to bypass libio (for now). + * Delete .cc files, replace with bits/*.tcc + src/fstream.cc + src/istream.cc + src/ostream.cc + src/streambuf.cc + * Add files: + src/os_raw.cc: thin interface to OS, to bypass libio (for now). + src/stdstreams.cc: cout, cin, etc. definitions + (these still need work: must be init'd before user statics.) + + +1998-08-18 Brendan Kehoe + + Sent to SGI before checkin: + * stl/bits/stl_vector.h (operator!=, operator>, operator<=, + operator>=): Define. + * stl/bits/stl_bvector.h (vector::flip): Define method. + * stl/bits/stl_deque.h (operator!=, operator>, operator<=, + operator>=): Define. + (operator==, operator<): Add inline. + * stl/bits/stl_map.h (operator!=, operator<, operator<=, + operator>=): Define. + * stl/bits/stl_multimap.h (operator!=, operator<, operator<=, + operator>=): Define. + * stl/bits/stl_list.h (operator!=, operator<, operator<=, + operator>=): Define. + * stl/bits/stl_set.h (operator!=, operator<, operator<=, + operator>=): Define. + * stl/bits/stl_multiset.h (operator!=, operator<, operator<=, + operator>=): Define. + + * bits/std_valarray.h (_Shift_left, _Shift_right): Inherit from + unary_function. + +1998-08-15 Nathan Myers + + * bits/ios_base.h: change nominal bitmask and enum types to real enums + * bits/locfacets.h: make _Format_cache bool names usable by num_get + * bits/locfacets.tcc: make num_get<>::get(... bool&) use _Format_cache + * bits/std_fstream.h: minor cleanups: ctors delegate to open() + * bits/std_iosfwd.h: more bitmask changes, for ios_base::iostate + * bits/std_sstream.h: formatting cleanups + +1998-08-14 Nathan Myers + + * bits/locfacets.tcc: implement num_get<>::do_get(..., bool&) + * bits/locfacets.tcc: implement time_get<>::do_get_weekday + * bits/locfacets.tcc: implement time_get<>::do_get_monthname + * bits/locfacets.h: fix missing argument in do_get_monthname + (this is a bug in the standard, ref. 36 in my list.) + * bits/locfacets.h: make month and day name caches mutable + * bits/locfacets.tcc: various typos in get() functions + * bits/sbuf_iter.h: fix omission in istreambuf_iterator::op++(). + * bits/std_streambuf.h: fix typo in sgetn (Brendan) + +1998-08-12 Nathan Myers + * move streambuf iterators to bits/sbuf_iter.h + * optimize streambuf iterators + * begin generalizing streambuf + * begin implementing num_get<>::get (starting with bool) + * patch stl/bits/stl_config.h so that relops operators are + contained properly, out of the way. + +1998-07-24 Nathan Myers + * Fold in SGI 3.11 changes (uglified names, some algorithm + improvements, very minor bug fixes.) + * Uglify names elsewhere to match (s/_T/_Tp/). + * Begin work on optimized streambuf + * Put complex.cc in namespace std:: (thanks Martin) + +1998-07-17 Nathan Myers + + * bits/char_traits.h: add _Char_traits_match template. + * bits/string.tcc: fix bugs in various find_last* members. + * bits/basic_string.h: redeclare member _S_find. + * stl/bits/stl_iterator.h: change member names in nonstandard + templates bidirectional_reverse_iterator and + random_access_reverse_iterator to match expected changes + in upstream source. + * src/string.cc: fix definitions of stream operators. + +1998-07-14 16:06 Ulrich Drepper + + * Makefile.am (SUBDIRS): Add string. + + * configure.in: Test for long double functions separately. Test for + ISO C 89 float functions. Test for endian.h and sys/isa_defs.h. + Generate string/Makefile. + + * bits/c++config.h: Define mbstate_t for Solaris. + + * bits/char_traits.h: Remove unused #if. + + * bits/std_cwchar.h: Declare wide char string functions. + + * m4/stringfcts.m4: New file. + + * math/complex-stub.h: Declare nan. + * math/nan.c: New file. + + * math/mathconf.h: Hack around missing endian.h file. + Handle missing NAN definition. + Handle missing float math functions. + + * src/Makefile.am (libstdc___la_LIBADD): Add libstring.la. + (libstdc___la_LDFLAGS): Set version information. + + * src/complexl.cc: Don't compile any code if no long double functions + are available. + + * string/Makefile.am: New file. + * string/dummy.c: New file. + * string/wmemchr.c: New file. + * string/wmemcmp.c: New file. + * string/wmemcpy.c: New file. + * string/wmemmove.c: New file. + * string/wmemset.c: New file. + +1998-07-14 10:45 Ulrich Drepper + + * configure.in: Make it work. + * install-sh: New file. + * missing: New file. + * mkinstalldirs: New file. + * m4/mathfcts.m4: New file. + * math/Makefile.am: New file. + + * bits/std_complex.h (conj): Mark specializations as inline. + + * math/carg.c: New file. + * math/cargf.c: New file. + * math/cargl.c: New file. + * math/mycabs.c: New file. + * math/mycabsf.c: New file. + * math/mycabsl.c: New file. + * math/signbit.c: New file. + * math/signbitf.c: New file. + * math/signbitl.c: New file. + + * math/ccos.c: Avoid ISO C 9x functionality. + * math/ccosf.c: Likewise. + * math/ccosh.c: Likewise. + * math/ccoshf.c: Likewise. + * math/ccoshl.c: Likewise. + * math/ccosl.c: Likewise. + * math/cexp.c: Likewise. + * math/cexpf.c: Likewise. + * math/cexpl.c: Likewise. + * math/clog.c: Likewise. + * math/clog10.c: Likewise. + * math/clog10f.c: Likewise. + * math/clog10l.c: Likewise. + * math/clogf.c: Likewise. + * math/clogl.c: Likewise. + * math/cpow.c: Likewise. + * math/cpowf.c: Likewise. + * math/cpowl.c: Likewise. + * math/csin.c: Likewise. + * math/csinf.c: Likewise. + * math/csinh.c: Likewise. + * math/csinhf.c: Likewise. + * math/csinhl.c: Likewise. + * math/csinl.c: Likewise. + * math/csqrt.c: Likewise. + * math/csqrtf.c: Likewise. + * math/csqrtl.c: Likewise. + * math/ctan.c: Likewise. + * math/ctanf.c: Likewise. + * math/ctanh.c: Likewise. + * math/ctanhf.c: Likewise. + * math/ctanhl.c: Likewise. + * math/ctanl.c: Likewise. + + * math/complex-stub.h: New file. + + * math/mathconf.h: New file. + + * src/Makefile.am: New file. + + * src/complex.cc: Use mathconf.h instead of complex.h. + Don't use cabs, always use __mycabs. + +1998-02-13 Brendan Kehoe + + * iterator (class reverse_iterator): Do some tweaks to be in sync + w/ the FDIS. diff --git a/contrib/libstdc++/ChangeLog-2001 b/contrib/libstdc++/ChangeLog-2001 new file mode 100644 index 0000000..e7d658f --- /dev/null +++ b/contrib/libstdc++/ChangeLog-2001 @@ -0,0 +1,6067 @@ +2001-12-31 Paolo Carlini + + * include/ext/iterator: Add #include , tweak. + * testsuite/ext/headers.cc: Add . + +2001-12-31 Paolo Carlini + + * include/backward/algo.h: Add two more using declarations. + * include/backward/iterator.h: Include , + add using declaration. + * include/ext/algorithm: Add #pragma GCC system_header. + +2001-12-31 Phil Edwards + + * include/bits/stl_bvector.h: Change calls to 3-argument distance() + into standard 2-argument version. + * include/bits/stl_deque.h: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + * include/bits/stl_tree.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/ext/stl_hashtable.h: Likewise. + * include/bits/stl_iterator_base_funcs.h: Move distance() extension... + * include/ext/iterator: to here. New file. + * include/Makefile.am (ext_headers): Add new file, alphabetize. + * include/Makefile.in: Regenerate. + +2001-12-31 Phil Edwards + + * include/bits/stl_deque.h: Doxygenate with initial/example hooks. + Clean up spacing and indentation. + +2001-12-31 Paolo Carlini + + * include/ext/slist: Move into __gnu_cxx, + tweak, add using declarations. + +2001-12-31 Paolo Carlini + + * include/ext/hash_map: Move into __gnu_cxx, + tweak, add using declarations. + * include/ext/hash_set: Ditto. + * include/ext/ropeimpl.h: Ditto. + * include/ext/stl_hash_fun.h: Ditto. + * include/ext/stl_hashtable.h: Ditto. + * include/ext/stl_rope.h: Ditto. + * src/ext-inst.cc: Tweak. + * testsuite/ext/rope.cc: Tweak. + +2001-12-31 Paolo Carlini + + * include/backward/algo.h: Include , + tweak using declarations. + +2001-12-29 Richard Henderson + + * config/os/hpux/bits/os_defines.h: Don't define __glibcpp_long_bits. + * config/os/hpux/bits/cpu_limits.h: New file. + * configure.target (CPULIMITSH): Use it. + +2001-12-28 Richard Henderson + + * config/cpu/ia64/bits/cpu_limits.h: New file. + * config/os/osf/osf5.0/bits/cpu_limits.h: New file. + * configure.target (CPULIMITSH): Use them. + +2001-12-28 Phil Edwards + + * include/bits/c++config: Move doxygen hook comment... + * docs/doxygen/doxygroups.cc: ...to here. + +2001-12-28 Phil Edwards + + PR libstdc++/2054 + * include/bits/stl_algo.h (lower_bound): Relax concept checks. + * testsuite/ext/concept_checks.cc: New file. + +2001-12-28 Paolo Carlini + + * include/bits/stl_algo.h (count returning void, + count_if returning void, __random_sample, random_sample, + random_sample_n, __is_heap, is_heap, is_sorted): Move to... + * include/ext/algorithm: ...here, new file. + * include/Makefile.am (ext_headers): Add new file. + * include/Makefile.in: Regenerate. + * testsuite/ext/headers.cc: Include . + +2001-12-28 Paolo Carlini + Nathan Myers + + * include/bits/basic_string.h (insert(__pos, __s, __n)): + Optimize by avoiding temporaries and working in-place when possible. + (insert(__pos1, __str)): Call insert(__pos1, __str, __pos2, __n). + (insert(__pos1, __str, __pos2, __n)): Call insert(__pos, __s, __n). + * testsuite/21_strings/insert.cc (test02): New testcases. + +2001-12-27 Phil Edwards + + * testsuite/testsuite_hooks.h (gnu_counting_struct): Add. + * testsuite/23_containers/deque_ctor.cc: New file. + +2001-12-27 Paolo Carlini + + * include/bits/locale_facets.tcc (collate::do_transform): + Adjust implicit typename. + * config/locale/messages_members_generic.h (messages::open, + messages::do_open, messages::do_get): Adjust implicit typename. + * config/locale/messages_members_gnu.h (messages::open, + messages::do_open, messages::do_get): Adjust Implicit typename. + * config/locale/messages_members_ieee_1003.1-200x.h (messages::open, + messages::do_open, messages::do_get): Adjust implicit typename. + +2001-12-27 Phil Edwards + + PR libstdc++/3829 + * src/misc-inst.cc: Many additional I/O-related instantiations. + * testsuite/27_io/instantiations.cc: New file. + +2001-12-26 Benjamin Kosnik + + * testsuite/24_iterators/insert_iterator.cc (test02): Add. + * testsuite/24_iterators/front_insert_iterator.cc (test02): Add. + * testsuite/24_iterators/back_insert_iterator.cc (test02): Add. + * testsuite/24_iterators/reverse_iterator.cc (test02): Add. + + * include/bits/stl_iterator.h (reverse_iterator): Uglify member + current to _M_current. + (back_insert_iterator): Uglify member container to _M_container. + (front_insert_iterator): Same. + (insert_iterator): Same. + +2001-12-25 Gabriel Dos Reis + + * include/bits/std_limits.h (__glibcpp_xxx_is_modulo): New + macros for signed types; default value is true. + (numeric_limits<>::is_modulo): Get value from corresponding + __glibcpp_xxx_is_modulo macro. + +2001-12-23 Jeffrey A Law + + * config/os/hpux/bits/os_defines.h: Do not include <_sys/inttypes.h>. + Twiddle return types for strtoll and strtoull to avoid using + intmax_t and uintmax-t. + +2001-12-22 Richard Henderson + + * configure.target (CPULIMITSH): Fix typo in alpha case. + +2001-12-22 Jeffrey A Law + + * config/os/hpux/bits/os_defines.h: Update to avoid #defines + for strtoll and strtoull. + +2001-12-21 Jeffrey A Law + + * config/os/hpux/bits/os_defines.h: Include + + * configure.target: Fix typo in hpux case. + +2001-12-21 Paolo Carlini + + * include/ext/stl_rope.h (_Rope_iterator): + Add local typedef to fix implicit typename problems. + +2001-12-19 Phil Edwards + + * docs/doxygen/Intro.3: New 'Allocators' module. + * docs/doxygen/TODO: Update. + * docs/doxygen/doxygroups.cc: Update. + * docs/doxygen/run_doxygen: Update. + + * include/bits/stl_alloc.h: Tweak doxygen hooks in comments. + * include/bits/std_memory.h: Doxygenate. + * include/bits/stl_iterator_base_types.h: Likewise. + * include/bits/stl_raw_storage_iter.h: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + (get_temporary_buffer): Remove unused nonstandard overload. + * include/bits/stl_uninitialized.h: Likewise. + + * include/bits/stl_iterator_base_types.h (input_iterator, + output_iterator, forward_iterator, bidirectional_iterator, + random_access_iterator): Move old names... + * include/backward/iterator.h: ...to here. + * include/bits/stl_bvector.h: Update. + * include/ext/stl_rope.h: Update. + +2001-12-19 Phil Edwards + + * docs/html/configopts.html: Describe recent options. + * docs/html/documentation.html: Point to new doxygen tarballs. + * docs/html/install.html: Brief updates. + * docs/html/17_intro/RELEASE-NOTES: Remove weird control character. + * docs/html/ext/howto.html: Fix typos, describe filebuf::fd(). + * docs/html/faq/index.html: Update for 3.0.95. + * docs/html/faq/index.txt: Regenerate. + +2001-12-19 David Billinghurst + + libstdc++-v3/5148 + * testsuite/lib/libstdc++-v3-dg.exp: Append .exe to + executable filenames + +2001-12-18 Benjamin Kosnik + + * docs/html/17_intro/TODO: Update. + * docs/html/17_intro/RELEASE-NOTES: Edits, update. + * README: Edit for clarity, update to reflect current directory + structure. + +2001-12-18 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Extended checking before + enabling gnu model. + * aclocal.m4: Rebuild. + * configure: Rebuild. + +2001-12-18 Paolo Carlini + Nathan Myers + + * include/bits/basic_string.h (assign(__str, __pos, __n)): + Call assign(__s, __n). + (assign(__s, __n)): Terminate the string with _S_terminal. + +2001-12-17 Benjamin Kosnik + + * include/bits/std_limits.h (__glibcpp_long_double_is_bounded): + Set to true, like float and double. + +2001-12-17 David Billinghurst + + libstdc++/5136 + * testsuite/lib/prune.exp: New file + * testsuite/lib/libstdc++-v3-dg.exp: Use it + +2001-12-17 Phil Edwards + + * include/bits/basic_file.h (__basic_file::fd): New function. + * config/io/basic_file_stdio.h (__basic_file::fd): Define. + * include/bits/std_fstream.h (basic_filebuf::fd): New function. + * include/bits/fstream.tcc (basic_filebuf::fd): Define. + * testsuite/27_io/filebuf_members.cc (test_02): New test. + +2001-12-16 Nathan Sidwell + + * po/Makefile.am (.po.mo): Use POSIXLY_CORRECT argument ordering. + * po/Makefile.in: Regenerated. + +2001-12-16 Paolo Carlini + + * testsuite/21_strings/assign.cc (test01): Add tests. + +2001-12-15 Paolo Carlini + Nathan Myers + + * include/bits/basic_string.h + (assign(__str, __pos, __n), assign(__s, __n)): Optimize + by avoiding unnecessary temporaries. + (assign(__s)): Call assign(__s, __n). + * include/bits/basic_string.tcc (_M_replace_safe): Adjust comment. + * include/bits/std_string.h: include stl_function.h. + * testsuite/21_strings/assign.cc (test02, test03): New tests. + +2001-12-15 Benjamin Kosnik + + * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Enable gnu locale model + on linux by default. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2001-12-14 Benjamin Kosnik + + Clean up initialization and simplify caching of underlying "C" + default locale objects. + * src/localename.cc (locale::_Impl::_Impl(string, size_t): + Unconditionally create __clocale object for all named locales, + including "C" and "POSIX". + * config/locale/c_locale_generic.cc + (locale::facet::_S_create_c_locale): Always set __cloc to zero. + * config/locale/c_locale_gnu.cc: Always delete. + * include/bits/localefwd.h (locale::facet::_S_c_locale): New. + * src/locale.cc (locale::classic()): Initialize + locale::facet::_S_c_locale. + (locale::facet::_S_c_locale): Define. + + * include/bits/locale_facets.h: Add ctype_byname ctor + specialization. + * src/locale.cc: Add definition here. + * config/os/gnu-linux/bits/ctype_inline.h: Tweak. + * config/os/gnu-linux/bits/ctype_noninline.h: Adjust initializations. + * include/bits/locale_facets.h (ctype::_M_c_locale_ctype): Add. + Adjust ctors, dtors. + (ctype::_M_toupper): Remove const&. + (ctype::_M_tolower): Remove const&. + (ctype::_M_ctable): Remove const&. + + * include/bits/locale_facets.h (collate): Clean up initialization + of _M_c_locale_collate in ctors and dtors. + * config/locale/collate_members_gnu.cc: Always use extended + functions. + + * include/bits/locale_facets.h (messages): Clean up inits in ctor/dtor. + (messages_byname): Same. + * config/locale/messages_members_generic.h (messages::~messages): + Remove. + * config/locale/messages_members_gnu.h: Same. + + * include/bits/localefwd.h: Clean. Move dtor definitions to + * src/locale.cc: Here. + * testsuite/22_locale/facet.cc: Fix spelling. + + Named locale support for ctype. + * acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add variable + ctype_members_* bits. + * aclocal.m4: Regenerate. + * configure: Regenerate. + * src/Makefile.am (sources): Add ctype.cc. + * src/Makefile.in: Regenerate. + * config/locale/ctype_members_generic.cc: New file. + * config/locale/ctype_members_gnu.cc: New file. + * src/locale.cc: Remove ctype definitions. + +2001-12-13 Roger Sayle + + * acconfig.h: Test for __builtin_sqrt instead of + __builtin_fsqrt. + * acinclude.m4: Same. + * include/c_shadow/bits/std_cmath.h: Same. + * aclocal.m4: Regenerated. + * config.h.in: Regenerated. + * configure: Regenerated. + +2001-12-13 Phil Edwards + + * docs/html/ext/howto.html: Fix typos. + +2001-12-13 Benjamin Kosnik + + libstdc++/3679 + * src/locale.cc (locale::locale(const char*)): Deal with locales + named "". + * testsuite/22_locale/ctor_copy_dtor.cc (test01): Modify. + +2001-12-12 Paolo Carlini + + * include/ext/ropeimpl.h (rope::_S_leaf_concat_char_iter, + _S_destr_leaf_concat_char_iter, _S_tree_concat, _S_concat_char_iter, + _S_destr_concat_char_iter, _S_concat, _S_substring, _S_balance) + : Adjust implicit typename. + * include/ext/stl_rope.h (_Rope_iterator::operator=, rope::npos): + Adjust implicit typename. + * testsuite/27_io/streambuf.cc: Adjust implicit typename. + +2001-12-12 Benjamin Kosnik + + Named locale support for ctype. + * config/locale/c_locale_gnu.h (_GLIBCPP_C_LOCALE_GNU): New. + * config/os/gnu-linux/bits/ctype_noninline.h (ctype): Add + definitions for alternate constructor. + * config/os/solaris/solaris2.7/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.6/bits/ctype_noninline.h (ctype): Same. + * config/os/solaris/solaris2.5/bits/ctype_noninline.h (ctype): Same. + * config/os/newlib/bits/ctype_noninline.h (ctype): Same. + * config/os/irix/irix6.5/bits/ctype_noninline.h (ctype): Same. + * config/os/irix/irix5.2/bits/ctype_noninline.h (ctype): Same. + * config/os/hpux/bits/ctype_noninline.h (ctype): Same. + * config/os/generic/bits/ctype_noninline.h (ctype): Same. + * config/os/djgpp/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/netbsd/bits/ctype_noninline.h (ctype): Same. + * config/os/bsd/freebsd/bits/ctype_noninline.h (ctype): Same. + * config/os/aix/bits/ctype_noninline.h (ctype): Same. + * include/bits/locale_facets.h (ctype<_CharT>): Remove dummy + definitions for all virtual functions. These are now explicitly + undefined for non-required factets, ie any non-char, non-wchar_t + instantiations. + * src/localename.cc (locale::_Impl::_Impl(string, size_t): Named + locales use alternate constructor for ctype facet. + * include/bits/locale_facets.h (ctype::ctype(__c_locale, const + mask*, bool, size_t): Add. + (ctype::ctype(__c_locale, size_t): Add. + * src/locale.cc (ctype::ctype(__c_locale, size_t)): Add + definition. + + * testsuite/22_locale/ctype_members_char.cc (test02): Add, mark + XFAIL for non-gnu locale models. + +2001-12-12 Philip Martin + Ross Smith + Paolo Carlini + + libstdc++/5045 + * include/bits/std_limits.h (defines, numeric_limits::digits10): + Fix digits10 values for integral types. + * include/bits/locale_facets.tcc (num_get::do_get for integral types): + Tweak _M_extract_int call. + * testsuite/27_io/istream_extractor_arith.cc (test13, test12_aux): + Tweak overflowing number of digits. + * testsuite/18_support/numeric_limits.cc (test03): New testcase. + +2001-12-11 Benjamin Kosnik + + * config/os/generic/bits/ctype_inline.h: Remove spaces. + * config/os/gnu-linux/bits/ctype_noninline.h: Same. + * include/bits/locale_facets.h (__num_base): Move double data + members to first in class. + * include/bits/locale_facets.tcc: Re-arrange, tweak. + * src/locale.cc: Clean. + *include/bits/stl_vector.h: Space typedefs. + +2001-12-11 Phil Edwards + + * testsuite/ext/allocators.cc: New file. + +2001-12-11 Jason Merrill + + * include/bits/locale_facets.tcc (_M_extract_int): Avoid + uninitialized warning. + +2001-12-11 Loren Rittle + + * config/cpu/sparc/sparc32/bits/atomicity.h + (__Atomicity_lock<0>::_S_atomicity_lock): Add. + +2001-12-10 Paolo Carlini + + * include/bits/basic_string.tcc (_M_replace_safe): Fix typos. + * include/bits/basic_string.h: Fix typos. + +2001-12-10 Paolo Carlini + Nathan Myers + + * include/bits/basic_string.tcc (_M_replace_safe): New function. + (_M_replace(input_iterator_tag), append members): Use it. + (_M_replace(forward_iterator_tag)): Remove. + * include/bits/basic_string.h: Adjust declarations. + * src/string-inst.cc: Adjust declarations. + +2001-12-09 Benjamin Kosnik + Philip Martin + + * include/bits/locale_facets.h (__num_base::_S_scale_hex): Add. + (__num_base::_S_scale_oct): Add. + * include/bits/locale_facets.tcc (_M_extract_int): Use them. + * src/locale.cc: Add definitions. + * testsuite/27_io/istream_extractor_arith.cc (main): Call test13. + + * testsuite/testsuite_hooks.h: Remove duplicate VERIFY define. + +2001-12-07 Nathan Myers + Loren Rittle + + libstdc++/5037 + * config/cpu/sparc/sparc32/bits/atomicity.h + (struct __Atomicity_lock<__inst>): Add. + (__Atomicity_lock<__inst>::_S_atomicity_lock): Add. + (__exchange_and_add): Use __Atomicity_lock<0>::_S_atomicity_lock + instead of lock local to static function. + (__atomic_add): Likewise. + +2001-12-07 Phil Edwards + + * src/globals.cc: Remove __GTHREADS guard. + +2001-12-07 Paolo Carlini + + * include/bits/locale_facets.tcc (num_put::_M_convert_float): + Extend comment, reduce __cs_size for non-fixed outputs. + +2001-12-07 Paolo Carlini + + * include/bits/basic_string.tcc (_M_mutate): Fix typo + in the previous check in. + +2001-12-06 Paolo Carlini + Loren J. Rittle + + * include/bits/basic_string.tcc (_M_mutate, _M_clone): Implement + exponential growth policy to meet linear amortized time + requirements of the standard. + (_S_create): Adjust comment. + +2001-12-06 Benjamin Kosnik + + libstdc++/3720 + * include/bits/locale_facets.tcc (num_put): Clean. + (num_get::_M_extract_float): Change argument to string. + (num_get::do_get(float)): Fixup. + (num_get::do_get(double)): Same. + (num_get::do_get(long double)): Same. + (num_get::_M_extract_int): Add maximum length parameter, __max. + (num_get::_M_extract_float): Correct zeros, use string. + * include/bits/locale_facets.h (num_get::_M_extract_float): Change + declaration here. + * src/locale.cc (__num_base::_S_atoms): Remove x, X. + * testsuite/27_io/istream_extractor_arith.cc (test13): Add. + +2001-12-06 Philip Martin + + * testsuite/27_io/istream_extractor_arith.cc (test12): Add + tests for excess input digits. + +2001-12-06 Phil Edwards + + * include/bits/std_bitset.h: Use GLIBCPP in multiple-inclusion guard. + * include/bits/stl_algo.h: Likewise. + * include/bits/stl_algobase.h: Likewise. + * include/bits/stl_bvector.h: Likewise. + * include/bits/stl_deque.h: Likewise. + * include/bits/stl_function.h: Likewise. + * include/bits/stl_iterator.h: Likewise. + * include/bits/stl_iterator_base_funcs.h: Likewise. + * include/bits/stl_iterator_base_types.h: Likewise. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_multimap.h: Likewise. + * include/bits/stl_multiset.h: Likewise. + * include/bits/stl_pair.h: Likewise. + * include/bits/stl_queue.h: Likewise. + * include/bits/stl_set.h: Likewise. + * include/bits/stl_stack.h: Likewise. + * include/bits/stl_tempbuf.h: Likewise. + * include/bits/stl_tree.h: Likewise. + * include/bits/stl_vector.h: Likewise. + + * include/bits/stl_alloc.h: Use our own multiple inclusion guards. + Doxygenate more comments. Correct historical artifacts in comments. + (alloc, single_alloc): Uglify non-standard names. + (__default_alloc_template::_NFREELISTS): Calculate from other + parameters. + (__default_alloc_template::_S_free_list): Remove SunPro workaround. + (__default_alloc_template::_Lock): Mark as "unused". + * include/backward/alloc.h: Update. + * include/bits/stl_bvector.h: Likewise. + * include/ext/ropeimpl.h: Likewise. + * include/ext/stl_hashtable.h: Likewise. + +2001-12-05 Benjamin Kosnik + + DR/282 + * include/bits/locale_facets.tcc (num_put::_M_widen_float): Add + grouping to floating point types. + * testsuite/27_io/ostream_inserter_arith.cc (test02): Add test. + +2001-12-04 Paolo Carlini + + libstdc++/4402 + * testsuite/27_io/ostream_inserter_arith.cc (test02): Add testcase + from the PR. + * include/bits/locale_facets.tcc (num_put::_M_convert_float): + Deal properly with long ios_base::fixed floats. + (num_put::_M_widen_float): use + __len in __builtin_alloca call. + +2001-12-04 Benjamin Kosnik + + * src/Makefile.am (sources): Add ext-inst.cc. + * src/Makefile.in: Regenerate. + * src/ext-inst.cc: New file. + * include/bits/stl_threads.h: Format. + * src/globals.cc: Add instantiation for _S_swap_lock. + + * testsuite/18_support/numeric_limits.cc: Add numeric_limits + instantiation. + +2001-12-04 John David Anglin + + * testsuite/22_locale/numpunct_members_wchar_t.cc: Only compile + and execute test01 if _GLIBCPP_USE_WCHAR_T is defined. + * testsuite/26_numerics/complex_inserters_extractors.cc: Provide + for explicit instantiation of class std::basic_string >. + +2001-12-03 Benjamin Kosnik + + * testsuite/22_locale/collate.cc: Compile-only. + * testsuite/22_locale/time_get.cc: Same. + * testsuite/22_locale/time_put.cc: Same. + * testsuite/22_locale/numpunct.cc: Same. + * testsuite/22_locale/num_put.cc: Same. + * testsuite/22_locale/num_get.cc: Same. + * testsuite/22_locale/moneypunct.cc: Same. + * testsuite/22_locale/money_get.cc: Same. + * testsuite/22_locale/messages.cc: Same. + * testsuite/22_locale/ctype.cc: Same. + +2001-12-03 Benjamin Kosnik + + * src/string-inst.cc (string::_Rep::_S_terminal): Add static data + member instantiations. + +2001-12-03 Steve Ellcey + + * libstdc++-v3/configure.in: Add support for hpux cross compiles, + combine common linux/hpux/generic cross compile support to reduce + redundent lines. + * libstdc++-v3/configure: Regenerate. + +2001-12-03 Loren J. Rittle + + * docs/html/ext/howto.html: Update commentary. + * include/bits/c++config: Update threading configuration comment. + (__STL_GTHREADS): Remove macro definition. + (__STL_THREADS): Likewise. + * include/bits/stl_threads.h: Leave only the configuration + path which had been guarded by __STL_GTHREADS. Remove all + guards related to __STL_GTHREADS, __STL_SGI_THREADS, + __STL_PTHREADS, __STL_UITHREADS and __STL_WIN32THREADS. + * include/bits/stl_alloc.h: Leave only the configuration path + which had been guarded by __STL_THREADS. Remove configuration + path and guards for __STL_SGI_THREADS. + (__NODE_ALLOCATOR_THREADS): Remove macro definition. Unroll its use. + (__NODE_ALLOCATOR_LOCK): Likewise. + (__NODE_ALLOCATOR_UNLOCK): Likewise. + (_NOTHREADS): Remove guards related to macro. + * include/ext/stl_rope.h: Remove configuration path and guards + for __STL_SGI_THREADS. + * src/stl-inst.cc: Remove use of __NODE_ALLOCATOR_THREADS. + +2001-12-02 Phil Edwards + + * docs/html/ext/howto.html: Update list of implemented DRs. + * docs/html/ext/lwg-active.html: Import R20 from upstream. + * docs/html/ext/lwg-defects.html: Import R20 from upstream. + +2001-11-30 Benjamin Kosnik + + libstdc++/3150 + DR/266 + * libsupc++/exception (bad_exception::~bad_exception()): Remove + declaration. + * libsupc++/new (bad_alloc::~bad_alloc()): Remove. + * libsupc++/typeinfo (bad_cast::~bad_cast()): Remove. + (bad_typeid::~bad_typeid()): Remove. + * libsupc++/tinfo.cc (bad_cast::~bad_cast()): Remove definition. + (bad_typeid::~bad_typeid()): Same. + * libsupc++/new_handler.cc (bad_alloc::~bad_alloc()): Same. + * libsupc++/eh_exception.cc (bad_exception::~bad_exception()): Same. + + * include/bits/std_iomanip.h: Tweak. + +2001-11-29 Paolo Carlini + + libstdc++/3655 + * include/bits/locale_facets.tcc (__pad): Add bool parameter to + correctly pad internal-adjusted const char*-type objects. + * include/bits/locale_facts.tcc (num_put::_M_insert): Update call. + * include/bits/ostream.tcc (operator<<(_CharT , char, const + _CharT*, const char*, const basic_string&): Update calls. + * src/locale-inst.tcc: Update declarations. + * testsuite/27_io/ostream_inserter_arith.cc (test04): Add test. + +2001-11-29 Phil Edwards + + * docs/html/ext/howto.html: Finish allocator notes (inst and 3.0). + +2001-11-29 Benjamin Kosnik + + * include/bits/locale_facets.tcc (num_get::do_get(long double)): + Fix __traits_type typo. + +2001-11-28 Paolo Carlini + + * include/bits/locale_facets.tcc (__pad): Correctly pad + internal-adjusted hex numbers. + * testsuite/27_io/ostream_inserter_arith.cc: Add testcase. + +2001-11-28 Paolo Carlini + Loren J. Rittle + + * include/bits/basic_string.h + (basic_string::_Rep::__default_excess, _S_excess_slop): + Unused, remove. + * include/bits/basic_string.tcc: Remove dead code. + * include/bits/c++config: Remove comment. + +2001-11-28 Benjamin Kosnik + Jakub Jelinek + + * config/locale/moneypunct_members_gnu.cc + (moneypunct::_M_initialize_moneypunct): Correctly cast + for ia64, others. + * config/locale/numpunct_members_gnu.cc + (numpunct::_M_initialize_numpunct): Same. + +2001-11-27 Benjamin Kosnik + + * include/bits/locale_facets.tcc: Formatting tweaks. + + * testsuite/23_containers/map_operators.cc: Don't xfail. + * testsuite/23_containers/set_operators.cc: Same. + * testsuite/backward/header_iterator_h.cc: Pass in -Wno-deprecated. + * testsuite/backward/header_deque_h.cc: Same. + +2001-11-27 Loren J. Rittle + Paolo Carlini + + * include/bits/basic_string.tcc (basic_string::_Rep::_S_create): + Enforce allocation size blocking policy to reduce + fragmentation and enhance performance with common malloc + implementations. + +2001-11-27 Benjamin Kosnik + + Numeric facets cleanup. + * include/bits/locale_facets.h (__num_base::_S_atoms): Add, remove + + and - signs. + (__num_base::_M_zero): Add + (__num_base::_M_e): Add. + (__num_base::_M_E): Add. + * include/bits/locale_facets.tcc (num_get::_M_extract): Remove. + (num_get::_M_extract_float): New. + (num_get::_M_extract_int): New. + * src/locale.cc (num_get::_M_extract): Remove. + + * include/bits/locale_facets.tcc (num_put::_M_insert_float): + Simplify, use _M_insert. + (num_put::do_put(bool)): Simplify, remove __pad. + (__pad): Remove. + (__pad_output): Change to __pad. + * include/bits/ostream.tcc: And here. + * src/locale-inst: Remove instantiations. + + * include/bits/locale_facets.h: Move helper functions in to class + num_put. + (num_put::_M_insert_float): Same, for __output_integer. + (num_put::_M_insert_int): Same, for __output_float. + (num_put::_M_insert): New. + (__num_base): Add. + (__num_base::_S_format_float): Move + __build_float_format into class __num_base. + (__num_base::_S_format_int): Move __build_int_format into class + __num_base. + * include/bits/locale_facets.tcc (__group_digits): Change to + (__add_grouping): This. + * src/locale-inst.cc: And here. Tweak instantiations. + * src/misc-inst.cc: Remove instantiations. + + * include/bits/ostream.tcc (__pad_char): Rename, adjust inserters + for new calling conventions, move to... + * include/bits/locale_facets.tcc (__pad_output): Here. Adjust + signature to make it useful for both ostream and num_put. + (__pad_numeric): Remove. + * src/misc-inst.cc: Remove instantiations. + * src/locale-inst.cc: Same. + + * include/bits/locale_facets.h (_Numeric_get): Remove. + (_Numeric_put): Remove. + (num_get::get(short)): Remove. + (num_get::get(int)): Remove. + (num_get::do_get(short)): Remove. + (num_get::do_get(int)): Remove. + * include/bits/istream.tcc (istream::operator>>(short)): Fix as + per DR 118. + (istream::operator>>(int)): Same. + + * include/bits/locale_facets.h (_Format_cache): Remove. + * include/bits/locale_facets.tcc: Same. + * src/locale.cc: Same. + * src/locale-inst.cc: Same. + * include/bits/ostream.tcc: Same. + * src/ios.cc (ios_base::imbue): Remove here as well. + + * testsuite/22_locale/num_get.cc: New file. + * testsuite/22_locale/num_get_members_char.cc: New file. + * testsuite/22_locale/num_get_members_wchar_t.cc: New. + * testsuite/22_locale/numpunct_members_wchar_t.cc: New file. + * testsuite/22_locale/num_put.cc: New file. + * testsuite/22_locale/num_put_members_char.cc: New file. + * testsuite/22_locale/num_put_members_wchar_t.cc: New file. + * testsuite/27_io/ostream_inserter_arith.cc: Fix. + * testsuite/27_io/istream_extractor_arith.cc: Fix. + +2001-11-27 Phil Edwards + + * docs/html/explanations.html: New section, empty for now. + * docs/html/17_intro/howto.html: Cleanup. Move unrelated link... + * docs/html/23_containers/howto.html: ...to here. Break up and + rewrap threading discussion to emphasize warning. Move malloc text... + * docs/html/ext/howto.html: ...to here. New section. Describe + allocators and __USE_MALLOC effects. + * docs/html/ext/sgiexts.html: Mention their code. + +2001-11-24 Joseph S. Myers + + * docs/doxygen/maint.cfg.in, docs/doxygen/user.cfg.in, + docs/html/27_io/binary_iostreams_kuehl.txt: Revert previous + changes. + +2001-11-23 Phil Edwards + + * Makefile.am (doxygen-maint): The script isn't executable in CVS. + * Makefile.in: Regenerated. + * docs/doxygen/TODO: New file listing doxygen work to be done. + * docs/doxygen/run_doxygen: Fix up man pages. + * docs/doxygen/user.cfg.in: Insert maint-only toggles. + * docs/doxygen/maint.cfg.in: Copy from user.cfg and turn toggles on. + * include/bits/stl_construct.h: Use new hooks for internal functions. + + * docs/html/17_intro/TODO: Small updates. + * docs/html/faq/index.html: Likewise. + * docs/html/faq/index.txt: Regenerated. + + * include/bits/stl_alloc.h: Doxygenate, reindent comments, remove + SGI-isms and wrappers. + (simple_alloc, debug_alloc): Uglify class names. + (__default_alloc_template): Uglify "threads" template parameter and + update corresponding macros. + * include/backward/alloc.h: Bring up to date. + +2001-11-23 Jason Merrill + + * src/vterminate.cc (__verbose_terminate_handler): Add leading + underscores. + +2001-11-23 Joseph S. Myers + + * ChangeLog, docs/doxygen/maint.cfg.in, docs/doxygen/user.cfg.in, + docs/doxygen/doxygroups.cc, docs/doxygen/Intro.3, + docs/html/17_intro/BUGS, docs/html/17_intro/C++STYLE, + docs/html/17_intro/CHECKLIST, docs/html/17_intro/DESIGN, + docs/html/17_intro/howto.html, docs/html/17_intro/porting.html, + docs/html/17_intro/porting.texi, docs/html/18_support/howto.html, + docs/html/19_diagnostics/howto.html, docs/html/20_util/howto.html, + docs/html/21_strings/howto.html, + docs/html/23_containers/howto.html, + docs/html/26_numerics/howto.html, docs/html/27_io/howto.html, + docs/html/27_io/binary_iostreams_kuehl.txt, + docs/html/ext/sgiexts.html, docs/html/faq/index.html, + docs/html/faq/index.txt, testsuite/24_iterators/iterator.cc, + include/bits/basic_file.h, include/bits/locale_facets.h, + include/bits/locale_facets.tcc, include/bits/std_sstream.h, + include/ext/ropeimpl.h, include/ext/stl_rope.h, + libsupc++/tinfo.cc, libsupc++/cxxabi.h, libsupc++/typeinfo, + libsupc++/eh_throw.cc, acinclude.m4, aclocal.m4, configure, + configure.target, ChangeLog-2000: Fix spelling errors. + + * config/locale/moneypunct_members_gnu.cc, + include/bits/locale_facets.h: Fix spelling errors. + +2001-11-22 Stephen M. Webb + + * testsuite/23_containers/list_capacity.cc: New file. + * testsuite/23_containers/list_ctor.cc: New file. + * testsuite/23_containers/list_modifiers.cc: New file. + * testsuite/23_containers/list_operators.cc: New file. + +2001-11-22 Stephen M. Webb + + * include/bits/stl_list.h: Reformatted according to C++STYLE rules. + (size): Replaced nonstandard distance() call with the standard one. + (transfer): Uglified to _M_transfer. + +2001-11-21 Paolo Carlini + + PR libstdc++/4548 + * include/bits/basic_string.tcc (basic_string::reserve): Never shrink + below the current size. + * testsuite/21_strings/capacity.cc (test02): Add test. + +2001-11-19 Phil Edwards + + * docs/doxygen/Intro.3: More notes. + * docs/doxygen/style.css: Update to default style from Doxygen 1.2.10. + * include/bits/stl_algobase.h: Add doxygen hooks for functions. + * include/ext/hash_map: Add @file hook. + * include/ext/hash_set: Likewise. + * include/ext/rope: Likewise. + * include/ext/ropeimpl.h: Likewise. + * include/ext/slist: Likewise. + * include/ext/stl_hash_fun.h: Likewise. + * include/ext/stl_hashtable.h: Likewise. + * include/ext/stl_rope.h: Likewise. + + * docs/html/17_intro/license.html: Remove "experimental" sentence. + * docs/html/19_diagnostics/howto.html: Document new verbose + terminate handler. + * testsuite/27_io/filebuf.cc: Fix comment, move tweakable parameter + to more visible (closer to description) position. + + * libsupc++/eh_type.cc: Formatting tweak. + * libsupc++/exception: Likewise. + * src/vterminate.cc: Likewise. + + * docs/html/17_intro/porting.html: Regenerate. + * docs/html/faq/index.txt: Regenerate. + +2001-11-18 Jason Merrill + + * libsupc++/eh_personality.cc (__cxa_call_unexpected): Take void*. + * libsupc++/eh_catch.cc (__cxa_begin_catch): Likewise. + * libsupc++/unwind-cxx.h: Adjust. + * src/Makefile.am (strstream.o): Pass -Wno-deprecated. + + * libsupc++/eh_type.cc (__cxa_current_exception_type): New file. + * libsupc++/cxxabi.h: Declare it. + * libsupc++/Makefile.am (sources): Add it. + * src/vterminate.cc (verbose_terminate_handler): New file. + * libsupc++/exception: Declare it. + * src/Makefile.am (sources): Add it. + + * src/Makefile.am (VPATH): Check the src directory before the top one. + +2001-11-16 Paolo Carlini + + * include/bits/stl_deque.h (deque::erase()): Fix memory leak. + +2001-11-16 Loren J. Rittle + + * docs/html/17_intro/howto.html (Thread-safety): Rename + section to ``The Standard C++ library and multithreading'' and + update information based on recent mailing list traffic. Move + all discussion of __USE_MALLOC to... + * docs/html/23_containers/howto.html (Containers and multithreading): + ...here and rework it based on recent mailing list traffic. + +2001-11-15 Loren J. Rittle + + * docs/html/faq/index.html (Is libstdc++-v3 thread-safe?): Clarify + wording. + +2001-11-15 + Loren J. Rittle + + libstc++/4219 + * include/bits/stl_alloc.h (alloc): Update to use __mem_interface. + (single_client_alloc): Likewise. + +2001-11-08 Danny Smith + + * configure.target: Add os_include_dir for mingw32* target. + * docs/html/17_intro/porting.texi: Mention mingw32 as target benefiting + from _GLIBCPP_AVOID_FSEEK. + * config/os/mingw32/bits/ctype_base.h: New file. + * config/os/mingw32/bits/ctype_inline.h: New file. + * config/os/mingw32/bits/ctype_noninline.h: New file. + * config/os/mingw32/bits/os_defines.h: New file. + +2001-11-07 Nathan Myers + + * docs/html/faq/index.html (5.8): New entry on ABIs. + * docs/html/faq/index.txt: Regenerate. + +2001-11-07 Phil Edwards + + * docs/html/faq/index.html: Explain libsupc++, mention 'long long' + bugfixes on Solaris. + * docs/html/faq/index.txt: Regenerate. + +2001-11-06 Phil Edwards + + * acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Run the test in + LANG_CPLUSPLUS mode. + * aclocal.m4: Regenerate. + * configure: Regenerate. + +2001-11-05 Phil Edwards + + * porting.texi: Move... + * docs/html/17_intro/porting.texi: ...to here. + * docs/html/Makefile: Add rule to rebuild... + * docs/html/17_intro/porting.html: ...this. New file. + +2001-11-05 Felix Natter + + * docs/html/17_intro/porting-howto.xml: check in v0.9.4 + * docs/html/17_intro/porting-howto.html: regenerate + +2001-11-02 Loren J. Rittle + + * include/bits/stl_threads.h (_Atomic_swap): Only enable path + when platform supports __GTHREAD_MUTEX_INIT. + +2001-11-02 Phil Edwards + + * acconfig.h: Update comments. + * acinclude.m4 (GLIBCPP_ENABLE_C99): Move strtoll, strtoull tests... + (GLIBCPP_ENABLE_LONG_LONG): ...to here. Don't check enable_c99. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * configure: Regenerate. + + * include/bits/boost_concept_check.h: Unconditionally compile uses + of 'long long' which require only compiler support, not C lib support. + * include/bits/cpp_type_traits.h: Likewise. + * include/bits/std_limits.h: Likewise. + * include/bits/type_traits.h: Likewise. + * src/concept-inst.cc: Likewise. + * src/limits.cc: Likewise. + * include/c_shadow/stdlib.h: Compile conditionally on _GLIBCPP_USE_C99 + instead of _GLIBCPP_USE_LONG_LONG. + * include/c_shadow/bits/std_cstdlib.h: Likewise. + +2001-11-02 Phil Edwards + + * config/io/c_io_stdio.h: Correct grammar in comments. + * docs/doxygen/Intro.3: Expand "top-level" man page. + * docs/doxygen/doxygroups.cc: New module definitions (comments). + * docs/doxygen/mainpage.doxy: Tweaks. + * docs/doxygen/run_doxygen: Update Doxygen version, massage man pages. + + Add @file hooks so that headers are considered to be documented. + * include/bits/basic_ios.h, include/bits/basic_file.h, + include/bits/basic_string.h, include/bits/boost_concept_check.h, + include/bits/char_traits.h, include/bits/codecvt.h, + include/bits/concept_check.h, include/bits/cpp_type_traits.h, + include/bits/fpos.h, include/bits/gslice.h, include/bits/gslice_array.h, + include/bits/indirect_array.h, include/bits/ios_base.h, + include/bits/locale_facets.h, include/bits/localefwd.h, + include/bits/mask_array.h, include/bits/pthread_allocimpl.h, + include/bits/slice.h, include/bits/slice_array.h, + include/bits/std_algorithm.h, include/bits/std_bitset.h, + include/bits/std_complex.h, include/bits/std_deque.h, + include/bits/std_fstream.h, include/bits/std_functional.h, + include/bits/std_iomanip.h, include/bits/std_ios.h, + include/bits/std_iosfwd.h, include/bits/std_iostream.h, + include/bits/std_istream.h, include/bits/std_iterator.h, + include/bits/std_limits.h, include/bits/std_list.h, + include/bits/std_locale.h, include/bits/std_map.h, + include/bits/std_memory.h, include/bits/std_numeric.h, + include/bits/std_ostream.h, include/bits/std_queue.h, + include/bits/std_set.h, include/bits/std_sstream.h, + include/bits/std_stack.h, include/bits/std_streambuf.h, + include/bits/std_string.h, include/bits/std_utility.h, + include/bits/std_valarray.h, include/bits/std_vector.h, + include/bits/stl_algo.h, include/bits/stl_alloc.h, + include/bits/stl_bvector.h, include/bits/stl_construct.h, + include/bits/stl_deque.h, include/bits/stl_heap.h, + include/bits/stl_iterator.h, include/bits/stl_iterator_base_funcs.h, + include/bits/stl_iterator_base_types.h, include/bits/stl_list.h, + include/bits/stl_map.h, include/bits/stl_multimap.h, + include/bits/stl_multiset.h, include/bits/stl_numeric.h, + include/bits/stl_pair.h, include/bits/stl_pthread_alloc.h, + include/bits/stl_queue.h, include/bits/stl_raw_storage_iter.h, + include/bits/stl_relops.h, include/bits/stl_set.h, + include/bits/stl_stack.h, include/bits/stl_tempbuf.h, + include/bits/stl_threads.h, include/bits/stl_tree.h, + include/bits/stl_uninitialized.h, include/bits/stl_vector.h, + include/bits/stream_iterator.h, include/bits/streambuf_iterator.h, + include/bits/stringfwd.h, include/bits/type_traits.h, + include/bits/valarray_array.h, include/bits/valarray_meta.h: + Add hooks, tweak comments only. + + * include/bits/stl_algobase.h (swap, min, iter_swap): Also + document these functions. + * include/bits/stl_function.h: Tweak link comments. + +2001-11-01 Paolo Carlini + Benjamin Kosnik + + * testsuite/27_io/ios_manip_fmtflags.cc: Fix for non-interactive + output. + * include/bits/locale_facets.tcc (num_put::do_put(bool)): Fix. + +2001-11-01 Egor Duda + + * config/os/newlib/bits/ctype_noninline.h + (ctype::do_toupper(char __c)): Check for proper character class. + (ctype::do_tolower(char __c)): Ditto. + +2001-11-01 Phil Edwards + + * acinclude.m4: Fix spacing. + (GLIBCPP_ENABLE_CONCEPT_CHECKS): New macro. + * configure.in: Call here. + * acconfig.h: Add _GLIBCPP_CONCEPT_CHECKS. + * include/bits/boost_concept_check.h: Fix headers. + (__function_requires): Make inline. + * include/bits/c++config (_GLIBCPP_CONCEPT_CHECKS): Remove. + * aclocal.m4: Regenerate. + * config.h.in: Regenerate. + * configure: Regenerate. + + Move trailing ';' inside macro, PR libstdc++/3666. + * include/bits/concept_check.h: Add semicolon. + * include/bits/stl_algo.h: Remove semicolon. + * include/bits/stl_algobase.h: Likewise. + * include/bits/stl_deque.h: Likewise. + * include/bits/stl_heap.h: Likewise. + * include/bits/stl_iterator_base_funcs.h: Likewise. + * include/bits/stl_list.h: Likewise. + * include/bits/stl_map.h: Likewise. + * include/bits/stl_multimap.h: Likewise. + * include/bits/stl_multiset.h: Likewise. + * include/bits/stl_numeric.h: Likewise. + * include/bits/stl_queue.h: Likewise. + * include/bits/stl_set.h: Likewise. + * include/bits/stl_stack.h: Likewise. + * include/bits/stl_vector.h: Likewise. + * include/ext/hash_map: Likewise. + * include/ext/hash_set: Likewise. + * include/ext/slist: Likewise. + + * src/concept-inst.cc: New file with explicit instantiations. + * src/Makefile.am (sources): Add here, with special build rules. + * src/Makefile.in: Regenerate. + +2001-11-01 Gabriel Dos Reis + + * include/bits/std_complex.h (_Norm_helper): New class template. + (norm): Tweak. + (abs): Tweak. Fix Thinko. + +2001-10-31 Benjamin Kosnik + + libstdc++/4749 + * include/bits/codecvt.h: Add virtual member function declarations. + * src/codecvt.cc: Tweaks. + * testsuite/22_locale/codecvt.cc: Test compilation only, + non-required facets not required to have linkage. + +2001-10-31 Edward E. Meyer + + libstdc++/4622 + * include/bits/std_complex.h (complex::operator/=): Correct sign. + +2001-10-30 Paolo Carlini + Benjamin Kosnik + + libstdc++/4354 + * include/bits/basic_string.h: Tweaks. + * include/bits/basic_string.tcc (string::_M_replace(iterator, + iterator, _ForwardIter, _ForwardIter, forward_iterator_tag): Fix. + * src/string-inst.cc: Tweaks, add instantiation. + * testsuite/21_strings/replace.cc (test02): Add test. + * testsuite/21_strings/assign.cc (test01): New file. + +2001-10-30 Jakub Jelinek + + * include/bits/stl_deque.h (_M_new_elements_at_front): Use + __throw_exception_again. + (_M_new_elements_at_back): Likewise. + +2001-10-29 Benjamin Kosnik + + libstdc++/3647 + * include/bits/fstream.tcc (filebuf::showmanyc): Simplify. + * testsuite/27_io/filebuf.cc (test07): New test. + (test03): Modify showmanyc test. + +2001-10-26 Benjamin Kosnik + + libstdc++/4503 + * config/locale/codecvt_specializations_ieee_1003.1-200x.h + (__enc_traits::~__enc_traits): Fix. + (__enc_traits::_M_init): Add error checking. + +2001-10-25 Benjamin Kosnik + + libstdc++/4542 + * include/bits/locale_facets.tcc (time_get::_M_extract_name): Fix. + +2001-10-25 Benjamin Kosnik + + libstdc++/4545 + * include/bits/ostream.tcc (ostream::operator<<(streambuf*)): Fix + exceptions. + * include/bits/istream.tcc (istream::operator>>(streambuf*): Make + consistent, where possible. + * include/bits/streambuf.tcc: Tweak. + +2001-10-25 Brendan Kehoe + + libstdc++/4536 + * bits/ostream.tcc (seekp): Scope use as ios_base::failbit. + * bits/istream.tcc (seekg): Likewise. + +2001-10-25 Benjamin Kosnik + Peter Schmid + Ulrich Weigand + + * config/os/gnu-linux/bits/os_defines.h: Set to 64 bit longs with + __s390x__ only. + * include/bits/std_limits.h: Fix wchar_t issues. + * config/os/aix/bits/os_defines.h: Fix. + +2001-10-25 Benjamin Kosnik + + * include/bits/locale_facets.tcc (collate::do_transform): Fix. + +2001-10-25 Phil Edwards + + * docs/html/documentation.html: Fix typo. + +2001-10-23 Benjamin Kosnik + + Make -fno-exceptions work. + * config/locale/c_locale_gnu.cc: Use functexcept. + * include/bits/c++config (__stl_assert): Remove. + (__STL_USE_EXCEPTIONS): Same. + (__STL_TRY): Same. + (__STL_CATCH_ALL): Same. + (__STL_THROW): Same. + (__STL_RETHROW): Same. + (__STL_NOTHROW): Same. + (__STL_UNWIND): Same. + * include/bits/pthread_allocimpl.h: Fix. + * include/bits/std_bitset.h: Same. + * include/bits/std_list.h: Same. + * include/bits/std_memory.h: Same. + * include/bits/std_queue.h: Same. + * include/bits/stl_alloc.h: Same. + * include/bits/stl_deque.h: Same. + * include/bits/stl_list.h: Same. + * include/bits/stl_queue.h: Same. + * include/bits/stl_tempbuf.h: Same. + * include/bits/stl_tree.h: Same. + * include/bits/stl_uninitialized.h: Same. + * include/bits/stl_vector.h: Same. + * include/ext/ropeimpl.h: Same. + * include/ext/slist: Same. + * include/ext/stl_hashtable.h: Same. + * include/ext/stl_rope.h: Same. + * libsupc++/new_op.cc: Include cstdlib. + * libsupc++/eh_personality.cc: Add exception_defines include. Use + __throw_exception_again, tweak. + * libsupc++/eh_aux_runtime.cc: Include stdlib for abort. + * libsupc++/vec.cc: Tweak. + * src/functexcept.cc: Remove unused arguments. + * testsuite/23_containers/bitset_members.cc: Tweak. + +2001-10-22 Benjamin Kosnik + + * config/cpu/i386/bits/limits.h: Move to... + * config/cpu/i386/bits/cpu_limits.h: ...here. + * config/cpu/cris/bits/cpu_limits.h: Same. + * config/cpu/powerpc/bits/cpu_limits.h: Same. + * config/cpu/x86-64/bits/cpu_limits.h: Same. + * config/cpu/alpha/bits/cpu_limits.h: New. + * config/cpu/m68k/bits/cpu_limits.h: New. + * config/cpu/s390/bits/cpu_limits.h: New. + * config/os/aix/bits/os_defines.h: Tweaks. + * config/os/bsd/freebsd/bits/os_defines.h: Same. + * config/os/bsd/netbsd/bits/os_defines.h: Same. + * config/os/djgpp/bits/os_defines.h: Same. + * config/os/generic/bits/os_defines.h: Same. + * config/os/gnu-linux/bits/os_defines.h: Same. + * config/os/hpux/bits/os_defines.h: Same. + * config/os/irix/irix5.2/bits/os_defines.h: Same. + * config/os/irix/irix6.5/bits/os_defines.h: Same. + * config/os/newlib/bits/os_defines.h: Same. + * config/os/solaris/solaris2.5/bits/os_defines.h: Same. + * config/os/solaris/solaris2.6/bits/os_defines.h: Same. + * config/os/solaris/solaris2.7/bits/os_defines.h: Same. + + * include/bits/c++config: Remove include. + * include/bits/limits_generic.h: Remove. + * include/bits/std_limits.h: Include cpu_limits.h. + * include/Makefile.am: Fixup. + * src/limits.cc: Tweak. + * src/limits_generic.cc: Remove. + * src/gen-num-limits.cc: Remove. + * mknumeric_limits: Remove. + +2001-10-20 Brendan Kehoe + + * bits/type_traits.h (_Bool): Removed this type. + (__true_type, __false_type): Change to be plain structs. + * src/string-inst.cc (__destroy_aux): Change third parm to be + __false_type instead of _Bool. + * src/misc-inst.cc (__uninitialized_fill_n_aux, + __uninitialized_copy_aux): Likewise. + +2001-10-19 Benjamin Kosnik + + * mkcheck.in (static_fail): Remove older memory limit functionality. + Disable E_TIME due to formatting issues. + + * README: Update. + +2001-10-19 Brendan Kehoe + + * include/bits/std_complex.h: Default initialize second argument + of polar to 0, as specified in Library DR #79 + +2001-10-19 Brendan Kehoe + + * include/bits/stl_raw_storage_iter.h (operator=): Fix to call + _Construct instead of construct. + +2001-10-19 Brendan Kehoe + + * include/bits/basic_string.tcc (find_first_not_of): Take out check for + __n being non-zero, since the standard does not mandate that. + e.g., a search for "" in "" should yield position 0, not npos. + (find_last_not_of): Likewise. + +2001-10-19 Brendan Kehoe + + * include/bits/stl_bvector.h (vector::_M_range_check): Fix + to throw out_of_range, not range_error, thus sayeth $23.1.1.13. + +2001-10-19 Brendan Kehoe + + * include/bits/stl_iterator.h (reverse_iterator::current): Rename + member from _M_current, and change all uses; thus sayeth $24.4.1.1. + +2001-10-19 Brendan Kehoe + + * include/bits/stl_algo.h (partial_sort): Add missing `>' on the + template parameter _ValueType. + +2001-10-19 Brendan Kehoe + + * include/bits/std_limits.h: Clean up extra semicolons. + * include/bits/locale_facets.h: Likewise. + * include/bits/type_traits.h: Likewise. + +2001-10-19 Brendan Kehoe + + * include/bits/localefwd.h (locale::combine): Add const for lib DR 14. + * include/bits/locale_facets.tcc (locale::combine): Likewise. + +2001-10-19 Benjamin Kosnik + + * include/bits/locale_facets.h (__timepunct::_M_put_helper): + Declare specializations for char, wchar_t. + +2001-10-19 Andreas Jaeger + + * config/cpu/x86-64/bits/limits.h: New file. + * config/cpu/x86-64/bits/atomicity.h: New file. + * configure.target: Add x86-64. + +2001-10-17 Phil Edwards + + * docs/html/17_intro/howto.html: Remove 1999 links (and explain + why). Add link to recent message. + * docs/html/faq/index.html (5.6): Reformat text only; fixup
+	markup.
+	* docs/html/faq/index.txt:  Regenerate.
+
+2001-10-12  Loren J. Rittle  
+
+	* docs/html/faq/index.html (Is libstdc++-v3 thread-safe?): Update
+	based on Nathan's review.  Use Nathan's words.
+
+2001-10-11  Matt Kraai  
+
+	* docs/html/configopts.html: Quote StyleSheet attribute values.
+	* docs/html/documentation.html: Likewise.
+	* docs/html/explanations.html: Likewise.
+	* docs/html/install.html: Likewise.
+	* docs/html/17_intro/howto.html: Likewise.
+	* docs/html/17_intro/license.html: Likewise.
+	* docs/html/18_support/howto.html: Likewise.
+	* docs/html/19_diagnostics/howto.html: Likewise.
+	* docs/html/20_util/howto.html: Likewise.
+	* docs/html/21_strings/howto.html: Likewise.
+	* docs/html/22_locale/howto.html: Likewise.
+	* docs/html/23_containers/howto.html: Likewise.
+	* docs/html/24_iterators/howto.html: Likewise.
+	* docs/html/25_algorithms/howto.html: Likewise.
+	* docs/html/26_numerics/howto.html: Likewise.
+	* docs/html/27_io/howto.html: Likewise.
+	* docs/html/ext/howto.html: Likewise.
+	* docs/html/ext/sgiexts.html: Likewise.
+	* docs/html/faq/index.html: Likewise.
+
+2001-10-11  Loren J. Rittle  
+
+	* docs/html/faq/index.html (Is libstdc++-v3 thread-safe?): Rewrite.
+	* docs/html/23_containers/howto.html (Containers and multithreading):
+	Update.
+
+2001-10-09  Phil Edwards  
+
+	* docs/html/17_intro/howto.html:  Tweak markup and value type.
+	* docs/html/27_io/howto.html:  Tweak markup, describe setbuf() for
+	nonzero arguments, add new note on threading.
+	* docs/html/faq/index.html:  Update.
+	* docs/html/faq/index.txt:  Regenerate.
+
+2001-10-09  Phil Edwards  
+
+	* docs/html/configopts.html:  More HTML->XHTML and lowercasing of tags.
+	* docs/html/documentation.html:  Likewise.
+	* docs/html/explanations.html:  Likewise.
+	* docs/html/install.html:  Likewise.
+	* docs/html/17_intro/howto.html:  Likewise.
+	* docs/html/17_intro/license.html:  Likewise.  Tighten up language.
+	* docs/html/18_support/howto.html:  Likewise.
+	* docs/html/19_diagnostics/howto.html:  Likewise.
+	* docs/html/20_util/howto.html:  Likewise.
+	* docs/html/21_strings/howto.html:  Likewise.
+	* docs/html/22_locale/howto.html:  Likewise.
+	* docs/html/23_containers/howto.html:  Likewise.
+	* docs/html/24_iterators/howto.html:  Likewise.
+	* docs/html/25_algorithms/howto.html:  Likewise.
+	* docs/html/26_numerics/howto.html:  Likewise.
+	* docs/html/27_io/howto.html:  Likewise.
+	* docs/html/ext/howto.html:  Likewise.
+	* docs/html/ext/sgiexts.html:  Likewise.
+	* docs/html/faq/index.html:  Likewise.  Not so many absolute links.
+	* docs/html/faq/index.txt:  Regenerate.
+
+2001-10-07  Joseph S. Myers  
+
+	* docs/html/22_locale/locale.html, docs/html/faq/index.html: Fix
+	spelling errors of "separate" as "seperate", and corresponding
+	spelling errors of related words.
+	* docs/html/faq/index.txt: Regenerate.
+
+2001-10-05  Phil Edwards  
+
+	* config/cpu/alpha/bits/atomicity.h (__compare_and_swap):  Remove
+	unused function.
+	* config/cpu/arm/bits/atomicity.h:  Likewise.
+	* config/cpu/generic/bits/atomicity.h:  Likewise.
+	* config/cpu/i486/bits/atomicity.h:  Likewise.
+	* config/cpu/ia64/bits/atomicity.h:  Likewise.
+	* config/cpu/mips/bits/atomicity.h:  Likewise.
+	* config/cpu/powerpc/bits/atomicity.h:  Likewise.
+	* config/cpu/sparc/sparc32/bits/atomicity.h:  Likewise.
+	* config/cpu/sparc/sparc64/bits/atomicity.h:  Likewise.
+
+2001-10-04  Phil Edwards  
+
+	* docs/html/faq/index.html:  Describe DR #22, and a workaround.
+	* docs/html/faq/index.txt:  Regenerate.
+
+2001-10-04  Phil Edwards  
+
+	* docs/html/17_intro/COPYING.DOC:  New file, GFDL v1.1 from the FSF.
+	* docs/html/17_intro/license.html:  New file.  Explain the licenses
+	in use.
+
+	* docs/html/configopts.html:  Link to license.html.
+	* docs/html/documentation.html:  Likewise.
+	* docs/html/explanations.html:  Likewise.
+	* docs/html/install.html:  Likewise.
+	* docs/html/17_intro/howto.html:  Likewise.
+	* docs/html/18_support/howto.html:  Likewise.
+	* docs/html/19_diagnostics/howto.html:  Likewise.
+	* docs/html/20_util/howto.html:  Likewise.
+	* docs/html/21_strings/howto.html:  Likewise.
+	* docs/html/22_locale/howto.html:  Likewise.
+	* docs/html/23_containers/howto.html:  Likewise.
+	* docs/html/24_iterators/howto.html:  Likewise.
+	* docs/html/25_algorithms/howto.html:  Likewise.
+	* docs/html/26_numerics/howto.html:  Likewise.
+	* docs/html/27_io/howto.html:  Likewise.
+	* docs/html/ext/howto.html:  Likewise.
+	* docs/html/ext/sgiexts.html:  Likewise.
+	* docs/html/faq/index.html:  Likewise.  New question, linking to
+	the new license.html.
+
+2001-10-04  Phil Edwards  
+
+	* docs/html/17_intro/howto.html:  Fix mis-sed in header from 20010917.
+	* docs/html/18_support/howto.html:  Likewise.
+	* docs/html/19_diagnostics/howto.html:  Likewise.
+	* docs/html/20_util/howto.html:  Likewise.
+	* docs/html/21_strings/howto.html:  Likewise.
+	* docs/html/22_locale/howto.html:  Likewise.
+	* docs/html/23_containers/howto.html:  Likewise.
+	* docs/html/24_iterators/howto.html:  Likewise.
+	* docs/html/25_algorithms/howto.html:  Likewise.
+	* docs/html/26_numerics/howto.html:  Likewise.
+	* docs/html/27_io/howto.html:  Likewise.
+	* docs/html/ext/howto.html:  Likewise.
+	* docs/html/faq/index.html:  Likewise.  Spacing fix.
+
+2001-10-03  Dimitris Vyzovitis  
+
+	* include/bits/stl_threads.h (_Atomic_swap): New function.
+	(_Swap_lock_struct<__dummy>::_S_swap_lock): New data.
+	* testsuite/ext/rope.cc: New file.
+
+2001-10-02  Benjamin Kosnik  
+
+	* config/locale/time_members_gnu.h: Remove.
+	* config/locale/time_members_generic.h: Remove.
+	* config/locale/time_members_gnu.cc (__timepunct::_M_put_helper): Add.
+	* config/locale/time_members_generic.cc: Same.
+	* include/bits/locale_facets.h: Add data members.
+	(__timepunct::_M_put_helper): Change signature.
+	(__timepunct::_M_date_formats): Same.
+	(__timepunct::_M_time_formats): Same.
+	(__timepunct::_M_ampm): Add.
+	(__timepunct::_M_date_time_formats): Add.
+	(time_get::_M_extract_via_format): Add.
+	(time_get::_M_extract_time): Change to...
+	(time_get::_M_extract_num): ... this, modify signature.
+	* include/bits/locale_facets.tcc (time_get::do_get_year): Fix.
+	(time_get::do_get_time): Fix.
+	(time_get::do_get_date): Fix.
+
+	* acinclude.m4: Remove CTIME_H.
+	* aclocal.m4: Regenerate.
+	* include/Makefile.am: Same.
+	* include/Makefile.in: Regenerate.
+	* configure: Regenerate.
+
+	* testsuite/22_locale/time_get_members_char.cc: Fix.
+	* testsuite/22_locale/time_get_members_wchar_t.cc: Add.
+	* testsuite/22_locale/time_put_members_wchar_t.cc: Add.
+
+2001-10-01  Hans-Peter Nilsson  
+
+	* config/cpu/cris/bits/atomicity.h: Correct file header.
+
+2001-09-29  Hans-Peter Nilsson  
+
+	* configure.target (LIMITSH): Set for cris.
+	(cpu_include_dir): Set for cris-*-*.
+	* config/cpu/cris/bits/atomicity.h: New file.
+	* config/cpu/cris/bits/limits.h: New file.
+
+2001-09-28  Benjamin Kosnik  
+
+	* config/locale/time_members_gnu.h (__timepunct::_M_get_helper): Add.
+	(__timepunct::_M_put_helper): Add.
+	* config/locale/time_members_generic.h: Same.
+	* include/bits/locale_facets.h (__match_parallel): Remove. Format.
+	(__timepunct): Add data members.
+	(__timepunct::_M_days): Add.
+	(__timepunct::_M_days_abbreviated): Add.
+	(__timepunct::_M_months): Add.
+	(__timepunct::_M_months_abbreviated): Add.
+	(__timepunct::_M_initialize_timepunct): Add.
+	* include/bits/locale_facets.tcc: Same.
+	* src/locale-inst.cc: Remove instantiations for __match_parallel.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_CC.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* testsuite/22_locale/time_put_members_char.cc: Mark XFAIL.
+	* testsuite/22_locale/time_put_members_char.cc (test01): New file.
+	* testsuite/22_locale/time_get.cc: New file.
+
+2001-09-28  Rainer Orth  
+
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Use
+	correct multilib builddir.
+	Properly locate libgcc_s.
+
+2001-09-27  Phil Edwards  
+
+	* include/std/*:  Add Doxygen hooks.
+	* docs/doxygen/Intro.3:  New file, general intro to the man pages.
+	* docs/doxygen/mainpage.doxy:  Formatting tweaks.  List our own links
+	rather than using a generated index.
+	* docs/doxygen/user.cfg.in:  Disable the index, enable man pages.
+	* docs/doxygen/run_doxygen:  Massage the generated man pages, using...
+	* docs/doxygen/stdheader.cc:  ...this new file.
+
+2001-09-26  Stan Shebs  
+
+	* include/Makefile.am: Remove RCS Id strings.
+	* src/Makefile.am: Ditto.
+	* docs/doxygen/run_doxygen: Ditto.
+	* docs/html/configopts.html: Ditto.
+	* docs/html/documentation.html: Ditto.
+	* docs/html/explanations.html: Ditto.
+	* docs/html/install.html: Ditto.
+	* docs/html/17_intro/howto.html: Ditto.
+	* docs/html/18_support/howto.html: Ditto.
+	* docs/html/19_diagnostics/howto.html: Ditto.
+	* docs/html/20_util/howto.html: Ditto.
+	* docs/html/21_strings/howto.html: Ditto.
+	* docs/html/22_locale/howto.html: Ditto.
+	* docs/html/23_containers/howto.html: Ditto.
+	* docs/html/24_iterators/howto.html: Ditto.
+	* docs/html/25_algorithms/howto.html: Ditto.
+	* docs/html/26_numerics/howto.html: Ditto.
+	* docs/html/27_io/howto.html: Ditto.
+	* docs/html/ext/howto.html: Ditto.
+	* docs/html/ext/sgiexts.html: Ditto.
+	* docs/html/faq/index.html: Ditto.
+	* docs/html/faq/index.txt: Ditto.
+
+2001-09-25  Phil Edwards  
+
+	* testsuite/21_strings/c_strings.cc (test01, test02):  Increase
+	`carray' size.
+
+2001-09-25  Phil Edwards  
+
+	* docs/html/20_util/howto.html:  Add anchor name.
+	* docs/html/23_containers/howto.html:  Line wrapping, another link.
+	* docs/html/25_algorithms/howto.html:  Another note.
+
+	* docs/html/ext/howto.html:  Link to SGI extensions.  List DRs and
+	link to them...
+	* docs/html/ext/lwg-active.html:  ...in this new file (from R19),
+	* docs/html/ext/lwg-defects.html:  and this new file (from R19).
+	* docs/html/ext/sgiexts.html:  New file.  Mention SGI extensions
+	carried over to libstdc++-v3.
+	* docs/html/faq/index.html:  Link to SGI extensions.  Mention the
+	"missing .." pseudobug.
+	* docs/html/faq/index.txt:  Regenerate.
+
+	* include/bits/ios_base.h:  DR-related comment cleanup.
+	* include/bits/istream.tcc:  Likewise.
+	* include/bits/locale_facets.h:  Likewise.
+	* include/bits/locale_facets.tcc:  Likewise.
+	* include/bits/ostream.tcc:  Likewise.
+	* include/bits/std_bitset.h:  Likewise.
+	* include/bits/std_iosfwd.h:  Likewise.
+	* include/bits/std_istream.h:  Likewise.
+	* include/bits/std_ostream.h:  Likewise.
+	* include/bits/std_streambuf.h:  Likewise.
+	* include/bits/stl_pair.h:  Likewise.
+	* include/bits/streambuf_iterator.h:  Likewise.
+
+	* include/bits/std_map.h:  Remove unused header inclusion guard
+	_CPP_BITS_STL_TREE_H from around bits/stl_tree.h.
+	* include/bits/std_set.h:  Likewise.
+
+	* include/bits/stl_function.h:  Doxygen markup.
+	* docs/doxygen/doxygroups.cc:  New file, specifying module grouping.
+	* libsupc++/typeinfo:  Doxygen markup tweak.
+
+2001-09-20  Scott Johnston 
+	    Peter Schmid 
+
+	* include/backward/alloc.h: Conditionally define malloc_alloc
+	* testsuite/backward/header_deque_h.cc: New file.
+
+2001-09-20  Sylvain Pion 
+
+	* libstdc++-v3/include/bits/locale_facets.tcc (money_put::do_put):
+	change variable name so that it works with -fno-for-scope.
+
+2001-09-20  Benjamin Kosnik  
+
+	* testsuite/22_locale/numpunct_members_char.cc (test01): Remove
+	redundant sanity checks.
+	* testsuite/22_locale/money_put_members_wchar_t.cc (test01): Same.
+	(test02): Same.
+	* testsuite/22_locale/money_put_members_char.cc (test01): Same.
+	(test02): Same.
+	* testsuite/22_locale/moneypunct_members_wchar_t.cc (test01): Same.
+	* testsuite/22_locale/moneypunct_members_char.cc (test01): Same.
+	* testsuite/22_locale/money_get_members_wchar_t.cc (test01): Same.
+	(test02): Same.
+	* testsuite/22_locale/money_get_members_char.cc (test01): Same.
+	(test02): Same.
+
+2001-09-19  Benjamin Kosnik  
+
+	Implement std::time_put.
+	* include/bits/locale_facets.h: Include time_members.h.
+	(__timepunct): New.
+	(time_put): Implement.
+	* include/bits/locale_facets.tcc (do_put): Put generic versions here.
+	* include/bits/localefwd.h: Bump number of facets.
+	* config/locale/time_members_generic.h: New file.
+	* config/locale/time_members_gnu.h: New file.
+	* config/locale/c_locale_generic.h: Include clocale.
+	* src/locale-inst.cc: Add use_facet instantiations for __timepunct.
+	* src/locale.cc: Add __timepunct initializations.
+	* src/localename.cc (locale::_Impl::_Impl(string, size_t)): Same.
+	* include/Makefile.am (stamp-target): Add time_members.h.
+	* include/Makefile.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add CTIME_H.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* testsuite/22_locale/time_put.cc: New file.
+	* testsuite/22_locale/time_put_members_char.cc: New file.
+
+	* docs/html/22_locale/locale.html: Add note.
+
+2001-09-17  Phil Edwards  
+
+	* docs/html/configopts.html:  HTML to XHTML change.  Lowercase tags.
+	* docs/html/documentation.html:  Likewise.
+	* docs/html/explanations.html:  Likewise.
+	* docs/html/install.html:  Likewise.
+	* docs/html/17_intro/howto.html:  Likewise.
+	* docs/html/18_support/howto.html:  Likewise.
+	* docs/html/19_diagnostics/howto.html:  Likewise.
+	* docs/html/20_util/howto.html:  Likewise.
+	* docs/html/21_strings/howto.html:  Likewise.
+	* docs/html/22_locale/codecvt.html:  Likewise.
+	* docs/html/22_locale/ctype.html:  Likewise.
+	* docs/html/22_locale/howto.html:  Likewise.
+	* docs/html/22_locale/locale.html:  Likewise.
+	* docs/html/22_locale/messages.html:  Likewise.
+	* docs/html/23_containers/howto.html:  Likewise.
+	* docs/html/24_iterators/howto.html:  Likewise.
+	* docs/html/25_algorithms/howto.html:  Likewise.
+	* docs/html/26_numerics/howto.html:  Likewise.
+	* docs/html/27_io/howto.html:  Likewise.
+	* docs/html/ext/howto.html:  Likewise.
+	* docs/html/faq/index.html:  Likewise.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-09-14  Phil Edwards  
+
+	* docs/html/17_intro/headers_cc.txt:  "Sync"/copy real file over.
+	* docs/html/17_intro/howto.html:  Spacing and HTML markup fixes.
+	* docs/html/18_support/howto.html:  It won't compile; it's not code.
+	* docs/html/19_diagnostics/howto.html:  Point diagram seekers to
+	doxygen'd pages.
+	* docs/html/22_locale/howto.html:  Comment for future work.
+	* docs/html/23_containers/howto.html:  More comments.
+	* docs/html/25_algorithms/howto.html:  It's a comment, not a
+	blunt command to the reader.  (English grammar.)
+
+2001-09-14  Benjamin Kosnik  
+
+	* config/locale/moneypunct_members_gnu.cc: Fix initialization of
+	wchar_t members.
+	* testsuite/22_locale/money_get_members_wchar_t.cc (test02): New file.
+	* testsuite/22_locale/money_put_members_wchar_t.cc (test02): Fix.
+
+2001-09-14  Benjamin Kosnik  
+
+	* include/bits/locale_facets.tcc: Conditionalize use of strtold.
+
+2001-09-13  Alexandre Petit-Bianco  
+
+	* testsuite/22_locale/money_get_members_char.cc: Fixed typo in comment.
+	* testsuite/22_locale/money_put_members_char.cc: Likewise.
+	* testsuite/22_locale/money_put_members_wchar_t.cc: Likewise.
+
+2001-09-13  Benjamin Kosnik  
+
+	Implement std::money_get.
+	* include/bits/locale_facets.tcc (money_get::do_get): Implement.
+	* include/bits/locale_facets.h (money_get): Correct signatures.
+	* testsuite/22_locale/money_get.cc: New file.
+	* testsuite/22_locale/money_get_members_char.cc: New file.
+
+	* include/bits/locale_facets.tcc (__verify_grouping): New
+	function. Consolidate num_get and money_get group checking into
+	one function.
+	(money_get): Use it.
+	* src/locale.cc (num_get::_M_extract): Use it.
+	* src/locale-inst.cc: Add instantiation.
+
+2001-09-12  Gabriel Dos Reis  
+
+	* include/bits/std_limits.h (numeric_limits::radix,
+	numeric_limits::epsilon:  Fix thinko.
+
+2001-09-10  Benjamin Kosnik  
+
+	* configure.in: Fix cross compiling math routines. Correct
+	comments for cross compiling and limits. Add floating point math
+	routines found in newlib.
+	* configure: Regenerate.
+	* acconfig.h: Add macros.
+	* config.h.in: Regenerate.
+
+2001-09-10  Benjamin Kosnik  
+
+	* config/locale/moneypunct_members_generic.cc
+	(money_base::_S_construct_pattern): Remove unused parameters.
+
+2001-09-10  Benjamin Kosnik  
+
+	* include/Makefile.am (stamp-target): Remove link to self.
+	* inclulde/Makefile.in: Regenerate.
+
+2001-09-09  Benjamin Kosnik  
+
+	Implement std::money_put.
+	* include/bits/locale_facets.h
+	(moneypunct::_M_initialize_moneypunct): Split up specializations
+	to account for _Intl.  More grody hacking to get around the
+	ill-considered use of const bool as a template parameter.
+	* config/locale/moneypunct_members_gnu.cc: And here.
+	* config/locale/moneypunct_members_generic.cc: And here.
+	* testsuite/22_locale/moneypunct_members_char.cc: Add tests.
+	* testsuite/22_locale/moneypunct.cc: Add tests.
+	* testsuite/22_locale/money_put_members_wchar_t.cc: New file.
+	* testsuite/22_locale/moneypunct_members_wchar_t.cc: New file.
+
+	* src/locale.cc (money_base::_S_construct_pattern): Move into
+	gnu-specific file.
+	* config/locale/moneypunct_members_gnu.cc: Add here.
+	* config/locale/moneypunct_members_generic.cc: Add generic version
+	here.
+
+	* include/bits/locale_facets.tcc (money_put::do_put): Move member
+	function definitions here.
+	* include/bits/locale_facets.h (money_put): Implement.
+	* src/locale-inst.cc: Add use_facet instantiations for moneypunct.
+	Correct money_get, money_put instantiations.
+	* src/locale.cc (money_base::_S_construct_pattern): Handle case
+	where __posn == 0.
+	* testsuite/22_locale/money_put_members_char.cc: Add tests.
+
+2001-09-05  Phil Edwards  
+
+	* testsuite_flags.in:  No longer need to search testsuite builddir.
+	* src/stl-inst.cc (__sink_unused_warning):  Unused, remove.
+	* Makefile.am:  The testsuite directory never needs to be made here.
+	* Makefile.in:  Regenerate.
+	* include/Makefile.in:  Regenerate.
+	* libio/Makefile.in:  Regenerate.
+	* libmath/Makefile.in:  Regenerate.
+	* libsupc++/Makefile.in:  Regenerate.
+	* po/Makefile.in:  Regenerate.
+	* src/Makefile.in:  Regenerate.
+	* testsuite/Makefile.in:  Regenerate.
+
+2001-09-04  Scott Johnston  
+	    Peter Schmid  
+
+	* include/backward/iterator.h: Include ,
+	remove reverse_bidirectional_iterator.
+	* testsuite/backward: New directory.
+	* testsuite/backward/header_iterator_h.cc: New file.
+
+2001-09-04  Benjamin Kosnik  
+
+	* include/c_std/bits/std_c*.h: Don't use include_next.
+
+2001-09-03  Richard Sandiford  
+
+	* libsupc++/eh_personality.cc (parse_lsda_header): Change type of
+	tmp from _Unwind_Ptr to _Unwind_Word.
+
+2001-08-31  Jason Merrill  
+
+	* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Simplify
+	leb128 handling.
+
+2001-08-28  Loren J. Rittle  
+
+	* include/Makefile.am: Use toplevel_srcdir to refer to src files
+	outside this component.
+	* include/Makefile.in: Regenerate.
+
+2001-08-27  Benjamin Kosnik  
+
+	* config/locale/c_locale_gnu.cc: Move facet info to separate files...
+	* config/locale/c_locale_generic.cc: Same.
+	* config/locale/moneypunct_members_gnu.cc: New file.
+	* config/locale/moneypunct_members_generic.cc: New file.
+	* config/locale/numpunct_members_gnu.cc: New file.
+	* config/locale/numpunct_members_generic.cc: New file.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add moneypunct, numpunct
+	options.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* src/Makefile.am (sources): And here.
+	* src/Makefile.in: Regenerate.
+
+	Rename for consistency with rest of testsuite.
+	* testsuite/22_locale/codecvt.cc: New file.
+	* testsuite/22_locale/money_put.cc: New file.
+	* testsuite/22_locale/money_put_members_char.cc: New file.
+
+2001-08-27  Phil Edwards  
+
+	PR libstdc++/4143
+	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO):  Handle enable/disable
+	correctly for version-specific-runtime-libs.
+	* aclocal.m4:  Regenerate.
+	* configure:  Regenerate.
+
+2001-08-24  Loren J. Rittle  
+
+	* config/cpu/i386/bits/limits.h (__glibcpp_long_double_bits): Only
+	define if not already provided by per-OS file.
+	* config/os/bsd/freebsd/bits/os_defines.h (__glibcpp_long_double_bits):
+	Define.
+
+2001-08-24  Jan van Male 
+
+	* docs/html/17_intro/C++STYLE:  Fix typo.
+
+2001-08-24  Phil Edwards  
+
+	* docs/html/23_containers/howto.html:  Describe implementation of
+	insertion with hints.
+
+2001-08-24  Kenny Simpson  
+
+	libstdc++/3740
+	* include/bits/std_sstream.h (basic_ostringstream): Fix ctor.
+
+2001-08-24  Sylvain Pion 
+	    Phil Edwards  
+
+	PR libstdc++/3349
+	* include/bits/stl_tree.h (insert_unique):  Revert last change.
+	Values inserted at begin() must be less, not greater, than *begin()'s.
+	* testsuite/23_containers/map_insert.cc:  New file.
+
+2001-08-23  Benjamin Kosnik  
+
+	* config/locale/c_locale_gnu.cc: Minor tweaks.
+	(moneypunct): Implement.
+	* include/bits/locale_facets.h: Same.
+	* testsuite/22_locale/moneypunct.cc: New file.
+	* testsuite/22_locale/moneypunct_byname.cc: New file.
+	* testsuite/22_locale/moneypunct_char_members.cc: New file.
+
+2001-08-23  David Edelsohn  
+
+	* config/os/gnu-linux/bits/os_defines.h: Correct __s390__ definitions.
+	Set __powerpc__ long double definition based on __LONG_DOUBLE_128__.
+
+2001-08-23  Jason Merrill  
+
+	* testsuite_flags.in (build-includes): Re-add backward.
+
+2001-08-22  Benjamin Kosnik  
+
+	* testsuite/22_locale/collate_wchar_t_members.cc: Guard
+	with _GLIBCPP_USE_WCHAR_T.
+
+2001-08-21  Benjamin Kosnik  
+
+	* testsuite/22_locale/collate_byname.cc (test01): Fix.
+
+2001-08-18  Vladimir A Merzliakov  
+
+	* include/bits/locale_facets.tcc (collate::do_transform): Add typename.
+
+2001-08-18  Benjamin Kosnik  
+
+	* testsuite/22_locale/operators.cc: Add test.
+
+2001-08-17  Benjamin Kosnik  
+
+	Implement std::collate.
+	* config/locale/collate_specializations_gnu.cc: Add here, implement in
+	MT-safe way.
+	* config/locale/collate_specializations_generic.cc: Add here, but
+	in a less sophisticated manner.
+	* include/bits/locale_facets.tcc (collate): Add generic definition.
+	* include/bits/locale_facets.h (~collate): Mark virtual.
+	(collate::_M_compare_helper): New.
+	(collate::_M_transform_helper): New.
+	* src/locale.cc: Remove unnecessary specializations.
+	* src/string-inst.cc: Tweak instantiation of ctors.
+
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Do configury for collate.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* src/Makefile.am (sources): Add collate.cc.
+	* src/Makefile.in: Regenerate.
+
+	* testsuite/22_locale/collate_byname.cc: New.
+	* testsuite/22_locale/collate.cc: New file.
+	* testsuite/22_locale/collate_char_members.cc: New file.
+	* testsuite/22_locale/collate_wchar_t_members.cc: New file.
+
+2001-08-16  Franz Sirl  
+
+	* configure.target: Set LIMITSH for powerpc-*-*.
+	* config/cpu/powerpc/bits/limits.h: New file.
+
+2001-08-16  Marc Espie 
+
+	* configure.in:  Check for .
+	* configure:  Rebuild.
+	* config.h.in:  Rebuild.
+	* libmath/mathconf.h:  Include  prior to
+	 if available.
+
+2001-08-15  Andreas Schwab  
+
+	* configure.target (cpu_include_dir): Set to `config/cpu/m68k' for
+	m68k and m680[246]0.
+	* config/cpu/m68k/bits/atomicity.h: New file.
+
+	* include/bits/std_limits.h [__glibcpp_long_double_bits == 96]:
+	Define appropriate long double limits for m68k extended floating
+	point.
+	(__glibcpp_f32_digits10): Corrected, off by one.
+	(__glibcpp_f80_digits10): Likewise.
+	(__glibcpp_f128_digits10): Likewise.
+	* config/os/gnu-linux/bits/os_defines.h
+	(__glibcpp_long_double_bits) [__mc68000__]: Define to 96.
+
+2001-08-15  Gabriel Dos Reis  
+
+	* testsuite/18_support/numeric_limits.cc: Add more tests.
+	* include/bits/std_limits.h (numeric_limits::max): Fix
+	typo.
+
+2001-08-14  Ulrich Weigand  
+
+	* configure.target (cpu_include_dir): Set to `config/cpu/s390'
+	for s390 and s390x.
+
+	* config/cpu/s390/bits/atomicity.h: New.
+
+2001-08-14  Gabriel Dos Reis  
+
+	* include/bits/std_limits.h: Fix thinko.
+
+2001-08-14  Benjamin Kosnik  
+
+	* include/Makefile.am: Consolidate target rules. Don't clean stamp
+	files. Tweak target build directory stamp.
+	* include/Makefile.in: Regenerate.
+
+2001-08-14  Peter Schmid  
+
+	* libstdc++-v3/libmath/stubs.c: Fix PR/3988, replace
+	_GBLICPP_HAVE_LOGL with HAVE_LOGL
+
+2001-08-13  Benjamin Kosnik  
+
+	* configure.in (libtool_VERSION): Add.
+	(VERSION): Change to
+	(release_VERSION): This.
+	* configure: Regenerate.
+	* src/Makefile.am (libstdc___la_LDFLAGS): Use -version-info with
+	libtool_VERSION.
+	* src/Makefile.in: Regenerate.
+
+	* intl/Makefile.am: Remove.
+	* intl/Makefile.in: Remove.
+	* intl: Remove.
+	* Makefile.am (SUBDIRS): Remove intl.
+	* po/Makefile.am (DISTFILES): Add string_literals.cc
+	(MSGFMT): Add.
+	* po/string_literals.cc: Add.
+	* po/POTFILES.in: Fix path.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Don't call AM_GNU_GETTEXT.
+	* aclocal.m4: Regenerate.
+	* configure.in: Remove AC_OUTPUT of intl/Makefile.
+
+	* include/backward/backward_warning.h: Clarify message.
+
+	* testsuite_flags.in (--cxxflags): Use same debug flags for
+	library and testsuite.
+
+	* include/Makefile.am (c_compatibility): Remove.
+	* include/Makefile.in: Regenerate.
+
+2001-08-13  Mark Mitchell  
+
+	* configure.in (LIMITS_INC_SRCDIR): New variable.
+	* configure.target (LIMITSH): New variable.
+	* porting.texi: Discuss numeric limits.
+	* config/cpu/generic/bits/limits.h: New file.
+	* config/cpu/i386/bits/limits.h: New file.
+	* include/Makefile.am: Install bits/limits.h.
+	* include/bits/c++config: Include bits/limits.h.
+
+2001-08-13  H.J. Lu  (hjl@gnu.org)
+
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-copy-files):
+	New. Copy files.
+	(libstdc++-v3-init ): Use it.
+
+2001-08-13  Gabriel Dos Reis  
+
+	* include/bits/ostream.tcc (__pad_char): Change toplevel '__fmt'
+	to '__adjust' to avoid shadowing in nested scope.
+
+2001-08-10  Gabriel Dos Reis  
+
+	* include/bits/std_limits.h(__glibcpp_char_is_signed): Use
+	__CHAR_UNSIGNED__.
+
+	* config/os/gnu-linux/bits/os_defines.h(__glibcpp_char_is_signed):
+	Likewise.
+	* config/os/aix/bits/os_defines.h(__glibcpp_plain_char_is_signed):
+	Remove.
+
+2001-08-10  Loren J. Rittle  
+
+	* testsuite/testsuite_hooks.h (__set_testsuite_memlimit): Add
+	dummy default argument to the non-limit implementation.
+
+	bootstrap/3963
+	* include/Makefile.am: Use relative file path in rule to allow
+	colon in $(objdir).
+	* include/Makefile.in: Rebuilt.
+
+2001-08-10  Gunter Winkler  
+
+	* include/bits/std_complex.h (complex::operator*=,
+	complex::operator/=): Fix thinko.
+
+2001-08-10  Gabriel Dos Reis  
+
+	* include/bits/std_limits.h: New file.
+	* include/Makefile.am (bits_headers): Add std_limits.h
+	(all-local): std_limits.h is no longer built.
+	(${target_builddir}/std_limits.h): Remove.
+	* include/Makefile.in: Regenerate.
+	* src/limits.cc: New file.
+	* src/Makefile.am (sources): Add limits.cc in replacement of
+	limitsMEMBERS.cc.
+	* src/Makefile.in: Regenerate.
+
+2001-08-09  Gabriel Dos Reis  
+
+	* src/gen-num-limits.cc (digits10): Fix thinko.
+
+2001-08-09  Benjamin Kosnik  
+
+	* po/Makefile.am (check-no): Add.
+	(check-yes): Same.
+	* po/Makefile.in: Regenerate.
+
+2001-08-09  Benjamin Kosnik  
+
+	* acconfig.h (_GLIBCPP_MEM_LIMITS): Define.
+	* config.h.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_CHECK_SETRLIMIT): Check for setrlimit
+	function.
+	* aclocal.m4: Regenerate.
+	* configure.in: Remove duplicate AM_CONFIG_HEADER.
+	(AM_CONFIG_HEADER): Remove testsuite/testsuite_hooks.h.
+	Only call GLIBCPP_CHECK_SETRLIMIT for native compiles.
+	* configure: Regenerate.
+	* testsuite_hooks.h.in: Move to...
+	* testsuite_hooks.h: Here, include c++config.h. Use it.
+
+	* Makefile.am (SUBDIRS): Move testsuite to last directory.
+	* Makefile.in: Regenerate.
+	* po/Makefile.am (stamp-po): Add.
+
+2001-08-09  David Edelsohn  
+
+	* config/os/aix/bits/os_defines.h: Define std_limits.h macros.
+	* config/os/generic/bits/os_defines.h: Likewise.
+	* config/os/gnu-linux/bits/os_defines.h: Likewise.
+	* config/os/hpux/bits/os_defines.h: Likewise.
+	* config/os/irix/irix6.5/bits/os_defines.h: Likewise.
+	* config/os/solaris/solaris2.7/bits/os_defines.h: Likewise.
+
+2001-08-08  Benjamin Kosnik  
+
+	* src/Makefile.am (libstdc___la_LDFLAGS): Use -release instead of
+	-version-info, use substituted VERSION info.
+	* src/Makefile.in: Regenerate.
+
+2001-08-07  Benjamin Kosnik  
+
+	Implement std::messages.
+	Make config a fully-nested directory.
+	* config/locale: New directory.
+	* config/c_locale_generic.cc: Move into locale subdirectory.
+	* config/c_locale_generic.h: Same.
+	* config/c_locale_gnu.cc: Same.
+	* config/c_locale_gnu.h: Same.
+	* config/c_locale_ieee_1003.1-200x.cc: Same.
+	* config/c_locale_ieee_1003.1-200x_.h: Same.
+	* config/codecvt_specializations_generic.h: Same.
+	* config/codecvt_specializations_ieee_1003.1-200x.h: Same.
+	* config/messages_members_gnu.h: Same.
+	* config/messaages_members_gnu.cc: Same.
+	* config/messages_members_generic.h: Same.
+	* config/messaages_members_generic.cc: Same.
+	* config/messages_members_ieee_1003.1-200x.h: Same.
+	* config/messaages_members_ieee_1003.1-200x.cc: Same.
+	* config/io: New directory.
+	* config/basic_file_libio.h: Move into io subdirectory.
+	* config/basic_file_libio.cc: Same.
+	* config/c_io_libio.h: Same.
+	* config/c_io_libio_codecvt.c: Same.
+	* config/basic_file_stdio.h: Same.
+	* config/basic_file_stdio.cc: Same.
+	* config/c_io_stdio.h: Same.
+
+	* po: New directory.
+	* po/POTFILES.in: New file.
+	* po/Makefile.am: New file.
+	* po/Makefile.in: New file.
+	* po/libstdc++.pot: Generic translation file.
+	* po/fr.po: Preliminary French translation.
+	* po/de.po: Preliminary German translation.
+	* intl: New directory.
+	* intl/Makefile.am: New file.
+	* intl/Makefile.in: New file.
+	* intl/string_literals.cc: New file.
+	* acinclude.m4 (GLIBCPP_CONFIGURE): Bump VERSION to 3.1.0. Add
+	requisite setup for gettext. Re-arrange.
+	* aclocal.m4: Regenerate.
+	* configure.in: Don't call GLIBCPP_CHECK_COMPILER_VERSION.
+	Output Makefile bits for po and intl.
+	* configure: Regenerate.
+	* Makefile.am (SUBDIRS): Add intl, po. Add rule for dist.
+	* Makefile.in: Regenerate.
+	* acconfig.h: Add ENABLE_NLS, HAVE_CATGETS, HAVE_GETTEXT, HAVE_STPCPY.
+	* config.h.in: Regenerate.
+
+	* acinclude.m4 (AC_REPLACE_STRINGFUNCS): Remove.
+
+	* include/Makefile.am (install-data-local): Don't install Makefile.
+	* include/Makefile.in: Regenerate.
+
+	* include/bits/locale_facet.h (locale::facet::_S_clone_c_locale):
+	Add member.
+	* config/locale/c_locale_gnu.cc (_S_clone_c_locale): Add definition.
+	* config/locale/c_locale_generic.cc: Same.
+	* config/locale/c_locale_ieee_1003.1-200x.cc: Same.
+
+	* include/bits/codecvt.h: Excise non-standard, non-required
+	bits. This includes __enc_traits, and partial specializations of
+	codecvt for __enc_traits.
+	* src/codecvt.cc (__enc_traits::_S_max_size): Guard
+	* config/codecvt_partials_ieee_1003.1-200x.h: New file.
+	* config/codecvt_partials_generic.h: New file.
+	* include/Makefile.am (allstamps): Add stamp-codecvt_model.
+	(stamp-codecvt_model): Add.
+	* include/Makefile.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in codecvt configury.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* testsuite/22_locale/codecvt_unicode_wchar_t.cc: Use macro guard.
+	* testsuite/22_locale/codecvt_unicode_char.cc: Same.
+	* testsuite/22_locale/ctor_copy_dtor.cc: And here.
+
+	* include/bits/localefwd.h (class locale::facet): Add __enc_traits
+	as a friend for _S_*_c_locale functions.
+	* include/bits/codecvt.h (__enc_traits::__enc_traits): Add locale
+	argument to default constructor so that CODESET information can be
+	deduced.
+	* include/bits/locale_facets.h (messages_byname):
+	Re-implement. Remove specializations.
+	* src/locale.cc (messages_byname): Remove specialization.
+	(messages_byname): Same.
+	* config/locale/c_locale_ieee_1003.1-200x.cc: New file.
+	* config/locale/c_locale_ieee_1003.1-200x.h: New file.
+	* config/locale/messages_members_ieee_1003.1-200x.cc: New file.
+	* config/locale/messages_members_ieee_1003.1-200x.h: New file.
+	* config/locale/messages_members_gnu.cc: New file.
+	* config/locale/messages_members_gnu.h: New file.
+	* config/locale/messages_members_generic.cc: New file.
+	* config/locale/messages_members_generic.h: New file.
+
+	* docs/html/configopts.html: Add documentation for new locale
+	model, ieee_1003.1. Adjust other flags for current defaults.
+	* docs/html/22_locale/locale.html: Update.
+	* docs/html/22_locale/howto.html: Add link to messages.html. Organize.
+	* docs/html/22_locale/messages.html: New.
+
+	* src/Makefile.am (sources): Add messages_virtuals.cc.
+	* src/Makefile.in: Regenerate.
+	* include/Makefile.am (allstamps): Add stamp-messages_model.
+	(stamp-messages_model): Add.
+	* include/Makefile.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): Add in messages configury.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+	* testsuite_flags.in (--cxxflags): Add LOCALEDIR.
+	* testsuite/lib/libstdc++-v3-dg.exp: Remove broken LD_LIBRARY_PATH
+	bits for Irix.
+	* acinclude (GLIBCPP_ENABLE_CLOCALE): Set glibcpp_localedir to the
+	build directories message catalog base directory, and export.
+	Eventually this should probably be made to deal with build and
+	install directories. For now, punt on this as the library itself
+	doesn't use message catalogs (yet).
+	* testsuite/22_locale/messages.cc: New file.
+	* testsuite/22_locale/messages_char_members.cc: New file.
+	* testsuite/22_locale/messages_byname.cc: New file.
+
+2001-08-06  Phil Edwards  
+
+	* acinclude.m4 (GLIBCPP_CONFIGURE_TESTSUITE):  New macro, calls...
+	(GLIBCPP_CHECK_SETRLIMIT):  ...this new macro, which also uses...
+	(GLIBCPP_CHECK_SETRLIMIT_ancilliary):  ...this new macro.
+	* configure.in (AM_CONFIG_HEADER):  Also generate testsuite_hooks.h.
+	Call GLIBCPP_CONFIGURE_TESTSUITE.
+	* aclocal.m4:  Regenerate.
+	* config.h.in:  Regenerate.
+	* configure:  Regenerate.
+
+	* testsuite/lib/libstdc++-v3-dg.exp:  Download new header instead
+	of old header.
+
+	* testsuite_flags.in:  Add build dir's testsuite to INCLUDES.
+	* testsuite/debug_assert.h:  Removed; contents merged into...
+	* testsuite/testsuite_hooks.h.in:  ...here.  New file.
+	* testsuite/17_intro/header_ciso646.cc:  No longer include
+	debug_assert.h, include testsuite_hooks.h instead.
+	* testsuite/17_intro/header_fstream.cc:  Likewise.
+	* testsuite/17_intro/header_iomanip.cc:  Likewise.
+	* testsuite/17_intro/header_ios.cc:  Likewise.
+	* testsuite/17_intro/header_iosfwd.cc:  Likewise.
+	* testsuite/17_intro/header_iostream.cc:  Likewise.
+	* testsuite/17_intro/header_istream.cc:  Likewise.
+	* testsuite/17_intro/header_ostream.cc:  Likewise.
+	* testsuite/17_intro/header_sstream.cc:  Likewise.
+	* testsuite/17_intro/header_streambuf.cc:  Likewise.
+	* testsuite/18_support/numeric_limits.cc:  Likewise.
+	* testsuite/19_diagnostics/stdexceptions.cc:  Likewise.
+	* testsuite/20_util/allocator_members.cc:  Likewise.
+	* testsuite/20_util/auto_ptr.cc:  Likewise.
+	* testsuite/20_util/pairs.cc:  Likewise.
+	* testsuite/21_strings/append.cc:  Likewise.
+	* testsuite/21_strings/capacity.cc:  Likewise.
+	* testsuite/21_strings/char_traits_requirements.cc:  Likewise.
+	* testsuite/21_strings/compare.cc:  Likewise.
+	* testsuite/21_strings/ctor_copy_dtor.cc:  Likewise.  Also set up
+	call to (disabled) __set_testsuite_memlimit() wrapper.
+	* testsuite/21_strings/element_access.cc:  Likewise.
+	* testsuite/21_strings/find.cc:  Likewise.
+	* testsuite/21_strings/insert.cc:  Likewise.  Also set up call to
+	(disabled) __set_testsuite_memlimit() wrapper.
+	* testsuite/21_strings/inserters_extractors.cc:  Likewise.
+	* testsuite/21_strings/invariants.cc:  Likewise.
+	* testsuite/21_strings/nonmember.cc:  Likewise.
+	* testsuite/21_strings/operations.cc:  Likewise.
+	* testsuite/21_strings/replace.cc:  Likewise.
+	* testsuite/21_strings/rfind.cc:  Likewise.
+	* testsuite/21_strings/substr.cc:  Likewise.
+	* testsuite/22_locale/codecvt_char_char.cc:  Likewise.
+	* testsuite/22_locale/codecvt_unicode_char.cc:  Likewise.
+	* testsuite/22_locale/codecvt_unicode_wchar_t.cc:  Likewise.
+	* testsuite/22_locale/codecvt_wchar_t_char.cc:  Likewise.
+	* testsuite/22_locale/ctor_copy_dtor.cc:  Likewise.
+	* testsuite/22_locale/ctype_char_members.cc:  Likewise.
+	* testsuite/22_locale/ctype_wchar_t_members.cc:  Likewise.
+	* testsuite/22_locale/facet.cc:  Likewise.
+	* testsuite/22_locale/global_templates.cc:  Likewise.
+	* testsuite/22_locale/members.cc:  Likewise.
+	* testsuite/22_locale/numpunct_byname.cc:  Likewise.
+	* testsuite/22_locale/numpunct_char_members.cc:  Likewise.
+	* testsuite/22_locale/operators.cc:  Likewise.
+	* testsuite/22_locale/static_members.cc:  Likewise.
+	* testsuite/23_containers/bitset_ctor.cc:  Likewise.
+	* testsuite/23_containers/bitset_members.cc:  Likewise.
+	* testsuite/23_containers/bitset_shift.cc:  Likewise.
+	* testsuite/23_containers/vector_capacity.cc:  Likewise.
+	* testsuite/23_containers/vector_ctor.cc:  Likewise.
+	* testsuite/23_containers/vector_element_access.cc:  Likewise.
+	* testsuite/23_containers/vector_modifiers.cc:  Likewise.
+	* testsuite/24_iterators/istreambuf_iterator.cc:  Likewise.
+	* testsuite/24_iterators/iterator.cc:  Likewise.
+	* testsuite/24_iterators/ostreambuf_iterator.cc:  Likewise.
+	* testsuite/25_algorithms/binary_search.cc:  Likewise.
+	* testsuite/25_algorithms/copy.cc:  Likewise.
+	* testsuite/25_algorithms/heap.cc:  Likewise.
+	* testsuite/25_algorithms/lower_bound.cc:  Likewise.
+	* testsuite/25_algorithms/min_max.cc:  Likewise.
+	* testsuite/25_algorithms/partition.cc:  Likewise.
+	* testsuite/25_algorithms/rotate.cc:  Likewise.
+	* testsuite/25_algorithms/sort.cc:  Likewise.
+	* testsuite/26_numerics/c_math.cc:  Likewise.
+	* testsuite/26_numerics/complex_inserters_extractors.cc:  Likewise.
+	* testsuite/26_numerics/complex_value.cc:  Likewise.
+	* testsuite/27_io/filebuf.cc:  Likewise.
+	* testsuite/27_io/filebuf_members.cc:  Likewise.
+	* testsuite/27_io/filebuf_virtuals.cc:  Likewise.
+	* testsuite/27_io/fpos.cc:  Likewise.
+	* testsuite/27_io/fstream_members.cc:  Likewise.
+	* testsuite/27_io/ifstream_members.cc:  Likewise.
+	* testsuite/27_io/ios_base_callbacks.cc:  Likewise.
+	* testsuite/27_io/ios_base_members_static.cc:  Likewise.
+	* testsuite/27_io/ios_base_storage.cc:  Likewise.
+	* testsuite/27_io/ios_ctor.cc:  Likewise.
+	* testsuite/27_io/ios_init.cc:  Likewise.
+	* testsuite/27_io/ios_manip_basefield.cc:  Likewise.
+	* testsuite/27_io/ios_manip_fmtflags.cc:  Likewise.
+	* testsuite/27_io/ios_members.cc:  Likewise.
+	* testsuite/27_io/istream_extractor_arith.cc:  Likewise.
+	* testsuite/27_io/istream_extractor_char.cc:  Likewise.
+	* testsuite/27_io/istream_extractor_other.cc:  Likewise.
+	* testsuite/27_io/istream_manip.cc:  Likewise.
+	* testsuite/27_io/istream_seeks.cc:  Likewise.
+	* testsuite/27_io/istream_sentry.cc:  Likewise.
+	* testsuite/27_io/istream_unformatted.cc:  Likewise.
+	* testsuite/27_io/istringstream_members.cc:  Likewise.
+	* testsuite/27_io/narrow_stream_objects.cc:  Likewise.
+	* testsuite/27_io/ofstream_members.cc:  Likewise.
+	* testsuite/27_io/ostream_inserter_arith.cc:  Likewise.
+	* testsuite/27_io/ostream_inserter_char.cc:  Likewise.
+	* testsuite/27_io/ostream_inserter_other.cc:  Likewise.
+	* testsuite/27_io/ostream_manip.cc:  Likewise.
+	* testsuite/27_io/ostream_seeks.cc:  Likewise.
+	* testsuite/27_io/ostream_unformatted.cc:  Likewise.
+	* testsuite/27_io/ostringstream_members.cc:  Likewise.
+	* testsuite/27_io/streambuf.cc:  Likewise.
+	* testsuite/27_io/stringbuf.cc:  Likewise.
+	* testsuite/27_io/stringbuf_virtuals.cc:  Likewise.
+	* testsuite/27_io/stringstream.cc:  Likewise.
+	* testsuite/27_io/stringstream_members.cc:  Likewise.
+	* testsuite/27_io/wide_stream_objects.cc:  Likewise.
+
+2001-07-31  Loren J. Rittle  
+
+	* src/gen-num-limits.cc:  Use __LONG_LONG_MAX__.
+
+2001-07-30  Benjamin Kosnik  
+
+	* configure.target: Remove mips from cpu table.
+	* config/cpu/mips/bits/atomicity.h: Remove generic
+	versions. Comment sgidefs include.
+
+2001-07-25  H.J. Lu 
+
+	* configure.target (cpu_include_dir): Set to `config/cpu/mips'
+	for mips.
+
+	* config/cpu/mips/bits/atomicity.h: New.
+
+2001-07-25  Gabriel Dos Reis  
+
+	* acinclude.m4: CHECK_MATH_DECL_AND_LINKAGE for hypot, hypotf,
+	hypotl, atan2f, atan2l.  Remove from REPLACE_MATHFUNCS list.
+	* aclocal.m4: Regenerate.
+	* config.h.in: Likewise.
+	* configure: Likewise.
+	* libmath/Makefile.am (EXTRA_LONG_DOUBLE_yes): Remove hypotl.c
+	(EXTRA_DIST): Remove hypot.c hypotf.c.
+	* libmath/Makefile.am: Regenerate.
+	* libmath/hypotf.c: Remove.
+	* libmath/hypot.c: Likewise.
+	* libmath/hypotl.c: Likewise.
+	* libmath/stubs.c: The macros seen here are HAVE_xxx, not
+	_GLIBCPP_HAVE_xxx.  Add long double versions.
+
+2001-07-23  David Edelsohn  
+
+	* include/bits/limits_generic.h (int): Set digits and digits10
+	appropriately for word size.
+	(unsigned int,long,unsigned long): Likewise.
+
+2001-07-19  Peter Schmid  
+
+	* include/bits/stl_algo.h : Fix typos.
+	* testsuite/25_algorithms/unique.cc: New file.
+
+2001-07-19  Phil Edwards  
+	    Mark Mitchell 
+
+	Merge from cp-parser-branch.
+	* include/bits/basic_string.h:  Qualify symbols with 'template'.
+	* include/bits/basic_string.tcc:  Likewise.
+	* include/bits/fstream.tcc:  Likewise.
+	* include/bits/istream.tcc:  Likewise.
+	* include/bits/sstream.tcc:  Likewise.
+	* include/bits/std_istream.h:  Likewise.
+	* include/bits/stl_iterator.h:  Likewise.
+	* include/bits/streambuf.tcc:  Likewise.
+	* src/gen-num-limits.cc:  Add 'template<>' to specializations.
+	* src/locale.cc:  Likewise.
+
+2001-07-19  Gabriel Dos Reis  
+	    Bert De Knuydt 
+
+	* src/gen-num-limits.cc (set_signals_handler): New function.
+	Factor out signals setting.  Set signal handler for SIGILL.
+
+2001-07-18  Phil Edwards  
+
+	* docs/html/27_io/howto.html:  Fix typo.
+	* docs/html/faq/index.html:  Minor updates for 3.0 all around.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-07-18  Stephen M. Webb  
+	    Roman Sulzhyk  
+
+	libstdc++/3599
+	* include/bits/ostream.tcc (ostream::put): Fixed error condition check.
+	* testsuite/27_io/streambuf.cc (test07): Added new regression test.
+
+2001-07-17  Stephen M. Webb   r
+
+	All occurrences of the __value_type() and __distance_type()
+	functions, which were required to support the HP STL, have been
+	removed along with all the auxiliary forwarding functions that
+	were required to support their use.
+
+	The __iterator_category() function was pretty much left alone
+	because there was no benefit to removing it and its use made code
+	just a little more readable.
+
+	Incidences of distance() with nonstandard argument list were
+	replaced by calls to the standard function (only in the files
+	affected by the removal of the other HP functions).
+
+	The signature of the rotate() algorithm was changed to match the
+	standard.
+
+	Headers were reformatted under C++STYLE guidelines (indentation,
+	linebreaks, typename keyword).
+
+	* include/bits/stl_algo.h: replaced __value_type() and
+	__distance_type() with iterator_traits, eliminated auxiliary
+	support functions required to support said function usage.
+	Changed nonstandard distance() call to standard call.
+
+	* include/bits/stl_algobase.h: Same.
+	* include/bits/stl_heap.h: Same.
+	* include/bits/stl_numeric.h: Same.
+	* include/bits/stl_uninitialized.h: Same.
+	* include/bits/stl_iterator_base_types.h (__value_type()):
+	Removed.
+	(__distance_type()): Removed.
+	(value_type()): Gone.
+	(distance_type()): Done in.
+	(iterator_category()): Hasta la vista, baby.
+
+	* include/bits/stl_iterator_base_funcs.h (iterator_category()):
+	Replaced with __iterator_category().
+	* include/backward/iterator.h: moved definition of value_type(),
+	distance_type(), and iterator_category() out of std:: and into
+	here.
+	* testsuite/23_containers/vector_ctor.cc (test03): New testcases.
+	* testsuite/23_containers/vector_modifiers.cc (test03): New testcases.
+	* testsuite/25_algorithms/rotate.cc: New testcase.
+	* testsuite/25_algorithms/copy.cc: New testcase.
+	* testsuite/25_algorithms/sort.cc: Same.
+	* testsuite/25_algorithms/heap.cc: Same.
+	* testsuite/25_algorithms/partition.cc: Same.
+	* testsuite/25_algorithms/binary_search.cc: Same.
+	* testsuite/26_numerics/sum_diff.cc: Ditto.
+
+001-07-17  Benjamin Kosnik  
+
+	* testsuite/README: Add notes on naming test cases.
+	* testsuite/22_locale/members.cc: Mark as xfail.
+	* testsuite/22_locale/numpunct_char_members.cc: Same.
+
+2001-07-16  Stephen M. Webb  
+
+	* acinclude.m4 (GLIBCPP_ENABLE_CHEADERS):  Use glibcpp_srcdir when
+	setting C_INCLUDE_DIR.
+	* configure.in:  Revert yesterday's LN_S change.
+	* aclocal.m4:  Regenerate.
+	* configure:  Regenerate.
+
+2001-07-15  Phil Edwards  
+
+	* configure.in:  Temporarily force LN_S to copy instead of symlink.
+	* configure:  Regenerate.
+
+2001-07-13  Phil Edwards  
+
+	* include/bits/std_sstream.h (basic_stringbuf::basic_stringbuf(string):
+	Initialize _M_string with pointer-and-size constructor, not just
+	pointer.  Fix some comments.
+	* testsuite/21_strings/ctor_copy_dtor.cc (test03):  New test.
+	* testsuite/27_io/stringbuf.cc (test02):  Remove unused variable.
+	(test03):  Add embedded-NUL tests.
+
+	* mkcheck.in:  When printing totals, match the order of the tests.
+	* include/bits/stringfwd.h:  Use same declaration keywords.
+	* include/bits/std_iosfwd.h:  Cosmetic spacing.
+
+2001-07-13  Stephen M. Webb  
+	    Loren J. Rittle  
+	    Phil Edwards  
+
+	* include/Makefile.am:  New file encapsulating header generation rules.
+	* Makefile.am (SUBDIRS):  Prepend 'include' directory.
+	* acinclude.m4:  Moved/removed rules for building various headers.
+	* configure.in (AC_OUTPUT):  Add include/Makefile.
+	* mkc++config:  Removed.
+
+	* testsuite_flags.in:  Changed build-includes to match new scheme.
+	* mknumeric_limits:  Likewise.
+	* libio/Makefile.am:  Changed INCLUDES to maatch new header scheme.
+	* libmath/Makefile.am:  Likewise.
+	* libsupc++/Makefile.am:  Likewise.
+	* src/Makefile.am:  Likewise; removed rules to build headers.
+	* libmath/mathconf.h:  Changed #include'd header names to match.
+	* libmath/stubs.c:  Likewise.
+	* src/gen-num-limits.cc:  Likewise.
+
+	* configure:  Regenerated.
+	* config.h.in:  Regenerated.
+	* aclocal.m4:  Regenerated.
+	* Makefile.in:  Regenerated.
+	* include/Makefile.in:  Regenerated.
+	* libio/Makefile.in:  Regenerated.
+	* libmath/Makefile.in:  Regenerated.
+	* libsupc++/Makefile.in:  Regenerated.
+	* src/Makefile.in:  Regenerated.
+	* testsuite/Makefile.in:  Regenerated.
+
+2001-07-11   Felix Natter  
+
+	* docs/html/17_intro/porting-howto.xml:  Initial checkin of
+	master copy.
+	* docs/html/17_intro/porting-howto.html:  check in v0.9.3
+
+2001-07-11  Phil Edwards  
+
+	* docs/doxygen/run_doxygen:  Don't keep output from previous run.
+	* docs/doxygen/user.cfg.in:  Tweaks.
+	* include/bits/c++config:  Documentation comments for Doxygen.
+	* include/bits/char_traits.h:  Likewise.
+	* include/bits/limits_generic.h:  Likewise.
+	* include/bits/std_stdexcept.h:  Likewise.
+	* include/bits/stl_pair.h:  Likewise.
+	* libsupc++/exception:  Likewise.
+	* libsupc++/new:  Likewise.
+	* libsupc++/typeinfo:  Likewise.
+	* libmath/Makefile.am:  Update and correct copyright.
+
+2001-07-10  Gabriel Dos Reis  
+
+	* acinclude.m4: Don't AC_REPLACE_MATHFUNCS expf and atan2f.
+	* aclocal.m4: Regenerate.
+	* configure: Same.
+
+2001-07-09  Phil Edwards  
+
+	* docs/html/configopts.html:  Fix thinko.
+	* docs/html/27_io/howto.html:  Fix thinko and HTML markup.
+	* include/bits/stl_iterator.h:  Fix typo.
+
+2001-07-09  Phil Edwards  
+
+	* docs/html/explanations.html:  New file.
+	* docs/html/configopts.html:  Link to it to provide more notes
+	on cstdio.  Minor markup and spacing fixes.
+	* docs/html/27_io/howto.html:  Talk about sync_with_stdio.
+
+2001-07-09  Kriang Lerdsuwanakij  
+
+	* include/bits/valarray_meta.h (_Expr::operator+): Use qualified id
+	for _Expr template template argument.
+	(_Expr::operator-): Likewise.
+	(_Expr::operator~): Likewise.
+	(_Expr::operator!): Likewise.
+	(_DEFINE_EXPR_UNARY_OPERATOR): Likewise.
+
+2001-07-06  Gabriel Dos Reis  
+
+	* libmath/Makefile.am (EXTRA_DIST): Remove atan2f.c and expf.c
+	* libmath/Makefile.in: Regenerate.
+	* libmath/expf.c: Remove.
+	* libmath/atan2f.c: Likewise.
+
+2001-07-06  Daniel Jacobowitz  
+
+	* configure.in: Remove NATIVE, NULL_TARGET.
+	Set CANADIAN only for Canadian crosses.  Set xcompiling
+	for both Canadian crosses and host-x-host crosses.
+	* configure: Regenerated.
+
+2001-07-06  Peter Schmid  
+
+	* include/bits/stl_vector.h (vector::_M_initialize_aux): Fix typo.
+
+2001-07-05  Jason Merrill  
+
+	* testsuite_flags.in (--build-includes): backward, not backwards.
+
+2001-07-04  Jeffrey Oldham  
+
+	* include/ext/ropeimpl.h (_Rope_RopeRep::_M_free_c_string):
+	Replace destroy by _Destroy.
+	(_Rope_RopeRep::_S_free_string): Likewise.
+	(rope::c_str()): Likewise.
+	* include/ext/slist (_Slist_base::_M_erase_after>): Likewise.
+	(_Slist_base::_M_erase_after): Likewise.
+	(slist::_M_create_node): Replace construct by _Construct.
+	(slist::pop_front): Replace destroy by _Destroy.
+	* include/ext/stl_hashtable.h (hashtable::_M_new_node): Replace
+	construct by _Construct.
+	(hashtable::_M_delete_node): Replace destroy by _Destroy.
+	* include/ext/stl_rope.h (rope::rope): Replace construct by
+	_Construct.
+	(rope::copy): Replace destroy by _Destroy.
+
+2001-07-03  Benjamin Kosnik  
+
+	* include/bits/localefwd.h: Format.
+	* include/bits/locale_facts.tcc (locale::combine): Adjust.
+	* src/locale.cc (locale::locale::(_Impl)): Don't call
+	_M_add_reference.
+	(locale::facet::_M_remove_reference): Simplify.
+	* src/globals.cc (locale_impl_c): New. Format.
+	(locale_c): New.
+	* src/ios.cc (ios_base::Init::Init): Increment _S_ios_base_init last.
+
+2001-07-02  Loren J. Rittle  
+
+	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Protect variable from shell
+	expansion (thanks to Alexandre Oliva).
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-07-02  Benjamin Kosnik  
+
+	* src/locale.cc (locale::locale(const char*)): Make sure global
+	locales are initialized.
+	* include/bits/locale_facets.tcc (locale::combine): Refcout should
+	be zero, not one as it's return-by-value.
+	* testsuite/27_io/ios_base_callbacks.cc (test01): Don't check for
+	named locales here.
+	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Instead, check
+	for it here.
+	(test02): Add test.
+	* libsupc++/eh_alloc.cc: Use climits, not limits.h.
+
+2001-07-02  Loren J. Rittle  
+
+	libstdc++/3284
+	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Portability enhancement.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-07-02  Loren J. Rittle  
+
+	libstdc++/3243
+	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Add relative path to
+	staged/installed area to support -I-.  Document.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-07-02  Loren J. Rittle  
+
+	libstdc++/2211
+	* src/ios.cc (ios_base::Init::_S_ios_create): Rename __bufsize to
+	__out_bufsize.  Add __in_bufsize, document it and use it.
+
+2001-07-01  Stephen M. Webb 
+
+	* include/bits/stl_construct.h (construct): Remove.
+	(destroy): Remove.
+	(__destroy): Replaced by use of iterator_traits.
+	* include/bits/stl_deque.h: replaced HP iterator functions with
+	iterator_traits.
+	(construct): changed to _Construct.
+	(destroy): changed to _Destroy.
+	* include/bits/stl_tempbuf.h: Same.
+	* include/bits/stl_tree.h: Same.
+	* include/bits/stl_vector.h: Same.
+	* include/backward/iterator.h (construct): moved definition to here.
+	(destroy): Same.
+
+2001-06-29  Benjamin Kosnik  
+
+	* include/bits/locale_facets.tcc (locale::combine): Clone _Impl.
+	before replacing facet.
+	* include/bits/localefwd.h (locale::_Impl::_M_remove_reference):
+	Correct decrement.
+	* src/localename.cc (locale::_Impl): Correct ctor initialization
+	lists. Initialize ref count with one. Simplify.
+	* src/locale.cc: Add comment.
+	* testsuite/22_locale/numpunct.cc (test01): Add derivation test.
+	* testsuite/22_locale/numpunct_char_members.cc (test01): Add tests.
+	* testsuite/22_locale/members.cc (test02): Fix.
+
+2001-06-27  Phil Edwards  
+
+	* include/backward/algo.h:  Add "GPL plus runtime exception" comment
+	block, this time for real.
+	* include/backward/algobase.h:  Likewise.
+	* include/backward/alloc.h:  Likewise.
+	* include/backward/bvector.h:  Likewise.
+	* include/backward/defalloc.h:  Likewise.
+	* include/backward/deque.h:  Likewise.
+	* include/backward/function.h:  Likewise.
+	* include/backward/hash_map.h:  Likewise.
+	* include/backward/hash_set.h:  Likewise.
+	* include/backward/hashtable.h:  Likewise.
+	* include/backward/heap.h:  Likewise.
+	* include/backward/iterator.h:  Likewise.
+	* include/backward/list.h:  Likewise.
+	* include/backward/map.h:  Likewise.
+	* include/backward/multimap.h:  Likewise.
+	* include/backward/multiset.h:  Likewise.
+	* include/backward/pair.h:  Likewise.
+	* include/backward/rope.h:  Likewise.
+	* include/backward/set.h:  Likewise.
+	* include/backward/slist.h:  Likewise.
+	* include/backward/stack.h:  Likewise.
+	* include/backward/strstream:  Likewise.
+	* include/backward/tempbuf.h:  Likewise.
+	* include/backward/tree.h:  Likewise.
+	* include/backward/vector.h:  Likewise.
+	* include/bits/pthread_allocimpl.h:  Likewise.
+	* include/bits/std_algorithm.h:  Likewise.
+	* include/bits/std_bitset.h:  Likewise.
+	* include/bits/std_deque.h:  Likewise.
+	* include/bits/std_functional.h:  Likewise.
+	* include/bits/std_iterator.h:  Likewise.
+	* include/bits/std_list.h:  Likewise.
+	* include/bits/std_map.h:  Likewise.
+	* include/bits/std_memory.h:  Likewise.
+	* include/bits/std_numeric.h:  Likewise.
+	* include/bits/std_queue.h:  Likewise.
+	* include/bits/std_set.h:  Likewise.
+	* include/bits/std_stack.h:  Likewise.
+	* include/bits/std_utility.h:  Likewise.
+	* include/bits/std_vector.h:  Likewise.
+	* include/bits/stl_algo.h:  Likewise.
+	* include/bits/stl_algobase.h:  Likewise.
+	* include/bits/stl_alloc.h:  Likewise.
+	* include/bits/stl_bvector.h:  Likewise.
+	* include/bits/stl_construct.h:  Likewise.
+	* include/bits/stl_deque.h:  Likewise.
+	* include/bits/stl_function.h:  Likewise.
+	* include/bits/stl_heap.h:  Likewise.
+	* include/bits/stl_iterator.h:  Likewise.
+	* include/bits/stl_iterator_base_funcs.h:  Likewise.
+	* include/bits/stl_iterator_base_types.h:  Likewise.
+	* include/bits/stl_list.h:  Likewise.
+	* include/bits/stl_map.h:  Likewise.
+	* include/bits/stl_multimap.h:  Likewise.
+	* include/bits/stl_multiset.h:  Likewise.
+	* include/bits/stl_numeric.h:  Likewise.
+	* include/bits/stl_pair.h:  Likewise.
+	* include/bits/stl_pthread_alloc.h:  Likewise.
+	* include/bits/stl_queue.h:  Likewise.
+	* include/bits/stl_raw_storage_iter.h:  Likewise.
+	* include/bits/stl_relops.h:  Likewise.
+	* include/bits/stl_set.h:  Likewise.
+	* include/bits/stl_stack.h:  Likewise.
+	* include/bits/stl_tempbuf.h:  Likewise.
+	* include/bits/stl_threads.h:  Likewise.
+	* include/bits/stl_tree.h:  Likewise.
+	* include/bits/stl_uninitialized.h:  Likewise.
+	* include/bits/stl_vector.h:  Likewise.
+	* include/bits/type_traits.h:  Likewise.
+	* include/ext/hash_map:  Likewise.
+	* include/ext/hash_set:  Likewise.
+	* include/ext/rope:  Likewise.
+	* include/ext/ropeimpl.h:  Likewise.
+	* include/ext/slist:  Likewise.
+	* include/ext/stl_hash_fun.h:  Likewise.
+	* include/ext/stl_hashtable.h:  Likewise.
+	* include/ext/stl_rope.h:  Likewise.
+	* src/bitset.cc:  Likewise.
+	* src/strstream.cc:  Likewise.
+
+2001-06-26  Benjamin Kosnik  
+	                     
+
+	libstdc++/3272
+	* include/bits/streambuf.tcc (__copy_streambufs): Don't set eofbit.
+	* testsuite/27_io/ostream_inserter_other.cc (test04): Add test.
+	* testsuite/27_io/istream_extractor_other.cc: Fix.
+
+2001-06-26  Zoltan Hidvegi  
+
+	* acinclude.m4 (glibcpp_toolexeclibdir): Make multilib safe.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-06-26  Benjamin Kosnik  
+
+	* include/bits/stream_iterator.h (istream_iterator): Add copy ctor.
+	(ostream_iterator): Same.
+	* include/bits/stl_iterator.h (front_insert_iterator::operator=):
+	Change argument to const_reference.
+	(back_insert_iterator): Same.
+
+2001-06-26  Benjamin Kosnik  
+
+	* include/bits/sbuf_iter.h: Change to..
+	* include/bits/streambuf_iterator.h: This.
+	* include/bits/stl_iterator.h: Take out of here...
+	* include/bits/stream_iterator.h: Add.
+	* src/Makefile.am (base_headers): Add streambuf_iterator,
+	stream_iterator.h
+	* src/Makefile.in: Regenerate.
+	* include/bits/std_string.h: Adjust includes.
+	* include/bits/basic_ios.h: Same.
+	* include/bits/locale_facets.tcc: Same.
+	* include/bits/std_iosfwd.h: Same.
+
+	* include/bits/std_iterator.h: Add istream, ostream includes.
+	* include/bits/stl_iterator.h: Tweak.
+	* testsuite/24_iterators/ostream_iterator.cc: Add test.
+	* testsuite/24_iterators/istream_iterator.cc: Same.
+	* testsuite/23_containers/multiset.cc: Add iterator include.
+
+2001-06-26  Phil Edwards  
+
+	* acinclude.m4:  Clean extraneous tabs, rewrap 'test' lines.
+	* aclocal.m4:  Regenerate.
+	* configure:  Regenerate.
+
+2001-06-26  Felix Natter  
+
+	* docs/html/17_intro/porting-howto.html:  Fixed some errors.
+
+2001-06-26  Benjamin Kosnik  
+
+	* include/bits/stl_iterator.h (istream_iterator::operator->): Fix
+	return values.
+	(istream_iterator::operator*): Same.
+
+2001-06-26  Benjamin Kosnik  
+	    Alexandre Petit-Bianco  
+
+	* testsuite/21_strings/element_access.cc (test01): Chill Out Cafe
+	is on 41st, not 14th.
+
+2001-06-26  Benjamin Kosnik  
+
+	* include/bits/std_iterator.h: Include sbuf_iter.h via std_ios.h.
+
+	* include/bits/stl_iterator.h (istream_iterator): Inherit from
+	iterator.
+	(ostream_iterator): Same.
+	* testsuite/24_iterators/istream_iterator.cc: New file.
+	* testsuite/24_iterators/ostream_iterator.cc: New file.
+
+	* include/bits/sbuf_iter.h: Remove self typedef.
+	* testsuite/24_iterators/ostreambuf_iterator.cc: Add test.
+	* testsuite/24_iterators/istreambuf_iterator.cc: Add test.
+
+	* include/bits/stl_iterator.h (reverse_iterator): Remove
+	extraneous typedefs. Add typename.
+	(__normal_iterator): Remove typedefs referring to self. Add typename.
+	(reverse_bidiretional_iterator): Remove, not longer required.
+
+2001-06-26  Gabriel Dos Reis  
+
+	* include/bits/stl_iterator.h (__normal_iterator<>): Qualify
+	dependent names with `typename'.  Bring in various required
+	iterator_traits members.  Can't imagine why that used to work.
+
+2001-06-25  Phil Edwards  
+	    Kurt Garloff 
+
+	PR libstdc++/3377
+	* src/cmath.cc:  New [version of an old] file; instantiate
+	__cmath_power to start with.
+	* src/Makefile.am (sources):  Add cmath.cc (and alphabetize).
+	* Makefile.in:  Regenerate.
+	* libio/Makefile.in:  Regenerate.
+	* libmath/Makefile.in:  Regenerate.
+	* libsupc++/Makefile.in:  Regenerate.
+	* src/Makefile.in:  Regenerate.
+	* testsuite/Makefile.in:  Regenerate.
+
+2001-06-24  Gabriel Dos Reis  
+
+	* libmath/stubs.c: Fix thinko.
+
+2001-06-24  David Edelsohn 
+
+	* libmath/stubs.c (sqrtf): Define.
+	(tanf): Correct typo.
+
+2001-06-22  Benjamin Kosnik  
+
+	* include/bits/stl_iterator.h (reverse_iterator): Inherit from
+	iterator.
+	(back_insert_iterator): Same.
+	(front_insert_iterator): Same.
+	(insert_iterator): Same.
+
+	* testsuite/20_util/raw_storage_iterator.cc: Modify.
+	* testsuite/24_iterators/reverse_iterator.cc: New file.
+	* testsuite/24_iterators/back_insert_iterator.cc: New file.
+	* testsuite/24_iterators/front_insert_iterator.cc: New file.
+	* testsuite/24_iterators/insert_iterator.cc: New file.
+
+2001-06-22  Phil Edwards  
+
+	* include/*:  Revert comment/license change from yesterday for all
+	except libsupc++/unwind-cxx.h.
+	* src/bitset.cc:  Likewise.
+	* src/strstream.cc:  Likewise.
+
+2001-06-22  Gabriel Dos Reis  
+
+	* libmath/stubs.c: New file.
+	(tanhf): Fix typo.
+	(powf): Likewise.
+
+	* libmath/Makefile.am (libmath_la_SOURCES): Add.
+	* libmath/Makefile.in.  Regenerate.
+
+2001-06-21  Phil Edwards  
+
+	* include/backward/algo.h:  Add "GPL plus runtime exception" comment.
+	* include/backward/algobase.h:  Likewise.
+	* include/backward/alloc.h:  Likewise.
+	* include/backward/bvector.h:  Likewise.
+	* include/backward/defalloc.h:  Likewise.
+	* include/backward/deque.h:  Likewise.
+	* include/backward/function.h:  Likewise.
+	* include/backward/hash_map.h:  Likewise.
+	* include/backward/hash_set.h:  Likewise.
+	* include/backward/hashtable.h:  Likewise.
+	* include/backward/heap.h:  Likewise.
+	* include/backward/iterator.h:  Likewise.
+	* include/backward/list.h:  Likewise.
+	* include/backward/map.h:  Likewise.
+	* include/backward/multimap.h:  Likewise.
+	* include/backward/multiset.h:  Likewise.
+	* include/backward/pair.h:  Likewise.
+	* include/backward/rope.h:  Likewise.
+	* include/backward/set.h:  Likewise.
+	* include/backward/slist.h:  Likewise.
+	* include/backward/stack.h:  Likewise.
+	* include/backward/strstream:  Likewise.
+	* include/backward/tempbuf.h:  Likewise.
+	* include/backward/tree.h:  Likewise.
+	* include/backward/vector.h:  Likewise.
+	* include/bits/pthread_allocimpl.h:  Likewise.
+	* include/bits/std_algorithm.h:  Likewise.
+	* include/bits/std_bitset.h:  Likewise.
+	* include/bits/std_deque.h:  Likewise.
+	* include/bits/std_functional.h:  Likewise.
+	* include/bits/std_iterator.h:  Likewise.
+	* include/bits/std_list.h:  Likewise.
+	* include/bits/std_map.h:  Likewise.
+	* include/bits/std_memory.h:  Likewise.
+	* include/bits/std_numeric.h:  Likewise.
+	* include/bits/std_queue.h:  Likewise.
+	* include/bits/std_set.h:  Likewise.
+	* include/bits/std_stack.h:  Likewise.
+	* include/bits/std_utility.h:  Likewise.
+	* include/bits/std_vector.h:  Likewise.
+	* include/bits/stl_algo.h:  Likewise.
+	* include/bits/stl_algobase.h:  Likewise.
+	* include/bits/stl_alloc.h:  Likewise.
+	* include/bits/stl_bvector.h:  Likewise.
+	* include/bits/stl_construct.h:  Likewise.
+	* include/bits/stl_deque.h:  Likewise.
+	* include/bits/stl_function.h:  Likewise.
+	* include/bits/stl_heap.h:  Likewise.
+	* include/bits/stl_iterator.h:  Likewise.
+	* include/bits/stl_iterator_base_funcs.h:  Likewise.
+	* include/bits/stl_iterator_base_types.h:  Likewise.
+	* include/bits/stl_list.h:  Likewise.
+	* include/bits/stl_map.h:  Likewise.
+	* include/bits/stl_multimap.h:  Likewise.
+	* include/bits/stl_multiset.h:  Likewise.
+	* include/bits/stl_numeric.h:  Likewise.
+	* include/bits/stl_pair.h:  Likewise.
+	* include/bits/stl_pthread_alloc.h:  Likewise.
+	* include/bits/stl_queue.h:  Likewise.
+	* include/bits/stl_raw_storage_iter.h:  Likewise.
+	* include/bits/stl_relops.h:  Likewise.
+	* include/bits/stl_set.h:  Likewise.
+	* include/bits/stl_stack.h:  Likewise.
+	* include/bits/stl_tempbuf.h:  Likewise.
+	* include/bits/stl_threads.h:  Likewise.
+	* include/bits/stl_tree.h:  Likewise.
+	* include/bits/stl_uninitialized.h:  Likewise.
+	* include/bits/stl_vector.h:  Likewise.
+	* include/bits/type_traits.h:  Likewise.
+	* include/ext/hash_map:  Likewise.
+	* include/ext/hash_set:  Likewise.
+	* include/ext/rope:  Likewise.
+	* include/ext/ropeimpl.h:  Likewise.
+	* include/ext/slist:  Likewise.
+	* include/ext/stl_hash_fun.h:  Likewise.
+	* include/ext/stl_hashtable.h:  Likewise.
+	* include/ext/stl_rope.h:  Likewise.
+	* libsupc++/unwind-cxx.h:  Likewise.
+	* src/bitset.cc:  Likewise.
+	* src/strstream.cc:  Likewise.
+
+2001-06-21  Gabriel Dos Reis  
+
+	* include/bits/indirect_array.h (indirect_array<>::operator=):
+	Make copy and assignment operator public.  Implement.  Format.
+
+	* include/bits/valarray_array.h (__valarray_copy): Add overloads
+	for copy between index arrays.  Format.
+
+2001-06-19  Benjamin Kosnik  
+
+	* mknumeric_limits: Add static definitions, format.
+	* testsuite/18_support/numeric_limits.cc (test02): Add test.
+
+	* include/c_std/bits/std_cwchar.h: Include ctime.
+	* testsuite/17_intro/header_cwchar.cc : Check.
+
+	* include/c_std/bits/std_cwctype.h: Inject wctype.
+	* testsuite/17_intro/header_cwctype.cc: Update.
+
+2001-06-18  Benjamin Kosnik  
+
+	* include/bits/stl_raw_storage_iter.h: Format. Correct derivation.
+	* testsuite/20_util/raw_storage_iterator.cc: Same.
+
+	* include/bits/stl_alloc.h (_S_chunk_alloc): Change malloc to
+	operator new.
+	(__mem_interface): New typedef for switching between malloc and new.
+	* testsuite/20_util/allocator_members.cc: New file.
+
+	* testsuite/20_util/comparisons.cc: New file.
+	* testsuite/20_util/pairs.cc: New file.
+
+2001-06-15  Phil Edwards  
+
+	* docs/html/documentation.html:  Point to new doxygen'ed collection.
+
+2001-06-14  Nathan Sidwell  
+
+	* configure.in (auxdir): Replace by ...
+	(toprel): ... new variable.
+	(toplevel_srcdir): Construct from $toprel.
+	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Use $toprel
+	rather than .. to locate gcc source directory.
+	(GLIBCPP_CONFIGURE): Replace $auxdir with $srcdir/$toprel.
+	* aclocal.m4, configure: Rebuilt.
+
+2001-06-13  John David Anglin  
+
+	(Approved by Mark and Benjamin.  Applied by Loren.)
+
+	* src/globals.cc: Define globals _GLIBCPP_mutex_init (),
+	_GLIBCPP_mutex_address_init (), _GLIBCPP_once, _GLIBCPP_mutex
+	and _GLIBCPP_mutex_address.
+	* include/bits/stl_threads.h (_STL_mutex_lock): Use above to provide
+	once-only runtime initialization of _M_lock mutex when
+	__GTHREAD_MUTEX_INIT_FUNCTION is defined.
+	(__STL_MUTEX_INITIALIZER): Provide initializer for _STL_mutex_lock
+	for __GTHREAD_MUTEX_INIT_FUNCTION case.
+
+2001-06-13  Gabriel Dos Reis  
+
+	* testsuite/26_numerics/slice_array_assignment.cc (main): New test.
+
+	* include/bits/slice_array.h (slice_array<>::operator=): Make
+	public and implement.
+	(slice_array<>::slice_array): Make copy-constructor public.
+
+	* include/bits/valarray_array.h (__valarray_copy): Add another
+	overload to copy between strided arrays.
+
+2001-06-13  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_CONFIGURE): Bump version to 3.0.0.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* include/bits/c++config (__GLIBCPP__): Update date.
+
+2001-06-12  Benjamin Kosnik  
+
+	* include/bits/fpos.h (fpos::operator-): Don't return reference,
+	return original, non-modified version.
+	(fpos::operator+): Same.
+	* testsuite/27_io/fpos.cc: Add test.
+
+2001-06-12  Loren J. Rittle  
+
+	libstdc++/2071
+	* porting.texi: Add documentation about libstdc++-v3-specific
+	macros that are currently included in os_defines.h files.
+
+	* config/basic_file_stdio.h (sys_getc): New method.
+	(sys_ungetc): New method.
+	* include/bits/basic_file.h: (sys_getc): New method signature.
+	(sys_ungetc): New method signature.
+
+	* include/bits/fstream.tcc (underflow): Add conditional code
+	paths which avoid using short seeks on streams (especially
+	useful when the stream might be interactive or a pipe).  At
+	the moment, this alternate path only avoids seeking when the
+	``buffer size'' of underflow() is 1 since the C standard only
+	guarantees buffer space for one ungetc (this technique could
+	be extended since *-*-solaris* supports buffering for 4 calls
+	to ungetc and *-*-*bsd* supports buffering limited only by
+	memory resources).  Also, _GLIBCPP_AVOID_FSEEK must be defined
+	in a port's os_defines.h file for this alternate path to even
+	be considered.  As a bonus, the idiom of using getc/ungetc
+	requires no system calls whereas fseek maps to one or two
+	system call(s) on many platforms.
+
+	* config/os/bsd/freebsd/bits/os_defines.h (_GLIBCPP_AVOID_FSEEK):
+	Define it.
+	* config/os/solaris/solaris2.5/bits/os_defines.h
+	(_GLIBCPP_AVOID_FSEEK): Likewise.
+	* config/os/solaris/solaris2.6/bits/os_defines.h
+	(_GLIBCPP_AVOID_FSEEK): Likewise.
+	* config/os/solaris/solaris2.7/bits/os_defines.h
+	(_GLIBCPP_AVOID_FSEEK): Likewise.
+
+2001-06-12  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_CHECK_COMPILER_VERSION): Change to
+	AC_TRY_COMPILE, so that the built compiler is checked, and
+	bootstraps or cross compiles with an older compile still work.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-06-12  Benjamin Kosnik  
+
+	libstdc++/3142
+	* include/bits/std_sstream.h: Add allocator_type, as per DR 251.
+
+	libstdc++/3141
+	* include/bits/istream.tcc (getline, get): Fix as per DR 243.
+
+	libstdc++/3140
+	* include/bits/std_bitset.h (bitset::set): Fix as per DR 186.
+
+	libstdc++/3139
+	* include/bits/limits_generic.h: Fix as per DR 184.
+
+2001-06-11  Benjamin Kosnik  
+
+	libstdc++/3126
+	* include/bits/basic_string.h (string::compare): Adjust signatures
+	as per DR 5.
+	* include/bits/basic_string.tcc: And here.
+
+	libstdc++/2346
+	* config/c_io_stdio.h: Remove whitespace.
+	* testsuite/27_io/istream_seeks.cc (test03): Add regression.
+	(test02): Add regression.
+	* testsuite/27_io/istream_seeks-3.tst: New file.
+
+2001-06-11  Phil Edwards  
+
+	* README:  Update to reflect reality.
+	* acinclude.m4:  Update descriptions, fix typos.  Comment changes only.
+	* configure.in:  Make certain target_alias is set and subst'd for 2.50.
+	* aclocal.m4:  Regenerate.
+	* configure:  Regenerate (with 2.13).
+
+2001-06-11  Benjamin Kosnik  
+
+	libstdc++/3114
+	* include/bits/ostream.tcc (ostream::seekp): Add error checking as
+	per DR 129.
+	* include/bits/istream.tcc (istream::seekg): Same.
+	* testsuite/27_io/istream_seeks.cc: Fix.
+
+	libstdc++/3113
+	* include/bits/stl_function.h (binder2nd): Fix as per DR 109.
+	(binder1st): Same.
+	* include/bits/std_queue.h: Add c++config.h.
+	* testsuite/20_util/binders.cc: New test.
+
+2001-06-11  Matthias Klose  
+	    Phil Edwards  
+
+	* docs/doxygen/run_doxygen (find_doxygen):  Tweak version check.
+	(main script):  Echo more information.
+
+2001-06-10  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cwchar.h: Alphabetize.
+	* include/bits/char_traits.h: Tweak.
+	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for
+	everything used by std_cwchar.h.
+	* aclocal.m4: Regenerate.
+	* configure.in: Regenerate.
+	* config.h.in: Regenerate.
+
+2001-06-10  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_ENABLE_C99): Add stdio.h checking.
+	Add checking for strtof, _Exit in stdlib.h
+	* aclocal.m4: Regenerate.
+	* configure.in: Regenerate.
+	* include/c_std/bits/std_cstdio.h: Alphabetize lists.
+	(snprintf): Put C99 functions into __gnu_cxx namespace.
+	(vfscanf): Same.
+	(vscanf): Same.
+	(vsnprintf): Same.
+	(vsscanf): Same.
+	* include/c_std/bits/std_cstdlib.h: Alphabetize lists. Put undefs
+	for C99 functions within _GLIBCPP_USE_C99 guard.
+	(_Exit): Same.
+	(strtof): Same.
+	(strtold): Same.
+	* include/bits/locale_facets.tcc: Check if C99 is enabled.
+	* include/c_std/bits/std_cwchar.h (__gnu_cxx): Put undefs within
+	C99 guard.
+	* include/c_std/bits/cmath.tcc: Formatting tweak.
+	* include/c_std/bits/std_cmath.h: Same.
+
+2001-06-10  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cstdio.h: Include cstddef for size_t.
+
+2001-06-09  Alexandre Oliva  
+	    Stephen L Moshier  
+
+	* acinclude.m4 (AC_EXEEXT): Work around in case it expands to
+	nothing, as in autoconf 2.50.
+	* configure: Rebuilt.
+
+2001-06-09  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cwchar.h: Remove size_t injection,
+	include std_cstddef.
+	* include/c_std/bits/std_ctime.h: Same.
+	* include/c_std/bits/std_cstring.h: Same.
+	* include/c_std/bits/std_cstdlib.h: Same.
+
+	* include/c_std/bits/std_cstdio.h: Remove vsnprintf, snprintf.
+	* include/c_std/bits/std_cctype.h: Remove isblank.
+
+2001-06-09  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Check for fgetwc,
+	fgetws.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* include/c_std/bits/std_cwchar.h: Remove duplicate fgetwc
+	injection, guard fgetwc, fgetws.
+	* include/c_std/bits/std_cstdio.h: Remove superfluous includes.
+	* include/c_std/bits/std_clocale.h: And here.
+	* include/c_std/bits/std_cctype.h: And here.
+	* include/c_std/bits/std_cstdlib.h (strtof): Guard strtof injection.
+
+	* config/basic_file_stdio.h: Don't include unistd.h.
+	* config/c_io_stdio.h: Don't use compatibility headers.
+	* libsupc++/eh_terminate.cc: Qualify abort.
+	(__terminate): And here.
+	* libsupc++/eh_catch.cc (__cxa_end_catch): Qualify abort.
+
+2001-06-08  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cstdlib.h: Remove _Exit, strtof injections.
+
+2001-06-08  Benjamin Kosnik  
+
+	libstdc++/2767
+	libstdc++/2989
+	libstdc++/2992
+	* include/std/*: Add copyright notice.
+	* include/c_std/bits/*: Use using statements instead of extern "C".
+	* include/c_std/bits/std_cmath.h: Don't overload double versions
+	of math functions with __buitin versions, use global version to
+	prevent ambiguities. Remove define hacks.
+	* include/c_std/bits/std_cwchar.h: Using declarations for "C"
+	functions that have changed signatures and std::
+	declarations. Remove define hacks.
+	* include/c_std/bits/std_cwchar.h: Same, plus remove ambiguous
+	__builtins in std::. Remove define hacks.
+	* testsuite/17_intro/headers_c.cc: Add tests.
+	* testsuite/17_intro/headers_c++.cc: Add test.
+
+2001-06-07  Loren J. Rittle  
+	    John David Anglin  
+
+	c++/3082
+	* libsupc++/eh_alloc.cc: Ensure that required macros are
+	defined before including gthr.h.  Ensure that we get the
+	version of gthr.h for which we know how to provide a
+	configuration.
+	* libsupc++/eh_globals.cc: Likewise.  And, bring the threading
+	code path into line with the current EH model.  Use std, where
+	appropriate.
+
+2001-06-07  Loren J. Rittle  
+	    John David Anglin  
+
+	* config/threads-no.h: Remove file.
+	* config/threads-posix.h: Remove file.
+
+	* acconfig.h (_GLIBCPP_USE_THREADS): Remove.
+	(_GLIBCPP_SUPPORTS_WEAK): Add (required by namespace-clean gthr*.h).
+	(_GLIBCPP_HAVE_GTHR_DEFAULT): Likewise.
+	* config.h.in: Regenerate.
+
+	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Completely rework to
+	setup and use gthr*.h files.  In particular, make gthr.h files
+	namespace-clean in the staging area (they don't have to be for
+	libgcc.a).
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+	* src/Makefile.am (build_headers): Remove bits/c++threads.h
+	and add bits/gthr.h bits/gthr-single.h bits/gthr-default.h.
+	* src/Makefile.in: Regenerate.
+
+	* include/bits/c++config: Cleanup threading configuration macros.
+	In particular, define __STL_GTHREADS macro which controls...
+	* include/bits/stl_threads.h: ...a brand new gthr.h-based
+	configuration here.
+
+	* config/c_io_stdio.h: Include staged gthr.h instead of local
+	thread configuration file.  Always use __gthread_mutex_t
+	instead of __mutext_type (or int).
+	* include/bits/std_fstream.h: Likewise.
+
+	* docs/html/17_intro/howto.html: Remove placeholder comment in
+	case this configuration patch didn't make it.  Add advice that
+	section only applies if configured with --enable-threads.
+	* docs/html/23_containers/howto.html: Reword to make clear
+	that _PTHREADS is no longer required for any port to be
+	correctly using STL with threads.  Add advice that section
+	only applies if configured with --enable-threads.
+
+2001-06-06  Benjamin Kosnik  
+
+	* src/string-inst.cc (_Rep::_S_max_size): Add instantiation.
+
+2001-06-05  Benjamin Kosnik  
+
+	libstdc++/3045
+	* include/bits/basic_ios.tcc: Formatting tweaks.
+	* include/bits/ios_base.h: Formatting tweaks.
+	* src/ios.cc (ios_base::Init::_S_ios_create): Use filebufs here.
+	(ios_base::Init::_S_ios_destroy): ..and here. Explicitly call dtors.
+	* src/globals.cc: Allocate filebufs for standard streams here.
+	(buf_cout, buf_cin, buf_cerr): Like so.
+	(buf_wcout, buf_wcin, buf_wcerr): And so.
+	* testsuite/27_io/ios_init.cc: Add.
+
+2001-06-04  Brendan Kehoe  
+	    Benjamin Kosnik  
+
+	libstdc++/3017
+	* include/bits/locale_facets.h (ctype<_CharT>): Add definitions
+	for generic ctype virtuals.
+	* src/locale.cc: Minor tweaks, naming consistency.
+	* testsuite/22_locale/ctype.cc: Add test.
+
+2001-06-04  Kenny Simpson 
+	    Phil Edwards  
+
+	PR libstdc++/3035 and PR libstdc++/3036
+	* include/bits/stl_pair.h:  Fix pair ctor and make_pair according
+	to LWG DR 181 and 265.
+
+2001-06-04  Phil Edwards  
+
+	PR libstdc++/3034
+	* include/bits/stl_multiset.h (find, lower_bound, upper_bound,
+	equal_range):  Add const overloads as per LWG DR 214.
+	* include/bits/stl_set.h:  Likewise.
+
+2001-06-04  Brendan Kehoe  
+	    Phil Edwards  
+
+	PR libstdc++/3018
+	* include/bits/std_bitset.h (bitset::test):  Fix __pos >= _Nb
+	comparison; all positions must be < _Nb.
+	* testsuite/23_containers/bitset_members.cc:  New file.
+
+2001-06-04  Brendan Kehoe  
+
+	PR libstdc++/3016
+	* include/bits/stl_queue.h (classes queue, priority_queue):  Fix
+	ctors to match the standard.
+
+2001-06-04  Jeffrey Oldham  
+
+	* include/bits/char_traits.h (move): Reverse qualification of
+	memmove with std::.
+	(copy): Reverse qualification of memcpy with std::.
+
+2001-06-04  Jeffrey Oldham  
+
+	* include/bits/char_traits.h (move): Qualify memmove with std::.
+	(copy): Qualify memcpy with std::.
+	* testsuite/27_io/filebuf_virtuals.cc (test01): Qualify strlen and
+	strncmp with std::.
+	(test02): Likewise.
+	* testsuite/27_io/stringbuf_virtuals.cc (test01): Likewise.
+
+2001-06-04  Hans-Peter Nilsson  
+
+	* libsupc++/Makefile.am (install-glibcppinstallHEADERS,
+	uninstall-glibcppinstallHEADERS): Have explicit rules catering to
+	SUN make VPATH peculiarities.
+	* libsupc++/Makefile.in: Regenerate.
+
+2001-06-01  Hans-Peter Nilsson  
+
+	* src/Makefile.am (VPATH): Delimit with ":", not space.
+	* src/Makefile.in: Regenerate.
+
+	* configure.in (use of GLIBCPP_CHECK_GNU_MAKE): Don't fail if GNU
+	make isn't found.
+	* configure: Regenerate.
+
+2001-05-31  scott snyder  
+
+	libstdc++/2976
+	* include/bits/istream.tcc: Include std_ostream.h.
+
+2001-05-31  Benjamin Kosnik  
+
+	libstdc++/2997
+	* src/bitset.cc: Qualify size_t with std::.
+
+2001-05-30  Benjamin Kosnik  
+
+	* acconfig.h (_GLIBCPP_BUGGY_FLOAT_COMPLEX): Remove.
+	(_GLIBCPP_BUGGY_COMPLEX): Remove.
+	* config.h.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_CHECK_COMPLEX_MATH_COMPILER_SUPPORT): Remove.
+	* aclocal.m4: Regenerate.
+	* configure.in: Don't call it.
+	* configure: Regenerate.
+
+	libstdc++/2970
+	* src/complex_io.cc (operator<<(ostream&, const complex&): Fix.
+	* testsuite/26_numerics/complex_inserters_extractors.cc (test01):
+	New test.
+
+	libstdc++/2985
+	* include/bits/std_complex.h: Include sstream. Put definitions for
+	complex inserters and extractors here, and remove them from...
+	* src/complex_io.cc: ...here.
+	* include/bits/basic_ios.h (basic_ios::__numput_type): Add _Traits
+	parameter.
+	(basic_ios::__numget_type): Same.
+	* include/bits/std_istream.h: Same.
+	* include/bits/std_ostream.h: Same.
+	* include/bits/sbuf_iter.h (ostreambuf_iterator): Fix typo in base
+	class iterator template arguments.
+	* src/locale-inst.cc: Add explicit has_facet instantiations.
+	* include/bits/basic_ios.h (basic_ios::_M_get_fctype_ios): Remove.
+	(_M_get_fnumput): Remove.
+	(_M_get_fnumget): Remove.
+	(basic_ios::_M_check_facet): New function.
+	(basic_ios::_M_cache_facets): New function.
+	* include/bits/basic_ios.tcc: Definition for _M_cache_facets.
+	(basic_ios::imbue): Call _M_cache_facets.
+	(basic_ios::init): Same.
+	* include/bits/istream.tcc: Format, use _M_check_facet.
+	* include/bits/ostream.tcc: Same.
+	* include/bits/locale_facets.tcc (__output_float): Change
+	signature, add _Traits.
+	* testsuite/26_numerics/complex_inserters_extractors.cc (test02):
+	New test.
+
+2001-05-30  Loren J. Rittle  
+
+	* include/bits/c++config (__USE_MALLOC): Do not define it.
+	Document why not and give pointers to more information.
+
+	* docs/html/23_containers/howto.html: Update documentation
+	to reflect recent understanding of problem.
+	* docs/html/17_intro/howto.html: Likewise.
+
+2001-05-30  Phil Edwards  
+
+	* docs/doxygen/user.cfg.in:  Minor addition.
+	* docs/html/documentation.html:  Reorganize.  Put most-looked-at
+	stuff first.
+	* docs/html/install.html:  Update for 3.0.  HTML fixups.
+	* docs/html/17_intro/howto.html:  Likewise.
+	* docs/html/18_support/howto.html:  Likewise.
+	* docs/html/19_diagnostics/howto.html:  Likewise.
+	* docs/html/20_util/howto.html:  Likewise.
+	* docs/html/23_containers/howto.html:  Likewise.
+	* docs/html/24_iterators/howto.html:  Likewise.  More notes.
+	* docs/html/25_algorithms/howto.html:  Likewise.
+	* docs/html/26_numerics/howto.html:  Likewise.  More notes.
+	* docs/html/27_io/howto.html:  Likewise.
+	* docs/html/ext/howto.html:  Likewise.
+	* docs/html/faq/index.html:  Likewise.
+	* docs/html/faq/index.txt:  Regenerate.
+	* docs/html/27_io/iostreams_hierarchy.pdf:  Remove in favor of
+	Doxygen-created documentation.
+
+2001-05-30  Rainer Orth  
+
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Use
+	get_multilibs to find gcc.
+
+2001-05-30  Phil Edwards  
+
+	* acinclude.m4 (GLIBCPP_ENABLE_C99):  Reorder output messages.
+	* aclocal.m4:  Regenerate.
+	* configure:  Regenerate.
+
+2001-05-29  Gabriel Dos Reis  
+
+	* include/c_std/bits/std_cstdlib.h:: Move C99 thingies to __gnu_cxx::.
+	* include/c_std/bits/std_cwchar.h (__gnu_cxx): Likewise.
+
+2001-05-27  Gabriel Dos Reis  
+
+	* include/c_std/bits/std_cmath.h: Move C99 functions in __gnu_cxx::.
+	* include/c_std/bits/std_cstdlib.h: Same.
+	* include/c_std/bits/std_cwchar.h: Same.
+
+2001-05-30  Loren J. Rittle  
+
+	* docs/html/17_intro/howto.html: Update link.
+	* docs/html/23_containers/howto.html: Likewise.  Add new link.
+
+2001-05-26  Gabriel Dos Reis  
+
+	* include/c_std/bits/std_cmath.h (sqrt): #undef.
+
+2001-05-23  Rainer Orth  
+
+	* mknumeric_limits: Stop if gen-num-limits dies.
+
+2001-05-25  Benjamin Kosnik  
+
+	other/2931
+	* acinclude.m4 (GLIBCPP_ENABLE_C99): Use AC_TRY_COMPILE.
+	* aclocal.m4: Regenerate.
+	* configure: Same.
+
+2001-05-24  Rainer Orth  
+	    Phil Edwards  
+	    Alexandre Oliva  
+
+	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Set glibcpp_srcdir
+	in an amd-safe manner. Revert glibcpp_prefixdir.
+
+2001-05-25  Gabriel Dos Reis  
+
+	* include/c_std/bits/std_cmath.h: Tweak.  #define away abs, cos,
+	fabs, sin, sqrt.  They are now implemented in terms of __builtin_
+	variants.
+
+2001-05-24  Benjamin Kosnik  
+
+	libstdc++/2830
+	* testsuite/21_strings/inserters_extractors.cc (test09): New test.
+	* include/bits/ostream.tcc: Format to match istream.tcc.
+	(operator<<(basic_ostream __out, const basic_string __s)): Fix.
+
+2001-05-24  Phil Edwards  
+
+	* libsupc++/eh_alloc.cc (__cxa_allocate_exception):  Qualify
+	malloc with std:: .
+	(__cxa_free_exception):  Likewise with free.
+
+2001-05-24  Mark Mitchell  
+
+	* include/c_std/bin/std_cstring.h: #define away all global
+	functions we will redeclare in namespace `std'.
+	* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Use
+	std::memset, instead of memset.
+	* testsuite/19_diagnostics/stdexceptions.cc: Use `std::strcmp',
+	not plain `strcmp'.
+	* testsuite/21_strings/c_strings.cc: Use `std::strcpy' instead of
+	plain `strcpy'.
+
+2001-05-24  Benjamin Kosnik  
+
+	libstdc++/2832
+	* include/bits/basic_ios.tcc: Small tweak.
+	* include/bits/std_fstream.h (ifstream): Add buffer member. Adjust
+	ctors and dtors, and rdbuf settings.
+	(ofstream): Same.
+	(fstream): Same.
+	* include/bits/std_sstream.h: Same, but for stringstream classes.
+	* testsuite/27_io/ostringstream_members.cc: New.
+	* testsuite/27_io/stringstream_members.cc: New.
+	* testsuite/27_io/fstream_members.cc: New.
+	* testsuite/27_io/ifstream_members.cc: Add test.
+	* testsuite/27_io/istringstream_members.cc: Add test.
+	* testsuite/27_io/ofstream_members.cc: Add test.
+
+2001-05-24  Gabriel Dos Reis  
+
+	* include/bits/c++config(__NO_MATH_INLINES): Move to...
+	* config/os/gnu-linux/bits/os_defines.h: ...here.
+
+2001-05-24  Gabriel Dos Reis  
+
+	* include/bits/c++config (__NO_MATH_INLINES): New macro.
+	* testsuite/26_numerics/fabs_inline.cc (main): New test.
+
+2001-05-22  Benjamin Kosnik  
+
+	libstdc++/2841
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set
+	ld_library_path.
+	(libstdc++-v3_set_ld_library_path): New, copied from g++.exp.
+	(libstdc++-v3-finish): Remove.
+	(libstdc++-v3_exit): Remove.
+
+2001-05-22  Phil Edwards  
+
+	* docs/html/documentation.html:  Point to doxygen output.
+
+2001-05-21  Benjamin Kosnik  
+
+	* mkcheck.in (static_fail): Remove S_FLAG decoration on output.
+
+	* include/bits/std_sstream.h (stringbuf::setbuf): Require both
+	arguments to be non-null.
+	* include/bits/fstream.tcc (filebuf::_M_allocate_buffers): Only
+	try allocations if allocated size is greater than zero.
+	(filebuf::_M_filebuf_init): Change to
+	(filebuf::_M_allocate_file): Which is what it does now.
+	(filebuf::_M_allocate_bufers): Change to
+	(filebuf::_M_allocate_internal_buffer): This, and create
+	(filebuf::_M_allocate_pback_buffer): New.
+	(filebuf::_M_destroy_internal_buffer): New.
+	(filebuf::_M_buf_allocated): New data member.
+	(filebuf::setbuf): Use new logic, allow use of external buffer.
+	* testsuite/27_io/stringbuf_virtuals.cc: New file.
+	* testsuite/27_io/filebuf_virtuals.cc: New file.
+
+2001-05-21  Stephen M. Webb  
+
+	* include/c_std/bits/std_cstring.h (memchr): Define "C" functions to
+	__glibcpp_memchr.
+	(strchr): Same, but to __glibcpp_strchr.
+	(strpbrk): Same.
+	(strrchr): Same.
+	(strstr): Same.
+	* include/c_std/bits/std_cwchar.h (wcschr): Same.
+	(wcsbrk): Same.
+	(wcsrchr): Same.
+	(wcsstr): Same.
+	(wmemchr): Same.
+
+2001-05-21  Benjamin Kosnik  
+
+	* testsuite/21_strings/c_strings.cc (main): Fix.
+
+2001-05-19  Phil Edwards  
+
+	* acinclude.m4:  Fix --help spacing, correct comments.
+	* aclocal.m4:  Regenerate.
+	* configure:  Regenerate.
+	* mkcheck.in:  Add usage comments.
+	* docs/html/documentation.html:  Point to doxygen'd tarball.
+
+2001-05-18  Benjamin Kosnik  
+
+	* testsuite/README: Add notes.
+
+	* src/Makefile.am (libstdc++.INC): Remove.
+	* src/Makefile.in: Regenerate.
+
+	Phil Edwards 
+	* mkcheck.in: Add missing '#'.
+
+2001-05-18  Angela Marie Thomas 
+
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init): Set flags
+	appropriately for remote testing and testing installed files without
+	a build dir.
+
+2001-05-18  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Set glibcpp_srcdir
+	amd glibcpp_prefixdir with absolute paths.
+
+	* include/bits/c++config (__GLIBCPP__): Bump.
+	* acinclude.m4 (GLIBCPP_CONFIGURE): Correct version number.
+
+2001-05-18  Gabriel Dos Reis  
+
+	* include/bits/std_valarray.h (valarray<>::operator[] const):
+	Return a const reference.
+	* testsuite/26_numerics/valarray_const_bracket.cc: New test.
+
+2001-05-18  Alexandre Oliva  
+
+	* configure.target (ATOMICITYH): Actually use AIX-specific code on
+	earlier versions of AIX 4.*.
+
+2001-05-18  Angela Marie Thomas 
+
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-dg-test):  Set
+	output_file based on the name of the testcase.
+
+2001-05-18  Angela Marie Thomas 
+
+	* testsuite/lib/libstdc++-v3-dg.exp (libstdc++-v3-init):  Build
+	gluefile and use it if needs_status_wrapper is set.
+
+2001-05-18  Alexandre Oliva  
+
+	* configure.target (ATOMICITYH): Use cpu/generic code on earlier
+	versions of AIX.
+
+2001-05-17  Alexandre Oliva  
+
+	* configure.target (ATOMICITYH): Don't use AIX 4.3-specific code
+	on earlier versions of AIX.
+
+2001-05-15  Benjamin Kosnik  
+
+	* testsuite_flags.in (query): Add backwards, ext directories.
+
+2001-05-15  Mark Mitchell  
+
+	* porting.texi: Correct documentation about handling
+	_LARRGEFILE_SOURCE and its ilk.
+	* config/os/solaris/solaris2.5/bits/os_defines.h: Remove
+	definitions of _XOPEN_SOURCE, _LARGEFILE64_SOURCE, and
+	__EXTENSIONS__.
+	* config/os/solaris/solaris2.6/bits/os_defines.h: Likewise.
+	* config/os/solaris/solaris2.7/bits/os_defines.h: Likewise.
+
+2001-05-15  Zack Weinberg  
+
+	* testsuite/21_strings/inserters_extractors.cc,
+	testsuite/27_io/istream_unformatted.cc,
+	testsuite/27_io/stringstream.cc:
+	Replace multi-line string constants with C89-style
+	concatenated string constants.
+
+2001-05-14  Richard Henderson  
+
+	* mknumeric_limits: Build with -fno-exceptions.
+
+2001-05-13   Benjamin Kosnik  
+
+	Switch over to new harness.
+	* testsuite_flags.in: Tweaks via Gaby.
+	* testsuite/Makefile.am: Change tool to libstdc++-v3.
+	(EXPECT): Quote directly.
+	(RUNTEST): Same.
+	* configure.in: Output testsuite_flags.
+	* acinclude.m4: Substitute src, bld, and prefix dirs.
+	Remove glibcpp_expect, glibcpp_runtestflags.
+	* Makefile.am (RUNTESTFLAGS): Pass this down to subdirs.
+	* mkcheck.in: Port to new interface.
+
+	* aclocal.m4: Regerate.
+	* configure: Regnerate.
+	* Makefile.in: Regnerate.
+	* */Makefile.in: Regenerate.
+
+	* tests_flags.in: Remove.
+	* testsuite/lib/libstdc++.exp: Remove.
+	* testsuite/libstdc++.tests/tests.exp: Remove.
+
+2001-05-13  Alexandre Oliva  
+
+	* configure.target: Remove detection of AIX pthread multilib, now
+	obtained from `gcc -v'.
+
+2001-05-13  John David Anglin  
+
+	* mkcheck.in (setup_size_command): Use Berkeley "-B" mode with GNU
+	size.  Add hpux case for HP size.
+
+2001-05-11   Benjamin Kosnik  
+
+	* testsuite_flags.in: New, simplified interface.
+	* testsuite/lib/libstdc++-v3-dg.exp: New test harness.
+	* testsuite/libstdc++-v3.dg: Add.
+	* testsuite/libstdc++-v3.dg/dg.exp: Add.
+
+2001-05-11   Benjamin Kosnik  
+
+	* testsuite/*/*.cc: Remove spaces, make sure testcases return zero.
+	* testsuite/config/default.exp: Update bugs email address.
+
+2001-05-11  Richard Henderson  
+
+	* libsupc++/eh_personality.cc: Include unwind-pe.h.  Remove
+	all pointer encoding logic.
+	(struct lsda_header_info): Add ttype_base.
+	(get_ttype_entry): Use it instead of a context.
+	(check_exception_spec): Likewise.
+	(PERSONALITY_FUNCTION): Initialize ttype_base.  Store it in
+	the c++ exception header for __cxa_call_unexpected.
+	(__cxa_call_unexpected): Use it.
+
+2001-05-09  Benjamin Kosnik  
+
+	* testsuite/lib/libstdc++.exp: Use libgloss.exp. Call
+	libgloss_link_flags to find crt0.o for targets that use libgloss
+	instead of newlib.
+	Change LDFLAGS to LIBS.
+	Consistently name procedures libstdc++-XXX.
+	* testsuite/libstdc++.tests/tests.exp: Use new procedure names.
+
+2001-05-08  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cstring.h (memchr): Correct definitions.
+	(strchr): Same.
+	(strpbrk): Same.
+	(strrchr): Same.
+	(strstr): Same.
+	* include/c_std/bits/std_cwchar.h (wcschr): Same.
+	(wcsbrk): Same.
+	(wcsrchr): Same.
+	(wcsstr): Same.
+	(wmemchr): Same.
+	* testsuite/21_strings/c_strings.cc: Add tests.
+
+2001-05-07  Benjamin Kosnik  
+
+	libstdc++/2523
+	* include/bits/std_fstream.h (basic_filebuf): Change signature.
+	* include/bits/fstream.tcc (basic_filebuf): Change bool argument
+	to int_type, pass in buffer size info.
+	* include/bits/std_streambuf.h (_M_is_indeterminate): Check for
+	unbuffered situation.
+	(underflow): Remove codecvt bits for the time being.
+	* include/bits/istream.tcc (istream::sentry): Avoid sputbackc call.
+	* include/bits/locale_facets.tcc (_M_extract): Cache dereference
+	values from iterators, clean.
+	* src/locale.cc: Ditto.
+	* include/bits/sbuf_iter.h: Format.
+	* src/ios.cc: Explicitly pass in buffer sizes at creation time.
+	* testsuite/27_io/narrow_stream_objects.cc: Add tests.
+	* testsuite/27_io/filebuf.cc: Tweaks.
+	* testsuite/27_io/filebuf_members.cc: Tweaks.
+
+2001-05-07  Mark Mitchell  
+
+	* config/os/solaris/solaris2.7/bits/os_defines.h
+	(_LARGEFILE_SOURCE): Define it.
+
+2001-05-03  Alexandre Oliva  
+
+	* configure.in (LIBSUPCXX_PICFLAGS): Set it to -prefer-pic or
+	-prefer-non-pic depending on whether libtool has shared libraries
+	enabled or disabled.
+	* libsupc++/Makefile.am (LIBSUPCXX_CXXFLAGS): Set to
+	$(LIBSUPCXX_PICFLAGS).
+	* configure, */Makefile.in: Rebuilt.
+
+2001-05-01  Benjamin Kosnik  
+
+	* include/bits/sbuf_iter.h (istreambuf_iterator): Correct.
+	* testsuite/24_iterators/istreambuf_iterator.cc (test02): Add test.
+
+	* include/bits/std_sstream.h (stringbuf): Leak
+	copied string.
+	* testsuite/24_iterators/ostreambuf_iterator.cc: Correct.
+
+2001-05-01  Tom Browder  
+
+	* docs/html/ext/howto.html:  Fix typo.
+
+2001-05-01  Gabriel Dos Reis  
+
+	* testsuite/libstdc++.tests/tests.exp: Add comment.
+
+2001-05-01  Gabriel Dos Reis  
+
+	* testsuite/libstdc++.tests/tests.exp: Set ulimits.
+
+2001-04-30  Mark Mitchell  
+
+	* porting.texi: Use the GFDL.
+
+2001-04-30  Benjamin Kosnik  
+
+	libstdc++/2627
+	* testsuite/24_iterators/ostreambuf_iterator.cc: New file.
+	* include/bits/sbuf_iter.h (ostreambuf_iterator): Remove bogus
+	specializations.
+
+2001-04-30  Benjamin Kosnik  
+
+	libstdc++/2964
+	* include/bits/stl_iterator_base_funcs.h (__advance): Fix.
+
+2001-04-28  Phil Edwards  
+
+	* docs/doxygen/run_doxygen:  Minor tweaks.
+	* docs/doxygen/style.css:  New file.
+	* docs/doxygen/user.cfg.in:  Update using "doxygen -u" to get the
+	latest parameters available.  Use style.css.
+
+2001-04-27  Benjamin Kosnik  
+
+	* docs/doxygen/mainpage.doxy: New.
+	* docs/doxygen/user.cfg.in: Change default configuration. Single
+	frame, other tweaks.
+
+2001-04-26  Mark Mitchell  
+
+	* docs/html/17_intro/BADNAMES: Remove EGCS reference.
+	Indicate obsolete nature of thelist for G++ 3.0.
+
+2001-04-26  Alexandre Oliva  
+
+	* acinclude.m4 (GLIBCPP_ENABLE_THREADS): Obtain
+	target_thread_file with `gcc -v'.
+	* aclocal.m4, configure: Rebuilt.
+
+2001-04-25  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cmath.h (std): Explicitly inject c99 names.
+	* include/c_std/bits/std_cstdlib.h (std): Same, except for llabs.
+	* include/c_std/bits/std_cwchar.h (std): Same.
+	* acconfig.h (std): Remove c99 injection into std.
+	* config.h.in: Regenerate.
+
+	* testsuite/README: Fix typo.
+
+	* include/bits/codecvt.h: Remove warnings.
+
+2001-04-24  Peter Schmid  
+
+	* include/ext/slist: Include required header files.
+
+2001-04-23  Loren J. Rittle  
+
+	* include/c_std/bits/std_cerrno.h (errno): Define macro from
+	identifier declared with external linkage, if needed.
+	* include/c_std/bits/std_csetjmp.h (setjmp): Likewise.
+	* include/c_std/bits/std_cstdarg.h (va_end): Likewise.
+
+2001-04-23  Benjamin Kosnik  
+
+	* acinclude.m4 (CXX): Set to glibcpp_CXX so that in-directory
+	re-configures find the build compiler.
+	(GLIBCPP_ENABLE_C99): Do all fp-tests with 0.0, not 0. Fixes
+	libstdc++/2609.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-04-20  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_ENABLE_LONG_LONG): Make sure required C99
+	support is enabled correctly before long long is activated.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+	* include/backward/backward_warning.h: Format correctly.
+
+	* testsuite/26_numerics/c99_classification_macros_c.cc: Add.
+	* testsuite/26_numerics/c99_classification_macros_c++.cc: Add.
+	* testsuite/26_numerics/c99_macros.cc: Remove.
+
+2001-04-20  Phil Edwards  
+
+	* include/bits/stl_bvector.h:  Replace __ITERATOR_CATEGORY with
+	__iterator_category.
+
+2001-04-19  Benjamin Kosnik  
+
+	* acconfig.h (_GLIBCPP_USE_C99): Add.
+	* config.h.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_ENABLE_C99): New macro. Test for ISO/IEC
+	9899: 1999 support.
+	* aclocal.m4: Regenerate.
+	* configure.in (GLIBCPP_ENABLE_C99): Use it, on by default.
+	* configure: Regenerate.
+	* configure.in (GLIBCPP_ENABLE_LONG_LONG): Set default to yes.
+	* configure: Regenerate.
+	* include/c_std/bits/std_cwchar.h: Put wcstold, wcstoll, wcstoull
+	into c99.
+	* include/c_std/bits/std_cmath.h: Bring C99 functions into c99
+	namespace.
+	* include/c_std/bits/std_cstdlib.h: Same.
+	* docs/html/configopts.html: Update.
+	* testsuite/26_numerics/c99_macros.cc: Edit, use cmath instead of
+	math.h
+	(test_c99_classify): Add.
+	* config/os/gnu-linux/bits/os_defines.h (_GNU_SOURCE): Remove.
+	(_ISOC99_SOURCE): Remove.
+
+	* include/bits/stl_algo.h: Use _GLIBCPP_HAVE_DRAND48.
+	* include/bits/c++config (__STL_ASSERTIONS): Simplify.
+	* acinclude.m4 (GLIBCPP_CHECK_STDLIB_SUPPORT): Add check for drand48.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-04-19  Phil Edwards  
+
+	* Makefile.am (doxygen):  Assume script is missing execute perms.
+	* Makefile.in:  Regenerated.
+	* docs/doxygen/user.cfg.in:  Add class diagrams and source browsing.
+
+2001-04-17  Loren J. Rittle  
+
+	* testsuite/27_io/istream_seeks.cc: Inform DejaGnu of required files.
+
+2001-04-17  Benjamin Kosnik  
+
+	* testsuite/23_containers/map_operators.cc: Add dg-excess-errors.
+	* testsuite/23_containers/set_operators.cc: Same.
+
+	* include/bits/c++config: Add _GLIBCPP_CONCEPT_CHECKS. Disable by
+	default.
+	(__GLIBCPP__): Bump from value of last release.
+	* include/bits/concept_check.h: Default to off, edit comments.
+	* src/stl-inst.cc: Use _GLIBCPP_CONCEPT_CHECKS.
+	* src/Makefile.am (AM_CXXFLAGS): Remove _GLIBCPP_NO_CONCEPT_CHECKS.
+	* src/Makefile.in: Regenerate.
+
+2001-04-14  Martin Reinecke 
+
+	* include/bits/boost_concept_check.h(_Mutable_ContainerConcept):
+	Properly uglify member.
+
+2001-04-13  Phil Edwards  
+
+	* include/bits/stl_algobase.h (equal):  Use EqualOpConcept instead
+	of EqualityCo
+	mparableConcept.
+
+2001-04-13  Phil Edwards  
+
+	* include/bits/boost_concept_check.h:  Uglify, fork from Boost.
+	* include/bits/concept_check.h:  Uglify.
+	* include/bits/stl_algo.h:  Likewise.
+	* include/bits/stl_algobase.h:  Likewise.
+	* include/bits/stl_deque.h:  Likewise.
+	* include/bits/stl_heap.h:  Likewise.
+	* include/bits/stl_iterator_base_funcs.h:  Likewise.
+	* include/bits/stl_list.h:  Likewise.
+	* include/bits/stl_map.h:  Likewise.
+	* include/bits/stl_multimap.h:  Likewise.
+	* include/bits/stl_multiset.h:  Likewise.
+	* include/bits/stl_numeric.h:  Likewise.
+	* include/bits/stl_queue.h:  Likewise.
+	* include/bits/stl_set.h:  Likewise.
+	* include/bits/stl_stack.h:  Likewise.
+	* include/bits/stl_vector.h:  Likewise.
+	* include/ext/hash_map:  Likewise.
+	* include/ext/hash_set:  Likewise.
+	* include/ext/slist:  Likewise.
+
+2001-04-13  Gabriel Dos Reis  
+
+	* testsuite/23_containers/set_operators.cc: Just try to compile.
+	Mark as XFAIL.
+	* testsuite/23_containers/map_operators.cc: Same.
+
+2001-04-12  Jason Merrill  
+
+	* testsuite/lib/libstdc++.exp (libstdc++-dg-test): Prepend "./" to
+	output_file.
+	(dg-test): Revert rth's change.
+
+2001-04-12  Nathan Sidwell  
+
+	* libsupc++/eh_alloc.cc (__cxa_allocate_exception): Don't
+	terminate holding the mutex. Make sure size fits in EMERGENCY_OBJ_SIZE.
+
+2001-04-12  Gabriel Dos Reis  
+
+	* testsuite/README: Add DejaGnu specific documentation.
+
+2001-04-11  Benjamin Kosnik  
+
+	* acinclude.m4: AC_CHECK_TOOL for expect.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* testsuite/Makefile.am (RUNTEST): Use substituted.
+	(EXPECT): Same.
+
+	* configure.in: Remove xcompiling substitution.
+	* tests_flags.in (CROSS_LIB_PATH): Remove.
+	(xcompiling): Remove.
+	(CXX): Use substituted CXX.
+
+2001-04-11  Richard Henderson  
+
+	* testsuite/lib/libstdc++.exp: Specify path for output_file.
+
+2001-04-08  Gabriel Dos Reis  
+
+	* include/bits/std_valarray.h(valarray<>::operator[]): Make
+	inline.
+
+2001-04-06  Gabriel Dos Reis  
+
+	* testsuite/25_algorithms/equal.cc: New test.
+
+2001-04-06  Joe Buck  
+
+	* stl_algobase.h (std::equal): avoid use of possibly-undefined
+	operator != (one line patch).
+
+2001-04-06   Benjamin Kosnik  
+
+	* include/backward/backward_warning.h: Re-enable.
+
+2001-04-06  Benjamin Kosnik  
+	    Alexandre Oliva  
+
+	* tests_flags.in (CROSS_LIB_PATH): Add as -B flag.
+
+2001-04-06  Gabriel Dos Reis  
+
+	* include/c_std/bits/std_cmath.h: Get rid of C99 math macros.
+	* testsuite/26_numerics/c99_macros.cc: Add test.
+
+2001-04-06  Phil Edwards  
+
+	* docs/html/faq/index.html:  Update for 2.92, grab from RELEASE-NOTES.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-04-06  Benjamin Kosnik  
+
+	* include/backward/backward_warning.h: Temporarily disable until
+	g++ testsuite changes go in.
+	* tests_flags.in (CROSS_LIB_PATH): Add.
+
+2001-04-05  Benjamin Kosnik  
+
+	Warn when using backward headers.
+	* include/backward/algo.h: Include warning file.
+	* include/backward/vector.h: Same.
+	* include/backward/tree.h: Same.
+	* include/backward/tempbuf.h: Same.
+	* include/backward/strstream: Same.
+	* include/backward/streambuf.h: Same.
+	* include/backward/stream.h: Same.
+	* include/backward/stack.h: Same.
+	* include/backward/slist.h: Same.
+	* include/backward/set.h: Same.
+	* include/backward/rope.h:
+	* include/backward/queue.h: Same.
+	* include/backward/pair.h: Same.
+	* include/backward/ostream.h: Same.
+	* include/backward/new.h: Same.
+	* include/backward/multiset.h: Same.
+	* include/backward/multimap.h: Same.
+	* include/backward/map.h: Same.
+	* include/backward/list.h: Same.
+	* include/backward/iterator.h: Same.
+	* include/backward/istream.h: Same.
+	* include/backward/iostream.h:
+	* include/backward/iomanip.h:
+	* include/backward/heap.h: Same.
+	* include/backward/hashtable.h:
+	* include/backward/hash_set.h:
+	* include/backward/hash_map.h:
+	* include/backward/function.h:
+	* include/backward/fstream.h:
+	* include/backward/deque.h:
+	* include/backward/defalloc.h: Same.
+	* include/backward/complex.h: Same.
+	* include/backward/bvector.h:
+	* include/backward/alloc.h:
+	* include/backward/algobase.h: Same.
+
+	* include/backward/backward_warning.h: New file.
+	* src/Makefile.am (backward_headers): Add backward_warning.h
+	* src/Makefile.in: Regenerate.
+
+2001-04-05  Benjamin Kosnik  
+
+	* src/Makefile.am (myinstalldirs): Make sure backward directory is
+	created.
+	(myinstallheaders): Install backward headers in backward directory.
+	* src/Makefile.in: Regenerate.
+
+2001-04-05  Benjamin Kosnik  
+
+	Prepare for libstdc++-2.92.
+	* docs/html/17_intro/RELEASE-NOTES (New): Update.
+	* docs/html/configopts.html: Fix formatting.
+	* README (file): Updates.
+	* include/bits/c++config (__GLIBCPP__): Update.
+
+2001-04-05  Phil Edwards  
+
+	* docs/doxygen/run_doxygen:  Check for the existence of Doxygen.
+
+2001-04-04  Phil Edwards  
+
+	* docs/doxygen/user.cfg.in:  Extract all non-private members;
+	reduce confusing documentation output.
+
+2001-04-04  Geoffrey Keating  
+
+	* include/backward/fstream.h: Add missing semicolons.
+
+2001-04-03  Benjamin Kosnik  
+
+	* include/bits/fstream.tcc: Add bool parameter to filebuf ctor.
+	* include/bits/ios_base.h(ios_base::Init): Remove _M_cout, _M_cin,
+	_M_cerr, _M_wcout, _M_wcin, _M_wcerr.
+	(ios_base::Init::_S_ios_create): New.
+	(ios_base::Init::_S_ios_destroy): New.
+	* include/bits/std_fstream.h: Change ctor args.
+	* src/ios.cc (ios_base::Init::Init): Use _S_ios_create.
+	(ios_base::Init::~Init): Use _S_ios_destroy.
+	(ios_base::sync_with_stdio): Use new members.
+	* testsuite/27_io/filebuf_members.cc: Fix calling conventions for
+	filebuf ctor.
+
+2001-04-03  Peter Schmid  
+
+	* include/backward/fstream.h:  Expose streampos to global
+	namespace.
+
+2001-04-03  Peter Schmid  
+
+	* include/bits/stl_iterator_base_types.h: Fix typo
+
+2001-04-03  Andreas Schwab  
+
+	* include/backward/fstream.h: Define filebuf and wfilebuf.
+
+2001-04-02  Phil Edwards  
+
+	New concept checking implementation.
+	* docs/html/19_diagnostics/howto.html:  Document.
+	* docs/html/17_intro/concept_check.diff:  New file, for reference.
+	* include/bits/boost_concept_check.h:  New file from Boost.
+	* include/bits/c++config:  Update comments.
+
+	* include/bits/concept_check.h:  New file.
+	* include/bits/concept_checks.h:  Removed.
+	* include/bits/container_concepts.h:  Removed.
+	* include/bits/sequence_concepts.h:  Removed.
+	* include/bits/stl_iterator_base.h:  Removed; split into...
+	* include/bits/stl_iterator_base_funcs.h:  ...this new file...
+	* include/bits/stl_iterator_base_types.h:  ...and this new file.
+
+	* include/bits/sbuf_iter.h:  Update to use new implementation.
+	* include/bits/std_iterator.h:  Likewise.
+	* include/bits/std_memory.h:  Likewise.
+	* include/bits/stl_algo.h:  Likewise.
+	* include/bits/stl_algobase.h:  Likewise.
+	* include/bits/stl_construct.h:  Likewise.
+	* include/bits/stl_deque.h:  Likewise.
+	* include/bits/stl_heap.h:  Likewise.
+	* include/bits/stl_list.h:  Likewise.
+	* include/bits/stl_map.h:  Likewise.
+	* include/bits/stl_multimap.h:  Likewise.
+	* include/bits/stl_multiset.h:  Likewise.
+	* include/bits/stl_numeric.h:  Likewise.
+	* include/bits/stl_queue.h:  Likewise.
+	* include/bits/stl_set.h:  Likewise.
+	* include/bits/stl_stack.h:  Likewise.
+	* include/bits/stl_uninitialized.h:  Likewise.
+	* include/bits/stl_vector.h:  Likewise.
+	* include/ext/hash_map:  Likewise.
+	* include/ext/hash_set:  Likewise.
+	* include/ext/slist:  Likewise.
+	* include/ext/stl_hashtable.h:  Likewise.
+
+	* src/Makefile.am (base_headers):  Update list of headers.
+	* Makefile.in:  Regenerated.
+	* src/Makefile.in:  Regenerated.
+	* libio/Makefile.in:  Regenerated.
+	* libmath/Makefile.in:  Regenerated.
+	* libsupc++/Makefile.in:  Regenerated.
+	* testsuite/Makefile.in:  Regenerated.
+
+	* docs/html/install.html:  Update contact information.
+	* docs/html/17_intro/howto.html:  Ditto.
+	* docs/html/18_support/howto.html:  Ditto.
+	* docs/html/20_util/howto.html:  Ditto.
+	* docs/html/21_strings/howto.html:  Ditto.
+	* docs/html/22_locale/howto.html:  Ditto.
+	* docs/html/23_containers/howto.html:  Ditto.
+	* docs/html/24_iterators/howto.html:  Ditto.
+	* docs/html/25_algorithms/howto.html:  Ditto.
+	* docs/html/26_numerics/howto.html:  Ditto.
+	* docs/html/27_io/howto.html:  Ditto.
+	* docs/html/faq/index.html:  Ditto, plus info on new checking code.
+	* docs/html/ext/howto.html:  Ditto, plus info on new checking code.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-04-02  Zack Weinberg  
+
+	* testsuite/lib/libstdc++.exp (dg-test): Annotate result
+	messages with $which_library as well as $tool_flags and
+	${dg-extra-tool-flags}.  Factor out annotation text into
+	a single variable.
+
+2001-04-02  Stephen M. Webb  
+
+	* include/c_std/bits/std_cstring.h: Fix for const-correctness.
+	* include/c_std/bits/std_cwchar.h: Same.
+	* testsuite/21_strings/c_strings.cc: Add.
+
+2001-04-01  Benjamin Kosnik  
+
+	* docs/html/configopts.html: Add --enable-sjlj-exceptions docs.
+
+2001-04-01  Zack Weinberg  
+
+	* tests_flags.in: Use test a = b, not test a == b which is not
+	portable.
+
+2001-03-31  Benjamin Kosnik  
+
+	* configure.target: Remove duplicate aix entry.
+
+2001-03-30  Benjamin Kosnik  
+
+	* include/ext/stl_bvector.h: Move to...
+	* include/bits/stl_vector.h: ...here.
+	* include/ext/bvector: Move to...
+	* include/backward/bvector.h: ...here.
+	* include/bits/std_vector.h: Change stl_bvector include.
+	* include/bits/std_queue.h: Remove bvector include.
+	* include/ext/tree: Insert using rb_tree, move to...
+	* include/backward/tree.h: ...here.
+	* include/backward/hash_map.h: Include ext/hash_map.
+	* include/backward/hash_set.h: Include ext/hash_set.
+	* include/backward/queue.h: New file.
+	* include/backward/stack.h: Edit.
+	* include/backward/algo.h: Same.
+	* include/backward/algobase.h: Same.
+	* include/backward/alloc.h: Same.
+	* include/backward/function.h: Same.
+	* include/backward/iomanip.h: Same.
+	* include/backward/istream.h: Same.
+	* include/backward/iterator.h: Same.
+	* include/backward/list.h: Same.
+	* include/backward/map.h: Same.
+	* include/backward/multimap.h: Same.
+	* include/backward/multiset.h: Same.
+	* include/backward/ostream.h: Same.
+	* include/backward/pair.h: Same
+	* include/backward/rope.h: Same.
+	* include/backward/set.h: Same.
+	* include/backward/stream.h: Same.
+	* include/backward/strstream.h: Same.
+	* include/backward/tempbuf.h: Same.
+	* src/Makefile.am (ext_headers): Edit.
+	* src/Makefile.in: Regenerate.
+	* testsuite/ext/headers.cc (main): Fix.
+	* mkcheck.in: Fix.
+
+2001-03-30  Phil Edwards  
+
+	* tests_flags.in (LIBS):  Pass correct path for installed testing.
+
+2001-03-28  Benjamin Kosnik  
+
+	* mkcheck.in (LIBTOOL): Don't construct -B argument here...
+	* tests_flags.in (CXX): Construct here.
+	(static_fail): Don't remove compile.out. Format with spaces.
+	(INCLUDES): Deal with xcompiling.
+	* configure.in (xcompiling): Substitute.
+	* testsuite/Makefile.am: Snake libjava configury.
+	* testsuite/Makefile.in: Regenerate.
+	* testsuite/23_containers/map_operators.cc: Tweaks.
+	* testsuite/23_containers/set_operators.cc: Tweaks.
+
+2001-03-28  Gabriel Dos Reis  
+
+	Enable dejagnu testing framework.
+	* configure.in: Generate testsuite/Makefile.
+	* configure: Regenerate.
+	* Makefile.am (check-install): Change rule from this...
+	(check-script-install): ...to this.
+	(check): Change rule from this...
+	(check-script):...to this.
+	* Makefile.in: Regenerate.
+
+2001-03-28  Alexandre Oliva  
+
+	* libsupc++/Makefile.am (CXXLINK): Add --tag disable-shared after
+	--tag CXX.
+	(LIBTOOL): Let automake take care of its definition.
+	* libsupc++/Makefile.in: Rebuilt.
+
+2001-03-28  Richard Henderson  
+
+	IA-64 ABI Exception Handling:
+	* acinclude.m4 (GLIBCPP_ENABLE_SJLJ_EXCEPTIONS): New.
+	* configure.in: Use it.
+	* Makefile.in, aclocal.m4, config.h.in, configure: Regenerate.
+	* libsupc++/Makefile.am (sources): Update files list.
+	* libsupc++/Makefile.in: Regenerate.
+	* libsupc++/eh_alloc.cc, libsupc++/eh_aux_runtime.cc: New files.
+	* libsupc++/eh_catch.cc, libsupc++/eh_exception.cc: New files.
+	* libsupc++/eh_globals.cc, libsupc++/eh_personality.cc: New files.
+	* libsupc++/eh_terminate.cc, libsupc++/eh_throw.cc: New files.
+	* libsupc++/exception_support.cc: Remove.
+	* libsupc++/exception_support.h: Remove.
+	* libsupc++/pure.cc: Use std::terminate.
+	* libsupc++/tinfo2.cc (__throw_type_match_rtti_2): Remove.
+	(__is_pointer): Remove.
+	* libsupc++/unwind-cxx.h: New file.
+	* libsupc++/vec.cc (uncatch_exception): Update for new abi.
+
+2001-03-27  Alexandre Oliva  
+
+	* libsupc++/Makefile.am (CXXLINK): Use CXX again, and choose
+	CXX tag explicitly.
+	* src/Makefile.am (CXXLINK): Likewise.
+	* libsupc++/Makefile.in, src/Makefile.in: Rebuilt.
+
+2001-03-27  Benjamin Kosnik  
+
+	* include/bits/c++config (_STL_USE_CONCEPT_CHECKS): Disable by default.
+
+2001-03-26  Peter Schmid  
+
+	* libstdc++-v3/tests_flags.in: Change the order of libstdc++
+	  and libc
+
+2001-03-26  Benjamin Kosnik  
+
+	* include/bits/basic_file.h (get_fileno): Remove.
+	(_M_fileno): Remove.
+	(_M_cfile_created): Add.
+	(basic_file::basic_file(__c_file_type*, openmode): Add.
+	(basic_file::basic_file(int, const char*, openmode): Remove.
+	* include/bits/fstream.tcc (basic_fstream::basic_filebuf(int __fd,
+	const char*, ios_base::openmode): Don't allocate
+	internal buffers. Turn off internal buffers.
+	(basic_filebuf::overflow): Remove test for null buffer.
+	(basic_filebuf::_M_really_overflow): Same. Allow unbuffered use.
+	* include/bits/streambuf.cc: Tweak.
+	* include/bits/std_ostream.h: Tweak.
+	* config/basic_file_libio.h: Same.
+	* config/basic_file_stdio.h: Same.
+	* src/ios.cc (ios_base::Init::Init()): Unbuffer stdout by default.
+	* testsuite/27_io/filebuf_members.cc: Tweaks.
+	* testsuite/27_io/ios_base_members_static.cc: Tweaks.
+
+2001-03-24  Phil Edwards  
+
+	* Makefile.am:  New targets, doxygen and doxygen-maint.
+	* Makefile.in:  Regenerated.
+	* docs/doxygen/run_doxygen:  Finally implemented.
+	* docs/doxygen/maint.cfg.in:  New file.
+	* docs/doxygen/user.cfg.in:  New file.
+
+2001-03-24  Phil Edwards  
+
+	* acinclude.m4 (GLIBCPP_CHECK_COMPILER_FEATURES):  Update comment.
+	* src/Makefile.am:  Replace leading spaces with tabs on continuation
+	lines.
+	* aclocal.m4:  Regenerated.
+	* configure:  Ditto.
+	* Makefile.in:  Ditto.
+	* src/Makefile.in:  Ditto.
+	* libio/Makefile.in:  Ditto.
+	* libmath/Makefile.in:  Ditto.
+	* libsupc++/Makefile.in:  Ditto.
+
+2001-03-24  Phil Edwards  
+
+	* docs/html/19_diagnostics/howto.html:  HTML fixup.  Describe
+	concept-checking code and current status of same.
+	* docs/html/ext/howto.html:  Ditto.
+	* docs/html/faq/index.html:  Ditto.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-03-24  Phil Edwards  
+
+	* include/bits/std_bitset.h:  Include ostream and istream headers
+	instead of iostream.
+
+2001-03-22  Greg Bumgardner 
+
+	* include/bits/ostream.tcc: Use __builtin_alloca.
+
+2001-03-22  Benjamin Kosnik  
+
+	* src/misc-inst.cc (__sink_unused_warning): Move to...
+	* src/locale-inst.cc (__sink_unused_warning): Move to...
+	* src/stl-inst.cc: Here.
+	* include/bits/c++config (_STL_NO_CONCEPT_CHECKS): Add define,
+	commented it out.
+
+2001-03-21  Theodore Papadopoulo  
+
+	* intclude/bits/basic_file.h: Fix typos in comments.
+
+2001-03-20  Richard Henderson  
+
+	* src/gen-num-limits.cc: Instantiate for wchar_t.
+	* config/os/aix/bits/ctype_base.h (mask): Use unsigned int.
+
+2001-03-20  Jason Merrill  
+
+	* libsupc++/vec.cc (__cxa_vec_cleanup): New fn.
+	(__cxa_vec_ctor, __cxa_vec_cctor, __cxa_vec_dtor): Call it.
+	* libsupc++/cxxabi.h: Declare it.
+
+2001-03-16  Alexandre Oliva  
+
+	* src/gen-num-limits.cc (signal_adapter): Overloaded to match
+	signal_func with an unspecified argument list.
+
+2001-03-15  Benjamin Kosnik  
+
+	* tests_flags.in (CXXFLAGS): Link libstdc++ before libsupc++.
+
+2001-03-15  Gabriel Dos Reis  
+
+	* include/bits/basic_string.tcc (operator+): Fix thinko.
+
+2001-03-14  Benjamin Kosnik  
+
+	libstdc++/2020
+	* include/bits/std_streambuf.h: Remove cached locale facets.
+	(basic_streambuf::_M_buf_fctype): Remove.
+	(basic_streambuf::~basic_streambuf): Remove here.
+	(basic_streambuf::basic_streambuf): Same.
+	(basic_streambuf::imbue): Same.
+	* include/bits/fstream.tcc (filebuf::imbue): Remove _M_buf_fctype.
+	* include/bits/std_fstream.h (basic_filebuf::_M_fcvt): Remove.
+	(basic_filebuf::~basic_filebuf()): Remove here.
+	* include/bits/fstream.tcc (basic_filebuf::basic_filebuf): Same.
+	(basic_filebuf::imbue): Same.
+	* include/bits/localefwd.h (_Count_ones): Remove.
+	(locale::_S_num_categories): Just use 6, since this doesn't
+	actually change, ever.
+	* include/bits/locale_facets.tcc (has_facet): Simplify.
+	(use_facet): Same.
+	* testsuite/27_io/filebuf.cc (test06): Add tests.
+
+2001-03-13  Steve Ellcey  
+
+	* libstdc++-v3/config/os/hpux/bits/ctype_base.h: Make ctype masks
+	match HP-UX ctype.h header file.
+
+2001-03-13  Andris Pavenis 
+
+	* config/djgpp/bits/ctype_noninline.h: Fix typo and remove
+	duplicate definitions of __dj_ctype_*
+
+2001-03-13  Benjamin Kosnik  
+
+	* libsupc++/new: Remove pragma interface.
+	* libsupc++/typeinfo: Same.
+	* libsupc++/exception: Same.
+	* libsupc++/new_handler.cc: Remove pragma implementation.
+	(bad_alloc::~bad_alloc()): Add.
+	* libsupc++/exception_support.cc: Same.
+	(exception::~exception): Add.
+	(bad_exception::~bad_exception): Add.
+	* libsupc++/tinfo.cc: Same.
+	(bad_cast::~bad_cast): Add.
+	(bad_typeid::~bad_typeid): Add.
+
+2001-03-13  Phil Edwards  
+
+	* mkcheck.in:  Fix IFS regression for non-bash-2.01 hosts.
+
+2001-03-12  Felix Lee  
+
+	* mkcheck.in: workaround for bash 2.01 IFS bug.
+
+2001-03-12  Benjamin Kosnik  
+
+	Fixups for -fno-for-scope
+	* include/bits/locale_facets.tcc (__match_parallel): Fixup.
+	* src/valarray-inst.cc (__gslice_to_index): Same.
+
+2001-03-12  Rodney Brown  
+
+	* src/gen-num-limits.cc (traps) [SPECIALIZE_TRAPPING]: Add fflush
+	prior to trapping signal (UnixWare 7 workaround).
+
+2001-03-12  Craig Rodrigues  
+
+	* include/backward/hashtable.h: Same.
+	* include/backward/rope.h: Fix include.
+
+2001-03-12  Benjamin Kosnik  
+
+	* include/backward/vector.h: Include std_vector.h.
+
+	* include/bits/istream.tcc (basic_istream<_CharT, _Traits>&
+	operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)):
+	Fix typo.
+
+2001-03-11  Peter Schmid  
+
+	* include/ext/stl_hashtable.h: Change type of __n to size_t
+	* include/backward/bvector.h: Include 
+
+2001-03-09  Gabriel Dos Reis  
+
+	* include/bits/istream.tcc ( basic_istream<_CharT, _Traits>&
+	operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)):
+	Use streamsize, not int_type.
+
+2001-03-08  Benjamin Kosnik  
+
+	* testsuite/27_io/streambuf.cc (test06): New test, disabled at the
+	moment.
+
+2001-03-08  Andreas Schwab  
+
+	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Fix syntax in test
+	command.
+	* aclocal.m4, configure: Regenerated.
+
+2001-03-07  Benjamin Kosnik  
+
+	* include/bits/std_iosfwd.h: Remove string forward decls here.
+	* include/bits/stringfwd.h: Add forward decls for char_traits
+	specializations.
+	* config/c_io_libio.h (wstreamoff): Delete.
+	* config/c_io_stdio.h (wstreamoff): Same.
+	* include/bits/char_traits.h: Use streamoff not wstreamoff for
+	char_traits::off_type.
+	Remove duplicate typedefs.
+	* include/bits/fpos.h: Define streampos/wstreampos here.
+	* testsuite/27_io/istream_seeks.cc (test04): Explicitly cast int
+	values to off_type.
+	(test05): Same.
+	Changeup output files.
+	* testsuite/27_io/istream_unformatted.cc: Change output files.
+	* testsuite/27_io/istream_seeks-1.txt: Add.
+	* testsuite/27_io/istream_seeks-2.tst: Add.
+	* testsuite/27_io/istream_seeks-1.tst: Add.
+	* testsuite/27_io/istream_unformatted-2.tst: Delete.
+	* testsuite/27_io/istream_unformatted-3.tst: Delete.
+	* testsuite/27_io/istream_unformatted-3.txt: Delete.
+
+2001-03-07  Alexandre Oliva  
+
+	Add Irix 5.2, 6.3 support.
+	* config/os/irix/bits: Renamed to...
+	* config/os/irix/irix6.5/bits: this.
+	* config/os/irix/irix5.2/bits: New, copied from irix6.5/bits.
+	* config/os/irix/irix5.2/bits/ctype_base.h: Use _U, _L, _N,
+	_X, _S, _P, _C and _B instead of IRIX-6.5 _IS* macros.
+	* config/os/irix/irix5.2/bits/ctype_noninline.h
+	(ctype::ctype): Initialize _M_table with __ctype.
+	* configure.target: Adjust.
+
+2001-03-06  Benjamin Kosnik  
+
+	libstdc++/2181
+	* include/bits/istream.tcc (basic_istream<_CharT, _Traits>::
+	operator>>(__istream_type& (*__pf)(__istream_type&)): Don't use
+	sentry.
+	(basic_istream<_CharT, _Traits>:: operator>>(__ios_type&
+	(*__pf)(__ios_type&)): Same.
+	(basic_istream<_CharT, _Traits>:: operator>>(ios_base&
+	(*__pf)(ios_base&))): Same.
+	* testsuite/27_io/istream_extractor_other.cc: Add tests.
+	* testsuite/27_io/istream_manip.cc (test01): Fix.
+
+2001-03-06  Nathan Myers  
+	    Benjamin Kosnik  
+
+	* include/c_std/bits/std_cerrno.h: Don't define errno in std::.
+	* testsuite/17_intro/header_cerrno.cc (test01): New file.
+	* testsuite/17_intro/header_cassert.cc (test01): New file.
+	* testsuite/17_intro/header_cstddef.cc (test01): New file.
+	* testsuite/17_intro/header_csetjmp.cc (test01): New file.
+	* testsuite/17_intro/header_cstdarg.cc (test01): New file.
+
+2001-03-05  scott snyder  
+
+	libstdc++/2190
+	* include/c_std/bits/std_cmath.h: Move abs(long), div(long,long)
+	from here...
+	* include/c_std/bits/std_cstdlib.h: ... to here.
+	* testsuite/17_intro/header_cstdlib.cc: Add test.
+
+2001-03-05  Stephen M. Webb  
+
+	* libsupc++/vec.cc (__cxxa_vec_new2): Qualify size_t.
+
+2001-03-05  Laurynas Biveinis  
+
+	* config/os/djgpp/ctype_base.h (ctype_base): fix __to_type
+	definition. Replace enum with static const variables.
+
+	* config/os/djgpp/ctype_inline.h (ctype::is): remove
+	throw specification, fix typos, use .
+	(ctype::scan_is): remove throw specification.
+	(ctype::scan_not): likewise.
+
+	* config/os/djgpp/ctype_noninline.h (ctype::ctype): fix typo.
+	(ctype::do_toupper(char)): use .
+	(ctype::do_toupper(char *, const char *)): likewise.
+	(ctype::do_tolower(char)): likewise.
+	(ctype::do_tolower(char *, const char *)): likewise.
+
+2001-03-04  Phil Edwards  
+
+	http://gcc.gnu.org/ml/libstdc++/2001-03/msg00015.html
+	* include/backward/algo.h:  Use std not __STD.  Remove unneeded
+	macros and "never happens" code.  Adjust to C++STYLE guidelines.
+	* include/backward/algobase.h:  Likewise.
+	* include/backward/alloc.h:  Likewise.
+	* include/backward/bvector.h:  Likewise.
+	* include/backward/deque.h:  Likewise.
+	* include/backward/function.h:  Likewise.
+	* include/backward/hash_map.h:  Likewise.
+	* include/backward/hash_set.h:  Likewise.
+	* include/backward/hashtable.h:  Likewise.
+	* include/backward/heap.h:  Likewise.
+	* include/backward/iterator.h:  Likewise.
+	* include/backward/list.h:  Likewise.
+	* include/backward/map.h:  Likewise.
+	* include/backward/multimap.h:  Likewise.
+	* include/backward/multiset.h:  Likewise.
+	* include/backward/pair.h:  Likewise.
+	* include/backward/rope.h:  Likewise.
+	* include/backward/set.h:  Likewise.
+	* include/backward/slist.h:  Likewise.
+	* include/backward/stack.h:  Likewise.
+	* include/backward/strstream:  Likewise.
+	* include/backward/tempbuf.h:  Likewise.
+	* include/backward/tree.h:  Likewise.
+	* include/backward/vector.h:  Likewise.
+	* include/bits/basic_ios.h:  Likewise.
+	* include/bits/basic_ios.tcc:  Likewise.
+	* include/bits/basic_string.h:  Likewise.
+	* include/bits/c++config:  Likewise.
+	* include/bits/concept_checks.h:  Likewise.
+	* include/bits/fpos.h:  Likewise.
+	* include/bits/fstream.tcc:  Likewise.
+	* include/bits/functexcept.h:  Likewise.
+	* include/bits/ios_base.h:  Likewise.
+	* include/bits/istream.tcc:  Likewise.
+	* include/bits/mask_array.h:  Likewise.
+	* include/bits/ostream.tcc:  Likewise.
+	* include/bits/pthread_allocimpl.h:  Likewise.
+	* include/bits/sbuf_iter.h:  Likewise.
+	* include/bits/slice.h:  Likewise.
+	* include/bits/slice_array.h:  Likewise.
+	* include/bits/sstream.tcc:  Likewise.
+	* include/bits/std_bitset.h:  Likewise.
+	* include/bits/std_fstream.h:  Likewise.
+	* include/bits/std_iomanip.h:  Likewise.
+	* include/bits/std_ios.h:  Likewise.
+	* include/bits/std_istream.h:  Likewise.
+	* include/bits/std_iterator.h:  Likewise.
+	* include/bits/std_memory.h:  Likewise.
+	* include/bits/std_ostream.h:  Likewise.
+	* include/bits/std_sstream.h:  Likewise.
+	* include/bits/std_streambuf.h:  Likewise.
+	* include/bits/std_string.h:  Likewise.
+	* include/bits/std_valarray.h:  Likewise.
+	* include/bits/stl_algo.h:  Likewise.
+	* include/bits/stl_algobase.h:  Likewise.
+	* include/bits/stl_alloc.h:  Likewise.
+	* include/bits/stl_construct.h:  Likewise.
+	* include/bits/stl_deque.h:  Likewise.
+	* include/bits/stl_function.h:  Likewise.
+	* include/bits/stl_heap.h:  Likewise.
+	* include/bits/stl_iterator.h:  Likewise.
+	* include/bits/stl_iterator_base.h:  Likewise.
+	* include/bits/stl_list.h:  Likewise.
+	* include/bits/stl_map.h:  Likewise.
+	* include/bits/stl_multimap.h:  Likewise.
+	* include/bits/stl_multiset.h:  Likewise.
+	* include/bits/stl_numeric.h:  Likewise.
+	* include/bits/stl_pair.h:  Likewise.
+	* include/bits/stl_pthread_alloc.h:  Likewise.
+	* include/bits/stl_queue.h:  Likewise.
+	* include/bits/stl_raw_storage_iter.h:  Likewise.
+	* include/bits/stl_relops.h:  Likewise.
+	* include/bits/stl_set.h:  Likewise.
+	* include/bits/stl_stack.h:  Likewise.
+	* include/bits/stl_tempbuf.h:  Likewise.
+	* include/bits/stl_threads.h:  Likewise.
+	* include/bits/stl_tree.h:  Likewise.
+	* include/bits/stl_uninitialized.h:  Likewise.
+	* include/bits/stl_vector.h:  Likewise.
+	* include/bits/streambuf.tcc:  Likewise.
+	* include/bits/type_traits.h:  Likewise.
+	* include/bits/valarray_meta.h:  Likewise.
+	* include/ext/bvector:  Likewise.
+	* include/ext/hash_map:  Likewise.
+	* include/ext/hash_set:  Likewise.
+	* include/ext/ropeimpl.h:  Likewise.
+	* include/ext/slist:  Likewise.
+	* include/ext/stl_bvector.h:  Likewise.
+	* include/ext/stl_hash_fun.h:  Likewise.
+	* include/ext/stl_hashtable.h:  Likewise.
+	* include/ext/stl_rope.h:  Likewise.
+	* src/complex_io.cc:  Likewise.
+	* src/ios.cc:  Likewise.
+	* src/locale-inst.cc:  Likewise.
+	* src/locale.cc:  Likewise.
+	* src/localename.cc:  Likewise.
+	* src/misc-inst.cc:  Likewise.
+	* src/stdexcept.cc:  Likewise.
+	* src/stl-inst.cc:  Likewise.
+	* src/strstream.cc:  Likewise.
+	* src/valarray-inst.cc:  Likewise.
+
+2001-03-03  Benjamin Kosnik  
+
+	* src/misc-inst.cc (__copy_streambufs): Fix typo for alpha.
+
+2001-03-02  Peter Schmid  
+
+	* include/bits/istream.tcc: change type of __extracted to __size_type
+
+2001-03-02  Benjamin Kosnik  
+
+	* src/wstring-inst.cc: New file.
+	* src/Makefile.am (EXTRA_LTLIBRARIES): Remove.
+	(libinst_wstring_la_SOURCES): Remove.
+	(libstdc___la_LIBADD): Remove libinst_wstring_la.
+	(sources): Add wstring-inst.cc
+	* acinclude.m4 (GLIBCPP_CHECK_WCHAR_T_SUPPORT): Remove
+	libinst_wstring_la.
+
+2001-03-02  Peter Schmid  
+
+	* src/locale.cc: initialise __ret with zero
+	* src/strstream.cc:cast gptr to int_type
+
+2001-03-01  Phil Edwards  
+
+	* docs/html/faq/index.html:  Update broken links.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-02-28  Benjamin Kosnik  
+
+	libstdc++/2064
+	* configure.target: Change irix* to irix6.5* in target_os table.
+
+2001-02-28  Benjamin Kosnik  
+
+	libstdc++/2103
+	* include/bits/c++config (__GLIBCPP__): Bump number in
+	anticipation of 2.92.
+
+	* include/bits/codecvt.h: Fix typo.
+	* include/bits/basic_file.h (__basic_file): Don't use _M_wfile for
+	stdio model.
+	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Enable wchar_t
+	instantiations for stdio model.
+
+2001-02-28  Phil Edwards  
+
+	* acinclude.m4 (GLIBCPP_CONFIGURE):  Remove GLIBCPP_CFLAGS
+	  and GLIBCPP_CXXFLAGS as unused variables.
+	* configure.host:  Likewise.
+	* configure.target:  Likewise.
+	* aclocal.m4:  Regenerated.
+	* configure:  Regenerated.
+	* Makefile.in:  Regenerated.
+	* libio/Makefile.in:  Regenerated.
+	* libmath/Makefile.in:  Regenerated.
+	* libsupc++/Makefile.in:  Regenerated.
+	* src/Makefile.in:  Regenerated.
+
+2001-02-27  Benjamin Kosnik  
+
+	libstdc++/1886
+	* include/bits/basic_file.h: Include basic_file_model.h.
+	* config/c_io_libio.cc: Move to...
+	* config/basic_file_libio.cc: Here.
+	* config/basic_file_libio.h: New file.
+	* config/c_io_stdio.cc: Move to...
+	* config/basic_file_stdio.cc: Here.
+	* config/basic_file_stdio.h: New file.
+	* config/c_io_libio.h: Tweak.
+	* config/c_io_stdio.h: Tweak.
+	* src/Makefile.am (build_headers): Add basic_file_model.h.
+	(sources): Add basic_file.cc, remove c++io.cc.
+	* src/Makefile.in: Regenerate.
+	* acinclude.m4 (GLIBCPP_ENABLE_CSTDIO): Add support for
+	basic_file_model.h and basic_file.cc.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* testsuite/27_io/filebuf.cc (test05): Add regression.
+
+2001-02-27  Benjamin Kosnik  
+
+	Correct license.
+	* config/cpu/alpha/bits/atomicity.h: Change.
+	* config/cpu/arm/bits/atomicit3y.h
+	* config/cpu/generic/bits/atomicity.h
+	* config/cpu/i386/bits/atomicity.h
+	* config/cpu/i486/bits/atomicity.h
+	* config/cpu/ia64/bits/atomicity.h
+	* config/cpu/powerpc/bits/atomicity.h
+	* config/cpu/sparc/sparc32/bits/atomicity.h
+	* config/cpu/sparc/sparc64/bits/atomicity.h
+	* config/os/aix/bits/atomicity.h
+	* config/os/irix/bits/atomicity.h
+
+2001-02-27  Benjamin Kosnik  
+
+	* include/bits/std_stdexcept.h (runtime_error): Make string
+	member non-const.
+	(logic_error): Same.
+	* testsuite/19_diagnostics/stdexceptions.cc (test04): Add test.
+	(test03): Fix.
+
+2001-02-26  Benjamin Kosnik  
+
+	libstdc++/1972
+	libstdc++/2089
+	* include/bits/std_stdexcept.h (logic_error::logic_error): Use
+	string object, not reference.
+	(runtime_error::runtime_error): Same.
+	* testsuite/19_diagnostics/stdexceptions.cc: New file.
+
+2001-02-26  Phil Edwards  
+
+	* acinclude.m4 (GLIBCPP_CONFIGURE):  Update required compiler version.
+	  (GLIBCPP_CHECK_COMPILER_FEATURES):  Can safely assume new
+	  diagnostics.  Remove WFMT_FLAGS.
+	* configure.in:  Replace WFMT_FLAGS with diagnostics options.
+	* libsupc++/Makefile.am:  Likewise.
+	* src/Makefile.am:  Likewise.
+	* aclocal.m4:  Regenerated.
+	* configure:  Regenerated.
+	* Makefile.in:  Regenerated.
+	* libio/Makefile.in:  Regenerated.
+	* libmath/Makefile.in:  Regenerated.
+	* libsupc++/Makefile.in:  Regenerated.
+	* src/Makefile.in:  Regenerated.
+
+2001-02-26  Phil Edwards  
+
+	Fixes libstdc++/2079
+	* include/backward/iomanip.h:  Expose  manipulators to global
+	  namespace.
+	* include/backward/iostream.h:  Also expose std::ws.
+
+2001-02-25  Greg Freemyer 
+
+	* libmath/mathconf.h (GET_LDOUBLE_MSW64): Fix thinko.
+
+2001-02-23  Benjamin Kosnik  
+
+	* include/bits/codecvt.h: Use __builtin_alloca.
+	* include/bits/ostream.tcc: Same.
+	* include/bits/fstream.tcc: Same.
+
+2001-02-23  Alexandre Oliva 
+
+	* mknumeric_limits (CC): Use VAR=${VAR=...} form.
+
+2001-02-23  David Edelsohn 
+
+	* mknumeric_limits (CC): Use $BUILD_DIR/../../gcc/xgcc
+
+2001-02-23  Phil Edwards  
+
+	c++/2052
+	* include/backward/iostream.h:  Expose std::flush in old headers.
+
+2001-02-23  Gabriel Dos Reis  
+
+	* mknumeric_limits: Remove special-casing on target.  Use gcc
+	instead of g++ to build gen-num-limits.cc
+
+2001-02-22  Benjamin Kosnik  
+
+	* tests_flags.in (CXXFLAGS): Add -rpath to gcc build dir.
+
+	* include/bits/codecvt.h: Use alloca instead of __extension__ for
+	the time being.
+	* include/bits/ostream.tcc: Same.
+	* include/bits/std_ostream.h: Same.
+	* include/bits/fstream.tcc: Same.
+	* include/bits/locale_facets.tcc: Add typename.
+	* include/bits/c++config (_GLIBCPP_FULLY_COMPLIANT_HEADERS): Enable.
+
+2001-02-21  Phil Edwards  
+
+	* tests_flags.in:  Remove -n flag from call to echo.
+
+2001-02-20  Benjamin Kosnik  
+
+	* config/c_locale_gnu.h: Add clocale include.
+
+2001-02-20  Phil Edwards  
+
+	* include/bits/stl_config.h:  Remove file.
+	* src/Makefile.am (base_headers):  Remove from list.
+	* configure:  Regenerate.
+	* Makefile.in:  Ditto.
+	* libio/Makefile.in:  Ditto.
+	* libmath/Makefile.in:  Ditto.
+	* libsupc++/Makefile.in:  Ditto.
+	* src/Makefile.in:  Ditto.
+
+	* include/bits/c++config:  Move relevant macros to here.
+	* include/backward/alloc.h:  Include c++config.h instead.
+	* include/backward/function.h:  Ditto.
+	* include/backward/heap.h:  Ditto.
+	* include/backward/pair.h:  Ditto.
+	* include/bits/pthread_allocimpl.h:  Ditto.
+	* include/bits/std_functional.h:  Ditto.
+	* include/bits/std_iterator.h:  Ditto.
+	* include/bits/std_numeric.h:  Ditto.
+	* include/bits/std_utility.h:  Ditto.
+	* include/bits/stl_algobase.h:  Ditto.
+	* include/bits/type_traits.h:  Ditto.
+	* src/stl-inst.cc:  Ditto.
+
+2001-02-19  Gabriel Dos Reis  
+
+	* include/bits/basic_file.h: Add #pragma system_header
+	* include/bits/basic_ios.h: Ditto.
+	* include/bits/basic_string.h: Ditto.
+	* include/bits/char_traits.h: Ditto.
+	* include/bits/codecvt.h: Ditto.
+	* include/bits/cpp_type_traits.h:  Ditto.
+	* include/bits/fpos.h: Ditto.
+	* include/bits/gslice.h: Ditto.
+	* include/bits/gslice_array.h: Ditto.
+	* include/bits/indirect_array.h: Ditto.
+	* include/bits/ios_base.h: Ditto.
+	* include/bits/limits_generic.h: Ditto.
+	* include/bits/locale_facets.h: Ditto.
+	* include/bits/localefwd.h: Ditto.
+	* include/bits/mask_array.h: Ditto.
+	* include/bits/sbuf_iter.h: Ditto.
+	* include/bits/sequence_concepts.h: Ditto.
+	* include/bits/slice.h: Ditto.
+	* include/bits/slice_array.h: Ditto.
+	* include/bits/std_algorithm.h: Likewise.
+	* include/bits/std_bitset.h: Likewise.
+	* include/bits/std_complex.h: Likewise.
+	* include/bits/std_deque.h: Likewise.
+	* include/bits/std_fstream.h: Likewise.
+	* include/bits/std_functional.h: Likewise.
+	* include/bits/std_iomanip.h: Likewise.
+	* include/bits/std_ios.h: Likewise.
+	* include/bits/std_iosfwd.h: Likewise.
+	* include/bits/std_iostream.h: Likewise.
+	* include/bits/std_istream.h: Likewise.
+	* include/bits/std_iterator.h: Likewise.
+	* include/bits/std_list.h: Likewise.
+	* include/bits/std_locale.h: Likewise.
+	* include/bits/std_map.h: Likewise.
+	* include/bits/std_memory.h: Likewise.
+	* include/bits/std_numeric.h: Likewise.
+	* include/bits/std_ostream.h: Likewise.
+	* include/bits/std_queue.h: Likewise.
+	* include/bits/std_set.h: Likewise.
+	* include/bits/std_sstream.h: Likewise.
+	* include/bits/std_stack.h: Likewise.
+	* include/bits/std_stdexcept.h: Likewise.
+	* include/bits/std_streambuf.h: Likewise.
+	* include/bits/std_string.h: Likewise.
+	* include/bits/std_utility.h: Likewise.
+	* include/bits/std_valarray.h: Likewise.
+	* include/bits/std_vector.h: Likewise.
+	* include/bits/stringfwd.h: Likewise.
+	* include/bits/type_traits.h: Likewise.
+	* include/bits/valarray_array.h: Likewise.
+	* include/bits/valarray_meta.h: Likewise.
+
+2001-02-19  Andreas Jaeger  
+
+	* config/cpu/sparc/sparc64/bits/atomicity.h (__compare_and_swap):
+	Fix typo.
+
+2001-02-16  Greg Bumgardner 
+
+	libstdc++/1734
+	* include/bits/std_ostream.h: Replaced usage of
+	_Traits::_S_eos() with _CharT() as per section 17.2.2.1.3.
+	* include/bits/char_traits.h: Removed non-standard
+	methods that cannot be used elsewhere.
+
+	libstdc++/1885
+	* include/bits/basic_ios.h: Uncommented #include of
+	bits/basic_ios.tcc
+
+	libstdc++/1897
+	* include/bits/codecvt.h: See next...
+	* include/bits/fstream.tcc: See next...
+	* include/bits/ostream.tcc: Add __extension__
+	to variable-length arrays.
+
+	libstdc++/1967
+	* include/bits/localefwd.h: Changed int counter type to size_t.
+
+	libstdc++/1968
+	* include/bits/std_fstream.h: Added typedef for __ctype_type.
+
+2001-02-16  Benjamin Kosnik  
+
+	* testsuite/21_strings/char_traits.cc: Move to ...
+	* testsuite/21_strings/char_traits_requirements.cc: ..here.
+	* testsuite/21_strings/char_traits-int_type.cc: Move to ...
+	* testsuite/21_strings/char_traits_typedefs.cc: ..here.
+
+2001-02-16  Gabriel Dos Reis  
+
+	* libmath/mathconf.h (FINITE_P, INFINITE_P): Remove macro
+	definitions.
+
+2001-02-15  Benjamin Kosnik  
+
+	* include/bits/c++config: Revert.
+
+2001-02-15  Mark Mitchell  
+
+	* include/bits/istream.tcc: Use ios_base::iostate in place of
+	iostate throughout.  Insert `typename' keyword where necessary.
+	* include/bits/ostream.tcc: Insert `typename' keyword where
+	necessary.
+
+2001-02-15  Jeffrey Oldham  
+
+	* include/bits/c++config (_GLIBCPP_FULLY_COMPLIANT_HEADERS):
+	Define so library is compliant.
+
+2001-02-15  Anthony Green  
+
+	* acinclude.m4 (glibcpp_toolexeclibdir): Fix test for cross
+	compilation.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-02-15  Rodney Brown  
+
+	* acinclude.m4 (GLIBCPP_CHECK_MATH_DECL_1):
+	Include ieeefp.h for fpclass on UnixWare{2,7}.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* mkcheck.in (size_command): Do without GNU-grep when using
+	size from binutils.
+
+2001-02-15  Mark Mitchell  
+
+	Remove old ABI support from libsupc++.
+	* libsupc++/cxxabi.h: Remove conditionally compiled code.
+	* libsupc++/exception_support.cc: Likewise.
+	* libsupc++/pure.cc: Likewise.
+	* libsupc++/tinfo.cc: Likewise.
+	* libsupc++/tinfo.h: Likewise.
+	* libsupc++/tinfo2.cc: Likewise.
+	* libsupc++/typeinfo: Likewise.
+	* libsupc++/vec.cc: Likewise.
+
+2001-02-15  Benjamin Kosnik  
+
+	Add support for -fno-exceptions.
+	* include/bits/exception_support.h: Remove.
+	* include/bits/basic_string.h: Remove exception_support.
+	(string::_M_check): Replace __OUTOFRANGE with __throw_out_of_range.
+	(string::at): Same.
+	(string::substr): Same.
+	* include/bits/basic_string.tcc (string::reserve): Replace
+	__LENGTHERROR with __throw_length_error.
+	(string::_S_create): Same.
+	(string::resize): Same.
+	(string::_M_replace): Same.
+	(string::replace): Same.
+	(string::copy): Replace __OUTOFRANGE with __throw_out_of_range.
+	(string::compare): Same.
+	* include/bits/stl_vector.h: Remove exception_support.
+	* src/Makefile.am (base_headers): Remove here.
+	* src/Makefile.in: Regenerate.
+
+	* include/bits/stl_range_errors.h: Remove.
+	* include/bits/stl_deque.h: Use __throw_range_error.
+	* include/bits/std_deque.h: Include functexcept.h.
+	* include/bits/std_vector.h: Same.
+	* src/Makefile.am (base_headers): Remove here.
+	* src/Makefile.in: Regenerate.
+	* include/ext/stl_bvector.h (class __BVECTOR): Use __throw_range_error.
+	* include/ext/bvector: Remove stl_range_errors.h
+
+	* include/bits/c++config (_GLIBCPP_USE_EXCEPTIONS): Remove.
+
+	* include/bits/functexcept.h: New file.
+	* src/functexcept.cc: New file. Definitions for function-based
+	exception routines.
+	* src/Makefile.am (sources): Add functexcept.cc.
+	* src/Makefile.in: Regenerate.
+
+	* include/bits/stl_config.h (__STL_USE_EXCEPTIONS): Wrap with
+	__EXCEPTIONS.
+
+	* include/bits/localefwd.h: Include functexcept.h.
+	* include/bits/std_iosfwd.h: Same.
+
+	* include/bits/basic_ios.h: Use __throw_ios_failure instead of
+	throw basic_ios::failure.
+	* include/bits/fstream.tcc (filebuf::_M_allocate_buffers):
+	Use __throw_exception_again.
+	(filebuf::_M_filebuf_init): Same.
+	* include/bits/streambuf.tcc (__copy_streambufs): Same.
+	* include/bits/ostream.tcc (ostream::operator<<): Same.
+	* include/bits/istream.tcc (istream::operator>>): Same.
+	* include/bits/basic_string.tcc (string::_M_mutate): Same.
+	(string::_S_construct): Same.
+	(string::_M_clone): Same.
+	* include/bits/locale_facets.tcc (use_facet(const locale&)): Use
+	__throw_bad_cast.
+	(num_put<_CharT, _OutIter>::do_put): Use __throw_exception_again.
+	* src/localename.cc (locale::_Imp::_Imp(const _Impl&, size_t): Use
+	__throw_exception_again.
+	(locale::_Imp::_Imp(string, size_t): Same.
+	(locale::_Imp::_M_replace_facet): Use __throw_runtime_error.
+	* src/locale.cc (locale::_M_coalesce): Use __throw_exception_again.
+	(locale::locale(const char*)): Use __throw_runtime_error.
+	(locale::classic): Use __throw_exception_again.
+	(locale::_S_normalize_category): Use __throw_runtime_error.
+
+	* src/stdexcept.cc: Remove cruft.
+
+	* libsupc++/exception_defines.h: New file.
+	* libsupc++/new_opnt.cc: Include exception_defines.h.
+	* libsupc++/vec.cc: Same.
+	(__cxa_vec_new2): Use __throw_exception_again.
+	(__cxa_vec_new3): Same.
+	(__cxa_vec_ctor): Same.
+	(__cxa_vec_delete3): Same.
+	(__cxa_vec_cctor): Same.
+	(__cxa_vec_delete2): Same.
+	(__cxa_vec_dtor): Same.
+	* libsupc++/exception_support.cc: Include exception_defines.h. Only
+	compile exception-handling bits if __EXCEPTIONS is defined.
+	Remove old ABI support.
+	* libsupc++/new_op.cc (new): Include exception_defines.h. Use
+	std::__throw_bad_alloc() instead of throw bad_alloc.
+	* libsupc++/Makefile.am: Add exception_defines.h.
+	* libsupc++/Makefile.in: Reformat.
+	* libsupc++/*: Format.
+
+2001-02-15  Phil Edwards  
+
+	* docs/html/configopts.html:  Minor updates and typo fixes.
+	* docs/html/faq/index.html:  Updates of the "not really bugs" list.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-02-15  Gabriel Dos Reis  
+
+	* testsuite/lib/libstdc++.exp: Lift, temporarily, out of
+	dejagnu/dg.exp.  Adapt to log options used to run testcases.
+
+2001-02-13  Gabriel Dos Reis  
+
+	* testsuite/lib/libstdc++.exp(dg-test): Lift temporarily from
+	dejagnu/dg.exp.
+
+2001-02-13  Dirk Mueller 
+	    Phil Edwards  
+
+	* include/backward/function.h:  Do not use rel_ops for older
+	  headers either.
+	* include/backward/pair.h:  Likewise.
+
+2001-02-12  Mark Mitchell  
+
+	* src/locale.cc: Remove bogus locale::id definitions.
+
+2001-02-11  Gabriel Dos Reis  
+
+	* include/bits/std_valarray.h: #undef _DEFINE_LOGICAL_OPERATOR,
+	not _DEFINE_VALARRAY_OPERATOR which is not existent.
+
+	* include/bits/valarray_meta.h (_RefFunClos<>_RefRunClos): Fix
+	thinko in member initialisation.
+
+2001-02-11  Gabriel Dos Reis  
+
+	* include/bits/std_valarray.h(valarray<>::shift): Avoid
+	comparaison between signed and unsigned integer types.
+	(valarray<>::cshift): Reformat.
+
+2001-02-11  Alexandre Oliva  
+
+	* src/gen-num-limits.cc: Use sigsetjmp and siglongjmp if available.
+	* mknumeric_limits: Compile it with -DHAVE_CONFIG_H.
+	* configure.in: Test for sigsetjmp.
+	* configure, config.h.in: Rebuilt.
+
+2001-02-11  Gabriel Dos Reis  
+
+	* src/valarray-inst.cc (gslice::_Indexer::_Indexer): Don't flip
+	lengths and strides.
+	(__gslice_to_index): Document.
+
+2001-02-11  Gabriel Dos Reis  
+
+	* include/bits/char_traits.h char_traits::int_type: Change
+	to `int' to match 21.1.3.1/2.
+
+	* testsuite/21_strings/char_traits-int_type.C: New test.
+
+2001-02-10  Gabriel Dos Reis  
+
+	* testsuite/Makefile.am: New file.
+
+2001-02-09  Nathan Sidwell  
+
+	* include/c_shadow/bits/std_cstdlib.h (lldiv_t): Fix typo.
+
+2001-02-08  Loren J. Rittle  
+
+	* src/locale-inst.cc (fill_n): Instantiate with size_t arguments.
+
+2001-02-08  David Edelsohn  
+
+	* configure.target (aix4*): Remove extra set of brackets.
+
+2001-02-07  Benjamin Kosnik  
+
+	Clean up stdexcept.
+	* include/bits/stringfwd.h: New file.
+	* include/bits/stl_string_fwd.h: Remove.
+	* include/bits/localefwd.h: Remove declaration for allocator.
+	* include/bits/std_iosfwd: Same.
+	* include/bits/std_string.h: Include it.
+	* include/bits/std_ios.h: Remove include.
+	* include/bits/basic_string.h: Tweak.
+	* libsupc++/new: Format.
+	* src/Makefile.am (base_headers): Add stringfwd.h, remove
+	stl_string_fwd.h
+	* src/Makefile.in: Regenerate.
+	* include/bits/std_stdexcept.h: Rewrite.
+	* src/stdexcept.cc: Same.
+
+2001-02-06  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): Deal with library
+	install locations too.
+	* aclocal.m4: Regenerate.
+	* configure.in: Remove USE_LIBDIR.
+	* configure: Regenerate.
+	* src/Makefile.am (toolexecdir): Simplify, use
+	glibcpp_toolexecdir, glibcpp_toolexeclibdir.
+	* src/Makefile.in: Regenerate.
+	* libsupc++/Makefile.am: Same.
+	* libsupc++/Makefile.in: Regenerate.
+
+	* src/Makefile.am: Just remove special rules for locale-inst.cc and
+	misc-inst.cc as no longer necessary.
+
+	Follow C++STYLE for naming non-static functions.
+	* include/bits/ostream.tcc (_S_pad_char): Not static, rename to
+	__pad_char.
+	* include/bits/streambuf.tcc: Same.
+	* include/bits/ostream.tcc: Same.
+	* include/bits/istream.tcc: Same.
+	* include/bits/locale_facets.tcc (_S_pad_numeric): To __pad_numeric.
+	(_S_output_float): To __output_float.
+	* include/bits/std_streambuf.h (_S_copy_streambufs): To
+	__copy_streambufs.
+	* include/bits/locale_facets.tcc (_S_build_float_format): To
+	__build_float_format.
+	(_S_format): To __output_integer.
+	(_S_fill): To __pad.
+	* src/locale.cc: Same.
+	* src/misc-inst.cc: Fix formatting. Fix signature for wchar_t. Correct
+	names.
+	* include/bits/locale_facets.tcc (_S_group_digits): To
+	__group_digits.
+	* src/locale-inst.cc: Fixup names. Add use_facet instantiations
+	for collate, numpunct.
+
+2001-02-06  Phil Edwards  
+
+	* docs/html/configopts.html:  Fix HTML markup.
+	* docs/html/install.html:  Bring up to date.
+	* docs/html/17_intro/C++STYLE:  Add global variable conventions.
+	* docs/html/21_strings/howto.html:  More notes.
+	* docs/html/22_locale/howto.html:  Fix HTML markup.
+	* docs/html/27_io/howto.html:  More notes.
+	* docs/html/27_io/binary_iostreams_kanze.txt:  New file.
+	* docs/html/27_io/binary_iostreams_kuehl.txt:  New file.
+
+2001-02-06  Jeffrey Oldham  
+
+	* src/misc-inst.cc (_S_pad_char): Modify declaration's parameters
+	to match header files.
+	(_S_output_float): Likewise.
+	(_S_copy_streambufs): Likewise.
+
+2001-02-06  Hyman Rosen  
+	    Phil Edwards  
+
+	* include/bits/std_istream.h (op>> signed,unsigned char):  Must
+	  use reinterpret_cast, not static_cast.
+
+2001-02-06  Benjamin Kosnik  
+
+	* acinclude.m4 (gxx_include_dir): Quote, fix regression.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-02-05  Benjamin Kosnik  
+
+	* include/bits/locale_facets.h (class moneypunct): Fix typos.
+	* libsupc++/pure.cc: Revert.
+
+2001-02-05  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_CHECK_MATH_DECL_1): New macro.
+	(GLIBCPP_CHECK_MATH_DECL_2): New macro.
+	(GLIBCPP_CHECK_MATH_DECL_3): New macro.
+	(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1): Use it, check for _* too.
+	(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2): Same.
+	(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3): Same.
+	(GLIBCPP_CHECK_MATH_SUPPORT): Remove explicit checks for _* versions.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+2001-02-05  Mark Mitchell  
+
+	* include/bits/locale_facets.tcc: Remove `static' keyword on
+	function definitions.
+	* include/bits/std_streambuf.h: Likewise.
+	* src/Makefile.am: Remove use of -fimplicit-templates.
+	* src/Makefile.in: Regenerated.
+	* src/locale-inst.cc: Explicitly instantiate more functions.
+	* src/misc-inst.cc: Likewise.
+	* src/string-inst.cc: Likewise.
+
+2001-02-05  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_EXPORT_INSTALL_INFO): New
+	macro. Consolidate all the bits to do with where includes might be
+	installed.
+	* aclocal.m4: Regenerate.
+	* configure.in: Use it.
+	* configure: Regenerate.
+	* src/Makefile.am (targetincludep): Use simplified rules.
+	(targetincludep): Rename gxx_target_include_dir.
+	(myincludep): Rename gxx_include_dir.
+	* src/Makefile.in: Regenerate.
+	* libsupc++/Makefile.am: Use simplified rules.
+	* libsupc++/Makefile.in: Regenerate.
+
+2001-02-05  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cerrno.h: Correct date format for copyright.
+	* include/c_std/bits/std_cctype.h: Same.
+	* include/c_std/bits/std_cassert.h: Same.
+	* include/c_std/bits/std_cstdarg.h: Same.
+	* include/c_std/bits/std_cstddef.h: Same.
+
+	* include/c_std/bits/std_cstdio.h: Undefine all names brought into
+	namespace std.
+	* include/c_std/bits/std_ctime.h: Same.
+	* include/c_std/bits/std_clocale.h: Same.
+	* include/c_std/bits/std_cmath.h: Same.
+	* include/c_std/bits/std_csetjmp.h: Same.
+	* include/c_std/bits/std_csignal.h: Same.
+	* include/c_std/bits/std_cstring.h: Same.
+	* include/c_std/bits/std_cstdlib.h: Same.
+	* include/c_std/bits/std_cwchar.h: Same.
+
+2001-02-05  Phil Edwards  
+
+	* testsuite/27_io/ios_base_members_static.cc:  Swap order of tests.
+
+2001-02-05  Mark Mitchell  
+
+	* src/string-inst.cc (string::_M_replace): Explicitly instantiate.
+	(string::_S_construct): Likewise.
+
+2001-02-05  Gabriel Dos Reis  
+
+	* testsuite/config/default.exp: New file.
+	* testsuite/config: New directory.
+
+2001-02-04  Mark Mitchell  
+
+	* libsupc++/typeinfo (__GXX_MERGED_TYPEINFO_NAMES): New macro.
+	* libsupc++/tinfo.cc (std::typeinfo::operator==): Use strcmp
+	whenever !__GXX_MERGED_TYPEINFO_NAMES.
+	* libsupc++/tinfo2.cc (std::typeinfo::before): Likewise.
+
+2001-02-03  Alexandre Oliva  
+	    Gerald Pfeifer  
+
+	* Makefile.am (mkinstalldirs): Set.
+	* src/Makefile.am (mkinstalldirs): Set.
+	* libmath/Makefile.am (mkinstalldirs): Set.
+	* libsup++/Makefile.am (mkinstalldirs): Set.
+	* libio/Makefile.am (mkinstalldirs): Set.
+	* */Makefile.in: Regenerate.
+
+2001-02-03  Benjamin Kosnik  
+
+	* include/bits/stl_threads.h (struct _STL_mutex_lock): Same.
+	* include/bits/localefwd.h: More initialization cleanups.
+
+2001-02-03  Jeffrey A Law  
+
+	* include/bits/ios_base.h (_S_ios_fmtflags_end): Initialize
+	correctly targets with 16bit ints.
+	(_S_ios_openmode_end): Similarly.
+	(_S_ios_iostate_end): Similarly.
+	(_S_ios_Seekdir_end): Similarly.
+
+2001-02-02  Phil Edwards  
+
+	* mkcheck.in:  Also limit virtual memory size, for mmap-based mallocs.
+
+2001-02-01  Alexandre Oliva  
+
+	* configure.in (toplevel_srcdir, auxdir): Set.
+	* acinclude.m4 (glibcpp_basedir): Set based on auxdir.
+	* aclocal.m4, configure, Makefile.in: Rebuilt.
+	* libio/Makefile.in, math/Makefile.in, src/Makefile.in: Likewise.
+	* libsupc++-v3/Makefile.am (INCLUDES): Use toplevel_srcdir.
+	* libsupc++-v3/Makefile.in: Rebuilt.
+	* libsupc++-v3/configure.in, libsupc++-v3/configure: Removed.
+	* libsupc++-v3/aclocal.m4, libsupc++-v3/config.h.in: Likewise.
+
+2001-01-30   Benjamin Kosnik  
+
+	* config/c_locale_generic.cc: Remove langinfo include.
+
+2001-01-29  Benjamin Kosnik  
+
+	Preliminary named locales.
+	* acinclude.m4 (GLIBCPP_ENABLE_CLOCALE): New macro.
+	* aclocal.m4: Regenerate.
+	* configure.in: Use it.
+	* configure: Regerate.
+	* src/Makefile.am (sources): Add c++locale.cc.
+	(build_headers): Add c++locale.h.
+	* src/Makefile.in: Regenerate.
+	* config/c_locale_gnu.h: New file.
+	* config/c_locale_gnu.cc: New file. Non-inline member functions
+	for named locales, gnu-specific.
+	* config/c_locale_generic.h: New file.
+	* config/c_locale_generic.cc: New file. Non-inline member
+	functions for named locales, generic version.
+	* docs/html/configopts.html: Add documentation on new options.
+
+	* include/bits/locale_facets.h (class _Messages): Remove.
+	(class _Moneypunct): Remove.
+	* src/locale-inst.cc: Remove.
+
+	* include/bits/locale_facets.h (class _Collate): Remove.
+	* src/locale-inst.cc (std): Remove.
+	* src/locale.cc: And here.
+
+	* include/bits/localefwd.h (locale::_M_coalesce): New
+	function. Correctly put together multi-name locales.
+	(_Impl(const _Impl&, category, size_t)): Remove.
+
+	* include/bits/localefwd.h (locale::_Impl): Remove _M_construct_*
+	member functions.
+	(_M_normalize_category_names): Remove.
+	(_M_replace_categories): Fix.
+
+	* src/localename.cc (locale::_Impl::_M_construct_collate): Remove.
+	(locale::_Impl::_M_construct_ctype): Remove.
+	(locale::_Impl::_M_construct_monetary): Remove.
+	(locale::_Impl::_M_construct_numeric): Remove.
+	(locale::_Impl::_M_construct_time): Remove.
+	(locale::_Impl::_M_construct_messages): Remove.
+
+	* include/bits/locale_facets.h (_Bad_use_facet): Remove.
+	(_Use_facet_failure_handle): Remove.
+	* src/locale.cc: Remove definitions.
+	* src/locale-inst.cc: And here.
+
+	* testsuite/22_locale/ctor_copy_dtor.cc (test01): Fixup. Add tests.
+
+	* src/localename.cc (locale::facet::_S_create_c_locale): Properly
+	create and error-check underlying locale object.
+	(locale::facet::_S_destroy_c_locale): Add, take care of properly
+	tearing down underlying locale object.
+	* include/bits/localefwd.h (locale::facet): Declare.
+	* testsuite/22_locale/members.cc: Don't test "fr_FR" locale for
+	correctness, as glibc apparently has incorrect info in it. Test
+	with it when it works again.....
+
+	* include/bits/localefwd.h (locale::_Impl::__vec_string):
+	Remove. Number of categories is fixed at six, so just simplify and
+	make this an array of strings.
+	(locale::_Impl::_M_has_name): Remove.
+	(locale::_Impl::_M_name): Remove.
+	(locale::_Impl::_M_category_names): Turns into...
+	(locale::_Impl::_M_names): ...this.
+	(locale::_Impl::_M_has_same_name()): New function.
+	* src/localename.cc (locale::_Impl::~_Impl()): Remove here.
+	(locale::_Impl::_Impl(size_t __refs, string __str)): Simplify
+	signature.
+	* src/locale.cc (locale::name()): Construct mangled name
+	accurately reflecting combined locale categories.
+
+	* src/locale.cc (locale::classic()): Don't initialize here.
+	* src/localename.cc (locale::_Impl::_Impl(size_t __num, size_t
+	__refs, bool __has_name, string __str): Do it here.
+
+	* include/bits/localefwd.h: _S_categories_num to
+	_S_num_categories. _S_facets_num to _S_num_facets.
+	(locale::id::id()): Explicitly set _M_index to zero.
+	* src/locale.cc: Same.
+
+	* src/locale.cc: (locale::locale(const char*)): Construct named
+	locales uniquely.
+
+	* src/locale.cc: Remove numpunct_byname ctors.
+	* testsuite/22_locale/numpunct_byname.cc: New file.
+	* testsuite/22_locale/numpunct.cc: New file.
+
+	* include/bits/localefwd.h (class locale): Change data members to
+	protected, from private.
+	(_Impl::_M_get_c_locale): Add member function.
+	(locale::facet::_M_get_global_impl()): Add member function.
+	* include/bits/locale_facets.h (numpunct::_M_init): Change to take
+	a __c_locale pointer.
+	(numpunct::numpunct( __c_locale*, size_t)): Add additonal ctor for
+	named locales.
+	* testsuite/22_locale/members.cc: New file, test name and combine.
+
+	* include/bits/locale_facets.h (class numpunct): Remove class
+	_Punct and _Numpunct. Rewrite class numpunct to be correct for
+	named locales.
+	* include/bits/localefwd.h (locale::_Imp::_M_c_locale): Add.
+	* src/localename.cc (_Impl::~_Impl()): Call __frelocale.
+	(_Imp::_Impl(size_t, size_t, bool, string)) Initialize _M_c_locale.
+	* src/locale-inst.cc: Remove _Numpunct, _Punct instantiations.
+	* testsuite/22_locale/numpunct_char_members.cc: New file.
+
+2001-01-28  Gabriel Dos Reis  
+
+	* testsuite/README: Add more comment.
+	* testsuite/lib/libstdc++.exp: Tweak comment.
+
+2001-01-26  Benjamin Kosnik  
+
+	* libsupc++/pure.cc (writestr): Just use cstdio and std::fputs.
+
+2001-01-25  Loren J. Rittle  
+
+	* testsuite/21_strings/inserters_extractors.cc: Remove
+	explicit reference to 'testsuite/'.
+
+2001-01-25  Richard Henderson  
+
+	* config/cpu/alpha/bits/atomicity.h: Remove tricky .subsetion
+	bits. Fixes Tru64 build issues.
+
+2001-01-25  Michael Sokolov  
+
+	* acinclude.m4 (GLIBCPP_CHECK_GNU_MAKE): Bourne shell portability bug
+	(use ${MAKE-make}, not ${MAKE:-make}).
+	* aclocal.m4, configure: Regenerate.
+
+2001-01-25  Mark Mitchell  
+
+	* src/ios.cc: Remove accidental inclusion of  in last
+	checkin.
+
+	* src/Makefile.am (sources): Add globals.cc.
+	* src/Makefile.in: Regenerated.
+	* src/globals.cc: New file.
+	* src/ios.cc (cin): Don't define here, just declare extern.
+	(cout): Likewise.
+	(cerr): Likewise.
+	(clog): Likewise.
+	(wcin): Likewise.
+	(wcout): Likewise.
+	(wcerr): Likewise.
+	(wclog): Likewise.
+
+2001-01-25  Phil Edwards  
+
+	* include/bits/std_iterator.h:  Do not include stl_relops.h.
+	* include/bits/std_numeric.h:  Ditto.
+	* include/bits/stl_algobase.h:  Ditto.
+	* include/bits/stl_relops.h:  Add comment warning about problems.
+
+2001-01-25  Gabriel Dos Reis  
+
+	* testsuite/27_io/*.cc: Remove explicit reference to 'testsuite/'
+	in testcases.  Prepare for the DejaGnu based framework.
+	* mkcheck.in: Adjust call to tests_flags.  Don't mmkdir testsuite
+	directory -- it is now mkcheck working directory.
+	* tests_flags.in: Remove reference to $(top_srcdir).  Use
+	${SRC_DIR} instead.
+	* Makefile.am (check, check-install): Change mkcheck invocation
+	logic.
+	* Makefile.in: Regenerate.
+
+2001-01-24  Mark Mitchell  
+
+	* config/os/aix/bits/atomicity.h (__compare_and_swap): Remove.
+	(__always_swap): Likewise.
+
+2001-01-23  Chris Demetriou  
+
+	* libsupc++/exception_support.cc (__terminate_func): Remove
+	declaration.
+	(__terminate_func_ptr): New typedef.
+	(__terminate, __terminate_set_func): New extern function
+	prototypes.
+	(std::terminate): Use __terminate function.
+	(std::set_terminate): Use __terminate_set_func function.
+
+2001-01-23  Benjamin Kosnik  
+
+	* configure.target: Just use os_include_dir always.
+	* configure.in: Remove calls to GLIBCPP_CHECK_CTYPE_SUPPORT.
+	Link atomicity files and ctype files here.
+	* configure: Regenerate.
+	* acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): Remove.
+	(GLIBCPP_ENABLE_ATOMICITY): Remove.
+	* aclocal.m4: Regenerate.
+
+2001-01-23  Chris Demetriou  
+
+	* configure.in: Place definition of MULTISUBDIR in
+	libsupc++/Makefile as is done for src/Makefile.
+	* configure: Regenerate.
+
+2001-01-23  Phil Edwards  
+
+	* acinclude.m4:  Cosmetic changes only.
+	* aclocal.m4:  Regenerated.
+	* configure:  Regenerated.
+	* configure.target:  Update documented list of changed variables.
+	* docs/html/install.html:  Fix typo.
+	* docs/html/20_util/howto.html:  More notes on auto_ptr.
+	* docs/html/27_io/howto.html:  More notes on streabufs.
+	* docs/html/faq/index.html:  Add rel_ops problem and mention the
+	  DEC as(1) .subsection difficulty.
+	* docs/html/faq/index.txt:  Regenerated.
+
+2001-01-23  Mark Mitchell  
+
+	* ainclude.m4 (GLIBCPP_CHEC_MATH_DECLS_AND_LINKAGE_1): New macro.
+	(GLIBCPP_CHECK_MATH_SUPPORT): Use it.
+	(GLIBCPP_CHECK_TYPE_SUPPORT): Don't autoconf ctype information if
+	its already provided in config.target.
+	* aclocal.m4: Regenerated.
+	* configure: Likewise.
+	* configure.target: Set ctype_include_dir for lots of systems.
+	* libsupc++/Makefile.am: Explicitly include --tag disable-shared.
+	* libsupc++/Makefile.in: Regenerated.
+
+2001-01-23  Gabriel Dos Reis  
+
+	* testsuite/lib/libstdc++.exp: Improve.  Add support for @xxx#
+	keyword capability.
+
+	* testsuite/README: Add comment.
+
+2001-01-21  Phil Edwards  
+
+	* docs/html/configopts.html:  Update for current status.  Fix HTML.
+	* docs/html/install.html:  Update for current status.
+
+2001-01-20  Gabriel Dos Reis  
+
+	* testsuite/libstdc++.tests/tests.exp: New file.
+	* testsuite/lib/libstdc++.exp: Itou.
+	* testsuite/README: Itou.
+
+2001-01-20  Gabriel Dos Reis  
+
+	* tests_flags.in: Just output the bare minimum to run tests.
+	Let's the caller do its own arrangement.
+
+	* mkcheck.in: Rename INC_PATH to INCLUDES.  Adjust flags
+	computations.
+
+2001-01-19  Gabriel Dos Reis  
+
+	* testsuite/17_intro: Prepare testcases for new style DejaGnu
+	framework.
+
+2001-01-18  Gabriel Dos Reis  
+
+	* testsuite/libstdc++.tests, testsuite/lib: New directories.
+
+2001-01-17  Loren J. Rittle  
+
+	* mkcheck.in: Construct file names that match $objdir structure.
+	* testsuite/27_io/filebuf_members-1.txt: New file.
+	* testsuite/27_io/ifstream_members-1.txt: New file.
+	* testsuite/27_io/ostream_inserter_char-1.txt: New file.
+
+	* testsuite/27_io/ios_base_members_static.cc (test02): Add test.
+	* testsuite/27_io/ios_base_members_static-1.tst: Add expected output.
+
+2001-01-17  Peter Schmid  
+
+	* testsuite/27_io/istream_sentry.cc (test02): Fix.
+
+2001-01-17  Benjamin Kosnik  
+
+	libstdc++/1605
+	* include/bits/ios_base.h (ios_base::failure): Tighten up throw specs.
+	* src/ios.cc (ios_base::failure): Make definitions match.
+	* libsupc++/typeinfo (class bad_typeid): Add throw specs.
+	(class bad_cast): Same.
+	* libsupc++/exception (class exception): Add throw specs.
+	* libsupc++/exception_support.cc (set_terminate): Add throw specs.
+	(set_unexpected): Same.
+	(uncaught_exception): Same.
+	(what): Same.
+
+	* docs/html/17_intro/C++STYLE (classname): Fix.
+
+2001-01-16  Mark Mitchell  
+
+	* src/gen-num-limits.cc (INSTANTIATIONS): New macro.
+	Use it do explicitly instantiate predicate and value for
+	all the builtin Ts.
+
+2001-01-16  Nathan Sidwell  
+
+	* libsupc++/exception_support.cc (__cp_pop_exception): Fix
+	uninitialized thinko in last change.
+
+2001-01-16  Mark Mitchell  
+
+	* libsupc++/exception_support.cc (__cp_pop_exception): Change
+	prototype.
+
+2001-01-16  Benjamin Kosnik  
+
+	* docs/html/17_intro/C++STYLE (classname): Add more existing
+	and stylish patterns.
+
+	libstdc++/944
+	* include/bits/istream.tcc (istream::sentry::sentry()): Set
+	failbit if the state of the stream is not good.
+	* testsuite/27_io/istream_sentry.cc (test02): Add test.
+	* testsuite/27_io/istream_manip.cc (test01): Modify.
+
+	libstdc++/1019
+	reported by Paolo Carlini 
+	* include/bits/istream.tcc (operator>>(istream&, string&)): Fix.
+	* testsuite/21_strings/inserters_extractors.cc (test08): Add test.
+
+	libstdc++/1057
+	* include/bits/std_streambuf.h (setp): Set _M_buf_size correctly.
+	* include/bits/streambuf.tcc (xsputn): Remove outside if clause.
+	(xsgetn): Same. Simplify.
+	* testsuite/27_io/streambuf.cc (test04): Add testcases.
+
+	reported by Larry Evans 
+	* include/bits/streambuf.tcc (streambuf::xsputn): Just check for
+	equality with eof on returned value from overflow.
+
+2001-01-14  Andreas Jaeger  
+
+	* libio/libio.h: Add test for glibc 2.0.
+
+2001-01-12  Benjamin Kosnik  
+
+	* config/os/djgpp/bits/*: Fix dates.
+
+	* include/bits/basic_string.h (_S_find(const _CharT* __beg, const
+	_CharT* __end, _CharT __c): Remove.
+	* include/bits/basic_string.tcc: Substitute traits::find for _S_find.
+	* include/bits/char_traits.h: Tweak.
+
+2001-01-12  Laurynas Biveinis  
+
+	* acinclude.m4 (GLIBCPP_CHECK_CTYPE_SUPPORT): check for DJGPP 
+	(LIB_AC_PROG_CXX): replace [/\\] with [\\/] to work around older
+	bash bug.
+	* aclocal.m4: regenerated.
+	* configure.target: set os_include_dir to config/os/djgpp under DJGPP.
+	* configure: regenerated.
+	* config/os/djgpp, config/os/djgpp/bits: new directories.
+	* config/os/djgpp/bits/ctype_base.h,
+	config/os/djgpp/bits/ctype_inline.h,
+	config/os/djgpp/bits/ctype_noninline.h,
+	config/os/djgpp/bits/os_defines.h: new files.
+
+2001-01-11   Joseph S. Myers  
+
+	* include/c_std/bits/std_cstdio.h: Undef printf.
+
+2001-01-10  Benjamin Kosnik  
+
+	* src/ios.cc: Fix typo: change cout->wcout.
+
+	* src/Makefile.am (targetincludep): Fix for version-specific-libs.
+	* src/Makefile.in: Regenerate.
+
+2001-01-10  Peter Schmid  
+
+	 * include/bits/std_complex.h: Fix a typo.
+
+2001-01-09  Benjamin Kosnik  
+			     
+
+	Fixes for libstdc++/1576
+	* src/stdstreams.cc: Initialize with NULL filebuf. Delete
+	file, move contents into....
+	* src/ios.cc: ...Here. Put defines for iostreams objects and
+	initialization routines into one file to simplify DSO interaction.
+	* include/bits/std_iostream.h: Touch.
+	* include/bits/ios_base.h (_S_synched_with_stdio): Make static.
+	* src/Makefile.am (sources): Remove stdstreams.cc.
+	* src/Makefile.in: Regenerate.
+
+2001-01-10  Gabriel Dos Reis  
+
+	* tests_flags.in (check_directory): Fix typo.
+
+2001-01-09  Peter Schmid  
+
+	 * include/bits/std_complex.h: Fix a typo.
+
+2001-01-09  Loren J. Rittle  
+
+	* config/os/bsd/freebsd/bits/ctype_inline.h (is): (Make right
+	code path:) Remove magic constants and restructure to handle
+	ctype.h bit mask layout changes more gracefully.  (Make fast
+	code path:) Use __maskrune (), if available.
+	(is): Remove special case for digit and xdigit masks.
+
+2001-01-09  Robert Lipe 
+
+	* include/c_std/bits/std_ctime.h: Undefine difftime.
+
+2001-01-09  Alexandre Oliva  
+
+	* src/gen-num-limits.cc (signal_adapter): New template function.
+	(signal_handler): Use it, instead of signal.
+	(traps): Likewise.  Install SIGTRAP handler too.  Don't
+	require both tests to trap to set trap_flag.
+
+2001-01-08  Benjamin Kosnik  
+
+	* include/bits/fpos.h (fpos:::fpos(streamoff __pos)): Explicitly
+	initialize mbstate_t member, name offset data members *off, not pos.
+	* include/bits/fstream.tcc (filebuf::filebuf): Same.
+
+2001-01-08  Benjamin Kosnik  
+
+	reported by Chris G. Demetriou 
+	* configure.in: Change -linux-* to -linux*.
+	* configure: Regenerate.
+
+2001-01-05  Benjamin Kosnik  
+
+	Fix 27_io/filebuf_members.cc
+	* src/localename.cc (locale::_Impl::_Impl(const _Impl& __imp,
+	const string& __name, category __cat, size_t __refs): Set
+	_M_has_name with _M_name.
+	* include/bits/localefwd.h (locale::operator!=): Protect member
+	function call with this->.
+	* src/locale.cc (locale::operator==): Make fast checks first.
+	* include/bits/basic_ios.tcc (basic_ios::init): Simplify.
+
+	* include/bits/ios_base.h (_M_synced_with_stdio): Add data member
+	to ios_base::Init.
+	* src/ios.cc (ios_base::Init::Init): Initialize here.
+	(ios_base::sync_with_stdio): Set here.
+
+2001-01-04  Loren J. Rittle  
+
+	* config/c_io_stdio.cc (__basic_file<_CharT>::sys_open()): On
+	systems that support it, call dup() before fdopen().
+
+2001-01-03  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cwctype.h: Include std_cwchar.h for wint_t.
+	* testsuite/17_intro/header_cwctype.cc (main): New file.
+
+	* src/Makefile.am (base_headers): Change.
+	* include/bits/std_string.h: And here.
+	* include/bits/string.tcc: Tweaks, move to...
+	* include/bits/basic_string.tcc: ...Here.
+	* src/string-inst.cc: Simplify, just instantiate the whole class,
+	not member-by-member.
+
+2001-01-02  Benjamin Kosnik  
+
+	* acinclude.m4 (GLIBCPP_ENABLD_CSTDIO): Add in default value.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+
+	* include/bits/c++config (__GLIBCPP__): Bump version number.
+
+	* ChangeLog: Start new log for year 2001
+	* ChangeLog-2000: New file.
+
+	* docs/html/configopts.html: Make sure default values are current,
+	add commentary.
+
+2001-01-01  Benjamin Kosnik  
+
+	* include/c_std/bits/std_cwchar.h: Same.
+	* testsuite/17_intro/header_cwchar.cc: Same.
+	* include/c_std/bits/std_ctime.h: Same.
+	* testsuite/17_intro/header_ctime.cc: Same.
+	* include/c_std/bits/std_cstdlib.h: Same.
+	Clean up undefs, make consistent with cwchar and cmath, etc.
+	* testsuite/17_intro/header_cstdlib.cc: Same.
+	* include/c_std/bits/std_cstdio.h: Same here.
+	* testsuite/17_intro/header_cstring.cc: Same.
+	* include/c_std/bits/std_cstring.h: Include std_cstddef.h for size_t.
+	* testsuite/17_intro/header_cstring.cc: New file. Check for
+	size_t in namespace std.
+
+	* include/c_std/bits/std_cwchar.h: Explicit checks for mbstate_t.
+	* acconfig.h (HAVE_MBSTATE_T): Add.
+	* config.h.in: Regenerate.
+	* acinclude.m4(GLIBCPP_CHECK_WCHAR_T_SUPPORT): Always test for
+	mbstate_t.
+	* aclocal.m4: Regenerate.
+	* configure: Regenerate.
+	* testsuite/17_intro/headers_c++.cc: New file.
+	* testsuite/17_intro/headers_c.cc: Small changes.
+
+2001-01-01  David Billinghurst 
+
+	* tests_flags.in: Fix typo in usage.
+
+	* tests_flags.in: Set target specific LIBS for cygwin.
diff --git a/contrib/libstdc++/Makefile.am b/contrib/libstdc++/Makefile.am
new file mode 100644
index 0000000..a4b11a7
--- /dev/null
+++ b/contrib/libstdc++/Makefile.am
@@ -0,0 +1,147 @@
+## Makefile for the toplevel directory of the GNU C++ Standard library.
+##
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+## Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## 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.
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+MAINT_CHARSET = latin1
+
+SUBDIRS = include libio libmath libsupc++ src po testsuite 
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# These two special 'check-script' rules use the bash script 'mkcheck'
+# to do testing. This script is not as portable as the dejagnu test
+# harness, and is thus off by default. It does produce interesting
+# output however, including various performance analysis items like
+# compile time, execution time, and binary size.
+check-script: $(top_builddir)/mkcheck
+	-(chmod + $(top_builddir)/mkcheck; \
+	  cd testsuite; \
+	  @glibcpp_builddir@/mkcheck 0)
+
+check-script-install: $(top_builddir)/mkcheck
+	-(chmod + $(top_builddir)/mkcheck; \
+	  cd testsuite; \
+	  @glibcpp_builddir@/mkcheck 1)
+
+# These rules are messy, but are hella worth it.
+doxygen:
+	-(srcdir=`cd ${top_srcdir}; pwd`; \
+	  builddir=`pwd`; \
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=user $${srcdir} $${builddir})
+
+doxygen-maint:
+	-(srcdir=`cd ${top_srcdir}; pwd`; \
+	  builddir=`pwd`; \
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=maint $${srcdir} $${builddir})
+
+doxygen-man:
+	-(srcdir=`cd ${top_srcdir}; pwd`; \
+	  builddir=`pwd`; \
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=man $${srcdir} $${builddir})
+
+.PHONY: doxygen doxygen-maint doxygen-man
+
+# Multilib support.
+MAKEOVERRIDES=
+
+# Multilib variables.
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+
+# Multilib Makefile bits.
+.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
+	maintainer-clean-multi
+
+all-am: all-multi
+install-am: install-multi
+mostlyclean-am: mostlyclean-multi
+clean-am: clean-multi
+distclean-am: distclean-multi
+maintainer-clean-am: maintainer-clean-multi
+
+all-multi:
+	$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
+install-multi:
+	$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
+mostlyclean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
+clean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
+distclean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
+maintainer-clean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
+
+# All the machinations with string instantiations messes up the
+# automake-generated TAGS rule. Make a simple one here.
+TAGS: tags-recursive $(LISP)
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+	"AR_FLAGS=$(AR_FLAGS)" \
+	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
+	"CFLAGS=$(CFLAGS)" \
+	"CXXFLAGS=$(CXXFLAGS)" \
+	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+	"INSTALL=$(INSTALL)" \
+	"INSTALL_DATA=$(INSTALL_DATA)" \
+	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+	"MAKE=$(MAKE)" \
+	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+	"SHELL=$(SHELL)" \
+	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+	"exec_prefix=$(exec_prefix)" \
+	"infodir=$(infodir)" \
+	"libdir=$(libdir)" \
+	"includedir=$(includedir)" \
+	"prefix=$(prefix)" \
+	"tooldir=$(tooldir)" \
+	"AR=$(AR)" \
+	"AS=$(AS)" \
+	"LD=$(LD)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"RANLIB=$(RANLIB)" \
+	"NM=$(NM)" \
+	"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
+	"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
+	"DESTDIR=$(DESTDIR)" \
+	"WERROR=$(WERROR)" 
diff --git a/contrib/libstdc++/Makefile.in b/contrib/libstdc++/Makefile.in
index f13eddc..f832cb3 100644
--- a/contrib/libstdc++/Makefile.in
+++ b/contrib/libstdc++/Makefile.in
@@ -1,385 +1,553 @@
-# Copyright (C) 1994, 1995 Free Software Foundation
-
-# This file is part of the GNU ANSI 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.
-
-VERSION = 2.10.0
-INTERFACE = 3
-
-gxx_include_dir=${includedir}/g++
-
-OBJS  = cstringi.o stdexcepti.o cstdlibi.o cmathi.o stlinst.o valarray.o
-SUBLIBS = $(STAMP)-string $(STAMP)-complx
-
-# C++ headers with no extension
-HEADERS= cassert cctype cerrno cfloat ciso646 climits clocale cmath complex \
-	 csetjmp csignal cstdarg cstddef cstdio cstdlib cstring ctime \
-	 cwchar cwctype string stdexcept \
-	 algorithm deque functional hash_map hash_set iterator list map \
-	 memory numeric pthread_alloc queue rope set slist stack utility \
-	 vector fstream iomanip iostream strstream iosfwd bitset valarray \
-	 sstream
-
-ARLIB   = libstdc++.a.$(VERSION)
-ARLINK  = libstdc++.a
-MARLINK = libstdc++.a.`echo $(VERSION) | sed 's/\([0-9]*[.][0-9]*\).*/\1/'`
-SHLIB   = libstdc++.so.$(VERSION)
-SHARLIB = libstdc++-sh.a
-SHLINK  = libstdc++.so
-MSHLINK = libstdc++.so.`echo $(VERSION) | sed 's/\([0-9]*[.][0-9]*\).*/\1/'`
-SHFLAGS =
-SHDEPS  =
-
-STAMP   = bigstmp
-
-LIBS    = $(ARLIB) $(ARLINK)
-
-#### package, host, target, and site dependent Makefile fragments come in here.
-##
-
-IO_DIR    = ../libio
-LIBIBERTY_DIR = ../libiberty
-
-LIBIBERTY_OBJS = `cat $(LIBIBERTY_DIR)/needed-list` strerror.o
-
-tooldir = $(exec_prefix)/$(target)
-# This is where the libraries will be installed; note, it will be set
-# at make runtime now. See below at target install.
-INSTALLDIR = $(libdir)
-
-MOSTLYCLEAN_JUNK = *stmp-* tlib*.a *.s *.ii stdlist piclist
-CLEAN_JUNK = $(LIBS)
-
-.PHONY: libs
-libs: $(LIBS)
-
-stdlist: $(IO_DIR)/iostream.list $(OBJS) $(SUBLIBS) $(LIBIBERTY_DIR)/libiberty.a
-	-rm -f tlist
-	touch tlist
-	echo *.o >> tlist
-	for f in `cat $(IO_DIR)/iostream.list` ; do \
-	  echo "$(IO_DIR)/$$f" >> tlist ; \
-	done
-	for f in $(LIBIBERTY_OBJS) ; do \
-	  echo "$(LIBIBERTY_DIR)/$$f" >> tlist ; \
-	done
-	mv tlist stdlist
-
-piclist: stdlist
-	-rm -f tlist
-	cp stdlist tlist
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  sed 's,\([A-Za-z_]*\.o\),pic/\1,g' tlist > tlist2 ; \
-	  mv tlist2 tlist ; \
-	else true ; fi
-	mv tlist piclist
-
-$(ARLIB): stdlist
-	-rm -f t$(ARLIB)
-	$(AR) $(AR_FLAGS) t$(ARLIB) `cat stdlist`
-	mv t$(ARLIB) $(ARLIB)
-	$(RANLIB) $(ARLIB)
-
-$(ARLINK):
-	-rm -f $(ARLINK)
-	$(LN_S) $(ARLIB) $(ARLINK) || cp $(ARLIB) $(ARLINK)
-
-marlink:
-	@$(MAKE) $(MARLINK) "ARLINK=$(MARLINK)"
-
-$(SHLIB): piclist
-	$(CC) $(LIBCXXFLAGS) $(SHFLAGS) -shared -o $(SHLIB) `cat piclist` $(SHDEPS)
-
-$(SHARLIB): $(SHLIB)
-	-rm -f t$(SHARLIB)
-	$(AR) $(AR_FLAGS) t$(SHARLIB) $(SHLIB)
-	mv t$(SHARLIB) $(SHARLIB)
-	$(RANLIB) $(SHARLIB)
-
-$(SHLINK):
-	-rm -f $(SHLINK)
-	$(LN_S) $(SHLIB) $(SHLINK) || cp $(ARLIB) $(ARLINK)
-
-mshlink:
-	@$(MAKE) $(MSHLINK) "SHLINK=$(MSHLINK)"
-
-$(IO_DIR)/iostream.list: force
-	cd $(IO_DIR) ; $(MAKE) $(FLAGS_TO_PASS) iostream.list
-
-$(LIBIBERTY_DIR)/libiberty.a:
-	cd $(LIBIBERTY_DIR) ; $(MAKE) $(FLAGS_TO_PASS)
-
-STRFUNCS = REP MAIN TRAITS ADDSS ADDPS ADDCS ADDSP ADDSC \
-	   EQSS EQPS EQSP NESS NEPS NESP LTSS LTPS LTSP GTSS GTPS GTSP \
-	   LESS LEPS LESP GESS GEPS GESP
-STRIO	 = EXTRACT INSERT GETLINE
-
-# These are here for SunOS VPATH.
-cstringi.o: cstringi.cc
-cstdlibi.o: cstdlibi.cc
-cmathi.o: cmathi.cc
-stdexcepti.o: stdexcepti.cc
-stlinst.o: stlinst.cc
-valarray.o: valarray.cc
-
-# Later do wide strings, too.
-stmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
-	     ${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
-	for name in $(STRFUNCS) $(STRIO); do \
-	  echo c$${name}; \
-	  if [ x"$(enable_shared)" = xyes ]; then \
-	    $(COMPILE.cc) $(PICFLAG) -DC -D$${name} ${srcdir}/sinst.cc \
-	      -o pic/c$${name}.o; \
-	  else true ; fi; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	  $(COMPILE.cc) -DC -D$${name} ${srcdir}/sinst.cc -o c$${name}.o; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	done
-	touch stmp-string
-
-bigstmp-string: ${srcdir}/sinst.cc ${srcdir}/std/bastring.h \
-	        ${srcdir}/std/bastring.cc ${srcdir}/std/straits.h
-	echo cstring
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DC \
-	    `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
-	    $(srcdir)/sinst.cc -o pic/cstrmain.o; \
-	else true ; fi
-	$(COMPILE.cc) -DC `for N in $(STRFUNCS); do echo " -D$${N}"; done` \
-	  $(srcdir)/sinst.cc -o cstrmain.o
-	echo cstrio
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DC \
-	    `for N in $(STRIO); do echo " -D$${N}"; done` \
-	    $(srcdir)/sinst.cc -o pic/cstrio.o; \
-	else true ; fi
-	$(COMPILE.cc) -DC `for N in $(STRIO); do echo " -D$${N}"; done` \
-	  $(srcdir)/sinst.cc -o cstrio.o
-	touch bigstmp-string
-
-COMFUNCS = MAIN ADDCC ADDCF ADDFC SUBCC SUBCF SUBFC MULCC MULCF MULFC DIVCC \
-	   DIVCF DIVFC PLUS MINUS EQCC EQCF EQFC NECC NECF NEFC ABS ARG POLAR \
-	   CONJ NORM COS COSH EXP LOG POWCC POWCF POWCI POWFC SIN SINH SQRT
-COMIO    = EXTRACT INSERT
-
-stmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
-	      ${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
-	      ${srcdir}/std/ldcomplex.h
-	for N in $(COMFUNCS) $(COMIO); do \
-	  echo f$${N}; \
-	  if [ x"$(enable_shared)" = xyes ]; then \
-	    $(COMPILE.cc) $(PICFLAG) -DF -D$${N} $(srcdir)/cinst.cc \
-	      -o pic/f$${N}.o; \
-	  else true ; fi; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	  $(COMPILE.cc) -DF -D$${N} ${srcdir}/cinst.cc -o f$${N}.o; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	  echo d$${N}; \
-	  if [ x"$(enable_shared)" = xyes ]; then \
-	    $(COMPILE.cc) $(PICFLAG) -DD -D$${N} $(srcdir)/cinst.cc \
-	      -o pic/d$${N}.o; \
-	  else true ; fi; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	  $(COMPILE.cc) -DD -D$${N} ${srcdir}/cinst.cc -o d$${N}.o; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	  echo ld$${N}; \
-	  if [ x"$(enable_shared)" = xyes ]; then \
-	    $(COMPILE.cc) $(PICFLAG) -DLD -D$${N} $(srcdir)/cinst.cc \
-	      -o pic/ld$${N}.o; \
-	  else true ; fi; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	  $(COMPILE.cc) -DLD -D$${N} ${srcdir}/cinst.cc -o ld$${N}.o; \
-	  if [ $$? -eq 0 ]; then true; else exit 1; fi; \
-	done
-	touch stmp-complx
-
-bigstmp-complx: ${srcdir}/cinst.cc ${srcdir}/std/complext.h \
-	         ${srcdir}/std/complext.cc ${srcdir}/std/dcomplex.h \
-	         ${srcdir}/std/ldcomplex.h
-	echo fcomplex
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DF \
-	    `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
-	    $(srcdir)/cinst.cc -o pic/fcomplex.o; \
-	else true ; fi
-	$(COMPILE.cc) -DF `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
-	  $(srcdir)/cinst.cc -o fcomplex.o
-	echo fcomio
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DF \
-	    `for N in $(COMIO); do echo " -D$${N}"; done` \
-	    $(srcdir)/cinst.cc -o pic/fcomio.o; \
-	else true ; fi
-	$(COMPILE.cc) -DF `for N in $(COMIO); do echo " -D$${N}"; done` \
-	  $(srcdir)/cinst.cc -o fcomio.o
-	echo dcomplex
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DD \
-	    `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
-	    $(srcdir)/cinst.cc -o pic/dcomplex.o; \
-	else true ; fi
-	$(COMPILE.cc) -DD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
-	  $(srcdir)/cinst.cc -o dcomplex.o
-	echo dcomio
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DD \
-	    `for N in $(COMIO); do echo " -D$${N}"; done` \
-	    $(srcdir)/cinst.cc -o pic/dcomio.o; \
-	else true ; fi
-	$(COMPILE.cc) -DD `for N in $(COMIO); do echo " -D$${N}"; done` \
-	  $(srcdir)/cinst.cc -o dcomio.o
-	echo ldcomplex
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DLD \
-	    `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
-	    $(srcdir)/cinst.cc -o pic/ldcomplex.o; \
-	else true ; fi
-	$(COMPILE.cc) -DLD `for N in $(COMFUNCS); do echo " -D$${N}"; done` \
-	  $(srcdir)/cinst.cc -o ldcomplex.o
-	echo ldcomio
-	if [ x"$(enable_shared)" = xyes ]; then \
-	  $(COMPILE.cc) $(PICFLAG) -DLD \
-	    `for N in $(COMIO); do echo " -D$${N}"; done` \
-	    $(srcdir)/cinst.cc -o pic/ldcomio.o; \
-	else true ; fi
-	$(COMPILE.cc) -DLD `for N in $(COMIO); do echo " -D$${N}"; done` \
-	  $(srcdir)/cinst.cc -o ldcomio.o
-	touch bigstmp-complx
-
-.PHONY: install
-install:
-	rootme=`pwd`/ ; export rootme ; \
-	if [ -z "$(MULTISUBDIR)" ]; then \
-	  cd $(srcdir); \
-	  for FILE in $(HEADERS); do \
-	    rm -f $(gxx_include_dir)/$$FILE ; \
-	    if [ -f stl/$$FILE ]; then \
-	      $(INSTALL_DATA) stl/$$FILE $(gxx_include_dir)/$$FILE ; \
-	    else \
-	      $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
-	    fi ; \
-	    chmod a-x $(gxx_include_dir)/$$FILE ; \
-	  done ; \
-	  for FILE in *.h std/*.h std/*.cc std/*.tcc; do \
-	    rm -f $(gxx_include_dir)/$$FILE ; \
-	    $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
-	    chmod a-x $(gxx_include_dir)/$$FILE ; \
-	  done ; \
-	  cd stl; \
-	  for FILE in *.h; do \
-	    rm -f $(gxx_include_dir)/$$FILE ; \
-	    $(INSTALL_DATA) $$FILE $(gxx_include_dir)/$$FILE ; \
-	    chmod a-x $(gxx_include_dir)/$$FILE ; \
-	  done ; \
-	else true ; \
-	fi
-	rootme=`pwd`/ ; export rootme ; \
-	if [ x$(enable_version_specific_runtime_libs) != xyes ]; then \
-	  INSTALLDIR=$(libdir); \
-	else \
-	  INSTALLDIR=$(libsubdir); \
-	fi; \
-	INSTALLLINKDIR=$(libsubdir); \
-	if [ $${INSTALLLINKDIR}$(MULTISUBDIR) = $${INSTALLDIR}$(MULTISUBDIR) ]; then \
-	  RELINSTALLDIR=; \
-	elif [ x$(MULTISUBDIR) = x ]; then \
-	  if [ $(build_alias) = $(target_alias) ]; then \
-	    RELINSTALLDIR=../../../; \
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = .
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+AS = @AS@
+ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+AWK = @AWK@
+BASIC_FILE_H = @BASIC_FILE_H@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCODECVT_C = @CCODECVT_C@
+CCODECVT_H = @CCODECVT_H@
+CLOCALE_H = @CLOCALE_H@
+CMESSAGES_H = @CMESSAGES_H@
+CPP = @CPP@
+CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
+CSHADOW_FLAGS = @CSHADOW_FLAGS@
+CSTDIO_H = @CSTDIO_H@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DATADIRNAME = @DATADIRNAME@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DLLTOOL = @DLLTOOL@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIBICONV = @LIBICONV@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+STRIP = @STRIP@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+check_msgfmt = @check_msgfmt@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+glibcpp_CXX = @glibcpp_CXX@
+glibcpp_MOFILES = @glibcpp_MOFILES@
+glibcpp_POFILES = @glibcpp_POFILES@
+glibcpp_basedir = @glibcpp_basedir@
+glibcpp_builddir = @glibcpp_builddir@
+glibcpp_localedir = @glibcpp_localedir@
+glibcpp_prefixdir = @glibcpp_prefixdir@
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_thread_h = @glibcpp_thread_h@
+glibcpp_toolexecdir = @glibcpp_toolexecdir@
+glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+ifGNUmake = @ifGNUmake@
+libio_la = @libio_la@
+libtool_VERSION = @libtool_VERSION@
+release_VERSION = @release_VERSION@
+toplevel_srcdir = @toplevel_srcdir@
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+MAINT_CHARSET = latin1
+
+SUBDIRS = include libio libmath libsupc++ src po testsuite 
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Multilib support.
+MAKEOVERRIDES = 
+
+# Multilib variables.
+MULTISRCTOP = 
+MULTIBUILDTOP = 
+MULTIDIRS = 
+MULTISUBDIR = 
+MULTIDO = true
+MULTICLEAN = true
+
+# Work around what appears to be a GNU make bug handling MAKEFLAGS
+# values defined in terms of make variables, as is the case for CC and
+# friends when we are called from the top level Makefile.
+AM_MAKEFLAGS = \
+	"AR_FLAGS=$(AR_FLAGS)" \
+	"CC_FOR_BUILD=$(CC_FOR_BUILD)" \
+	"CC_FOR_TARGET=$(CC_FOR_TARGET)" \
+	"CFLAGS=$(CFLAGS)" \
+	"CXXFLAGS=$(CXXFLAGS)" \
+	"CFLAGS_FOR_BUILD=$(CFLAGS_FOR_BUILD)" \
+	"CFLAGS_FOR_TARGET=$(CFLAGS_FOR_TARGET)" \
+	"INSTALL=$(INSTALL)" \
+	"INSTALL_DATA=$(INSTALL_DATA)" \
+	"INSTALL_PROGRAM=$(INSTALL_PROGRAM)" \
+	"INSTALL_SCRIPT=$(INSTALL_SCRIPT)" \
+	"LDFLAGS=$(LDFLAGS)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"LIBCFLAGS_FOR_TARGET=$(LIBCFLAGS_FOR_TARGET)" \
+	"MAKE=$(MAKE)" \
+	"MAKEINFO=$(MAKEINFO) $(MAKEINFOFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"PICFLAG_FOR_TARGET=$(PICFLAG_FOR_TARGET)" \
+	"SHELL=$(SHELL)" \
+	"RUNTESTFLAGS=$(RUNTESTFLAGS)" \
+	"exec_prefix=$(exec_prefix)" \
+	"infodir=$(infodir)" \
+	"libdir=$(libdir)" \
+	"includedir=$(includedir)" \
+	"prefix=$(prefix)" \
+	"tooldir=$(tooldir)" \
+	"AR=$(AR)" \
+	"AS=$(AS)" \
+	"LD=$(LD)" \
+	"LIBCFLAGS=$(LIBCFLAGS)" \
+	"PICFLAG=$(PICFLAG)" \
+	"RANLIB=$(RANLIB)" \
+	"NM=$(NM)" \
+	"NM_FOR_BUILD=$(NM_FOR_BUILD)" \
+	"NM_FOR_TARGET=$(NM_FOR_TARGET)" \
+	"DESTDIR=$(DESTDIR)" \
+	"WERROR=$(WERROR)" 
+
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES =  mkcheck testsuite_flags
+DIST_COMMON =  README ./stamp-h.in ChangeLog Makefile.am Makefile.in \
+acconfig.h acinclude.m4 aclocal.m4 config.h.in configure configure.in \
+mkcheck.in testsuite_flags.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in  acinclude.m4
+	cd $(srcdir) && $(ACLOCAL)
+
+config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
+
+config.h: stamp-h
+	@if test ! -f $@; then \
+		rm -f stamp-h; \
+		$(MAKE) stamp-h; \
+	else :; fi
+stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES= CONFIG_HEADERS=config.h \
+	     $(SHELL) ./config.status
+	@echo timestamp > stamp-h 2> /dev/null
+$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in
+	@if test ! -f $@; then \
+		rm -f $(srcdir)/stamp-h.in; \
+		$(MAKE) $(srcdir)/stamp-h.in; \
+	else :; fi
+$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
+	cd $(top_srcdir) && $(AUTOHEADER)
+	@echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null
+
+mostlyclean-hdr:
+
+clean-hdr:
+
+distclean-hdr:
+	-rm -f config.h
+
+maintainer-clean-hdr:
+mkcheck: $(top_builddir)/config.status mkcheck.in
+	cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+testsuite_flags: $(top_builddir)/config.status testsuite_flags.in
+	cd $(top_builddir) && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+# This directory's subdirectories are mostly independent; you can cd
+# into them and run `make' without going through this Makefile.
+# To change the values of `make' variables: instead of editing Makefiles,
+# (1) if the variable is set in `config.status', edit `config.status'
+#     (which will cause the Makefiles to be regenerated when you run `make');
+# (2) otherwise, pass the desired values on the `make' command line.
+
+@SET_MAKE@
+
+all-recursive install-data-recursive install-exec-recursive \
+installdirs-recursive install-recursive uninstall-recursive install-info-recursive \
+check-recursive installcheck-recursive info-recursive dvi-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	target=`echo $@ | sed s/-recursive//`; \
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    dot_seen=yes; \
+	    local_target="$$target-am"; \
 	  else \
-	    RELINSTALLDIR=../../../../$(target_alias)/lib/; \
+	    local_target="$$target"; \
 	  fi; \
-	else \
-	  if [ $(build_alias) = $(target_alias) ]; then \
-	    RELINSTALLDIR=../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`$(MULTISUBDIR)/; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
+
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $(MAKEFLAGS); amf=$$2; \
+	dot_seen=no; \
+	rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
+	  rev="$$subdir $$rev"; \
+	  test "$$subdir" != "." || dot_seen=yes; \
+	done; \
+	test "$$dot_seen" = "no" && rev=". $$rev"; \
+	target=`echo $@ | sed s/-recursive//`; \
+	for subdir in $$rev; do \
+	  echo "Making $$target in $$subdir"; \
+	  if test "$$subdir" = "."; then \
+	    local_target="$$target-am"; \
 	  else \
-	    RELINSTALLDIR=../../../..`echo $(MULTISUBDIR) | sed -e 's,/[^/]*,/..,g'`/$(target_alias)/lib$(MULTISUBDIR)/; \
+	    local_target="$$target"; \
 	  fi; \
-	fi; \
-	if [ $(build_alias) != $(target_alias) ]; then \
-	  case $$RELINSTALLDIR in \
-	  ../../../|../../../../) \
-	    RELINSTALLDIR=../$${RELINSTALLDIR}$(target_alias)/lib/;; \
-	  esac; \
-	fi; \
-	rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(SHLINK) ; \
-	rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$(ARLINK) ; \
-	for FILE in $(LIBS) ; do \
-	  rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	  if [ $$FILE = $(SHLINK) ] ; then \
-	    if [ -f $${INSTALLDIR}/$(MSHLINK) ]; then \
-	      rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	      $(LN_S) $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
-		|| cp $${RELINSTALLDIR}$(MSHLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	    else \
-	      rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	      $(LN_S) $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
-		|| cp $${RELINSTALLDIR}$(SHLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	    fi; \
-	  elif [ $$FILE = $(ARLINK) ] ; then \
-	    if [ -f $${INSTALLDIR}/$(MARLINK) ]; then \
-	      rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	      $(LN_S) $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
-		|| cp $${RELINSTALLDIR}$(MARLINK) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	    else \
-	      rm -f $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	      $(LN_S) $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE \
-		|| cp $${RELINSTALLDIR}$(ARLIB) $${INSTALLLINKDIR}$(MULTISUBDIR)/$$FILE ; \
-	    fi; \
-	  elif [ $$FILE = mshlink ]; then \
-	    for FILE in $(MSHLINK) ; do \
-	      rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	      $(LN_S) $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
-		|| cp $(SHLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	    done; \
-	  elif [ $$FILE = marlink ]; then \
-	    for FILE in $(MARLINK) ; do \
-	      rm -f $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	      $(LN_S) $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE \
-		|| cp $(ARLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	    done; \
-	  elif [ $$FILE = $(SHLIB) ]; then \
-	    $(INSTALL_PROGRAM) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	    : On the HP, shared libraries must be mode 555. ;\
-	    chmod 555 $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
+	  (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done && test -z "$$fail"
+tags-recursive:
+	list='$(SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \
+	done
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(PACKAGE)-$(VERSION)
+top_distdir = $(distdir)
+
+# This target untars the dist file and tries a VPATH configuration.  Then
+# it guarantees that the distribution is self-contained by making another
+# tarfile.
+distcheck: dist
+	-rm -rf $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz
+	mkdir $(distdir)/=build
+	mkdir $(distdir)/=inst
+	dc_install_base=`cd $(distdir)/=inst && pwd`; \
+	cd $(distdir)/=build \
+	  && ../configure --srcdir=.. --prefix=$$dc_install_base \
+	  && $(MAKE) $(AM_MAKEFLAGS) \
+	  && $(MAKE) $(AM_MAKEFLAGS) dvi \
+	  && $(MAKE) $(AM_MAKEFLAGS) check \
+	  && $(MAKE) $(AM_MAKEFLAGS) install \
+	  && $(MAKE) $(AM_MAKEFLAGS) installcheck \
+	  && $(MAKE) $(AM_MAKEFLAGS) dist
+	-rm -rf $(distdir)
+	@banner="$(distdir).tar.gz is ready for distribution"; \
+	dashes=`echo "$$banner" | sed s/./=/g`; \
+	echo "$$dashes"; \
+	echo "$$banner"; \
+	echo "$$dashes"
+dist: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+dist-all: distdir
+	-chmod -R a+r $(distdir)
+	GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir)
+	-rm -rf $(distdir)
+distdir: $(DISTFILES)
+	-rm -rf $(distdir)
+	mkdir $(distdir)
+	-chmod 777 $(distdir)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
 	  else \
-	    $(INSTALL_DATA) $$FILE $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	    $(RANLIB) $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	    chmod a-x $${INSTALLDIR}$(MULTISUBDIR)/$$FILE ; \
-	  fi ; \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+	for subdir in $(SUBDIRS); do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    chmod 777 $(distdir)/$$subdir; \
+	    (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
+	      || exit 1; \
+	  fi; \
 	done
-	@rootme=`pwd`/ ; export rootme ; \
-	$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
-
-.PHONY: force
-force:
-
-MYCXXFLAGS = -g -O2 -Wpointer-arith -Wnested-externs -Woverloaded-virtual -Wbad-function-cast -Winline -Wwrite-strings -pedantic -Wno-long-long
-MYCFLAGS = -g -O2 -Wpointer-arith -Wnested-externs
-
-.PHONY: stuff
-stuff:
-	$(MAKE) stuff1
-	$(MAKE) stuff2
-
-stuff1:
-	$(MAKE) clean
-	$(MAKE) -C ../libio c++clean
-	touch ../../gcc/libgcc2.ready
-
-stuff2:
-	$(MAKE) -C ../../gcc/ libgcc.a
-	$(MAKE) CXXFLAGS="$(MYCXXFLAGS)" CFLAGS="$(MYCFLAGS)"
-	-$(MAKE) check
-	-$(MAKE) -C ../libio check
-	-$(MAKE) -C ../../gcc check-g++
+info-am:
+info: info-recursive
+dvi-am:
+dvi: dvi-recursive
+check-am:
+check: check-recursive
+installcheck-am:
+installcheck: installcheck-recursive
+install-info-am: 
+install-info: install-info-recursive
+all-recursive-am: config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+
+install-exec-am:
+install-exec: install-exec-recursive
+
+install-data-am:
+install-data: install-data-recursive
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-recursive
+uninstall-am:
+uninstall: uninstall-recursive
+all-am: Makefile config.h
+all-redirect: all-recursive-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs: installdirs-recursive
+installdirs-am:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-hdr mostlyclean-tags mostlyclean-generic
+
+mostlyclean: mostlyclean-recursive
+
+clean-am:  clean-hdr clean-tags clean-generic mostlyclean-am
+
+clean: clean-recursive
+
+distclean-am:  distclean-hdr distclean-tags distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-recursive
+	-rm -f config.status
+
+maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-tags \
+		maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-recursive
+	-rm -f config.status
+
+.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
+install-data-recursive uninstall-data-recursive install-exec-recursive \
+uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \
+all-recursive check-recursive installcheck-recursive info-recursive \
+dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \
+maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info all-recursive-am install-exec-am install-exec \
+install-data-am install-data install-am install uninstall-am uninstall \
+all-redirect all-am all installdirs-am installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# These two special 'check-script' rules use the bash script 'mkcheck'
+# to do testing. This script is not as portable as the dejagnu test
+# harness, and is thus off by default. It does produce interesting
+# output however, including various performance analysis items like
+# compile time, execution time, and binary size.
+check-script: $(top_builddir)/mkcheck
+	-(chmod + $(top_builddir)/mkcheck; \
+	  cd testsuite; \
+	  @glibcpp_builddir@/mkcheck 0)
+
+check-script-install: $(top_builddir)/mkcheck
+	-(chmod + $(top_builddir)/mkcheck; \
+	  cd testsuite; \
+	  @glibcpp_builddir@/mkcheck 1)
+
+# These rules are messy, but are hella worth it.
+doxygen:
+	-(srcdir=`cd ${top_srcdir}; pwd`; \
+	  builddir=`pwd`; \
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=user $${srcdir} $${builddir})
+
+doxygen-maint:
+	-(srcdir=`cd ${top_srcdir}; pwd`; \
+	  builddir=`pwd`; \
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=maint $${srcdir} $${builddir})
+
+doxygen-man:
+	-(srcdir=`cd ${top_srcdir}; pwd`; \
+	  builddir=`pwd`; \
+	  /bin/sh ${srcdir}/docs/doxygen/run_doxygen \
+	            --mode=man $${srcdir} $${builddir})
+
+.PHONY: doxygen doxygen-maint doxygen-man
+
+# Multilib Makefile bits.
+.PHONY: all-multi mostlyclean-multi clean-multi distclean-multi \
+	maintainer-clean-multi
+
+all-am: all-multi
+install-am: install-multi
+mostlyclean-am: mostlyclean-multi
+clean-am: clean-multi
+distclean-am: distclean-multi
+maintainer-clean-am: maintainer-clean-multi
+
+all-multi:
+	$(MULTIDO) $(AM_MAKEFLAGS) DO=all multi-do
+install-multi:
+	$(MULTIDO) $(AM_MAKEFLAGS) DO=install multi-do
+mostlyclean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=mostlyclean multi-clean
+clean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=clean multi-clean
+distclean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=distclean multi-clean
+maintainer-clean-multi:
+	$(MULTICLEAN) $(AM_MAKEFLAGS) DO=maintainer-clean multi-clean
+
+# All the machinations with string instantiations messes up the
+# automake-generated TAGS rule. Make a simple one here.
+TAGS: tags-recursive $(LISP)
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/libstdc++/README b/contrib/libstdc++/README
new file mode 100644
index 0000000..67c390e
--- /dev/null
+++ b/contrib/libstdc++/README
@@ -0,0 +1,102 @@
+file: libstdc++-v3/README
+
+New users may wish to point their web browsers to the file
+documentation.html in the 'docs/html' subdirectory.  It contains brief
+building instructions and notes on how to configure the library in
+interesting ways.
+
+Instructions for configuring and building appear in
+docs/html/install.html.
+
+This directory contains the files needed to create an ISO Standard C++
+Library.
+
+It has subdirectories:
+
+  docs
+    Files in HTML and text format that document usage, quirks of the
+    implementation, and contributor checklists.
+
+  include
+    All header files for the C++ library are within this directory,
+    modulo specific runtime-related files that are in the libsupc++
+    directory.
+
+    include/std
+      Files meant to be found by #include  directives in
+      standard-conforming user programs.  
+
+    include/c
+      Headers intended to directly include standard C headers. 
+      [NB: this can be enabled via --enable-cheaders=c]
+
+    include/c_std
+      Headers intended to include standard C headers, and put select
+      names into the std:: namespace.
+      [NB: this is the default, and is the same as --enable-cheaders=c_std]
+
+    include/c_shadow
+      Headers intended to shadow standard C headers provided by an
+      underlying OS or C library, and other headers depended on directly
+      by C++ headers (e.g. unistd.h).  These are meant to wrap the names
+      defined there into the _C_legacy namespace.
+      [NB: this can be enabled via --enable-cheaders=c_shadow]
+
+    include/bits
+      Files included by standard headers and by other files in
+      the bits directory. 
+
+    include/backward
+      Headers provided for backward compatibility, such as .
+      They are not used in this library.
+
+    include/ext
+      Headers that define extensions to the standard library.  No
+      standard header refers to any of them.
+
+  src
+    Files that are used in constructing the library, but are not
+    installed.
+
+  testsuites/[thread, 17_* to 27_*]
+    Test programs are here, and may be used to begin to exercise the 
+    library.  Support for "make check" and "make check-install" is
+    complete, and runs through all the subdirectories here when this
+    command is issued from the build directory.  Please note that
+    "make check" requires DejaGNU 1.4 or later to be installed.  Please
+    note that "make check-script" calls the script mkcheck, which
+    requires bash, and which may need the paths to bash adjusted to
+    work properly, as /bin/bash is assumed.
+
+Other subdirectories contain variant versions of certain files
+that are meant to be copied or linked by the configure script.
+Currently these are:
+
+  config/cpu
+  config/os
+  config/io
+  config/locale
+
+In addition, three subdirectories are convenience libraries:
+
+  libio
+    Contains the subset of the GNU libio library needed for
+    C++. Currently not used.
+
+  libmath
+    Support routines needed for C++ math. Only needed if the
+    underlying "C" implementation is non-existent, in particular
+    required or optimal long double, long long, and C99 functionality.
+
+  libsupc++
+    Contains the runtime library for C++, including exception
+    handling and memory allocation and deallocation, RTTI, terminate
+    handlers, etc.
+
+Note that glibc also has a bits/ subdirectory.  We will either
+need to be careful not to collide with names in its bits/
+directory; or rename bits to (e.g.) cppbits/.
+
+In files throughout the system, lines marked with an "XXX" indicate
+a bug or incompletely-implemented feature.  Lines marked "XXX MT"
+indicate a place that may require attention for multi-thread safety.
diff --git a/contrib/libstdc++/acconfig.h b/contrib/libstdc++/acconfig.h
new file mode 100644
index 0000000..aa0dd99
--- /dev/null
+++ b/contrib/libstdc++/acconfig.h
@@ -0,0 +1,430 @@
+// acconfig.h symbols and macros for libstdc++ v3 -*- C++ -*-
+
+// Defines libstdc++ version.
+#undef PACKAGE
+#undef VERSION
+
+// Needed for gettext.
+#undef ENABLE_NLS
+#undef HAVE_CATGETS
+#undef HAVE_GETTEXT
+#undef HAVE_STPCPY
+
+// Define if GCC supports weak symbols.
+#undef _GLIBCPP_SUPPORTS_WEAK
+
+// Define if gthr-default.h exists (meaning that threading support is enabled).
+#undef HAVE_GTHR_DEFAULT
+
+// Include I/O support for 'long long' and 'unsigned long long'.
+#undef _GLIBCPP_USE_LONG_LONG
+
+// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+#undef _GLIBCPP_USE_C99
+
+// Include support for 'long double'.
+#undef _GLIBCPP_USE_LONG_DOUBLE
+
+// Include support for shadow headers, ie --enable-cshadow-headers.
+#undef _GLIBCPP_USE_SHADOW_HEADERS
+
+// Define if code specialized for wchar_t should be used.
+#undef _GLIBCPP_USE_WCHAR_T
+
+// Define if using setrlimit to limit memory usage during 'make check'.
+#undef _GLIBCPP_MEM_LIMITS
+
+// Define to use concept checking code from the boost libraries.
+#undef _GLIBCPP_CONCEPT_CHECKS
+
+// Define if you have the atan2f function.
+#undef _GLIBCPP_HAVE_ATAN2F 
+
+// Define if you have the atan2l function.
+#undef _GLIBCPP_HAVE_ATAN2L
+
+// Define if you have the copysignf function.
+#undef _GLIBCPP_HAVE_COPYSIGNF
+
+// Define if mbstate_t exists in wchar.h.
+#undef HAVE_MBSTATE_T
+
+// Define if you have the modff function.
+#undef HAVE_MODFF
+
+// Define if you have the modfl function.
+#undef HAVE_MODFL
+
+// Define if you have the expf function.
+#undef HAVE_EXPF
+
+// Define if you have the expl function.
+#undef HAVE_EXPL
+
+// Define if you have the hypotf function.
+#undef HAVE_HYPOTF
+
+// Define if you have the hypotl function.
+#undef HAVE_HYPOTL
+
+// Define if the compiler/host combination has __builtin_abs
+#undef HAVE___BUILTIN_ABS
+
+// Define if the compiler/host combination has __builtin_labs
+#undef HAVE___BUILTIN_LABS
+
+// Define if the compiler/host combination has __builtin_cos
+#undef HAVE___BUILTIN_COS
+
+// Define if the compiler/host combination has __builtin_cosf
+#undef HAVE___BUILTIN_COSF
+
+// Define if the compiler/host combination has __builtin_cosl
+#undef HAVE___BUILTIN_COSL
+
+// Define if the compiler/host combination has __builtin_fabs
+#undef HAVE___BUILTIN_FABS
+
+// Define if the compiler/host combination has __builtin_fabsf
+#undef HAVE___BUILTIN_FABSF
+
+// Define if the compiler/host combination has __builtin_fabsl
+#undef HAVE___BUILTIN_FABSL
+
+// Define if the compiler/host combination has __builtin_sin
+#undef HAVE___BUILTIN_SIN
+
+// Define if the compiler/host combination has __builtin_sinf
+#undef HAVE___BUILTIN_SINF
+
+// Define if the compiler/host combination has __builtin_sinl
+#undef HAVE___BUILTIN_SINL
+
+// Define if the compiler/host combination has __builtin_sqrt
+#undef HAVE___BUILTIN_SQRT
+
+// Define if the compiler/host combination has __builtin_sqrtf
+#undef HAVE___BUILTIN_SQRTF
+
+// Define if the compiler/host combination has __builtin_sqrtl
+#undef HAVE___BUILTIN_SQRTL
+
+// Define if LC_MESSAGES is available in .
+#undef HAVE_LC_MESSAGES
+
+// Define if  exists.
+#undef HAVE_FLOAT_H
+
+// Define if modf is present in 
+#undef HAVE_MODF
+
+// @BOTTOM@
+//
+// Systems that have certain non-standard functions prefixed with an
+// underscore, we'll handle those here. Must come after config.h.in.
+//
+#if defined (HAVE__ISNAN) && ! defined (HAVE_ISNAN)
+# define HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (HAVE__ISNANF) && ! defined (HAVE_ISNANF)
+# define HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (HAVE__ISNANL) && ! defined (HAVE_ISNANL)
+# define HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (HAVE__ISINF) && ! defined (HAVE_ISINF)
+# define HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (HAVE__ISINFF) && ! defined (HAVE_ISINFF)
+# define HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (HAVE__ISINFL) && ! defined (HAVE_ISINFL)
+# define HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (HAVE__COPYSIGN) && ! defined (HAVE_COPYSIGN)
+# define HAVE_COPYSIGN 1
+# define copysign _copysign
+#endif
+
+#if defined (HAVE__COPYSIGNL) && ! defined (HAVE_COPYSIGNL)
+# define HAVE_COPYSIGNL 1
+# define copysignl _copysignl
+#endif
+
+#if defined (HAVE__COSF) && ! defined (HAVE_COSF)
+# define HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (HAVE__ACOSF) && ! defined (HAVE_ACOSF)
+# define HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (HAVE__ACOSL) && ! defined (HAVE_ACOSL)
+# define HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (HAVE__ASINF) && ! defined (HAVE_ASINF)
+# define HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (HAVE__ASINL) && ! defined (HAVE_ASINL)
+# define HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (HAVE__ATANF) && ! defined (HAVE_ATANF)
+# define HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (HAVE__ATANL) && ! defined (HAVE_ATANL)
+# define HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (HAVE__CEILF) && ! defined (HAVE_CEILF)
+# define HAVE_CEILF 1
+# define aceil _ceilf
+#endif
+
+#if defined (HAVE__CEILL) && ! defined (HAVE_CEILL)
+# define HAVE_CEILL 1
+# define aceil _ceill
+#endif
+
+#if defined (HAVE__COSHF) && ! defined (HAVE_COSHF)
+# define HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (HAVE__COSL) && ! defined (HAVE_COSL)
+# define HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (HAVE__LOGF) && ! defined (HAVE_LOGF)
+# define HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (HAVE__COSHL) && ! defined (HAVE_COSHL)
+# define HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (HAVE__EXPF) && ! defined (HAVE_EXPF)
+# define HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (HAVE__EXPL) && ! defined (HAVE_EXPL)
+# define HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (HAVE__FABSF) && ! defined (HAVE_FABSF)
+# define HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (HAVE__FABSL) && ! defined (HAVE_FABSL)
+# define HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (HAVE__FLOORF) && ! defined (HAVE_FLOORF)
+# define HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (HAVE__FLOORL) && ! defined (HAVE_FLOORL)
+# define HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (HAVE__FMODF) && ! defined (HAVE_FMODF)
+# define HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (HAVE__FMODL) && ! defined (HAVE_FMODL)
+# define HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (HAVE__FREXPF) && ! defined (HAVE_FREXPF)
+# define HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (HAVE__FREXPL) && ! defined (HAVE_FREXPL)
+# define HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (HAVE__LDEXPF) && ! defined (HAVE_LDEXPF)
+# define HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (HAVE__LDEXPL) && ! defined (HAVE_LDEXPL)
+# define HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (HAVE__LOG10F) && ! defined (HAVE_LOG10F)
+# define HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (HAVE__LOGL) && ! defined (HAVE_LOGL)
+# define HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (HAVE__POWF) && ! defined (HAVE_POWF)
+# define HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (HAVE__LOG10L) && ! defined (HAVE_LOG10L)
+# define HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (HAVE__MODF) && ! defined (HAVE_MODF)
+# define HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (HAVE__MODL) && ! defined (HAVE_MODL)
+# define HAVE_MODL 1
+# define modl _modl
+#endif
+
+#if defined (HAVE__SINF) && ! defined (HAVE_SINF)
+# define HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (HAVE__POWL) && ! defined (HAVE_POWL)
+# define HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (HAVE__SINHF) && ! defined (HAVE_SINHF)
+# define HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (HAVE__SINL) && ! defined (HAVE_SINL)
+# define HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (HAVE__SQRTF) && ! defined (HAVE_SQRTF)
+# define HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (HAVE__SINHL) && ! defined (HAVE_SINHL)
+# define HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (HAVE__TANF) && ! defined (HAVE_TANF)
+# define HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (HAVE__SQRTL) && ! defined (HAVE_SQRTL)
+# define HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (HAVE__TANHF) && ! defined (HAVE_TANHF)
+# define HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (HAVE__TANL) && ! defined (HAVE_TANL)
+# define HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (HAVE__STRTOF) && ! defined (HAVE_STRTOF)
+# define HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (HAVE__TANHL) && ! defined (HAVE_TANHL)
+# define HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (HAVE__STRTOLD) && ! defined (HAVE_STRTOLD)
+# define HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (HAVE__SINCOS) && ! defined (HAVE_SINCOS)
+# define HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (HAVE__SINCOSF) && ! defined (HAVE_SINCOSF)
+# define HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (HAVE__SINCOSL) && ! defined (HAVE_SINCOSL)
+# define HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (HAVE__FINITE) && ! defined (HAVE_FINITE)
+# define HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (HAVE__FINITEF) && ! defined (HAVE_FINITEF)
+# define HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (HAVE__FINITEL) && ! defined (HAVE_FINITEL)
+# define HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (HAVE__QFINITE) && ! defined (HAVE_QFINITE)
+# define HAVE_QFINITE 1
+# define qfinite _qfinite
+#endif
+
+#if defined (HAVE__FPCLASS) && ! defined (HAVE_FPCLASS)
+# define HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (HAVE__QFPCLASS) && ! defined (HAVE_QFPCLASS)
+# define HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
diff --git a/contrib/libstdc++/acinclude.m4 b/contrib/libstdc++/acinclude.m4
new file mode 100644
index 0000000..9950f93c
--- /dev/null
+++ b/contrib/libstdc++/acinclude.m4
@@ -0,0 +1,2186 @@
+dnl
+dnl Initialize configure bits.
+dnl
+dnl GLIBCPP_CONFIGURE
+AC_DEFUN(GLIBCPP_CONFIGURE, [
+  dnl Default to --enable-multilib
+  AC_ARG_ENABLE(multilib,
+  [  --enable-multilib       build hella library versions (default)],
+  [case "${enableval}" in
+    yes) multilib=yes ;;
+    no)  multilib=no ;;
+    *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
+   esac], [multilib=yes])dnl
+
+  # When building with srcdir == objdir, links to the source files will
+  # be created in directories within the target_subdir.  We have to
+  # adjust toplevel_srcdir accordingly, so that configure finds
+  # install-sh and other auxiliary files that live in the top-level
+  # source directory.
+  if test "${srcdir}" = "."; then
+    if test -z "${with_target_subdir}"; then
+      toprel=".."
+    else
+      if test "${with_target_subdir}" != "."; then
+        toprel="${with_multisrctop}../.."
+      else
+        toprel="${with_multisrctop}.."
+      fi
+    fi
+  else
+    toprel=".."
+  fi
+  AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
+  toplevel_srcdir=\${top_srcdir}/$toprel
+  AC_SUBST(toplevel_srcdir)
+
+  # Export build and source directories.
+  # These need to be absolute paths, yet at the same time need to
+  # canonicalize only relative paths, because then amd will not unmount
+  # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+  glibcpp_builddir=`pwd`
+  case $srcdir in
+  [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
+  *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+  esac
+  AC_SUBST(glibcpp_builddir)
+  AC_SUBST(glibcpp_srcdir)
+
+  dnl This is here just to satisfy automake.
+  ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
+
+  AC_PROG_AWK
+  # Will set LN_S to either 'ln -s' or 'ln'.  With autoconf 2.5x, can also
+  # be 'cp -p' if linking isn't available.
+  #ac_cv_prog_LN_S='cp -p'
+  AC_PROG_LN_S
+
+  # We use these options to decide which functions to include.
+  AC_ARG_WITH(target-subdir,
+  [  --with-target-subdir=SUBDIR
+                          configuring in a subdirectory])
+  AC_ARG_WITH(cross-host,
+  [  --with-cross-host=HOST  configuring with a cross compiler])
+
+  glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
+  AC_SUBST(glibcpp_basedir)
+
+  # Never versions of autoconf add an underscore to these functions.
+  # Prevent future problems ...
+  ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
+  ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
+  ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
+  ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
+
+  # AC_PROG_CC
+  # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
+  # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
+  # are probably using a cross compiler, which will not be able to fully
+  # link an executable.  This is addressed in later versions of autoconf.
+
+  AC_DEFUN(LIB_AC_PROG_CC,
+  [AC_BEFORE([$0], [AC_PROG_CPP])dnl
+  dnl Fool anybody using AC_PROG_CC.
+  AC_PROVIDE([AC_PROG_CC])
+  AC_CHECK_PROG(CC, gcc, gcc)
+  if test -z "$CC"; then
+    AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+    test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+  fi
+
+  AC_PROG_CC_GNU
+
+  if test $ac_cv_prog_gcc = yes; then
+    GCC=yes
+  dnl Check whether -g works, even if CFLAGS is set, in case the package
+  dnl plays around with CFLAGS (such as to build both debugging and
+  dnl normal versions of a library), tasteless as that idea is.
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS=
+    AC_PROG_CC_G
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    elif test $ac_cv_prog_cc_g = yes; then
+      CFLAGS="-g -O2"
+    else
+      CFLAGS="-O2"
+    fi
+  else
+    GCC=
+    test "${CFLAGS+set}" = set || CFLAGS="-g"
+  fi
+  ])
+
+  LIB_AC_PROG_CC
+
+  # Likewise for AC_PROG_CXX.  We can't just call it directly because g++
+  # will try to link in libstdc++.
+  AC_DEFUN(LIB_AC_PROG_CXX,
+  [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
+  dnl Fool anybody using AC_PROG_CXX.
+  AC_PROVIDE([AC_PROG_CXX])
+  # Use glibcpp_CXX so that we do not cause CXX to be cached with the
+  # flags that come in CXX while configuring libstdc++.  They're different
+  # from those used for all other target libraries.  If CXX is set in
+  # the environment, respect that here.
+  glibcpp_CXX=$CXX
+  AC_CHECK_PROGS(glibcpp_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
+  AC_SUBST(glibcpp_CXX)
+  CXX=$glibcpp_CXX
+  test -z "$glibcpp_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
+
+  AC_PROG_CXX_GNU
+
+  if test $ac_cv_prog_gxx = yes; then
+    GXX=yes
+    dnl Check whether -g works, even if CXXFLAGS is set, in case the package
+    dnl plays around with CXXFLAGS (such as to build both debugging and
+    dnl normal versions of a library), tasteless as that idea is.
+    ac_test_CXXFLAGS="${CXXFLAGS+set}"
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=
+    AC_PROG_CXX_G
+    if test "$ac_test_CXXFLAGS" = set; then
+      CXXFLAGS="$ac_save_CXXFLAGS"
+    elif test $ac_cv_prog_cxx_g = yes; then
+      CXXFLAGS="-g -O2"
+    else
+      CXXFLAGS="-O2"
+    fi
+  else
+    GXX=
+    test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+  fi
+  ])
+
+  LIB_AC_PROG_CXX
+
+  # For some reason, gettext needs this.
+  AC_ISC_POSIX
+
+  AC_CHECK_TOOL(AS, as)
+  AC_CHECK_TOOL(AR, ar)
+  AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
+  AC_PROG_INSTALL
+
+  AM_MAINTAINER_MODE
+
+  # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
+  # at least currently, we never actually build a program, so we never
+  # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
+  # fails, because we are probably configuring with a cross compiler
+  # which can't create executables.  So we include AC_EXEEXT to keep
+  # automake happy, but we don't execute it, since we don't care about
+  # the result.
+  if false; then
+    # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+    # to nothing, so nothing would remain between `then' and `fi' if it
+    # were not for the `:' below.
+    :
+    AC_EXEEXT
+  fi
+
+  . [$]{glibcpp_basedir}/configure.host
+
+  case [$]{glibcpp_basedir} in
+    /* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
+    *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
+  esac
+
+  # This does for the target what configure.host does for the host.  In
+  # addition to possibly modifying the same flags, it also sets up symlinks.
+  GLIBCPP_CHECK_TARGET
+
+])
+
+
+dnl
+dnl Check to see if g++ can compile this library, and if so, if any version-
+dnl specific precautions need to be taken. 
+dnl 
+dnl GLIBCPP_CHECK_COMPILER_VERSION
+AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
+if test ! -f stamp-sanity-compiler; then
+  AC_MSG_CHECKING([for g++ that will successfully compile libstdc++-v3])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_COMPILE(, [
+  #if __GNUC__ < 3
+    not_ok
+  #endif
+  ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to GCC 3.0 or above]))
+  AC_LANG_RESTORE
+  AC_MSG_RESULT($gpp_satisfactory)
+  touch stamp-sanity-compiler
+fi
+])
+
+
+dnl
+dnl Tests for newer compiler features, or features that are present in newer
+dnl compiler versions but not older compiler versions still in use, should
+dnl be placed here.
+dnl
+dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
+dnl new inlining code or the new system_header pragma will die on -Werror.
+dnl Leave it out by default and use maint-mode to use it.
+dnl
+dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
+dnl compiler supports it and the user has not requested debug mode.
+dnl
+dnl GLIBCPP_CHECK_COMPILER_FEATURES
+AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
+  # All these tests are for C++; save the language and the compiler flags.
+  # The CXXFLAGS thing is suspicious, but based on similar bits previously
+  # found in GLIBCPP_CONFIGURE.
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+
+  # Check for maintainer-mode bits.
+  if test x"$USE_MAINTAINER_MODE" = xno; then
+    WERROR=''
+  else
+    WERROR='-Werror'
+  fi
+
+  # Check for -ffunction-sections -fdata-sections
+  AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
+  CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
+  AC_TRY_COMPILE(, [int foo;
+  ], [ac_fdsections=yes], [ac_fdsections=no])
+  if test "$ac_test_CXXFLAGS" = set; then
+    CXXFLAGS="$ac_save_CXXFLAGS"
+  else
+    # this is the suspicious part
+    CXXFLAGS=''
+  fi
+  if test x"$ac_fdsections" = x"yes" &&
+     test x"$enable_debug" = x"no"; then
+    SECTION_FLAGS='-ffunction-sections -fdata-sections'
+  fi
+  AC_MSG_RESULT($ac_fdsections)
+
+  AC_LANG_RESTORE
+  AC_SUBST(WERROR)
+  AC_SUBST(SECTION_FLAGS)
+])
+
+
+dnl
+dnl If GNU ld is in use, check to see if tricky linker opts can be used.  If
+dnl the native linker is in use, all variables will be defined to something
+dnl safe (like an empty string).
+dnl
+dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible.
+dnl Define OPT_LDFLAGS='-Wl,-O1' if possible.
+dnl Define LD, with_gnu_ld, and (possibly) glibcpp_gnu_ld_version as
+dnl side-effects of testing.
+dnl
+dnl GLIBCPP_CHECK_LINKER_FEATURES
+AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  AC_REQUIRE([AC_PROG_LD])
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  changequote(,)
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  changequote([,])
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
+    AC_TRY_RUN([
+     int main(void) 
+     {
+       try { throw 1; }
+       catch (...) { };
+       return 0;
+     }
+    ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    AC_MSG_RESULT($ac_sectionLDflags)
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  AC_SUBST(SECTION_LDFLAGS)
+  AC_SUBST(OPT_LDFLAGS)
+])
+
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_1
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_1, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include 
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     ], 
+                     [ $1(0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl 3) if not, see if 1) and 2) for argument prepended with '_'
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, [
+  GLIBCPP_CHECK_MATH_DECL_1($1)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  else
+    GLIBCPP_CHECK_MATH_DECL_1(_$1)
+    if test x$glibcpp_cv_func__$1_use = x"yes"; then
+      AC_CHECK_FUNCS(_$1)    
+    fi
+  fi
+])
+
+
+dnl
+dnl Like GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, but does a bunch of
+dnl of functions at once.  It's an all-or-nothing check -- either 
+dnl HAVE_XYZ is defined for each of the functions, or for none of them.
+dnl Doing it this way saves significant configure time.
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1, [
+  AC_MSG_CHECKING([for $1 functions])
+  AC_CACHE_VAL(glibcpp_cv_func_$2_use, [
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_TRY_COMPILE([#include ],
+                   [ `for x in $3; do echo "$x (0);"; done` ],
+                   [glibcpp_cv_func_$2_use=yes],
+                   [glibcpp_cv_func_$2_use=no])
+    AC_LANG_RESTORE])
+  AC_MSG_RESULT($glibcpp_cv_func_$2_use)
+  if test x$glibcpp_cv_func_$2_use = x"yes"; then
+    AC_CHECK_FUNCS($3)
+  fi
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_2
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_2, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2, [
+  GLIBCPP_CHECK_MATH_DECL_2($1)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  else
+    GLIBCPP_CHECK_MATH_DECL_2(_$1)
+    if test x$glibcpp_cv_func__$1_use = x"yes"; then
+      AC_CHECK_FUNCS(_$1)    
+    fi
+  fi
+])
+
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with THREE parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_3
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_3, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with THREE parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3, [
+  GLIBCPP_CHECK_MATH_DECL_3($1)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  else
+    GLIBCPP_CHECK_MATH_DECL_3(_$1)
+    if test x$glibcpp_cv_func__$1_use = x"yes"; then
+      AC_CHECK_FUNCS(_$1)    
+    fi
+  fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2
+AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a function with THREE parameters
+dnl
+dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3
+AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  fi
+])
+
+
+dnl
+dnl Because the builtins are picky picky picky about the arguments they take, 
+dnl do an explict linkage tests here.
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
+AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_MSG_CHECKING([for $1 linkage])
+    if test x${glibcpp_cv_func_$1_link+set} != xset; then
+      AC_CACHE_VAL(glibcpp_cv_func_$1_link, [
+        AC_TRY_LINK([#include ], 
+                    [ $1(0);], 
+                    [glibcpp_cv_func_$1_link=yes], [glibcpp_cv_func_$1_link=no])
+      ])
+    fi
+    AC_MSG_RESULT($glibcpp_cv_func_$1_link)
+    if test x$glibcpp_cv_func_$1_link = x"yes"; then
+      ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      AC_DEFINE_UNQUOTED(${ac_tr_func})
+    fi
+  fi
+])
+
+
+dnl
+dnl Check to see what builtin math functions are supported
+dnl
+dnl check for __builtin_abs
+dnl check for __builtin_fabsf
+dnl check for __builtin_fabs
+dnl check for __builtin_fabl
+dnl check for __builtin_labs
+dnl check for __builtin_sqrtf
+dnl check for __builtin_sqrtl
+dnl check for __builtin_sqrt
+dnl check for __builtin_sinf
+dnl check for __builtin_sin
+dnl check for __builtin_sinl
+dnl check for __builtin_cosf
+dnl check for __builtin_cos
+dnl check for __builtin_cosl
+dnl
+dnl GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
+  dnl Test for builtin math functions.
+  dnl These are made in gcc/c-common.c 
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
+
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
+
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
+
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
+
+  dnl There is, without a doubt, a more elegant way to have these
+  dnl names exported so that they won't be stripped out of acconfig.h by
+  dnl autoheader. I leave this as an exercise to somebody less frustrated
+  dnl than I.... please email the libstdc++ list if you can figure out a
+  dnl more elegant approach (see autoconf/acgen.m4 and specifically
+  dnl AC_CHECK_FUNC for things to steal.)
+  dummyvar=no
+  if test x$dummyvar = x"yes"; then
+    AC_DEFINE(HAVE___BUILTIN_ABS)
+    AC_DEFINE(HAVE___BUILTIN_LABS)
+    AC_DEFINE(HAVE___BUILTIN_COS)
+    AC_DEFINE(HAVE___BUILTIN_COSF)
+    AC_DEFINE(HAVE___BUILTIN_COSL)
+    AC_DEFINE(HAVE___BUILTIN_FABS)
+    AC_DEFINE(HAVE___BUILTIN_FABSF)
+    AC_DEFINE(HAVE___BUILTIN_FABSL)
+    AC_DEFINE(HAVE___BUILTIN_SIN)
+    AC_DEFINE(HAVE___BUILTIN_SINF)
+    AC_DEFINE(HAVE___BUILTIN_SINL)
+    AC_DEFINE(HAVE___BUILTIN_SQRT)
+    AC_DEFINE(HAVE___BUILTIN_SQRTF)
+    AC_DEFINE(HAVE___BUILTIN_SQRTL)
+  fi
+])
+
+
+dnl
+dnl Check to see what the underlying c library 
+dnl These checks need to do two things: 
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_STRTOLD if "strtold" is declared and links
+dnl Define HAVE_STRTOF if "strtof" is declared and links
+dnl Define HAVE_DRAND48 if "drand48" is declared and links
+dnl
+dnl GLIBCPP_CHECK_STDLIB_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+  GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
+  GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtof)
+  AC_CHECK_FUNCS(drand48)
+
+  CXXFLAGS="$ac_save_CXXFLAGS"
+])
+
+
+dnl
+dnl Check to see what the underlying c library or math library is like.
+dnl These checks need to do two things: 
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is found.
+dnl
+dnl GLIBCPP_CHECK_MATH_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+  dnl Check libm
+  AC_CHECK_LIB(m, sin, libm="-lm")
+  ac_save_LIBS="$LIBS"
+  LIBS="$LIBS $libm"
+
+  dnl Check to see if certain C math functions exist.
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypot)
+
+  dnl Check to see if basic C math functions have float versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float trig,
+                                          float_trig,
+                                          acosf asinf atanf \
+                                          cosf sinf tanf \
+                                          coshf sinhf tanhf)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float round,
+                                          float_round,
+                                          ceilf floorf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
+
+  dnl Check to see if basic C math functions have long double versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double trig,
+                                          long_double_trig,
+                                          acosl asinl atanl \
+                                          cosl sinl tanl \
+                                          coshl sinhl tanhl)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double round,
+                                          long_double_round,
+                                          ceill floorl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
+
+  dnl Some runtimes have these functions with a preceding underscore. Please
+  dnl keep this sync'd with the one above. And if you add any new symbol,
+  dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
+  dnl Check to see if certain C math functions exist.
+
+  dnl Check to see if basic C math functions have float versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float trig,
+                                          _float_trig,
+                                          _acosf _asinf _atanf \
+                                          _cosf _sinf _tanf \
+                                          _coshf _sinhf _tanhf)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float round,
+                                          _float_round,
+                                          _ceilf _floorf)
+
+  dnl Check to see if basic C math functions have long double versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double trig,
+                                          _long_double_trig,
+                                          _acosl _asinl _atanl \
+                                          _cosl _sinl _tanl \
+                                          _coshl _sinhl _tanhl)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double round,
+                                          _long_double_round,
+                                          _ceill _floorl)
+
+  LIBS="$ac_save_LIBS"
+  CXXFLAGS="$ac_save_CXXFLAGS"
+])
+
+
+dnl
+dnl Check to see if there is native support for complex 
+dnl
+dnl Don't compile bits in math/* if native support exits.
+dnl
+dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
+dnl
+dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
+  dnl Check for complex versions of math functions of platform.
+  AC_CHECK_LIB(m, main)
+  AC_REPLACE_MATHFUNCS(nan copysignf)
+
+  dnl For __signbit to signbit conversions.
+  AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"])
+  AC_CHECK_FUNCS([__signbitf], , [LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"])
+
+  dnl Compile the long double complex functions only if the function 
+  dnl provides the non-complex long double functions that are needed.
+  dnl Currently this includes copysignl, which should be
+  dnl cached from the GLIBCPP_CHECK_MATH_SUPPORT macro, above.
+  if test x$ac_cv_func_copysignl = x"yes"; then
+    AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"])
+  fi
+
+  AC_SUBST(LIBMATHOBJS)
+])
+
+
+dnl Check to see what architecture and operating system we are compiling
+dnl for.  Also, if architecture- or OS-specific flags are required for
+dnl compilation, pick them up here.
+dnl 
+dnl GLIBCPP_CHECK_TARGET
+AC_DEFUN(GLIBCPP_CHECK_TARGET, [
+    . [$]{glibcpp_basedir}/configure.target
+    AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
+    AC_MSG_RESULT(OS config directory is $os_include_dir)
+])
+
+
+dnl
+dnl Check to see if this target can enable the wchar_t parts of libstdc++.
+dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled.  (This
+dnl must have been previously checked.)
+dnl
+dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found 
+dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
+dnl
+dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
+
+  dnl Test wchar.h for mbstate_t, which is needed for char_traits and
+  dnl others even if wchar_t support is not on.
+  AC_MSG_CHECKING([for mbstate_t])
+  AC_TRY_COMPILE([#include ],
+  [mbstate_t teststate;], 
+  have_mbstate_t=yes, have_mbstate_t=no)
+  AC_MSG_RESULT($have_mbstate_t)
+  if test x"$have_mbstate_t" = xyes; then
+    AC_DEFINE(HAVE_MBSTATE_T)
+  fi
+
+  dnl Sanity check for existence of ISO C99 headers for extended encoding.
+  AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
+  AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
+  
+  dnl Only continue checking if the ISO C99 headers exist and support is on.
+  if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+    dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+    dnl numeric_limits can instantiate type_traits
+    AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
+    AC_TRY_COMPILE([#include ],
+    [int i = WCHAR_MIN; int j = WCHAR_MAX;], 
+    has_wchar_minmax=yes, has_wchar_minmax=no)
+    AC_MSG_RESULT($has_wchar_minmax)
+    
+    dnl Test wchar.h for WEOF, which is what we use to determine whether
+    dnl to specialize for char_traits or not.
+    AC_MSG_CHECKING([for WEOF])
+    AC_TRY_COMPILE([
+      #include 
+      #include ],
+    [wint_t i = WEOF;],
+    has_weof=yes, has_weof=no)
+    AC_MSG_RESULT($has_weof)
+  
+    dnl Tests for wide character functions used in char_traits.
+    ac_wfuncs=yes
+    AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset,, \
+    ac_wfuncs=no)
+  
+    dnl Checks for names injected into std:: by the c_std headers.
+    AC_CHECK_FUNCS(btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr,, \
+    ac_wfuncs=no)
+
+    AC_MSG_CHECKING([for ISO C99 wchar_t support])
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    AC_MSG_RESULT($ac_isoC99_wchar_t)
+  
+    dnl Use iconv for wchar_t to char conversions. As such, check for 
+    dnl X/Open Portability Guide, version 2 features (XPG2).
+    AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
+    AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+
+    dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
+    AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
+    ac_XPG2funcs=yes, ac_XPG2funcs=no)
+  
+    LIBS="$ac_save_LIBS"
+
+    AC_MSG_CHECKING([for XPG2 wchar_t support])
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    AC_MSG_RESULT($ac_XPG2_wchar_t)
+  
+    dnl At the moment, only enable wchar_t specializations if all the
+    dnl above support is present.
+    AC_MSG_CHECKING([for enabled wchar_t specializations])
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
+      AC_MSG_RESULT("yes")
+    else
+      AC_MSG_RESULT("no")
+    fi
+  else
+    dnl Wide characters disabled by the user. 
+    AC_MSG_WARN([wchar_t support disabled.])
+  fi
+])
+
+
+dnl
+dnl Check for special debugging mode; not for production use.
+dnl
+dnl GLIBCPP_ENABLE_DEBUG
+dnl --enable-debug sets '-ggdb3 -O0'.
+dnl --disable-debug sets '-g' and whatever optimization options the
+dnl     compiler can handle.
+dnl  +  --enable-maintainer-mode automatically defaults this to on.
+dnl  +  Perhaps -D/-U of NDEBUG, DEBUG, DEBUG_ASSERT, ...?
+dnl  +  Usage:  GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_DEBUG, [dnl
+define([GLIBCPP_ENABLE_DEBUG_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(debug,
+changequote(<<, >>)dnl
+<<  --enable-debug          extra debugging, turn off optimization [default=>>GLIBCPP_ENABLE_DEBUG_DEFAULT],
+changequote([, ])dnl
+[case "${enableval}" in
+ yes) enable_debug=yes ;;
+ no)  enable_debug=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable extra debugging]) ;;
+ esac],
+enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
+
+dnl Option parsed, now set things appropriately
+case "${enable_debug}" in
+    yes) 
+        DEBUG_FLAGS='-O0 -ggdb3'                        
+        ;; 
+    no)   
+        DEBUG_FLAGS='-g'
+        ;;
+esac
+AC_SUBST(DEBUG_FLAGS)
+])
+
+
+dnl
+dnl Check for "unusual" flags to pass to the compiler while building.
+dnl
+dnl GLIBCPP_ENABLE_CXX_FLAGS
+dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
+dnl     experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
+dnl     Somehow this same set of flags must be passed when [re]building
+dnl     libgcc.
+dnl --disable-cxx-flags passes nothing.
+dnl  +  See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
+dnl         http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
+dnl         http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
+dnl  +  Usage:  GLIBCPP_ENABLE_CXX_FLAGS(default flags)
+dnl       If "default flags" is an empty string (or "none"), the effect is
+dnl       the same as --disable or --enable=no.
+AC_DEFUN(GLIBCPP_ENABLE_CXX_FLAGS, [dnl
+define([GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
+AC_ARG_ENABLE(cxx-flags,
+changequote(<<, >>)dnl
+<<  --enable-cxx-flags=FLAGS      pass compiler FLAGS when building library;
+                                [default=>>GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT],
+changequote([, ])dnl
+[case "x$enableval" in
+ xyes)   
+        AC_MSG_ERROR([--enable-cxx-flags needs compiler flags as arguments]) ;;
+ xno|x)  
+        enable_cxx_flags='' ;;
+ *)      
+        enable_cxx_flags="$enableval" ;;
+ esac],
+enable_cxx_flags='GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT')
+
+dnl Thinko on my part during design.  This kludge is the workaround.
+if test "$enable_cxx_flags" = "none"; then 
+  enable_cxx_flags=''; 
+fi
+
+dnl Run through flags (either default or command-line) and set anything
+dnl extra (e.g., #defines) that must accompany particular g++ options.
+if test -n "$enable_cxx_flags"; then
+    for f in $enable_cxx_flags; do
+        case "$f" in
+            -fhonor-std)  ;;
+            -*)  ;;
+            *)   # and we're trying to pass /what/ exactly?
+                 AC_MSG_ERROR([compiler flags start with a -]) ;;
+        esac
+    done
+fi
+EXTRA_CXX_FLAGS="$enable_cxx_flags"
+AC_SUBST(EXTRA_CXX_FLAGS)
+])
+
+
+dnl
+dnl Check for which locale library to use:  gnu or generic.
+dnl
+dnl GLIBCPP_ENABLE_CLOCALE
+dnl --enable-clocale=gnu sets config/locale/c_locale_gnu.cc and friends
+dnl --enable-clocale=generic sets config/locale/c_locale_generic.cc and friends
+dnl 
+dnl default is generic
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
+  AC_MSG_CHECKING([for clocale to use])
+  AC_ARG_ENABLE(clocale,
+  [  --enable-clocale        enable model for target locale package. 
+  --enable-clocale=MODEL  use MODEL target-speific locale package. [default=generic]
+  ], 
+  if test x$enable_clocale = xno; then
+     enable_clocale=no
+  fi,
+     enable_clocale=no)
+
+  enable_clocale_flag=$enable_clocale
+
+  dnl Probe for locale support if no specific model is specified.
+  dnl Default to "generic"
+  if test x$enable_clocale_flag = xno; then
+    case x${target_os} in
+      xlinux* | xgnu*)
+	AC_EGREP_CPP([_GLIBCPP_ok], [
+        #include 
+        #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 
+          _GLIBCPP_ok
+        #endif
+        ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
+
+	# Test for bugs early in glibc-2.2.x series
+  	if test x$enable_clocale_flag = xgnu; then
+    	  AC_TRY_RUN([
+	  #define _GNU_SOURCE 1
+	  #include 
+	  int main()
+	  {
+  	    const char __one[] = "Äuglein Augmen";
+  	    const char __two[] = "Äuglein";
+  	    int i;
+  	    int j;
+  	    __locale_t	loc;
+   	    __locale_t	loc_dup;
+  	    loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+  	    loc_dup = __duplocale(loc);
+  	    i = __strcoll_l(__one, __two, loc);
+  	    j = __strcoll_l(__one, __two, loc_dup);
+  	    return 0;
+	  }
+	  ], 
+	  [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
+	  [enable_clocale_flag=generic])
+  	fi
+
+	# ... at some point put __strxfrm_l tests in as well.
+        ;;
+      *)
+	enable_clocale_flag=generic
+	;;
+    esac
+  fi
+
+  dnl Deal with gettext issues.
+  AC_ARG_ENABLE(nls,
+  [  --enable-nls            use Native Language Support (default)],
+  , enable_nls=yes)
+  USE_NLS=no
+
+  dnl Set configure bits for specified locale package
+  case x${enable_clocale_flag} in
+    xgeneric)
+      AC_MSG_RESULT(generic)
+
+      CLOCALE_H=config/locale/generic/c_locale.h
+      CLOCALE_CC=config/locale/generic/c_locale.cc
+      CCODECVT_H=config/locale/generic/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/generic/ctype_members.cc
+      CMESSAGES_H=config/locale/generic/messages_members.h
+      CMESSAGES_CC=config/locale/generic/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_CC=config/locale/generic/time_members.cc
+      ;;
+    xgnu)
+      AC_MSG_RESULT(gnu)
+
+      # Declare intention to use gettext, and add support for specific
+      # languages.
+      # For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT
+      ALL_LINGUAS="de fr"
+
+      # Don't call AM_GNU_GETTEXT here. Instead, assume glibc.
+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
+	USE_NLS=yes
+      fi
+
+      # Export the build objects.
+      for ling in $ALL_LINGUAS; do \
+        glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
+        glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+      done
+      AC_SUBST(glibcpp_MOFILES)
+      AC_SUBST(glibcpp_POFILES)
+
+      CLOCALE_H=config/locale/gnu/c_locale.h
+      CLOCALE_CC=config/locale/gnu/c_locale.cc
+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/gnu/collate_members.cc
+      CCTYPE_CC=config/locale/gnu/ctype_members.cc
+      CMESSAGES_H=config/locale/gnu/messages_members.h
+      CMESSAGES_CC=config/locale/gnu/messages_members.cc
+      CMONEY_CC=config/locale/gnu/monetary_members.cc
+      CNUMERIC_CC=config/locale/gnu/numeric_members.cc
+      CTIME_CC=config/locale/gnu/time_members.cc
+      ;;
+    xieee_1003.1-2001)
+      AC_MSG_RESULT(generic)
+
+      CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
+      CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/generic/ctype_members.cc
+      CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
+      CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_CC=config/locale/generic/time_members.cc
+      ;;
+    *)
+      echo "$enable_clocale is an unknown locale package" 1>&2
+      exit 1
+      ;;
+  esac
+
+  # This is where the testsuite looks for locale catalogs, using the
+  # -DLOCALEDIR define during testsuite compilation.
+  glibcpp_localedir=${glibcpp_builddir}/po/share/locale
+  AC_SUBST(glibcpp_localedir)
+
+  AC_SUBST(USE_NLS)
+  AC_SUBST(CLOCALE_H)
+  AC_SUBST(CCODECVT_H)
+  AC_SUBST(CMESSAGES_H)
+  AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
+  AC_LINK_FILES($CCOLLATE_CC, src/collate.cc)
+  AC_LINK_FILES($CCTYPE_CC, src/ctype.cc)
+  AC_LINK_FILES($CMESSAGES_CC, src/messages.cc)
+  AC_LINK_FILES($CMONEY_CC, src/monetary.cc)
+  AC_LINK_FILES($CNUMERIC_CC, src/numeric.cc)
+  AC_LINK_FILES($CTIME_CC, src/time.cc)
+])
+
+
+dnl
+dnl Check for which I/O library to use:  libio, or something specific.
+dnl
+dnl GLIBCPP_ENABLE_CSTDIO
+dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
+dnl 
+dnl default is stdio
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
+  AC_MSG_CHECKING([for cstdio to use])
+  AC_ARG_ENABLE(cstdio,
+  [  --enable-cstdio         enable stdio for target io package. 
+  --enable-cstdio=LIB     use LIB target-speific io package. [default=stdio]
+  ], 
+  if test x$enable_cstdio = xno; then
+     enable_cstdio=stdio
+  fi,
+     enable_cstdio=stdio)
+
+  enable_cstdio_flag=$enable_cstdio
+
+  dnl Check if a valid I/O package
+  case x${enable_cstdio_flag} in
+    xlibio)
+      CSTDIO_H=config/io/c_io_libio.h
+      BASIC_FILE_H=config/io/basic_file_libio.h
+      BASIC_FILE_CC=config/io/basic_file_libio.cc
+      AC_MSG_RESULT(libio)
+
+      # see if we are on a system with libio native (ie, linux)
+      AC_CHECK_HEADER(libio.h,  has_libio=yes, has_libio=no)
+
+      # Need to check and see what version of glibc is being used. If
+      # it's not glibc-2.2 or higher, then we'll need to go ahead and 
+      # compile most of libio for linux systems.
+      if test x$has_libio = x"yes"; then
+        case "$target" in
+          *-*-linux*)
+              AC_MSG_CHECKING([for glibc version >= 2.2])
+              AC_EGREP_CPP([ok], [
+            #include 
+              #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 
+                    ok
+              #endif
+              ], glibc_satisfactory=yes, glibc_satisfactory=no)
+              AC_MSG_RESULT($glibc_satisfactory)
+            ;;
+        esac
+
+        # XXX at the moment, admit defeat and force the recompilation
+        # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
+        glibc_satisfactory=no        
+
+        if test x$glibc_satisfactory = x"yes"; then
+           need_libio=no
+           need_wlibio=no        
+        else
+           need_libio=yes
+           # bkoz XXX need to add checks to enable this
+           # pme XXX here's a first pass at such a check
+           if test x$enable_c_mbchar != xno; then
+              need_wlibio=yes
+           else
+              need_wlibio=no
+           fi
+        fi
+
+      else
+         # Using libio, but  doesn't exist on the target system. . .
+         need_libio=yes
+         # bkoz XXX need to add checks to enable this
+         # pme XXX here's a first pass at such a check
+         if test x$enable_c_mbchar != xno; then
+             need_wlibio=yes
+         else
+             need_wlibio=no
+         fi
+      fi
+      ;;
+    xstdio | x | xno | xnone | xyes)
+      # default
+      CSTDIO_H=config/io/c_io_stdio.h
+      BASIC_FILE_H=config/io/basic_file_stdio.h
+      BASIC_FILE_CC=config/io/basic_file_stdio.cc
+      AC_MSG_RESULT(stdio)
+
+      # We're not using stdio.
+      need_libio=no
+      need_wlibio=no
+      ;;
+    *)
+      echo "$enable_cstdio is an unknown io package" 1>&2
+      exit 1
+      ;;
+  esac
+  AC_SUBST(CSTDIO_H)
+  AC_SUBST(BASIC_FILE_H)
+  AC_LINK_FILES($BASIC_FILE_CC, src/basic_file.cc)
+
+  # 2000-08-04 bkoz hack
+  CCODECVT_C=config/io/c_io_libio_codecvt.c
+  AC_SUBST(CCODECVT_C)
+  # 2000-08-04 bkoz hack
+
+  AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
+                 test "$need_libio" = yes || test "$need_wlibio" = yes)
+  AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
+  AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
+  if test "$need_libio" = yes || test "$need_wlibio" = yes; then
+    libio_la=../libio/libio.la
+  else
+    libio_la=
+  fi
+  AC_SUBST(libio_la)
+])
+
+
+dnl
+dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
+dnl We must stage the required headers so that they will be installed
+dnl with the library (unlike libgcc, the STL implementation is provided
+dnl solely within headers).  Since we must not inject random user-space
+dnl macro names into user-provided C++ code, we first stage into -in
+dnl and process to  with an output command.  The reason for a two-
+dnl stage process here is to correctly handle $srcdir!=$objdir without
+dnl having to write complex code (the sed commands to clean the macro
+dnl namespace are complex and fragile enough as it is).  We must also
+dnl add a relative path so that -I- is supported properly.
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
+  AC_MSG_CHECKING([for thread model used by GCC])
+  target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+  AC_MSG_RESULT([$target_thread_file])
+
+  if test $target_thread_file != single; then
+    AC_DEFINE(HAVE_GTHR_DEFAULT)
+    AC_DEFINE(_GLIBCPP_SUPPORTS_WEAK, __GXX_WEAK__)
+  fi
+
+  glibcpp_thread_h=gthr-$target_thread_file.h
+  AC_SUBST(glibcpp_thread_h)
+])
+
+
+dnl
+dnl Check for exception handling support.  If an explicit enable/disable
+dnl sjlj exceptions is given, we don't have to detect.  Otherwise the
+dnl target may or may not support call frame exceptions.
+dnl
+dnl GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
+dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
+dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
+dnl
+dnl Define _GLIBCPP_SJLJ_EXCEPTIONS if the compiler is configured for it.
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_SJLJ_EXCEPTIONS, [
+  AC_MSG_CHECKING([for exception model to use])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_ARG_ENABLE(sjlj-exceptions,
+  [  --enable-sjlj-exceptions  force use of builtin_setjmp for exceptions],
+  [:],
+  [dnl Botheration.  Now we've got to detect the exception model.
+   dnl Link tests against libgcc.a are problematic since -- at least
+   dnl as of this writing -- we've not been given proper -L bits for
+   dnl single-tree newlib and libgloss.
+   dnl
+   dnl This is what AC_TRY_COMPILE would do if it didn't delete the
+   dnl conftest files before we got a change to grep them first.
+   cat > conftest.$ac_ext << EOF
+[#]line __oline__ "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+  S s;
+  bar();
+}
+EOF
+   old_CXXFLAGS="$CXXFLAGS"  
+   CXXFLAGS="-S -fexceptions"
+   if AC_TRY_EVAL(ac_compile); then
+     if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=yes
+     elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=no
+     fi
+   fi
+   CXXFLAGS="$old_CXXFLAGS"
+   rm -f conftest*])
+   if test x$enable_sjlj_exceptions = xyes; then
+     AC_DEFINE(_GLIBCPP_SJLJ_EXCEPTIONS, 1,
+        [Define if the compiler is configured for setjmp/longjmp exceptions.])
+     ac_exception_model_name=sjlj
+   elif test x$enable_sjlj_exceptions = xno; then
+     ac_exception_model_name="call frame"
+   else
+     AC_MSG_ERROR([unable to detect exception model])
+   fi
+   AC_LANG_RESTORE
+   AC_MSG_RESULT($ac_exception_model_name)
+])
+
+
+dnl
+dnl Check for libunwind exception handling support. If enabled then
+dnl we assume that the _Unwind_* functions that make up the Unwind ABI
+dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
+dnl libunwind instead of libgcc and that libstdc++ has a dependency
+dnl on libunwind as well as libgcc.
+dnl
+dnl GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
+dnl --enable-libunwind-exceptions forces the use of libunwind.
+dnl --disable-libunwind-exceptions assumes there is no libunwind.
+dnl
+dnl Define _GLIBCPP_LIBUNWIND_EXCEPTIONS if requested.
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS, [
+  AC_MSG_CHECKING([for use of libunwind])
+  AC_ARG_ENABLE(libunwind-exceptions,
+  [  --enable-libunwind-exceptions  force use of libunwind for exceptions],
+  use_libunwind_exceptions=$enableval,
+  use_libunwind_exceptions=no)
+  AC_MSG_RESULT($use_libunwind_exceptions)
+  dnl Option parsed, now set things appropriately
+  if test x"$use_libunwind_exceptions" = xyes; then
+    LIBUNWIND_FLAG="-lunwind"
+  else
+    LIBUNWIND_FLAG=""
+  fi
+  AC_SUBST(LIBUNWIND_FLAG)
+])
+
+dnl
+dnl Check for ISO/IEC 9899:1999 "C99" support.
+dnl
+dnl GLIBCPP_ENABLE_C99
+dnl --enable-c99 defines _GLIBCPP_USE_C99
+dnl --disable-c99 leaves _GLIBCPP_USE_C99 undefined
+dnl  +  Usage:  GLIBCPP_ENABLE_C99[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If omitted, it
+dnl       defaults to `no'.
+dnl  +  If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
+dnl
+dnl GLIBCPP_ENABLE_C99
+AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
+  define([GLIBCPP_ENABLE_C99_DEFAULT], ifelse($1, yes, yes, no))dnl
+
+  AC_ARG_ENABLE(c99,
+  changequote(<<, >>)dnl
+  <<--enable-c99            turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
+  changequote([, ])dnl
+  [case "$enableval" in
+   yes) enable_c99=yes ;;
+   no)  enable_c99=no ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable C99]) ;;
+   esac],
+  enable_c99=GLIBCPP_ENABLE_C99_DEFAULT)dnl
+ 
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  # Check for the existence of  functions used if C99 is enabled.
+  ac_c99_math=yes;
+  AC_MSG_CHECKING([for ISO C99 support in ])
+  AC_TRY_COMPILE([#include ],[fpclassify(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isfinite(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isinf(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isnan(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isnormal(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[signbit(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isgreater(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],
+                 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isless(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[islessequal(0.0,0.0);],,[ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],
+	         [islessgreater(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],
+	         [isunordered(0.0,0.0);],, [ac_c99_math=no])
+  AC_MSG_RESULT($ac_c99_math)
+
+  # Check for the existence in  of vscanf, et. al.
+  ac_c99_stdio=yes;
+  AC_MSG_CHECKING([for ISO C99 support in ])
+  AC_TRY_COMPILE([#include ],
+		 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vfscanf(stderr, "%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vscanf("%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vsnprintf(fmt, 0, "%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vsscanf(fmt, "%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_MSG_RESULT($ac_c99_stdio)
+
+  # Check for the existence in  of lldiv_t, et. al.
+  ac_c99_stdlib=yes;
+  AC_MSG_CHECKING([for lldiv_t declaration])
+  AC_CACHE_VAL(ac_c99_lldiv_t, [
+  AC_TRY_COMPILE([#include ], 
+                   [ lldiv_t mydivt;], 
+                   [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
+  ])
+  AC_MSG_RESULT($ac_c99_lldiv_t)
+
+  AC_MSG_CHECKING([for ISO C99 support in ])
+  AC_TRY_COMPILE([#include ],
+	         [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ],
+	         [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [llabs(10);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [lldiv(10,1);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [atoll("10");],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [_Exit(0);],, [ac_c99_stdlib=no])
+  if test x"$ac_c99_lldiv_t" = x"no"; then
+    ac_c99_stdlib=no; 
+  fi; 
+  AC_MSG_RESULT($ac_c99_stdlib)
+
+  # Check for the existence of  functions used if C99 is enabled.
+  # XXX the wchar.h checks should be rolled into the general C99 bits.
+  ac_c99_wchar=yes;
+  AC_MSG_CHECKING([for additional ISO C99 support in ])
+  AC_TRY_COMPILE([#include ], 
+	         [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
+  AC_TRY_COMPILE([#include ], 
+	         [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
+  AC_TRY_COMPILE([#include ], 
+	         [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
+  AC_MSG_RESULT($ac_c99_wchar)
+
+  AC_MSG_CHECKING([for enabled ISO C99 support])
+  if test x"$ac_c99_math" = x"no" ||
+     test x"$ac_c99_stdio" = x"no" ||
+     test x"$ac_c99_stdlib" = x"no" ||
+     test x"$ac_c99_wchar" = x"no"; then
+    enable_c99=no; 
+  fi; 
+  AC_MSG_RESULT($enable_c99)
+
+  # Option parsed, now set things appropriately
+  if test x"$enable_c99" = x"yes"; then
+    AC_DEFINE(_GLIBCPP_USE_C99)
+  fi
+
+  AC_LANG_RESTORE
+])
+
+
+dnl
+dnl Check for template specializations for the 'long long' type extension.
+dnl The result determines only whether 'long long' I/O is enabled; things
+dnl like numeric_limits<> specializations are always available.
+dnl
+dnl GLIBCPP_ENABLE_LONG_LONG
+dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
+dnl --disable-long-long leaves _GLIBCPP_USE_LONG_LONG undefined
+dnl  +  Usage:  GLIBCPP_ENABLE_LONG_LONG[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If omitted, it
+dnl       defaults to `no'.
+dnl  +  If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
+dnl
+dnl GLIBCPP_ENABLE_LONG_LONG
+AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
+  define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
+
+  AC_ARG_ENABLE(long-long,
+  changequote(<<, >>)dnl
+  <<--enable-long-long      turns on 'long long' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
+  changequote([, ])dnl
+  [case "$enableval" in
+   yes) enable_long_long=yes ;;
+   no)  enable_long_long=no ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
+   esac],
+  enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
+
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  AC_MSG_CHECKING([for enabled long long I/O support])
+  # iostreams require strtoll, strtoull to compile
+  AC_TRY_COMPILE([#include ],
+                 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
+  AC_TRY_COMPILE([#include ],
+                 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
+
+  # Option parsed, now set things appropriately
+  if test x"$enable_long_long" = xyes; then
+    AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
+  fi
+  AC_MSG_RESULT($enable_long_long)
+
+  AC_LANG_RESTORE
+])
+
+
+dnl
+dnl Check for what kind of C headers to use.
+dnl
+dnl GLIBCPP_ENABLE_CHEADERS
+dnl --enable-cheaders= [does stuff].
+dnl --disable-cheaders [does not do anything, really].
+dnl  +  This will eventually need to be 'c_shadow' by default.
+dnl  +  Usage:  GLIBCPP_ENABLE_CHEADERS[(DEFAULT)]
+dnl       Where DEFAULT is either `c' or `c_std' or 'c_shadow'.  
+dnl       If ommitted, it defaults to `c_std'.
+AC_DEFUN(GLIBCPP_ENABLE_CHEADERS, [dnl
+define([GLIBCPP_ENABLE_CHEADERS_DEFAULT], ifelse($1, c_std, c_std, c_std))dnl
+AC_MSG_CHECKING([for c header strategy to use])
+AC_ARG_ENABLE(cheaders,
+changequote(<<, >>)dnl
+<<  --enable-cheaders       construct "C" header files for g++ [default=>>GLIBCPP_ENABLE_CHEADERS_DEFAULT],
+changequote([, ])
+  [case "$enableval" in
+   c) 
+        enable_cheaders=c 
+        ;;
+   c_std)  
+        enable_cheaders=c_std 
+        ;;
+   c_shadow)  
+        enable_cheaders=c_shadow 
+        ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable "C" headers]) 
+        ;;
+  esac],
+  enable_cheaders=GLIBCPP_ENABLE_CHEADERS_DEFAULT)
+  AC_MSG_RESULT($enable_cheaders)
+
+  dnl Option parsed, now set things appropriately
+  case "$enable_cheaders" in
+    c_shadow) 
+        CSHADOW_FLAGS="-fno-builtin"
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_shadow'
+        ;;
+    c_std)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std'
+        ;;
+    c)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c'
+        ;;
+  esac
+
+  AC_SUBST(CSHADOW_FLAGS)
+  AC_SUBST(C_INCLUDE_DIR)
+  AM_CONDITIONAL(GLIBCPP_C_HEADERS_C, test "$enable_cheaders" = c)
+  AM_CONDITIONAL(GLIBCPP_C_HEADERS_C_STD, test "$enable_cheaders" = c_std)
+])
+
+
+dnl
+dnl Check for wide character support.  Has the same effect as the option
+dnl in gcc's configure, but in a form that autoconf can mess with.
+dnl
+dnl GLIBCPP_ENABLE_C_MBCHAR
+dnl --enable-c-mbchar requests all the wchar_t stuff.
+dnl --disable-c-mbchar doesn't.
+dnl  +  Usage:  GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
+define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(c-mbchar,
+changequote(<<, >>)dnl
+<<  --enable-c-mbchar       enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_c_mbchar=yes ;;
+ no)  enable_c_mbchar=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
+ esac],
+enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
+dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
+])
+
+
+dnl
+dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
+dnl
+dnl TOPLEVEL_INCLUDES
+dnl LIBMATH_INCLUDES
+dnl LIBSUPCXX_INCLUDES
+dnl LIBIO_INCLUDES
+dnl CSHADOW_INCLUDES
+dnl
+dnl GLIBCPP_EXPORT_INCLUDES
+AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
+  # Root level of the build directory include sources.
+  GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
+
+  # Passed down for canadian crosses.
+  if test x"$CANADIAN" = xyes; then
+    TOPLEVEL_INCLUDES='-I$(includedir)'
+  fi
+
+  LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
+
+  LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
+
+  if test x"$need_libio" = xyes; then
+    LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
+    AC_SUBST(LIBIO_INCLUDES)
+  fi
+
+  # Now, export this to all the little Makefiles....
+  AC_SUBST(GLIBCPP_INCLUDES)
+  AC_SUBST(TOPLEVEL_INCLUDES)
+  AC_SUBST(LIBMATH_INCLUDES)
+  AC_SUBST(LIBSUPCXX_INCLUDES)
+])
+
+
+dnl
+dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
+dnl
+AC_DEFUN(GLIBCPP_EXPORT_FLAGS, [
+  # Optimization flags that are probably a good idea for thrill-seekers. Just
+  # uncomment the lines below and make, everything else is ready to go... 
+  # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc 
+  OPTIMIZE_CXXFLAGS=
+  AC_SUBST(OPTIMIZE_CXXFLAGS)
+
+  WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings -Winline'
+  AC_SUBST(WARN_FLAGS)
+])
+
+dnl
+dnl  GLIBCPP_EXPORT_INSTALL_INFO
+dnl  calculates gxx_install_dir
+dnl  exports glibcpp_toolexecdir
+dnl  exports glibcpp_toolexeclibdir
+dnl  exports glibcpp_prefixdir
+dnl
+dnl Assumes cross_compiling bits already done, and with_cross_host in
+dnl particular
+dnl
+dnl GLIBCPP_EXPORT_INSTALL_INFO
+AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
+# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
+# exported correctly in GLIBCPP_CONFIGURE.
+glibcpp_toolexecdir=no
+glibcpp_toolexeclibdir=no
+glibcpp_prefixdir=${prefix}
+
+AC_MSG_CHECKING([for interface version number])
+libstdcxx_interface=$INTERFACE
+AC_MSG_RESULT($libstdcxx_interface)
+
+# Process the option --with-gxx-include-dir=
+AC_MSG_CHECKING([for --with-gxx-include-dir])
+AC_ARG_WITH(gxx-include-dir,
+[  --with-gxx-include-dir  the installation directory for include files],
+[case "${withval}" in
+  yes)
+    AC_MSG_ERROR(Missing directory for --with-gxx-include-dir)
+    gxx_include_dir=no
+    ;;
+  no)
+    gxx_include_dir=no
+    ;;
+  *)
+    gxx_include_dir=${withval}
+    ;;
+esac], [gxx_include_dir=no])
+AC_MSG_RESULT($gxx_include_dir)
+
+# Process the option "--enable-version-specific-runtime-libs"
+AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+AC_ARG_ENABLE(version-specific-runtime-libs,
+[  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory ],
+[case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no)  version_specific_libs=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+version_specific_libs=no)dnl
+# Option set, now we can test it.
+AC_MSG_RESULT($version_specific_libs)
+
+if test $version_specific_libs = yes; then
+  # Need the gcc compiler version to know where to install libraries
+  # and header files if --enable-version-specific-runtime-libs option
+  # is selected.
+  changequote(,)dnl
+  gcc_version_trigger=${srcdir}/../gcc/version.c
+  gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+  gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+  if test x"$gxx_include_dir" = x"no"; then
+    gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++
+  fi
+  glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+  glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+  changequote([,])dnl
+fi
+
+# Default case for install directory for include files.
+if test $version_specific_libs = no &&
+   test $gxx_include_dir = no; then
+  gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface}
+fi
+
+# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
+# Install a library built with a cross compiler in tooldir, not libdir.
+if test x"$glibcpp_toolexecdir" = x"no"; then 
+  if test -n "$with_cross_host" &&
+     test x"$with_cross_host" != x"no"; then
+    glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
+    glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
+  else
+    glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+    glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
+  fi
+fi
+
+AC_MSG_CHECKING([for install location])
+AC_MSG_RESULT($gxx_include_dir)
+
+AC_SUBST(glibcpp_prefixdir)
+AC_SUBST(gxx_include_dir)
+AC_SUBST(glibcpp_toolexecdir)
+AC_SUBST(glibcpp_toolexeclibdir)
+])
+
+
+# Check for functions in math library.
+# Ulrich Drepper , 1998.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
+AC_DEFUN(AC_REPLACE_MATHFUNCS,
+[AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])])
+
+
+dnl This macro searches for a GNU version of make.  If a match is found, the
+dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
+dnl set to "#". This is useful for  including a special features in a Makefile,
+dnl which cannot be handled by other versions of make.  The variable
+dnl _cv_gnu_make_command is set to the command to invoke GNU make if it exists,
+dnl the empty string otherwise.
+dnl
+dnl Here is an example of its use:
+dnl
+dnl Makefile.in might contain:
+dnl
+dnl     # A failsafe way of putting a dependency rule into a makefile
+dnl     $(DEPEND):
+dnl             $(CC) -MM $(srcdir)/*.c > $(DEPEND)
+dnl
+dnl     @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
+dnl     @ifGNUmake@ include $(DEPEND)
+dnl     @ifGNUmake@ endif
+dnl
+dnl Then configure.in would normally contain:
+dnl
+dnl     CHECK_GNU_MAKE()
+dnl     AC_OUTPUT(Makefile)
+dnl
+dnl Then perhaps to cause gnu make to override any other make, we could do
+dnl something like this (note that GNU make always looks for GNUmakefile first):
+dnl
+dnl     if  ! test x$_cv_gnu_make_command = x ; then
+dnl             mv Makefile GNUmakefile
+dnl             echo .DEFAULT: > Makefile ;
+dnl             echo \  $_cv_gnu_make_command \$@ >> Makefile;
+dnl     fi
+dnl
+dnl Then, if any (well almost any) other make is called, and GNU make also
+dnl exists, then the other make wraps the GNU make.
+dnl
+dnl @author John Darrington 
+dnl @version 1.1 #### replaced Id string now that Id is for lib-v3; pme
+dnl
+dnl #### Changes for libstdc++-v3:  reformatting and linewrapping; prepending
+dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
+dnl #### conditional's subshell (" --version" is not a command), using a
+dnl #### different option to grep(1).
+dnl #### -pme
+dnl #### Fixed Bourne shell portability bug (use ${MAKE-make}, not
+dnl #### ${MAKE:-make}).
+dnl #### -msokolov
+AC_DEFUN(
+  GLIBCPP_CHECK_GNU_MAKE, [AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
+          _cv_gnu_make_command='' ;
+dnl Search all the common names for GNU make
+          for a in "${MAKE-make}" make gmake gnumake ; do
+                  if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
+                  then
+                          _cv_gnu_make_command=$a ;
+                          break;
+                  fi
+          done ;
+  ) ;
+dnl If there was a GNU version, then set @ifGNUmake@ to the empty
+dnl string, '#' otherwise
+  if test  "x$_cv_gnu_make_command" != "x"  ; then
+          ifGNUmake='' ;
+  else
+          ifGNUmake='#' ;
+  fi
+  AC_SUBST(ifGNUmake)
+])
+
+
+dnl Check for headers for, and arguments to, the setrlimit() function.
+dnl Used only in testsuite_hooks.h.
+AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT_ancilliary, [
+  AC_TRY_COMPILE([#include 
+                  #include 
+                 ], [ int f = RLIMIT_$1 ; ],
+                 [glibcpp_mresult=1], [glibcpp_mresult=0])
+  AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcpp_mresult,
+                     [Only used in build directory testsuite_hooks.h.])
+])
+AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT, [
+  setrlimit_have_headers=yes
+  AC_CHECK_HEADERS(sys/resource.h unistd.h,
+                   [],
+                   setrlimit_have_headers=no)
+  # If don't have the headers, then we can't run the tests now, and we
+  # won't be seeing any of these during testsuite compilation.
+  if test $setrlimit_have_headers = yes; then
+    # Can't do these in a loop, else the resulting syntax is wrong.
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(DATA)
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(RSS)
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(VMEM)
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(AS)
+
+    # Check for rlimit, setrlimit.
+    AC_CACHE_VAL(ac_setrlimit, [
+      AC_TRY_COMPILE([#include 
+		      #include 
+		     ], 
+                     [ struct rlimit r; setrlimit(0, &r);], 
+                     [ac_setrlimit=yes], [ac_setrlimit=no])
+    ])
+  fi
+
+  AC_MSG_CHECKING([for testsuite memory limit support])
+  if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
+    ac_mem_limits=yes
+    AC_DEFINE(_GLIBCPP_MEM_LIMITS)
+  else
+    ac_mem_limits=no
+  fi
+  AC_MSG_RESULT($ac_mem_limits)
+])
+
+
+dnl
+dnl Does any necessary configuration of the testsuite directory.  Generates
+dnl the testsuite_hooks.h header.
+dnl
+dnl GLIBCPP_CONFIGURE_TESTSUITE  [no args]
+AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
+  GLIBCPP_CHECK_SETRLIMIT
+
+  # Look for setenv, so that extended locale tests can be performed.
+  GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
+])
+
+
+sinclude(../libtool.m4)
+dnl The lines below arrange for aclocal not to bring an installed
+dnl libtool.m4 into aclocal.m4, while still arranging for automake to
+dnl add a definition of LIBTOOL to Makefile.in.
+ifelse(,,,[AC_SUBST(LIBTOOL)
+AC_DEFUN([AM_PROG_LIBTOOL])
+AC_DEFUN([AC_LIBTOOL_DLOPEN])
+AC_DEFUN([AC_PROG_LD])
+])
+
+
+# Check whether LC_MESSAGES is available in .
+# Ulrich Drepper , 1995.
+#
+# This file file be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AC_LC_MESSAGES, [
+  AC_CHECK_HEADER(locale.h, [
+    AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include ], [return LC_MESSAGES],
+       ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
+    if test $ac_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES)
+    fi
+  ])
+])
+
+
+dnl
+dnl Check for whether the Boost-derived checks should be turned on.
+dnl
+dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
+dnl --enable-concept-checks turns them on.
+dnl --disable-concept-checks leaves them off.
+dnl  +  Usage:  GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
+define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(concept-checks,
+changequote(<<, >>)dnl
+<<  --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_concept_checks=yes ;;
+ no)  enable_concept_checks=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
+ esac],
+enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
+dnl Option parsed, now set things appropriately
+if test x"$enable_concept_checks" = xyes; then
+  AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
+fi
+])
+
+
+dnl
+dnl Add version tags to symbols in shared library (or not), additionally
+dnl marking other symbols as private/local (or not).
+dnl
+dnl GLIBCPP_ENABLE_SYMVERS
+dnl --enable-symvers=style adds a version script to the linker call when
+dnl       creating the shared library.  The choice of version script is
+dnl       controlled by 'style'.
+dnl --disable-symvers does not.
+dnl  +  Usage:  GLIBCPP_ENABLE_SYMVERS[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.  Passing `yes' tries to choose a default style
+dnl       based on linker characteristics.  Passing 'no' disables versioning.
+AC_DEFUN(GLIBCPP_ENABLE_SYMVERS, [dnl
+define([GLIBCPP_ENABLE_SYMVERS_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(symvers,
+changequote(<<, >>)dnl
+<<  --enable-symvers=style  enables symbol versioning of the shared library [default=>>GLIBCPP_ENABLE_SYMVERS_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_symvers=yes ;;
+ no)  enable_symvers=no ;;
+ # other names here, just as sanity checks
+ #gnu|sun|etcetera) enable_symvers=$enableval ;;
+ gnu) enable_symvers=$enableval ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable symvers]) ;;
+ esac],
+enable_symvers=GLIBCPP_ENABLE_SYMVERS_DEFAULT)dnl
+
+# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
+# don't know enough about $LD to do tricks... 
+if test x$enable_shared = xno || 
+	test x$LD = x || 
+	test x$glibcpp_gnu_ld_version = x; then
+  enable_symvers=no
+fi
+
+# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
+AC_MSG_CHECKING([for shared libgcc])
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=' -lgcc_s'
+AC_TRY_LINK( , [return 0], glibcpp_shared_libgcc=yes, glibcpp_shared_libgcc=no)
+CFLAGS="$ac_save_CFLAGS"
+AC_MSG_RESULT($glibcpp_shared_libgcc)
+
+# For GNU ld, we need at least this version.  It's 2.12 in the same format
+# as the tested-for version.  See GLIBCPP_CHECK_LINKER_FEATURES for more.
+glibcpp_min_gnu_ld_version=21200
+
+# Check to see if unspecified "yes" value can win, given results
+# above.  
+if test $enable_symvers = yes ; then
+  if test $with_gnu_ld = yes &&
+    test $glibcpp_shared_libgcc = yes ;
+  then
+    if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then
+        enable_symvers=gnu
+    else
+      ac_test_CFLAGS="${CFLAGS+set}"
+      ac_save_CFLAGS="$CFLAGS"
+      CFLAGS='-shared -Wl,--version-script,conftest.map'
+      enable_symvers=no
+      changequote(,)
+      echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map
+      changequote([,])
+      AC_TRY_LINK([int foo;],, enable_symvers=gnu)
+      if test "$ac_test_CFLAGS" = set; then
+	CFLAGS="$ac_save_CFLAGS"
+      else
+	# this is the suspicious part
+	CFLAGS=''
+      fi
+      rm -f conftest.map
+    fi
+  else
+    # just fail for now
+    enable_symvers=no
+  fi
+fi
+
+dnl Everything parsed; figure out what file to use.
+case $enable_symvers in
+  no)
+      LINKER_MAP=config/linker-map.dummy
+      ;;
+  gnu)
+      LINKER_MAP=config/linker-map.gnu
+      ;;
+esac
+
+AC_LINK_FILES($LINKER_MAP, src/linker.map)
+AM_CONDITIONAL(GLIBCPP_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
+AC_MSG_CHECKING([versioning on shared library symbols])
+AC_MSG_RESULT($enable_symvers)
+])
+
diff --git a/contrib/libstdc++/aclocal.m4 b/contrib/libstdc++/aclocal.m4
new file mode 100644
index 0000000..7082d06
--- /dev/null
+++ b/contrib/libstdc++/aclocal.m4
@@ -0,0 +1,2898 @@
+dnl aclocal.m4 generated automatically by aclocal 1.4-p5
+
+dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl This program is distributed in the hope that it will be useful,
+dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+dnl PARTICULAR PURPOSE.
+
+dnl
+dnl Initialize configure bits.
+dnl
+dnl GLIBCPP_CONFIGURE
+AC_DEFUN(GLIBCPP_CONFIGURE, [
+  dnl Default to --enable-multilib
+  AC_ARG_ENABLE(multilib,
+  [  --enable-multilib       build hella library versions (default)],
+  [case "${enableval}" in
+    yes) multilib=yes ;;
+    no)  multilib=no ;;
+    *)   AC_MSG_ERROR(bad value ${enableval} for multilib option) ;;
+   esac], [multilib=yes])dnl
+
+  # When building with srcdir == objdir, links to the source files will
+  # be created in directories within the target_subdir.  We have to
+  # adjust toplevel_srcdir accordingly, so that configure finds
+  # install-sh and other auxiliary files that live in the top-level
+  # source directory.
+  if test "${srcdir}" = "."; then
+    if test -z "${with_target_subdir}"; then
+      toprel=".."
+    else
+      if test "${with_target_subdir}" != "."; then
+        toprel="${with_multisrctop}../.."
+      else
+        toprel="${with_multisrctop}.."
+      fi
+    fi
+  else
+    toprel=".."
+  fi
+  AC_CONFIG_AUX_DIR(${srcdir}/$toprel)
+  toplevel_srcdir=\${top_srcdir}/$toprel
+  AC_SUBST(toplevel_srcdir)
+
+  # Export build and source directories.
+  # These need to be absolute paths, yet at the same time need to
+  # canonicalize only relative paths, because then amd will not unmount
+  # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+  glibcpp_builddir=`pwd`
+  case $srcdir in
+  [\\/$]* | ?:[\\/]*) glibcpp_srcdir=${srcdir} ;;
+  *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+  esac
+  AC_SUBST(glibcpp_builddir)
+  AC_SUBST(glibcpp_srcdir)
+
+  dnl This is here just to satisfy automake.
+  ifelse(not,equal,[AC_CONFIG_AUX_DIR(..)])
+
+  AC_PROG_AWK
+  # Will set LN_S to either 'ln -s' or 'ln'.  With autoconf 2.5x, can also
+  # be 'cp -p' if linking isn't available.
+  #ac_cv_prog_LN_S='cp -p'
+  AC_PROG_LN_S
+
+  # We use these options to decide which functions to include.
+  AC_ARG_WITH(target-subdir,
+  [  --with-target-subdir=SUBDIR
+                          configuring in a subdirectory])
+  AC_ARG_WITH(cross-host,
+  [  --with-cross-host=HOST  configuring with a cross compiler])
+
+  glibcpp_basedir=$srcdir/$toprel/$1/libstdc++-v3
+  AC_SUBST(glibcpp_basedir)
+
+  # Never versions of autoconf add an underscore to these functions.
+  # Prevent future problems ...
+  ifdef([AC_PROG_CC_G],[],[define([AC_PROG_CC_G],defn([_AC_PROG_CC_G]))])
+  ifdef([AC_PROG_CC_GNU],[],[define([AC_PROG_CC_GNU],defn([_AC_PROG_CC_GNU]))])
+  ifdef([AC_PROG_CXX_G],[],[define([AC_PROG_CXX_G],defn([_AC_PROG_CXX_G]))])
+  ifdef([AC_PROG_CXX_GNU],[],[define([AC_PROG_CXX_GNU],defn([_AC_PROG_CXX_GNU]))])
+
+  # AC_PROG_CC
+  # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
+  # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
+  # are probably using a cross compiler, which will not be able to fully
+  # link an executable.  This is addressed in later versions of autoconf.
+
+  AC_DEFUN(LIB_AC_PROG_CC,
+  [AC_BEFORE([$0], [AC_PROG_CPP])dnl
+  dnl Fool anybody using AC_PROG_CC.
+  AC_PROVIDE([AC_PROG_CC])
+  AC_CHECK_PROG(CC, gcc, gcc)
+  if test -z "$CC"; then
+    AC_CHECK_PROG(CC, cc, cc, , , /usr/ucb/cc)
+    test -z "$CC" && AC_MSG_ERROR([no acceptable cc found in \$PATH])
+  fi
+
+  AC_PROG_CC_GNU
+
+  if test $ac_cv_prog_gcc = yes; then
+    GCC=yes
+  dnl Check whether -g works, even if CFLAGS is set, in case the package
+  dnl plays around with CFLAGS (such as to build both debugging and
+  dnl normal versions of a library), tasteless as that idea is.
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS=
+    AC_PROG_CC_G
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    elif test $ac_cv_prog_cc_g = yes; then
+      CFLAGS="-g -O2"
+    else
+      CFLAGS="-O2"
+    fi
+  else
+    GCC=
+    test "${CFLAGS+set}" = set || CFLAGS="-g"
+  fi
+  ])
+
+  LIB_AC_PROG_CC
+
+  # Likewise for AC_PROG_CXX.  We can't just call it directly because g++
+  # will try to link in libstdc++.
+  AC_DEFUN(LIB_AC_PROG_CXX,
+  [AC_BEFORE([$0], [AC_PROG_CXXCPP])dnl
+  dnl Fool anybody using AC_PROG_CXX.
+  AC_PROVIDE([AC_PROG_CXX])
+  # Use glibcpp_CXX so that we do not cause CXX to be cached with the
+  # flags that come in CXX while configuring libstdc++.  They're different
+  # from those used for all other target libraries.  If CXX is set in
+  # the environment, respect that here.
+  glibcpp_CXX=$CXX
+  AC_CHECK_PROGS(glibcpp_CXX, $CCC c++ g++ gcc CC cxx cc++, gcc)
+  AC_SUBST(glibcpp_CXX)
+  CXX=$glibcpp_CXX
+  test -z "$glibcpp_CXX" && AC_MSG_ERROR([no acceptable c++ found in \$PATH])
+
+  AC_PROG_CXX_GNU
+
+  if test $ac_cv_prog_gxx = yes; then
+    GXX=yes
+    dnl Check whether -g works, even if CXXFLAGS is set, in case the package
+    dnl plays around with CXXFLAGS (such as to build both debugging and
+    dnl normal versions of a library), tasteless as that idea is.
+    ac_test_CXXFLAGS="${CXXFLAGS+set}"
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=
+    AC_PROG_CXX_G
+    if test "$ac_test_CXXFLAGS" = set; then
+      CXXFLAGS="$ac_save_CXXFLAGS"
+    elif test $ac_cv_prog_cxx_g = yes; then
+      CXXFLAGS="-g -O2"
+    else
+      CXXFLAGS="-O2"
+    fi
+  else
+    GXX=
+    test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+  fi
+  ])
+
+  LIB_AC_PROG_CXX
+
+  # For some reason, gettext needs this.
+  AC_ISC_POSIX
+
+  AC_CHECK_TOOL(AS, as)
+  AC_CHECK_TOOL(AR, ar)
+  AC_CHECK_TOOL(RANLIB, ranlib, ranlib-not-found-in-path-error)
+  AC_PROG_INSTALL
+
+  AM_MAINTAINER_MODE
+
+  # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
+  # at least currently, we never actually build a program, so we never
+  # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
+  # fails, because we are probably configuring with a cross compiler
+  # which can't create executables.  So we include AC_EXEEXT to keep
+  # automake happy, but we don't execute it, since we don't care about
+  # the result.
+  if false; then
+    # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+    # to nothing, so nothing would remain between `then' and `fi' if it
+    # were not for the `:' below.
+    :
+    AC_EXEEXT
+  fi
+
+  . [$]{glibcpp_basedir}/configure.host
+
+  case [$]{glibcpp_basedir} in
+    /* | [A-Za-z]:[\\/]*) libgcj_flagbasedir=[$]{glibcpp_basedir} ;;
+    *) glibcpp_flagbasedir='[$](top_builddir)/'[$]{glibcpp_basedir} ;;
+  esac
+
+  # This does for the target what configure.host does for the host.  In
+  # addition to possibly modifying the same flags, it also sets up symlinks.
+  GLIBCPP_CHECK_TARGET
+
+])
+
+
+dnl
+dnl Check to see if g++ can compile this library, and if so, if any version-
+dnl specific precautions need to be taken. 
+dnl 
+dnl GLIBCPP_CHECK_COMPILER_VERSION
+AC_DEFUN(GLIBCPP_CHECK_COMPILER_VERSION, [
+if test ! -f stamp-sanity-compiler; then
+  AC_MSG_CHECKING([for g++ that will successfully compile libstdc++-v3])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_TRY_COMPILE(, [
+  #if __GNUC__ < 3
+    not_ok
+  #endif
+  ], gpp_satisfactory=yes, AC_MSG_ERROR([please upgrade to GCC 3.0 or above]))
+  AC_LANG_RESTORE
+  AC_MSG_RESULT($gpp_satisfactory)
+  touch stamp-sanity-compiler
+fi
+])
+
+
+dnl
+dnl Tests for newer compiler features, or features that are present in newer
+dnl compiler versions but not older compiler versions still in use, should
+dnl be placed here.
+dnl
+dnl Define WERROR='-Werror' if requested and possible; g++'s that lack the
+dnl new inlining code or the new system_header pragma will die on -Werror.
+dnl Leave it out by default and use maint-mode to use it.
+dnl
+dnl Define SECTION_FLAGS='-ffunction-sections -fdata-sections' if
+dnl compiler supports it and the user has not requested debug mode.
+dnl
+dnl GLIBCPP_CHECK_COMPILER_FEATURES
+AC_DEFUN(GLIBCPP_CHECK_COMPILER_FEATURES, [
+  # All these tests are for C++; save the language and the compiler flags.
+  # The CXXFLAGS thing is suspicious, but based on similar bits previously
+  # found in GLIBCPP_CONFIGURE.
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+
+  # Check for maintainer-mode bits.
+  if test x"$USE_MAINTAINER_MODE" = xno; then
+    WERROR=''
+  else
+    WERROR='-Werror'
+  fi
+
+  # Check for -ffunction-sections -fdata-sections
+  AC_MSG_CHECKING([for g++ that supports -ffunction-sections -fdata-sections])
+  CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
+  AC_TRY_COMPILE(, [int foo;
+  ], [ac_fdsections=yes], [ac_fdsections=no])
+  if test "$ac_test_CXXFLAGS" = set; then
+    CXXFLAGS="$ac_save_CXXFLAGS"
+  else
+    # this is the suspicious part
+    CXXFLAGS=''
+  fi
+  if test x"$ac_fdsections" = x"yes" &&
+     test x"$enable_debug" = x"no"; then
+    SECTION_FLAGS='-ffunction-sections -fdata-sections'
+  fi
+  AC_MSG_RESULT($ac_fdsections)
+
+  AC_LANG_RESTORE
+  AC_SUBST(WERROR)
+  AC_SUBST(SECTION_FLAGS)
+])
+
+
+dnl
+dnl If GNU ld is in use, check to see if tricky linker opts can be used.  If
+dnl the native linker is in use, all variables will be defined to something
+dnl safe (like an empty string).
+dnl
+dnl Define SECTION_LDFLAGS='-Wl,--gc-sections' if possible.
+dnl Define OPT_LDFLAGS='-Wl,-O1' if possible.
+dnl Define LD, with_gnu_ld, and (possibly) glibcpp_gnu_ld_version as
+dnl side-effects of testing.
+dnl
+dnl GLIBCPP_CHECK_LINKER_FEATURES
+AC_DEFUN(GLIBCPP_CHECK_LINKER_FEATURES, [
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  AC_REQUIRE([AC_PROG_LD])
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  changequote(,)
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  changequote([,])
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) [$]3=0; print ([$]1*100+[$]2)*100+[$]3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    AC_MSG_CHECKING([for ld that supports -Wl,--gc-sections])
+    AC_TRY_RUN([
+     int main(void) 
+     {
+       try { throw 1; }
+       catch (...) { };
+       return 0;
+     }
+    ], [ac_sectionLDflags=yes],[ac_sectionLDflags=no], [ac_sectionLDflags=yes])
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    AC_MSG_RESULT($ac_sectionLDflags)
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  AC_SUBST(SECTION_LDFLAGS)
+  AC_SUBST(OPT_LDFLAGS)
+])
+
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_1
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_1, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include 
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     ], 
+                     [ $1(0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl 3) if not, see if 1) and 2) for argument prepended with '_'
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, [
+  GLIBCPP_CHECK_MATH_DECL_1($1)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  else
+    GLIBCPP_CHECK_MATH_DECL_1(_$1)
+    if test x$glibcpp_cv_func__$1_use = x"yes"; then
+      AC_CHECK_FUNCS(_$1)    
+    fi
+  fi
+])
+
+
+dnl
+dnl Like GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1, but does a bunch of
+dnl of functions at once.  It's an all-or-nothing check -- either 
+dnl HAVE_XYZ is defined for each of the functions, or for none of them.
+dnl Doing it this way saves significant configure time.
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1, [
+  AC_MSG_CHECKING([for $1 functions])
+  AC_CACHE_VAL(glibcpp_cv_func_$2_use, [
+    AC_LANG_SAVE
+    AC_LANG_CPLUSPLUS
+    AC_TRY_COMPILE([#include ],
+                   [ `for x in $3; do echo "$x (0);"; done` ],
+                   [glibcpp_cv_func_$2_use=yes],
+                   [glibcpp_cv_func_$2_use=no])
+    AC_LANG_RESTORE])
+  AC_MSG_RESULT($glibcpp_cv_func_$2_use)
+  if test x$glibcpp_cv_func_$2_use = x"yes"; then
+    AC_CHECK_FUNCS($3)
+  fi
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_2
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_2, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2, [
+  GLIBCPP_CHECK_MATH_DECL_2($1)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  else
+    GLIBCPP_CHECK_MATH_DECL_2(_$1)
+    if test x$glibcpp_cv_func__$1_use = x"yes"; then
+      AC_CHECK_FUNCS(_$1)    
+    fi
+  fi
+])
+
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl declared when using the c++ compiler
+dnl ASSUMES argument is a math function with THREE parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_3
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_3, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+])
+
+dnl
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with THREE parameters
+dnl
+dnl GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3
+AC_DEFUN(GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3, [
+  GLIBCPP_CHECK_MATH_DECL_3($1)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  else
+    GLIBCPP_CHECK_MATH_DECL_3(_$1)
+    if test x$glibcpp_cv_func__$1_use = x"yes"; then
+      AC_CHECK_FUNCS(_$1)    
+    fi
+  fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with TWO parameters
+dnl
+dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2
+AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  fi
+])
+
+
+dnl
+dnl Check to see if the (stdlib function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a function with THREE parameters
+dnl
+dnl GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3
+AC_DEFUN(GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0, 0, 0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_CHECK_FUNCS($1)    
+  fi
+])
+
+
+dnl
+dnl Because the builtins are picky picky picky about the arguments they take, 
+dnl do an explict linkage tests here.
+dnl Check to see if the (math function) argument passed is
+dnl 1) declared when using the c++ compiler
+dnl 2) has "C" linkage
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is declared and links
+dnl
+dnl argument 1 is name of function to check
+dnl
+dnl ASSUMES argument is a math function with ONE parameter
+dnl
+dnl GLIBCPP_CHECK_BUILTIN_MATH_DECL_LINKAGE_1
+AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1, [
+  AC_MSG_CHECKING([for $1 declaration])
+  if test x${glibcpp_cv_func_$1_use+set} != xset; then
+    AC_CACHE_VAL(glibcpp_cv_func_$1_use, [
+      AC_LANG_SAVE
+      AC_LANG_CPLUSPLUS
+      AC_TRY_COMPILE([#include ], 
+                     [ $1(0);], 
+                     [glibcpp_cv_func_$1_use=yes], [glibcpp_cv_func_$1_use=no])
+      AC_LANG_RESTORE
+    ])
+  fi
+  AC_MSG_RESULT($glibcpp_cv_func_$1_use)
+  if test x$glibcpp_cv_func_$1_use = x"yes"; then
+    AC_MSG_CHECKING([for $1 linkage])
+    if test x${glibcpp_cv_func_$1_link+set} != xset; then
+      AC_CACHE_VAL(glibcpp_cv_func_$1_link, [
+        AC_TRY_LINK([#include ], 
+                    [ $1(0);], 
+                    [glibcpp_cv_func_$1_link=yes], [glibcpp_cv_func_$1_link=no])
+      ])
+    fi
+    AC_MSG_RESULT($glibcpp_cv_func_$1_link)
+    if test x$glibcpp_cv_func_$1_link = x"yes"; then
+      ac_tr_func=HAVE_`echo $1 | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      AC_DEFINE_UNQUOTED(${ac_tr_func})
+    fi
+  fi
+])
+
+
+dnl
+dnl Check to see what builtin math functions are supported
+dnl
+dnl check for __builtin_abs
+dnl check for __builtin_fabsf
+dnl check for __builtin_fabs
+dnl check for __builtin_fabl
+dnl check for __builtin_labs
+dnl check for __builtin_sqrtf
+dnl check for __builtin_sqrtl
+dnl check for __builtin_sqrt
+dnl check for __builtin_sinf
+dnl check for __builtin_sin
+dnl check for __builtin_sinl
+dnl check for __builtin_cosf
+dnl check for __builtin_cos
+dnl check for __builtin_cosl
+dnl
+dnl GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT, [
+  dnl Test for builtin math functions.
+  dnl These are made in gcc/c-common.c 
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_abs)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabs)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_fabsl)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_labs)
+
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrt)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sqrtl)
+
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sin)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_sinl)
+
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosf)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cos)
+  GLIBCPP_CHECK_BUILTIN_MATH_DECL_AND_LINKAGE_1(__builtin_cosl)
+
+  dnl There is, without a doubt, a more elegant way to have these
+  dnl names exported so that they won't be stripped out of acconfig.h by
+  dnl autoheader. I leave this as an exercise to somebody less frustrated
+  dnl than I.... please email the libstdc++ list if you can figure out a
+  dnl more elegant approach (see autoconf/acgen.m4 and specifically
+  dnl AC_CHECK_FUNC for things to steal.)
+  dummyvar=no
+  if test x$dummyvar = x"yes"; then
+    AC_DEFINE(HAVE___BUILTIN_ABS)
+    AC_DEFINE(HAVE___BUILTIN_LABS)
+    AC_DEFINE(HAVE___BUILTIN_COS)
+    AC_DEFINE(HAVE___BUILTIN_COSF)
+    AC_DEFINE(HAVE___BUILTIN_COSL)
+    AC_DEFINE(HAVE___BUILTIN_FABS)
+    AC_DEFINE(HAVE___BUILTIN_FABSF)
+    AC_DEFINE(HAVE___BUILTIN_FABSL)
+    AC_DEFINE(HAVE___BUILTIN_SIN)
+    AC_DEFINE(HAVE___BUILTIN_SINF)
+    AC_DEFINE(HAVE___BUILTIN_SINL)
+    AC_DEFINE(HAVE___BUILTIN_SQRT)
+    AC_DEFINE(HAVE___BUILTIN_SQRTF)
+    AC_DEFINE(HAVE___BUILTIN_SQRTL)
+  fi
+])
+
+
+dnl
+dnl Check to see what the underlying c library 
+dnl These checks need to do two things: 
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_STRTOLD if "strtold" is declared and links
+dnl Define HAVE_STRTOF if "strtof" is declared and links
+dnl Define HAVE_DRAND48 if "drand48" is declared and links
+dnl
+dnl GLIBCPP_CHECK_STDLIB_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_STDLIB_SUPPORT, [
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+  GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtold)
+  GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_2(strtof)
+  AC_CHECK_FUNCS(drand48)
+
+  CXXFLAGS="$ac_save_CXXFLAGS"
+])
+
+
+dnl
+dnl Check to see what the underlying c library or math library is like.
+dnl These checks need to do two things: 
+dnl 1) make sure the name is declared when using the c++ compiler
+dnl 2) make sure the name has "C" linkage
+dnl This might seem like overkill but experience has shown that it's not...
+dnl
+dnl Define HAVE_CARGF etc if "cargf" is found.
+dnl
+dnl GLIBCPP_CHECK_MATH_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_MATH_SUPPORT, [
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+  dnl Check libm
+  AC_CHECK_LIB(m, sin, libm="-lm")
+  ac_save_LIBS="$LIBS"
+  LIBS="$LIBS $libm"
+
+  dnl Check to see if certain C math functions exist.
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnan)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finite)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysign)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincos)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fpclass)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(qfpclass)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypot)
+
+  dnl Check to see if basic C math functions have float versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float trig,
+                                          float_trig,
+                                          acosf asinf atanf \
+                                          cosf sinf tanf \
+                                          coshf sinhf tanhf)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(float round,
+                                          float_round,
+                                          ceilf floorf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinff)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2f)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10f)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modff)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosf)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitef)
+
+  dnl Check to see if basic C math functions have long double versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double trig,
+                                          long_double_trig,
+                                          acosl asinl atanl \
+                                          cosl sinl tanl \
+                                          coshl sinhl tanhl)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(long double round,
+                                          long_double_round,
+                                          ceill floorl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isnanl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(isinfl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(copysignl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(atan2l)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(expl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(fabsl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(fmodl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(frexpl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(hypotl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(ldexpl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(logl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(log10l)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(modfl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_2(powl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(sqrtl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_3(sincosl)
+  GLIBCPP_CHECK_MATH_DECL_AND_LINKAGE_1(finitel)
+
+  dnl Some runtimes have these functions with a preceding underscore. Please
+  dnl keep this sync'd with the one above. And if you add any new symbol,
+  dnl please add the corresponding block in the @BOTTOM@ section of acconfig.h.
+  dnl Check to see if certain C math functions exist.
+
+  dnl Check to see if basic C math functions have float versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float trig,
+                                          _float_trig,
+                                          _acosf _asinf _atanf \
+                                          _cosf _sinf _tanf \
+                                          _coshf _sinhf _tanhf)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_float round,
+                                          _float_round,
+                                          _ceilf _floorf)
+
+  dnl Check to see if basic C math functions have long double versions.
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double trig,
+                                          _long_double_trig,
+                                          _acosl _asinl _atanl \
+                                          _cosl _sinl _tanl \
+                                          _coshl _sinhl _tanhl)
+  GLIBCPP_CHECK_MATH_DECLS_AND_LINKAGES_1(_long double round,
+                                          _long_double_round,
+                                          _ceill _floorl)
+
+  LIBS="$ac_save_LIBS"
+  CXXFLAGS="$ac_save_CXXFLAGS"
+])
+
+
+dnl
+dnl Check to see if there is native support for complex 
+dnl
+dnl Don't compile bits in math/* if native support exits.
+dnl
+dnl Define USE_COMPLEX_LONG_DOUBLE etc if "copysignl" is found.
+dnl
+dnl GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT, [
+  dnl Check for complex versions of math functions of platform.
+  AC_CHECK_LIB(m, main)
+  AC_REPLACE_MATHFUNCS(nan copysignf)
+
+  dnl For __signbit to signbit conversions.
+  AC_CHECK_FUNCS([__signbit], , [LIBMATHOBJS="$LIBMATHOBJS signbit.lo"])
+  AC_CHECK_FUNCS([__signbitf], , [LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"])
+
+  dnl Compile the long double complex functions only if the function 
+  dnl provides the non-complex long double functions that are needed.
+  dnl Currently this includes copysignl, which should be
+  dnl cached from the GLIBCPP_CHECK_MATH_SUPPORT macro, above.
+  if test x$ac_cv_func_copysignl = x"yes"; then
+    AC_CHECK_FUNCS([__signbitl], , [LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"])
+  fi
+
+  AC_SUBST(LIBMATHOBJS)
+])
+
+
+dnl Check to see what architecture and operating system we are compiling
+dnl for.  Also, if architecture- or OS-specific flags are required for
+dnl compilation, pick them up here.
+dnl 
+dnl GLIBCPP_CHECK_TARGET
+AC_DEFUN(GLIBCPP_CHECK_TARGET, [
+    . [$]{glibcpp_basedir}/configure.target
+    AC_MSG_RESULT(CPU config directory is $cpu_include_dir)
+    AC_MSG_RESULT(OS config directory is $os_include_dir)
+])
+
+
+dnl
+dnl Check to see if this target can enable the wchar_t parts of libstdc++.
+dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled.  (This
+dnl must have been previously checked.)
+dnl
+dnl Define _GLIBCPP_USE_WCHAR_T if all the bits are found 
+dnl Define HAVE_MBSTATE_T if mbstate_t is not in wchar.h
+dnl
+dnl GLIBCPP_CHECK_WCHAR_T_SUPPORT
+AC_DEFUN(GLIBCPP_CHECK_WCHAR_T_SUPPORT, [
+
+  dnl Test wchar.h for mbstate_t, which is needed for char_traits and
+  dnl others even if wchar_t support is not on.
+  AC_MSG_CHECKING([for mbstate_t])
+  AC_TRY_COMPILE([#include ],
+  [mbstate_t teststate;], 
+  have_mbstate_t=yes, have_mbstate_t=no)
+  AC_MSG_RESULT($have_mbstate_t)
+  if test x"$have_mbstate_t" = xyes; then
+    AC_DEFINE(HAVE_MBSTATE_T)
+  fi
+
+  dnl Sanity check for existence of ISO C99 headers for extended encoding.
+  AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no)
+  AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no)
+  
+  dnl Only continue checking if the ISO C99 headers exist and support is on.
+  if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+    dnl Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before
+    dnl numeric_limits can instantiate type_traits
+    AC_MSG_CHECKING([for WCHAR_MIN and WCHAR_MAX])
+    AC_TRY_COMPILE([#include ],
+    [int i = WCHAR_MIN; int j = WCHAR_MAX;], 
+    has_wchar_minmax=yes, has_wchar_minmax=no)
+    AC_MSG_RESULT($has_wchar_minmax)
+    
+    dnl Test wchar.h for WEOF, which is what we use to determine whether
+    dnl to specialize for char_traits or not.
+    AC_MSG_CHECKING([for WEOF])
+    AC_TRY_COMPILE([
+      #include 
+      #include ],
+    [wint_t i = WEOF;],
+    has_weof=yes, has_weof=no)
+    AC_MSG_RESULT($has_weof)
+  
+    dnl Tests for wide character functions used in char_traits.
+    ac_wfuncs=yes
+    AC_CHECK_FUNCS(wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset,, \
+    ac_wfuncs=no)
+  
+    dnl Checks for names injected into std:: by the c_std headers.
+    AC_CHECK_FUNCS(btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr,, \
+    ac_wfuncs=no)
+
+    AC_MSG_CHECKING([for ISO C99 wchar_t support])
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    AC_MSG_RESULT($ac_isoC99_wchar_t)
+  
+    dnl Use iconv for wchar_t to char conversions. As such, check for 
+    dnl X/Open Portability Guide, version 2 features (XPG2).
+    AC_CHECK_HEADER(iconv.h, ac_has_iconv_h=yes, ac_has_iconv_h=no)
+    AC_CHECK_HEADER(langinfo.h, ac_has_langinfo_h=yes, ac_has_langinfo_h=no)
+
+    dnl Check for existence of libiconv.a providing XPG2 wchar_t support.
+    AC_CHECK_LIB(iconv, iconv, libiconv="-liconv")
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    AC_CHECK_FUNCS(iconv_open iconv_close iconv nl_langinfo, \
+    ac_XPG2funcs=yes, ac_XPG2funcs=no)
+  
+    LIBS="$ac_save_LIBS"
+
+    AC_MSG_CHECKING([for XPG2 wchar_t support])
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    AC_MSG_RESULT($ac_XPG2_wchar_t)
+  
+    dnl At the moment, only enable wchar_t specializations if all the
+    dnl above support is present.
+    AC_MSG_CHECKING([for enabled wchar_t specializations])
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      AC_DEFINE(_GLIBCPP_USE_WCHAR_T)
+      AC_MSG_RESULT("yes")
+    else
+      AC_MSG_RESULT("no")
+    fi
+  else
+    dnl Wide characters disabled by the user. 
+    AC_MSG_WARN([wchar_t support disabled.])
+  fi
+])
+
+
+dnl
+dnl Check for special debugging mode; not for production use.
+dnl
+dnl GLIBCPP_ENABLE_DEBUG
+dnl --enable-debug sets '-ggdb3 -O0'.
+dnl --disable-debug sets '-g' and whatever optimization options the
+dnl     compiler can handle.
+dnl  +  --enable-maintainer-mode automatically defaults this to on.
+dnl  +  Perhaps -D/-U of NDEBUG, DEBUG, DEBUG_ASSERT, ...?
+dnl  +  Usage:  GLIBCPP_ENABLE_DEBUG[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_DEBUG, [dnl
+define([GLIBCPP_ENABLE_DEBUG_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(debug,
+changequote(<<, >>)dnl
+<<  --enable-debug          extra debugging, turn off optimization [default=>>GLIBCPP_ENABLE_DEBUG_DEFAULT],
+changequote([, ])dnl
+[case "${enableval}" in
+ yes) enable_debug=yes ;;
+ no)  enable_debug=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable extra debugging]) ;;
+ esac],
+enable_debug=GLIBCPP_ENABLE_DEBUG_DEFAULT)dnl
+
+dnl Option parsed, now set things appropriately
+case "${enable_debug}" in
+    yes) 
+        DEBUG_FLAGS='-O0 -ggdb3'                        
+        ;; 
+    no)   
+        DEBUG_FLAGS='-g'
+        ;;
+esac
+AC_SUBST(DEBUG_FLAGS)
+])
+
+
+dnl
+dnl Check for "unusual" flags to pass to the compiler while building.
+dnl
+dnl GLIBCPP_ENABLE_CXX_FLAGS
+dnl --enable-cxx-flags='-foo -bar -baz' is a general method for passing
+dnl     experimental flags such as -fhonor-std, -fsquangle, -Dfloat=char, etc.
+dnl     Somehow this same set of flags must be passed when [re]building
+dnl     libgcc.
+dnl --disable-cxx-flags passes nothing.
+dnl  +  See http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00131.html
+dnl         http://gcc.gnu.org/ml/libstdc++/2000-q2/msg00284.html
+dnl         http://gcc.gnu.org/ml/libstdc++/2000-q1/msg00035.html
+dnl  +  Usage:  GLIBCPP_ENABLE_CXX_FLAGS(default flags)
+dnl       If "default flags" is an empty string (or "none"), the effect is
+dnl       the same as --disable or --enable=no.
+AC_DEFUN(GLIBCPP_ENABLE_CXX_FLAGS, [dnl
+define([GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT], ifelse($1,,, $1))dnl
+AC_ARG_ENABLE(cxx-flags,
+changequote(<<, >>)dnl
+<<  --enable-cxx-flags=FLAGS      pass compiler FLAGS when building library;
+                                [default=>>GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT],
+changequote([, ])dnl
+[case "x$enableval" in
+ xyes)   
+        AC_MSG_ERROR([--enable-cxx-flags needs compiler flags as arguments]) ;;
+ xno|x)  
+        enable_cxx_flags='' ;;
+ *)      
+        enable_cxx_flags="$enableval" ;;
+ esac],
+enable_cxx_flags='GLIBCPP_ENABLE_CXX_FLAGS_DEFAULT')
+
+dnl Thinko on my part during design.  This kludge is the workaround.
+if test "$enable_cxx_flags" = "none"; then 
+  enable_cxx_flags=''; 
+fi
+
+dnl Run through flags (either default or command-line) and set anything
+dnl extra (e.g., #defines) that must accompany particular g++ options.
+if test -n "$enable_cxx_flags"; then
+    for f in $enable_cxx_flags; do
+        case "$f" in
+            -fhonor-std)  ;;
+            -*)  ;;
+            *)   # and we're trying to pass /what/ exactly?
+                 AC_MSG_ERROR([compiler flags start with a -]) ;;
+        esac
+    done
+fi
+EXTRA_CXX_FLAGS="$enable_cxx_flags"
+AC_SUBST(EXTRA_CXX_FLAGS)
+])
+
+
+dnl
+dnl Check for which locale library to use:  gnu or generic.
+dnl
+dnl GLIBCPP_ENABLE_CLOCALE
+dnl --enable-clocale=gnu sets config/locale/c_locale_gnu.cc and friends
+dnl --enable-clocale=generic sets config/locale/c_locale_generic.cc and friends
+dnl 
+dnl default is generic
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_CLOCALE, [
+  AC_MSG_CHECKING([for clocale to use])
+  AC_ARG_ENABLE(clocale,
+  [  --enable-clocale        enable model for target locale package. 
+  --enable-clocale=MODEL  use MODEL target-speific locale package. [default=generic]
+  ], 
+  if test x$enable_clocale = xno; then
+     enable_clocale=no
+  fi,
+     enable_clocale=no)
+
+  enable_clocale_flag=$enable_clocale
+
+  dnl Probe for locale support if no specific model is specified.
+  dnl Default to "generic"
+  if test x$enable_clocale_flag = xno; then
+    case x${target_os} in
+      xlinux* | xgnu*)
+	AC_EGREP_CPP([_GLIBCPP_ok], [
+        #include 
+        #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 
+          _GLIBCPP_ok
+        #endif
+        ], enable_clocale_flag=gnu, enable_clocale_flag=generic)
+
+	# Test for bugs early in glibc-2.2.x series
+  	if test x$enable_clocale_flag = xgnu; then
+    	  AC_TRY_RUN([
+	  #define _GNU_SOURCE 1
+	  #include 
+	  int main()
+	  {
+  	    const char __one[] = "Äuglein Augmen";
+  	    const char __two[] = "Äuglein";
+  	    int i;
+  	    int j;
+  	    __locale_t	loc;
+   	    __locale_t	loc_dup;
+  	    loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+  	    loc_dup = __duplocale(loc);
+  	    i = __strcoll_l(__one, __two, loc);
+  	    j = __strcoll_l(__one, __two, loc_dup);
+  	    return 0;
+	  }
+	  ], 
+	  [enable_clocale_flag=gnu],[enable_clocale_flag=generic],
+	  [enable_clocale_flag=generic])
+  	fi
+
+	# ... at some point put __strxfrm_l tests in as well.
+        ;;
+      *)
+	enable_clocale_flag=generic
+	;;
+    esac
+  fi
+
+  dnl Deal with gettext issues.
+  AC_ARG_ENABLE(nls,
+  [  --enable-nls            use Native Language Support (default)],
+  , enable_nls=yes)
+  USE_NLS=no
+
+  dnl Set configure bits for specified locale package
+  case x${enable_clocale_flag} in
+    xgeneric)
+      AC_MSG_RESULT(generic)
+
+      CLOCALE_H=config/locale/generic/c_locale.h
+      CLOCALE_CC=config/locale/generic/c_locale.cc
+      CCODECVT_H=config/locale/generic/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/generic/ctype_members.cc
+      CMESSAGES_H=config/locale/generic/messages_members.h
+      CMESSAGES_CC=config/locale/generic/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_CC=config/locale/generic/time_members.cc
+      ;;
+    xgnu)
+      AC_MSG_RESULT(gnu)
+
+      # Declare intention to use gettext, and add support for specific
+      # languages.
+      # For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT
+      ALL_LINGUAS="de fr"
+
+      # Don't call AM_GNU_GETTEXT here. Instead, assume glibc.
+      AC_CHECK_PROG(check_msgfmt, msgfmt, yes, no)
+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
+	USE_NLS=yes
+      fi
+
+      # Export the build objects.
+      for ling in $ALL_LINGUAS; do \
+        glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
+        glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+      done
+      AC_SUBST(glibcpp_MOFILES)
+      AC_SUBST(glibcpp_POFILES)
+
+      CLOCALE_H=config/locale/gnu/c_locale.h
+      CLOCALE_CC=config/locale/gnu/c_locale.cc
+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/gnu/collate_members.cc
+      CCTYPE_CC=config/locale/gnu/ctype_members.cc
+      CMESSAGES_H=config/locale/gnu/messages_members.h
+      CMESSAGES_CC=config/locale/gnu/messages_members.cc
+      CMONEY_CC=config/locale/gnu/monetary_members.cc
+      CNUMERIC_CC=config/locale/gnu/numeric_members.cc
+      CTIME_CC=config/locale/gnu/time_members.cc
+      ;;
+    xieee_1003.1-2001)
+      AC_MSG_RESULT(generic)
+
+      CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
+      CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/generic/ctype_members.cc
+      CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
+      CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_CC=config/locale/generic/time_members.cc
+      ;;
+    *)
+      echo "$enable_clocale is an unknown locale package" 1>&2
+      exit 1
+      ;;
+  esac
+
+  # This is where the testsuite looks for locale catalogs, using the
+  # -DLOCALEDIR define during testsuite compilation.
+  glibcpp_localedir=${glibcpp_builddir}/po/share/locale
+  AC_SUBST(glibcpp_localedir)
+
+  AC_SUBST(USE_NLS)
+  AC_SUBST(CLOCALE_H)
+  AC_SUBST(CCODECVT_H)
+  AC_SUBST(CMESSAGES_H)
+  AC_LINK_FILES($CLOCALE_CC, src/c++locale.cc)
+  AC_LINK_FILES($CCOLLATE_CC, src/collate.cc)
+  AC_LINK_FILES($CCTYPE_CC, src/ctype.cc)
+  AC_LINK_FILES($CMESSAGES_CC, src/messages.cc)
+  AC_LINK_FILES($CMONEY_CC, src/monetary.cc)
+  AC_LINK_FILES($CNUMERIC_CC, src/numeric.cc)
+  AC_LINK_FILES($CTIME_CC, src/time.cc)
+])
+
+
+dnl
+dnl Check for which I/O library to use:  libio, or something specific.
+dnl
+dnl GLIBCPP_ENABLE_CSTDIO
+dnl --enable-cstdio=libio sets config/io/c_io_libio.h and friends
+dnl 
+dnl default is stdio
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_CSTDIO, [
+  AC_MSG_CHECKING([for cstdio to use])
+  AC_ARG_ENABLE(cstdio,
+  [  --enable-cstdio         enable stdio for target io package. 
+  --enable-cstdio=LIB     use LIB target-speific io package. [default=stdio]
+  ], 
+  if test x$enable_cstdio = xno; then
+     enable_cstdio=stdio
+  fi,
+     enable_cstdio=stdio)
+
+  enable_cstdio_flag=$enable_cstdio
+
+  dnl Check if a valid I/O package
+  case x${enable_cstdio_flag} in
+    xlibio)
+      CSTDIO_H=config/io/c_io_libio.h
+      BASIC_FILE_H=config/io/basic_file_libio.h
+      BASIC_FILE_CC=config/io/basic_file_libio.cc
+      AC_MSG_RESULT(libio)
+
+      # see if we are on a system with libio native (ie, linux)
+      AC_CHECK_HEADER(libio.h,  has_libio=yes, has_libio=no)
+
+      # Need to check and see what version of glibc is being used. If
+      # it's not glibc-2.2 or higher, then we'll need to go ahead and 
+      # compile most of libio for linux systems.
+      if test x$has_libio = x"yes"; then
+        case "$target" in
+          *-*-linux*)
+              AC_MSG_CHECKING([for glibc version >= 2.2])
+              AC_EGREP_CPP([ok], [
+            #include 
+              #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 
+                    ok
+              #endif
+              ], glibc_satisfactory=yes, glibc_satisfactory=no)
+              AC_MSG_RESULT($glibc_satisfactory)
+            ;;
+        esac
+
+        # XXX at the moment, admit defeat and force the recompilation
+        # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
+        glibc_satisfactory=no        
+
+        if test x$glibc_satisfactory = x"yes"; then
+           need_libio=no
+           need_wlibio=no        
+        else
+           need_libio=yes
+           # bkoz XXX need to add checks to enable this
+           # pme XXX here's a first pass at such a check
+           if test x$enable_c_mbchar != xno; then
+              need_wlibio=yes
+           else
+              need_wlibio=no
+           fi
+        fi
+
+      else
+         # Using libio, but  doesn't exist on the target system. . .
+         need_libio=yes
+         # bkoz XXX need to add checks to enable this
+         # pme XXX here's a first pass at such a check
+         if test x$enable_c_mbchar != xno; then
+             need_wlibio=yes
+         else
+             need_wlibio=no
+         fi
+      fi
+      ;;
+    xstdio | x | xno | xnone | xyes)
+      # default
+      CSTDIO_H=config/io/c_io_stdio.h
+      BASIC_FILE_H=config/io/basic_file_stdio.h
+      BASIC_FILE_CC=config/io/basic_file_stdio.cc
+      AC_MSG_RESULT(stdio)
+
+      # We're not using stdio.
+      need_libio=no
+      need_wlibio=no
+      ;;
+    *)
+      echo "$enable_cstdio is an unknown io package" 1>&2
+      exit 1
+      ;;
+  esac
+  AC_SUBST(CSTDIO_H)
+  AC_SUBST(BASIC_FILE_H)
+  AC_LINK_FILES($BASIC_FILE_CC, src/basic_file.cc)
+
+  # 2000-08-04 bkoz hack
+  CCODECVT_C=config/io/c_io_libio_codecvt.c
+  AC_SUBST(CCODECVT_C)
+  # 2000-08-04 bkoz hack
+
+  AM_CONDITIONAL(GLIBCPP_BUILD_LIBIO,
+                 test "$need_libio" = yes || test "$need_wlibio" = yes)
+  AM_CONDITIONAL(GLIBCPP_NEED_LIBIO, test "$need_libio" = yes)
+  AM_CONDITIONAL(GLIBCPP_NEED_WLIBIO, test "$need_wlibio" = yes)
+  if test "$need_libio" = yes || test "$need_wlibio" = yes; then
+    libio_la=../libio/libio.la
+  else
+    libio_la=
+  fi
+  AC_SUBST(libio_la)
+])
+
+
+dnl
+dnl Setup to use the gcc gthr.h thread-specific memory and mutex model.
+dnl We must stage the required headers so that they will be installed
+dnl with the library (unlike libgcc, the STL implementation is provided
+dnl solely within headers).  Since we must not inject random user-space
+dnl macro names into user-provided C++ code, we first stage into -in
+dnl and process to  with an output command.  The reason for a two-
+dnl stage process here is to correctly handle $srcdir!=$objdir without
+dnl having to write complex code (the sed commands to clean the macro
+dnl namespace are complex and fragile enough as it is).  We must also
+dnl add a relative path so that -I- is supported properly.
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_THREADS, [
+  AC_MSG_CHECKING([for thread model used by GCC])
+  target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+  AC_MSG_RESULT([$target_thread_file])
+
+  if test $target_thread_file != single; then
+    AC_DEFINE(HAVE_GTHR_DEFAULT)
+    AC_DEFINE(_GLIBCPP_SUPPORTS_WEAK, __GXX_WEAK__)
+  fi
+
+  glibcpp_thread_h=gthr-$target_thread_file.h
+  AC_SUBST(glibcpp_thread_h)
+])
+
+
+dnl
+dnl Check for exception handling support.  If an explicit enable/disable
+dnl sjlj exceptions is given, we don't have to detect.  Otherwise the
+dnl target may or may not support call frame exceptions.
+dnl
+dnl GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
+dnl --enable-sjlj-exceptions forces the use of builtin setjmp.
+dnl --disable-sjlj-exceptions forces the use of call frame unwinding.
+dnl
+dnl Define _GLIBCPP_SJLJ_EXCEPTIONS if the compiler is configured for it.
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_SJLJ_EXCEPTIONS, [
+  AC_MSG_CHECKING([for exception model to use])
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+  AC_ARG_ENABLE(sjlj-exceptions,
+  [  --enable-sjlj-exceptions  force use of builtin_setjmp for exceptions],
+  [:],
+  [dnl Botheration.  Now we've got to detect the exception model.
+   dnl Link tests against libgcc.a are problematic since -- at least
+   dnl as of this writing -- we've not been given proper -L bits for
+   dnl single-tree newlib and libgloss.
+   dnl
+   dnl This is what AC_TRY_COMPILE would do if it didn't delete the
+   dnl conftest files before we got a change to grep them first.
+   cat > conftest.$ac_ext << EOF
+[#]line __oline__ "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+  S s;
+  bar();
+}
+EOF
+   old_CXXFLAGS="$CXXFLAGS"  
+   CXXFLAGS="-S -fexceptions"
+   if AC_TRY_EVAL(ac_compile); then
+     if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=yes
+     elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=no
+     fi
+   fi
+   CXXFLAGS="$old_CXXFLAGS"
+   rm -f conftest*])
+   if test x$enable_sjlj_exceptions = xyes; then
+     AC_DEFINE(_GLIBCPP_SJLJ_EXCEPTIONS, 1,
+        [Define if the compiler is configured for setjmp/longjmp exceptions.])
+     ac_exception_model_name=sjlj
+   elif test x$enable_sjlj_exceptions = xno; then
+     ac_exception_model_name="call frame"
+   else
+     AC_MSG_ERROR([unable to detect exception model])
+   fi
+   AC_LANG_RESTORE
+   AC_MSG_RESULT($ac_exception_model_name)
+])
+
+
+dnl
+dnl Check for libunwind exception handling support. If enabled then
+dnl we assume that the _Unwind_* functions that make up the Unwind ABI
+dnl (_Unwind_RaiseException, _Unwind_Resume, etc.) are defined by
+dnl libunwind instead of libgcc and that libstdc++ has a dependency
+dnl on libunwind as well as libgcc.
+dnl
+dnl GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
+dnl --enable-libunwind-exceptions forces the use of libunwind.
+dnl --disable-libunwind-exceptions assumes there is no libunwind.
+dnl
+dnl Define _GLIBCPP_LIBUNWIND_EXCEPTIONS if requested.
+dnl
+AC_DEFUN(GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS, [
+  AC_MSG_CHECKING([for use of libunwind])
+  AC_ARG_ENABLE(libunwind-exceptions,
+  [  --enable-libunwind-exceptions  force use of libunwind for exceptions],
+  use_libunwind_exceptions=$enableval,
+  use_libunwind_exceptions=no)
+  AC_MSG_RESULT($use_libunwind_exceptions)
+  dnl Option parsed, now set things appropriately
+  if test x"$use_libunwind_exceptions" = xyes; then
+    LIBUNWIND_FLAG="-lunwind"
+  else
+    LIBUNWIND_FLAG=""
+  fi
+  AC_SUBST(LIBUNWIND_FLAG)
+])
+
+dnl
+dnl Check for ISO/IEC 9899:1999 "C99" support.
+dnl
+dnl GLIBCPP_ENABLE_C99
+dnl --enable-c99 defines _GLIBCPP_USE_C99
+dnl --disable-c99 leaves _GLIBCPP_USE_C99 undefined
+dnl  +  Usage:  GLIBCPP_ENABLE_C99[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If omitted, it
+dnl       defaults to `no'.
+dnl  +  If 'C99' stuff is not available, ignores DEFAULT and sets `no'.
+dnl
+dnl GLIBCPP_ENABLE_C99
+AC_DEFUN(GLIBCPP_ENABLE_C99, [dnl
+  define([GLIBCPP_ENABLE_C99_DEFAULT], ifelse($1, yes, yes, no))dnl
+
+  AC_ARG_ENABLE(c99,
+  changequote(<<, >>)dnl
+  <<--enable-c99            turns on 'ISO/IEC 9899:1999 support' [default=>>GLIBCPP_ENABLE_C99_DEFAULT],
+  changequote([, ])dnl
+  [case "$enableval" in
+   yes) enable_c99=yes ;;
+   no)  enable_c99=no ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable C99]) ;;
+   esac],
+  enable_c99=GLIBCPP_ENABLE_C99_DEFAULT)dnl
+ 
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  # Check for the existence of  functions used if C99 is enabled.
+  ac_c99_math=yes;
+  AC_MSG_CHECKING([for ISO C99 support in ])
+  AC_TRY_COMPILE([#include ],[fpclassify(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isfinite(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isinf(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isnan(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isnormal(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[signbit(0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isgreater(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],
+                 [isgreaterequal(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[isless(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],[islessequal(0.0,0.0);],,[ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],
+	         [islessgreater(0.0,0.0);],, [ac_c99_math=no])
+  AC_TRY_COMPILE([#include ],
+	         [isunordered(0.0,0.0);],, [ac_c99_math=no])
+  AC_MSG_RESULT($ac_c99_math)
+
+  # Check for the existence in  of vscanf, et. al.
+  ac_c99_stdio=yes;
+  AC_MSG_CHECKING([for ISO C99 support in ])
+  AC_TRY_COMPILE([#include ],
+		 [snprintf("12", 0, "%i");],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vfscanf(stderr, "%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vscanf("%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vsnprintf(fmt, 0, "%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_TRY_COMPILE([#include 
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vsscanf(fmt, "%i", args);}],
+	          [],, [ac_c99_stdio=no])
+  AC_MSG_RESULT($ac_c99_stdio)
+
+  # Check for the existence in  of lldiv_t, et. al.
+  ac_c99_stdlib=yes;
+  AC_MSG_CHECKING([for lldiv_t declaration])
+  AC_CACHE_VAL(ac_c99_lldiv_t, [
+  AC_TRY_COMPILE([#include ], 
+                   [ lldiv_t mydivt;], 
+                   [ac_c99_lldiv_t=yes], [ac_c99_lldiv_t=no])
+  ])
+  AC_MSG_RESULT($ac_c99_lldiv_t)
+
+  AC_MSG_CHECKING([for ISO C99 support in ])
+  AC_TRY_COMPILE([#include ],
+	         [char* tmp; strtof("gnu", &tmp);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ],
+	         [char* tmp; strtold("gnu", &tmp);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [llabs(10);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [lldiv(10,1);],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [atoll("10");],, [ac_c99_stdlib=no])
+  AC_TRY_COMPILE([#include ], [_Exit(0);],, [ac_c99_stdlib=no])
+  if test x"$ac_c99_lldiv_t" = x"no"; then
+    ac_c99_stdlib=no; 
+  fi; 
+  AC_MSG_RESULT($ac_c99_stdlib)
+
+  # Check for the existence of  functions used if C99 is enabled.
+  # XXX the wchar.h checks should be rolled into the general C99 bits.
+  ac_c99_wchar=yes;
+  AC_MSG_CHECKING([for additional ISO C99 support in ])
+  AC_TRY_COMPILE([#include ], 
+	         [wcstold(L"10.0", NULL);],, [ac_c99_wchar=no])
+  AC_TRY_COMPILE([#include ], 
+	         [wcstoll(L"10", NULL, 10);],, [ac_c99_wchar=no])
+  AC_TRY_COMPILE([#include ], 
+	         [wcstoull(L"10", NULL, 10);],, [ac_c99_wchar=no])
+  AC_MSG_RESULT($ac_c99_wchar)
+
+  AC_MSG_CHECKING([for enabled ISO C99 support])
+  if test x"$ac_c99_math" = x"no" ||
+     test x"$ac_c99_stdio" = x"no" ||
+     test x"$ac_c99_stdlib" = x"no" ||
+     test x"$ac_c99_wchar" = x"no"; then
+    enable_c99=no; 
+  fi; 
+  AC_MSG_RESULT($enable_c99)
+
+  # Option parsed, now set things appropriately
+  if test x"$enable_c99" = x"yes"; then
+    AC_DEFINE(_GLIBCPP_USE_C99)
+  fi
+
+  AC_LANG_RESTORE
+])
+
+
+dnl
+dnl Check for template specializations for the 'long long' type extension.
+dnl The result determines only whether 'long long' I/O is enabled; things
+dnl like numeric_limits<> specializations are always available.
+dnl
+dnl GLIBCPP_ENABLE_LONG_LONG
+dnl --enable-long-long defines _GLIBCPP_USE_LONG_LONG
+dnl --disable-long-long leaves _GLIBCPP_USE_LONG_LONG undefined
+dnl  +  Usage:  GLIBCPP_ENABLE_LONG_LONG[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If omitted, it
+dnl       defaults to `no'.
+dnl  +  If 'long long' stuff is not available, ignores DEFAULT and sets `no'.
+dnl
+dnl GLIBCPP_ENABLE_LONG_LONG
+AC_DEFUN(GLIBCPP_ENABLE_LONG_LONG, [dnl
+  define([GLIBCPP_ENABLE_LONG_LONG_DEFAULT], ifelse($1, yes, yes, no))dnl
+
+  AC_ARG_ENABLE(long-long,
+  changequote(<<, >>)dnl
+  <<--enable-long-long      turns on 'long long' [default=>>GLIBCPP_ENABLE_LONG_LONG_DEFAULT],
+  changequote([, ])dnl
+  [case "$enableval" in
+   yes) enable_long_long=yes ;;
+   no)  enable_long_long=no ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable long long]) ;;
+   esac],
+  enable_long_long=GLIBCPP_ENABLE_LONG_LONG_DEFAULT)dnl
+
+  AC_LANG_SAVE
+  AC_LANG_CPLUSPLUS
+
+  AC_MSG_CHECKING([for enabled long long I/O support])
+  # iostreams require strtoll, strtoull to compile
+  AC_TRY_COMPILE([#include ],
+                 [char* tmp; strtoll("gnu", &tmp, 10);],,[enable_long_long=no])
+  AC_TRY_COMPILE([#include ],
+                 [char* tmp; strtoull("gnu", &tmp, 10);],,[enable_long_long=no])
+
+  # Option parsed, now set things appropriately
+  if test x"$enable_long_long" = xyes; then
+    AC_DEFINE(_GLIBCPP_USE_LONG_LONG)
+  fi
+  AC_MSG_RESULT($enable_long_long)
+
+  AC_LANG_RESTORE
+])
+
+
+dnl
+dnl Check for what kind of C headers to use.
+dnl
+dnl GLIBCPP_ENABLE_CHEADERS
+dnl --enable-cheaders= [does stuff].
+dnl --disable-cheaders [does not do anything, really].
+dnl  +  This will eventually need to be 'c_shadow' by default.
+dnl  +  Usage:  GLIBCPP_ENABLE_CHEADERS[(DEFAULT)]
+dnl       Where DEFAULT is either `c' or `c_std' or 'c_shadow'.  
+dnl       If ommitted, it defaults to `c_std'.
+AC_DEFUN(GLIBCPP_ENABLE_CHEADERS, [dnl
+define([GLIBCPP_ENABLE_CHEADERS_DEFAULT], ifelse($1, c_std, c_std, c_std))dnl
+AC_MSG_CHECKING([for c header strategy to use])
+AC_ARG_ENABLE(cheaders,
+changequote(<<, >>)dnl
+<<  --enable-cheaders       construct "C" header files for g++ [default=>>GLIBCPP_ENABLE_CHEADERS_DEFAULT],
+changequote([, ])
+  [case "$enableval" in
+   c) 
+        enable_cheaders=c 
+        ;;
+   c_std)  
+        enable_cheaders=c_std 
+        ;;
+   c_shadow)  
+        enable_cheaders=c_shadow 
+        ;;
+   *)   AC_MSG_ERROR([Unknown argument to enable/disable "C" headers]) 
+        ;;
+  esac],
+  enable_cheaders=GLIBCPP_ENABLE_CHEADERS_DEFAULT)
+  AC_MSG_RESULT($enable_cheaders)
+
+  dnl Option parsed, now set things appropriately
+  case "$enable_cheaders" in
+    c_shadow) 
+        CSHADOW_FLAGS="-fno-builtin"
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_shadow'
+        ;;
+    c_std)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std'
+        ;;
+    c)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c'
+        ;;
+  esac
+
+  AC_SUBST(CSHADOW_FLAGS)
+  AC_SUBST(C_INCLUDE_DIR)
+  AM_CONDITIONAL(GLIBCPP_C_HEADERS_C, test "$enable_cheaders" = c)
+  AM_CONDITIONAL(GLIBCPP_C_HEADERS_C_STD, test "$enable_cheaders" = c_std)
+])
+
+
+dnl
+dnl Check for wide character support.  Has the same effect as the option
+dnl in gcc's configure, but in a form that autoconf can mess with.
+dnl
+dnl GLIBCPP_ENABLE_C_MBCHAR
+dnl --enable-c-mbchar requests all the wchar_t stuff.
+dnl --disable-c-mbchar doesn't.
+dnl  +  Usage:  GLIBCPP_ENABLE_C_MBCHAR[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_C_MBCHAR, [dnl
+define([GLIBCPP_ENABLE_C_MBCHAR_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(c-mbchar,
+changequote(<<, >>)dnl
+<<  --enable-c-mbchar       enable multibyte (wide) characters [default=>>GLIBCPP_ENABLE_C_MBCHAR_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_c_mbchar=yes ;;
+ no)  enable_c_mbchar=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable c-mbchar]) ;;
+ esac],
+enable_c_mbchar=GLIBCPP_ENABLE_C_MBCHAR_DEFAULT)dnl
+dnl Option parsed, now other scripts can test enable_c_mbchar for yes/no.
+])
+
+
+dnl
+dnl Set up *_INCLUDES and *_INCLUDE_DIR variables for all sundry Makefile.am's.
+dnl
+dnl TOPLEVEL_INCLUDES
+dnl LIBMATH_INCLUDES
+dnl LIBSUPCXX_INCLUDES
+dnl LIBIO_INCLUDES
+dnl CSHADOW_INCLUDES
+dnl
+dnl GLIBCPP_EXPORT_INCLUDES
+AC_DEFUN(GLIBCPP_EXPORT_INCLUDES, [
+  # Root level of the build directory include sources.
+  GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
+
+  # Passed down for canadian crosses.
+  if test x"$CANADIAN" = xyes; then
+    TOPLEVEL_INCLUDES='-I$(includedir)'
+  fi
+
+  LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
+
+  LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
+
+  if test x"$need_libio" = xyes; then
+    LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
+    AC_SUBST(LIBIO_INCLUDES)
+  fi
+
+  # Now, export this to all the little Makefiles....
+  AC_SUBST(GLIBCPP_INCLUDES)
+  AC_SUBST(TOPLEVEL_INCLUDES)
+  AC_SUBST(LIBMATH_INCLUDES)
+  AC_SUBST(LIBSUPCXX_INCLUDES)
+])
+
+
+dnl
+dnl Set up *_FLAGS and *FLAGS variables for all sundry Makefile.am's.
+dnl
+AC_DEFUN(GLIBCPP_EXPORT_FLAGS, [
+  # Optimization flags that are probably a good idea for thrill-seekers. Just
+  # uncomment the lines below and make, everything else is ready to go... 
+  # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc 
+  OPTIMIZE_CXXFLAGS=
+  AC_SUBST(OPTIMIZE_CXXFLAGS)
+
+  WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings -Winline'
+  AC_SUBST(WARN_FLAGS)
+])
+
+dnl
+dnl  GLIBCPP_EXPORT_INSTALL_INFO
+dnl  calculates gxx_install_dir
+dnl  exports glibcpp_toolexecdir
+dnl  exports glibcpp_toolexeclibdir
+dnl  exports glibcpp_prefixdir
+dnl
+dnl Assumes cross_compiling bits already done, and with_cross_host in
+dnl particular
+dnl
+dnl GLIBCPP_EXPORT_INSTALL_INFO
+AC_DEFUN(GLIBCPP_EXPORT_INSTALL_INFO, [
+# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
+# exported correctly in GLIBCPP_CONFIGURE.
+glibcpp_toolexecdir=no
+glibcpp_toolexeclibdir=no
+glibcpp_prefixdir=${prefix}
+
+AC_MSG_CHECKING([for interface version number])
+libstdcxx_interface=$INTERFACE
+AC_MSG_RESULT($libstdcxx_interface)
+
+# Process the option --with-gxx-include-dir=
+AC_MSG_CHECKING([for --with-gxx-include-dir])
+AC_ARG_WITH(gxx-include-dir,
+[  --with-gxx-include-dir  the installation directory for include files],
+[case "${withval}" in
+  yes)
+    AC_MSG_ERROR(Missing directory for --with-gxx-include-dir)
+    gxx_include_dir=no
+    ;;
+  no)
+    gxx_include_dir=no
+    ;;
+  *)
+    gxx_include_dir=${withval}
+    ;;
+esac], [gxx_include_dir=no])
+AC_MSG_RESULT($gxx_include_dir)
+
+# Process the option "--enable-version-specific-runtime-libs"
+AC_MSG_CHECKING([for --enable-version-specific-runtime-libs])
+AC_ARG_ENABLE(version-specific-runtime-libs,
+[  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory ],
+[case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no)  version_specific_libs=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable version-specific libs]);;
+ esac],
+version_specific_libs=no)dnl
+# Option set, now we can test it.
+AC_MSG_RESULT($version_specific_libs)
+
+if test $version_specific_libs = yes; then
+  # Need the gcc compiler version to know where to install libraries
+  # and header files if --enable-version-specific-runtime-libs option
+  # is selected.
+  changequote(,)dnl
+  gcc_version_trigger=${srcdir}/../gcc/version.c
+  gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+  gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+  if test x"$gxx_include_dir" = x"no"; then
+    gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++
+  fi
+  glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+  glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+  changequote([,])dnl
+fi
+
+# Default case for install directory for include files.
+if test $version_specific_libs = no &&
+   test $gxx_include_dir = no; then
+  gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface}
+fi
+
+# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
+# Install a library built with a cross compiler in tooldir, not libdir.
+if test x"$glibcpp_toolexecdir" = x"no"; then 
+  if test -n "$with_cross_host" &&
+     test x"$with_cross_host" != x"no"; then
+    glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
+    glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
+  else
+    glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+    glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
+  fi
+fi
+
+AC_MSG_CHECKING([for install location])
+AC_MSG_RESULT($gxx_include_dir)
+
+AC_SUBST(glibcpp_prefixdir)
+AC_SUBST(gxx_include_dir)
+AC_SUBST(glibcpp_toolexecdir)
+AC_SUBST(glibcpp_toolexeclibdir)
+])
+
+
+# Check for functions in math library.
+# Ulrich Drepper , 1998.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AC_REPLACE_MATHFUNCS(FUNCTION...)
+AC_DEFUN(AC_REPLACE_MATHFUNCS,
+[AC_CHECK_FUNCS([$1], , [LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"])])
+
+
+dnl This macro searches for a GNU version of make.  If a match is found, the
+dnl makefile variable `ifGNUmake' is set to the empty string, otherwise it is
+dnl set to "#". This is useful for  including a special features in a Makefile,
+dnl which cannot be handled by other versions of make.  The variable
+dnl _cv_gnu_make_command is set to the command to invoke GNU make if it exists,
+dnl the empty string otherwise.
+dnl
+dnl Here is an example of its use:
+dnl
+dnl Makefile.in might contain:
+dnl
+dnl     # A failsafe way of putting a dependency rule into a makefile
+dnl     $(DEPEND):
+dnl             $(CC) -MM $(srcdir)/*.c > $(DEPEND)
+dnl
+dnl     @ifGNUmake@ ifeq ($(DEPEND),$(wildcard $(DEPEND)))
+dnl     @ifGNUmake@ include $(DEPEND)
+dnl     @ifGNUmake@ endif
+dnl
+dnl Then configure.in would normally contain:
+dnl
+dnl     CHECK_GNU_MAKE()
+dnl     AC_OUTPUT(Makefile)
+dnl
+dnl Then perhaps to cause gnu make to override any other make, we could do
+dnl something like this (note that GNU make always looks for GNUmakefile first):
+dnl
+dnl     if  ! test x$_cv_gnu_make_command = x ; then
+dnl             mv Makefile GNUmakefile
+dnl             echo .DEFAULT: > Makefile ;
+dnl             echo \  $_cv_gnu_make_command \$@ >> Makefile;
+dnl     fi
+dnl
+dnl Then, if any (well almost any) other make is called, and GNU make also
+dnl exists, then the other make wraps the GNU make.
+dnl
+dnl @author John Darrington 
+dnl @version 1.1 #### replaced Id string now that Id is for lib-v3; pme
+dnl
+dnl #### Changes for libstdc++-v3:  reformatting and linewrapping; prepending
+dnl #### GLIBCPP_ to the macro name; adding the :-make fallback in the
+dnl #### conditional's subshell (" --version" is not a command), using a
+dnl #### different option to grep(1).
+dnl #### -pme
+dnl #### Fixed Bourne shell portability bug (use ${MAKE-make}, not
+dnl #### ${MAKE:-make}).
+dnl #### -msokolov
+AC_DEFUN(
+  GLIBCPP_CHECK_GNU_MAKE, [AC_CACHE_CHECK( for GNU make,_cv_gnu_make_command,
+          _cv_gnu_make_command='' ;
+dnl Search all the common names for GNU make
+          for a in "${MAKE-make}" make gmake gnumake ; do
+                  if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
+                  then
+                          _cv_gnu_make_command=$a ;
+                          break;
+                  fi
+          done ;
+  ) ;
+dnl If there was a GNU version, then set @ifGNUmake@ to the empty
+dnl string, '#' otherwise
+  if test  "x$_cv_gnu_make_command" != "x"  ; then
+          ifGNUmake='' ;
+  else
+          ifGNUmake='#' ;
+  fi
+  AC_SUBST(ifGNUmake)
+])
+
+
+dnl Check for headers for, and arguments to, the setrlimit() function.
+dnl Used only in testsuite_hooks.h.
+AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT_ancilliary, [
+  AC_TRY_COMPILE([#include 
+                  #include 
+                 ], [ int f = RLIMIT_$1 ; ],
+                 [glibcpp_mresult=1], [glibcpp_mresult=0])
+  AC_DEFINE_UNQUOTED(HAVE_MEMLIMIT_$1, $glibcpp_mresult,
+                     [Only used in build directory testsuite_hooks.h.])
+])
+AC_DEFUN(GLIBCPP_CHECK_SETRLIMIT, [
+  setrlimit_have_headers=yes
+  AC_CHECK_HEADERS(sys/resource.h unistd.h,
+                   [],
+                   setrlimit_have_headers=no)
+  # If don't have the headers, then we can't run the tests now, and we
+  # won't be seeing any of these during testsuite compilation.
+  if test $setrlimit_have_headers = yes; then
+    # Can't do these in a loop, else the resulting syntax is wrong.
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(DATA)
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(RSS)
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(VMEM)
+    GLIBCPP_CHECK_SETRLIMIT_ancilliary(AS)
+
+    # Check for rlimit, setrlimit.
+    AC_CACHE_VAL(ac_setrlimit, [
+      AC_TRY_COMPILE([#include 
+		      #include 
+		     ], 
+                     [ struct rlimit r; setrlimit(0, &r);], 
+                     [ac_setrlimit=yes], [ac_setrlimit=no])
+    ])
+  fi
+
+  AC_MSG_CHECKING([for testsuite memory limit support])
+  if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
+    ac_mem_limits=yes
+    AC_DEFINE(_GLIBCPP_MEM_LIMITS)
+  else
+    ac_mem_limits=no
+  fi
+  AC_MSG_RESULT($ac_mem_limits)
+])
+
+
+dnl
+dnl Does any necessary configuration of the testsuite directory.  Generates
+dnl the testsuite_hooks.h header.
+dnl
+dnl GLIBCPP_CONFIGURE_TESTSUITE  [no args]
+AC_DEFUN(GLIBCPP_CONFIGURE_TESTSUITE, [
+  GLIBCPP_CHECK_SETRLIMIT
+
+  # Look for setenv, so that extended locale tests can be performed.
+  GLIBCPP_CHECK_STDLIB_DECL_AND_LINKAGE_3(setenv)
+])
+
+
+sinclude(../libtool.m4)
+dnl The lines below arrange for aclocal not to bring an installed
+dnl libtool.m4 into aclocal.m4, while still arranging for automake to
+dnl add a definition of LIBTOOL to Makefile.in.
+ifelse(,,,[AC_SUBST(LIBTOOL)
+AC_DEFUN([AM_PROG_LIBTOOL])
+AC_DEFUN([AC_LIBTOOL_DLOPEN])
+AC_DEFUN([AC_PROG_LD])
+])
+
+
+# Check whether LC_MESSAGES is available in .
+# Ulrich Drepper , 1995.
+#
+# This file file be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+AC_DEFUN(AC_LC_MESSAGES, [
+  AC_CHECK_HEADER(locale.h, [
+    AC_CACHE_CHECK([for LC_MESSAGES], ac_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include ], [return LC_MESSAGES],
+       ac_cv_val_LC_MESSAGES=yes, ac_cv_val_LC_MESSAGES=no)])
+    if test $ac_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES)
+    fi
+  ])
+])
+
+
+dnl
+dnl Check for whether the Boost-derived checks should be turned on.
+dnl
+dnl GLIBCPP_ENABLE_CONCEPT_CHECKS
+dnl --enable-concept-checks turns them on.
+dnl --disable-concept-checks leaves them off.
+dnl  +  Usage:  GLIBCPP_ENABLE_CONCEPT_CHECKS[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.
+AC_DEFUN(GLIBCPP_ENABLE_CONCEPT_CHECKS, [dnl
+define([GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(concept-checks,
+changequote(<<, >>)dnl
+<<  --enable-concept-checks use Boost-derived template checks [default=>>GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_concept_checks=yes ;;
+ no)  enable_concept_checks=no ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable concept checks]) ;;
+ esac],
+enable_concept_checks=GLIBCPP_ENABLE_CONCEPT_CHECKS_DEFAULT)dnl
+dnl Option parsed, now set things appropriately
+if test x"$enable_concept_checks" = xyes; then
+  AC_DEFINE(_GLIBCPP_CONCEPT_CHECKS)
+fi
+])
+
+
+dnl
+dnl Add version tags to symbols in shared library (or not), additionally
+dnl marking other symbols as private/local (or not).
+dnl
+dnl GLIBCPP_ENABLE_SYMVERS
+dnl --enable-symvers=style adds a version script to the linker call when
+dnl       creating the shared library.  The choice of version script is
+dnl       controlled by 'style'.
+dnl --disable-symvers does not.
+dnl  +  Usage:  GLIBCPP_ENABLE_SYMVERS[(DEFAULT)]
+dnl       Where DEFAULT is either `yes' or `no'.  If ommitted, it
+dnl       defaults to `no'.  Passing `yes' tries to choose a default style
+dnl       based on linker characteristics.  Passing 'no' disables versioning.
+AC_DEFUN(GLIBCPP_ENABLE_SYMVERS, [dnl
+define([GLIBCPP_ENABLE_SYMVERS_DEFAULT], ifelse($1, yes, yes, no))dnl
+AC_ARG_ENABLE(symvers,
+changequote(<<, >>)dnl
+<<  --enable-symvers=style  enables symbol versioning of the shared library [default=>>GLIBCPP_ENABLE_SYMVERS_DEFAULT],
+changequote([, ])dnl
+[case "$enableval" in
+ yes) enable_symvers=yes ;;
+ no)  enable_symvers=no ;;
+ # other names here, just as sanity checks
+ #gnu|sun|etcetera) enable_symvers=$enableval ;;
+ gnu) enable_symvers=$enableval ;;
+ *)   AC_MSG_ERROR([Unknown argument to enable/disable symvers]) ;;
+ esac],
+enable_symvers=GLIBCPP_ENABLE_SYMVERS_DEFAULT)dnl
+
+# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
+# don't know enough about $LD to do tricks... 
+if test x$enable_shared = xno || 
+	test x$LD = x || 
+	test x$glibcpp_gnu_ld_version = x; then
+  enable_symvers=no
+fi
+
+# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
+AC_MSG_CHECKING([for shared libgcc])
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=' -lgcc_s'
+AC_TRY_LINK( , [return 0], glibcpp_shared_libgcc=yes, glibcpp_shared_libgcc=no)
+CFLAGS="$ac_save_CFLAGS"
+AC_MSG_RESULT($glibcpp_shared_libgcc)
+
+# For GNU ld, we need at least this version.  It's 2.12 in the same format
+# as the tested-for version.  See GLIBCPP_CHECK_LINKER_FEATURES for more.
+glibcpp_min_gnu_ld_version=21200
+
+# Check to see if unspecified "yes" value can win, given results
+# above.  
+if test $enable_symvers = yes ; then
+  if test $with_gnu_ld = yes &&
+    test $glibcpp_shared_libgcc = yes ;
+  then
+    if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then
+        enable_symvers=gnu
+    else
+      ac_test_CFLAGS="${CFLAGS+set}"
+      ac_save_CFLAGS="$CFLAGS"
+      CFLAGS='-shared -Wl,--version-script,conftest.map'
+      enable_symvers=no
+      changequote(,)
+      echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map
+      changequote([,])
+      AC_TRY_LINK([int foo;],, enable_symvers=gnu)
+      if test "$ac_test_CFLAGS" = set; then
+	CFLAGS="$ac_save_CFLAGS"
+      else
+	# this is the suspicious part
+	CFLAGS=''
+      fi
+      rm -f conftest.map
+    fi
+  else
+    # just fail for now
+    enable_symvers=no
+  fi
+fi
+
+dnl Everything parsed; figure out what file to use.
+case $enable_symvers in
+  no)
+      LINKER_MAP=config/linker-map.dummy
+      ;;
+  gnu)
+      LINKER_MAP=config/linker-map.gnu
+      ;;
+esac
+
+AC_LINK_FILES($LINKER_MAP, src/linker.map)
+AM_CONDITIONAL(GLIBCPP_BUILD_VERSIONED_SHLIB, test $enable_symvers != no)
+AC_MSG_CHECKING([versioning on shared library symbols])
+AC_MSG_RESULT($enable_symvers)
+])
+
+
+#serial 1
+# This test replaces the one in autoconf.
+# Currently this macro should have the same name as the autoconf macro
+# because gettext's gettext.m4 (distributed in the automake package)
+# still uses it.  Otherwise, the use in gettext.m4 makes autoheader
+# give these diagnostics:
+#   configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
+#   configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
+
+undefine([AC_ISC_POSIX])
+
+AC_DEFUN([AC_ISC_POSIX],
+  [
+    dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
+    AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
+  ]
+)
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# serial 1
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT($USE_MAINTAINER_MODE)
+  AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes)
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+# Define a conditional.
+
+AC_DEFUN([AM_CONDITIONAL],
+[AC_SUBST($1_TRUE)
+AC_SUBST($1_FALSE)
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi])
+
+# Macro to add for using GNU gettext.
+# Ulrich Drepper , 1995.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 9
+
+dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
+dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
+dnl    $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl    depending on --{enable,disable}-{shared,static} and on the presence of
+dnl    AM-DISABLE-SHARED). Otherwise, a static library
+dnl    $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl    implementations (in libc or libintl) without the ngettext() function
+dnl    will be ignored.
+dnl LIBDIR is used to find the intl libraries.  If empty,
+dnl    the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl    and used.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl    Catalog format: GNU --> install in $(datadir)
+dnl    Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl    Catalog format: none
+dnl    Catalog extension: none
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_WITH_NLS],
+  [AC_MSG_CHECKING([whether NLS is requested])
+    dnl Default is enabled NLS
+    AC_ARG_ENABLE(nls,
+      [  --disable-nls           do not use Native Language Support],
+      USE_NLS=$enableval, USE_NLS=yes)
+    AC_MSG_RESULT($USE_NLS)
+    AC_SUBST(USE_NLS)
+
+    BUILD_INCLUDED_LIBINTL=no
+    USE_INCLUDED_LIBINTL=no
+    INTLLIBS=
+
+    dnl If we use NLS figure out what method
+    if test "$USE_NLS" = "yes"; then
+      AC_DEFINE(ENABLE_NLS, 1,
+        [Define to 1 if translation of program messages to the user's native language
+   is requested.])
+      AC_MSG_CHECKING([whether included gettext is requested])
+      AC_ARG_WITH(included-gettext,
+        [  --with-included-gettext use the GNU gettext library included here],
+        nls_cv_force_use_gnu_gettext=$withval,
+        nls_cv_force_use_gnu_gettext=no)
+      AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+      nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+      if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+        dnl User does not insist on using GNU NLS library.  Figure out what
+        dnl to use.  If GNU gettext is available we use this.  Else we have
+        dnl to fall back to GNU NLS library.
+	CATOBJEXT=NONE
+
+        dnl Add a version number to the cache macros.
+        define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
+        define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
+
+	AC_CHECK_HEADER(libintl.h,
+	  [AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
+	    [AC_TRY_LINK([#include 
+extern int _nl_msg_cat_cntr;],
+	       [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
+	       gt_cv_func_gnugettext_libc=yes,
+	       gt_cv_func_gnugettext_libc=no)])
+
+	   if test "$gt_cv_func_gnugettext_libc" != "yes"; then
+	     AC_CACHE_CHECK([for GNU gettext in libintl],
+	       gt_cv_func_gnugettext_libintl,
+	       [gt_save_LIBS="$LIBS"
+		LIBS="$LIBS -lintl $LIBICONV"
+		AC_TRY_LINK([#include 
+extern int _nl_msg_cat_cntr;],
+		  [bindtextdomain ("", "");
+return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
+		  gt_cv_func_gnugettext_libintl=yes,
+		  gt_cv_func_gnugettext_libintl=no)
+		LIBS="$gt_save_LIBS"])
+	   fi
+
+	   dnl If an already present or preinstalled GNU gettext() is found,
+	   dnl use it.  But if this macro is used in GNU gettext, and GNU
+	   dnl gettext is already preinstalled in libintl, we update this
+	   dnl libintl.  (Cf. the install rule in intl/Makefile.in.)
+	   if test "$gt_cv_func_gnugettext_libc" = "yes" \
+	      || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
+		   && test "$PACKAGE" != gettext; }; then
+	     AC_DEFINE(HAVE_GETTEXT, 1,
+               [Define if the GNU gettext() function is already present or preinstalled.])
+
+	     if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
+	       dnl If iconv() is in a separate libiconv library, then anyone
+	       dnl linking with libintl{.a,.so} also needs to link with
+	       dnl libiconv.
+	       INTLLIBS="-lintl $LIBICONV"
+	     fi
+
+	     gt_save_LIBS="$LIBS"
+	     LIBS="$LIBS $INTLLIBS"
+	     AC_CHECK_FUNCS(dcgettext)
+	     LIBS="$gt_save_LIBS"
+
+	     AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	       [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
+	     if test "$MSGFMT" != "no"; then
+	       AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+	     fi
+
+	     AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	       [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+
+	     CATOBJEXT=.gmo
+	   fi
+	])
+
+        if test "$CATOBJEXT" = "NONE"; then
+	  dnl GNU gettext is not found in the C library.
+	  dnl Fall back on GNU gettext library.
+	  nls_cv_use_gnu_gettext=yes
+        fi
+      fi
+
+      if test "$nls_cv_use_gnu_gettext" = "yes"; then
+        dnl Mark actions used to generate GNU NLS library.
+        INTLOBJS="\$(GETTOBJS)"
+        AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], msgfmt)
+        AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+        AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+	  [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
+        AC_SUBST(MSGFMT)
+	BUILD_INCLUDED_LIBINTL=yes
+	USE_INCLUDED_LIBINTL=yes
+        CATOBJEXT=.gmo
+	INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
+	LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+      fi
+
+      dnl Test whether we really found GNU xgettext.
+      if test "$XGETTEXT" != ":"; then
+	dnl If it is no GNU xgettext we define it as : so that the
+	dnl Makefiles still can work.
+	if $XGETTEXT --omit-header /dev/null 2> /dev/null; then
+	  : ;
+	else
+	  AC_MSG_RESULT(
+	    [found xgettext program is not GNU xgettext; ignore it])
+	  XGETTEXT=":"
+	fi
+      fi
+
+      dnl We need to process the po/ directory.
+      POSUB=po
+    fi
+    AC_OUTPUT_COMMANDS(
+     [for ac_file in $CONFIG_FILES; do
+        # Support "outfile[:infile[:infile...]]"
+        case "$ac_file" in
+          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+        esac
+        # PO directories have a Makefile.in generated from Makefile.in.in.
+        case "$ac_file" in */Makefile.in)
+          # Adjust a relative srcdir.
+          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+          case "$ac_given_srcdir" in
+            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+            /*) top_srcdir="$ac_given_srcdir" ;;
+            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
+          esac
+          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+            rm -f "$ac_dir/POTFILES"
+            echo creating "$ac_dir/POTFILES"
+            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
+            echo creating "$ac_dir/Makefile"
+            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+          fi
+          ;;
+        esac
+      done])
+
+
+    dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+    dnl to 'yes' because some of the testsuite requires it.
+    if test "$PACKAGE" = gettext; then
+      BUILD_INCLUDED_LIBINTL=yes
+    fi
+
+    dnl intl/plural.c is generated from intl/plural.y. It requires bison,
+    dnl because plural.y uses bison specific features. It requires at least
+    dnl bison-1.26 because earlier versions generate a plural.c that doesn't
+    dnl compile.
+    dnl bison is only needed for the maintainer (who touches plural.y). But in
+    dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
+    dnl the rule in general Makefile. Now, some people carelessly touch the
+    dnl files or have a broken "make" program, hence the plural.c rule will
+    dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
+    dnl present or too old.
+    AC_CHECK_PROGS([INTLBISON], [bison])
+    if test -z "$INTLBISON"; then
+      ac_verc_fail=yes
+    else
+      dnl Found it, now check the version.
+      AC_MSG_CHECKING([version of bison])
+changequote(<<,>>)dnl
+      ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
+      case $ac_prog_version in
+        '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
+        1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
+changequote([,])dnl
+           ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
+        *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
+      esac
+      AC_MSG_RESULT([$ac_prog_version])
+    fi
+    if test $ac_verc_fail = yes; then
+      INTLBISON=:
+    fi
+
+    dnl These rules are solely for the distribution goal.  While doing this
+    dnl we only have to keep exactly one list of the available catalogs
+    dnl in configure.in.
+    for lang in $ALL_LINGUAS; do
+      GMOFILES="$GMOFILES $lang.gmo"
+      POFILES="$POFILES $lang.po"
+    done
+
+    dnl Make all variables we use known to autoconf.
+    AC_SUBST(BUILD_INCLUDED_LIBINTL)
+    AC_SUBST(USE_INCLUDED_LIBINTL)
+    AC_SUBST(CATALOGS)
+    AC_SUBST(CATOBJEXT)
+    AC_SUBST(GMOFILES)
+    AC_SUBST(INTLLIBS)
+    AC_SUBST(INTLOBJS)
+    AC_SUBST(POFILES)
+    AC_SUBST(POSUB)
+
+    dnl For backward compatibility. Some configure.ins may be using this.
+    nls_cv_header_intl=
+    nls_cv_header_libgt=
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    DATADIRNAME=share
+    AC_SUBST(DATADIRNAME)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    INSTOBJEXT=.mo
+    AC_SUBST(INSTOBJEXT)
+
+    dnl For backward compatibility. Some Makefiles may be using this.
+    GENCAT=gencat
+    AC_SUBST(GENCAT)
+  ])
+
+dnl Usage: Just like AM_WITH_NLS, which see.
+AC_DEFUN([AM_GNU_GETTEXT],
+  [AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+   AC_REQUIRE([AC_PROG_CC])dnl
+   AC_REQUIRE([AC_CANONICAL_HOST])dnl
+   AC_REQUIRE([AC_PROG_RANLIB])dnl
+   AC_REQUIRE([AC_ISC_POSIX])dnl
+   AC_REQUIRE([AC_HEADER_STDC])dnl
+   AC_REQUIRE([AC_C_CONST])dnl
+   AC_REQUIRE([AC_C_INLINE])dnl
+   AC_REQUIRE([AC_TYPE_OFF_T])dnl
+   AC_REQUIRE([AC_TYPE_SIZE_T])dnl
+   AC_REQUIRE([AC_FUNC_ALLOCA])dnl
+   AC_REQUIRE([AC_FUNC_MMAP])dnl
+   AC_REQUIRE([jm_GLIBC21])dnl
+
+   AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
+stdlib.h string.h unistd.h sys/param.h])
+   AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
+getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
+strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
+
+   AM_ICONV
+   AM_LANGINFO_CODESET
+   AM_LC_MESSAGES
+   AM_WITH_NLS([$1],[$2],[$3])
+
+   if test "x$CATOBJEXT" != "x"; then
+     if test "x$ALL_LINGUAS" = "x"; then
+       LINGUAS=
+     else
+       AC_MSG_CHECKING(for catalogs to be installed)
+       NEW_LINGUAS=
+       for presentlang in $ALL_LINGUAS; do
+         useit=no
+         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
+           # Use the presentlang catalog if desiredlang is
+           #   a. equal to presentlang, or
+           #   b. a variant of presentlang (because in this case,
+           #      presentlang can be used as a fallback for messages
+           #      which are not translated in the desiredlang catalog).
+           case "$desiredlang" in
+             "$presentlang"*) useit=yes;;
+           esac
+         done
+         if test $useit = yes; then
+           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
+         fi
+       done
+       LINGUAS=$NEW_LINGUAS
+       AC_MSG_RESULT($LINGUAS)
+     fi
+
+     dnl Construct list of names of catalog files to be constructed.
+     if test -n "$LINGUAS"; then
+       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
+     fi
+   fi
+
+   dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
+   dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
+   dnl Try to locate is.
+   MKINSTALLDIRS=
+   if test -n "$ac_aux_dir"; then
+     MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
+   fi
+   if test -z "$MKINSTALLDIRS"; then
+     MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
+   fi
+   AC_SUBST(MKINSTALLDIRS)
+
+   dnl Enable libtool support if the surrounding package wishes it.
+   INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
+   AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+  ])
+
+# Search path for a program which passes the given test.
+# Ulrich Drepper , 1996.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 1
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl   TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+  /*)
+  ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+  ;;
+  *)
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:"
+  for ac_dir in ifelse([$5], , $PATH, [$5]); do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if [$3]; then
+	ac_cv_path_$1="$ac_dir/$ac_word"
+	break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [  test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+  ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test -n "[$]$1"; then
+  AC_MSG_RESULT([$]$1)
+else
+  AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+#serial 2
+
+# Test for the GNU C Library, version 2.1 or newer.
+# From Bruno Haible.
+
+AC_DEFUN([jm_GLIBC21],
+  [
+    AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
+      ac_cv_gnu_library_2_1,
+      [AC_EGREP_CPP([Lucky GNU user],
+	[
+#include 
+#ifdef __GNU_LIBRARY__
+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
+  Lucky GNU user
+ #endif
+#endif
+	],
+	ac_cv_gnu_library_2_1=yes,
+	ac_cv_gnu_library_2_1=no)
+      ]
+    )
+    AC_SUBST(GLIBC21)
+    GLIBC21="$ac_cv_gnu_library_2_1"
+  ]
+)
+
+#serial AM2
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV],
+[
+  dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+  dnl those with the standalone portable GNU libiconv installed).
+
+  AC_ARG_WITH([libiconv-prefix],
+[  --with-libiconv-prefix=DIR  search for libiconv in DIR/include and DIR/lib], [
+    for dir in `echo "$withval" | tr : ' '`; do
+      if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
+      if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
+    done
+   ])
+
+  AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
+    am_cv_func_iconv="no, consider installing GNU libiconv"
+    am_cv_lib_iconv=no
+    AC_TRY_LINK([#include 
+#include ],
+      [iconv_t cd = iconv_open("","");
+       iconv(cd,NULL,NULL,NULL,NULL);
+       iconv_close(cd);],
+      am_cv_func_iconv=yes)
+    if test "$am_cv_func_iconv" != yes; then
+      am_save_LIBS="$LIBS"
+      LIBS="$LIBS -liconv"
+      AC_TRY_LINK([#include 
+#include ],
+        [iconv_t cd = iconv_open("","");
+         iconv(cd,NULL,NULL,NULL,NULL);
+         iconv_close(cd);],
+        am_cv_lib_iconv=yes
+        am_cv_func_iconv=yes)
+      LIBS="$am_save_LIBS"
+    fi
+  ])
+  if test "$am_cv_func_iconv" = yes; then
+    AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
+    AC_MSG_CHECKING([for iconv declaration])
+    AC_CACHE_VAL(am_cv_proto_iconv, [
+      AC_TRY_COMPILE([
+#include 
+#include 
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+      am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+    am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+    AC_MSG_RESULT([$]{ac_t:-
+         }[$]am_cv_proto_iconv)
+    AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+      [Define as const if the declaration of iconv() needs const.])
+  fi
+  LIBICONV=
+  if test "$am_cv_lib_iconv" = yes; then
+    LIBICONV="-liconv"
+  fi
+  AC_SUBST(LIBICONV)
+])
+
+#serial AM1
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_LANGINFO_CODESET],
+[
+  AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
+    [AC_TRY_LINK([#include ],
+      [char* cs = nl_langinfo(CODESET);],
+      am_cv_langinfo_codeset=yes,
+      am_cv_langinfo_codeset=no)
+    ])
+  if test $am_cv_langinfo_codeset = yes; then
+    AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
+      [Define if you have  and nl_langinfo(CODESET).])
+  fi
+])
+
+# Check whether LC_MESSAGES is available in .
+# Ulrich Drepper , 1995.
+#
+# This file can be copied and used freely without restrictions.  It can
+# be used in projects which are not available under the GNU Public License
+# but which still want to provide support for the GNU gettext functionality.
+# Please note that the actual code is *not* freely available.
+
+# serial 2
+
+AC_DEFUN([AM_LC_MESSAGES],
+  [if test $ac_cv_header_locale_h = yes; then
+    AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
+      [AC_TRY_LINK([#include ], [return LC_MESSAGES],
+       am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
+    if test $am_cv_val_LC_MESSAGES = yes; then
+      AC_DEFINE(HAVE_LC_MESSAGES, 1,
+        [Define if your  file defines LC_MESSAGES.])
+    fi
+  fi])
+
+# Do all the work for Automake.  This macro actually does too much --
+# some checks are only needed if your package does certain things.
+# But this isn't really a big deal.
+
+# serial 1
+
+dnl Usage:
+dnl AM_INIT_AUTOMAKE(package,version, [no-define])
+
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AC_PROG_INSTALL])
+PACKAGE=[$1]
+AC_SUBST(PACKAGE)
+VERSION=[$2]
+AC_SUBST(VERSION)
+dnl test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+ifelse([$3],,
+AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package]))
+AC_REQUIRE([AM_SANITY_CHECK])
+AC_REQUIRE([AC_ARG_PROGRAM])
+dnl FIXME This is truly gross.
+missing_dir=`cd $ac_aux_dir && pwd`
+AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
+AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
+AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
+AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
+AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
+AC_REQUIRE([AC_PROG_MAKE_SET])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "[$]*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "[$]*" != "X $srcdir/configure conftestfile" \
+      && test "[$]*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "[$]2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+rm -f conftest*
+AC_MSG_RESULT(yes)])
+
+dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
+dnl The program must properly implement --version.
+AC_DEFUN([AM_MISSING_PROG],
+[AC_MSG_CHECKING(for working $2)
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if ($2 --version) < /dev/null > /dev/null 2>&1; then
+   $1=$2
+   AC_MSG_RESULT(found)
+else
+   $1="$3/missing $2"
+   AC_MSG_RESULT(missing)
+fi
+AC_SUBST($1)])
+
+# Like AC_CONFIG_HEADER, but automatically create stamp file.
+
+AC_DEFUN([AM_CONFIG_HEADER],
+[AC_PREREQ([2.12])
+AC_CONFIG_HEADER([$1])
+dnl When config.status generates a header, we must update the stamp-h file.
+dnl This file resides in the same directory as the config header
+dnl that is generated.  We must strip everything past the first ":",
+dnl and everything past the last "/".
+AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
+ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
+<>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
+<>; do
+  case " <<$>>CONFIG_HEADERS " in
+  *" <<$>>am_file "*<<)>>
+    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
+    ;;
+  esac
+  am_indx=`expr "<<$>>am_indx" + 1`
+done<<>>dnl>>)
+changequote([,]))])
+
diff --git a/contrib/libstdc++/config.h.in b/contrib/libstdc++/config.h.in
new file mode 100644
index 0000000..c2eea57
--- /dev/null
+++ b/contrib/libstdc++/config.h.in
@@ -0,0 +1,1073 @@
+/* config.h.in.  Generated automatically from configure.in by autoheader.  */
+
+/* Define if you have a working `mmap' system call.  */
+#undef HAVE_MMAP
+
+// Define if GCC supports weak symbols.
+#undef _GLIBCPP_SUPPORTS_WEAK
+
+// Define if gthr-default.h exists (meaning that threading support is enabled).
+#undef HAVE_GTHR_DEFAULT
+
+// Include I/O support for 'long long' and 'unsigned long long'.
+#undef _GLIBCPP_USE_LONG_LONG
+
+// Define if C99 features such as lldiv_t, llabs, lldiv should be exposed.
+#undef _GLIBCPP_USE_C99
+
+// Define if code specialized for wchar_t should be used.
+#undef _GLIBCPP_USE_WCHAR_T
+
+// Define if using setrlimit to limit memory usage during 'make check'.
+#undef _GLIBCPP_MEM_LIMITS
+
+// Define to use concept checking code from the boost libraries.
+#undef _GLIBCPP_CONCEPT_CHECKS
+
+// Define if mbstate_t exists in wchar.h.
+#undef HAVE_MBSTATE_T
+
+// Define if you have the modff function.
+#undef HAVE_MODFF
+
+// Define if you have the modfl function.
+#undef HAVE_MODFL
+
+// Define if you have the expf function.
+#undef HAVE_EXPF
+
+// Define if you have the expl function.
+#undef HAVE_EXPL
+
+// Define if you have the hypotf function.
+#undef HAVE_HYPOTF
+
+// Define if you have the hypotl function.
+#undef HAVE_HYPOTL
+
+// Define if the compiler/host combination has __builtin_abs
+#undef HAVE___BUILTIN_ABS
+
+// Define if the compiler/host combination has __builtin_labs
+#undef HAVE___BUILTIN_LABS
+
+// Define if the compiler/host combination has __builtin_cos
+#undef HAVE___BUILTIN_COS
+
+// Define if the compiler/host combination has __builtin_cosf
+#undef HAVE___BUILTIN_COSF
+
+// Define if the compiler/host combination has __builtin_cosl
+#undef HAVE___BUILTIN_COSL
+
+// Define if the compiler/host combination has __builtin_fabs
+#undef HAVE___BUILTIN_FABS
+
+// Define if the compiler/host combination has __builtin_fabsf
+#undef HAVE___BUILTIN_FABSF
+
+// Define if the compiler/host combination has __builtin_fabsl
+#undef HAVE___BUILTIN_FABSL
+
+// Define if the compiler/host combination has __builtin_sin
+#undef HAVE___BUILTIN_SIN
+
+// Define if the compiler/host combination has __builtin_sinf
+#undef HAVE___BUILTIN_SINF
+
+// Define if the compiler/host combination has __builtin_sinl
+#undef HAVE___BUILTIN_SINL
+
+// Define if the compiler/host combination has __builtin_sqrt
+#undef HAVE___BUILTIN_SQRT
+
+// Define if the compiler/host combination has __builtin_sqrtf
+#undef HAVE___BUILTIN_SQRTF
+
+// Define if the compiler/host combination has __builtin_sqrtl
+#undef HAVE___BUILTIN_SQRTL
+
+// Define if LC_MESSAGES is available in .
+#undef HAVE_LC_MESSAGES
+
+/* Define if you have the __signbit function.  */
+#undef HAVE___SIGNBIT
+
+/* Define if you have the __signbitf function.  */
+#undef HAVE___SIGNBITF
+
+/* Define if you have the __signbitl function.  */
+#undef HAVE___SIGNBITL
+
+/* Define if you have the _acosf function.  */
+#undef HAVE__ACOSF
+
+/* Define if you have the _acosl function.  */
+#undef HAVE__ACOSL
+
+/* Define if you have the _asinf function.  */
+#undef HAVE__ASINF
+
+/* Define if you have the _asinl function.  */
+#undef HAVE__ASINL
+
+/* Define if you have the _atan2f function.  */
+#undef HAVE__ATAN2F
+
+/* Define if you have the _atan2l function.  */
+#undef HAVE__ATAN2L
+
+/* Define if you have the _atanf function.  */
+#undef HAVE__ATANF
+
+/* Define if you have the _atanl function.  */
+#undef HAVE__ATANL
+
+/* Define if you have the _ceilf function.  */
+#undef HAVE__CEILF
+
+/* Define if you have the _ceill function.  */
+#undef HAVE__CEILL
+
+/* Define if you have the _copysign function.  */
+#undef HAVE__COPYSIGN
+
+/* Define if you have the _copysignl function.  */
+#undef HAVE__COPYSIGNL
+
+/* Define if you have the _cosf function.  */
+#undef HAVE__COSF
+
+/* Define if you have the _coshf function.  */
+#undef HAVE__COSHF
+
+/* Define if you have the _coshl function.  */
+#undef HAVE__COSHL
+
+/* Define if you have the _cosl function.  */
+#undef HAVE__COSL
+
+/* Define if you have the _expf function.  */
+#undef HAVE__EXPF
+
+/* Define if you have the _expl function.  */
+#undef HAVE__EXPL
+
+/* Define if you have the _fabsf function.  */
+#undef HAVE__FABSF
+
+/* Define if you have the _fabsl function.  */
+#undef HAVE__FABSL
+
+/* Define if you have the _finite function.  */
+#undef HAVE__FINITE
+
+/* Define if you have the _finitef function.  */
+#undef HAVE__FINITEF
+
+/* Define if you have the _finitel function.  */
+#undef HAVE__FINITEL
+
+/* Define if you have the _floorf function.  */
+#undef HAVE__FLOORF
+
+/* Define if you have the _floorl function.  */
+#undef HAVE__FLOORL
+
+/* Define if you have the _fmodf function.  */
+#undef HAVE__FMODF
+
+/* Define if you have the _fmodl function.  */
+#undef HAVE__FMODL
+
+/* Define if you have the _fpclass function.  */
+#undef HAVE__FPCLASS
+
+/* Define if you have the _frexpf function.  */
+#undef HAVE__FREXPF
+
+/* Define if you have the _frexpl function.  */
+#undef HAVE__FREXPL
+
+/* Define if you have the _hypot function.  */
+#undef HAVE__HYPOT
+
+/* Define if you have the _hypotf function.  */
+#undef HAVE__HYPOTF
+
+/* Define if you have the _hypotl function.  */
+#undef HAVE__HYPOTL
+
+/* Define if you have the _isinf function.  */
+#undef HAVE__ISINF
+
+/* Define if you have the _isinff function.  */
+#undef HAVE__ISINFF
+
+/* Define if you have the _isinfl function.  */
+#undef HAVE__ISINFL
+
+/* Define if you have the _isnan function.  */
+#undef HAVE__ISNAN
+
+/* Define if you have the _isnanf function.  */
+#undef HAVE__ISNANF
+
+/* Define if you have the _isnanl function.  */
+#undef HAVE__ISNANL
+
+/* Define if you have the _ldexpf function.  */
+#undef HAVE__LDEXPF
+
+/* Define if you have the _ldexpl function.  */
+#undef HAVE__LDEXPL
+
+/* Define if you have the _log10f function.  */
+#undef HAVE__LOG10F
+
+/* Define if you have the _log10l function.  */
+#undef HAVE__LOG10L
+
+/* Define if you have the _logf function.  */
+#undef HAVE__LOGF
+
+/* Define if you have the _logl function.  */
+#undef HAVE__LOGL
+
+/* Define if you have the _modff function.  */
+#undef HAVE__MODFF
+
+/* Define if you have the _modfl function.  */
+#undef HAVE__MODFL
+
+/* Define if you have the _powf function.  */
+#undef HAVE__POWF
+
+/* Define if you have the _powl function.  */
+#undef HAVE__POWL
+
+/* Define if you have the _qfpclass function.  */
+#undef HAVE__QFPCLASS
+
+/* Define if you have the _sincos function.  */
+#undef HAVE__SINCOS
+
+/* Define if you have the _sincosf function.  */
+#undef HAVE__SINCOSF
+
+/* Define if you have the _sincosl function.  */
+#undef HAVE__SINCOSL
+
+/* Define if you have the _sinf function.  */
+#undef HAVE__SINF
+
+/* Define if you have the _sinhf function.  */
+#undef HAVE__SINHF
+
+/* Define if you have the _sinhl function.  */
+#undef HAVE__SINHL
+
+/* Define if you have the _sinl function.  */
+#undef HAVE__SINL
+
+/* Define if you have the _sqrtf function.  */
+#undef HAVE__SQRTF
+
+/* Define if you have the _sqrtl function.  */
+#undef HAVE__SQRTL
+
+/* Define if you have the _tanf function.  */
+#undef HAVE__TANF
+
+/* Define if you have the _tanhf function.  */
+#undef HAVE__TANHF
+
+/* Define if you have the _tanhl function.  */
+#undef HAVE__TANHL
+
+/* Define if you have the _tanl function.  */
+#undef HAVE__TANL
+
+/* Define if you have the acosf function.  */
+#undef HAVE_ACOSF
+
+/* Define if you have the acosl function.  */
+#undef HAVE_ACOSL
+
+/* Define if you have the asinf function.  */
+#undef HAVE_ASINF
+
+/* Define if you have the asinl function.  */
+#undef HAVE_ASINL
+
+/* Define if you have the atan2f function.  */
+#undef HAVE_ATAN2F
+
+/* Define if you have the atan2l function.  */
+#undef HAVE_ATAN2L
+
+/* Define if you have the atanf function.  */
+#undef HAVE_ATANF
+
+/* Define if you have the atanl function.  */
+#undef HAVE_ATANL
+
+/* Define if you have the btowc function.  */
+#undef HAVE_BTOWC
+
+/* Define if you have the ceilf function.  */
+#undef HAVE_CEILF
+
+/* Define if you have the ceill function.  */
+#undef HAVE_CEILL
+
+/* Define if you have the copysign function.  */
+#undef HAVE_COPYSIGN
+
+/* Define if you have the copysignf function.  */
+#undef HAVE_COPYSIGNF
+
+/* Define if you have the copysignl function.  */
+#undef HAVE_COPYSIGNL
+
+/* Define if you have the cosf function.  */
+#undef HAVE_COSF
+
+/* Define if you have the coshf function.  */
+#undef HAVE_COSHF
+
+/* Define if you have the coshl function.  */
+#undef HAVE_COSHL
+
+/* Define if you have the cosl function.  */
+#undef HAVE_COSL
+
+/* Define if you have the drand48 function.  */
+#undef HAVE_DRAND48
+
+/* Define if you have the expf function.  */
+#undef HAVE_EXPF
+
+/* Define if you have the expl function.  */
+#undef HAVE_EXPL
+
+/* Define if you have the fabsf function.  */
+#undef HAVE_FABSF
+
+/* Define if you have the fabsl function.  */
+#undef HAVE_FABSL
+
+/* Define if you have the fgetwc function.  */
+#undef HAVE_FGETWC
+
+/* Define if you have the fgetws function.  */
+#undef HAVE_FGETWS
+
+/* Define if you have the finite function.  */
+#undef HAVE_FINITE
+
+/* Define if you have the finitef function.  */
+#undef HAVE_FINITEF
+
+/* Define if you have the finitel function.  */
+#undef HAVE_FINITEL
+
+/* Define if you have the floorf function.  */
+#undef HAVE_FLOORF
+
+/* Define if you have the floorl function.  */
+#undef HAVE_FLOORL
+
+/* Define if you have the fmodf function.  */
+#undef HAVE_FMODF
+
+/* Define if you have the fmodl function.  */
+#undef HAVE_FMODL
+
+/* Define if you have the fpclass function.  */
+#undef HAVE_FPCLASS
+
+/* Define if you have the fputwc function.  */
+#undef HAVE_FPUTWC
+
+/* Define if you have the fputws function.  */
+#undef HAVE_FPUTWS
+
+/* Define if you have the frexpf function.  */
+#undef HAVE_FREXPF
+
+/* Define if you have the frexpl function.  */
+#undef HAVE_FREXPL
+
+/* Define if you have the fwide function.  */
+#undef HAVE_FWIDE
+
+/* Define if you have the fwprintf function.  */
+#undef HAVE_FWPRINTF
+
+/* Define if you have the fwscanf function.  */
+#undef HAVE_FWSCANF
+
+/* Define if you have the getpagesize function.  */
+#undef HAVE_GETPAGESIZE
+
+/* Define if you have the getwc function.  */
+#undef HAVE_GETWC
+
+/* Define if you have the getwchar function.  */
+#undef HAVE_GETWCHAR
+
+/* Define if you have the hypot function.  */
+#undef HAVE_HYPOT
+
+/* Define if you have the hypotf function.  */
+#undef HAVE_HYPOTF
+
+/* Define if you have the hypotl function.  */
+#undef HAVE_HYPOTL
+
+/* Define if you have the iconv function.  */
+#undef HAVE_ICONV
+
+/* Define if you have the iconv_close function.  */
+#undef HAVE_ICONV_CLOSE
+
+/* Define if you have the iconv_open function.  */
+#undef HAVE_ICONV_OPEN
+
+/* Define if you have the isinf function.  */
+#undef HAVE_ISINF
+
+/* Define if you have the isinff function.  */
+#undef HAVE_ISINFF
+
+/* Define if you have the isinfl function.  */
+#undef HAVE_ISINFL
+
+/* Define if you have the isnan function.  */
+#undef HAVE_ISNAN
+
+/* Define if you have the isnanf function.  */
+#undef HAVE_ISNANF
+
+/* Define if you have the isnanl function.  */
+#undef HAVE_ISNANL
+
+/* Define if you have the ldexpf function.  */
+#undef HAVE_LDEXPF
+
+/* Define if you have the ldexpl function.  */
+#undef HAVE_LDEXPL
+
+/* Define if you have the log10f function.  */
+#undef HAVE_LOG10F
+
+/* Define if you have the log10l function.  */
+#undef HAVE_LOG10L
+
+/* Define if you have the logf function.  */
+#undef HAVE_LOGF
+
+/* Define if you have the logl function.  */
+#undef HAVE_LOGL
+
+/* Define if you have the mbrlen function.  */
+#undef HAVE_MBRLEN
+
+/* Define if you have the mbrtowc function.  */
+#undef HAVE_MBRTOWC
+
+/* Define if you have the mbsinit function.  */
+#undef HAVE_MBSINIT
+
+/* Define if you have the mbsrtowcs function.  */
+#undef HAVE_MBSRTOWCS
+
+/* Define if you have the modff function.  */
+#undef HAVE_MODFF
+
+/* Define if you have the modfl function.  */
+#undef HAVE_MODFL
+
+/* Define if you have the nan function.  */
+#undef HAVE_NAN
+
+/* Define if you have the nl_langinfo function.  */
+#undef HAVE_NL_LANGINFO
+
+/* Define if you have the powf function.  */
+#undef HAVE_POWF
+
+/* Define if you have the powl function.  */
+#undef HAVE_POWL
+
+/* Define if you have the putwc function.  */
+#undef HAVE_PUTWC
+
+/* Define if you have the putwchar function.  */
+#undef HAVE_PUTWCHAR
+
+/* Define if you have the qfpclass function.  */
+#undef HAVE_QFPCLASS
+
+/* Define if you have the setenv function.  */
+#undef HAVE_SETENV
+
+/* Define if you have the sincos function.  */
+#undef HAVE_SINCOS
+
+/* Define if you have the sincosf function.  */
+#undef HAVE_SINCOSF
+
+/* Define if you have the sincosl function.  */
+#undef HAVE_SINCOSL
+
+/* Define if you have the sinf function.  */
+#undef HAVE_SINF
+
+/* Define if you have the sinhf function.  */
+#undef HAVE_SINHF
+
+/* Define if you have the sinhl function.  */
+#undef HAVE_SINHL
+
+/* Define if you have the sinl function.  */
+#undef HAVE_SINL
+
+/* Define if you have the sqrtf function.  */
+#undef HAVE_SQRTF
+
+/* Define if you have the sqrtl function.  */
+#undef HAVE_SQRTL
+
+/* Define if you have the strtof function.  */
+#undef HAVE_STRTOF
+
+/* Define if you have the strtold function.  */
+#undef HAVE_STRTOLD
+
+/* Define if you have the swprintf function.  */
+#undef HAVE_SWPRINTF
+
+/* Define if you have the swscanf function.  */
+#undef HAVE_SWSCANF
+
+/* Define if you have the tanf function.  */
+#undef HAVE_TANF
+
+/* Define if you have the tanhf function.  */
+#undef HAVE_TANHF
+
+/* Define if you have the tanhl function.  */
+#undef HAVE_TANHL
+
+/* Define if you have the tanl function.  */
+#undef HAVE_TANL
+
+/* Define if you have the ungetwc function.  */
+#undef HAVE_UNGETWC
+
+/* Define if you have the vfwprintf function.  */
+#undef HAVE_VFWPRINTF
+
+/* Define if you have the vfwscanf function.  */
+#undef HAVE_VFWSCANF
+
+/* Define if you have the vswprintf function.  */
+#undef HAVE_VSWPRINTF
+
+/* Define if you have the vswscanf function.  */
+#undef HAVE_VSWSCANF
+
+/* Define if you have the vwprintf function.  */
+#undef HAVE_VWPRINTF
+
+/* Define if you have the vwscanf function.  */
+#undef HAVE_VWSCANF
+
+/* Define if you have the wcrtomb function.  */
+#undef HAVE_WCRTOMB
+
+/* Define if you have the wcscat function.  */
+#undef HAVE_WCSCAT
+
+/* Define if you have the wcschr function.  */
+#undef HAVE_WCSCHR
+
+/* Define if you have the wcscmp function.  */
+#undef HAVE_WCSCMP
+
+/* Define if you have the wcscoll function.  */
+#undef HAVE_WCSCOLL
+
+/* Define if you have the wcscpy function.  */
+#undef HAVE_WCSCPY
+
+/* Define if you have the wcscspn function.  */
+#undef HAVE_WCSCSPN
+
+/* Define if you have the wcsftime function.  */
+#undef HAVE_WCSFTIME
+
+/* Define if you have the wcslen function.  */
+#undef HAVE_WCSLEN
+
+/* Define if you have the wcsncat function.  */
+#undef HAVE_WCSNCAT
+
+/* Define if you have the wcsncmp function.  */
+#undef HAVE_WCSNCMP
+
+/* Define if you have the wcsncpy function.  */
+#undef HAVE_WCSNCPY
+
+/* Define if you have the wcspbrk function.  */
+#undef HAVE_WCSPBRK
+
+/* Define if you have the wcsrchr function.  */
+#undef HAVE_WCSRCHR
+
+/* Define if you have the wcsrtombs function.  */
+#undef HAVE_WCSRTOMBS
+
+/* Define if you have the wcsspn function.  */
+#undef HAVE_WCSSPN
+
+/* Define if you have the wcsstr function.  */
+#undef HAVE_WCSSTR
+
+/* Define if you have the wcstod function.  */
+#undef HAVE_WCSTOD
+
+/* Define if you have the wcstof function.  */
+#undef HAVE_WCSTOF
+
+/* Define if you have the wcstok function.  */
+#undef HAVE_WCSTOK
+
+/* Define if you have the wcstol function.  */
+#undef HAVE_WCSTOL
+
+/* Define if you have the wcstoul function.  */
+#undef HAVE_WCSTOUL
+
+/* Define if you have the wcsxfrm function.  */
+#undef HAVE_WCSXFRM
+
+/* Define if you have the wctob function.  */
+#undef HAVE_WCTOB
+
+/* Define if you have the wmemchr function.  */
+#undef HAVE_WMEMCHR
+
+/* Define if you have the wmemcmp function.  */
+#undef HAVE_WMEMCMP
+
+/* Define if you have the wmemcpy function.  */
+#undef HAVE_WMEMCPY
+
+/* Define if you have the wmemmove function.  */
+#undef HAVE_WMEMMOVE
+
+/* Define if you have the wmemset function.  */
+#undef HAVE_WMEMSET
+
+/* Define if you have the wprintf function.  */
+#undef HAVE_WPRINTF
+
+/* Define if you have the wscanf function.  */
+#undef HAVE_WSCANF
+
+/* Define if you have the  header file.  */
+#undef HAVE_ENDIAN_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_FLOAT_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_FP_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_GCONV_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_IEEEFP_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_INTTYPES_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_LOCALE_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_MACHINE_ENDIAN_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_MACHINE_PARAM_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_NAN_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_STDLIB_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_SYS_ISA_DEFS_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_SYS_MACHINE_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_SYS_RESOURCE_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_SYS_STAT_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_SYS_TYPES_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_UNISTD_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_WCHAR_H
+
+/* Define if you have the  header file.  */
+#undef HAVE_WCTYPE_H
+
+/* Define if you have the m library (-lm).  */
+#undef HAVE_LIBM
+
+/* Name of package */
+#undef PACKAGE
+
+/* Version number of package */
+#undef VERSION
+
+/* Define if the compiler is configured for setjmp/longjmp exceptions. */
+#undef _GLIBCPP_SJLJ_EXCEPTIONS
+
+/* Define if sigsetjmp is available.   */
+#undef HAVE_SIGSETJMP
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_MEMLIMIT_DATA
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_MEMLIMIT_RSS
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_MEMLIMIT_VMEM
+
+/* Only used in build directory testsuite_hooks.h. */
+#undef HAVE_MEMLIMIT_AS
+
+//
+// Systems that have certain non-standard functions prefixed with an
+// underscore, we'll handle those here. Must come after config.h.in.
+//
+#if defined (HAVE__ISNAN) && ! defined (HAVE_ISNAN)
+# define HAVE_ISNAN 1
+# define isnan _isnan
+#endif
+
+#if defined (HAVE__ISNANF) && ! defined (HAVE_ISNANF)
+# define HAVE_ISNANF 1
+# define isnanf _isnanf
+#endif
+
+#if defined (HAVE__ISNANL) && ! defined (HAVE_ISNANL)
+# define HAVE_ISNANL 1
+# define isnanl _isnanl
+#endif
+
+#if defined (HAVE__ISINF) && ! defined (HAVE_ISINF)
+# define HAVE_ISINF 1
+# define isinf _isinf
+#endif
+
+#if defined (HAVE__ISINFF) && ! defined (HAVE_ISINFF)
+# define HAVE_ISINFF 1
+# define isinff _isinff
+#endif
+
+#if defined (HAVE__ISINFL) && ! defined (HAVE_ISINFL)
+# define HAVE_ISINFL 1
+# define isinfl _isinfl
+#endif
+
+#if defined (HAVE__COPYSIGN) && ! defined (HAVE_COPYSIGN)
+# define HAVE_COPYSIGN 1
+# define copysign _copysign
+#endif
+
+#if defined (HAVE__COPYSIGNL) && ! defined (HAVE_COPYSIGNL)
+# define HAVE_COPYSIGNL 1
+# define copysignl _copysignl
+#endif
+
+#if defined (HAVE__COSF) && ! defined (HAVE_COSF)
+# define HAVE_COSF 1
+# define cosf _cosf
+#endif
+
+#if defined (HAVE__ACOSF) && ! defined (HAVE_ACOSF)
+# define HAVE_ACOSF 1
+# define acosf _acosf
+#endif
+
+#if defined (HAVE__ACOSL) && ! defined (HAVE_ACOSL)
+# define HAVE_ACOSL 1
+# define acosl _acosl
+#endif
+
+#if defined (HAVE__ASINF) && ! defined (HAVE_ASINF)
+# define HAVE_ASINF 1
+# define asinf _asinf
+#endif
+
+#if defined (HAVE__ASINL) && ! defined (HAVE_ASINL)
+# define HAVE_ASINL 1
+# define asinl _asinl
+#endif
+
+#if defined (HAVE__ATANF) && ! defined (HAVE_ATANF)
+# define HAVE_ATANF 1
+# define atanf _atanf
+#endif
+
+#if defined (HAVE__ATANL) && ! defined (HAVE_ATANL)
+# define HAVE_ATANL 1
+# define atanl _atanl
+#endif
+
+#if defined (HAVE__CEILF) && ! defined (HAVE_CEILF)
+# define HAVE_CEILF 1
+# define aceil _ceilf
+#endif
+
+#if defined (HAVE__CEILL) && ! defined (HAVE_CEILL)
+# define HAVE_CEILL 1
+# define aceil _ceill
+#endif
+
+#if defined (HAVE__COSHF) && ! defined (HAVE_COSHF)
+# define HAVE_COSHF 1
+# define coshf _coshf
+#endif
+
+#if defined (HAVE__COSL) && ! defined (HAVE_COSL)
+# define HAVE_COSL 1
+# define cosl _cosl
+#endif
+
+#if defined (HAVE__LOGF) && ! defined (HAVE_LOGF)
+# define HAVE_LOGF 1
+# define logf _logf
+#endif
+
+#if defined (HAVE__COSHL) && ! defined (HAVE_COSHL)
+# define HAVE_COSHL 1
+# define coshl _coshl
+#endif
+
+#if defined (HAVE__EXPF) && ! defined (HAVE_EXPF)
+# define HAVE_EXPF 1
+# define expf _expf
+#endif
+
+#if defined (HAVE__EXPL) && ! defined (HAVE_EXPL)
+# define HAVE_EXPL 1
+# define expl _expl
+#endif
+
+#if defined (HAVE__FABSF) && ! defined (HAVE_FABSF)
+# define HAVE_FABSF 1
+# define fabsf _fabsf
+#endif
+
+#if defined (HAVE__FABSL) && ! defined (HAVE_FABSL)
+# define HAVE_FABSL 1
+# define fabsl _fabsl
+#endif
+
+#if defined (HAVE__FLOORF) && ! defined (HAVE_FLOORF)
+# define HAVE_FLOORF 1
+# define floorf _floorf
+#endif
+
+#if defined (HAVE__FLOORL) && ! defined (HAVE_FLOORL)
+# define HAVE_FLOORL 1
+# define floorl _floorl
+#endif
+
+#if defined (HAVE__FMODF) && ! defined (HAVE_FMODF)
+# define HAVE_FMODF 1
+# define fmodf _fmodf
+#endif
+
+#if defined (HAVE__FMODL) && ! defined (HAVE_FMODL)
+# define HAVE_FMODL 1
+# define fmodl _fmodl
+#endif
+
+#if defined (HAVE__FREXPF) && ! defined (HAVE_FREXPF)
+# define HAVE_FREXPF 1
+# define frexpf _frexpf
+#endif
+
+#if defined (HAVE__FREXPL) && ! defined (HAVE_FREXPL)
+# define HAVE_FREXPL 1
+# define frexpl _frexpl
+#endif
+
+#if defined (HAVE__LDEXPF) && ! defined (HAVE_LDEXPF)
+# define HAVE_LDEXPF 1
+# define ldexpf _ldexpf
+#endif
+
+#if defined (HAVE__LDEXPL) && ! defined (HAVE_LDEXPL)
+# define HAVE_LDEXPL 1
+# define ldexpl _ldexpl
+#endif
+
+#if defined (HAVE__LOG10F) && ! defined (HAVE_LOG10F)
+# define HAVE_LOG10F 1
+# define log10f _log10f
+#endif
+
+#if defined (HAVE__LOGL) && ! defined (HAVE_LOGL)
+# define HAVE_LOGL 1
+# define logl _logl
+#endif
+
+#if defined (HAVE__POWF) && ! defined (HAVE_POWF)
+# define HAVE_POWF 1
+# define powf _powf
+#endif
+
+#if defined (HAVE__LOG10L) && ! defined (HAVE_LOG10L)
+# define HAVE_LOG10L 1
+# define log10l _log10l
+#endif
+
+#if defined (HAVE__MODF) && ! defined (HAVE_MODF)
+# define HAVE_MODF 1
+# define modf _modf
+#endif
+
+#if defined (HAVE__MODL) && ! defined (HAVE_MODL)
+# define HAVE_MODL 1
+# define modl _modl
+#endif
+
+#if defined (HAVE__SINF) && ! defined (HAVE_SINF)
+# define HAVE_SINF 1
+# define sinf _sinf
+#endif
+
+#if defined (HAVE__POWL) && ! defined (HAVE_POWL)
+# define HAVE_POWL 1
+# define powl _powl
+#endif
+
+#if defined (HAVE__SINHF) && ! defined (HAVE_SINHF)
+# define HAVE_SINHF 1
+# define sinhf _sinhf
+#endif
+
+#if defined (HAVE__SINL) && ! defined (HAVE_SINL)
+# define HAVE_SINL 1
+# define sinl _sinl
+#endif
+
+#if defined (HAVE__SQRTF) && ! defined (HAVE_SQRTF)
+# define HAVE_SQRTF 1
+# define sqrtf _sqrtf
+#endif
+
+#if defined (HAVE__SINHL) && ! defined (HAVE_SINHL)
+# define HAVE_SINHL 1
+# define sinhl _sinhl
+#endif
+
+#if defined (HAVE__TANF) && ! defined (HAVE_TANF)
+# define HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (HAVE__SQRTL) && ! defined (HAVE_SQRTL)
+# define HAVE_SQRTL 1
+# define sqrtl _sqrtl
+#endif
+
+#if defined (HAVE__TANHF) && ! defined (HAVE_TANHF)
+# define HAVE_TANHF 1
+# define tanhf _tanhf
+#endif
+
+#if defined (HAVE__TANL) && ! defined (HAVE_TANL)
+# define HAVE_TANF 1
+# define tanf _tanf
+#endif
+
+#if defined (HAVE__STRTOF) && ! defined (HAVE_STRTOF)
+# define HAVE_STRTOF 1
+# define strtof _strtof
+#endif
+
+#if defined (HAVE__TANHL) && ! defined (HAVE_TANHL)
+# define HAVE_TANHL 1
+# define tanhl _tanhl
+#endif
+
+#if defined (HAVE__STRTOLD) && ! defined (HAVE_STRTOLD)
+# define HAVE_STRTOLD 1
+# define strtold _strtold
+#endif
+
+#if defined (HAVE__SINCOS) && ! defined (HAVE_SINCOS)
+# define HAVE_SINCOS 1
+# define sincos _sincos
+#endif
+
+#if defined (HAVE__SINCOSF) && ! defined (HAVE_SINCOSF)
+# define HAVE_SINCOSF 1
+# define sincosf _sincosf
+#endif
+
+#if defined (HAVE__SINCOSL) && ! defined (HAVE_SINCOSL)
+# define HAVE_SINCOSL 1
+# define sincosl _sincosl
+#endif
+
+#if defined (HAVE__FINITE) && ! defined (HAVE_FINITE)
+# define HAVE_FINITE 1
+# define finite _finite
+#endif
+
+#if defined (HAVE__FINITEF) && ! defined (HAVE_FINITEF)
+# define HAVE_FINITEF 1
+# define finitef _finitef
+#endif
+
+#if defined (HAVE__FINITEL) && ! defined (HAVE_FINITEL)
+# define HAVE_FINITEL 1
+# define finitel _finitel
+#endif
+
+#if defined (HAVE__QFINITE) && ! defined (HAVE_QFINITE)
+# define HAVE_QFINITE 1
+# define qfinite _qfinite
+#endif
+
+#if defined (HAVE__FPCLASS) && ! defined (HAVE_FPCLASS)
+# define HAVE_FPCLASS 1
+# define fpclass _fpclass
+#endif
+
+#if defined (HAVE__QFPCLASS) && ! defined (HAVE_QFPCLASS)
+# define HAVE_QFPCLASS 1
+# define qfpclass _qfpclass
+#endif
+
diff --git a/contrib/libstdc++/config/cpu/alpha/bits/atomicity.h b/contrib/libstdc++/config/cpu/alpha/bits/atomicity.h
new file mode 100644
index 0000000..895d87a
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/alpha/bits/atomicity.h
@@ -0,0 +1,76 @@
+// Low-level functions for atomic operations: Alpha version  -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+/* @@@ With gas we can play nice .subsection games to get the
+   non-predicted branch pointing forward.  But Digital assemblers
+   don't understand those directives.  This isn't a terribly
+   important issue, so just ignore it.  */
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word* __mem, int __val)
+{
+  register int __result, __tmp;
+
+  __asm__ __volatile__ (
+      "\n$Lxadd_%=:\n\t"
+      "ldl_l  %0,%3\n\t"
+      "addl   %0,%4,%1\n\t"
+      "stl_c  %1,%2\n\t"
+      "beq    %1,$Lxadd_%=\n\t"
+      "mb"
+      : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
+      : "m" (*__mem), "r"(__val));
+
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  register _Atomic_word __result;
+
+  __asm__ __volatile__ (
+      "\n$Ladd_%=:\n\t"
+      "ldl_l  %0,%2\n\t"
+      "addl   %0,%3,%0\n\t"
+      "stl_c  %0,%1\n\t"
+      "beq    %0,$Ladd_%=\n\t"
+      "mb"
+      : "=&r"(__result), "=m"(*__mem)
+      : "m" (*__mem), "r"(__val));
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/alpha/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/alpha/bits/cpu_limits.h
new file mode 100644
index 0000000..21d31e3
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/alpha/bits/cpu_limits.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_bits 64
+
+#define __glibcpp_long_double_bits 64
+
+#endif
+
+
+
diff --git a/contrib/libstdc++/config/cpu/arm/bits/atomicity.h b/contrib/libstdc++/config/cpu/arm/bits/atomicity.h
new file mode 100644
index 0000000..2363edf
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/arm/bits/atomicity.h
@@ -0,0 +1,221 @@
+// Low-level functions for atomic operations: ARM version  -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H    1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word* __mem, int __val)
+{
+  _Atomic_word __tmp, __tmp2, __result;
+#ifdef __thumb__
+  /* Since this function is inlined, we can't be sure of the alignment.  */
+  __asm__ __volatile__ (
+	"ldr     %0, 4f \n\t"
+	"bx      %0 \n\t"
+	".align 0 \n"
+	"4:\t"
+	".word   0f \n\t"
+	".code 32 \n"
+	"0:\t"
+	"ldr     %0, [%3] \n\t"
+	"add     %1, %0, %4 \n\t"
+	"swp     %2, %1, [%3] \n\t"
+        "cmp     %0, %2 \n\t"
+        "swpne   %1, %2, [%3] \n\t"
+        "bne     0b \n\t"
+	"ldr     %1, 1f \n\t"
+	"bx      %1 \n"
+	"1:\t"
+	".word   2f \n\t"
+	".code 16 \n"
+	"2:\n"
+	: "=&l"(__result), "=&r"(__tmp), "=&r"(__tmp2) 
+	: "r" (__mem), "r"(__val) 
+	: "cc", "memory");
+#else
+  __asm__ __volatile__ (
+	"\n"
+	"0:\t"
+	"ldr     %0, [%3] \n\t"
+	"add     %1, %0, %4 \n\t"
+	"swp     %2, %1, [%3] \n\t"
+	"cmp     %0, %2 \n\t"
+	"swpne   %1, %2, [%3] \n\t"
+	"bne     0b \n\t"
+	""
+	: "=&r"(__result), "=&r"(__tmp), "=&r"(__tmp2) 
+	: "r" (__mem), "r"(__val) 
+	: "cc", "memory");
+#endif
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __tmp, __tmp2, __tmp3;
+#ifdef __thumb__
+  /* Since this function is inlined, we can't be sure of the alignment.  */
+  __asm__ __volatile__ (
+	"ldr     %0, 4f \n\t"
+	"bx      %0 \n\t"
+	".align 0\n"
+	"4:\t"
+	".word   0f \n\t"
+	".code 32 \n"
+	"0:\t"
+	"ldr     %0, [%3] \n\t"
+	"add     %1, %0, %4 \n\t"
+        "swp     %2, %1, [%3] \n\t"
+        "cmp     %0, %2 \n\t"
+        "swpne   %1, %2,[%3] \n\t"
+        "bne     0b \n\t"
+	"ldr     %1, 1f \n\t"
+	"bx      %1 \n"
+	"1:\t"
+	".word   2f \n\t"
+	".code 16 \n"
+	"2:\n"
+	: "=&l"(__tmp), "=&r"(__tmp2), "=&r"(__tmp3) 
+	: "r" (__mem), "r"(__val) 
+	: "cc", "memory");
+#else
+  __asm__ __volatile__ (
+	"\n"
+	"0:\t"
+	"ldr     %0, [%3] \n\t"
+	"add     %1, %0, %4 \n\t"
+	"swp     %2, %1, [%3] \n\t"
+	"cmp     %0, %2 \n\t"
+	"swpne   %1, %2, [%3] \n\t"
+	"bne     0b \n\t"
+	""
+	: "=&r"(__tmp), "=&r"(__tmp2), "=&r"(__tmp3) 
+	: "r" (__mem), "r"(__val) 
+	: "cc", "memory");
+#endif
+}
+
+static inline long
+__attribute__ ((__unused__))
+__always_swap (volatile long *__p, long __newval)
+{
+  long __result;
+#ifdef __thumb__
+  long __tmp;
+  /* Since this function is inlined, we can't be sure of the alignment.  */
+  __asm__ __volatile__ (
+	"ldr     %0, 4f \n\t"
+	"bx      %0 \n\t"
+	".align 0 \n"
+	"4:\t"
+	".word   0f \n\t"
+	".code 32\n"
+	"0:\t"
+	"swp     %0, %3, [%2] \n\t"
+	"ldr     %1, 1f \n\t"
+	"bx      %1 \n"
+	"1:\t"
+	".word   2f \n\t"
+	".code 16 \n"
+	"2:\n"
+	: "=&l"(__result), "=&r"(__tmp)
+	: "r"(__p), "r"(__newval)
+	: "memory");
+#else
+  __asm__ __volatile__ (
+	"\n\t"
+	"swp     %0, %2, [%1] \n\t"
+	""
+	: "=&r"(__result)
+	: "r"(__p), "r"(__newval)
+	: "memory");
+#endif
+  return __result;
+}
+
+static inline int
+__attribute__ ((__unused__))
+__test_and_set (volatile long *__p, long __newval)
+{
+  int __result;
+  long __tmp;
+#ifdef __thumb__
+  /* Since this function is inlined, we can't be sure of the alignment.  */
+  __asm__ __volatile__ (
+	"ldr     %0, 4f \n\t"
+	"bx      %0 \n\t"
+	".align 0 \n"
+	"4:\t"
+	".word   0f \n\t"
+	".code 32 \n"
+	"0:\t"
+	"ldr     %0, [%2] \n\t"
+        "cmp     %0, #0 \n\t"
+        "bne     1f \n\t"
+        "swp     %1, %3, [%2] \n\t"
+        "cmp     %0, %1 \n\t"
+        "swpne   %0, %1, [%2]\n\t"
+        "bne     0b \n"
+	"1:\t"
+	"ldr     %1, 2f \n\t"
+	"bx      %1 \n"
+	"2:\t"
+	".word   3f \n\t"
+	".code 16 \n"
+	"3:"
+	: "=&l"(__result), "=r" (__tmp) 
+	: "r"(__p), "r"(__newval) 
+	: "cc", "memory");
+#else
+  __asm__ __volatile__ (
+	"\n"
+	"0:\t"
+	"ldr     %0, [%2] \n\t"
+	"cmp     %0, #0 \n\t"
+	"bne     1f \n\t"
+	"swp     %1, %3, [%2] \n\t"
+	"cmp     %0, %1 \n\t"
+	"swpne   %0, %1, [%2] \n\t"
+	"bne     0b \n"
+	"1:\n\t"
+	""
+	: "=&r"(__result), "=r" (__tmp) 
+	: "r"(__p), "r"(__newval) 
+	: "cc", "memory");
+#endif
+  return __result;
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/cris/bits/atomicity.h b/contrib/libstdc++/config/cpu/cris/bits/atomicity.h
new file mode 100644
index 0000000..55c374f
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/cris/bits/atomicity.h
@@ -0,0 +1,79 @@
+// Low-level functions for atomic operations: CRIS version  -*- C++ -*-
+
+// Copyright (C) 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+// This entity must not cross a page boundary.
+typedef int _Atomic_word __attribute__ ((__aligned__ (4)));
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (_Atomic_word* __mem, int __val)
+{
+  int __tmp;
+  _Atomic_word __result;
+
+#if (__CRIS_arch_version >= 10)
+  __asm__ __volatile__ (" clearf		\n"
+			"0:			\n"
+			" move.d %4,%2		\n"
+			" move.d [%3],%0	\n"
+			" add.d %0,%2		\n"
+			" ax			\n"
+			" move.d %2,[%3]	\n"
+			" bwf 0b		\n"
+			" clearf		\n"
+			:  "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
+			: "r" (__mem), "g" (__val), "m" (*__mem)
+			: "memory");
+#else
+  __asm__ __volatile__ (" move $ccr,$r9		\n"
+			" di			\n"
+			" move.d %4,%2		\n"
+			" move.d [%3],%0	\n"
+			" add.d %0,%2		\n"
+			" move.d %2,[%3]	\n"
+			" move $r9,$ccr		\n"
+			:  "=&r" (__result), "=m" (*__mem), "=&r" (__tmp)
+			: "r" (__mem), "g" (__val), "m" (*__mem)
+			: "memory", "r9");
+#endif
+
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (_Atomic_word* __mem, int __val)
+{
+  __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/cris/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/cris/bits/cpu_limits.h
new file mode 100644
index 0000000..f0ff04d
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/cris/bits/cpu_limits.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_double_bits 64
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/generic/bits/atomicity.h b/contrib/libstdc++/config/cpu/generic/bits/atomicity.h
new file mode 100644
index 0000000..fca2b83
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/generic/bits/atomicity.h
@@ -0,0 +1,51 @@
+// Low-level functions for atomic operations: Generic version  -*- C++ -*-
+
+// Copyright (C) 1999, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (_Atomic_word* __mem, int __val)
+{
+  _Atomic_word __result = *__mem;
+  *__mem += __val;
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (_Atomic_word* __mem, int __val)
+{
+  *__mem += __val;
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/generic/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/generic/bits/cpu_limits.h
new file mode 100644
index 0000000..0438f7c
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/generic/bits/cpu_limits.h
@@ -0,0 +1,41 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+// Nothing is defined in the generic file.  In that way, we fall back
+// on the defaults in std_limits.h.
+
+// If you need to override these defaults, you can either use a
+// CPU-specific version (in which case you must modify
+// configure.target) or you must add the overrides to your
+// os_defines.h.  In general, if all systems for your CPU use the
+// same values, it is best to use a cpu-specific configuration file.
+
+#endif
+
diff --git a/contrib/libstdc++/config/cpu/generic/bits/limits.h b/contrib/libstdc++/config/cpu/generic/bits/limits.h
new file mode 100644
index 0000000..8fa5a82
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/generic/bits/limits.h
@@ -0,0 +1,40 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+// Nothing is defined in the generic file.  In that way, we fall back
+// on the defaults in std_limits.h.
+
+// If you need to override these defaults, you can either use a
+// CPU-specific version (in which case you must modify
+// configure.target) or you must add the overrides to your
+// os_defines.h.  In general, if all systems for your CPU use the
+// same values, it is best to use a cpu-specific configuration file.
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/i386/bits/atomicity.h b/contrib/libstdc++/config/cpu/i386/bits/atomicity.h
new file mode 100644
index 0000000..4733503
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/i386/bits/atomicity.h
@@ -0,0 +1,59 @@
+// Low-level functions for atomic operations: x86, x < 4 version  -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  register _Atomic_word __result;
+  __asm__ __volatile__ ("lock; xaddl %0,%2"
+			: "=r" (__result) 
+                        : "0" (__val), "m" (*__mem) 
+                        : "memory");
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  __asm__ __volatile__ ("lock; addl %0,%1"
+			: : "ir" (__val), "m" (*__mem) : "memory");
+}
+
+#endif /* atomicity.h */
+
+
+
+
diff --git a/contrib/libstdc++/config/cpu/i386/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/i386/bits/cpu_limits.h
new file mode 100644
index 0000000..be304e2
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/i386/bits/cpu_limits.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_double_bits 80
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/i486/bits/atomicity.h b/contrib/libstdc++/config/cpu/i486/bits/atomicity.h
new file mode 100644
index 0000000..92f5011
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/i486/bits/atomicity.h
@@ -0,0 +1,57 @@
+// Low-level functions for atomic operations: x86, x >= 4 version  -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  register _Atomic_word __result;
+  __asm__ __volatile__ ("lock; xaddl %0,%2"
+			: "=r" (__result) 
+                        : "0" (__val), "m" (*__mem) 
+                        : "memory");
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  __asm__ __volatile__ ("lock; addl %0,%1"
+			: : "ir" (__val), "m" (*__mem) : "memory");
+}
+
+#endif /* atomicity.h */
+
+
diff --git a/contrib/libstdc++/config/cpu/ia64/bits/atomicity.h b/contrib/libstdc++/config/cpu/ia64/bits/atomicity.h
new file mode 100644
index 0000000..e28e149
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/ia64/bits/atomicity.h
@@ -0,0 +1,51 @@
+// Low-level functions for atomic operations: IA64 version  -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H       1
+
+#include 
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  return __sync_fetch_and_add (__mem, __val);
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  __sync_fetch_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/ia64/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/ia64/bits/cpu_limits.h
new file mode 100644
index 0000000..735f7d5
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/ia64/bits/cpu_limits.h
@@ -0,0 +1,36 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_bits 64
+
+// While sizeof(long double) == 16, the format is the same as the x86.
+#define __glibcpp_long_double_bits 80
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/m68k/bits/atomicity.h b/contrib/libstdc++/config/cpu/m68k/bits/atomicity.h
new file mode 100644
index 0000000..c5d3394
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/m68k/bits/atomicity.h
@@ -0,0 +1,158 @@
+// Low-level functions for atomic operations: m68k version -*- C++ -*-
+
+// 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
+// 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+#if defined(__mc68020__) || defined(__mc68030__) \
+    || defined(__mc68040__) || defined(__mc68060__)
+// These variants support compare-and-swap.
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  register _Atomic_word __result = *__mem;
+  register _Atomic_word __temp;
+  __asm__ __volatile__ ("1: move%.l %0,%1\n\t"
+			"add%.l %2,%1\n\t"
+			"cas%.l %0,%1,%3\n\t"
+			"jbne 1b"
+			: "=d" (__result), "=&d" (__temp)
+			: "d" (__val), "m" (*__mem), "0" (__result)
+			: "memory");
+  return __result;
+}
+
+#elif defined(__rtems__)
+  /*
+   * TAS/JBNE is unsafe on systems with strict priority-based scheduling.
+   * Disable interrupts, which we can do only from supervisor mode.
+   */
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __result;
+  short __level, __tmpsr;
+  __asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
+                       : "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
+
+  __result = *__mem;
+  *__mem = __result + __val;
+
+  __asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
+
+  return __result;
+}
+
+#elif !defined(__mcf5200__) && !defined(__mcf5300__)
+// 68000, 68010, cpu32 and 5400 support test-and-set.
+
+template 
+struct __Atomicity_lock
+{
+  static volatile unsigned char _S_atomicity_lock;
+};
+
+template 
+volatile unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
+
+template volatile unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __result;
+
+  __asm__ __volatile__("1: tas %0\n\tjbne 1b"
+		       : "=m"(__Atomicity_lock<0>::_S_atomicity_lock)
+		       : "m"(__Atomicity_lock<0>::_S_atomicity_lock));
+
+  __result = *__mem;
+  *__mem = __result + __val;
+
+  __Atomicity_lock<0>::_S_atomicity_lock = 0;
+
+  return __result;
+}
+
+#elif defined(__vxWorks__) || defined(__embedded__)
+// The best we can hope for is to disable interrupts, which we
+// can only do from supervisor mode.
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __result;
+  short __level, __tmpsr;
+  __asm__ __volatile__ ("move%.w %%sr,%0\n\tor%.l %0,%1\n\tmove%.w %1,%%sr"
+		  	: "=d"(__level), "=d"(__tmpsr) : "1"(0x700));
+
+  __result = *__mem;
+  *__mem = __result + __val;
+
+  __asm__ __volatile__ ("move%.w %0,%%sr" : : "d"(__level));
+
+  return __result;
+}
+
+#else
+// These variants do not support any atomic operations at all.
+
+#warning "__exchange_and_add is not atomic for this target"
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __result;
+
+  __result = *__mem;
+  *__mem = __result + __val;
+
+  return __result;
+}
+
+#endif /* CAS / IRQ / TAS */
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  // Careful: using add.l with a memory destination is not
+  // architecturally guaranteed to be atomic.
+  (void) __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/m68k/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/m68k/bits/cpu_limits.h
new file mode 100644
index 0000000..07e4e03
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/m68k/bits/cpu_limits.h
@@ -0,0 +1,35 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_double_bits 96
+
+#endif
+
+
diff --git a/contrib/libstdc++/config/cpu/mips/bits/atomicity.h b/contrib/libstdc++/config/cpu/mips/bits/atomicity.h
new file mode 100644
index 0000000..7878c6e
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/mips/bits/atomicity.h
@@ -0,0 +1,78 @@
+// Low-level functions for atomic operations. MIPS II version.
+
+// Copyright (C) 2001 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 _BITS_ATOMICITY_H 
+#define _BITS_ATOMICITY_H 1
+
+// #include 
+// #ifdef (_MIPS_ISA_MIPS2)
+
+typedef int _Atomic_word;
+
+static inline int
+__attribute__ ((unused))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  int __result, __tmp;
+
+  __asm__ __volatile__
+    ("/* Inline exchange & add */\n\t"
+     "1:\n\t"
+     "ll	%0,%3\n\t"
+     "addu	%1,%4,%0\n\t"
+     "sc	%1,%2\n\t"
+     "beqz	%1,1b\n\t"
+     "/* End exchange & add */"
+     : "=&r"(__result), "=&r"(__tmp), "=m"(*__mem)
+     : "m" (*__mem), "r"(__val)
+     : "memory");
+
+  return __result;
+}
+
+static inline void
+__attribute__ ((unused))
+__atomic_add (volatile _Atomic_word *__mem, int __val)
+{
+  int __result;
+
+  __asm__ __volatile__
+    ("/* Inline atomic add */\n\t"
+     "1:\n\t"
+     "ll	%0,%2\n\t"
+     "addu	%0,%3,%0\n\t"
+     "sc	%0,%1\n\t"
+     "beqz	%0,1b\n\t"
+     "/* End atomic add */"
+     : "=&r"(__result), "=m"(*__mem)
+     : "m" (*__mem), "r"(__val)
+     : "memory");
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/mmix/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/mmix/bits/cpu_limits.h
new file mode 100644
index 0000000..e40ce97
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/mmix/bits/cpu_limits.h
@@ -0,0 +1,34 @@
+// 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 _GLIBCPP_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_bits 64
+#define __glibcpp_long_double_bits 64
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/powerpc/bits/atomicity.h b/contrib/libstdc++/config/cpu/powerpc/bits/atomicity.h
new file mode 100644
index 0000000..05addba
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/powerpc/bits/atomicity.h
@@ -0,0 +1,112 @@
+// Low-level functions for atomic operations: PowerPC version  -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word* __mem, int __val)
+{
+  _Atomic_word __tmp, __res;
+  __asm__ __volatile__ (
+	"/* Inline exchange & add */\n"
+	"0:\t"
+	"lwarx    %0,0,%2 \n\t"
+	"add%I3   %1,%0,%3 \n\t"
+	"stwcx.   %1,0,%2 \n\t"
+	"bne-     0b \n\t"
+	"/* End exchange & add */"
+	: "=&b"(__res), "=&r"(__tmp)
+	: "r" (__mem), "Ir"(__val)
+	: "cr0", "memory");
+  return __res;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __tmp;
+  __asm__ __volatile__ (
+	"/* Inline atomic add */\n"
+	"0:\t"
+	"lwarx    %0,0,%1 \n\t"
+	"add%I2   %0,%0,%2 \n\t"
+	"stwcx.   %0,0,%1 \n\t"
+	"bne-     0b \n\t"
+	"/* End atomic add */"
+	: "=&b"(__tmp)
+	: "r" (__mem), "Ir"(__val)
+	: "cr0", "memory");
+}
+
+static inline long
+__attribute__ ((__unused__))
+__always_swap (volatile long *__p, long int __newval)
+{
+  long __res;
+  __asm__ __volatile__ (
+	"/* Inline always swap */\n"
+	"0:\t"
+	"lwarx    %0,0,%1 \n\t"
+	"stwcx.   %2,0,%1 \n\t"
+	"bne-     0b \n\t"
+	"/* End always swap */"
+	: "=&r"(__res)
+	: "r"(__p), "r"(__newval)
+	: "cr0", "memory");
+  return __res;
+}
+
+static inline int
+__attribute__ ((__unused__))
+__test_and_set (volatile long *__p, long int __newval)
+{
+  int __res;
+  __asm__ __volatile__ (
+	"/* Inline test & set */\n"
+	"0:\t"
+	"lwarx    %0,0,%1 \n\t"
+	"cmpwi    %0,0 \n\t"
+	"bne-     1f \n\t"
+	"stwcx.   %2,0,%1 \n\t"
+	"bne-     0b \n"
+	"1:\n\t"
+	"/* End test & set */"
+	: "=&r"(__res)
+	: "r"(__p), "r"(__newval)
+	: "cr0", "memory");
+  return __res;
+}
+
+#endif /* atomicity.h */
+
diff --git a/contrib/libstdc++/config/cpu/powerpc/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/powerpc/bits/cpu_limits.h
new file mode 100644
index 0000000..87d7883
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/powerpc/bits/cpu_limits.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#ifndef __LONG_DOUBLE_128__
+#define __glibcpp_long_double_bits 64
+#endif
+
+#endif
+
+
+
diff --git a/contrib/libstdc++/config/cpu/s390/bits/atomicity.h b/contrib/libstdc++/config/cpu/s390/bits/atomicity.h
new file mode 100644
index 0000000..331c29a
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/s390/bits/atomicity.h
@@ -0,0 +1,60 @@
+// Low-level functions for atomic operations: S/390 version  -*- C++ -*-
+
+// Copyright (C) 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word 
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  register _Atomic_word __old_val, __new_val;
+
+  __asm__ __volatile__ ("   l     %0,0(%2)\n"
+                        "0: lr    %1,%0\n"
+                        "   ar    %1,%3\n"
+                        "   cs    %0,%1,0(%2)\n"
+                        "   jl    0b"
+                        : "=&d" (__old_val), "=&d" (__new_val)
+                        : "a" (__mem), "d" (__val) : "cc", "memory" );
+  return __old_val;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word *__mem, int __val)
+{
+  __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
+
+
diff --git a/contrib/libstdc++/config/cpu/s390/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/s390/bits/cpu_limits.h
new file mode 100644
index 0000000..f0ff04d
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/s390/bits/cpu_limits.h
@@ -0,0 +1,33 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_double_bits 64
+
+#endif
diff --git a/contrib/libstdc++/config/cpu/sparc/sparc32/bits/atomicity.h b/contrib/libstdc++/config/cpu/sparc/sparc32/bits/atomicity.h
new file mode 100644
index 0000000..aa639e4
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/sparc/sparc32/bits/atomicity.h
@@ -0,0 +1,88 @@
+// Low-level functions for atomic operations: Sparc32 version  -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+template 
+struct __Atomicity_lock
+{
+  static unsigned char _S_atomicity_lock;
+};
+
+template 
+unsigned char __Atomicity_lock<__inst>::_S_atomicity_lock = 0;
+
+template unsigned char __Atomicity_lock<0>::_S_atomicity_lock;
+
+static int
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word* __mem, int __val)
+{
+  _Atomic_word __result, __tmp;
+
+  __asm__ __volatile__("1:	ldstub	[%1], %0\n\t"
+		       "	cmp	%0, 0\n\t"
+		       "	bne	1b\n\t"
+		       "	 nop"
+		       : "=&r" (__tmp)
+		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
+		       : "memory");
+  __result = *__mem;
+  *__mem += __val;
+  __asm__ __volatile__("stb	%%g0, [%0]"
+		       : /* no outputs */
+		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
+		       : "memory");
+  return __result;
+}
+
+static void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  _Atomic_word __tmp;
+
+  __asm__ __volatile__("1:	ldstub	[%1], %0\n\t"
+		       "	cmp	%0, 0\n\t"
+		       "	bne	1b\n\t"
+		       "	 nop"
+		       : "=&r" (__tmp)
+		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
+		       : "memory");
+  *__mem += __val;
+  __asm__ __volatile__("stb	%%g0, [%0]"
+		       : /* no outputs */
+		       : "r" (&__Atomicity_lock<0>::_S_atomicity_lock)
+		       : "memory");
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/sparc/sparc64/bits/atomicity.h b/contrib/libstdc++/config/cpu/sparc/sparc64/bits/atomicity.h
new file mode 100644
index 0000000..e13ca82
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/sparc/sparc64/bits/atomicity.h
@@ -0,0 +1,70 @@
+// Low-level functions for atomic operations: Sparc64 version  -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef long _Atomic_word;
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  _Atomic_word __tmp1, __tmp2;
+
+  __asm__ __volatile__("1:	ldx	[%2], %0\n\t"
+		       "	add	%0, %3, %1\n\t"
+		       "	casx	[%2], %0, %1\n\t"
+		       "	sub	%0, %1, %0\n\t"
+		       "	brnz,pn	%0, 1b\n\t"
+		       "	 nop"
+		       : "=&r" (__tmp1), "=&r" (__tmp2)
+		       : "r" (__mem), "r" (__val)
+		       : "memory");
+  return __tmp2;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  _Atomic_word __tmp1, __tmp2;
+
+  __asm__ __volatile__("1:	ldx	[%2], %0\n\t"
+		       "	add	%0, %3, %1\n\t"
+		       "	casx	[%2], %0, %1\n\t"
+		       "	sub	%0, %1, %0\n\t"
+		       "	brnz,pn	%0, 1b\n\t"
+		       "	 nop"
+		       : "=&r" (__tmp1), "=&r" (__tmp2)
+		       : "r" (__mem), "r" (__val)
+		       : "memory");
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/x86-64/bits/atomicity.h b/contrib/libstdc++/config/cpu/x86-64/bits/atomicity.h
new file mode 100644
index 0000000..15ff07f
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/x86-64/bits/atomicity.h
@@ -0,0 +1,55 @@
+// Low-level functions for atomic operations: AMD x86-64, -*- C++ -*-
+
+// Copyright (C) 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+typedef int _Atomic_word;
+
+static inline _Atomic_word
+__attribute__ ((__unused__))
+__exchange_and_add (volatile _Atomic_word *__mem, int __val)
+{
+  register _Atomic_word __result;
+  __asm__ __volatile__ ("lock; xaddl %0,%2"
+			: "=r" (__result)
+                        : "0" (__val), "m" (*__mem)
+                        : "memory");
+  return __result;
+}
+
+static inline void
+__attribute__ ((__unused__))
+__atomic_add (volatile _Atomic_word* __mem, int __val)
+{
+  __asm__ __volatile__ ("lock; addl %0,%1"
+			: : "ir" (__val), "m" (*__mem) : "memory");
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/cpu/x86-64/bits/cpu_limits.h b/contrib/libstdc++/config/cpu/x86-64/bits/cpu_limits.h
new file mode 100644
index 0000000..7de187e
--- /dev/null
+++ b/contrib/libstdc++/config/cpu/x86-64/bits/cpu_limits.h
@@ -0,0 +1,35 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_bits 64
+
+#define __glibcpp_long_double_bits 80
+
+#endif
diff --git a/contrib/libstdc++/config/io/basic_file_libio.cc b/contrib/libstdc++/config/io/basic_file_libio.cc
new file mode 100644
index 0000000..60eb006
--- /dev/null
+++ b/contrib/libstdc++/config/io/basic_file_libio.cc
@@ -0,0 +1,194 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+#include 
+
+namespace std 
+{
+  // __basic_file definitions
+  __basic_file::__basic_file(__c_lock* __lock)
+  {
+#ifdef _IO_MTSAFE_IO
+    _lock = __lock;
+#endif
+    // Don't set the orientation of the stream when initializing.
+#ifdef _GLIBCPP_USE_WCHAR_T
+    _IO_no_init(this, 0, 0, &_M_wfile, 0);
+#else /* !defined(_GLIBCPP_USE_WCHAR_T) */
+    _IO_no_init(this, 0, 0, NULL, 0);
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
+    _IO_JUMPS((_IO_FILE_plus *) this) = &_IO_file_jumps;
+    _IO_file_init((_IO_FILE_plus*)this);
+  }
+
+  // NB: Unused.
+  int 
+  __basic_file::overflow(int __c) 
+  { return _IO_file_overflow(this, __c); }
+
+  // NB: Unused.
+  int 
+  __basic_file::underflow()  
+  { return _IO_file_underflow(this); }
+
+  // NB: Unused.
+  int 
+  __basic_file::uflow()  
+  { return _IO_default_uflow(this); }
+
+  // NB: Unused.
+  int 
+  __basic_file::pbackfail(int __c) 
+  { return _IO_default_pbackfail(this, __c); }
+ 
+  streamsize 
+  __basic_file::xsputn(const char* __s, streamsize __n)
+  { return _IO_file_xsputn(this, __s, __n); }
+
+  streamoff
+  __basic_file::seekoff(streamoff __off, ios_base::seekdir __way, 
+			      ios_base::openmode __mode)
+  { return _IO_file_seekoff(this, __off, __way, __mode); }
+
+  streamoff
+  __basic_file::seekpos(streamoff __pos, ios_base::openmode __mode)
+  { return _IO_file_seekoff(this, __pos, ios_base::beg, __mode); }
+
+ // NB: Unused.
+  streambuf* 
+  __basic_file::setbuf(char* __b, int __len)
+  { return (streambuf*) _IO_file_setbuf(this,__b, __len); }
+
+ int 
+  __basic_file::sync()
+  { return _IO_file_sync(this); }
+
+  // NB: Unused.
+  int 
+  __basic_file::doallocate() 
+  { return _IO_file_doallocate(this); }
+
+  // __basic_file definitions
+#ifdef _GLIBCPP_USE_WCHAR_T
+  __basic_file::__basic_file(__c_lock* __lock)
+  {
+#ifdef _IO_MTSAFE_IO
+    _lock = __lock;
+#endif
+    // Don't set the orientation of the stream when initializing.
+    _IO_no_init(this, 0, 0, &_M_wfile, &_IO_wfile_jumps);
+    _IO_JUMPS((_IO_FILE_plus *) this) = &_IO_wfile_jumps;
+    _IO_file_init((_IO_FILE_plus*)this);
+
+    // In addition, need to allocate the buffer...
+    _IO_wdoallocbuf(this);
+    // Setup initial positions for this buffer...
+    //    if (!(_flags & _IO_NO_READS))
+    _IO_wsetg(this, _wide_data->_IO_buf_base, _wide_data->_IO_buf_base,
+	      _wide_data->_IO_buf_base);
+    //    if (!(_flags & _IO_NO_WRITES))
+    _IO_wsetp(this, _wide_data->_IO_buf_base, _wide_data->_IO_buf_base);
+    
+    // Setup codecvt bits...
+    _codecvt = &__c_libio_codecvt;
+    
+    // Do the same for narrow bits...
+    if (_IO_write_base == NULL)
+      {
+	_IO_doallocbuf(this);
+	//      if (!(_flags & _IO_NO_READS))
+	_IO_setg(this, _IO_buf_base, _IO_buf_base, _IO_buf_base);
+	//    if (!(_flags & _IO_NO_WRITES))
+	_IO_setp(this, _IO_buf_base, _IO_buf_base);
+      }
+  }
+
+ int 
+  __basic_file::overflow(int __c) 
+  { return _IO_wfile_overflow(this, __c); }
+
+  int 
+  __basic_file::underflow()  
+  { return _IO_wfile_underflow(this); }
+
+  // NB: Unused.
+  int 
+  __basic_file::uflow()  
+  { return _IO_wdefault_uflow(this); }
+
+  // NB: Unused.
+  int 
+  __basic_file::pbackfail(int __c) 
+  { return _IO_wdefault_pbackfail(this, __c); }
+
+  streamsize 
+  __basic_file::xsputn(const wchar_t* __s, streamsize __n)
+  { return _IO_wfile_xsputn(this, __s, __n); }
+  
+  streamoff
+  __basic_file::seekoff(streamoff __off, ios_base::seekdir __way, 
+				 ios_base::openmode __mode)
+  { return _IO_wfile_seekoff(this, __off, __way, __mode); }
+
+  streamoff
+  __basic_file::seekpos(streamoff __pos, ios_base::openmode __mode)
+  { return _IO_wfile_seekoff(this, __pos, ios_base::beg, __mode); }
+
+   streambuf* 
+  __basic_file::setbuf(wchar_t* __b, int __len)
+  { return (streambuf*) _IO_wfile_setbuf(this,__b, __len); }
+
+   int 
+  __basic_file::sync()
+  { return _IO_wfile_sync(this); }
+
+  int 
+  __basic_file::doallocate() 
+  { return _IO_wfile_doallocate(this); }
+#endif
+
+  // Need to instantiate base class here for type-info bits, etc
+  template struct __basic_file_base;
+  template class __basic_file;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template struct __basic_file_base;
+  template class __basic_file;
+#endif
+}  // namespace std
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/config/io/basic_file_libio.h b/contrib/libstdc++/config/io/basic_file_libio.h
new file mode 100644
index 0000000..57d83c4
--- /dev/null
+++ b/contrib/libstdc++/config/io/basic_file_libio.h
@@ -0,0 +1,498 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file basic_file.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BASIC_FILE
+#define _CPP_BASIC_FILE 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+namespace std 
+{
+  // Ulrich is going to make some detailed comment here, explaining
+  // all this unpleasantness, providing detailed performance analysis
+  // as to why we have to do all this lame vtable hacking instead of a
+  // sane, function-based approach. This verbiage will provide a clear
+  // and detailed description of the whole object-layout,
+  // vtable-swapping, sordid history of this hack.
+  template
+    struct __basic_file_base: public __c_file_type
+    {
+      virtual 
+      ~__basic_file_base() { };
+
+      virtual int 
+      overflow(int __c = EOF) = 0;
+
+      virtual int 
+      underflow() = 0;
+
+      virtual int 
+      uflow() = 0;
+
+      virtual int 
+      pbackfail(int __c) = 0;
+
+      virtual streamsize 
+      xsputn(const _CharT* __s, streamsize __n) = 0;
+
+      virtual streamsize 
+      xsgetn(_CharT* __s, streamsize __n) = 0;
+
+      virtual streamoff
+      seekoff(streamoff __off, ios_base::seekdir __way,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out) = 0;
+
+      virtual streamoff
+      seekpos(streamoff __pos, 
+	      ios_base::openmode __mode = ios_base::in | ios_base::out) = 0;
+
+      virtual streambuf* 
+      setbuf(_CharT* __b, int __len) = 0;
+
+      virtual int 
+      sync() = 0;
+
+      virtual int 
+      doallocate() = 0;
+
+      virtual streamsize 
+      sys_read(_CharT* __s, streamsize __n) = 0;
+
+      virtual streamsize 
+      sys_write(const _CharT* __s, streamsize __n) = 0;
+
+      virtual streamoff
+      sys_seek(streamoff __off, ios_base::seekdir __way) = 0;
+
+      virtual int 
+      sys_close() = 0;
+
+      virtual int 
+      sys_stat(void* __v) = 0;
+
+      virtual int 
+      showmanyc() = 0;
+
+      virtual void 
+      imbue(void* __v) = 0;
+    };
+
+  // Some of these member functions are based on libio/filebuf.cc.
+  // Also note that the order and number of virtual functions has to precisely
+  // match the order and number in the _IO_jump_t struct defined in libioP.h.
+  template
+    class __basic_file: public __basic_file_base<_CharT>
+    {
+# ifdef _GLIBCPP_USE_WCHAR_T
+      __c_wfile_type	_M_wfile;
+# endif
+
+    public:
+      __basic_file(__c_lock* __lock = 0);
+      
+      void 
+      _M_open_mode(ios_base::openmode __mode, int& __p_mode, int& __rw_mode, 
+		   char* __c_mode);
+      
+      // Equivalent to the normal fopen function.
+      __basic_file* 
+      open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+      // Used for opening the standard streams, cin, cout, cerr, clog,
+      // and their wide-stream equivalents. Instead of calling open, it
+      // just sets
+      //  - for libio:  __c_file_type->_fileno and the respective _flags bits
+      //  - for stdio:  _M_cfile = __file and some internal flags
+      // and returns.
+      __basic_file*
+      sys_open(__c_file_type* __file, ios_base::openmode __mode);
+
+      _CharT
+      sys_getc();
+
+      _CharT
+      sys_ungetc(_CharT);
+
+      __basic_file* 
+      close(); 
+
+      bool 
+      is_open();
+
+      int 
+      fd();
+
+      // NB: Must match FILE specific jump table starting here--this
+      // means all virtual functions starting with the dtor must match,
+      // slot by slot. For glibc-based dystems, this means the _IO_FILE
+      // as the FILE struct and _IO_jump_t as the jump table.
+      virtual 
+      ~__basic_file(); // Takes the place of __finish.
+
+      virtual int 
+      overflow(int __c = EOF);
+
+      virtual int 
+      underflow();
+
+      virtual int 
+      uflow();
+
+      virtual int 
+      pbackfail(int __c);
+
+      // A complex "write" function that sets all of __c_file_type's
+      // pointers and associated data members correctly and manages its
+      // relation to the external byte sequence.
+      virtual streamsize 
+      xsputn(const _CharT* __s, streamsize __n);
+
+      // A complex "read" function that sets all of __c_file_type's
+      // pointers and associated data members correctly and manages its
+      // relation to the external byte sequence.
+      virtual streamsize 
+      xsgetn(_CharT* __s, streamsize __n);
+
+      // A complex "seekoff" function that sets all of __c_file_type's
+      // pointers and associated data members correctly and manages its
+      // relation to the external byte sequence.
+      virtual streamoff
+      seekoff(streamoff __off, ios_base::seekdir __way,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      // A complex "seekpos" function that sets all of __c_file_type's
+      // pointers and associated data members correctly and manages its
+      // relation to the external byte sequence.
+      virtual streamoff
+      seekpos(streamoff __pos, 
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual streambuf* 
+      setbuf(_CharT* __b, int __len);
+
+      virtual int 
+      sync();
+
+      virtual int 
+      doallocate();
+
+      // A simple read function for the external byte sequence, that
+      // does no mucking around with or setting of the pointers or flags
+      // in __c_file_type.
+      virtual streamsize 
+      sys_read(_CharT* __s, streamsize __n);
+
+      // A simple write function for the external byte sequence, that
+      // does no mucking around with or setting of the pointers or flags
+      // in __c_file_type.
+      virtual streamsize 
+      sys_write(const _CharT* __s, streamsize __n);
+
+      // A simple seek function for the external byte sequence, that
+      // does no mucking around with or setting of the pointers or flags
+      // in __c_file_type.
+      virtual streamoff
+      sys_seek(streamoff __off, ios_base::seekdir __way);
+
+      virtual int 
+      sys_close();
+
+      virtual int 
+      sys_stat(void* __v);
+
+      virtual int 
+      showmanyc();
+
+      virtual void 
+      imbue(void* __v);
+    };
+
+  // __basic_file specializations
+  template<>
+    __basic_file::__basic_file(__c_lock* __lock);
+
+  template<>
+    int 
+    __basic_file::overflow(int __c);
+
+  template<>
+    int 
+    __basic_file::underflow();
+
+  template<>
+    int 
+    __basic_file::uflow();
+
+  template<>
+    int 
+    __basic_file::pbackfail(int __c);
+
+  template<>
+    streamsize 
+    __basic_file::xsputn(const char* __s, streamsize __n);
+
+  template<>
+    streamoff
+    __basic_file::seekoff(streamoff __off, ios_base::seekdir __way, 
+				ios_base::openmode __mode);
+
+  template<>
+    streamoff
+    __basic_file::seekpos(streamoff __pos, ios_base::openmode __mode);
+
+  template<>
+    streambuf* 
+    __basic_file::setbuf(char* __b, int __len);
+
+  template<>
+    int 
+    __basic_file::sync();
+
+  template<>
+    int 
+    __basic_file::doallocate();
+
+  // __basic_file specializations
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    __basic_file::__basic_file(__c_lock* __lock);
+
+  template<>
+    int 
+    __basic_file::overflow(int __c);
+
+  template<>
+    int 
+    __basic_file::underflow();
+
+  template<>
+    int 
+    __basic_file::uflow();
+
+  template<>
+    int 
+    __basic_file::pbackfail(int __c);
+
+  template<>
+    streamsize 
+    __basic_file::xsputn(const wchar_t* __s, streamsize __n);
+
+  template<>
+    streamoff
+    __basic_file::seekoff(streamoff __off, ios_base::seekdir __way, 
+				ios_base::openmode __mode);
+
+  template<>
+    streamoff
+    __basic_file::seekpos(streamoff __pos, ios_base::openmode __mode);
+
+  template<>
+    streambuf* 
+    __basic_file::setbuf(wchar_t* __b, int __len);
+
+  template<>
+    int 
+    __basic_file::sync();
+
+  template<>
+    int 
+    __basic_file::doallocate();
+#endif
+
+  template
+    __basic_file<_CharT>::~__basic_file()
+    { _IO_file_finish(this, 0); }
+      
+  template
+    void 
+    __basic_file<_CharT>::_M_open_mode(ios_base::openmode __mode, 
+				       int& __p_mode, int& __rw_mode, 
+				       char* /*__c_mode*/)
+    {  
+#ifdef O_BINARY
+      bool __testb = __mode & ios_base::binary;
+#endif
+      bool __testi = __mode & ios_base::in;
+      bool __testo = __mode & ios_base::out;
+      bool __testt = __mode & ios_base::trunc;
+      bool __testa = __mode & ios_base::app;
+      
+      if (!__testi && __testo && !__testt && !__testa)
+	{
+	  __p_mode = O_WRONLY | O_TRUNC | O_CREAT;
+	  __rw_mode = _IO_NO_READS;
+	}
+      if (!__testi && __testo && !__testt && __testa)
+	{
+	  __p_mode = O_WRONLY | O_APPEND | O_CREAT;
+	  __rw_mode = _IO_NO_READS | _IO_IS_APPENDING;
+	}
+      if (!__testi && __testo && __testt && !__testa)
+	{
+	  __p_mode = O_WRONLY | O_TRUNC | O_CREAT;
+	  __rw_mode = _IO_NO_READS;
+	}
+      if (__testi && !__testo && !__testt && !__testa)
+	{
+	  __p_mode = O_RDONLY;
+	  __rw_mode = _IO_NO_WRITES;
+	}
+      if (__testi && __testo && !__testt && !__testa)
+	{
+	  __p_mode = O_RDWR;
+	  __rw_mode = 0;
+	}
+      if (__testi && __testo && __testt && !__testa)
+	{
+	  __p_mode = O_RDWR | O_TRUNC | O_CREAT;
+	  __rw_mode = 0;
+	}
+#ifdef O_BINARY
+      if (__testb)
+	__p_mode |= O_BINARY;
+#endif	   
+    }
+  
+  template
+    __basic_file<_CharT>*
+    __basic_file<_CharT>::sys_open(__c_file_type* __f, 
+				   ios_base::openmode __mode) 
+    {
+      __basic_file* __ret = NULL;
+      int __fd = fileno(__f);
+      int __p_mode = 0;
+      int __rw_mode = _IO_NO_READS + _IO_NO_WRITES; 
+      char __c_mode[4];
+      
+      _M_open_mode(__mode, __p_mode, __rw_mode, __c_mode);
+
+      if (!_IO_file_is_open(this))
+	{
+	  _fileno = __fd;
+	  _flags &= ~(_IO_NO_READS + _IO_NO_WRITES);
+	  _flags |= _IO_DELETE_DONT_CLOSE;
+	  _offset = _IO_pos_BAD;
+	  int __mask = _IO_NO_READS + _IO_NO_WRITES + _IO_IS_APPENDING;
+	  _IO_mask_flags(this, __rw_mode, __mask);
+	}
+
+      return __ret;
+    }
+  
+  template
+    __basic_file<_CharT>* 
+    __basic_file<_CharT>::open(const char* __name, ios_base::openmode __mode, 
+			       int __prot)
+    {
+      __basic_file* __ret = NULL;
+      int __p_mode = 0;
+      int __rw_mode = _IO_NO_READS + _IO_NO_WRITES; 
+      char __c_mode[4];
+
+      _M_open_mode(__mode, __p_mode, __rw_mode, __c_mode);
+      if (!_IO_file_is_open(this))
+	{
+	  __c_file_type* __f;
+	  __f = _IO_file_open(this, __name, __p_mode, __prot, __rw_mode, 0);
+	  __ret = __f ? this: NULL;
+	}
+      return __ret;
+    }
+  
+  template
+    bool 
+    __basic_file<_CharT>::is_open() { return _fileno >= 0; }
+  
+  template
+    __basic_file<_CharT>* 
+    __basic_file<_CharT>::close()
+    { 
+      return _IO_file_close_it(this) ? static_cast<__basic_file*>(NULL) : this;
+    }
+ 
+  template
+    streamsize 
+    __basic_file<_CharT>::xsgetn(_CharT* __s, streamsize __n)
+    { return _IO_file_xsgetn(this, __s, __n); }
+
+  // NB: Unused.
+  template
+    streamsize 
+    __basic_file<_CharT>::sys_read(_CharT* __s, streamsize __n) 
+    { return _IO_file_read(this, __s, __n); }
+
+  // NB: Unused.    
+  template
+    streamsize 
+    __basic_file<_CharT>::sys_write(const _CharT* __s, streamsize __n) 
+    { return _IO_file_write(this, __s, __n); }
+
+  // NB: Unused.
+  template
+    streamoff
+    __basic_file<_CharT>::sys_seek(streamoff __pos, ios_base::seekdir __way)
+    { return _IO_file_seek(this, __pos, __way); }
+  
+  // NB: Unused.
+  template
+    int 
+    __basic_file<_CharT>::sys_close() 
+    { return _IO_file_close(this); }
+
+  // NB: Unused.
+  template
+    int 
+    __basic_file<_CharT>::sys_stat(void* __v) 
+    { return _IO_file_stat(this, __v); }
+
+  // NB: Unused.
+  template
+    int 
+    __basic_file<_CharT>::showmanyc() { return EOF; }
+
+  // NB: Unused.
+  template
+    void 
+    __basic_file<_CharT>::imbue(void* /*__v*/) { }
+}  // namespace std
+
+#endif	// _CPP_BASIC_FILE
diff --git a/contrib/libstdc++/config/io/basic_file_stdio.cc b/contrib/libstdc++/config/io/basic_file_stdio.cc
new file mode 100644
index 0000000..93ca6bc
--- /dev/null
+++ b/contrib/libstdc++/config/io/basic_file_stdio.cc
@@ -0,0 +1,187 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+#include 
+
+namespace std 
+{
+  // Definitions for __basic_file.
+  __basic_file::__basic_file(__c_lock* /*__lock*/) 
+  : _M_cfile(NULL), _M_cfile_created(false) { }
+
+  __basic_file::~__basic_file()
+  { this->close(); }
+      
+  void 
+  __basic_file::_M_open_mode(ios_base::openmode __mode, int&, int&, 
+				   char* __c_mode)
+  {  
+    bool __testb = __mode & ios_base::binary;
+    bool __testi = __mode & ios_base::in;
+    bool __testo = __mode & ios_base::out;
+    bool __testt = __mode & ios_base::trunc;
+    bool __testa = __mode & ios_base::app;
+      
+    if (!__testi && __testo && !__testt && !__testa)
+      strcpy(__c_mode, "w");
+    if (!__testi && __testo && !__testt && __testa)
+      strcpy(__c_mode, "a");
+    if (!__testi && __testo && __testt && !__testa)
+      strcpy(__c_mode, "w");
+    if (__testi && !__testo && !__testt && !__testa)
+      strcpy(__c_mode, "r");
+    if (__testi && __testo && !__testt && !__testa)
+      strcpy(__c_mode, "r+");
+    if (__testi && __testo && __testt && !__testa)
+      strcpy(__c_mode, "w+");
+    if (__testb)
+      strcat(__c_mode, "b");
+  }
+  
+  __basic_file*
+  __basic_file::sys_open(__c_file* __file, ios_base::openmode) 
+  {
+    __basic_file* __ret = NULL;
+    if (!this->is_open() && __file)
+      {
+ 	_M_cfile = __file;
+ 	_M_cfile_created = false;
+  	__ret = this;
+      }
+    return __ret;
+  }
+  
+  __basic_file*
+  __basic_file::sys_open(int __fd, ios_base::openmode __mode, 
+			       bool __del) 
+  {
+    __basic_file* __ret = NULL;
+    int __p_mode = 0;
+    int __rw_mode = 0;
+    char __c_mode[4];
+    
+    _M_open_mode(__mode, __p_mode, __rw_mode, __c_mode);
+    if (!this->is_open() && (_M_cfile = fdopen(__fd, __c_mode)))
+      {
+	// Iff __del is true, then close will fclose the fd.
+	_M_cfile_created = __del;
+
+	if (__fd == 0)
+	  setvbuf(_M_cfile, reinterpret_cast(NULL), _IONBF, 0);
+
+	__ret = this;
+      }
+    return __ret;
+  }
+
+  int
+  __basic_file::sys_getc() 
+  { return getc(_M_cfile); }
+
+  int
+  __basic_file::sys_ungetc(int __c) 
+  { return ungetc(__c, _M_cfile); }
+  
+  __basic_file* 
+  __basic_file::open(const char* __name, ios_base::openmode __mode, 
+			   int /*__prot*/)
+  {
+    __basic_file* __ret = NULL;
+    int __p_mode = 0;
+    int __rw_mode = 0;
+    char __c_mode[4];
+      
+    _M_open_mode(__mode, __p_mode, __rw_mode, __c_mode);
+
+    if (!this->is_open())
+      {
+	if ((_M_cfile = fopen(__name, __c_mode)))
+	  {
+	    _M_cfile_created = true;
+	    __ret = this;
+	  }
+      }
+    return __ret;
+  }
+  
+  bool 
+  __basic_file::is_open() const 
+  { return _M_cfile != 0; }
+  
+  int 
+  __basic_file::fd() 
+  { return fileno(_M_cfile) ; }
+  
+  __basic_file* 
+  __basic_file::close()
+  { 
+    __basic_file* __retval = static_cast<__basic_file*>(NULL);
+    if (this->is_open())
+      {
+	fflush(_M_cfile);
+	if ((_M_cfile_created && fclose(_M_cfile) == 0) || !_M_cfile_created)
+	  {
+	    _M_cfile = 0;
+	    __retval = this;
+	  }
+      }
+    return __retval;
+  }
+ 
+  streamsize 
+  __basic_file::xsgetn(char* __s, streamsize __n)
+  { return fread(__s, 1, __n, _M_cfile); }
+  
+  streamsize 
+  __basic_file::xsputn(const char* __s, streamsize __n)
+  { return fwrite(__s, 1, __n, _M_cfile); }
+  
+  streamoff
+  __basic_file::seekoff(streamoff __off, ios_base::seekdir __way, 
+			      ios_base::openmode /*__mode*/)
+  { 
+    fseek(_M_cfile, __off, __way); 
+    return ftell(_M_cfile); 
+  }
+
+  streamoff
+  __basic_file::seekpos(streamoff __pos, ios_base::openmode /*__mode*/)
+  { 
+    fseek(_M_cfile, __pos, ios_base::beg); 
+    return ftell(_M_cfile); 
+  }
+  
+  int 
+  __basic_file::sync() 
+  { return fflush(_M_cfile); }
+}  // namespace std
diff --git a/contrib/libstdc++/config/io/basic_file_stdio.h b/contrib/libstdc++/config/io/basic_file_stdio.h
new file mode 100644
index 0000000..fe6edbb
--- /dev/null
+++ b/contrib/libstdc++/config/io/basic_file_stdio.h
@@ -0,0 +1,114 @@
+// Wrapper of C-language FILE struct -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file basic_file.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BASIC_FILE
+#define _CPP_BASIC_FILE 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+namespace std 
+{
+  // Generic declaration.
+  template
+    class __basic_file; 
+
+  // Specialization.
+  template<>
+    class __basic_file
+    {
+      // Underlying data source/sink.
+      __c_file* 	_M_cfile;
+      // True iff we opened _M_cfile, and thus must close it ourselves.
+      bool 		_M_cfile_created;
+
+    public:
+      __basic_file(__c_lock* __lock = 0);
+      
+      void 
+      _M_open_mode(ios_base::openmode __mode, int& __p_mode, int& __rw_mode, 
+		   char* __c_mode);
+      
+      __basic_file* 
+      open(const char* __name, ios_base::openmode __mode, int __prot = 0664);
+
+      __basic_file*
+      sys_open(__c_file* __file, ios_base::openmode);
+
+      __basic_file*
+      sys_open(int __fd, ios_base::openmode __mode, bool __del);
+
+      int
+      sys_getc();
+
+      int
+      sys_ungetc(int);
+
+      __basic_file* 
+      close(); 
+
+      bool 
+      is_open() const;
+
+      int 
+      fd();
+
+      ~__basic_file();
+
+      streamsize 
+      xsputn(const char* __s, streamsize __n);
+
+      streamsize 
+      xsgetn(char* __s, streamsize __n);
+
+      streamoff
+      seekoff(streamoff __off, ios_base::seekdir __way,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      streamoff
+      seekpos(streamoff __pos, 
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      int 
+      sync();
+    };
+}  // namespace std
+
+#endif	// _CPP_BASIC_FILE
diff --git a/contrib/libstdc++/config/io/c_io_libio.h b/contrib/libstdc++/config/io/c_io_libio.h
new file mode 100644
index 0000000..acf6520
--- /dev/null
+++ b/contrib/libstdc++/config/io/c_io_libio.h
@@ -0,0 +1,113 @@
+// underlying io library  -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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.
+
+// c_io_libio.h - Defines for using the GNU libio
+
+#ifndef _CPP_IO_LIBIO_H
+#define _CPP_IO_LIBIO_H 1
+
+#include 
+
+namespace std 
+{
+// from fpos.h
+  typedef _IO_ssize_t 	streamsize; // Signed integral type
+  typedef _IO_ssize_t 	wstreamsize;
+
+#if defined(_G_IO_IO_FILE_VERSION) && _G_IO_IO_FILE_VERSION == 0x20001
+  typedef _IO_off64_t 	streamoff;
+  typedef _IO_fpos64_t 	__c_streampos;
+#else
+  typedef _IO_off_t 	streamoff;
+  typedef _IO_fpos_t 	__c_streampos;
+#endif
+
+#ifdef _GLIBCPP_USE_THREADS
+  typedef _IO_lock_t   __c_lock;
+#else
+  typedef int          __c_lock;
+#endif
+
+// from basic_file.h
+  typedef _IO_FILE 	__c_file_type;
+  typedef _IO_wide_data __c_wfile_type;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  extern "C" _IO_codecvt __c_libio_codecvt;
+#endif 
+
+// from ios_base.h
+  struct __ios_flags
+  {
+    typedef short __int_type;
+
+    static const __int_type _S_boolalpha =	_IO_BAD_SEEN;
+    static const __int_type _S_dec =		_IO_DEC;
+    static const __int_type _S_fixed = 		_IO_FIXED;
+    static const __int_type _S_hex =		_IO_HEX;
+    static const __int_type _S_internal = 	_IO_INTERNAL;
+    static const __int_type _S_left =          	_IO_LEFT;
+    static const __int_type _S_oct =		_IO_OCT;
+    static const __int_type _S_right =		_IO_RIGHT;
+    static const __int_type _S_scientific =	_IO_SCIENTIFIC;
+    static const __int_type _S_showbase =      	_IO_SHOWBASE;
+    static const __int_type _S_showpoint =	_IO_SHOWPOINT;
+    static const __int_type _S_showpos =       	_IO_SHOWPOS;
+    static const __int_type _S_skipws =		_IO_SKIPWS;
+    static const __int_type _S_unitbuf =       	_IO_UNITBUF;
+    static const __int_type _S_uppercase =	_IO_UPPERCASE;
+    static const __int_type _S_adjustfield =	_IO_LEFT | _IO_RIGHT
+    						| _IO_INTERNAL;
+    static const __int_type _S_basefield =	_IO_DEC | _IO_OCT | _IO_HEX;
+    static const __int_type _S_floatfield =	_IO_SCIENTIFIC | _IO_FIXED;
+
+    // 27.4.2.1.3  Type ios_base::iostate
+    static const __int_type _S_badbit =		_IO_BAD_SEEN;
+    static const __int_type _S_eofbit =		_IO_EOF_SEEN;
+    static const __int_type _S_failbit =       	_IO_ERR_SEEN;
+
+    // 27.4.2.1.4  Type openmode
+    static const __int_type _S_app =		_IOS_APPEND;
+    static const __int_type _S_ate =		_IOS_ATEND;
+    static const __int_type _S_bin =		_IOS_BIN;
+    static const __int_type _S_in =		_IOS_INPUT;
+    static const __int_type _S_out =		_IOS_OUTPUT;
+    static const __int_type _S_trunc =		_IOS_TRUNC;
+  };
+}
+
+#endif // _CPP_IO_LIBIO_H
+
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/config/io/c_io_libio_codecvt.c b/contrib/libstdc++/config/io/c_io_libio_codecvt.c
new file mode 100644
index 0000000..38d8b55
--- /dev/null
+++ b/contrib/libstdc++/config/io/c_io_libio_codecvt.c
@@ -0,0 +1,153 @@
+/* Copyright (C) 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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.  */
+
+/* Slightly modified from glibc/libio/iofwide.c */
+
+#include 
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+
+/* Prototypes of libio's codecvt functions.  */
+static enum __codecvt_result 
+do_out(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+       const wchar_t *from_start, const wchar_t *from_end,
+       const wchar_t **from_stop, char *to_start, char *to_end, 
+       char **to_stop);
+
+static enum __codecvt_result 
+do_unshift(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, char *to_start, 
+	   char *to_end, char **to_stop);
+
+static enum __codecvt_result 
+do_in(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, 
+      const char *from_start, const char *from_end, const char **from_stop, 
+      wchar_t *to_start, wchar_t *to_end, wchar_t **to_stop);
+
+static int 
+do_encoding(struct _IO_codecvt *codecvt);
+
+static int 
+do_length(struct _IO_codecvt *codecvt, __c_mbstate_t *statep, 
+	  const char *from_start, const char *from_end, _IO_size_t max);
+
+static int 
+do_max_length(struct _IO_codecvt *codecvt);
+
+static int 
+do_always_noconv(struct _IO_codecvt *codecvt);
+
+
+/* The functions used in `codecvt' for libio are always the same.  */
+struct _IO_codecvt __c_libio_codecvt =
+{
+  .__codecvt_destr = NULL,		/* Destructor, never used.  */
+  .__codecvt_do_out = do_out,
+  .__codecvt_do_unshift = do_unshift,
+  .__codecvt_do_in = do_in,
+  .__codecvt_do_encoding = do_encoding,
+  .__codecvt_do_always_noconv = do_always_noconv,
+  .__codecvt_do_length = do_length,
+  .__codecvt_do_max_length = do_max_length
+};
+
+static enum __codecvt_result
+do_out(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+       const wchar_t *from_start, const wchar_t *from_end,
+       const wchar_t **from_stop, char *to_start, char *to_end,
+       char **to_stop)
+{
+  enum __codecvt_result res = __codecvt_ok;
+
+  while (from_start < from_end)
+    {
+      if (to_start >= to_end)
+	{
+	  res = __codecvt_partial;
+	  break;
+	}
+      *to_start++ = (char) *from_start++;
+    }
+
+  *from_stop = from_start;
+  *to_stop = to_start;
+
+  return res;
+}
+
+
+static enum __codecvt_result
+do_unshift(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+	   char *to_start, char *to_end, char **to_stop)
+{
+  *to_stop = to_start;
+  return __codecvt_ok;
+}
+
+
+static enum __codecvt_result
+do_in(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+      const char *from_start, const char *from_end, const char **from_stop,
+      wchar_t *to_start, wchar_t *to_end, wchar_t **to_stop)
+{
+  enum __codecvt_result res = __codecvt_ok;
+
+  while (from_start < from_end)
+    {
+      if (to_start >= to_end)
+	{
+	  res = __codecvt_partial;
+	  break;
+	}
+      *to_start++ = (wchar_t) *from_start++;
+    }
+
+  *from_stop = from_start;
+  *to_stop = to_start;
+
+  return res;
+}
+
+
+static int
+do_encoding(struct _IO_codecvt *codecvt)
+{ return 1; }
+
+
+static int
+do_always_noconv(struct _IO_codecvt *codecvt)
+{ return 0; }
+
+
+static int
+do_length(struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+	  const char *from_start, const char *from_end, _IO_size_t max)
+{ return from_end - from_start; }
+
+
+static int
+do_max_length(struct _IO_codecvt *codecvt)
+{ return 1; }
+
+#endif /* _GLIBCPP_USE_WCHAR_T */
diff --git a/contrib/libstdc++/config/io/c_io_stdio.h b/contrib/libstdc++/config/io/c_io_stdio.h
new file mode 100644
index 0000000..0d11d14
--- /dev/null
+++ b/contrib/libstdc++/config/io/c_io_stdio.h
@@ -0,0 +1,93 @@
+// underlying io library  -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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.
+
+// c_io_stdio.h - Defines for using "C" stdio.h
+
+#ifndef _CPP_IO_STDIO_H
+#define _CPP_IO_STDIO_H 1
+
+#include 
+#include 
+#include 
+
+namespace std 
+{
+// for fpos.h
+  typedef long  	streamoff;
+  typedef ptrdiff_t	streamsize; // Signed integral type
+#if _GLIBCPP_USE_WCHAR_T
+  typedef ptrdiff_t	wstreamsize;
+#endif
+  typedef fpos_t  	__c_streampos;
+
+  typedef __gthread_mutex_t __c_lock;
+
+// for basic_file.h
+  typedef FILE __c_file;
+
+// for ios_base.h
+  struct __ios_flags
+  {
+    typedef short __int_type;
+
+    static const __int_type _S_boolalpha =	0x0001;
+    static const __int_type _S_dec =		0x0002;
+    static const __int_type _S_fixed = 		0x0004;
+    static const __int_type _S_hex =		0x0008;
+    static const __int_type _S_internal = 	0x0010;
+    static const __int_type _S_left =   	0x0020;
+    static const __int_type _S_oct =		0x0040;
+    static const __int_type _S_right =		0x0080;
+    static const __int_type _S_scientific =	0x0100;
+    static const __int_type _S_showbase =       0x0200;
+    static const __int_type _S_showpoint =	0x0400;
+    static const __int_type _S_showpos =	0x0800;
+    static const __int_type _S_skipws =		0x1000;
+    static const __int_type _S_unitbuf =	0x2000;
+    static const __int_type _S_uppercase =	0x4000;
+    static const __int_type _S_adjustfield =	0x0020 | 0x0080 | 0x0010;
+    static const __int_type _S_basefield =	0x0002 | 0x0040 | 0x0008;
+    static const __int_type _S_floatfield =	0x0100 | 0x0004;
+
+    // 27.4.2.1.3  Type ios_base::iostate
+    static const __int_type _S_badbit =		0x01;
+    static const __int_type _S_eofbit =		0x02;
+    static const __int_type _S_failbit =       	0x04;
+
+    // 27.4.2.1.4  Type openmode
+    static const __int_type _S_app =		0x01;
+    static const __int_type _S_ate =		0x02;
+    static const __int_type _S_bin =		0x04;
+    static const __int_type _S_in =		0x08;
+    static const __int_type _S_out =		0x10;
+    static const __int_type _S_trunc =		0x20;
+  };
+}
+
+#endif // _CPP_IO_STDIO_H
diff --git a/contrib/libstdc++/config/linker-map.dummy b/contrib/libstdc++/config/linker-map.dummy
new file mode 100644
index 0000000..58e1413
--- /dev/null
+++ b/contrib/libstdc++/config/linker-map.dummy
@@ -0,0 +1,7 @@
+# 
+# This is a placeholder file.  It does nothing and is not used.
+# 
+# If you are seeing this file as your linker script (named linker.map), then
+# either 1) the configuration process determined that symbol versioning should
+# not be done, or 2) you specifically turned it off.
+# 
diff --git a/contrib/libstdc++/config/linker-map.gnu b/contrib/libstdc++/config/linker-map.gnu
new file mode 100644
index 0000000..2a55bb2
--- /dev/null
+++ b/contrib/libstdc++/config/linker-map.gnu
@@ -0,0 +1,113 @@
+## Linker script for GNU ld 2.11.94+ only.
+##
+## Copyright (C) 2002 Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+##
+## 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.
+
+
+GLIBCPP_3.1 {
+
+  global:
+
+    # Names inside the 'extern' block are demangled names.
+    # All but the last are terminated with a semicolon.
+    extern "C++"
+    {
+      std::[A-Za-z]*;
+      std::__throw_*;
+      std::__basic_file*;
+      std::__num_base*;
+      std::__timepunct*;
+      std::__numeric_limits_base*;
+      std::_S_bit_count;
+      std::_S_first_one;
+      std::__default_alloc_template*;
+      std::__malloc_alloc_template*
+    };
+
+    # Names not in an 'extern' block are mangled names.
+    _ZSt9has_facet*;
+
+    # operator new(unsigned)
+    _Znwj;
+    # operator new(unsigned, std::nothrow_t const&)
+    _ZnwjRKSt9nothrow_t;
+    # operator new(unsigned long)
+    _Znwm;
+    # operator new(unsigned long, std::nothrow_t const&)
+    _ZnwmRKSt9nothrow_t;
+
+    # operator delete(void*)
+    _ZdlPv;
+    # operator delete(void*, std::nothrow_t const&)
+    _ZdlPvRKSt9nothrow_t;
+
+    # operator new[](unsigned)
+    _Znaj;
+    # operator new[](unsigned, std::nothrow_t const&)
+    _ZnajRKSt9nothrow_t;
+    # operator new[](unsigned long)
+    _Znam;
+    # operator new[](unsigned long, std::nothrow_t const&)
+    _ZnamRKSt9nothrow_t;
+
+    # operator delete[](void*)
+    _ZdaPv;
+    # operator delete[](void*, std::nothrow_t const&)
+    _ZdaPvRKSt9nothrow_t;
+
+    # vtable	
+    _ZTV*;  
+    _ZTT*;
+
+    # typeinfo
+    _ZTI*;
+    _ZTS*;
+
+    # function-scope static objects requires a guard variable.
+    _ZGV*;
+
+    # virtual function thunks
+    _ZTh*;
+    _ZTv*;
+    _ZTc*;
+
+    # std::__convert_to_v
+    _ZSt14__convert_to_v*;
+
+  local:
+    *;
+};
+
+
+# Symbols in the support library (libsupc++) have their own tag.
+CXXABI_1 {
+
+  global:
+    __cxa_*;
+    __gxx_personality_v0;
+    __gxx_personality_sj0;
+    __dynamic_cast;
+
+    # __gnu_cxx::_verbose_terminate_handler()
+    _ZN9__gnu_cxx27__verbose_terminate_handlerEv;
+
+  local:
+    *;
+};
diff --git a/contrib/libstdc++/config/locale/generic/c_locale.cc b/contrib/libstdc++/config/locale/generic/c_locale.cc
new file mode 100644
index 0000000..8ede46e
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/c_locale.cc
@@ -0,0 +1,220 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// 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
+// 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.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+#ifdef _GLIBCPP_HAVE_IEEEFP_H
+#include 
+#endif
+
+namespace std 
+{
+  // Specializations for all types used in num_get.
+  template<>
+    void
+    __convert_to_v(const char* __s, long& __v, ios_base::iostate& __err, 
+		   const __c_locale&, int __base)
+    {
+      if (!(__err & ios_base::failbit))
+      {
+	char* __sanity;
+	errno = 0;
+	long __l = strtol(__s, &__sanity, __base);
+	if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	  __v = __l;
+	else
+	  __err |= ios_base::failbit;
+      }
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, unsigned long& __v, 
+		   ios_base::iostate& __err, const __c_locale&, int __base)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  unsigned long __ul = strtoul(__s, &__sanity, __base);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ul;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template<>
+    void
+    __convert_to_v(const char* __s, long long& __v, ios_base::iostate& __err, 
+		   const __c_locale&, int __base)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  long long __ll = strtoll(__s, &__sanity, __base);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ll;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, unsigned long long& __v, 
+		   ios_base::iostate& __err, const __c_locale&, int __base)
+    {
+      if (!(__err & ios_base::failbit))
+	{      
+	  char* __sanity;
+	  errno = 0;
+	  unsigned long long __ull = strtoull(__s, &__sanity, __base);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ull;
+	  else
+	    __err |= ios_base::failbit;
+	}  
+    }
+#endif
+
+  template<>
+    void
+    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
+		   const __c_locale&, int) 	      
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  // Assumes __s formatted for "C" locale.
+	  const char* __old = setlocale(LC_ALL, "C");
+	  char* __sanity;
+	  errno = 0;
+#if defined(_GLIBCPP_USE_C99)
+	  float __f = strtof(__s, &__sanity);
+#else
+	  double __d = strtod(__s, &__sanity);
+	  float __f = static_cast(__d);
+#ifdef _GLIBCPP_HAVE_FINITEF
+	  if (!finitef (__f))
+	    errno = ERANGE;
+#elif defined (_GLIBCPP_HAVE_FINITE)
+	  if (!finite (static_cast (__f)))
+	    errno = ERANGE;
+#elif defined (_GLIBCPP_HAVE_ISINF)
+	  if (isinf (static_cast (__f)))
+	    errno = ERANGE;
+#else
+	  if (fabs(__d) > numeric_limits::max())
+	    errno = ERANGE;
+#endif
+#endif
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __f;
+	  else
+	    __err |= ios_base::failbit;
+	  setlocale(LC_ALL, __old);
+	}
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
+		   const __c_locale&, int) 
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  // Assumes __s formatted for "C" locale.
+	  const char* __old = setlocale(LC_ALL, "C");
+	  char* __sanity;
+	  errno = 0;
+	  double __d = strtod(__s, &__sanity);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __d;
+	  else
+	    __err |= ios_base::failbit;
+	  setlocale(LC_ALL, __old);
+	}
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, long double& __v, 
+		   ios_base::iostate& __err, const __c_locale&, int) 
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  // Assumes __s formatted for "C" locale.
+	  const char* __old = setlocale(LC_ALL, "C");
+#if defined(_GLIBCPP_USE_C99)
+	  char* __sanity;
+	  errno = 0;
+	  long double __ld = strtold(__s, &__sanity);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ld;
+#else
+	  typedef char_traits::int_type int_type;
+	  long double __ld;
+	  errno = 0;
+	  int __p = sscanf(__s, "%Lf", &__ld);
+	  if (errno == ERANGE)
+	    __p = 0;
+#ifdef _GLIBCPP_HAVE_FINITEL
+	  if ((__p == 1) && !finitel (__ld))
+	    __p = 0;
+#endif
+	  if (__p && static_cast(__p) != char_traits::eof())
+	    __v = __ld;
+#endif
+	  else
+	    __err |= ios_base::failbit;
+	  setlocale(LC_ALL, __old);
+	}
+    }
+
+  void
+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char*, 
+				    __c_locale)
+  { __cloc = NULL; }
+
+  void
+  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+  { __cloc = NULL; }
+
+  __c_locale
+  locale::facet::_S_clone_c_locale(__c_locale&)
+  { return __c_locale(); }
+}  // namespace std
diff --git a/contrib/libstdc++/config/locale/generic/c_locale.h b/contrib/libstdc++/config/locale/generic/c_locale.h
new file mode 100644
index 0000000..0fc9a25
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/c_locale.h
@@ -0,0 +1,41 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001 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.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  typedef int*			__c_locale;
+}
diff --git a/contrib/libstdc++/config/locale/generic/codecvt_specializations.h b/contrib/libstdc++/config/locale/generic/codecvt_specializations.h
new file mode 100644
index 0000000..24db4c8
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/codecvt_specializations.h
@@ -0,0 +1,38 @@
+// Locale support (codecvt) -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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.2.1.5 Template class codecvt
+//
+
+// Warning: this file is not meant for user inclusion.  Use .
+
+// Written by Benjamin Kosnik 
+
+// XXX dummy file
diff --git a/contrib/libstdc++/config/locale/generic/collate_members.cc b/contrib/libstdc++/config/locale/generic/collate_members.cc
new file mode 100644
index 0000000..93767d9
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/collate_members.cc
@@ -0,0 +1,72 @@
+// std::collate implementation details, generic version -*- C++ -*-
+
+// 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
+// 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.2.4.1.2  collate virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // These are basically extensions to char_traits, and perhaps should
+  // be put there instead of here.
+  template<>
+    int 
+    collate::_M_compare(const char* __one, const char* __two) const
+    { 
+      int __cmp = strcoll(__one, __two);
+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
+    }
+  
+  template<>
+    size_t
+    collate::_M_transform(char* __to, const char* __from, 
+				size_t __n) const
+    { return strxfrm(__to, __from, __n); }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    int 
+    collate::_M_compare(const wchar_t* __one, 
+				 const wchar_t* __two) const
+    {
+      int __cmp = wcscoll(__one, __two);
+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
+    }
+  
+  template<>
+    size_t
+    collate::_M_transform(wchar_t* __to, const wchar_t* __from,
+				   size_t __n) const
+    { return wcsxfrm(__to, __from, __n); }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/generic/ctype_members.cc b/contrib/libstdc++/config/locale/generic/ctype_members.cc
new file mode 100644
index 0000000..5a66484
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/ctype_members.cc
@@ -0,0 +1,195 @@
+// std::ctype implementation details, generic version -*- C++ -*-
+
+// Copyright (C) 2001 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.2.1.1.2  ctype virtual functions.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // NB: The other ctype specializations are in src/locale.cc and
+  // various /config/os/* files.
+  template<>
+    ctype_byname::ctype_byname(const char* __s, size_t __refs)
+    : ctype(0, false, __refs) 
+    { 	
+      _S_destroy_c_locale(_M_c_locale_ctype);
+      _S_create_c_locale(_M_c_locale_ctype, __s); 
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T  
+  ctype::__wmask_type
+  ctype::_M_convert_to_wmask(const mask __m) const
+  {
+    __wmask_type __ret;
+    switch (__m)
+      {
+      case space:
+	__ret = wctype("space");
+	break;
+      case print:
+	__ret = wctype("print");
+	break;
+      case cntrl:
+	__ret = wctype("cntrl");
+	break;
+      case upper:
+	__ret = wctype("upper");
+	break;
+      case lower:
+	__ret = wctype("lower");
+	break;
+      case alpha:
+	__ret = wctype("alpha");
+	break;
+      case digit:
+	__ret = wctype("digit");
+	break;
+      case punct:
+	__ret = wctype("punct");
+	break;
+      case xdigit:
+	__ret = wctype("xdigit");
+	break;
+      case alnum:
+	__ret = wctype("alnum");
+	break;
+      case graph:
+	__ret = wctype("graph");
+	break;
+      default:
+	__ret = 0;
+      }
+    return __ret;
+  };
+  
+  wchar_t
+  ctype::do_toupper(wchar_t __c) const
+  { return towupper(__c); }
+
+  const wchar_t*
+  ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
+  {
+    while (__lo < __hi)
+      {
+        *__lo = towupper(*__lo);
+        ++__lo;
+      }
+    return __hi;
+  }
+  
+  wchar_t
+  ctype::do_tolower(wchar_t __c) const
+  { return towlower(__c); }
+  
+  const wchar_t*
+  ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
+  {
+    while (__lo < __hi)
+      {
+        *__lo = towlower(*__lo);
+        ++__lo;
+      }
+    return __hi;
+  }
+
+  bool
+  ctype::
+  do_is(mask __m, char_type __c) const
+  { return static_cast(iswctype(__c, _M_convert_to_wmask(__m))); }
+  
+  const wchar_t* 
+  ctype::
+  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __m) const
+  {
+    while (__lo < __hi && !this->do_is(*__m, *__lo))
+      ++__lo;
+    return __lo;
+  }
+  
+  const wchar_t* 
+  ctype::
+  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
+  {
+    while (__lo < __hi && !this->do_is(__m, *__lo))
+      ++__lo;
+    return __lo;
+  }
+
+  const wchar_t*
+  ctype::
+  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+  {
+    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
+      ++__lo;
+    return __lo;
+  }
+
+  wchar_t
+  ctype::
+  do_widen(char __c) const
+  { return btowc(__c); }
+  
+  const char* 
+  ctype::
+  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
+  {
+    mbstate_t __state;
+    memset(static_cast(&__state), 0, sizeof(mbstate_t));
+    mbsrtowcs(__dest, &__lo, __hi - __lo, &__state);
+    return __hi;
+  }
+
+  char
+  ctype::
+  do_narrow(wchar_t __wc, char __dfault) const
+  { 
+    int __c = wctob(__wc);
+    return (__c == EOF ? __dfault : static_cast(__c)); 
+  }
+
+  const wchar_t*
+  ctype::
+  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
+	    char* __dest) const
+  {
+    mbstate_t __state;
+    memset(static_cast(&__state), 0, sizeof(mbstate_t));
+    size_t __len = __hi - __lo;
+    size_t __conv = wcsrtombs(__dest, &__lo, __len, &__state);
+    if (__conv == __len)
+      *__dest = __dfault;
+    return __hi;
+  }
+#endif //  _GLIBCPP_USE_WCHAR_T
+}
diff --git a/contrib/libstdc++/config/locale/generic/messages_members.cc b/contrib/libstdc++/config/locale/generic/messages_members.cc
new file mode 100644
index 0000000..480ab88
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/messages_members.cc
@@ -0,0 +1,45 @@
+// std::messages implementation details, generic version -*- C++ -*-
+
+// Copyright (C) 2001 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.2.7.1.2  messages virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // Specializations
+  template<>
+    string
+    messages::do_get(catalog, int, int, const string& __dfault) const
+    { return __dfault; }
+}
diff --git a/contrib/libstdc++/config/locale/generic/messages_members.h b/contrib/libstdc++/config/locale/generic/messages_members.h
new file mode 100644
index 0000000..62dd24d
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/messages_members.h
@@ -0,0 +1,58 @@
+// std::messages implementation details, generic version -*- C++ -*-
+
+// Copyright (C) 2001 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.2.7.1.2  messages virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+  // Non-virtual member functions.
+  template
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::open(const basic_string& __s, const locale& __loc, 
+			   const char*) const
+    { return this->do_open(__s, __loc); }
+
+  // Virtual member functions.
+  template
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::do_open(const basic_string&, const locale&) const
+    { return 0; }
+
+  template
+    typename messages<_CharT>::string_type  
+    messages<_CharT>::do_get(catalog, int, int, 
+			     const string_type& __dfault) const
+    { return __dfault; }
+
+  template
+    void    
+    messages<_CharT>::do_close(catalog) const 
+    { }
diff --git a/contrib/libstdc++/config/locale/generic/monetary_members.cc b/contrib/libstdc++/config/locale/generic/monetary_members.cc
new file mode 100644
index 0000000..7c2e13b
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/monetary_members.cc
@@ -0,0 +1,127 @@
+// std::moneypunct implementation details, generic version -*- C++ -*-
+
+// 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
+// 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.2.6.3.2  moneypunct virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // Construct and return valid pattern consisting of some combination of:
+  // space none symbol sign value
+  money_base::pattern
+  money_base::_S_construct_pattern(char, char, char)
+  { return _S_default_pattern; }
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = '.';
+      _M_thousands_sep = ',';
+      _M_grouping = "";
+      _M_curr_symbol = "";
+      _M_positive_sign = "";
+      _M_negative_sign = "";
+      _M_frac_digits = 0;
+      _M_pos_format = money_base::_S_default_pattern;
+      _M_neg_format = money_base::_S_default_pattern;
+    }
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = '.';
+      _M_thousands_sep = ',';
+      _M_grouping = "";
+      _M_curr_symbol = "";
+      _M_positive_sign = "";
+      _M_negative_sign = "";
+      _M_frac_digits = 0;
+      _M_pos_format = money_base::_S_default_pattern;
+      _M_neg_format = money_base::_S_default_pattern;
+    }
+
+  template<> 
+    moneypunct::~moneypunct()
+    { }
+
+  template<> 
+    moneypunct::~moneypunct()
+    { }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = L'.';
+      _M_thousands_sep = L',';
+      _M_grouping = "";
+      _M_curr_symbol = L"";
+      _M_positive_sign = L"";
+      _M_negative_sign = L"";
+      _M_frac_digits = 0;
+      _M_pos_format = money_base::_S_default_pattern;
+      _M_neg_format = money_base::_S_default_pattern;
+    }
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = L'.';
+      _M_thousands_sep = L',';
+      _M_grouping = "";
+      _M_curr_symbol = L"";
+      _M_positive_sign = L"";
+      _M_negative_sign = L"";
+      _M_frac_digits = 0;
+      _M_pos_format = money_base::_S_default_pattern;
+      _M_neg_format = money_base::_S_default_pattern;
+    }
+
+  template<> 
+    moneypunct::~moneypunct()
+    { }
+
+  template<> 
+    moneypunct::~moneypunct()
+    { }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/generic/numeric_members.cc b/contrib/libstdc++/config/locale/generic/numeric_members.cc
new file mode 100644
index 0000000..f942e04
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/numeric_members.cc
@@ -0,0 +1,73 @@
+// std::numpunct implementation details, generic version -*- C++ -*-
+
+// 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
+// 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.2.3.1.2  numpunct virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = '.';
+      _M_thousands_sep = ',';
+      _M_grouping = "";
+      _M_truename = "true";
+      _M_falsename = "false";
+    }
+
+  template<> 
+    numpunct::~numpunct()
+    { }
+      
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = L'.';
+      _M_thousands_sep = L',';
+      _M_grouping = "";
+      _M_truename = L"true";
+      _M_falsename = L"false";
+    }
+
+  template<> 
+    numpunct::~numpunct()
+    { }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/generic/time_members.cc b/contrib/libstdc++/config/locale/generic/time_members.cc
new file mode 100644
index 0000000..16a4998
--- /dev/null
+++ b/contrib/libstdc++/config/locale/generic/time_members.cc
@@ -0,0 +1,202 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
+// 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
+// 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.2.5.1.2 - time_get virtual functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  template<>
+    __timepunct::~__timepunct()
+    {
+      if (_M_c_locale_timepunct != _S_c_locale)
+	_S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+  template<>
+    void
+    __timepunct::
+    _M_put(char* __s, size_t __maxlen, const char* __format, 
+	   const tm* __tm) const
+    {
+      const char* __old = setlocale(LC_ALL, _M_name_timepunct);
+      strftime(__s, __maxlen, __format, __tm);
+      setlocale(LC_ALL, __old);
+    }
+
+  template<> 
+    void
+    __timepunct::_M_initialize_timepunct(__c_locale)
+    { 
+      // "C" locale
+      _M_date_format = "%m/%d/%Y";
+      _M_date_era_format = "%m/%d/%Y";
+      _M_time_format = "%H:%M:%S";
+      _M_time_era_format = "%H:%M:%S";
+      _M_date_time_format = "";
+      _M_date_time_era_format = "";
+      _M_am = "AM";
+      _M_pm = "PM";
+      _M_am_pm_format = "";
+	  
+      // Day names, starting with "C"'s Sunday.
+      _M_day1 = "Sunday";
+      _M_day2 = "Monday";
+      _M_day3 = "Tuesday";
+      _M_day4 = "Wednesday";
+      _M_day5 = "Thursday";
+      _M_day6 = "Friday";
+      _M_day7 = "Saturday";
+
+      // Abbreviated day names, starting with "C"'s Sun.
+      _M_day_a1 = "Sun";
+      _M_day_a2 = "Mon";
+      _M_day_a3 = "Tue";
+      _M_day_a4 = "Wed";
+      _M_day_a5 = "Thu";
+      _M_day_a6 = "Fri";
+      _M_day_a7 = "Sat";
+
+      // Month names, starting with "C"'s January.
+      _M_month01 = "January";
+      _M_month02 = "February";
+      _M_month03 = "March";
+      _M_month04 = "April";
+      _M_month05 = "May";
+      _M_month06 = "June";
+      _M_month07 = "July";
+      _M_month08 = "August";
+      _M_month09 = "September";
+      _M_month10 = "October";
+      _M_month11 = "November";
+      _M_month12 = "December";
+
+      // Abbreviated month names, starting with "C"'s Jan.
+      _M_month_a01 = "Jan";
+      _M_month_a02 = "Feb";
+      _M_month_a03 = "Mar";
+      _M_month_a04 = "Apr";
+      _M_month_a05 = "May";
+      _M_month_a06 = "Jun";
+      _M_month_a07 = "July";
+      _M_month_a08 = "Aug";
+      _M_month_a09 = "Sep";
+      _M_month_a10 = "Oct";
+      _M_month_a11 = "Nov";
+      _M_month_a12 = "Dec";
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    __timepunct::~__timepunct()
+    {
+      if (_M_c_locale_timepunct != _S_c_locale)
+	_S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+  template<>
+    void
+    __timepunct::
+    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
+	   const tm* __tm) const
+    {
+      const char* __old = setlocale(LC_ALL, _M_name_timepunct);
+      wcsftime(__s, __maxlen, __format, __tm);
+      setlocale(LC_ALL, __old);
+    }
+
+  template<> 
+    void
+    __timepunct::_M_initialize_timepunct(__c_locale)
+    {
+      // "C" locale
+      _M_date_format = L"%m/%d/%y";
+      _M_date_era_format = L"%m/%d/%y";
+      _M_time_format = L"%H:%M:%S";
+      _M_time_era_format = L"%H:%M:%S";
+      _M_date_time_format = L"";
+      _M_date_time_era_format = L"";
+      _M_am = L"AM";
+      _M_pm = L"PM";
+      _M_am_pm_format = L"";
+
+      // Day names, starting with "C"'s Sunday.
+      _M_day1 = L"Sunday";
+      _M_day2 = L"Monday";
+      _M_day3 = L"Tuesday";
+      _M_day4 = L"Wednesday";
+      _M_day5 = L"Thursday";
+      _M_day6 = L"Friday";
+      _M_day7 = L"Saturday";
+
+      // Abbreviated day names, starting with "C"'s Sun.
+      _M_day_a1 = L"Sun";
+      _M_day_a2 = L"Mon";
+      _M_day_a3 = L"Tue";
+      _M_day_a4 = L"Wed";
+      _M_day_a5 = L"Thu";
+      _M_day_a6 = L"Fri";
+      _M_day_a7 = L"Sat";
+
+      // Month names, starting with "C"'s January.
+      _M_month01 = L"January";
+      _M_month02 = L"February";
+      _M_month03 = L"March";
+      _M_month04 = L"April";
+      _M_month05 = L"May";
+      _M_month06 = L"June";
+      _M_month07 = L"July";
+      _M_month08 = L"August";
+      _M_month09 = L"September";
+      _M_month10 = L"October";
+      _M_month11 = L"November";
+      _M_month12 = L"December";
+
+      // Abbreviated month names, starting with "C"'s Jan.
+      _M_month_a01 = L"Jan";
+      _M_month_a02 = L"Feb";
+      _M_month_a03 = L"Mar";
+      _M_month_a04 = L"Apr";
+      _M_month_a05 = L"May";
+      _M_month_a06 = L"Jun";
+      _M_month_a07 = L"July";
+      _M_month_a08 = L"Aug";
+      _M_month_a09 = L"Sep";
+      _M_month_a10 = L"Oct";
+      _M_month_a11 = L"Nov";
+      _M_month_a12 = L"Dec";
+    }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/gnu/c_locale.cc b/contrib/libstdc++/config/locale/gnu/c_locale.cc
new file mode 100644
index 0000000..60ec54d
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/c_locale.cc
@@ -0,0 +1,185 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// 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
+// 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.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+#include 
+#include 
+
+namespace std 
+{
+  template<>
+    void
+    __convert_to_v(const char* __s, long& __v, ios_base::iostate& __err, 
+		   const __c_locale& __cloc, int __base)
+    {
+      if (!(__err & ios_base::failbit))
+      {
+	char* __sanity;
+	errno = 0;
+	long __l = __strtol_l(__s, &__sanity, __base, __cloc);
+	if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	  __v = __l;
+	else
+	  __err |= ios_base::failbit;
+      }
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, unsigned long& __v, 
+		   ios_base::iostate& __err, const __c_locale& __cloc, 
+		   int __base)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  unsigned long __ul = __strtoul_l(__s, &__sanity, __base, __cloc);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ul;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template<>
+    void
+    __convert_to_v(const char* __s, long long& __v, ios_base::iostate& __err, 
+		   const __c_locale& __cloc, int __base)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  long long __ll = __strtoll_l(__s, &__sanity, __base, __cloc);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ll;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, unsigned long long& __v, 
+		   ios_base::iostate& __err, const __c_locale& __cloc, 
+		   int __base)
+    {
+      if (!(__err & ios_base::failbit))
+	{      
+	  char* __sanity;
+	  errno = 0;
+	  unsigned long long __ull = __strtoull_l(__s, &__sanity, __base, 
+						  __cloc);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ull;
+	  else
+	    __err |= ios_base::failbit;
+	}  
+    }
+#endif
+
+  template<>
+    void
+    __convert_to_v(const char* __s, float& __v, ios_base::iostate& __err, 
+		   const __c_locale& __cloc, int)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  float __f = __strtof_l(__s, &__sanity, __cloc);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __f;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, double& __v, ios_base::iostate& __err, 
+		   const __c_locale& __cloc, int)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  double __d = __strtod_l(__s, &__sanity, __cloc);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __d;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+  template<>
+    void
+    __convert_to_v(const char* __s, long double& __v, ios_base::iostate& __err,
+		   const __c_locale& __cloc, int)
+    {
+      if (!(__err & ios_base::failbit))
+	{
+	  char* __sanity;
+	  errno = 0;
+	  long double __ld = __strtold_l(__s, &__sanity, __cloc);
+          if (__sanity != __s && *__sanity == '\0' && errno != ERANGE)
+	    __v = __ld;
+	  else
+	    __err |= ios_base::failbit;
+	}
+    }
+
+  void
+  locale::facet::_S_create_c_locale(__c_locale& __cloc, const char* __s, 
+				    __c_locale __old)
+  {
+    __cloc = __newlocale(1 << LC_ALL, __s, __old);
+    if (!__cloc)
+      {
+	// This named locale is not supported by the underlying OS.
+	__throw_runtime_error("attempt to create locale from unknown name");
+      }
+  }
+  
+  void
+  locale::facet::_S_destroy_c_locale(__c_locale& __cloc)
+  { __freelocale(__cloc); }
+
+  __c_locale
+  locale::facet::_S_clone_c_locale(__c_locale& __cloc)
+  { return __duplocale(__cloc); }
+}  // namespace std
diff --git a/contrib/libstdc++/config/locale/gnu/c_locale.h b/contrib/libstdc++/config/locale/gnu/c_locale.h
new file mode 100644
index 0000000..3ce1781
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/c_locale.h
@@ -0,0 +1,46 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// Copyright (C) 2001 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.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+#include 		// For codecvt
+#include 		// For codecvt using iconv, iconv_t
+#include  		// For messages
+
+#define _GLIBCPP_C_LOCALE_GNU 1
+
+namespace std
+{
+  typedef __locale_t		__c_locale;
+}
diff --git a/contrib/libstdc++/config/locale/gnu/collate_members.cc b/contrib/libstdc++/config/locale/gnu/collate_members.cc
new file mode 100644
index 0000000..3b55f69
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/collate_members.cc
@@ -0,0 +1,72 @@
+// std::collate implementation details, GNU version -*- C++ -*-
+
+// Copyright (C) 2001 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.2.4.1.2  collate virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // These are basically extensions to char_traits, and perhaps should
+  // be put there instead of here.
+  template<>
+    int 
+    collate::_M_compare(const char* __one, const char* __two) const
+    { 
+      int __cmp = __strcoll_l(__one, __two, _M_c_locale_collate);
+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
+    }
+  
+  template<>
+    size_t
+    collate::_M_transform(char* __to, const char* __from, 
+				size_t __n) const 
+    { return __strxfrm_l(__to, __from, __n, _M_c_locale_collate); }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    int 
+    collate::_M_compare(const wchar_t* __one, 
+				 const wchar_t* __two) const
+    {
+      int __cmp = __wcscoll_l(__one, __two, _M_c_locale_collate);
+      return (__cmp >> (8 * sizeof (int) - 2)) | (__cmp != 0);
+    }
+  
+  template<>
+    size_t
+    collate::_M_transform(wchar_t* __to, const wchar_t* __from,
+				   size_t __n) const
+    { return __wcsxfrm_l(__to, __from, __n, _M_c_locale_collate); }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/gnu/ctype_members.cc b/contrib/libstdc++/config/locale/gnu/ctype_members.cc
new file mode 100644
index 0000000..090738b
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/ctype_members.cc
@@ -0,0 +1,202 @@
+// std::ctype implementation details, GNU version -*- C++ -*-
+
+// 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
+// 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.2.1.1.2  ctype virtual functions.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // NB: The other ctype specializations are in src/locale.cc and
+  // various /config/os/* files.
+  template<>
+    ctype_byname::ctype_byname(const char* __s, size_t __refs)
+    : ctype(0, false, __refs) 
+    { 	
+      if (_M_c_locale_ctype != _S_c_locale)
+	_S_destroy_c_locale(_M_c_locale_ctype);
+      _S_create_c_locale(_M_c_locale_ctype, __s); 
+      _M_toupper = _M_c_locale_ctype->__ctype_toupper;
+      _M_tolower = _M_c_locale_ctype->__ctype_tolower;
+      _M_table = _M_c_locale_ctype->__ctype_b;
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T  
+  ctype::__wmask_type
+  ctype::_M_convert_to_wmask(const mask __m) const
+  {
+    __wmask_type __ret;
+    switch (__m)
+      {
+      case space:
+	__ret = __wctype_l("space", _M_c_locale_ctype);
+	break;
+      case print:
+	__ret = __wctype_l("print", _M_c_locale_ctype);
+	break;
+      case cntrl:
+	__ret = __wctype_l("cntrl", _M_c_locale_ctype);
+	break;
+      case upper:
+	__ret = __wctype_l("upper", _M_c_locale_ctype);
+	break;
+      case lower:
+	__ret = __wctype_l("lower", _M_c_locale_ctype);
+	break;
+      case alpha:
+	__ret = __wctype_l("alpha", _M_c_locale_ctype);
+	break;
+      case digit:
+	__ret = __wctype_l("digit", _M_c_locale_ctype);
+	break;
+      case punct:
+	__ret = __wctype_l("punct", _M_c_locale_ctype);
+	break;
+      case xdigit:
+	__ret = __wctype_l("xdigit", _M_c_locale_ctype);
+	break;
+      case alnum:
+	__ret = __wctype_l("alnum", _M_c_locale_ctype);
+	break;
+      case graph:
+	__ret = __wctype_l("graph", _M_c_locale_ctype);
+	break;
+      default:
+	__ret = 0;
+      }
+    return __ret;
+  };
+  
+  wchar_t
+  ctype::do_toupper(wchar_t __c) const
+  { return __towupper_l(__c, _M_c_locale_ctype); }
+
+  const wchar_t*
+  ctype::do_toupper(wchar_t* __lo, const wchar_t* __hi) const
+  {
+    while (__lo < __hi)
+      {
+        *__lo = __towupper_l(*__lo, _M_c_locale_ctype);
+        ++__lo;
+      }
+    return __hi;
+  }
+  
+  wchar_t
+  ctype::do_tolower(wchar_t __c) const
+  { return __towlower_l(__c, _M_c_locale_ctype); }
+  
+  const wchar_t*
+  ctype::do_tolower(wchar_t* __lo, const wchar_t* __hi) const
+  {
+    while (__lo < __hi)
+      {
+        *__lo = __towlower_l(*__lo, _M_c_locale_ctype);
+        ++__lo;
+      }
+    return __hi;
+  }
+
+  bool
+  ctype::
+  do_is(mask __m, char_type __c) const
+  { 
+    return static_cast(__iswctype_l(__c, _M_convert_to_wmask(__m), 
+					  _M_c_locale_ctype)); 
+  }
+  
+  const wchar_t* 
+  ctype::
+  do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __m) const
+  {
+    while (__lo < __hi && !this->do_is(*__m, *__lo))
+      ++__lo;
+    return __lo;
+  }
+  
+  const wchar_t* 
+  ctype::
+  do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
+  {
+    while (__lo < __hi && !this->do_is(__m, *__lo))
+      ++__lo;
+    return __lo;
+  }
+
+  const wchar_t*
+  ctype::
+  do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+  {
+    while (__lo < __hi && this->do_is(__m, *__lo) != 0)
+      ++__lo;
+    return __lo;
+  }
+
+  wchar_t
+  ctype::
+  do_widen(char __c) const
+  { return btowc(__c); }
+  
+  const char* 
+  ctype::
+  do_widen(const char* __lo, const char* __hi, wchar_t* __dest) const
+  {
+    mbstate_t __state;
+    memset(static_cast(&__state), 0, sizeof(mbstate_t));
+    mbsrtowcs(__dest, &__lo, __hi - __lo, &__state);
+    return __hi;
+  }
+
+  char
+  ctype::
+  do_narrow(wchar_t __wc, char __dfault) const
+  { 
+    int __c = wctob(__wc);
+    return (__c == EOF ? __dfault : static_cast(__c)); 
+  }
+
+  const wchar_t*
+  ctype::
+  do_narrow(const wchar_t* __lo, const wchar_t* __hi, char __dfault, 
+	    char* __dest) const
+  {
+    mbstate_t __state;
+    memset(static_cast(&__state), 0, sizeof(mbstate_t));
+    size_t __len = __hi - __lo;
+    size_t __conv = wcsrtombs(__dest, &__lo, __len, &__state);
+    if (__conv == __len)
+      *__dest = __dfault;
+    return __hi;
+  }
+#endif //  _GLIBCPP_USE_WCHAR_T
+}
diff --git a/contrib/libstdc++/config/locale/gnu/messages_members.cc b/contrib/libstdc++/config/locale/gnu/messages_members.cc
new file mode 100644
index 0000000..f202003
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/messages_members.cc
@@ -0,0 +1,57 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
+// 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
+// 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.2.7.1.2  messages virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // Specializations.
+  template<>
+    string
+    messages::do_get(catalog, int, int, const string& __dfault) const
+    {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+      __c_locale __old = __uselocale(_M_c_locale_messages);
+      const char* __msg = const_cast(gettext(__dfault.c_str()));
+      __uselocale(__old);
+      return string(__msg);
+#else
+      const char* __old = setlocale(LC_ALL, _M_name_messages);
+      const char* __msg = gettext(__dfault.c_str());
+      setlocale(LC_ALL, __old);
+      return string(__msg);
+#endif
+    }
+}
diff --git a/contrib/libstdc++/config/locale/gnu/messages_members.h b/contrib/libstdc++/config/locale/gnu/messages_members.h
new file mode 100644
index 0000000..d664d39
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/messages_members.h
@@ -0,0 +1,78 @@
+// std::messages implementation details, GNU version -*- C++ -*-
+
+// 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
+// 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.2.7.1.2  messages virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+  // Non-virtual member functions.
+  template
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::open(const basic_string& __s, const locale& __loc, 
+			   const char* __dir) const
+    { 
+      bindtextdomain(__s.c_str(), __dir);
+      return this->do_open(__s, __loc); 
+    }
+
+  template
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::do_open(const basic_string& __s, 
+			      const locale&) const
+    { 
+      // No error checking is done, assume the catalog exists and can
+      // be used.
+      textdomain(__s.c_str());
+      return 0;
+    }
+
+  template
+    typename messages<_CharT>::string_type  
+    messages<_CharT>::do_get(catalog, int, int, 
+			     const string_type& __dfault) const
+    { 
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+      __c_locale __old = __uselocale(_M_c_locale_messages);
+      char* __msg = gettext(_M_convert_to_char(__dfault));
+      __uselocale(__old);
+      return _M_convert_from_char(__msg);
+#else
+      const char* __old = setlocale(LC_ALL, _M_name_messages);
+      char* __msg = gettext(_M_convert_to_char(__dfault));
+      setlocale(LC_ALL, __old);
+      return _M_convert_from_char(__msg);
+#endif
+    }
+
+  template
+    void    
+    messages<_CharT>::do_close(catalog) const 
+    { }
diff --git a/contrib/libstdc++/config/locale/gnu/monetary_members.cc b/contrib/libstdc++/config/locale/gnu/monetary_members.cc
new file mode 100644
index 0000000..bf9b50c
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/monetary_members.cc
@@ -0,0 +1,501 @@
+// std::moneypunct implementation details, GNU version -*- C++ -*-
+
+// 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
+// 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.2.6.3.2  moneypunct virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // Construct and return valid pattern consisting of some combination of:
+  // space none symbol sign value
+  money_base::pattern
+  money_base::_S_construct_pattern(char __precedes, char __space, char __posn)
+  { 
+    pattern __ret;
+
+    // This insanely complicated routine attempts to construct a valid
+    // pattern for use with monyepunct. A couple of invariants:
+
+    // if (__precedes) symbol -> value
+    // else value -> symbol
+    
+    // if (__space) space
+    // else none
+
+    // none == never first
+    // space never first or last
+
+    // Any elegant implementations of this are welcome.
+    switch (__posn)
+      {
+      case 0:
+      case 1:
+	// 1 The sign precedes the value and symbol.
+	if (__space)
+	  {
+	    // Pattern starts with sign.
+	    if (__precedes)
+	      {
+		__ret.field[1] = symbol;
+		__ret.field[2] = space;
+		__ret.field[3] = value;
+	      }
+	    else
+	      {
+		__ret.field[1] = value;
+		__ret.field[2] = space;
+		__ret.field[3] = symbol;
+	      }
+	    __ret.field[0] = sign;
+	  }
+	else
+	  {
+	    // Pattern starts with sign and ends with none.
+	    if (__precedes)
+	      {
+		__ret.field[1] = symbol;
+		__ret.field[2] = value;
+	      }
+	    else
+	      {
+		__ret.field[1] = value;
+		__ret.field[2] = symbol;
+	      }
+	    __ret.field[0] = sign;
+	    __ret.field[3] = none;
+	  }
+	break;
+      case 2:
+	// 2 The sign follows the value and symbol.
+	if (__space)
+	  {
+	    // Pattern either ends with sign.
+	    if (__precedes)
+	      {
+		__ret.field[0] = symbol;
+		__ret.field[1] = space;
+		__ret.field[2] = value;
+	      }
+	    else
+	      {
+		__ret.field[0] = value;
+		__ret.field[1] = space;
+		__ret.field[2] = symbol;
+	      }
+	    __ret.field[3] = sign;
+	  }
+	else
+	  {
+	    // Pattern ends with sign then none.
+	    if (__precedes)
+	      {
+		__ret.field[0] = symbol;
+		__ret.field[1] = value;
+	      }
+	    else
+	      {
+		__ret.field[0] = value;
+		__ret.field[1] = symbol;
+	      }
+	    __ret.field[2] = sign;
+	    __ret.field[3] = none;
+	  }
+	break;
+      case 3:
+	// 3 The sign immediately precedes the symbol.
+	if (__space)
+	  {
+	    // Have space.
+	    if (__precedes)
+	      {
+		__ret.field[0] = sign;
+		__ret.field[1] = symbol;
+		__ret.field[2] = space;
+		__ret.field[3] = value;
+	      }
+	    else
+	      {
+		__ret.field[0] = value;
+		__ret.field[1] = space;
+		__ret.field[2] = sign;
+		__ret.field[3] = symbol;
+	      }
+	  }
+	else
+	  {
+	    // Have none.
+	    if (__precedes)
+	      {
+		__ret.field[0] = sign;
+		__ret.field[1] = symbol;
+		__ret.field[2] = value;
+	      }
+	    else
+	      {
+		__ret.field[0] = value;
+		__ret.field[1] = sign;
+		__ret.field[2] = symbol;
+	      }
+	    __ret.field[3] = none;
+	  }
+	break;
+      case 4:
+	// 4 The sign immediately follows the symbol. 
+	if (__space)
+	  {
+	    // Have space.
+	    if (__precedes)
+	      {
+		__ret.field[0] = symbol;
+		__ret.field[1] = sign;
+		__ret.field[2] = space;
+		__ret.field[3] = value;
+	      }
+	    else
+	      {
+		__ret.field[0] = value;
+		__ret.field[1] = space;
+		__ret.field[2] = symbol;
+		__ret.field[3] = sign;
+	      }
+	  }
+	else
+	  {
+	    // Have none.
+	    if (__precedes)
+	      {
+		__ret.field[0] = symbol;
+		__ret.field[1] = sign;
+		__ret.field[2] = value;
+	      }
+	    else
+	      {
+		__ret.field[0] = value;
+		__ret.field[1] = symbol;
+		__ret.field[2] = sign;
+	      }
+	    __ret.field[3] = none;
+	  }
+	break;
+      default:
+	;
+      }
+    return __ret;
+  }
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_decimal_point = '.';
+	  _M_thousands_sep = ',';
+	  _M_grouping = "";
+	  _M_curr_symbol = "";
+	  _M_positive_sign = "";
+	  _M_negative_sign = "";
+	  _M_frac_digits = 0;
+	  _M_pos_format = money_base::_S_default_pattern;
+	  _M_neg_format = money_base::_S_default_pattern;
+	}
+      else
+	{
+	  // Named locale.
+	  _M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, __cloc));
+	  _M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, __cloc));
+	  _M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+	  _M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+
+	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
+	  if (!__nposn)
+	    _M_negative_sign = "()";
+	  else
+	    _M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
+
+	  // _Intl == true
+	  _M_curr_symbol = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
+	  _M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, __cloc));
+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
+	  _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
+	  _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+	}
+    }
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_decimal_point = '.';
+	  _M_thousands_sep = ',';
+	  _M_grouping = "";
+	  _M_curr_symbol = "";
+	  _M_positive_sign = "";
+	  _M_negative_sign = "";
+	  _M_frac_digits = 0;
+	  _M_pos_format = money_base::_S_default_pattern;
+	  _M_neg_format = money_base::_S_default_pattern;
+	}
+      else
+	{
+	  // Named locale.
+	  _M_decimal_point = *(__nl_langinfo_l(__MON_DECIMAL_POINT, __cloc));
+	  _M_thousands_sep = *(__nl_langinfo_l(__MON_THOUSANDS_SEP, __cloc));
+	  _M_grouping = __nl_langinfo_l(__MON_GROUPING, __cloc);
+	  _M_positive_sign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+
+	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
+	  if (!__nposn)
+	    _M_negative_sign = "()";
+	  else
+	    _M_negative_sign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
+
+	  // _Intl == false
+	  _M_curr_symbol = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
+	  _M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
+	  _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
+	  _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+	}
+    }
+
+  template<> 
+    moneypunct::~moneypunct()
+    { }
+
+  template<> 
+    moneypunct::~moneypunct()
+    { }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_decimal_point = L'.';
+	  _M_thousands_sep = L',';
+	  _M_grouping = "";
+	  _M_curr_symbol = L"";
+	  _M_positive_sign = L"";
+	  _M_negative_sign = L"";
+	  _M_frac_digits = 0;
+	  _M_pos_format = money_base::_S_default_pattern;
+	  _M_neg_format = money_base::_S_default_pattern;
+	}
+      else
+	{
+	  // Named locale.
+	  _M_decimal_point = static_cast(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+
+	  _M_thousands_sep = static_cast(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
+	  _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+
+	  mbstate_t __state;
+	  size_t __len;
+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
+	  const char* __ccurr = __nl_langinfo_l(__INT_CURR_SYMBOL, __cloc);
+
+	  // NB: Should swich to __cloc's ctype info first.
+	  __len = strlen(__cpossign);
+	  if (__len)
+	    {
+	      ++__len;
+	      memset(&__state, 0, sizeof(mbstate_t));
+	      wchar_t* __wcs = new wchar_t[__len];
+	      mbsrtowcs(__wcs, &__cpossign, __len, &__state);
+	      _M_positive_sign = __wcs;
+	    }
+	  else
+	    _M_positive_sign = L"";
+
+	  char __nposn = *(__nl_langinfo_l(__INT_N_SIGN_POSN, __cloc));
+	  __len = strlen(__cnegsign);
+	  if (!__nposn)
+	    _M_negative_sign = L"()";
+	  else if (__len)
+	    { 
+	      ++__len;
+	      memset(&__state, 0, sizeof(mbstate_t));
+	      wchar_t* __wcs = new wchar_t[__len];
+	      mbsrtowcs(__wcs, &__cnegsign, __len, &__state);
+	      _M_negative_sign = __wcs;
+	    }
+	  else
+	    _M_negative_sign = L"";
+
+	  // _Intl == true.
+	  __len = strlen(__ccurr);
+	  if (__len)
+	    {
+	      ++__len;
+	      memset(&__state, 0, sizeof(mbstate_t));
+	      wchar_t* __wcs = new wchar_t[__len];
+	      mbsrtowcs(__wcs, &__ccurr, __len, &__state);
+	      _M_curr_symbol = __wcs;
+	    }
+	  else
+	    _M_curr_symbol = L"";
+
+	  _M_frac_digits = *(__nl_langinfo_l(__INT_FRAC_DIGITS, __cloc));
+	  char __pprecedes = *(__nl_langinfo_l(__INT_P_CS_PRECEDES, __cloc));
+	  char __pspace = *(__nl_langinfo_l(__INT_P_SEP_BY_SPACE, __cloc));
+	  char __pposn = *(__nl_langinfo_l(__INT_P_SIGN_POSN, __cloc));
+	  _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+	  char __nprecedes = *(__nl_langinfo_l(__INT_N_CS_PRECEDES, __cloc));
+	  char __nspace = *(__nl_langinfo_l(__INT_N_SEP_BY_SPACE, __cloc));
+	  _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+	}
+    }
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_decimal_point = L'.';
+	  _M_thousands_sep = L',';
+	  _M_grouping = "";
+	  _M_curr_symbol = L"";
+	  _M_positive_sign = L"";
+	  _M_negative_sign = L"";
+	  _M_frac_digits = 0;
+	  _M_pos_format = money_base::_S_default_pattern;
+	  _M_neg_format = money_base::_S_default_pattern;
+	}
+      else
+	{
+	  // Named locale.
+	  _M_decimal_point = static_cast(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+	  _M_thousands_sep = static_cast(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
+	  _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+
+	  mbstate_t __state;
+	  size_t __len;
+	  const char* __cpossign = __nl_langinfo_l(__POSITIVE_SIGN, __cloc);
+	  const char* __cnegsign = __nl_langinfo_l(__NEGATIVE_SIGN, __cloc);
+	  const char* __ccurr = __nl_langinfo_l(__CURRENCY_SYMBOL, __cloc);
+
+	  // NB: Should swich to __cloc's ctype info first.
+	  __len = strlen(__cpossign);
+	  if (__len)
+	    {
+	      ++__len;
+	      memset(&__state, 0, sizeof(mbstate_t));
+	      wchar_t* __wcs = new wchar_t[__len];
+	      mbsrtowcs(__wcs, &__cpossign, __len, &__state);
+	      _M_positive_sign = __wcs;
+	    }
+	  else
+	    _M_positive_sign = L"";
+
+	  char __nposn = *(__nl_langinfo_l(__N_SIGN_POSN, __cloc));
+	  __len = strlen(__cnegsign);
+	  if (!__nposn)
+	    _M_negative_sign = L"()";
+	  else if (__len)
+	    { 
+	      ++__len;
+	      memset(&__state, 0, sizeof(mbstate_t));
+	      wchar_t* __wcs = new wchar_t[__len];
+	      mbsrtowcs(__wcs, &__cnegsign, __len, &__state);
+	      _M_negative_sign = __wcs;
+	    }
+	  else
+	    _M_negative_sign = L"";
+
+	  // _Intl == true.
+	  __len = strlen(__ccurr);
+	  if (__len)
+	    {
+	      ++__len;
+	      memset(&__state, 0, sizeof(mbstate_t));
+	      wchar_t* __wcs = new wchar_t[__len];
+	      mbsrtowcs(__wcs, &__ccurr, __len, &__state);
+	      _M_curr_symbol = __wcs;
+	    }
+	  else
+	    _M_curr_symbol = L"";
+
+	  _M_frac_digits = *(__nl_langinfo_l(__FRAC_DIGITS, __cloc));
+	  char __pprecedes = *(__nl_langinfo_l(__P_CS_PRECEDES, __cloc));
+	  char __pspace = *(__nl_langinfo_l(__P_SEP_BY_SPACE, __cloc));
+	  char __pposn = *(__nl_langinfo_l(__P_SIGN_POSN, __cloc));
+	  _M_pos_format = _S_construct_pattern(__pprecedes, __pspace, __pposn);
+	  char __nprecedes = *(__nl_langinfo_l(__N_CS_PRECEDES, __cloc));
+	  char __nspace = *(__nl_langinfo_l(__N_SEP_BY_SPACE, __cloc));
+	  _M_neg_format = _S_construct_pattern(__nprecedes, __nspace, __nposn);
+	}
+    }
+
+  template<> 
+    moneypunct::~moneypunct()
+    {
+      if (wcslen(_M_positive_sign))
+	delete [] _M_positive_sign;
+      if (wcslen(_M_negative_sign) && (wcscmp(_M_negative_sign, L"()") != 0))
+	delete [] _M_negative_sign;
+      if (wcslen(_M_curr_symbol))
+	delete [] _M_curr_symbol;
+    }
+
+  template<> 
+    moneypunct::~moneypunct()
+    {
+      if (wcslen(_M_positive_sign))
+	delete [] _M_positive_sign;
+      if (wcslen(_M_negative_sign) && (wcscmp(_M_negative_sign, L"()") != 0))
+	delete [] _M_negative_sign;
+      if (wcslen(_M_curr_symbol))
+	delete [] _M_curr_symbol;
+    }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/gnu/numeric_members.cc b/contrib/libstdc++/config/locale/gnu/numeric_members.cc
new file mode 100644
index 0000000..4806435
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/numeric_members.cc
@@ -0,0 +1,106 @@
+// std::numpunct implementation details, GNU version -*- C++ -*-
+
+// 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
+// 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.2.3.1.2  numpunct virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_decimal_point = '.';
+	  _M_thousands_sep = ',';
+	  _M_grouping = "";
+	}
+      else
+	{
+	  // Named locale.
+	  _M_decimal_point = *(__nl_langinfo_l(RADIXCHAR, __cloc));
+	  _M_thousands_sep = *(__nl_langinfo_l(THOUSEP, __cloc));
+	  // Check for NUL, which implies no grouping.
+	  if (_M_thousands_sep == '\0')
+	    _M_grouping = "";
+	  else
+	    _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+	}
+      // NB: There is no way to extact this info from posix locales.
+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
+      _M_truename = "true";
+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
+      _M_falsename = "false";
+    }
+ 
+  template<> 
+    numpunct::~numpunct()
+    { }
+   
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_decimal_point = L'.';
+	  _M_thousands_sep = L',';
+	  _M_grouping = "";
+	}
+      else
+	{
+	  // Named locale.
+	  _M_decimal_point = static_cast(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_DECIMAL_POINT_WC, __cloc)}).__w);
+	  _M_thousands_sep = static_cast(((union { const char *__s; unsigned int __w; }){ __s: __nl_langinfo_l(_NL_NUMERIC_THOUSANDS_SEP_WC, __cloc)}).__w);
+	  if (_M_thousands_sep == L'\0')
+	    _M_grouping = "";
+	  else
+	    _M_grouping = __nl_langinfo_l(GROUPING, __cloc);
+	}
+      // NB: There is no way to extact this info from posix locales.
+      // _M_truename = __nl_langinfo_l(YESSTR, __cloc);
+      _M_truename = L"true";
+      // _M_falsename = __nl_langinfo_l(NOSTR, __cloc);
+      _M_falsename = L"false";
+    }
+
+  template<> 
+    numpunct::~numpunct()
+    { }
+ #endif
+}
diff --git a/contrib/libstdc++/config/locale/gnu/time_members.cc b/contrib/libstdc++/config/locale/gnu/time_members.cc
new file mode 100644
index 0000000..665ea02
--- /dev/null
+++ b/contrib/libstdc++/config/locale/gnu/time_members.cc
@@ -0,0 +1,336 @@
+// std::time_get, std::time_put implementation, GNU version -*- C++ -*-
+
+// 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
+// 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.2.5.1.2 - time_get virtual functions
+// ISO C++ 14882: 22.2.5.3.2 - time_put virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  template<>
+    __timepunct::~__timepunct()
+    {
+      if (_M_c_locale_timepunct != _S_c_locale)
+	_S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+  template<>
+    void
+    __timepunct::
+    _M_put(char* __s, size_t __maxlen, const char* __format, 
+	   const tm* __tm) const
+    {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+      __strftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
+#else
+      const char* __old = setlocale(LC_ALL, _M_name_timepunct);
+      strftime(__s, __maxlen, __format, __tm);
+      setlocale(LC_ALL, __old);
+#endif
+    }
+
+  template<> 
+    void
+    __timepunct::_M_initialize_timepunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_date_format = "%m/%d/%y";
+	  _M_date_era_format = "%m/%d/%y";
+	  _M_time_format = "%H:%M:%S";
+	  _M_time_era_format = "%H:%M:%S";
+	  _M_date_time_format = "";
+	  _M_date_time_era_format = "";
+	  _M_am = "AM";
+	  _M_pm = "PM";
+	  _M_am_pm_format = "";
+
+	  // Day names, starting with "C"'s Sunday.
+	  _M_day1 = "Sunday";
+	  _M_day2 = "Monday";
+	  _M_day3 = "Tuesday";
+	  _M_day4 = "Wednesday";
+	  _M_day5 = "Thursday";
+	  _M_day6 = "Friday";
+	  _M_day7 = "Saturday";
+
+	  // Abbreviated day names, starting with "C"'s Sun.
+	  _M_day_a1 = "Sun";
+	  _M_day_a2 = "Mon";
+	  _M_day_a3 = "Tue";
+	  _M_day_a4 = "Wed";
+	  _M_day_a5 = "Thu";
+	  _M_day_a6 = "Fri";
+	  _M_day_a7 = "Sat";
+
+	  // Month names, starting with "C"'s January.
+	  _M_month01 = "January";
+	  _M_month02 = "February";
+	  _M_month03 = "March";
+	  _M_month04 = "April";
+	  _M_month05 = "May";
+	  _M_month06 = "June";
+	  _M_month07 = "July";
+	  _M_month08 = "August";
+	  _M_month09 = "September";
+	  _M_month10 = "October";
+	  _M_month11 = "November";
+	  _M_month12 = "December";
+
+	  // Abbreviated month names, starting with "C"'s Jan.
+	  _M_month_a01 = "Jan";
+	  _M_month_a02 = "Feb";
+	  _M_month_a03 = "Mar";
+	  _M_month_a04 = "Apr";
+	  _M_month_a05 = "May";
+	  _M_month_a06 = "Jun";
+	  _M_month_a07 = "July";
+	  _M_month_a08 = "Aug";
+	  _M_month_a09 = "Sep";
+	  _M_month_a10 = "Oct";
+	  _M_month_a11 = "Nov";
+	  _M_month_a12 = "Dec";
+	}
+      else
+	{
+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
+
+	  _M_date_format = __nl_langinfo_l(D_FMT, __cloc);
+	  _M_date_era_format = __nl_langinfo_l(ERA_D_FMT, __cloc);
+	  _M_time_format = __nl_langinfo_l(T_FMT, __cloc);
+	  _M_time_era_format = __nl_langinfo_l(ERA_T_FMT, __cloc);
+	  _M_date_time_format = __nl_langinfo_l(D_T_FMT, __cloc);
+	  _M_date_time_era_format = __nl_langinfo_l(ERA_D_T_FMT, __cloc);
+	  _M_am = __nl_langinfo_l(AM_STR, __cloc);
+	  _M_pm = __nl_langinfo_l(PM_STR, __cloc);
+	  _M_am_pm_format = __nl_langinfo_l(T_FMT_AMPM, __cloc);
+
+	  // Day names, starting with "C"'s Sunday.
+	  _M_day1 = __nl_langinfo_l(DAY_1, __cloc);
+	  _M_day2 = __nl_langinfo_l(DAY_2, __cloc);
+	  _M_day3 = __nl_langinfo_l(DAY_3, __cloc);
+	  _M_day4 = __nl_langinfo_l(DAY_4, __cloc);
+	  _M_day5 = __nl_langinfo_l(DAY_5, __cloc);
+	  _M_day6 = __nl_langinfo_l(DAY_6, __cloc);
+	  _M_day7 = __nl_langinfo_l(DAY_7, __cloc);
+
+	  // Abbreviated day names, starting with "C"'s Sun.
+	  _M_day_a1 = __nl_langinfo_l(ABDAY_1, __cloc);
+	  _M_day_a2 = __nl_langinfo_l(ABDAY_2, __cloc);
+	  _M_day_a3 = __nl_langinfo_l(ABDAY_3, __cloc);
+	  _M_day_a4 = __nl_langinfo_l(ABDAY_4, __cloc);
+	  _M_day_a5 = __nl_langinfo_l(ABDAY_5, __cloc);
+	  _M_day_a6 = __nl_langinfo_l(ABDAY_6, __cloc);
+	  _M_day_a7 = __nl_langinfo_l(ABDAY_7, __cloc);
+
+	  // Month names, starting with "C"'s January.
+	  _M_month01 = __nl_langinfo_l(MON_1, __cloc);
+	  _M_month02 = __nl_langinfo_l(MON_2, __cloc);
+	  _M_month03 = __nl_langinfo_l(MON_3, __cloc);
+	  _M_month04 = __nl_langinfo_l(MON_4, __cloc);
+	  _M_month05 = __nl_langinfo_l(MON_5, __cloc);
+	  _M_month06 = __nl_langinfo_l(MON_6, __cloc);
+	  _M_month07 = __nl_langinfo_l(MON_7, __cloc);
+	  _M_month08 = __nl_langinfo_l(MON_8, __cloc);
+	  _M_month09 = __nl_langinfo_l(MON_9, __cloc);
+	  _M_month10 = __nl_langinfo_l(MON_10, __cloc);
+	  _M_month11 = __nl_langinfo_l(MON_11, __cloc);
+	  _M_month12 = __nl_langinfo_l(MON_12, __cloc);
+
+	  // Abbreviated month names, starting with "C"'s Jan.
+	  _M_month_a01 = __nl_langinfo_l(ABMON_1, __cloc);
+	  _M_month_a02 = __nl_langinfo_l(ABMON_2, __cloc);
+	  _M_month_a03 = __nl_langinfo_l(ABMON_3, __cloc);
+	  _M_month_a04 = __nl_langinfo_l(ABMON_4, __cloc);
+	  _M_month_a05 = __nl_langinfo_l(ABMON_5, __cloc);
+	  _M_month_a06 = __nl_langinfo_l(ABMON_6, __cloc);
+	  _M_month_a07 = __nl_langinfo_l(ABMON_7, __cloc);
+	  _M_month_a08 = __nl_langinfo_l(ABMON_8, __cloc);
+	  _M_month_a09 = __nl_langinfo_l(ABMON_9, __cloc);
+	  _M_month_a10 = __nl_langinfo_l(ABMON_10, __cloc);
+	  _M_month_a11 = __nl_langinfo_l(ABMON_11, __cloc);
+	  _M_month_a12 = __nl_langinfo_l(ABMON_12, __cloc);
+	}
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    __timepunct::~__timepunct()
+    {
+      if (_M_c_locale_timepunct != _S_c_locale)
+	_S_destroy_c_locale(_M_c_locale_timepunct); 
+    }
+
+  template<>
+    void
+    __timepunct::
+    _M_put(wchar_t* __s, size_t __maxlen, const wchar_t* __format, 
+	   const tm* __tm) const
+    {
+#if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2)
+      __wcsftime_l(__s, __maxlen, _M_c_locale_timepunct, __format, __tm);
+#else
+      const char* __old = setlocale(LC_ALL, _M_name_timepunct);
+      wcsftime(__s, __maxlen, __format, __tm);
+      setlocale(LC_ALL, __old);
+#endif
+    }
+
+  template<> 
+    void
+    __timepunct::_M_initialize_timepunct(__c_locale __cloc)
+    {
+      if (__cloc == _S_c_locale)
+	{
+	  // "C" locale
+	  _M_date_format = L"%m/%d/%y";
+	  _M_date_era_format = L"%m/%d/%y";
+	  _M_time_format = L"%H:%M:%S";
+	  _M_time_era_format = L"%H:%M:%S";
+	  _M_date_time_format = L"";
+	  _M_date_time_era_format = L"";
+	  _M_am = L"AM";
+	  _M_pm = L"PM";
+	  _M_am_pm_format = L"";
+
+	  // Day names, starting with "C"'s Sunday.
+	  _M_day1 = L"Sunday";
+	  _M_day2 = L"Monday";
+	  _M_day3 = L"Tuesday";
+	  _M_day4 = L"Wednesday";
+	  _M_day5 = L"Thursday";
+	  _M_day6 = L"Friday";
+	  _M_day7 = L"Saturday";
+
+	  // Abbreviated day names, starting with "C"'s Sun.
+	  _M_day_a1 = L"Sun";
+	  _M_day_a2 = L"Mon";
+	  _M_day_a3 = L"Tue";
+	  _M_day_a4 = L"Wed";
+	  _M_day_a5 = L"Thu";
+	  _M_day_a6 = L"Fri";
+	  _M_day_a7 = L"Sat";
+
+	  // Month names, starting with "C"'s January.
+	  _M_month01 = L"January";
+	  _M_month02 = L"February";
+	  _M_month03 = L"March";
+	  _M_month04 = L"April";
+	  _M_month05 = L"May";
+	  _M_month06 = L"June";
+	  _M_month07 = L"July";
+	  _M_month08 = L"August";
+	  _M_month09 = L"September";
+	  _M_month10 = L"October";
+	  _M_month11 = L"November";
+	  _M_month12 = L"December";
+
+	  // Abbreviated month names, starting with "C"'s Jan.
+	  _M_month_a01 = L"Jan";
+	  _M_month_a02 = L"Feb";
+	  _M_month_a03 = L"Mar";
+	  _M_month_a04 = L"Apr";
+	  _M_month_a05 = L"May";
+	  _M_month_a06 = L"Jun";
+	  _M_month_a07 = L"July";
+	  _M_month_a08 = L"Aug";
+	  _M_month_a09 = L"Sep";
+	  _M_month_a10 = L"Oct";
+	  _M_month_a11 = L"Nov";
+	  _M_month_a12 = L"Dec";
+	}
+      else
+	{
+	  _M_c_locale_timepunct = _S_clone_c_locale(__cloc); 
+
+	  _M_date_format = reinterpret_cast(__nl_langinfo_l(_NL_WD_FMT, __cloc));
+	  _M_date_era_format = reinterpret_cast(__nl_langinfo_l(_NL_WERA_D_FMT, __cloc));
+	  _M_time_format = reinterpret_cast(__nl_langinfo_l(_NL_WT_FMT, __cloc));
+	  _M_time_era_format = reinterpret_cast(__nl_langinfo_l(_NL_WERA_T_FMT, __cloc));
+	  _M_date_time_format = reinterpret_cast(__nl_langinfo_l(_NL_WD_T_FMT, __cloc));
+	  _M_date_time_era_format = reinterpret_cast(__nl_langinfo_l(_NL_WERA_D_T_FMT, __cloc));
+	  _M_am = reinterpret_cast(__nl_langinfo_l(_NL_WAM_STR, __cloc));
+	  _M_pm = reinterpret_cast(__nl_langinfo_l(_NL_WPM_STR, __cloc));
+	  _M_am_pm_format = reinterpret_cast(__nl_langinfo_l(_NL_WT_FMT_AMPM, __cloc));
+
+	  // Day names, starting with "C"'s Sunday.
+	  _M_day1 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_1, __cloc));
+	  _M_day2 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_2, __cloc));
+	  _M_day3 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_3, __cloc));
+	  _M_day4 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_4, __cloc));
+	  _M_day5 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_5, __cloc));
+	  _M_day6 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_6, __cloc));
+	  _M_day7 = reinterpret_cast(__nl_langinfo_l(_NL_WDAY_7, __cloc));
+
+	  // Abbreviated day names, starting with "C"'s Sun.
+	  _M_day_a1 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_1, __cloc));
+	  _M_day_a2 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_2, __cloc));
+	  _M_day_a3 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_3, __cloc));
+	  _M_day_a4 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_4, __cloc));
+	  _M_day_a5 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_5, __cloc));
+	  _M_day_a6 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_6, __cloc));
+	  _M_day_a7 = reinterpret_cast(__nl_langinfo_l(_NL_WABDAY_7, __cloc));
+
+	  // Month names, starting with "C"'s January.
+	  _M_month01 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_1, __cloc));
+	  _M_month02 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_2, __cloc));
+	  _M_month03 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_3, __cloc));
+	  _M_month04 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_4, __cloc));
+	  _M_month05 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_5, __cloc));
+	  _M_month06 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_6, __cloc));
+	  _M_month07 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_7, __cloc));
+	  _M_month08 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_8, __cloc));
+	  _M_month09 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_9, __cloc));
+	  _M_month10 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_10, __cloc));
+	  _M_month11 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_11, __cloc));
+	  _M_month12 = reinterpret_cast(__nl_langinfo_l(_NL_WMON_12, __cloc));
+
+	  // Abbreviated month names, starting with "C"'s Jan.
+	  _M_month_a01 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_1, __cloc));
+	  _M_month_a02 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_2, __cloc));
+	  _M_month_a03 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_3, __cloc));
+	  _M_month_a04 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_4, __cloc));
+	  _M_month_a05 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_5, __cloc));
+	  _M_month_a06 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_6, __cloc));
+	  _M_month_a07 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_7, __cloc));
+	  _M_month_a08 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_8, __cloc));
+	  _M_month_a09 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_9, __cloc));
+	  _M_month_a10 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_10, __cloc));
+	  _M_month_a11 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_11, __cloc));
+	  _M_month_a12 = reinterpret_cast(__nl_langinfo_l(_NL_WABMON_12, __cloc));
+	}
+    }
+#endif
+}
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc b/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc
new file mode 100644
index 0000000..0a89aee
--- /dev/null
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.cc
@@ -0,0 +1,112 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// 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
+// 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.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std 
+{
+  void
+  locale::facet::_S_create_c_locale(__c_locale&, const char*, __c_locale*)
+  { }
+
+  void
+  locale::facet::_S_destroy_c_locale(__c_locale&)
+  { }
+
+  __c_locale
+  locale::facet::_S_clone_c_locale(__c_locale&)
+  { return __c_locale(); }
+
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = '.';
+      _M_thousands_sep = ',';
+      _M_grouping = "";
+      _M_truename = "true";
+      _M_falsename = "false";
+    }
+      
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = L'.';
+      _M_thousands_sep = L',';
+      _M_grouping = "";
+      _M_truename = L"true";
+      _M_falsename = L"false";
+    }
+#endif
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = '.';
+      _M_thousands_sep = ',';
+      _M_grouping = "";
+      _M_curr_symbol = string_type();
+      _M_positive_sign = string_type();
+      _M_negative_sign = string_type();
+      _M_frac_digits = 0;
+      _M_pos_format = money_base::_S_default_pattern;
+      _M_neg_format = money_base::_S_default_pattern;
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale)
+    {
+      // "C" locale
+      _M_decimal_point = L'.';
+      _M_thousands_sep = L',';
+      _M_grouping = "";
+      _M_curr_symbol = string_type();
+      _M_positive_sign = string_type();
+      _M_negative_sign = string_type();
+      _M_frac_digits = 0;
+      _M_pos_format = money_base::_S_default_pattern;
+      _M_neg_format = money_base::_S_default_pattern;
+    }
+#endif
+}  // namespace std
+
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.h b/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.h
new file mode 100644
index 0000000..4c68f27
--- /dev/null
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/c_locale.h
@@ -0,0 +1,44 @@
+// Wrapper for underlying C-language localization -*- C++ -*-
+
+// 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
+// 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.8  Standard locale categories.
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+#include 		// For codecvt
+#include 		// For codecvt using iconv, iconv_t
+#include  		// For messages
+
+namespace std
+{
+  typedef int*			__c_locale;
+}
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h b/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h
new file mode 100644
index 0000000..139e6c9
--- /dev/null
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/codecvt_specializations.h
@@ -0,0 +1,460 @@
+// Locale support (codecvt) -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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.2.1.5 Template class codecvt
+//
+
+// Warning: this file is not meant for user inclusion.  Use .
+
+// Written by Benjamin Kosnik 
+
+  // XXX
+  // Define this here to codecvt.cc can have _S_max_size definition.
+#define _GLIBCPP_USE___ENC_TRAITS 1
+
+  // Extension to use icov for dealing with character encodings,
+  // including conversions and comparisons between various character
+  // sets.  This object encapsulates data that may need to be shared between
+  // char_traits, codecvt and ctype.
+  class __enc_traits
+  {
+  public:
+    // Types: 
+    // NB: A conversion descriptor subsumes and enhances the
+    // functionality of a simple state type such as mbstate_t.
+    typedef iconv_t	__desc_type;
+    
+  protected:
+    // Data Members:
+    // Max size of charset encoding name
+    static const int 	_S_max_size = 32;
+    // Name of internal character set encoding.
+    char	       	_M_int_enc[_S_max_size];
+    // Name of external character set encoding.
+    char  	       	_M_ext_enc[_S_max_size];
+
+    // Conversion descriptor between external encoding to internal encoding.
+    __desc_type		_M_in_desc;
+    // Conversion descriptor between internal encoding to external encoding.
+    __desc_type		_M_out_desc;
+
+    // Details the byte-order marker for the external encoding, if necessary.
+    int			_M_ext_bom;
+
+    // Details the byte-order marker for the internal encoding, if necessary.
+    int			_M_int_bom;
+
+  public:
+    explicit __enc_traits() 
+    : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0) 
+    {
+      memset(_M_int_enc, 0, _S_max_size);
+      memset(_M_ext_enc, 0, _S_max_size);
+    }
+
+    explicit __enc_traits(const char* __int, const char* __ext, 
+			  int __ibom = 0, int __ebom = 0)
+    : _M_in_desc(0), _M_out_desc(0), _M_ext_bom(0), _M_int_bom(0)
+    {
+      strncpy(_M_int_enc, __int, _S_max_size);
+      strncpy(_M_ext_enc, __ext, _S_max_size);
+    }
+
+    // 21.1.2 traits typedefs
+    // p4
+    // typedef STATE_T state_type
+    // requires: state_type shall meet the requirements of
+    // CopyConstructible types (20.1.3)
+    __enc_traits(const __enc_traits& __obj): _M_in_desc(0), _M_out_desc(0)
+    {
+      strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
+      strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
+      _M_ext_bom = __obj._M_ext_bom;
+      _M_int_bom = __obj._M_int_bom;
+    }
+
+    // Need assignment operator as well.
+    __enc_traits&
+    operator=(const __enc_traits& __obj)
+    {
+      strncpy(_M_int_enc, __obj._M_int_enc, _S_max_size);
+      strncpy(_M_ext_enc, __obj._M_ext_enc, _S_max_size);
+      _M_in_desc = 0;
+      _M_out_desc = 0;
+      _M_ext_bom = __obj._M_ext_bom;
+      _M_int_bom = __obj._M_int_bom;
+    }
+
+    ~__enc_traits()
+    {
+      __desc_type __err = reinterpret_cast(-1);
+      if (_M_in_desc && _M_in_desc != __err) 
+	iconv_close(_M_in_desc);
+      if (_M_out_desc && _M_out_desc != __err) 
+	iconv_close(_M_out_desc);
+    } 
+
+    void
+    _M_init()
+    {
+      const __desc_type __err = reinterpret_cast(-1);
+      if (!_M_in_desc)
+	{
+	  _M_in_desc = iconv_open(_M_int_enc, _M_ext_enc);
+	  if (_M_in_desc == __err)
+	    __throw_runtime_error("creating iconv input descriptor failed.");
+	}
+      if (!_M_out_desc)
+	{
+	  _M_out_desc = iconv_open(_M_ext_enc, _M_int_enc);
+	  if (_M_out_desc == __err)
+	    __throw_runtime_error("creating iconv output descriptor failed.");
+	}
+    }
+
+    bool
+    _M_good()
+    { 
+      const __desc_type __err = reinterpret_cast(-1);
+      bool __test = _M_in_desc && _M_in_desc != __err; 
+      __test &=  _M_out_desc && _M_out_desc != __err;
+      return __test;
+    }
+
+    const __desc_type* 
+    _M_get_in_descriptor()
+    { return &_M_in_desc; }
+
+    const __desc_type* 
+    _M_get_out_descriptor()
+    { return &_M_out_desc; }
+
+    int 
+    _M_get_external_bom()
+    { return _M_ext_bom; }
+
+    int 
+    _M_get_internal_bom()
+    { return _M_int_bom; }
+
+    const char* 
+    _M_get_internal_enc()
+    { return _M_int_enc; }
+
+    const char* 
+    _M_get_external_enc()
+    { return _M_ext_enc; }
+  };
+
+  // Partial specialization
+  // This specialization takes advantage of iconv to provide code
+  // conversions between a large number of character encodings.
+  template
+    class codecvt<_InternT, _ExternT, __enc_traits>
+    : public __codecvt_abstract_base<_InternT, _ExternT, __enc_traits>
+    {
+    public:      
+      // Types:
+      typedef codecvt_base::result			result;
+      typedef _InternT 					intern_type;
+      typedef _ExternT 					extern_type;
+      typedef __enc_traits 				state_type;
+      typedef __enc_traits::__desc_type 		__desc_type;
+      typedef __enc_traits				__enc_type;
+
+      // Data Members:
+      static locale::id 		id;
+
+      explicit 
+      codecvt(size_t __refs = 0)
+      : __codecvt_abstract_base(__refs)
+      { }
+
+      explicit 
+      codecvt(__enc_type* __enc, size_t __refs = 0)
+      : __codecvt_abstract_base(__refs)
+      { }
+
+    protected:
+      virtual 
+      ~codecvt() { }
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from, 
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to, 
+		 extern_type* __to_end, extern_type*& __to_next) const;
+
+      virtual result
+      do_in(state_type& __state, const extern_type* __from, 
+	    const extern_type* __from_end, const extern_type*& __from_next,
+	    intern_type* __to, intern_type* __to_end, 
+	    intern_type*& __to_next) const;
+
+      virtual int 
+      do_encoding() const throw();
+
+      virtual bool 
+      do_always_noconv() const throw();
+
+      virtual int 
+      do_length(const state_type&, const extern_type* __from, 
+		const extern_type* __end, size_t __max) const;
+
+      virtual int 
+      do_max_length() const throw();
+    };
+
+  template
+    locale::id 
+    codecvt<_InternT, _ExternT, __enc_traits>::id;
+
+  // This adaptor works around the signature problems of the second
+  // argument to iconv():  SUSv2 and others use 'const char**', but glibc 2.2
+  // uses 'char**', which matches the POSIX 1003.1-2001 standard.
+  // Using this adaptor, g++ will do the work for us.
+  template
+    inline size_t
+    __iconv_adaptor(size_t(*__func)(iconv_t, _T, size_t*, char**, size_t*),
+                    iconv_t __cd, char** __inbuf, size_t* __inbytes,
+                    char** __outbuf, size_t* __outbytes)
+    { return __func(__cd, (_T)__inbuf, __inbytes, __outbuf, __outbytes); }
+
+  template
+    codecvt_base::result
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_out(state_type& __state, const intern_type* __from, 
+	   const intern_type* __from_end, const intern_type*& __from_next,
+	   extern_type* __to, extern_type* __to_end,
+	   extern_type*& __to_next) const
+    {
+      result __ret = error;
+      if (__state._M_good())
+	{
+	  typedef state_type::__desc_type	__desc_type;
+	  const __desc_type* __desc = __state._M_get_out_descriptor();
+	  const size_t __fmultiple = sizeof(intern_type);
+	  size_t __fbytes = __fmultiple * (__from_end - __from);
+	  const size_t __tmultiple = sizeof(extern_type);
+	  size_t __tbytes = __tmultiple * (__to_end - __to); 
+	  
+	  // Argument list for iconv specifies a byte sequence. Thus,
+	  // all to/from arrays must be brutally casted to char*.
+	  char* __cto = reinterpret_cast(__to);
+	  char* __cfrom;
+	  size_t __conv;
+
+	  // Some encodings need a byte order marker as the first item
+	  // in the byte stream, to designate endian-ness. The default
+	  // value for the byte order marker is NULL, so if this is
+	  // the case, it's not necessary and we can just go on our
+	  // merry way.
+	  int __int_bom = __state._M_get_internal_bom();
+	  if (__int_bom)
+	    {	  
+	      size_t __size = __from_end - __from;
+	      intern_type* __cfixed = static_cast(__builtin_alloca(sizeof(intern_type) * (__size + 1)));
+	      __cfixed[0] = static_cast(__int_bom);
+	      char_traits::copy(__cfixed + 1, __from, __size);
+	      __cfrom = reinterpret_cast(__cfixed);
+	      __conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
+                                        &__fbytes, &__cto, &__tbytes); 
+	    }
+	  else
+	    {
+	      intern_type* __cfixed = const_cast(__from);
+	      __cfrom = reinterpret_cast(__cfixed);
+	      __conv = __iconv_adaptor(iconv, *__desc, &__cfrom, &__fbytes, 
+				       &__cto, &__tbytes); 
+	    }
+
+	  if (__conv != size_t(-1))
+	    {
+	      __from_next = reinterpret_cast(__cfrom);
+	      __to_next = reinterpret_cast(__cto);
+	      __ret = ok;
+	    }
+	  else 
+	    {
+	      if (__fbytes < __fmultiple * (__from_end - __from))
+		{
+		  __from_next = reinterpret_cast(__cfrom);
+		  __to_next = reinterpret_cast(__cto);
+		  __ret = partial;
+		}
+	      else
+		__ret = error;
+	    }
+	}
+      return __ret; 
+    }
+
+  template
+    codecvt_base::result
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_unshift(state_type& __state, extern_type* __to, 
+	       extern_type* __to_end, extern_type*& __to_next) const
+    {
+      result __ret = error;
+      if (__state._M_good())
+	{
+	  typedef state_type::__desc_type	__desc_type;
+	  const __desc_type* __desc = __state._M_get_in_descriptor();
+	  const size_t __tmultiple = sizeof(intern_type);
+	  size_t __tlen = __tmultiple * (__to_end - __to); 
+	  
+	  // Argument list for iconv specifies a byte sequence. Thus,
+	  // all to/from arrays must be brutally casted to char*.
+	  char* __cto = reinterpret_cast(__to);
+	  size_t __conv = __iconv_adaptor(iconv,*__desc, NULL, NULL,
+                                          &__cto, &__tlen); 
+	  
+	  if (__conv != size_t(-1))
+	    {
+	      __to_next = reinterpret_cast(__cto);
+	      if (__tlen == __tmultiple * (__to_end - __to))
+		__ret = noconv;
+	      else if (__tlen == 0)
+		__ret = ok;
+	      else
+		__ret = partial;
+	    }
+	  else 
+	    __ret = error;
+	}
+      return __ret; 
+    }
+   
+  template
+    codecvt_base::result
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_in(state_type& __state, const extern_type* __from, 
+	  const extern_type* __from_end, const extern_type*& __from_next,
+	  intern_type* __to, intern_type* __to_end, 
+	  intern_type*& __to_next) const
+    { 
+      result __ret = error;
+      if (__state._M_good())
+	{
+	  typedef state_type::__desc_type	__desc_type;
+	  const __desc_type* __desc = __state._M_get_in_descriptor();
+	  const size_t __fmultiple = sizeof(extern_type);
+	  size_t __flen = __fmultiple * (__from_end - __from);
+	  const size_t __tmultiple = sizeof(intern_type);
+	  size_t __tlen = __tmultiple * (__to_end - __to); 
+	  
+	  // Argument list for iconv specifies a byte sequence. Thus,
+	  // all to/from arrays must be brutally casted to char*.
+	  char* __cto = reinterpret_cast(__to);
+	  char* __cfrom;
+	  size_t __conv;
+
+	  // Some encodings need a byte order marker as the first item
+	  // in the byte stream, to designate endian-ness. The default
+	  // value for the byte order marker is NULL, so if this is
+	  // the case, it's not necessary and we can just go on our
+	  // merry way.
+	  int __ext_bom = __state._M_get_external_bom();
+	  if (__ext_bom)
+	    {	  
+	      size_t __size = __from_end - __from;
+	      extern_type* __cfixed =  static_cast(__builtin_alloca(sizeof(extern_type) * (__size + 1)));
+	      __cfixed[0] = static_cast(__ext_bom);
+	      char_traits::copy(__cfixed + 1, __from, __size);
+	      __cfrom = reinterpret_cast(__cfixed);
+	      __conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
+                                       &__flen, &__cto, &__tlen); 
+	    }
+	  else
+	    {
+	      extern_type* __cfixed = const_cast(__from);
+	      __cfrom = reinterpret_cast(__cfixed);
+	      __conv = __iconv_adaptor(iconv, *__desc, &__cfrom,
+                                       &__flen, &__cto, &__tlen); 
+	    }
+
+	  
+	  if (__conv != size_t(-1))
+	    {
+	      __from_next = reinterpret_cast(__cfrom);
+	      __to_next = reinterpret_cast(__cto);
+	      __ret = ok;
+	    }
+	  else 
+	    {
+	      if (__flen < static_cast(__from_end - __from))
+		{
+		  __from_next = reinterpret_cast(__cfrom);
+		  __to_next = reinterpret_cast(__cto);
+		  __ret = partial;
+		}
+	      else
+		__ret = error;
+	    }
+	}
+      return __ret; 
+    }
+  
+  template
+    int 
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_encoding() const throw()
+    {
+      int __ret = 0;
+      if (sizeof(_ExternT) <= sizeof(_InternT))
+	__ret = sizeof(_InternT)/sizeof(_ExternT);
+      return __ret; 
+    }
+  
+  template
+    bool 
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_always_noconv() const throw()
+    { return false; }
+  
+  template
+    int 
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_length(const state_type&, const extern_type* __from, 
+	      const extern_type* __end, size_t __max) const
+    { return min(__max, static_cast(__end - __from)); }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 74.  Garbled text for codecvt::do_max_length
+  template
+    int 
+    codecvt<_InternT, _ExternT, __enc_traits>::
+    do_max_length() const throw()
+    { return 1; }
+#endif
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc b/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc
new file mode 100644
index 0000000..0f667d6
--- /dev/null
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.cc
@@ -0,0 +1,49 @@
+// std::messages implementation details, IEEE 1003.1-200x version -*- C++ -*-
+
+// Copyright (C) 2001 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.2.7.1.2  messages virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std
+{
+  // Specializations
+  template<>
+    string
+    messages::do_get(catalog __c, int __setid, int __msgid, 
+			   const string& __dfault) const
+    {
+      nl_catd __nlc = reinterpret_cast(__c);
+      return string(catgets(__nlc, __setid, __msgid, __dfault.c_str())); 
+    }
+}
diff --git a/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.h b/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.h
new file mode 100644
index 0000000..ce82eb8
--- /dev/null
+++ b/contrib/libstdc++/config/locale/ieee_1003.1-2001/messages_members.h
@@ -0,0 +1,70 @@
+// std::messages implementation details, IEEE 1003.1-200x version -*- C++ -*-
+
+// Copyright (C) 2001 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.2.7.1.2  messages virtual functions
+//
+
+// Written by Benjamin Kosnik 
+
+  // Non-virtual member functions.
+  template
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::open(const basic_string& __s, const locale& __loc, 
+			   const char*) const
+    { return this->do_open(__s, __loc); }
+
+  // Virtual member functions.
+  template
+    messages<_CharT>::~messages()
+    { }
+
+  template
+    typename messages<_CharT>::catalog 
+    messages<_CharT>::do_open(const basic_string& __s, 
+			      const locale&) const
+    { return reinterpret_cast(catopen(__s.c_str(), NL_CAT_LOCALE)); }
+
+  template
+    typename messages<_CharT>::string_type  
+    messages<_CharT>::do_get(catalog __c, int __setid, int __msgid, 
+			     const string_type& __dfault) const
+    {
+      nl_catd __nlc = reinterpret_cast(__c);
+      char* __msg = catgets(__nlc, __setid, __msgid, 
+			    _M_convert_to_char(__dfault));
+      return _M_convert_from_char(__msg);
+    }
+
+  template
+    void    
+    messages<_CharT>::do_close(catalog __c) const 
+    { catclose(reinterpret_cast(__c)); }
+
+
diff --git a/contrib/libstdc++/config/os/aix/bits/atomicity.h b/contrib/libstdc++/config/os/aix/bits/atomicity.h
new file mode 100644
index 0000000..ecac7da
--- /dev/null
+++ b/contrib/libstdc++/config/os/aix/bits/atomicity.h
@@ -0,0 +1,59 @@
+// Low-level functions for atomic operations: AIX version  -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H       1
+
+/* 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.  */
+
+/* This should match the type pointed to by atomic_p in
+   .  */
+typedef int _Atomic_word;
+
+#include 
+
+static inline int
+__attribute__ ((unused))
+__exchange_and_add (atomic_p __mem, int __val)
+{
+  return fetch_and_add (__mem, __val);
+}
+
+static inline void
+__attribute__ ((unused))
+__atomic_add (atomic_p __mem, int __val)
+{
+  (void) fetch_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/os/aix/bits/ctype_base.h b/contrib/libstdc++/config/os/aix/bits/ctype_base.h
new file mode 100644
index 0000000..ed41440
--- /dev/null
+++ b/contrib/libstdc++/config/os/aix/bits/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.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::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int 	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 	= _ISGRAPH;
+    static const mask cntrl 	= _ISCNTRL;
+    static const mask punct 	= _ISPUNCT;
+    static const mask alnum 	= _ISALNUM;
+  };
diff --git a/contrib/libstdc++/config/os/aix/bits/ctype_inline.h b/contrib/libstdc++/config/os/aix/bits/ctype_inline.h
new file mode 100644
index 0000000..d9df620
--- /dev/null
+++ b/contrib/libstdc++/config/os/aix/bits/ctype_inline.h
@@ -0,0 +1,76 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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::
+  is(mask __m, char __c) const 
+  { return __OBJ_DATA(__lc_ctype)->mask[__c] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const 
+  {
+    while (__low < __high)
+      *__vec++ = __OBJ_DATA(__lc_ctype)->mask[*__low++];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const 
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const 
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/config/os/aix/bits/ctype_noninline.h b/contrib/libstdc++/config/os/aix/bits/ctype_noninline.h
new file mode 100644
index 0000000..5dff2d1
--- /dev/null
+++ b/contrib/libstdc++/config/os/aix/bits/ctype_noninline.h
@@ -0,0 +1,81 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _toupper(__c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _tolower(__c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/aix/bits/os_defines.h b/contrib/libstdc++/config/os/aix/bits/os_defines.h
new file mode 100644
index 0000000..6a658a1
--- /dev/null
+++ b/contrib/libstdc++/config/os/aix/bits/os_defines.h
@@ -0,0 +1,67 @@
+// Specific definitions for AIX  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+#undef _XOPEN_SOURCE
+#define _XOPEN_SOURCE 500
+#undef _XOPEN_SOURCE_EXTENDED
+#define _XOPEN_SOURCE_EXTENDED 1
+
+// off64_t
+#ifndef _LARGE_FILE_API
+#define _LARGE_FILE_API
+#endif
+
+// atomic types
+#ifndef _ALL_SOURCE
+#define _ALL_SOURCE
+#endif
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+#undef _G_USING_THUNKS
+#define _G_USING_THUNKS 0
+
+#if !defined(_AIX51) || !defined(__64BIT__)
+#define __glibcpp_wchar_t_bits 16
+#define __glibcpp_wchar_t_is_signed false
+#endif
+
+#ifdef __64BIT__
+#define __glibcpp_long_bits 64
+#endif
+
+#endif
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_base.h b/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_base.h
new file mode 100644
index 0000000..98b6265
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_base.h
@@ -0,0 +1,76 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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 on FreeBSD 3.4,
+// 4.0 and all versions of the CVS managed file at:
+// :pserver:anoncvs@anoncvs.freebsd.org:/home/ncvs/src/include/ctype.h
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned long 	mask;
+#ifdef _CTYPE_S
+    // FreeBSD 4.0 uses this style of define.
+    static const mask upper    	= _CTYPE_U;
+    static const mask lower 	= _CTYPE_L;
+    static const mask alpha 	= _CTYPE_A;
+    static const mask digit 	= _CTYPE_D;
+    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 cntrl 	= _CTYPE_C;
+    static const mask punct 	= _CTYPE_P;
+    static const mask alnum 	= _CTYPE_A | _CTYPE_D;
+#else
+    // Older versions, including Free BSD 3.4, use this style of define.
+    static const mask upper    	= _U;
+    static const mask lower 	= _L;
+    static const mask alpha 	= _A;
+    static const mask digit 	= _D;
+    static const mask xdigit 	= _X;
+    static const mask space 	= _S;
+    static const mask print 	= _R;
+    static const mask graph 	= _G;
+    static const mask cntrl 	= _C;
+    static const mask punct 	= _P;
+    static const mask alnum 	= _A | _D;
+#endif
+  };
+
+
+
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_inline.h b/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_inline.h
new file mode 100644
index 0000000..b4ba03f
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_inline.h
@@ -0,0 +1,94 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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::
+  is(mask __m, char __c) const
+  { 
+    return __istype(__c, __m);
+  }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    for (;__low < __high; ++__vec, ++__low)
+      {
+#if defined (_CTYPE_S) || defined (__istype)
+	*__vec = __maskrune (*__low, upper | lower | alpha | digit | xdigit
+			     | space | print | graph | cntrl | punct | alnum);
+#else
+	mask __m = 0;
+	if (this->is(upper, *__low)) __m |= upper;
+	if (this->is(lower, *__low)) __m |= lower;
+	if (this->is(alpha, *__low)) __m |= alpha;
+	if (this->is(digit, *__low)) __m |= digit;
+	if (this->is(xdigit, *__low)) __m |= xdigit;
+	if (this->is(space, *__low)) __m |= space;
+	if (this->is(print, *__low)) __m |= print;
+	if (this->is(graph, *__low)) __m |= graph;
+	if (this->is(cntrl, *__low)) __m |= cntrl;
+	if (this->is(punct, *__low)) __m |= punct;
+	// Do not include explicit line for alnum mask since it is a
+	// pure composite of masks on FreeBSD.
+	*__vec = __m;
+#endif
+      }
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_noninline.h
new file mode 100644
index 0000000..0e108fd
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/freebsd/bits/ctype_noninline.h
@@ -0,0 +1,81 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return ::toupper((int) __c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::toupper((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return ::tolower((int) __c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::tolower((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/bsd/freebsd/bits/os_defines.h b/contrib/libstdc++/config/os/bsd/freebsd/bits/os_defines.h
new file mode 100644
index 0000000..cfc917f
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/freebsd/bits/os_defines.h
@@ -0,0 +1,39 @@
+// Specific definitions for BSD  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#define __glibcpp_long_double_bits __glibcpp_double_bits
+
+#endif
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_base.h b/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_base.h
new file mode 100644
index 0000000..ceea8ac
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_base.h
@@ -0,0 +1,58 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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 on NetBSD.
+// Full details can be found from the CVS files at:
+//   anoncvs@anoncvs.netbsd.org:/cvsroot/basesrc/include/ctype.h
+// See www.netbsd.org for details of access.
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const unsigned char*	__to_type;
+
+    // NB: Offsets into ctype::_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    	= _U;
+    static const mask lower 	= _L;
+    static const mask alpha 	= _U | _L;
+    static const mask digit 	= _N;
+    static const mask xdigit 	= _N | _X;
+    static const mask space 	= _S;
+    static const mask print 	= _P | _U | _L | _N | _B;
+    static const mask graph 	= _P | _U | _L | _N;
+    static const mask cntrl 	= _C;
+    static const mask punct 	= _P;
+    static const mask alnum 	= _U | _L | _N;
+  };
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_inline.h b/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_inline.h
new file mode 100644
index 0000000..f6dfc4d
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_inline.h
@@ -0,0 +1,73 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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::
+  is(mask __m, char __c) const
+  { return _M_table[(unsigned char)(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[*__low++];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
+
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_noninline.h b/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_noninline.h
new file mode 100644
index 0000000..80138cb
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/netbsd/bits/ctype_noninline.h
@@ -0,0 +1,79 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), _M_table(__table ? __table : _ctype_ + 1)
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return ::toupper((int) __c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::toupper((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return ::tolower((int) __c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::tolower((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/bsd/netbsd/bits/os_defines.h b/contrib/libstdc++/config/os/bsd/netbsd/bits/os_defines.h
new file mode 100644
index 0000000..03f760f
--- /dev/null
+++ b/contrib/libstdc++/config/os/bsd/netbsd/bits/os_defines.h
@@ -0,0 +1,38 @@
+// Specific definitions for NetBSD  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+#define __ssize_t ssize_t
+
+#endif
diff --git a/contrib/libstdc++/config/os/djgpp/bits/ctype_base.h b/contrib/libstdc++/config/os/djgpp/bits/ctype_base.h
new file mode 100644
index 0000000..018e20e
--- /dev/null
+++ b/contrib/libstdc++/config/os/djgpp/bits/ctype_base.h
@@ -0,0 +1,57 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2001 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
+//
+  
+  struct ctype_base
+  {
+    typedef unsigned short 	mask;
+    
+    // Non-standard typedefs.
+    typedef unsigned char *     __to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    static const mask space = __dj_ISSPACE;	// Whitespace
+    static const mask print = __dj_ISPRINT;	// Printing
+    static const mask cntrl = __dj_ISCNTRL;	// Control character
+    static const mask upper = __dj_ISUPPER;	// UPPERCASE
+    static const mask lower = __dj_ISLOWER;	// lowercase
+    static const mask alpha = __dj_ISALPHA;	// Alphabetic
+    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
+  };
+
+
+
diff --git a/contrib/libstdc++/config/os/djgpp/bits/ctype_inline.h b/contrib/libstdc++/config/os/djgpp/bits/ctype_inline.h
new file mode 100644
index 0000000..21958c4
--- /dev/null
+++ b/contrib/libstdc++/config/os/djgpp/bits/ctype_inline.h
@@ -0,0 +1,67 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2001 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::
+  is(mask __m, char __c) const 
+  { return _M_table[static_cast(__c + 1)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const 
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/djgpp/bits/ctype_noninline.h b/contrib/libstdc++/config/os/djgpp/bits/ctype_noninline.h
new file mode 100644
index 0000000..0ec0f84
--- /dev/null
+++ b/contrib/libstdc++/config/os/djgpp/bits/ctype_noninline.h
@@ -0,0 +1,81 @@
+// Locale support -*- C++ -*-
+
+// 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
+// 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 DJGPP 
+
+  const ctype_base::mask*
+  ctype::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
+  _M_table(__table ? __table : __dj_ctype_flags)  
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__dj_ctype_toupper), _M_tolower(__dj_ctype_tolower),
+  _M_table(__table ? __table : __dj_ctype_flags)  
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _M_toupper[static_cast(__c)+1]; }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::toupper(static_cast (*__low));
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _M_tolower[static_cast(__c)+1]; }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::tolower(static_cast (*__low));
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/djgpp/bits/os_defines.h b/contrib/libstdc++/config/os/djgpp/bits/os_defines.h
new file mode 100644
index 0000000..ce0bf24
--- /dev/null
+++ b/contrib/libstdc++/config/os/djgpp/bits/os_defines.h
@@ -0,0 +1,45 @@
+// Specific definitions for DJGPP  -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+// FIXME: should there be '#undef POSIX_SOURCE'?
+
+#endif
+
+
diff --git a/contrib/libstdc++/config/os/generic/bits/ctype_base.h b/contrib/libstdc++/config/os/generic/bits/ctype_base.h
new file mode 100644
index 0000000..564093d
--- /dev/null
+++ b/contrib/libstdc++/config/os/generic/bits/ctype_base.h
@@ -0,0 +1,58 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// Default information, may not be appropriate for specific host.
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int 	mask;   
+    static const mask upper    	= 1 << 0;
+    static const mask lower 	= 1 << 1;
+    static const mask alpha 	= 1 << 2;
+    static const mask digit 	= 1 << 3;
+    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 cntrl 	= 1 << 8;
+    static const mask punct 	= 1 << 9;
+    static const mask alnum 	= 1 << 10;
+  };
+
+
+
diff --git a/contrib/libstdc++/config/os/generic/bits/ctype_inline.h b/contrib/libstdc++/config/os/generic/bits/ctype_inline.h
new file mode 100644
index 0000000..c10cb56
--- /dev/null
+++ b/contrib/libstdc++/config/os/generic/bits/ctype_inline.h
@@ -0,0 +1,125 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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
+  
+// The following definitions are portable, but insanely slow. If one
+// cares at all about performance, then specialized ctype
+// functionality should be added for the native os in question: see
+// the config/os/bits/ctype_*.h files.
+
+  bool
+  ctype::
+  is(mask __m, char __c) const
+  { 
+    bool __ret;
+    switch (__m)
+      {
+      case space:
+	__ret = isspace(__c);
+	break;
+      case print:
+	__ret = isprint(__c);
+	break;
+      case cntrl:
+	__ret = iscntrl(__c);
+	break;
+      case upper:
+	__ret = isupper(__c);
+	break;
+      case lower:
+	__ret = islower(__c);
+	break;
+      case alpha:
+	__ret = isalpha(__c);
+	break;
+      case digit:
+	__ret = isdigit(__c);
+	break;
+      case punct:
+	__ret = ispunct(__c);
+	break;
+      case xdigit:
+	__ret = isxdigit(__c);
+	break;
+      case alnum:
+	__ret = isalnum(__c);
+	break;
+      case graph:
+	__ret = isgraph(__c);
+	break;
+      default:
+	__ret = false;
+	break;
+      }
+    return __ret;
+  }
+   
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
+    for (;__low < __high; ++__vec, ++__low)
+      {
+	mask __m = 0;
+	int __i = 0; // Lowest bitmask in ctype_base == 0
+	for (;__i < __bitmasksize; ++__i)
+	  {
+	    mask __bit = static_cast(1 << __i);
+	    if (this->is(__bit, *__low))
+	      __m |= __bit;
+	  }
+	*__vec = __m;
+      }
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/generic/bits/ctype_noninline.h b/contrib/libstdc++/config/os/generic/bits/ctype_noninline.h
new file mode 100644
index 0000000..9fec00b
--- /dev/null
+++ b/contrib/libstdc++/config/os/generic/bits/ctype_noninline.h
@@ -0,0 +1,82 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table == 0 ? classic_table() : __table) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table == 0 ? classic_table() : __table) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return ::toupper((int) __c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::toupper((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return ::tolower((int) __c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::tolower((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/generic/bits/os_defines.h b/contrib/libstdc++/config/os/generic/bits/os_defines.h
new file mode 100644
index 0000000..143c07e
--- /dev/null
+++ b/contrib/libstdc++/config/os/generic/bits/os_defines.h
@@ -0,0 +1,37 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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/gnu-linux/bits/ctype_base.h b/contrib/libstdc++/config/os/gnu-linux/bits/ctype_base.h
new file mode 100644
index 0000000..50a5f79
--- /dev/null
+++ b/contrib/libstdc++/config/os/gnu-linux/bits/ctype_base.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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
+  
+#if _GLIBCPP_USE_SHADOW_HEADERS
+  using _C_legacy::_ISspace;
+  using _C_legacy::_ISprint;
+  using _C_legacy::_IScntrl;
+  using _C_legacy::_ISupper;
+  using _C_legacy::_ISlower;
+  using _C_legacy::_ISalpha;
+  using _C_legacy::_ISdigit;
+  using _C_legacy::_ISpunct;
+  using _C_legacy::_ISxdigit;
+  using _C_legacy::_ISalnum;
+  using _C_legacy::_ISgraph;
+#endif
+
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_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 	= _ISgraph;
+    static const mask cntrl 	= _IScntrl;
+    static const mask punct 	= _ISpunct;
+    static const mask alnum 	= _ISalnum;
+  };
diff --git a/contrib/libstdc++/config/os/gnu-linux/bits/ctype_inline.h b/contrib/libstdc++/config/os/gnu-linux/bits/ctype_inline.h
new file mode 100644
index 0000000..af409c8
--- /dev/null
+++ b/contrib/libstdc++/config/os/gnu-linux/bits/ctype_inline.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 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
+// 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::
+  is(mask __m, char __c) const
+  { return _M_table[static_cast(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !(_M_table[static_cast(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && (_M_table[static_cast(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/gnu-linux/bits/ctype_noninline.h b/contrib/libstdc++/config/os/gnu-linux/bits/ctype_noninline.h
new file mode 100644
index 0000000..ee70ab4
--- /dev/null
+++ b/contrib/libstdc++/config/os/gnu-linux/bits/ctype_noninline.h
@@ -0,0 +1,100 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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
+
+#if _GLIBCPP_USE_SHADOW_HEADERS
+  using _C_legacy::__ctype_toupper;
+  using _C_legacy::__ctype_tolower;
+  using _C_legacy::__ctype_b;
+#endif
+
+  const ctype_base::mask*
+  ctype::classic_table() throw()
+  { return __ctype_b; }  
+  
+#if _GLIBCPP_C_LOCALE_GNU
+  ctype::ctype(__c_locale __cloc, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del)
+  {
+    _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;
+  }
+#else
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
+  _M_table(__table ? __table : classic_table())
+  { _M_c_locale_ctype = _S_c_locale; }
+#endif
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) : 
+  __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__ctype_toupper), _M_tolower(__ctype_tolower),
+  _M_table(__table ? __table : classic_table())
+  { _M_c_locale_ctype = _S_c_locale; }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _M_toupper[static_cast(__c)]; }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_toupper[static_cast(*__low)];
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _M_tolower[static_cast(__c)]; }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_tolower[static_cast(*__low)];
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/gnu-linux/bits/os_defines.h b/contrib/libstdc++/config/os/gnu-linux/bits/os_defines.h
new file mode 100644
index 0000000..d5ed77c
--- /dev/null
+++ b/contrib/libstdc++/config/os/gnu-linux/bits/os_defines.h
@@ -0,0 +1,76 @@
+// Specific definitions for GNU/Linux  -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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.
+
+// This keeps isanum, et al from being propagated as macros.
+#define __NO_CTYPE 1
+
+#include 
+
+#if !defined (__GLIBC__) || (__GLIBC__ == 2 && __GLIBC_MINOR__+ 0 == 0)
+
+// The types __off_t and __off64_t are not defined through 
+// as _G_config assumes.  For libc5 and glibc 2.0 instead use
+//  and the old name for __off64_t.
+#include 
+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.
+#define __NO_STRING_INLINES
+#endif
+
+#if defined(__powerpc64__) || defined(__s390x__) || (defined(__sparc__) && defined(__arch64__))
+#define __glibcpp_long_bits 64
+#endif
+
+#if defined(__sparc__) && !defined(__arch64__)
+#define __glibcpp_long_double_bits 64
+#endif
+
+#endif
diff --git a/contrib/libstdc++/config/os/hpux/bits/cpu_limits.h b/contrib/libstdc++/config/os/hpux/bits/cpu_limits.h
new file mode 100644
index 0000000..1c28295
--- /dev/null
+++ b/contrib/libstdc++/config/os/hpux/bits/cpu_limits.h
@@ -0,0 +1,35 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#ifdef __LP64__
+#define __glibcpp_long_bits 64
+#endif
+
+#endif
diff --git a/contrib/libstdc++/config/os/hpux/bits/ctype_base.h b/contrib/libstdc++/config/os/hpux/bits/ctype_base.h
new file mode 100644
index 0000000..f2f6ad0
--- /dev/null
+++ b/contrib/libstdc++/config/os/hpux/bits/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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
+//
+  
+// Default information, may not be appropriate for specific host.
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int        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     = _ISGRAPH;
+    static const mask cntrl     = _ISCNTRL;
+    static const mask punct     = _ISPUNCT;
+    static const mask alnum     = _ISALNUM;
+  };
diff --git a/contrib/libstdc++/config/os/hpux/bits/ctype_inline.h b/contrib/libstdc++/config/os/hpux/bits/ctype_inline.h
new file mode 100644
index 0000000..35cc306
--- /dev/null
+++ b/contrib/libstdc++/config/os/hpux/bits/ctype_inline.h
@@ -0,0 +1,79 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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::
+  is(mask __m, char __c) const 
+  { return _M_table[(unsigned char)(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const 
+  {
+    const int __bitmasksize = 11; // Highest bitmask in ctype_base == 10
+    for (;__low < __high; ++__vec, ++__low)
+      {
+        mask __m = _M_table[*__low];
+        int __i = 0; // Lowest bitmask in ctype_base == 0
+        while (__i < __bitmasksize && !(__m & static_cast(1 << __i)))
+          ++__i;
+        *__vec = static_cast(1 << __i);
+      }
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
diff --git a/contrib/libstdc++/config/os/hpux/bits/ctype_noninline.h b/contrib/libstdc++/config/os/hpux/bits/ctype_noninline.h
new file mode 100644
index 0000000..7ec3b30
--- /dev/null
+++ b/contrib/libstdc++/config/os/hpux/bits/ctype_noninline.h
@@ -0,0 +1,82 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : (const mask *) __SB_masks) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : (const mask *) __SB_masks) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return ::toupper((int) __c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::toupper((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return ::tolower((int) __c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = ::tolower((int) *__low);
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/hpux/bits/os_defines.h b/contrib/libstdc++/config/os/hpux/bits/os_defines.h
new file mode 100644
index 0000000..c8a6c9d
--- /dev/null
+++ b/contrib/libstdc++/config/os/hpux/bits/os_defines.h
@@ -0,0 +1,79 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+#define __glibcpp_wchar_t_is_signed false
+
+// Use macro form of ctype functions to ensure __SB_masks is defined.
+#define _SB_CTYPE_MACROS 1
+
+/* HP-UX, for reasons unknown choose to use a different name for
+   the string to [unsigned] long long conversion routines.
+
+   Furthermore, instead of having the prototypes in stdlib.h like
+   everyone else, they put them into a non-standard header
+   .  Ugh.
+
+    defines a variety of things, some of which we 
+   probably do not want.  So we don't want to include it here.
+
+   Luckily we can just declare strtoll and strtoull with the
+   __asm extension which effectively renames calls at the
+   source level without namespace pollution.
+
+   Also note that the compiler defines _INCLUDE_LONGLONG for C++
+   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
+   to bastardize configure to deal with this sillyness.  */
+namespace std {
+#ifndef __LP64__
+  __extension__ extern "C" long long strtoll (const char *, char **, int)
+    __asm  ("__strtoll");
+  __extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
+    __asm  ("__strtoull");
+#else
+  __extension__ extern "C" long long strtoll (const char *, char **, int)
+    __asm  ("strtol");
+  __extension__ extern "C" unsigned long long strtoull (const char *, char **, int)
+    __asm  ("strtoul");
+#endif
+}
+#define _GLIBCPP_USE_LONG_LONG 1
+#endif
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/bits/atomicity.h b/contrib/libstdc++/config/os/irix/irix5.2/bits/atomicity.h
new file mode 100644
index 0000000..bac483e
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix5.2/bits/atomicity.h
@@ -0,0 +1,50 @@
+// Low-level functions for atomic operations: IRIX version  -*- C++ -*-
+
+// Copyright (C) 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+#include 
+
+typedef long _Atomic_word;
+
+static inline _Atomic_word
+__exchange_and_add (_Atomic_word* __mem, int __val)
+{
+  return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
+}
+
+
+static inline void
+__atomic_add (_Atomic_word* __mem, int __val)
+{
+  __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_base.h b/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_base.h
new file mode 100644
index 0000000..2626cd3
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2001 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 on irix 5.2
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef unsigned int*      	__to_type;
+
+    // NB: Offsets into ctype::_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    	= _U;
+    static const mask lower 	= _L;
+    static const mask alpha 	= _U | _L;
+    static const mask digit 	= _N;
+    static const mask xdigit 	= _X;
+    static const mask space 	= _S;
+    static const mask print 	= _U | _L | _N | _P | _B;
+    static const mask graph 	= _U | _L | _N | _P;
+    static const mask cntrl 	= _C;
+    static const mask punct 	= _P;
+    static const mask alnum 	= _U | _L | _N;
+  };
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_inline.h b/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_inline.h
new file mode 100644
index 0000000..400b3a7
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_inline.h
@@ -0,0 +1,72 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2001 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::
+  is(mask __m, char __c) const
+  { return (_M_table)[__c] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table)[*__low++];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !((_M_table)[*__low] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && ((_M_table + 1)[*__low] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_noninline.h b/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_noninline.h
new file mode 100644
index 0000000..f9df21f
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix5.2/bits/ctype_noninline.h
@@ -0,0 +1,83 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs)
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(!__table ? __ctype : __table)
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs)
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(!__table ? __ctype : __table)
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _toupper(__c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _tolower(__c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
diff --git a/contrib/libstdc++/config/os/irix/irix5.2/bits/os_defines.h b/contrib/libstdc++/config/os/irix/irix5.2/bits/os_defines.h
new file mode 100644
index 0000000..50db680
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix5.2/bits/os_defines.h
@@ -0,0 +1,54 @@
+// Specific definitions for IRIX  -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+// We need large file support.  There are two ways to turn it on: by
+// defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However, it
+// does not actually work to define only the former, as then
+//  is invalid: `st_blocks' is defined to be a macro, but
+// then used as a field name.  So, we have to turn on _SGI_SOURCE.
+// That only works if _POSIX_SOURCE is turned off, so we have to
+// explicitly turn it off.  (Some of the libio C files explicitly try
+// to turn it on.)  _SGI_SOURCE is actually turned on implicitly via
+// the command-line.
+#undef _POSIX_SOURCE
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+// GCC does not use thunks on IRIX.
+#define _G_USING_THUNKS 0
+
+#endif
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/bits/atomicity.h b/contrib/libstdc++/config/os/irix/irix6.5/bits/atomicity.h
new file mode 100644
index 0000000..c7f5c83
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix6.5/bits/atomicity.h
@@ -0,0 +1,50 @@
+// Low-level functions for atomic operations: IRIX version  -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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 _BITS_ATOMICITY_H
+#define _BITS_ATOMICITY_H	1
+
+#include 
+
+typedef long _Atomic_word;
+
+static inline _Atomic_word
+__exchange_and_add (_Atomic_word* __mem, int __val)
+{
+  return (_Atomic_word) test_then_add ((unsigned long*) __mem, __val);
+}
+
+
+static inline void
+__atomic_add (_Atomic_word* __mem, int __val)
+{
+  __exchange_and_add (__mem, __val);
+}
+
+#endif /* atomicity.h */
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_base.h b/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_base.h
new file mode 100644
index 0000000..08557d1
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// Information as gleaned from /usr/include/ctype.h on irix 6.5
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef int* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int 	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 	= _ISgraph;
+    static const mask cntrl 	= _IScntrl;
+    static const mask punct 	= _ISpunct;
+    static const mask alnum 	= _ISalnum;
+  };
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_inline.h b/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_inline.h
new file mode 100644
index 0000000..b7ab12d
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_inline.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 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
+// 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::
+  is(mask __m, char __c) const
+  { return (_M_table)[static_cast(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table)[static_cast(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !((_M_table)[static_cast(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && ((_M_table + 1)[static_cast(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_noninline.h b/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_noninline.h
new file mode 100644
index 0000000..009e611
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix6.5/bits/ctype_noninline.h
@@ -0,0 +1,84 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs)
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(!__table ? 
+	   (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs)
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(!__table ? 
+	   (const mask*) (__libc_attr._ctype_tbl->_class + 1) : __table) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _toupper(__c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _tolower(__c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
diff --git a/contrib/libstdc++/config/os/irix/irix6.5/bits/os_defines.h b/contrib/libstdc++/config/os/irix/irix6.5/bits/os_defines.h
new file mode 100644
index 0000000..e8f1dcc
--- /dev/null
+++ b/contrib/libstdc++/config/os/irix/irix6.5/bits/os_defines.h
@@ -0,0 +1,62 @@
+// Specific definitions for IRIX  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// We need large file support.  There are two ways to turn it on: by
+// defining either _LARGEFILE64_SOURCE or _SGI_SOURCE.  However, it
+// does not actually work to define only the former, as then
+//  is invalid: `st_blocks' is defined to be a macro, but
+// then used as a field name.  So, we have to turn on _SGI_SOURCE.
+// That only works if _POSIX_SOURCE is turned off, so we have to
+// explicitly turn it off.  (Some of the libio C files explicitly try
+// to turn it on.)  _SGI_SOURCE is actually turned on implicitly via
+// the command-line.
+#undef _POSIX_SOURCE
+
+#define __off_t off_t
+#define __off64_t off64_t
+#define __ssize_t ssize_t
+
+// GCC does not use thunks on IRIX. 
+#define _G_USING_THUNKS 0
+
+#define __glibcpp_long_double_bits 64
+
+#if __LONG_MAX__ > 2147483647
+#define __glibcpp_wchar_t_bits 64
+#define __glibcpp_long_bits 64
+#endif
+
+#endif
+
diff --git a/contrib/libstdc++/config/os/mingw32/bits/ctype_base.h b/contrib/libstdc++/config/os/mingw32/bits/ctype_base.h
new file mode 100644
index 0000000..c077594
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/bits/ctype_base.h
@@ -0,0 +1,58 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 22.1  Locales
+//
+  
+// Information, as gleaned from /mingw32/include/ctype.h.
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_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    	= _UPPER;
+    static const mask lower 	= _LOWER;
+    static const mask alpha 	= _ALPHA;
+    static const mask digit 	= _DIGIT;
+    static const mask xdigit 	= _HEX;
+    static const mask space 	= _SPACE;
+    static const mask print 	= (_BLANK | _PUNCT| _ALPHA | _DIGIT);
+    static const mask graph 	= (_PUNCT | _ALPHA | _DIGIT);
+    static const mask cntrl 	= _CONTROL;
+    static const mask punct 	= _PUNCT;
+    static const mask alnum 	= (_ALPHA | _DIGIT);
+  };
+
+
+
diff --git a/contrib/libstdc++/config/os/mingw32/bits/ctype_inline.h b/contrib/libstdc++/config/os/mingw32/bits/ctype_inline.h
new file mode 100644
index 0000000..979d607
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/bits/ctype_inline.h
@@ -0,0 +1,71 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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::
+  is(mask __m, char __c) const
+  {
+	return (_M_table[static_cast(__c) ] & __m); 
+  }
+   
+ 
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const 
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && !this->is(__m, *__low))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high && this->is(__m, *__low) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/mingw32/bits/ctype_noninline.h b/contrib/libstdc++/config/os/mingw32/bits/ctype_noninline.h
new file mode 100644
index 0000000..998547c
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/bits/ctype_noninline.h
@@ -0,0 +1,89 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 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
+// 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 /mingw32/include/ctype.h.
+
+  // This should be in mingw's ctype.h but isn't in older versions
+  // Static classic C-locale table.  _ctype[0] is EOF
+  extern "C"  unsigned short  __declspec(dllimport) _ctype[];
+
+  const ctype_base::mask*
+  ctype::classic_table() throw()
+  { return _ctype + 1; }  
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL),
+  _M_table(__table ? __table : classic_table())  
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL),
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return (this->is(ctype_base::lower, __c) ? (__c - 'a' + 'A') : __c); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return (this->is(ctype_base::upper, __c) ? (__c - 'A' + 'a') : __c); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+
+
+
diff --git a/contrib/libstdc++/config/os/mingw32/bits/os_defines.h b/contrib/libstdc++/config/os/mingw32/bits/os_defines.h
new file mode 100644
index 0000000..5c99e09
--- /dev/null
+++ b/contrib/libstdc++/config/os/mingw32/bits/os_defines.h
@@ -0,0 +1,37 @@
+// Specific definitions for generic platforms  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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
+
+// System-specific #define, typedefs, corrections, etc, go here.  This
+// file will come before all others.
+
+#endif
diff --git a/contrib/libstdc++/config/os/newlib/bits/ctype_base.h b/contrib/libstdc++/config/os/newlib/bits/ctype_base.h
new file mode 100644
index 0000000..973d410
--- /dev/null
+++ b/contrib/libstdc++/config/os/newlib/bits/ctype_base.h
@@ -0,0 +1,57 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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, for solaris2.5.1
+
+// Support for Solaris 2.5.1
+  
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef char 		mask;
+    static const mask upper    	= _U;
+    static const mask lower 	= _L;
+    static const mask alpha 	= _U | _L;
+    static const mask digit 	= _N;
+    static const mask xdigit 	= _X | _N;
+    static const mask space 	= _S;
+    static const mask print 	= _P | _U | _L | _N | _B;
+    static const mask graph 	= _P | _U | _L | _N;
+    static const mask cntrl 	= _C;
+    static const mask punct 	= _P;
+    static const mask alnum 	= _U | _L | _N;
+  };
diff --git a/contrib/libstdc++/config/os/newlib/bits/ctype_inline.h b/contrib/libstdc++/config/os/newlib/bits/ctype_inline.h
new file mode 100644
index 0000000..cddffed
--- /dev/null
+++ b/contrib/libstdc++/config/os/newlib/bits/ctype_inline.h
@@ -0,0 +1,73 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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::
+  is(mask __m, char __c) const
+  { return (_M_table + 1)[(unsigned char)(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table + 1)[(unsigned char) (*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const 
+  {
+    while (__low < __high && !((_M_table + 1)[(unsigned char)(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && ((_M_table + 1)[(unsigned char)(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
+
+
+
+
+
diff --git a/contrib/libstdc++/config/os/newlib/bits/ctype_noninline.h b/contrib/libstdc++/config/os/newlib/bits/ctype_noninline.h
new file mode 100644
index 0000000..7cb1ece
--- /dev/null
+++ b/contrib/libstdc++/config/os/newlib/bits/ctype_noninline.h
@@ -0,0 +1,88 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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::classic_table() throw()
+  { return _ctype_; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { 
+    int __x = __c;
+    return (this->is(ctype_base::lower, __c) ? (__x - 'a' + 'A') : __x);
+  }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { 
+    int __x = __c;
+    return (this->is(ctype_base::upper, __c) ? (__x - 'A' + 'a') : __x);
+  }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
diff --git a/contrib/libstdc++/config/os/newlib/bits/os_defines.h b/contrib/libstdc++/config/os/newlib/bits/os_defines.h
new file mode 100644
index 0000000..1277661
--- /dev/null
+++ b/contrib/libstdc++/config/os/newlib/bits/os_defines.h
@@ -0,0 +1,36 @@
+// Specific definitions for newlib  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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/osf/osf5.0/bits/cpu_limits.h b/contrib/libstdc++/config/os/osf/osf5.0/bits/cpu_limits.h
new file mode 100644
index 0000000..d74b15c
--- /dev/null
+++ b/contrib/libstdc++/config/os/osf/osf5.0/bits/cpu_limits.h
@@ -0,0 +1,35 @@
+// Copyright (C) 2001 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_CPU_LIMITS
+#define _GLIBCPP_CPU_LIMITS 1
+
+#define __glibcpp_long_bits 64
+
+#define __glibcpp_long_double_bits 128
+
+#endif
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_base.h
new file mode 100644
index 0000000..ad2babd
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_base.h
@@ -0,0 +1,55 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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, for solaris2.5.1
+
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef const int* 		__to_type;
+
+    // NB: Offsets into ctype::_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    	= 01;
+    static const mask lower 	= 02;
+    static const mask alpha 	= 01 | 02;
+    static const mask digit 	= 04;
+    static const mask xdigit 	= 0200;
+    static const mask space 	= 010;
+    static const mask print 	= 020 | 01 | 02 | 04 | 0200;
+    static const mask graph 	= 020 | 01 | 02 | 04;
+    static const mask cntrl 	= 040;
+    static const mask punct 	= 020;
+    static const mask alnum 	= 01 | 02 | 04;
+  };
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_inline.h b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_inline.h
new file mode 100644
index 0000000..93a04aa
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_inline.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-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
+// 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::
+  is(mask __m, char __c) const
+  { return (_M_table + 1)[static_cast(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = (_M_table + 1)[static_cast(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !((_M_table + 1)[static_cast(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && ((_M_table + 1)[static_cast(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_noninline.h
new file mode 100644
index 0000000..f466afb
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/ctype_noninline.h
@@ -0,0 +1,81 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 2000, 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
+// 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::classic_table() throw()
+  { return 0; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(NULL), _M_tolower(NULL), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return ((_M_table + 258)[static_cast(__c)]); }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_toupper(*__low);
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return ((_M_table + 258)[static_cast(__c)]); }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = this->do_tolower(*__low);
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.5/bits/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/os_defines.h
new file mode 100644
index 0000000..145ae66
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.5/bits/os_defines.h
@@ -0,0 +1,45 @@
+// Specific definitions for Solaris 2.5  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// These are typedefs which libio assumes are already in place (because
+// they really are, under Linux).
+#define __off_t     off_t
+#define __off64_t   off64_t
+#define __ssize_t   ssize_t
+
+// Without this all the libio vtbls are offset wrongly.
+#define _G_USING_THUNKS 0
+
+#endif
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_base.h
new file mode 100644
index 0000000..5f8d10a
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_base.h
@@ -0,0 +1,56 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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. Looks like this
+// only works with solaris2.6.
+
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef long* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int 	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 	= _ISGRAPH;
+    static const mask cntrl 	= _ISCNTRL;
+    static const mask punct 	= _ISPUNCT;
+    static const mask alnum 	= _ISALNUM;
+  };
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_inline.h b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_inline.h
new file mode 100644
index 0000000..0bd56a1
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_inline.h
@@ -0,0 +1,76 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 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
+// 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::
+  is(mask __m, char __c) const
+  { return _M_table[static_cast(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    const int __bitmasksize = sizeof(mask) * 8;
+    for (;__low < __high; ++__vec, ++__low)
+      {
+	mask __m = _M_table[static_cast(*__low)];
+	int __i = 0; // Lowest bitmask value from ctype_base.
+	while (__i < __bitmasksize && !(__m & static_cast(1 << __i)))
+	  ++__i;
+	*__vec = static_cast(1 << __i);
+      }
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !(_M_table[static_cast(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && (_M_table[static_cast(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_noninline.h
new file mode 100644
index 0000000..b22ad9a
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/ctype_noninline.h
@@ -0,0 +1,81 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// 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::classic_table() throw()
+  { return 0; }  
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__trans_upper), _M_tolower(__trans_lower), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs) 
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__trans_upper), _M_tolower(__trans_lower), 
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _M_toupper[static_cast(__c)]; }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_toupper[static_cast(*__low)];
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _M_tolower[static_cast(__c)]; }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_tolower[static_cast(*__low)];
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.6/bits/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/os_defines.h
new file mode 100644
index 0000000..7aa9a7e
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.6/bits/os_defines.h
@@ -0,0 +1,45 @@
+// Specific definitions for Solaris 2.6  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// These are typedefs which libio assumes are already in place (because
+// they really are, under Linux).
+#define __off_t     off_t
+#define __off64_t   off64_t
+#define __ssize_t   ssize_t
+
+// Without this all the libio vtbls are offset wrongly.
+#define _G_USING_THUNKS 0
+
+#endif
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_base.h b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_base.h
new file mode 100644
index 0000000..9b8bddc
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_base.h
@@ -0,0 +1,57 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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. Looks like this
+// only works with solaris2.7 and solaris2.8. Thanks for not changing
+// things, sun engineers!
+
+  struct ctype_base
+  {
+    // Non-standard typedefs.
+    typedef int* 		__to_type;
+
+    // NB: Offsets into ctype::_M_table force a particular size
+    // on the mask type. Because of this, we don't use an enum.
+    typedef unsigned int 	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 	= _ISGRAPH;
+    static const mask cntrl 	= _ISCNTRL;
+    static const mask punct 	= _ISPUNCT;
+    static const mask alnum 	= _ISALNUM;
+  };
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_inline.h b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_inline.h
new file mode 100644
index 0000000..af409c8
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_inline.h
@@ -0,0 +1,69 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 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
+// 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::
+  is(mask __m, char __c) const
+  { return _M_table[static_cast(__c)] & __m; }
+
+  const char*
+  ctype::
+  is(const char* __low, const char* __high, mask* __vec) const
+  {
+    while (__low < __high)
+      *__vec++ = _M_table[static_cast(*__low++)];
+    return __high;
+  }
+
+  const char*
+  ctype::
+  scan_is(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && !(_M_table[static_cast(*__low)] & __m))
+      ++__low;
+    return __low;
+  }
+
+  const char*
+  ctype::
+  scan_not(mask __m, const char* __low, const char* __high) const
+  {
+    while (__low < __high 
+	   && (_M_table[static_cast(*__low)] & __m) != 0)
+      ++__low;
+    return __low;
+  }
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_noninline.h b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_noninline.h
new file mode 100644
index 0000000..c8b11a9
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/ctype_noninline.h
@@ -0,0 +1,82 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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::classic_table() throw()
+  { return __ctype_mask; }
+
+  ctype::ctype(__c_locale, const mask* __table, bool __del, 
+		     size_t __refs)
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__trans_upper), _M_tolower(__trans_lower),
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  ctype::ctype(const mask* __table, bool __del, size_t __refs)
+  : __ctype_abstract_base(__refs), _M_del(__table != 0 && __del), 
+  _M_toupper(__trans_upper), _M_tolower(__trans_lower),
+  _M_table(__table ? __table : classic_table()) 
+  { }
+
+  char
+  ctype::do_toupper(char __c) const
+  { return _M_toupper[static_cast(__c)]; }
+
+  const char*
+  ctype::do_toupper(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_toupper[static_cast(*__low)];
+	++__low;
+      }
+    return __high;
+  }
+
+  char
+  ctype::do_tolower(char __c) const
+  { return _M_tolower[static_cast(__c)]; }
+
+  const char* 
+  ctype::do_tolower(char* __low, const char* __high) const
+  {
+    while (__low < __high)
+      {
+	*__low = _M_tolower[static_cast(*__low)];
+	++__low;
+      }
+    return __high;
+  }
diff --git a/contrib/libstdc++/config/os/solaris/solaris2.7/bits/os_defines.h b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/os_defines.h
new file mode 100644
index 0000000..356c55c
--- /dev/null
+++ b/contrib/libstdc++/config/os/solaris/solaris2.7/bits/os_defines.h
@@ -0,0 +1,49 @@
+// Specific definitions for Solaris 7,8  -*- C++ -*-
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// These are typedefs which libio assumes are already in place (because
+// they really are, under Linux).
+#define __off_t     off_t
+#define __off64_t   off64_t
+#define __ssize_t   ssize_t
+
+// Without this all the libio vtbls are offset wrongly.
+#define _G_USING_THUNKS 0
+
+#if defined(__sparcv9) || defined(__arch64__)
+#define __glibcpp_long_bits 64
+#endif
+
+#endif
diff --git a/contrib/libstdc++/configure b/contrib/libstdc++/configure
new file mode 100755
index 0000000..6abf497
--- /dev/null
+++ b/contrib/libstdc++/configure
@@ -0,0 +1,21902 @@
+#! /bin/sh
+
+# Guess values for system-dependent variables and create Makefiles.
+# Generated automatically using autoconf version 2.13 
+# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+#
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+
+# Defaults:
+ac_help=
+ac_default_prefix=/usr/local
+# Any additions from configure.in:
+ac_help="$ac_help
+  --enable-multilib       build hella library versions (default)"
+ac_help="$ac_help
+  --with-target-subdir=SUBDIR
+                          configuring in a subdirectory"
+ac_help="$ac_help
+  --with-cross-host=HOST  configuring with a cross compiler"
+ac_help="$ac_help
+  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer"
+ac_help="$ac_help
+  --enable-shared[=PKGS]  build shared libraries [default=yes]"
+ac_help="$ac_help
+  --enable-static[=PKGS]  build static libraries [default=yes]"
+ac_help="$ac_help
+  --enable-fast-install[=PKGS]  optimize for fast installation [default=yes]"
+ac_help="$ac_help
+  --with-gnu-ld           assume the C compiler uses GNU ld [default=no]"
+ac_help="$ac_help
+  --disable-libtool-lock  avoid locking (might break parallel builds)"
+ac_help="$ac_help
+  --with-pic              try to use only PIC/non-PIC objects [default=use both]"
+ac_help="$ac_help
+  --enable-debug          extra debugging, turn off optimization [default=no]"
+ac_help="$ac_help
+  --enable-cstdio         enable stdio for target io package. 
+  --enable-cstdio=LIB     use LIB target-speific io package. [default=stdio]
+  "
+ac_help="$ac_help
+  --enable-clocale        enable model for target locale package. 
+  --enable-clocale=MODEL  use MODEL target-speific locale package. [default=generic]
+  "
+ac_help="$ac_help
+  --enable-nls            use Native Language Support (default)"
+ac_help="$ac_help
+  --enable-c-mbchar       enable multibyte (wide) characters [default=yes]"
+ac_help="$ac_help
+  --enable-c99            turns on 'ISO/IEC 9899:1999 support' [default=yes]"
+ac_help="$ac_help
+  --enable-long-long      turns on 'long long' [default=yes]"
+ac_help="$ac_help
+  --enable-cheaders       construct "C" header files for g++ [default=c_std]"
+ac_help="$ac_help
+  --enable-cxx-flags=FLAGS      pass compiler FLAGS when building library;
+                                [default=none]"
+ac_help="$ac_help
+  --enable-sjlj-exceptions  force use of builtin_setjmp for exceptions"
+ac_help="$ac_help
+  --enable-libunwind-exceptions  force use of libunwind for exceptions"
+ac_help="$ac_help
+  --enable-concept-checks use Boost-derived template checks [default=no]"
+ac_help="$ac_help
+  --enable-symvers=style  enables symbol versioning of the shared library [default=yes]"
+ac_help="$ac_help
+  --with-gxx-include-dir  the installation directory for include files"
+ac_help="$ac_help
+  --enable-version-specific-runtime-libs    Specify that runtime libraries should be installed in a compiler-specific directory "
+
+# Initialize some variables set by options.
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+build=NONE
+cache_file=./config.cache
+exec_prefix=NONE
+host=NONE
+no_create=
+nonopt=NONE
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+sitefile=
+srcdir=
+target=NONE
+verbose=
+x_includes=NONE
+x_libraries=NONE
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+# Initialize some other variables.
+subdirs=
+MFLAGS= MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+# Maximum number of lines to put in a shell here document.
+ac_max_here_lines=12
+
+ac_prev=
+for ac_option
+do
+
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  case "$ac_option" in
+  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+  *) ac_optarg= ;;
+  esac
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case "$ac_option" in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir="$ac_optarg" ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build="$ac_optarg" ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file="$ac_optarg" ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir="$ac_optarg" ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    eval "enable_${ac_feature}=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
+    fi
+    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_${ac_feature}='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix="$ac_optarg" ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he)
+    # Omit some internal or obsolete options to make the list less imposing.
+    # This message is too long to be a string in the A/UX 3.1 sh.
+    cat << EOF
+Usage: configure [options] [host]
+Options: [defaults in brackets after descriptions]
+Configuration:
+  --cache-file=FILE       cache test results in FILE
+  --help                  print this message
+  --no-create             do not create output files
+  --quiet, --silent       do not print \`checking...' messages
+  --site-file=FILE        use FILE as the site file
+  --version               print the version of autoconf that created configure
+Directory and file names:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [same as prefix]
+  --bindir=DIR            user executables in DIR [EPREFIX/bin]
+  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
+  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
+  --datadir=DIR           read-only architecture-independent data in DIR
+                          [PREFIX/share]
+  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
+  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
+                          [PREFIX/com]
+  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
+  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
+  --includedir=DIR        C header files in DIR [PREFIX/include]
+  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
+  --infodir=DIR           info documentation in DIR [PREFIX/info]
+  --mandir=DIR            man documentation in DIR [PREFIX/man]
+  --srcdir=DIR            find the sources in DIR [configure dir or ..]
+  --program-prefix=PREFIX prepend PREFIX to installed program names
+  --program-suffix=SUFFIX append SUFFIX to installed program names
+  --program-transform-name=PROGRAM
+                          run sed PROGRAM on installed program names
+EOF
+    cat << EOF
+Host type:
+  --build=BUILD           configure for building on BUILD [BUILD=HOST]
+  --host=HOST             configure for HOST [guessed]
+  --target=TARGET         configure for TARGET [TARGET=HOST]
+Features and packages:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+  --x-includes=DIR        X include files are in DIR
+  --x-libraries=DIR       X library files are in DIR
+EOF
+    if test -n "$ac_help"; then
+      echo "--enable and --with options recognized:$ac_help"
+    fi
+    exit 0 ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host="$ac_optarg" ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir="$ac_optarg" ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir="$ac_optarg" ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir="$ac_optarg" ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir="$ac_optarg" ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir="$ac_optarg" ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir="$ac_optarg" ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir="$ac_optarg" ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix="$ac_optarg" ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix="$ac_optarg" ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix="$ac_optarg" ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name="$ac_optarg" ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir="$ac_optarg" ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir="$ac_optarg" ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site="$ac_optarg" ;;
+
+  -site-file | --site-file | --site-fil | --site-fi | --site-f)
+    ac_prev=sitefile ;;
+  -site-file=* | --site-file=* | --site-fil=* | --site-fi=* | --site-f=*)
+    sitefile="$ac_optarg" ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir="$ac_optarg" ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir="$ac_optarg" ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target="$ac_optarg" ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers)
+    echo "configure generated by autoconf version 2.13"
+    exit 0 ;;
+
+  -with-* | --with-*)
+    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case "$ac_option" in
+      *=*) ;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_${ac_package}='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+    # Reject names that are not valid shell variable names.
+    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
+      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
+    fi
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    eval "with_${ac_package}=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes="$ac_optarg" ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries="$ac_optarg" ;;
+
+  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+    ;;
+
+  *)
+    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
+      echo "configure: warning: $ac_option: invalid host type" 1>&2
+    fi
+    if test "x$nonopt" != xNONE; then
+      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
+    fi
+    nonopt="$ac_option"
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+fi
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+# File descriptor usage:
+# 0 standard input
+# 1 file creation
+# 2 errors and warnings
+# 3 some systems may open it to /dev/tty
+# 4 used on the Kubota Titan
+# 6 checking for... messages and results
+# 5 compiler messages saved in config.log
+if test "$silent" = yes; then
+  exec 6>/dev/null
+else
+  exec 6>&1
+fi
+exec 5>./config.log
+
+echo "\
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+" 1>&5
+
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell metacharacters.
+ac_configure_args=
+for ac_arg
+do
+  case "$ac_arg" in
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c) ;;
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
+  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
+  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+  esac
+done
+
+# NLS nuisances.
+# Only set these to C if already set.  These must not be set unconditionally
+# because not all systems understand e.g. LANG=C (notably SCO).
+# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
+# Non-C LC_CTYPE values break the ctype check.
+if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
+if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
+if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
+if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo > confdefs.h
+
+# A filename unique to this package, relative to the directory that
+# configure is in, which we can look for to find out if srcdir is correct.
+ac_unique_file=src/ios.cc
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_prog=$0
+  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
+  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+  else
+    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+  fi
+fi
+srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$sitefile"; then
+  if test -z "$CONFIG_SITE"; then
+    if test "x$prefix" != xNONE; then
+      CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+    else
+      CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+    fi
+  fi
+else
+  CONFIG_SITE="$sitefile"
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    echo "loading site script $ac_site_file"
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+ac_exeext=
+ac_objext=o
+if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
+  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
+  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
+    ac_n= ac_c='
+' ac_t='	'
+  else
+    ac_n=-n ac_c= ac_t=
+  fi
+else
+  ac_n= ac_c='\c' ac_t=
+fi
+
+
+
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+PACKAGE=libstdc++
+
+# For typical GNU versioning info, format is MAJOR.MINOR.MICRO
+release_VERSION=3.1.0
+
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=4:0:0
+
+
+# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
+# AC 2.5x sets target_alias iff the user specified --target, but we use it
+# everywhere, so we set it here just to be sure.  In AC 2.13
+# AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
+ac_aux_dir=
+for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+
+# Do some error checking and defaulting for the host and target type.
+# The inputs are:
+#    configure --host=HOST --target=TARGET --build=BUILD NONOPT
+#
+# The rules are:
+# 1. You are not allowed to specify --host, --target, and nonopt at the
+#    same time.
+# 2. Host defaults to nonopt.
+# 3. If nonopt is not specified, then host defaults to the current host,
+#    as determined by config.guess.
+# 4. Target and build default to nonopt.
+# 5. If nonopt is not specified, then target and build default to host.
+
+# The aliases save the names the user supplied, while $host etc.
+# will get canonicalized.
+case $host---$target---$nonopt in
+NONE---*---* | *---NONE---* | *---*---NONE) ;;
+*) { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; } ;;
+esac
+
+
+# Make sure we can run config.sub.
+if ${CONFIG_SHELL-/bin/sh} $ac_config_sub sun4 >/dev/null 2>&1; then :
+else { echo "configure: error: can not run $ac_config_sub" 1>&2; exit 1; }
+fi
+
+echo $ac_n "checking host system type""... $ac_c" 1>&6
+echo "configure:660: checking host system type" >&5
+
+host_alias=$host
+case "$host_alias" in
+NONE)
+  case $nonopt in
+  NONE)
+    if host_alias=`${CONFIG_SHELL-/bin/sh} $ac_config_guess`; then :
+    else { echo "configure: error: can not guess host type; you must specify one" 1>&2; exit 1; }
+    fi ;;
+  *) host_alias=$nonopt ;;
+  esac ;;
+esac
+
+host=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $host_alias`
+host_cpu=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$host" 1>&6
+
+echo $ac_n "checking target system type""... $ac_c" 1>&6
+echo "configure:681: checking target system type" >&5
+
+target_alias=$target
+case "$target_alias" in
+NONE)
+  case $nonopt in
+  NONE) target_alias=$host_alias ;;
+  *) target_alias=$nonopt ;;
+  esac ;;
+esac
+
+target=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $target_alias`
+target_cpu=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+target_vendor=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+target_os=`echo $target | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$target" 1>&6
+
+echo $ac_n "checking build system type""... $ac_c" 1>&6
+echo "configure:699: checking build system type" >&5
+
+build_alias=$build
+case "$build_alias" in
+NONE)
+  case $nonopt in
+  NONE) build_alias=$host_alias ;;
+  *) build_alias=$nonopt ;;
+  esac ;;
+esac
+
+build=`${CONFIG_SHELL-/bin/sh} $ac_config_sub $build_alias`
+build_cpu=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+echo "$ac_t""$build" 1>&6
+
+test "$host_alias" != "$target_alias" &&
+  test "$program_prefix$program_suffix$program_transform_name" = \
+    NONENONEs,x,x, &&
+  program_prefix=${target_alias}-
+
+target_alias=${target_alias-$target}
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:736: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+	  if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
+echo "configure:789: checking whether build environment is sane" >&5
+# Just in case
+sleep 1
+echo timestamp > conftestfile
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftestfile`
+   fi
+   if test "$*" != "X $srcdir/configure conftestfile" \
+      && test "$*" != "X conftestfile $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" 1>&2; exit 1; }
+   fi
+
+   test "$2" = conftestfile
+   )
+then
+   # Ok.
+   :
+else
+   { echo "configure: error: newly created file is older than distributed files!
+Check your system clock" 1>&2; exit 1; }
+fi
+rm -f conftest*
+echo "$ac_t""yes" 1>&6
+if test "$program_transform_name" = s,x,x,; then
+  program_transform_name=
+else
+  # Double any \ or $.  echo might interpret backslashes.
+  cat <<\EOF_SED > conftestsed
+s,\\,\\\\,g; s,\$,$$,g
+EOF_SED
+  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
+  rm -f conftestsed
+fi
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,${program_prefix},; $program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
+
+# sed with no file args requires a program.
+test "$program_transform_name" = "" && program_transform_name="s,x,x,"
+
+echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
+echo "configure:846: checking whether ${MAKE-make} sets \${MAKE}" >&5
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftestmake <<\EOF
+all:
+	@echo 'ac_maketemp="${MAKE}"'
+EOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftestmake
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  SET_MAKE=
+else
+  echo "$ac_t""no" 1>&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+PACKAGE=$PACKAGE
+
+VERSION=$release_VERSION
+
+if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
+  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
+fi
+cat >> confdefs.h <> confdefs.h <&6
+echo "configure:892: checking for working aclocal" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (aclocal --version) < /dev/null > /dev/null 2>&1; then
+   ACLOCAL=aclocal
+   echo "$ac_t""found" 1>&6
+else
+   ACLOCAL="$missing_dir/missing aclocal"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
+echo "configure:905: checking for working autoconf" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoconf --version) < /dev/null > /dev/null 2>&1; then
+   AUTOCONF=autoconf
+   echo "$ac_t""found" 1>&6
+else
+   AUTOCONF="$missing_dir/missing autoconf"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working automake""... $ac_c" 1>&6
+echo "configure:918: checking for working automake" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (automake --version) < /dev/null > /dev/null 2>&1; then
+   AUTOMAKE=automake
+   echo "$ac_t""found" 1>&6
+else
+   AUTOMAKE="$missing_dir/missing automake"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
+echo "configure:931: checking for working autoheader" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (autoheader --version) < /dev/null > /dev/null 2>&1; then
+   AUTOHEADER=autoheader
+   echo "$ac_t""found" 1>&6
+else
+   AUTOHEADER="$missing_dir/missing autoheader"
+   echo "$ac_t""missing" 1>&6
+fi
+
+echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
+echo "configure:944: checking for working makeinfo" >&5
+# Run test in a subshell; some versions of sh will print an error if
+# an executable is not found, even if stderr is redirected.
+# Redirect stdin to placate older versions of autoconf.  Sigh.
+if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
+   MAKEINFO=makeinfo
+   echo "$ac_t""found" 1>&6
+else
+   MAKEINFO="$missing_dir/missing makeinfo"
+   echo "$ac_t""missing" 1>&6
+fi
+
+
+
+
+
+
+# Runs configure.host and configure.target, as well as finds CC, CXX
+# and assorted other critical bits.  Have to run this before the
+# GLIBCPP_ENABLE_* macros below.
+if test $host != $build; then
+  ac_tool_prefix=${host_alias}-
+else
+  ac_tool_prefix=
+fi
+
+echo $ac_n "checking for Cygwin environment""... $ac_c" 1>&6
+echo "configure:971: checking for Cygwin environment" >&5
+if eval "test \"`echo '$''{'ac_cv_cygwin'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_cygwin=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_cygwin=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_cygwin" 1>&6
+CYGWIN=
+test "$ac_cv_cygwin" = yes && CYGWIN=yes
+echo $ac_n "checking for mingw32 environment""... $ac_c" 1>&6
+echo "configure:1004: checking for mingw32 environment" >&5
+if eval "test \"`echo '$''{'ac_cv_mingw32'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_cv_mingw32=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_mingw32=no
+fi
+rm -f conftest*
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_mingw32" 1>&6
+MINGW32=
+test "$ac_cv_mingw32" = yes && MINGW32=yes
+
+    # Check whether --enable-multilib or --disable-multilib was given.
+if test "${enable_multilib+set}" = set; then
+  enableval="$enable_multilib"
+  case "${enableval}" in
+    yes) multilib=yes ;;
+    no)  multilib=no ;;
+    *)   { echo "configure: error: bad value ${enableval} for multilib option" 1>&2; exit 1; } ;;
+   esac
+else
+  multilib=yes
+fi
+
+  # When building with srcdir == objdir, links to the source files will
+  # be created in directories within the target_subdir.  We have to
+  # adjust toplevel_srcdir accordingly, so that configure finds
+  # install-sh and other auxiliary files that live in the top-level
+  # source directory.
+  if test "${srcdir}" = "."; then
+    if test -z "${with_target_subdir}"; then
+      toprel=".."
+    else
+      if test "${with_target_subdir}" != "."; then
+        toprel="${with_multisrctop}../.."
+      else
+        toprel="${with_multisrctop}.."
+      fi
+    fi
+  else
+    toprel=".."
+  fi
+  ac_aux_dir=
+for ac_dir in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { echo "configure: error: can not find install-sh or install.sh in ${srcdir}/$toprel $srcdir/${srcdir}/$toprel" 1>&2; exit 1; }
+fi
+ac_config_guess=$ac_aux_dir/config.guess
+ac_config_sub=$ac_aux_dir/config.sub
+ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
+
+  toplevel_srcdir=\${top_srcdir}/$toprel
+  
+
+  # Export build and source directories.
+  # These need to be absolute paths, yet at the same time need to
+  # canonicalize only relative paths, because then amd will not unmount
+  # drives. Thus the use of PWDCMD: set it to 'pawd' or 'amq -w' if using amd.
+  glibcpp_builddir=`pwd`
+  case $srcdir in
+  \\/$* | ?:\\/*) glibcpp_srcdir=${srcdir} ;;
+  *) glibcpp_srcdir=`cd "$srcdir" && ${PWDCMD-pwd} || echo "$srcdir"` ;;
+  esac
+  
+  
+
+    
+
+  for ac_prog in mawk gawk nawk awk
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1104: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AWK'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AWK="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+AWK="$ac_cv_prog_AWK"
+if test -n "$AWK"; then
+  echo "$ac_t""$AWK" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$AWK" && break
+done
+
+  # Will set LN_S to either 'ln -s' or 'ln'.  With autoconf 2.5x, can also
+  # be 'cp -p' if linking isn't available.
+  #ac_cv_prog_LN_S='cp -p'
+  echo $ac_n "checking whether ln -s works""... $ac_c" 1>&6
+echo "configure:1137: checking whether ln -s works" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_LN_S'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftestdata
+if ln -s X conftestdata 2>/dev/null
+then
+  rm -f conftestdata
+  ac_cv_prog_LN_S="ln -s"
+else
+  ac_cv_prog_LN_S=ln
+fi
+fi
+LN_S="$ac_cv_prog_LN_S"
+if test "$ac_cv_prog_LN_S" = "ln -s"; then
+  echo "$ac_t""yes" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+  # We use these options to decide which functions to include.
+  # Check whether --with-target-subdir or --without-target-subdir was given.
+if test "${with_target_subdir+set}" = set; then
+  withval="$with_target_subdir"
+  :
+fi
+
+  # Check whether --with-cross-host or --without-cross-host was given.
+if test "${with_cross_host+set}" = set; then
+  withval="$with_cross_host"
+  :
+fi
+
+
+  glibcpp_basedir=$srcdir/$toprel/./libstdc++-v3
+  
+
+  # Never versions of autoconf add an underscore to these functions.
+  # Prevent future problems ...
+  
+  
+  
+  
+
+  # AC_PROG_CC
+  # FIXME: We temporarily define our own version of AC_PROG_CC.  This is
+  # copied from autoconf 2.12, but does not call AC_PROG_CC_WORKS.  We
+  # are probably using a cross compiler, which will not be able to fully
+  # link an executable.  This is addressed in later versions of autoconf.
+
+  
+
+      
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1194: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_CC="gcc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  if test -z "$CC"; then
+    # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1224: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_prog_rejected=no
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
+        ac_prog_rejected=yes
+	continue
+      fi
+      ac_cv_prog_CC="cc"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# -gt 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    set dummy "$ac_dir/$ac_word" "$@"
+    shift
+    ac_cv_prog_CC="$@"
+  fi
+fi
+fi
+fi
+CC="$ac_cv_prog_CC"
+if test -n "$CC"; then
+  echo "$ac_t""$CC" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+  fi
+
+  echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
+echo "configure:1273: checking whether we are using GNU C" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.c <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gcc=yes
+else
+  ac_cv_prog_gcc=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+
+  if test $ac_cv_prog_gcc = yes; then
+    GCC=yes
+          ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS=
+    echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
+echo "configure:1297: checking whether ${CC-cc} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.c
+if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+  ac_cv_prog_cc_g=yes
+else
+  ac_cv_prog_cc_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    elif test $ac_cv_prog_cc_g = yes; then
+      CFLAGS="-g -O2"
+    else
+      CFLAGS="-O2"
+    fi
+  else
+    GCC=
+    test "${CFLAGS+set}" = set || CFLAGS="-g"
+  fi
+  
+
+  # Likewise for AC_PROG_CXX.  We can't just call it directly because g++
+  # will try to link in libstdc++.
+  
+
+      
+  # Use glibcpp_CXX so that we do not cause CXX to be cached with the
+  # flags that come in CXX while configuring libstdc++.  They're different
+  # from those used for all other target libraries.  If CXX is set in
+  # the environment, respect that here.
+  glibcpp_CXX=$CXX
+  for ac_prog in $CCC c++ g++ gcc CC cxx cc++
+do
+# Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1340: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_glibcpp_CXX'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$glibcpp_CXX"; then
+  ac_cv_prog_glibcpp_CXX="$glibcpp_CXX" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_glibcpp_CXX="$ac_prog"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+glibcpp_CXX="$ac_cv_prog_glibcpp_CXX"
+if test -n "$glibcpp_CXX"; then
+  echo "$ac_t""$glibcpp_CXX" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+test -n "$glibcpp_CXX" && break
+done
+test -n "$glibcpp_CXX" || glibcpp_CXX="gcc"
+
+  
+  CXX=$glibcpp_CXX
+  test -z "$glibcpp_CXX" && { echo "configure: error: no acceptable c++ found in \$PATH" 1>&2; exit 1; }
+
+  echo $ac_n "checking whether we are using GNU C++""... $ac_c" 1>&6
+echo "configure:1375: checking whether we are using GNU C++" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_gxx'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.C <&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
+  ac_cv_prog_gxx=yes
+else
+  ac_cv_prog_gxx=no
+fi
+fi
+
+echo "$ac_t""$ac_cv_prog_gxx" 1>&6
+
+  if test $ac_cv_prog_gxx = yes; then
+    GXX=yes
+                ac_test_CXXFLAGS="${CXXFLAGS+set}"
+    ac_save_CXXFLAGS="$CXXFLAGS"
+    CXXFLAGS=
+    echo $ac_n "checking whether ${CXX-g++} accepts -g""... $ac_c" 1>&6
+echo "configure:1399: checking whether ${CXX-g++} accepts -g" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_cxx_g'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  echo 'void f(){}' > conftest.cc
+if test -z "`${CXX-g++} -g -c conftest.cc 2>&1`"; then
+  ac_cv_prog_cxx_g=yes
+else
+  ac_cv_prog_cxx_g=no
+fi
+rm -f conftest*
+
+fi
+
+echo "$ac_t""$ac_cv_prog_cxx_g" 1>&6
+    if test "$ac_test_CXXFLAGS" = set; then
+      CXXFLAGS="$ac_save_CXXFLAGS"
+    elif test $ac_cv_prog_cxx_g = yes; then
+      CXXFLAGS="-g -O2"
+    else
+      CXXFLAGS="-O2"
+    fi
+  else
+    GXX=
+    test "${CXXFLAGS+set}" = set || CXXFLAGS="-g"
+  fi
+  
+
+  # For some reason, gettext needs this.
+  
+        echo $ac_n "checking for strerror in -lcposix""... $ac_c" 1>&6
+echo "configure:1430: checking for strerror in -lcposix" >&5
+ac_lib_var=`echo cposix'_'strerror | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lcposix  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  LIBS="$LIBS -lcposix"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  
+
+
+  # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args.
+set dummy ${ac_tool_prefix}as; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1475: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AS'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AS"; then
+  ac_cv_prog_AS="$AS" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AS="${ac_tool_prefix}as"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_AS" && ac_cv_prog_AS="as"
+fi
+fi
+AS="$ac_cv_prog_AS"
+if test -n "$AS"; then
+  echo "$ac_t""$AS" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ar; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1507: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_AR'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_AR="${ac_tool_prefix}ar"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_AR" && ac_cv_prog_AR="ar"
+fi
+fi
+AR="$ac_cv_prog_AR"
+if test -n "$AR"; then
+  echo "$ac_t""$AR" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1539: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:1571: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB="ranlib-not-found-in-path-error"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  RANLIB="ranlib-not-found-in-path-error"
+fi
+fi
+
+  # Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
+echo "configure:1615: checking for a BSD compatible install" >&5
+if test -z "$INSTALL"; then
+if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    IFS="${IFS= 	}"; ac_save_IFS="$IFS"; IFS=":"
+  for ac_dir in $PATH; do
+    # Account for people who put trailing slashes in PATH elements.
+    case "$ac_dir/" in
+    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
+    *)
+      # OSF1 and SCO ODT 3.0 have their own names for install.
+      # Don't use installbsd from OSF since it installs stuff as root
+      # by default.
+      for ac_prog in ginstall scoinst install; do
+        if test -f $ac_dir/$ac_prog; then
+	  if test $ac_prog = install &&
+            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
+	    # AIX install.  It has an incompatible calling convention.
+	    :
+	  else
+	    ac_cv_path_install="$ac_dir/$ac_prog -c"
+	    break 2
+	  fi
+	fi
+      done
+      ;;
+    esac
+  done
+  IFS="$ac_save_IFS"
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL="$ac_cv_path_install"
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL="$ac_install_sh"
+  fi
+fi
+echo "$ac_t""$INSTALL" 1>&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+  echo $ac_n "checking whether to enable maintainer-specific portions of Makefiles""... $ac_c" 1>&6
+echo "configure:1669: checking whether to enable maintainer-specific portions of Makefiles" >&5
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi
+
+  echo "$ac_t""$USE_MAINTAINER_MODE" 1>&6
+  
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+  MAINT=$MAINTAINER_MODE_TRUE
+  
+
+
+  # We need AC_EXEEXT to keep automake happy in cygnus mode.  However,
+  # at least currently, we never actually build a program, so we never
+  # need to use $(EXEEXT).  Moreover, the test for EXEEXT normally
+  # fails, because we are probably configuring with a cross compiler
+  # which can't create executables.  So we include AC_EXEEXT to keep
+  # automake happy, but we don't execute it, since we don't care about
+  # the result.
+  if false; then
+    # autoconf 2.50 runs AC_EXEEXT by default, and the macro expands
+    # to nothing, so nothing would remain between `then' and `fi' if it
+    # were not for the `:' below.
+    :
+    
+
+echo $ac_n "checking for executable suffix""... $ac_c" 1>&6
+echo "configure:1707: checking for executable suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_exeext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$CYGWIN" = yes || test "$MINGW32" = yes; then
+  ac_cv_exeext=.exe
+else
+  rm -f conftest*
+  echo 'int main () { return 0; }' > conftest.$ac_ext
+  ac_cv_exeext=
+  if { (eval echo configure:1717: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; }; then
+    for file in conftest.*; do
+      case $file in
+      *.c | *.o | *.obj | *.ilk | *.pdb) ;;
+      *) ac_cv_exeext=`echo $file | sed -e s/conftest//` ;;
+      esac
+    done
+  else
+    { echo "configure: error: installation or configuration problem: compiler cannot create executables." 1>&2; exit 1; }
+  fi
+  rm -f conftest*
+  test x"${ac_cv_exeext}" = x && ac_cv_exeext=no
+fi
+fi
+
+EXEEXT=""
+test x"${ac_cv_exeext}" != xno && EXEEXT=${ac_cv_exeext}
+echo "$ac_t""${ac_cv_exeext}" 1>&6
+ac_exeext=$EXEEXT
+
+  fi
+
+  . ${glibcpp_basedir}/configure.host
+
+  case ${glibcpp_basedir} in
+    /* | A-Za-z:\\/*) libgcj_flagbasedir=${glibcpp_basedir} ;;
+    *) glibcpp_flagbasedir='$(top_builddir)/'${glibcpp_basedir} ;;
+  esac
+
+  # This does for the target what configure.host does for the host.  In
+  # addition to possibly modifying the same flags, it also sets up symlinks.
+  
+    . ${glibcpp_basedir}/configure.target
+    echo "$ac_t""CPU config directory is $cpu_include_dir" 1>&6
+    echo "$ac_t""OS config directory is $os_include_dir" 1>&6
+
+
+
+
+
+# Check whether --enable-shared or --disable-shared was given.
+if test "${enable_shared+set}" = set; then
+  enableval="$enable_shared"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_shared=yes ;;
+no) enable_shared=no ;;
+*)
+  enable_shared=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_shared=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_shared=yes
+fi
+
+# Check whether --enable-static or --disable-static was given.
+if test "${enable_static+set}" = set; then
+  enableval="$enable_static"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_static=yes ;;
+no) enable_static=no ;;
+*)
+  enable_static=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_static=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_static=yes
+fi
+
+# Check whether --enable-fast-install or --disable-fast-install was given.
+if test "${enable_fast_install+set}" = set; then
+  enableval="$enable_fast_install"
+  p=${PACKAGE-default}
+case $enableval in
+yes) enable_fast_install=yes ;;
+no) enable_fast_install=no ;;
+*)
+  enable_fast_install=no
+  # Look at the argument we got.  We use all the common list separators.
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}:,"
+  for pkg in $enableval; do
+    if test "X$pkg" = "X$p"; then
+      enable_fast_install=yes
+    fi
+  done
+  IFS="$ac_save_ifs"
+  ;;
+esac
+else
+  enable_fast_install=yes
+fi
+
+# Check whether --with-gnu-ld or --without-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+  withval="$with_gnu_ld"
+  test "$withval" = no || with_gnu_ld=yes
+else
+  with_gnu_ld=no
+fi
+
+ac_prog=ld
+if test "$GCC" = yes; then
+  # Check if gcc -print-prog-name=ld gives a path.
+  echo $ac_n "checking for ld used by GCC""... $ac_c" 1>&6
+echo "configure:1838: checking for ld used by GCC" >&5
+  case $host in
+  *-*-mingw*)
+    # gcc leaves a trailing carriage return which upsets mingw
+    ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+  *)
+    ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+  esac
+  case $ac_prog in
+    # Accept absolute paths.
+    [\\/]* | [A-Za-z]:[\\/]*)
+      re_direlt='/[^/][^/]*/\.\./'
+      # Canonicalize the path of ld
+      ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+      while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+	ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+      done
+      test -z "$LD" && LD="$ac_prog"
+      ;;
+  "")
+    # If it fails, then pretend we aren't using GCC.
+    ac_prog=ld
+    ;;
+  *)
+    # If it is relative, then search for the first ld in PATH.
+    with_gnu_ld=unknown
+    ;;
+  esac
+elif test "$with_gnu_ld" = yes; then
+  echo $ac_n "checking for GNU ld""... $ac_c" 1>&6
+echo "configure:1868: checking for GNU ld" >&5
+else
+  echo $ac_n "checking for non-GNU ld""... $ac_c" 1>&6
+echo "configure:1871: checking for non-GNU ld" >&5
+fi
+if eval "test \"`echo '$''{'lt_cv_path_LD'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -z "$LD"; then
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+      lt_cv_path_LD="$ac_dir/$ac_prog"
+      # Check to see if the program is GNU ld.  I'd rather use --version,
+      # but apparently some GNU ld's only accept -v.
+      # Break only if it was the GNU/non-GNU ld that we prefer.
+      if "$lt_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
+	test "$with_gnu_ld" != no && break
+      else
+	test "$with_gnu_ld" != yes && break
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+else
+  lt_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$lt_cv_path_LD"
+if test -n "$LD"; then
+  echo "$ac_t""$LD" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+test -z "$LD" && { echo "configure: error: no acceptable ld found in \$PATH" 1>&2; exit 1; }
+echo $ac_n "checking if the linker ($LD) is GNU ld""... $ac_c" 1>&6
+echo "configure:1906: checking if the linker ($LD) is GNU ld" >&5
+if eval "test \"`echo '$''{'lt_cv_prog_gnu_ld'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+if $LD -v 2>&1 &5; then
+  lt_cv_prog_gnu_ld=yes
+else
+  lt_cv_prog_gnu_ld=no
+fi
+fi
+
+echo "$ac_t""$lt_cv_prog_gnu_ld" 1>&6
+with_gnu_ld=$lt_cv_prog_gnu_ld
+
+
+echo $ac_n "checking for $LD option to reload object files""... $ac_c" 1>&6
+echo "configure:1923: checking for $LD option to reload object files" >&5
+if eval "test \"`echo '$''{'lt_cv_ld_reload_flag'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  lt_cv_ld_reload_flag='-r'
+fi
+
+echo "$ac_t""$lt_cv_ld_reload_flag" 1>&6
+reload_flag=$lt_cv_ld_reload_flag
+test -n "$reload_flag" && reload_flag=" $reload_flag"
+
+echo $ac_n "checking for BSD-compatible nm""... $ac_c" 1>&6
+echo "configure:1935: checking for BSD-compatible nm" >&5
+if eval "test \"`echo '$''{'lt_cv_path_NM'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$NM"; then
+  # Let the user override the test.
+  lt_cv_path_NM="$NM"
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+  for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do
+    test -z "$ac_dir" && ac_dir=.
+    tmp_nm=$ac_dir/${ac_tool_prefix}nm
+    if test -f $tmp_nm || test -f $tmp_nm$ac_exeext ; then
+      # Check to see if the nm accepts a BSD-compat flag.
+      # Adding the `sed 1q' prevents false positives on HP-UX, which says:
+      #   nm: unknown option "B" ignored
+      # Tru64's nm complains that /dev/null is an invalid object file
+      if ($tmp_nm -B /dev/null 2>&1 | sed '1q'; exit 0) | egrep '(/dev/null|Invalid file or object type)' >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -B"
+	break
+      elif ($tmp_nm -p /dev/null 2>&1 | sed '1q'; exit 0) | egrep /dev/null >/dev/null; then
+	lt_cv_path_NM="$tmp_nm -p"
+	break
+      else
+	lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
+	continue # so that we can try to find one that supports BSD flags
+      fi
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm
+fi
+fi
+
+NM="$lt_cv_path_NM"
+echo "$ac_t""$NM" 1>&6
+
+echo $ac_n "checking how to recognise dependant libraries""... $ac_c" 1>&6
+echo "configure:1973: checking how to recognise dependant libraries" >&5
+if eval "test \"`echo '$''{'lt_cv_deplibs_check_method'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  lt_cv_file_magic_cmd='$MAGIC_CMD'
+lt_cv_file_magic_test_file=
+lt_cv_deplibs_check_method='unknown'
+# Need to set the preceding variable on all platforms that support
+# interlibrary dependencies.
+# 'none' -- dependencies not supported.
+# `unknown' -- same as none, but documents that we really don't know.
+# 'pass_all' -- all dependencies passed with no checks.
+# 'test_compile' -- check by making test program.
+# 'file_magic [regex]' -- check by looking for files in library path
+# which responds to the $file_magic_cmd with a given egrep regex.
+# If you have `file' or equivalent on your system and you're not sure
+# whether `pass_all' will *always* work, you probably want this one.
+
+case $host_os in
+aix*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+beos*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+bsdi4*)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  ;;
+
+cygwin* | mingw* |pw32*)
+  lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?'
+  lt_cv_file_magic_cmd='$OBJDUMP -f'
+  ;;
+
+darwin* | rhapsody*)
+  lt_cv_deplibs_check_method='file_magic Mach-O dynamically linked shared library'
+  lt_cv_file_magic_cmd='/usr/bin/file -L'
+  case "$host_os" in
+  rhapsody* | darwin1.012)
+    lt_cv_file_magic_test_file='/System/Library/Frameworks/System.framework/System'
+    ;;
+  *) # Darwin 1.3 on
+    lt_cv_file_magic_test_file='/usr/lib/libSystem.dylib'
+    ;;
+  esac
+  ;;
+
+freebsd* )
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    case $host_cpu in
+    i*86 )
+      # Not sure whether the presence of OpenBSD here was a mistake.
+      # Let's accept both of them until this is cleared up.
+      lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library'
+      lt_cv_file_magic_cmd=/usr/bin/file
+      lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*`
+      ;;
+    esac
+  else
+    lt_cv_deplibs_check_method=pass_all
+  fi
+  ;;
+
+gnu*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+hpux10.20*|hpux11*)
+  lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libc.sl
+  ;;
+
+irix5* | irix6*)
+  case $host_os in
+  irix5*)
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1"
+    ;;
+  *)
+    case $LD in
+    *-32|*"-32 ") libmagic=32-bit;;
+    *-n32|*"-n32 ") libmagic=N32;;
+    *-64|*"-64 ") libmagic=64-bit;;
+    *) libmagic=never-match;;
+    esac
+    # this will be overridden with pass_all, but let us keep it just in case
+    lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[1234] dynamic lib MIPS - version 1"
+    ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*`
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+# This must be Linux ELF.
+linux-gnu*)
+  case $host_cpu in
+  alpha* | hppa* | i*86 | powerpc* | sparc* | ia64* )
+    lt_cv_deplibs_check_method=pass_all ;;
+  *)
+    # glibc up to 2.1.1 does not perform some relocations on ARM
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;;
+  esac
+  lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so`
+  ;;
+
+netbsd*)
+  if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then
+    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so\.[0-9]+\.[0-9]+$'
+  else
+    lt_cv_deplibs_check_method='match_pattern /lib[^/\.]+\.so$'
+  fi
+  ;;
+
+newsos6)
+  lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)'
+  lt_cv_file_magic_cmd=/usr/bin/file
+  lt_cv_file_magic_test_file=/usr/lib/libnls.so
+  ;;
+
+osf3* | osf4* | osf5*)
+  # this will be overridden with pass_all, but let us keep it just in case
+  lt_cv_deplibs_check_method='file_magic COFF format alpha shared library'
+  lt_cv_file_magic_test_file=/shlib/libc.so
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sco3.2v5*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+solaris*)
+  lt_cv_deplibs_check_method=pass_all
+  lt_cv_file_magic_test_file=/lib/libc.so
+  ;;
+
+sysv5uw[78]* | sysv4*uw2*)
+  lt_cv_deplibs_check_method=pass_all
+  ;;
+
+sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+  case $host_vendor in
+  ncr)
+    lt_cv_deplibs_check_method=pass_all
+    ;;
+  motorola)
+    lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]'
+    lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*`
+    ;;
+  esac
+  ;;
+esac
+
+fi
+
+echo "$ac_t""$lt_cv_deplibs_check_method" 1>&6
+file_magic_cmd=$lt_cv_file_magic_cmd
+deplibs_check_method=$lt_cv_deplibs_check_method
+
+echo $ac_n "checking for object suffix""... $ac_c" 1>&6
+echo "configure:2137: checking for object suffix" >&5
+if eval "test \"`echo '$''{'ac_cv_objext'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  rm -f conftest*
+echo 'int i = 1;' > conftest.$ac_ext
+if { (eval echo configure:2143: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  for ac_file in conftest.*; do
+    case $ac_file in
+    *.c) ;;
+    *) ac_cv_objext=`echo $ac_file | sed -e s/conftest.//` ;;
+    esac
+  done
+else
+  { echo "configure: error: installation or configuration problem; compiler does not work" 1>&2; exit 1; }
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_objext" 1>&6
+OBJEXT=$ac_cv_objext
+ac_objext=$ac_cv_objext
+
+# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers!
+
+# Only perform the check for file, if the check method requires it
+case $deplibs_check_method in
+file_magic*)
+  if test "$file_magic_cmd" = '$MAGIC_CMD'; then
+    echo $ac_n "checking for ${ac_tool_prefix}file""... $ac_c" 1>&6
+echo "configure:2167: checking for ${ac_tool_prefix}file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/bin:$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/${ac_tool_prefix}file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+if test -z "$lt_cv_path_MAGIC_CMD"; then
+  if test -n "$ac_tool_prefix"; then
+    echo $ac_n "checking for file""... $ac_c" 1>&6
+echo "configure:2229: checking for file" >&5
+if eval "test \"`echo '$''{'lt_cv_path_MAGIC_CMD'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  case $MAGIC_CMD in
+  /*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path.
+  ;;
+  ?:/*)
+  lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a dos path.
+  ;;
+  *)
+  ac_save_MAGIC_CMD="$MAGIC_CMD"
+  IFS="${IFS=   }"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="/usr/bin:$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/file; then
+      lt_cv_path_MAGIC_CMD="$ac_dir/file"
+      if test -n "$file_magic_test_file"; then
+	case $deplibs_check_method in
+	"file_magic "*)
+	  file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`"
+	  MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+	  if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null |
+	    egrep "$file_magic_regex" > /dev/null; then
+	    :
+	  else
+	    cat <&2
+
+*** Warning: the command libtool uses to detect shared libraries,
+*** $file_magic_cmd, produces output that libtool cannot recognize.
+*** The result is that libtool may fail to recognize shared libraries
+*** as such.  This will affect the creation of libtool libraries that
+*** depend on shared libraries, but programs linked with such libtool
+*** libraries will work regardless of this problem.  Nevertheless, you
+*** may want to report the problem to your system manager and/or to
+*** bug-libtool@gnu.org
+
+EOF
+	  fi ;;
+	esac
+      fi
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  MAGIC_CMD="$ac_save_MAGIC_CMD"
+  ;;
+esac
+fi
+
+MAGIC_CMD="$lt_cv_path_MAGIC_CMD"
+if test -n "$MAGIC_CMD"; then
+  echo "$ac_t""$MAGIC_CMD" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  else
+    MAGIC_CMD=:
+  fi
+fi
+
+  fi
+  ;;
+esac
+
+# Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2300: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_RANLIB"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2332: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_RANLIB="ranlib"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
+fi
+fi
+RANLIB="$ac_cv_prog_RANLIB"
+if test -n "$RANLIB"; then
+  echo "$ac_t""$RANLIB" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  RANLIB=":"
+fi
+fi
+
+# Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2367: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+if test -z "$ac_cv_prog_STRIP"; then
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:2399: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_STRIP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_STRIP="strip"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_STRIP" && ac_cv_prog_STRIP=":"
+fi
+fi
+STRIP="$ac_cv_prog_STRIP"
+if test -n "$STRIP"; then
+  echo "$ac_t""$STRIP" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+else
+  STRIP=":"
+fi
+fi
+
+
+# Check for any special flags to pass to ltconfig.
+libtool_flags="--cache-file=$cache_file"
+test "$enable_shared" = no && libtool_flags="$libtool_flags --disable-shared"
+test "$enable_static" = no && libtool_flags="$libtool_flags --disable-static"
+test "$enable_fast_install" = no && libtool_flags="$libtool_flags --disable-fast-install"
+test "$GCC" = yes && libtool_flags="$libtool_flags --with-gcc"
+test "$lt_cv_prog_gnu_ld" = yes && libtool_flags="$libtool_flags --with-gnu-ld"
+libtool_flags="$libtool_flags --enable-dlopen"
+
+# Check whether --enable-libtool-lock or --disable-libtool-lock was given.
+if test "${enable_libtool_lock+set}" = set; then
+  enableval="$enable_libtool_lock"
+  :
+fi
+
+test "x$enable_libtool_lock" = xno && libtool_flags="$libtool_flags --disable-lock"
+test x"$silent" = xyes && libtool_flags="$libtool_flags --silent"
+
+# Check whether --with-pic or --without-pic was given.
+if test "${with_pic+set}" = set; then
+  withval="$with_pic"
+  pic_mode="$withval"
+else
+  pic_mode=default
+fi
+
+test x"$pic_mode" = xyes && libtool_flags="$libtool_flags --prefer-pic"
+test x"$pic_mode" = xno && libtool_flags="$libtool_flags --prefer-non-pic"
+
+# Some flags need to be propagated to the compiler or linker for good
+# libtool support.
+case $host in
+*-*-irix6*)
+  # Find out which ABI we are using.
+  echo '#line 2466 "configure"' > conftest.$ac_ext
+  if { (eval echo configure:2467: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+    case `/usr/bin/file conftest.$ac_objext` in
+    *32-bit*)
+      LD="${LD-ld} -32"
+      ;;
+    *N32*)
+      LD="${LD-ld} -n32"
+      ;;
+    *64-bit*)
+      LD="${LD-ld} -64"
+      ;;
+    esac
+  fi
+  rm -rf conftest*
+  ;;
+
+*-*-sco3.2v5*)
+  # On SCO OpenServer 5, we need -belf to get full-featured binaries.
+  SAVE_CFLAGS="$CFLAGS"
+  CFLAGS="$CFLAGS -belf"
+  echo $ac_n "checking whether the C compiler needs -belf""... $ac_c" 1>&6
+echo "configure:2488: checking whether the C compiler needs -belf" >&5
+if eval "test \"`echo '$''{'lt_cv_cc_needs_belf'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+     ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+     cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  lt_cv_cc_needs_belf=no
+fi
+rm -f conftest*
+     ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+echo "$ac_t""$lt_cv_cc_needs_belf" 1>&6
+  if test x"$lt_cv_cc_needs_belf" != x"yes"; then
+    # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf
+    CFLAGS="$SAVE_CFLAGS"
+  fi
+  ;;
+
+
+esac
+
+echo $ac_n "checking how to run the C++ preprocessor""... $ac_c" 1>&6
+echo "configure:2538: checking how to run the C++ preprocessor" >&5
+if test -z "$CXXCPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CXXCPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+  CXXCPP="${CXX-g++} -E"
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2556: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CXXCPP=/lib/cpp
+fi
+rm -f conftest*
+  ac_cv_prog_CXXCPP="$CXXCPP"
+ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+fi
+fi
+CXXCPP="$ac_cv_prog_CXXCPP"
+echo "$ac_t""$CXXCPP" 1>&6
+
+
+# Save cache, so that ltconfig can load it
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+
+# Actually configure libtool.  ac_aux_dir is where install-sh is found.
+AR="$AR" LTCC="$CC" CC="$CC" CFLAGS="$CFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" file_magic_cmd="$file_magic_cmd" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig --no-reexec \
+$libtool_flags --no-verify --build="$build" $ac_aux_dir/ltmain.sh $host \
+|| { echo "configure: error: libtool configure failed" 1>&2; exit 1; }
+
+# Reload cache, that may have been modified by ltconfig
+if test -r "$cache_file"; then
+  echo "loading cache $cache_file"
+  . $cache_file
+else
+  echo "creating cache $cache_file"
+  > $cache_file
+fi
+
+
+# This can be used to rebuild libtool when needed
+LIBTOOL_DEPS="$ac_aux_dir/ltconfig $ac_aux_dir/ltmain.sh $ac_aux_dir/ltcf-c.sh"
+
+# Always use our own libtool.
+LIBTOOL='$(SHELL) $(top_builddir)/libtool'
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+
+
+LIBTOOL_DEPS=$LIBTOOL_DEPS" $ac_aux_dir/ltcf-cxx.sh"
+lt_save_CC="$CC"
+lt_save_CFLAGS="$CFLAGS"
+AR="$AR" LTCC="$CC" CC="$CXX" CXX="$CXX" CFLAGS="$CXXFLAGS" CPPFLAGS="$CPPFLAGS" \
+MAGIC_CMD="$MAGIC_CMD" LD="$LD" LDFLAGS="$LDFLAGS" LIBS="$LIBS" \
+LN_S="$LN_S" NM="$NM" RANLIB="$RANLIB" STRIP="$STRIP" \
+AS="$AS" DLLTOOL="$DLLTOOL" OBJDUMP="$OBJDUMP" \
+objext="$OBJEXT" exeext="$EXEEXT" reload_flag="$reload_flag" \
+deplibs_check_method="$deplibs_check_method" \
+file_magic_cmd="$file_magic_cmd" \
+${CONFIG_SHELL-/bin/sh} $ac_aux_dir/ltconfig -o libtool $libtool_flags \
+--build="$build" --add-tag=CXX $ac_aux_dir/ltcf-cxx.sh $host \
+|| { echo "configure: error: libtool tag configuration failed" 1>&2; exit 1; }
+CC="$lt_save_CC"
+CFLAGS="$lt_save_CFLAGS"
+
+# Redirect the config.log output again, so that the ltconfig log is not
+# clobbered by the next message.
+exec 5>>./config.log
+
+  
+
+  
+	 
+	 
+
+
+
+# Check for c++ or library specific bits that don't require linking.
+#GLIBCPP_CHECK_COMPILER_VERSION
+echo $ac_n "checking for GNU make""... $ac_c" 1>&6
+echo "configure:2694: checking for GNU make" >&5
+if eval "test \"`echo '$''{'_cv_gnu_make_command'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  _cv_gnu_make_command='' ;
+          for a in "${MAKE-make}" make gmake gnumake ; do
+                  if ( $a --version 2> /dev/null | grep -c GNU > /dev/null )
+                  then
+                          _cv_gnu_make_command=$a ;
+                          break;
+                  fi
+          done ;
+  
+fi
+
+echo "$ac_t""$_cv_gnu_make_command" 1>&6 ;
+  if test  "x$_cv_gnu_make_command" != "x"  ; then
+          ifGNUmake='' ;
+  else
+          ifGNUmake='#' ;
+  fi
+  
+
+
+# Enable all the variable C++ stuff.  C_MBCHAR must come early.
+# Check whether --enable-debug or --disable-debug was given.
+if test "${enable_debug+set}" = set; then
+  enableval="$enable_debug"
+  case "${enableval}" in
+ yes) enable_debug=yes ;;
+ no)  enable_debug=no ;;
+ *)   { echo "configure: error: Unknown argument to enable/disable extra debugging" 1>&2; exit 1; } ;;
+ esac
+else
+  enable_debug=no
+fi
+
+case "${enable_debug}" in
+    yes) 
+        DEBUG_FLAGS='-O0 -ggdb3'                        
+        ;; 
+    no)   
+        DEBUG_FLAGS='-g'
+        ;;
+esac
+
+
+echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
+echo "configure:2742: checking how to run the C preprocessor" >&5
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+    # This must be in double quotes, not single quotes, because CPP may get
+  # substituted into the Makefile and "${CC-cc}" will confuse make.
+  CPP="${CC-cc} -E"
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp.
+  cat > conftest.$ac_ext <
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2763: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -E -traditional-cpp"
+  cat > conftest.$ac_ext <
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2780: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP="${CC-cc} -nologo -E"
+  cat > conftest.$ac_ext <
+Syntax Error
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2797: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  :
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  CPP=/lib/cpp
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+fi
+rm -f conftest*
+  ac_cv_prog_CPP="$CPP"
+fi
+  CPP="$ac_cv_prog_CPP"
+else
+  ac_cv_prog_CPP="$CPP"
+fi
+echo "$ac_t""$CPP" 1>&6
+
+
+  echo $ac_n "checking for cstdio to use""... $ac_c" 1>&6
+echo "configure:2823: checking for cstdio to use" >&5
+  # Check whether --enable-cstdio or --disable-cstdio was given.
+if test "${enable_cstdio+set}" = set; then
+  enableval="$enable_cstdio"
+  if test x$enable_cstdio = xno; then
+     enable_cstdio=stdio
+  fi
+else
+  enable_cstdio=stdio
+fi
+
+
+  enable_cstdio_flag=$enable_cstdio
+
+    case x${enable_cstdio_flag} in
+    xlibio)
+      CSTDIO_H=config/io/c_io_libio.h
+      BASIC_FILE_H=config/io/basic_file_libio.h
+      BASIC_FILE_CC=config/io/basic_file_libio.cc
+      echo "$ac_t""libio" 1>&6
+
+      # see if we are on a system with libio native (ie, linux)
+      ac_safe=`echo "libio.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for libio.h""... $ac_c" 1>&6
+echo "configure:2847: checking for libio.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:2857: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  has_libio=yes
+else
+  echo "$ac_t""no" 1>&6
+has_libio=no
+fi
+
+
+      # Need to check and see what version of glibc is being used. If
+      # it's not glibc-2.2 or higher, then we'll need to go ahead and 
+      # compile most of libio for linux systems.
+      if test x$has_libio = x"yes"; then
+        case "$target" in
+          *-*-linux*)
+              echo $ac_n "checking for glibc version >= 2.2""... $ac_c" 1>&6
+echo "configure:2887: checking for glibc version >= 2.2" >&5
+              cat > conftest.$ac_ext <
+              #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 
+                    ok
+              #endif
+              
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "ok" >/dev/null 2>&1; then
+  rm -rf conftest*
+  glibc_satisfactory=yes
+else
+  rm -rf conftest*
+  glibc_satisfactory=no
+fi
+rm -f conftest*
+
+              echo "$ac_t""$glibc_satisfactory" 1>&6
+            ;;
+        esac
+
+        # XXX at the moment, admit defeat and force the recompilation
+        # XXX of glibc even on glibc-2.2 systems, because libio is not synched.
+        glibc_satisfactory=no        
+
+        if test x$glibc_satisfactory = x"yes"; then
+           need_libio=no
+           need_wlibio=no        
+        else
+           need_libio=yes
+           # bkoz XXX need to add checks to enable this
+           # pme XXX here's a first pass at such a check
+           if test x$enable_c_mbchar != xno; then
+              need_wlibio=yes
+           else
+              need_wlibio=no
+           fi
+        fi
+
+      else
+         # Using libio, but  doesn't exist on the target system. . .
+         need_libio=yes
+         # bkoz XXX need to add checks to enable this
+         # pme XXX here's a first pass at such a check
+         if test x$enable_c_mbchar != xno; then
+             need_wlibio=yes
+         else
+             need_wlibio=no
+         fi
+      fi
+      ;;
+    xstdio | x | xno | xnone | xyes)
+      # default
+      CSTDIO_H=config/io/c_io_stdio.h
+      BASIC_FILE_H=config/io/basic_file_stdio.h
+      BASIC_FILE_CC=config/io/basic_file_stdio.cc
+      echo "$ac_t""stdio" 1>&6
+
+      # We're not using stdio.
+      need_libio=no
+      need_wlibio=no
+      ;;
+    *)
+      echo "$enable_cstdio is an unknown io package" 1>&2
+      exit 1
+      ;;
+  esac
+  
+  
+  
+
+  # 2000-08-04 bkoz hack
+  CCODECVT_C=config/io/c_io_libio_codecvt.c
+  
+  # 2000-08-04 bkoz hack
+
+  
+
+if test "$need_libio" = yes || test "$need_wlibio" = yes; then
+  GLIBCPP_BUILD_LIBIO_TRUE=
+  GLIBCPP_BUILD_LIBIO_FALSE='#'
+else
+  GLIBCPP_BUILD_LIBIO_TRUE='#'
+  GLIBCPP_BUILD_LIBIO_FALSE=
+fi
+  
+
+if test "$need_libio" = yes; then
+  GLIBCPP_NEED_LIBIO_TRUE=
+  GLIBCPP_NEED_LIBIO_FALSE='#'
+else
+  GLIBCPP_NEED_LIBIO_TRUE='#'
+  GLIBCPP_NEED_LIBIO_FALSE=
+fi
+  
+
+if test "$need_wlibio" = yes; then
+  GLIBCPP_NEED_WLIBIO_TRUE=
+  GLIBCPP_NEED_WLIBIO_FALSE='#'
+else
+  GLIBCPP_NEED_WLIBIO_TRUE='#'
+  GLIBCPP_NEED_WLIBIO_FALSE=
+fi
+  if test "$need_libio" = yes || test "$need_wlibio" = yes; then
+    libio_la=../libio/libio.la
+  else
+    libio_la=
+  fi
+  
+
+
+  echo $ac_n "checking for clocale to use""... $ac_c" 1>&6
+echo "configure:3003: checking for clocale to use" >&5
+  # Check whether --enable-clocale or --disable-clocale was given.
+if test "${enable_clocale+set}" = set; then
+  enableval="$enable_clocale"
+  if test x$enable_clocale = xno; then
+     enable_clocale=no
+  fi
+else
+  enable_clocale=no
+fi
+
+
+  enable_clocale_flag=$enable_clocale
+
+      if test x$enable_clocale_flag = xno; then
+    case x${target_os} in
+      xlinux* | xgnu*)
+	cat > conftest.$ac_ext <
+        #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) 
+          _GLIBCPP_ok
+        #endif
+        
+EOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  egrep "_GLIBCPP_ok" >/dev/null 2>&1; then
+  rm -rf conftest*
+  enable_clocale_flag=gnu
+else
+  rm -rf conftest*
+  enable_clocale_flag=generic
+fi
+rm -f conftest*
+
+
+	# Test for bugs early in glibc-2.2.x series
+  	if test x$enable_clocale_flag = xgnu; then
+    	  if test "$cross_compiling" = yes; then
+  enable_clocale_flag=generic
+else
+  cat > conftest.$ac_ext <
+	  int main()
+	  {
+  	    const char __one[] = "Äuglein Augmen";
+  	    const char __two[] = "Äuglein";
+  	    int i;
+  	    int j;
+  	    __locale_t	loc;
+   	    __locale_t	loc_dup;
+  	    loc = __newlocale(1 << LC_ALL, "de_DE", 0);
+  	    loc_dup = __duplocale(loc);
+  	    i = __strcoll_l(__one, __two, loc);
+  	    j = __strcoll_l(__one, __two, loc_dup);
+  	    return 0;
+	  }
+	  
+EOF
+if { (eval echo configure:3068: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  enable_clocale_flag=gnu
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  enable_clocale_flag=generic
+fi
+rm -fr conftest*
+fi
+
+  	fi
+
+	# ... at some point put __strxfrm_l tests in as well.
+        ;;
+      *)
+	enable_clocale_flag=generic
+	;;
+    esac
+  fi
+
+    # Check whether --enable-nls or --disable-nls was given.
+if test "${enable_nls+set}" = set; then
+  enableval="$enable_nls"
+  :
+else
+  enable_nls=yes
+fi
+
+  USE_NLS=no
+
+    case x${enable_clocale_flag} in
+    xgeneric)
+      echo "$ac_t""generic" 1>&6
+
+      CLOCALE_H=config/locale/generic/c_locale.h
+      CLOCALE_CC=config/locale/generic/c_locale.cc
+      CCODECVT_H=config/locale/generic/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/generic/ctype_members.cc
+      CMESSAGES_H=config/locale/generic/messages_members.h
+      CMESSAGES_CC=config/locale/generic/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_CC=config/locale/generic/time_members.cc
+      ;;
+    xgnu)
+      echo "$ac_t""gnu" 1>&6
+
+      # Declare intention to use gettext, and add support for specific
+      # languages.
+      # For some reason, ALL_LINGUAS has to be before AM_GNU_GETTEXT
+      ALL_LINGUAS="de fr"
+
+      # Don't call AM_GNU_GETTEXT here. Instead, assume glibc.
+      # Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
+echo "configure:3127: checking for $ac_word" >&5
+if eval "test \"`echo '$''{'ac_cv_prog_check_msgfmt'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test -n "$check_msgfmt"; then
+  ac_cv_prog_check_msgfmt="$check_msgfmt" # Let the user override the test.
+else
+  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
+  ac_dummy="$PATH"
+  for ac_dir in $ac_dummy; do
+    test -z "$ac_dir" && ac_dir=.
+    if test -f $ac_dir/$ac_word; then
+      ac_cv_prog_check_msgfmt="yes"
+      break
+    fi
+  done
+  IFS="$ac_save_ifs"
+  test -z "$ac_cv_prog_check_msgfmt" && ac_cv_prog_check_msgfmt="no"
+fi
+fi
+check_msgfmt="$ac_cv_prog_check_msgfmt"
+if test -n "$check_msgfmt"; then
+  echo "$ac_t""$check_msgfmt" 1>&6
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+      if test x"$check_msgfmt" = x"yes" && test x"$enable_nls" = x"yes"; then
+	USE_NLS=yes
+      fi
+
+      # Export the build objects.
+      for ling in $ALL_LINGUAS; do \
+        glibcpp_MOFILES="$glibcpp_MOFILES $ling.mo"; \
+        glibcpp_POFILES="$glibcpp_POFILES $ling.po"; \
+      done
+      
+      
+
+      CLOCALE_H=config/locale/gnu/c_locale.h
+      CLOCALE_CC=config/locale/gnu/c_locale.cc
+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/gnu/collate_members.cc
+      CCTYPE_CC=config/locale/gnu/ctype_members.cc
+      CMESSAGES_H=config/locale/gnu/messages_members.h
+      CMESSAGES_CC=config/locale/gnu/messages_members.cc
+      CMONEY_CC=config/locale/gnu/monetary_members.cc
+      CNUMERIC_CC=config/locale/gnu/numeric_members.cc
+      CTIME_CC=config/locale/gnu/time_members.cc
+      ;;
+    xieee_1003.1-2001)
+      echo "$ac_t""generic" 1>&6
+
+      CLOCALE_H=config/locale/ieee_1003.1-2001/c_locale.h
+      CLOCALE_CC=config/locale/ieee_1003.1-2001/c_locale.cc
+      CCODECVT_H=config/locale/ieee_1003.1-2001/codecvt_specializations.h
+      CCOLLATE_CC=config/locale/generic/collate_members.cc
+      CCTYPE_CC=config/locale/generic/ctype_members.cc
+      CMESSAGES_H=config/locale/ieee_1003.1-2001/messages_members.h
+      CMESSAGES_CC=config/locale/ieee_1003.1-2001/messages_members.cc
+      CMONEY_CC=config/locale/generic/monetary_members.cc
+      CNUMERIC_CC=config/locale/generic/numeric_members.cc
+      CTIME_CC=config/locale/generic/time_members.cc
+      ;;
+    *)
+      echo "$enable_clocale is an unknown locale package" 1>&2
+      exit 1
+      ;;
+  esac
+
+  # This is where the testsuite looks for locale catalogs, using the
+  # -DLOCALEDIR define during testsuite compilation.
+  glibcpp_localedir=${glibcpp_builddir}/po/share/locale
+  
+
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+  
+
+# Check whether --enable-c-mbchar or --disable-c-mbchar was given.
+if test "${enable_c_mbchar+set}" = set; then
+  enableval="$enable_c_mbchar"
+  case "$enableval" in
+ yes) enable_c_mbchar=yes ;;
+ no)  enable_c_mbchar=no ;;
+ *)   { echo "configure: error: Unknown argument to enable/disable c-mbchar" 1>&2; exit 1; } ;;
+ esac
+else
+  enable_c_mbchar=yes
+fi
+
+  
+  # Check whether --enable-c99 or --disable-c99 was given.
+if test "${enable_c99+set}" = set; then
+  enableval="$enable_c99"
+    case "$enableval" in
+   yes) enable_c99=yes ;;
+   no)  enable_c99=no ;;
+   *)   { echo "configure: error: Unknown argument to enable/disable C99" 1>&2; exit 1; } ;;
+   esac
+else
+  enable_c99=yes
+fi
+ 
+  
+  ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+
+  # Check for the existence of  functions used if C99 is enabled.
+  ac_c99_math=yes;
+  echo $ac_n "checking for ISO C99 support in ""... $ac_c" 1>&6
+echo "configure:3251: checking for ISO C99 support in " >&5
+  cat > conftest.$ac_ext <
+int main() {
+fpclassify(0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3260: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isfinite(0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3277: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isinf(0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isnan(0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3311: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isnormal(0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+signbit(0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3345: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isgreater(0.0,0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3362: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isgreaterequal(0.0,0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3379: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isless(0.0,0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3396: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+islessequal(0.0,0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3413: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+islessgreater(0.0,0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3430: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+isunordered(0.0,0.0);
+; return 0; }
+EOF
+if { (eval echo configure:3447: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_math=no
+fi
+rm -f conftest*
+  echo "$ac_t""$ac_c99_math" 1>&6
+
+  # Check for the existence in  of vscanf, et. al.
+  ac_c99_stdio=yes;
+  echo $ac_n "checking for ISO C99 support in ""... $ac_c" 1>&6
+echo "configure:3461: checking for ISO C99 support in " >&5
+  cat > conftest.$ac_ext <
+int main() {
+snprintf("12", 0, "%i");
+; return 0; }
+EOF
+if { (eval echo configure:3470: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdio=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vfscanf(stderr, "%i", args);}
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdio=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vscanf("%i", args);}
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3512: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdio=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vsnprintf(fmt, 0, "%i", args);}
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3533: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdio=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+		  #include 
+		  void foo(char* fmt, ...)
+		  {va_list args; va_start(args, fmt);
+	          vsscanf(fmt, "%i", args);}
+int main() {
+
+; return 0; }
+EOF
+if { (eval echo configure:3554: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdio=no
+fi
+rm -f conftest*
+  echo "$ac_t""$ac_c99_stdio" 1>&6
+
+  # Check for the existence in  of lldiv_t, et. al.
+  ac_c99_stdlib=yes;
+  echo $ac_n "checking for lldiv_t declaration""... $ac_c" 1>&6
+echo "configure:3568: checking for lldiv_t declaration" >&5
+  if eval "test \"`echo '$''{'ac_c99_lldiv_t'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+  cat > conftest.$ac_ext <
+int main() {
+ lldiv_t mydivt;
+; return 0; }
+EOF
+if { (eval echo configure:3581: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_c99_lldiv_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_lldiv_t=no
+fi
+rm -f conftest*
+  
+fi
+
+  echo "$ac_t""$ac_c99_lldiv_t" 1>&6
+
+  echo $ac_n "checking for ISO C99 support in ""... $ac_c" 1>&6
+echo "configure:3597: checking for ISO C99 support in " >&5
+  cat > conftest.$ac_ext <
+int main() {
+char* tmp; strtof("gnu", &tmp);
+; return 0; }
+EOF
+if { (eval echo configure:3606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdlib=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+char* tmp; strtold("gnu", &tmp);
+; return 0; }
+EOF
+if { (eval echo configure:3623: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdlib=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+llabs(10);
+; return 0; }
+EOF
+if { (eval echo configure:3640: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdlib=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+lldiv(10,1);
+; return 0; }
+EOF
+if { (eval echo configure:3657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdlib=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+atoll("10");
+; return 0; }
+EOF
+if { (eval echo configure:3674: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdlib=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+_Exit(0);
+; return 0; }
+EOF
+if { (eval echo configure:3691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_stdlib=no
+fi
+rm -f conftest*
+  if test x"$ac_c99_lldiv_t" = x"no"; then
+    ac_c99_stdlib=no; 
+  fi; 
+  echo "$ac_t""$ac_c99_stdlib" 1>&6
+
+  # Check for the existence of  functions used if C99 is enabled.
+  # XXX the wchar.h checks should be rolled into the general C99 bits.
+  ac_c99_wchar=yes;
+  echo $ac_n "checking for additional ISO C99 support in ""... $ac_c" 1>&6
+echo "configure:3709: checking for additional ISO C99 support in " >&5
+  cat > conftest.$ac_ext <
+int main() {
+wcstold(L"10.0", NULL);
+; return 0; }
+EOF
+if { (eval echo configure:3718: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_wchar=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+wcstoll(L"10", NULL, 10);
+; return 0; }
+EOF
+if { (eval echo configure:3735: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_wchar=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+wcstoull(L"10", NULL, 10);
+; return 0; }
+EOF
+if { (eval echo configure:3752: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_c99_wchar=no
+fi
+rm -f conftest*
+  echo "$ac_t""$ac_c99_wchar" 1>&6
+
+  echo $ac_n "checking for enabled ISO C99 support""... $ac_c" 1>&6
+echo "configure:3764: checking for enabled ISO C99 support" >&5
+  if test x"$ac_c99_math" = x"no" ||
+     test x"$ac_c99_stdio" = x"no" ||
+     test x"$ac_c99_stdlib" = x"no" ||
+     test x"$ac_c99_wchar" = x"no"; then
+    enable_c99=no; 
+  fi; 
+  echo "$ac_t""$enable_c99" 1>&6
+
+  # Option parsed, now set things appropriately
+  if test x"$enable_c99" = x"yes"; then
+    cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_C99 1
+EOF
+
+  fi
+
+  ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+
+  
+  # Check whether --enable-long-long or --disable-long-long was given.
+if test "${enable_long_long+set}" = set; then
+  enableval="$enable_long_long"
+    case "$enableval" in
+   yes) enable_long_long=yes ;;
+   no)  enable_long_long=no ;;
+   *)   { echo "configure: error: Unknown argument to enable/disable long long" 1>&2; exit 1; } ;;
+   esac
+else
+  enable_long_long=yes
+fi
+
+  
+  ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+
+  echo $ac_n "checking for enabled long long I/O support""... $ac_c" 1>&6
+echo "configure:3812: checking for enabled long long I/O support" >&5
+  # iostreams require strtoll, strtoull to compile
+  cat > conftest.$ac_ext <
+int main() {
+char* tmp; strtoll("gnu", &tmp, 10);
+; return 0; }
+EOF
+if { (eval echo configure:3822: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  enable_long_long=no
+fi
+rm -f conftest*
+  cat > conftest.$ac_ext <
+int main() {
+char* tmp; strtoull("gnu", &tmp, 10);
+; return 0; }
+EOF
+if { (eval echo configure:3839: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  :
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  enable_long_long=no
+fi
+rm -f conftest*
+
+  # Option parsed, now set things appropriately
+  if test x"$enable_long_long" = xyes; then
+    cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_LONG_LONG 1
+EOF
+
+  fi
+  echo "$ac_t""$enable_long_long" 1>&6
+
+  ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+
+echo $ac_n "checking for c header strategy to use""... $ac_c" 1>&6
+echo "configure:3867: checking for c header strategy to use" >&5
+# Check whether --enable-cheaders or --disable-cheaders was given.
+if test "${enable_cheaders+set}" = set; then
+  enableval="$enable_cheaders"
+  
+  case "$enableval" in
+   c) 
+        enable_cheaders=c 
+        ;;
+   c_std)  
+        enable_cheaders=c_std 
+        ;;
+   c_shadow)  
+        enable_cheaders=c_shadow 
+        ;;
+   *)   { echo "configure: error: Unknown argument to enable/disable "C" headers" 1>&2; exit 1; } 
+        ;;
+  esac
+else
+  enable_cheaders=c_std
+fi
+
+  echo "$ac_t""$enable_cheaders" 1>&6
+
+    case "$enable_cheaders" in
+    c_shadow) 
+        CSHADOW_FLAGS="-fno-builtin"
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_shadow'
+        ;;
+    c_std)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c_std'
+        ;;
+    c)   
+        CSHADOW_FLAGS=""
+        C_INCLUDE_DIR='${glibcpp_srcdir}/include/c'
+        ;;
+  esac
+
+  
+  
+  
+
+if test "$enable_cheaders" = c; then
+  GLIBCPP_C_HEADERS_C_TRUE=
+  GLIBCPP_C_HEADERS_C_FALSE='#'
+else
+  GLIBCPP_C_HEADERS_C_TRUE='#'
+  GLIBCPP_C_HEADERS_C_FALSE=
+fi
+  
+
+if test "$enable_cheaders" = c_std; then
+  GLIBCPP_C_HEADERS_C_STD_TRUE=
+  GLIBCPP_C_HEADERS_C_STD_FALSE='#'
+else
+  GLIBCPP_C_HEADERS_C_STD_TRUE='#'
+  GLIBCPP_C_HEADERS_C_STD_FALSE=
+fi
+
+
+  echo $ac_n "checking for thread model used by GCC""... $ac_c" 1>&6
+echo "configure:3929: checking for thread model used by GCC" >&5
+  target_thread_file=`$CC -v 2>&1 | sed -n 's/^Thread model: //p'`
+  echo "$ac_t""$target_thread_file" 1>&6
+
+  if test $target_thread_file != single; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_GTHR_DEFAULT 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define _GLIBCPP_SUPPORTS_WEAK __GXX_WEAK__
+EOF
+
+  fi
+
+  glibcpp_thread_h=gthr-$target_thread_file.h
+  
+
+# Check whether --enable-cxx-flags or --disable-cxx-flags was given.
+if test "${enable_cxx_flags+set}" = set; then
+  enableval="$enable_cxx_flags"
+  case "x$enableval" in
+ xyes)   
+        { echo "configure: error: --enable-cxx-flags needs compiler flags as arguments" 1>&2; exit 1; } ;;
+ xno|x)  
+        enable_cxx_flags='' ;;
+ *)      
+        enable_cxx_flags="$enableval" ;;
+ esac
+else
+  enable_cxx_flags='none'
+fi
+
+
+if test "$enable_cxx_flags" = "none"; then 
+  enable_cxx_flags=''; 
+fi
+
+if test -n "$enable_cxx_flags"; then
+    for f in $enable_cxx_flags; do
+        case "$f" in
+            -fhonor-std)  ;;
+            -*)  ;;
+            *)   # and we're trying to pass /what/ exactly?
+                 { echo "configure: error: compiler flags start with a -" 1>&2; exit 1; } ;;
+        esac
+    done
+fi
+EXTRA_CXX_FLAGS="$enable_cxx_flags"
+
+
+
+  echo $ac_n "checking for exception model to use""... $ac_c" 1>&6
+echo "configure:3982: checking for exception model to use" >&5
+  
+  ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+  # Check whether --enable-sjlj-exceptions or --disable-sjlj-exceptions was given.
+if test "${enable_sjlj_exceptions+set}" = set; then
+  enableval="$enable_sjlj_exceptions"
+  :
+else
+                       cat > conftest.$ac_ext << EOF
+#line 3997 "configure"
+struct S { ~S(); };
+void bar();
+void foo()
+{
+  S s;
+  bar();
+}
+EOF
+   old_CXXFLAGS="$CXXFLAGS"  
+   CXXFLAGS="-S -fexceptions"
+   if { (eval echo configure:4008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+     if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=yes
+     elif grep _Unwind_Resume conftest.s >/dev/null 2>&1 ; then
+       enable_sjlj_exceptions=no
+     fi
+   fi
+   CXXFLAGS="$old_CXXFLAGS"
+   rm -f conftest*
+fi
+
+   if test x$enable_sjlj_exceptions = xyes; then
+     cat >> confdefs.h <<\EOF
+#define _GLIBCPP_SJLJ_EXCEPTIONS 1
+EOF
+
+     ac_exception_model_name=sjlj
+   elif test x$enable_sjlj_exceptions = xno; then
+     ac_exception_model_name="call frame"
+   else
+     { echo "configure: error: unable to detect exception model" 1>&2; exit 1; }
+   fi
+   ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+   echo "$ac_t""$ac_exception_model_name" 1>&6
+
+
+  echo $ac_n "checking for use of libunwind""... $ac_c" 1>&6
+echo "configure:4041: checking for use of libunwind" >&5
+  # Check whether --enable-libunwind-exceptions or --disable-libunwind-exceptions was given.
+if test "${enable_libunwind_exceptions+set}" = set; then
+  enableval="$enable_libunwind_exceptions"
+  use_libunwind_exceptions=$enableval
+else
+  use_libunwind_exceptions=no
+fi
+
+  echo "$ac_t""$use_libunwind_exceptions" 1>&6
+    if test x"$use_libunwind_exceptions" = xyes; then
+    LIBUNWIND_FLAG="-lunwind"
+  else
+    LIBUNWIND_FLAG=""
+  fi
+  
+
+# Check whether --enable-concept-checks or --disable-concept-checks was given.
+if test "${enable_concept_checks+set}" = set; then
+  enableval="$enable_concept_checks"
+  case "$enableval" in
+ yes) enable_concept_checks=yes ;;
+ no)  enable_concept_checks=no ;;
+ *)   { echo "configure: error: Unknown argument to enable/disable concept checks" 1>&2; exit 1; } ;;
+ esac
+else
+  enable_concept_checks=no
+fi
+if test x"$enable_concept_checks" = xyes; then
+  cat >> confdefs.h <<\EOF
+#define _GLIBCPP_CONCEPT_CHECKS 1
+EOF
+
+fi
+
+
+
+if test -n "$with_cross_host" || test x"$build" != x"$host"; then
+
+  # This lets us hard-code the functionality we know
+  # we'll have in the cross target environment. "Let" is a
+  # sugar-coated word placed on an especially dull and tedious hack, actually.
+  # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
+  # that involve linking can't be used:
+  # "cannot open sim-crt0.o"
+  # "cannot open crt0.o"
+  # etc. All this is because there currently exists no unified,
+  # consistent way for top level CC information to be passed down
+  # to target directories: newlib includes, newlib linking info,
+  # libgloss versus newlib crt0.o, etc. When all of this is done, all
+  # of this hokey, excessive AC_DEFINE junk for crosses can be removed.
+
+  # We are being configured with some form of cross compiler.
+  GLIBCPP_IS_CROSS_COMPILING=1
+
+  # If Canadian cross, then don't pick up tools from the build
+  # directory.
+  if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
+    CANADIAN=yes
+  else
+    CANADIAN=no
+  fi
+
+  # Construct crosses by hand, eliminating bits that need ld...
+  # GLIBCPP_CHECK_COMPILER_FEATURES
+  # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+  # GLIBCPP_CHECK_MATH_SUPPORT
+
+  case "$target_alias" in
+    *-linux*)
+      # Check for available headers.
+      for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
+	machine/endian.h machine/param.h sys/machine.h sys/types.h \
+	fp.h locale.h float.h inttypes.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4118: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4128: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      
+      
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
+echo "configure:4206: checking for ld that supports -Wl,--gc-sections" >&5
+    if test "$cross_compiling" = yes; then
+  ac_sectionLDflags=yes
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_sectionLDflags=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_sectionLDflags=no
+fi
+rm -fr conftest*
+fi
+
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    echo "$ac_t""$ac_sectionLDflags" 1>&6
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  
+  
+
+      
+    echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:4256: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <&6
+fi
+
+  for ac_func in nan copysignf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4301: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4329: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+    for ac_func in __signbit
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4358: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4386: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+  for ac_func in __signbitf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4414: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4442: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+          if test x$ac_cv_func_copysignl = x"yes"; then
+    for ac_func in __signbitl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4472: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4500: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+  fi
+
+  
+
+      
+
+      echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:4532: checking for mbstate_t" >&5
+  cat > conftest.$ac_ext <
+int main() {
+mbstate_t teststate;
+; return 0; }
+EOF
+if { (eval echo configure:4541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  have_mbstate_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  have_mbstate_t=no
+fi
+rm -f conftest*
+  echo "$ac_t""$have_mbstate_t" 1>&6
+  if test x"$have_mbstate_t" = xyes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+  fi
+
+    for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4563: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4573: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wchar_h=no
+fi
+done
+
+  for ac_hdr in wctype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:4604: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4614: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wctype_h=no
+fi
+done
+
+  
+    if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+            echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
+echo "configure:4647: checking for WCHAR_MIN and WCHAR_MAX" >&5
+    cat > conftest.$ac_ext <
+int main() {
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+; return 0; }
+EOF
+if { (eval echo configure:4656: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_wchar_minmax=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_wchar_minmax=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_wchar_minmax" 1>&6
+    
+            echo $ac_n "checking for WEOF""... $ac_c" 1>&6
+echo "configure:4669: checking for WEOF" >&5
+    cat > conftest.$ac_ext <
+      #include 
+int main() {
+wint_t i = WEOF;
+; return 0; }
+EOF
+if { (eval echo configure:4680: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_weof=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_weof=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_weof" 1>&6
+  
+        ac_wfuncs=yes
+    for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4696: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4724: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+  
+        for ac_func in btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4759: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4787: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+
+    echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
+echo "configure:4815: checking for ISO C99 wchar_t support" >&5
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
+  
+            ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
+echo "configure:4827: checking for iconv.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4837: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_iconv_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_iconv_h=no
+fi
+
+    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
+echo "configure:4861: checking for langinfo.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:4871: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_langinfo_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_langinfo_h=no
+fi
+
+
+        echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+echo "configure:4895: checking for iconv in -liconv" >&5
+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-liconv  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  libiconv="-liconv"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:4940: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:4968: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+ac_XPG2funcs=no
+fi
+done
+
+  
+    LIBS="$ac_save_LIBS"
+
+    echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
+echo "configure:4998: checking for XPG2 wchar_t support" >&5
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
+  
+            echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
+echo "configure:5009: checking for enabled wchar_t specializations" >&5
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_WCHAR_T 1
+EOF
+
+      echo "$ac_t"""yes"" 1>&6
+    else
+      echo "$ac_t"""no"" 1>&6
+    fi
+  else
+        echo "configure: warning: wchar_t support disabled." 1>&2
+  fi
+
+      os_include_dir="config/os/gnu-linux"
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGN 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGNF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FINITEF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FREXPF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_HYPOTF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SINCOS 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SINCOSF 1
+EOF
+
+      if test x"long_double_math_on_this_cpu" = x"yes"; then
+	cat >> confdefs.h <<\EOF
+#define HAVE_HYPOTL 1
+EOF
+
+      fi
+      ;;
+    *-hpux*)
+      # Check for available headers.
+      for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
+	machine/endian.h machine/param.h sys/machine.h sys/types.h \
+	fp.h locale.h float.h inttypes.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5068: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5078: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      
+      
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
+echo "configure:5156: checking for ld that supports -Wl,--gc-sections" >&5
+    if test "$cross_compiling" = yes; then
+  ac_sectionLDflags=yes
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_sectionLDflags=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_sectionLDflags=no
+fi
+rm -fr conftest*
+fi
+
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    echo "$ac_t""$ac_sectionLDflags" 1>&6
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  
+  
+
+      
+    echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:5206: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <&6
+fi
+
+  for ac_func in nan copysignf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5251: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5279: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+    for ac_func in __signbit
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5308: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+  for ac_func in __signbitf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5364: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5392: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+          if test x$ac_cv_func_copysignl = x"yes"; then
+    for ac_func in __signbitl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5422: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5450: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+  fi
+
+  
+
+      
+
+      echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:5482: checking for mbstate_t" >&5
+  cat > conftest.$ac_ext <
+int main() {
+mbstate_t teststate;
+; return 0; }
+EOF
+if { (eval echo configure:5491: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  have_mbstate_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  have_mbstate_t=no
+fi
+rm -f conftest*
+  echo "$ac_t""$have_mbstate_t" 1>&6
+  if test x"$have_mbstate_t" = xyes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+  fi
+
+    for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5513: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5523: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wchar_h=no
+fi
+done
+
+  for ac_hdr in wctype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:5554: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5564: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wctype_h=no
+fi
+done
+
+  
+    if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+            echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
+echo "configure:5597: checking for WCHAR_MIN and WCHAR_MAX" >&5
+    cat > conftest.$ac_ext <
+int main() {
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+; return 0; }
+EOF
+if { (eval echo configure:5606: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_wchar_minmax=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_wchar_minmax=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_wchar_minmax" 1>&6
+    
+            echo $ac_n "checking for WEOF""... $ac_c" 1>&6
+echo "configure:5619: checking for WEOF" >&5
+    cat > conftest.$ac_ext <
+      #include 
+int main() {
+wint_t i = WEOF;
+; return 0; }
+EOF
+if { (eval echo configure:5630: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_weof=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_weof=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_weof" 1>&6
+  
+        ac_wfuncs=yes
+    for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5646: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5674: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+  
+        for ac_func in btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5709: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5737: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+
+    echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
+echo "configure:5765: checking for ISO C99 wchar_t support" >&5
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
+  
+            ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
+echo "configure:5777: checking for iconv.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5787: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_iconv_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_iconv_h=no
+fi
+
+    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
+echo "configure:5811: checking for langinfo.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:5821: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_langinfo_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_langinfo_h=no
+fi
+
+
+        echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+echo "configure:5845: checking for iconv in -liconv" >&5
+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-liconv  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  libiconv="-liconv"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:5890: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:5918: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+ac_XPG2funcs=no
+fi
+done
+
+  
+    LIBS="$ac_save_LIBS"
+
+    echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
+echo "configure:5948: checking for XPG2 wchar_t support" >&5
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
+  
+            echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
+echo "configure:5959: checking for enabled wchar_t specializations" >&5
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_WCHAR_T 1
+EOF
+
+      echo "$ac_t"""yes"" 1>&6
+    else
+      echo "$ac_t"""no"" 1>&6
+    fi
+  else
+        echo "configure: warning: wchar_t support disabled." 1>&2
+  fi
+
+      os_include_dir="config/os/hpux"
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGN 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGNF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FINITEF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FREXPF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_HYPOT 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SINCOS 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SINCOSF 1
+EOF
+
+      ;;
+    *-netbsd*)
+      # Check for available headers.
+      for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h \
+	machine/endian.h machine/param.h sys/machine.h sys/types.h \
+	fp.h locale.h float.h inttypes.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6012: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6022: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+       
+      
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
+echo "configure:6100: checking for ld that supports -Wl,--gc-sections" >&5
+    if test "$cross_compiling" = yes; then
+  ac_sectionLDflags=yes
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_sectionLDflags=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_sectionLDflags=no
+fi
+rm -fr conftest*
+fi
+
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    echo "$ac_t""$ac_sectionLDflags" 1>&6
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  
+  
+
+      
+    echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:6150: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <&6
+fi
+
+  for ac_func in nan copysignf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6195: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6223: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+    for ac_func in __signbit
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6252: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6280: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+  for ac_func in __signbitf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6308: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6336: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+          if test x$ac_cv_func_copysignl = x"yes"; then
+    for ac_func in __signbitl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6366: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+  fi
+
+  
+
+      
+
+      echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:6426: checking for mbstate_t" >&5
+  cat > conftest.$ac_ext <
+int main() {
+mbstate_t teststate;
+; return 0; }
+EOF
+if { (eval echo configure:6435: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  have_mbstate_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  have_mbstate_t=no
+fi
+rm -f conftest*
+  echo "$ac_t""$have_mbstate_t" 1>&6
+  if test x"$have_mbstate_t" = xyes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+  fi
+
+    for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6457: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6467: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wchar_h=no
+fi
+done
+
+  for ac_hdr in wctype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6498: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6508: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wctype_h=no
+fi
+done
+
+  
+    if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+            echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
+echo "configure:6541: checking for WCHAR_MIN and WCHAR_MAX" >&5
+    cat > conftest.$ac_ext <
+int main() {
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+; return 0; }
+EOF
+if { (eval echo configure:6550: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_wchar_minmax=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_wchar_minmax=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_wchar_minmax" 1>&6
+    
+            echo $ac_n "checking for WEOF""... $ac_c" 1>&6
+echo "configure:6563: checking for WEOF" >&5
+    cat > conftest.$ac_ext <
+      #include 
+int main() {
+wint_t i = WEOF;
+; return 0; }
+EOF
+if { (eval echo configure:6574: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_weof=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_weof=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_weof" 1>&6
+  
+        ac_wfuncs=yes
+    for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6590: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6618: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+  
+        for ac_func in btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6653: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6681: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+
+    echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
+echo "configure:6709: checking for ISO C99 wchar_t support" >&5
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
+  
+            ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
+echo "configure:6721: checking for iconv.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6731: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_iconv_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_iconv_h=no
+fi
+
+    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
+echo "configure:6755: checking for langinfo.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6765: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_langinfo_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_langinfo_h=no
+fi
+
+
+        echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+echo "configure:6789: checking for iconv in -liconv" >&5
+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-liconv  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  libiconv="-liconv"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:6834: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:6862: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+ac_XPG2funcs=no
+fi
+done
+
+  
+    LIBS="$ac_save_LIBS"
+
+    echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
+echo "configure:6892: checking for XPG2 wchar_t support" >&5
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
+  
+            echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
+echo "configure:6903: checking for enabled wchar_t specializations" >&5
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_WCHAR_T 1
+EOF
+
+      echo "$ac_t"""yes"" 1>&6
+    else
+      echo "$ac_t"""no"" 1>&6
+    fi
+  else
+        echo "configure: warning: wchar_t support disabled." 1>&2
+  fi
+
+      os_include_dir="config/os/bsd/netbsd"
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGN 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGNF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FINITEF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FREXPF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_HYPOTF 1
+EOF
+
+      ;;
+    *-mingw32*)
+      for ac_hdr in sys/types.h locale.h float.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:6945: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:6955: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+      
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
+echo "configure:7031: checking for ld that supports -Wl,--gc-sections" >&5
+    if test "$cross_compiling" = yes; then
+  ac_sectionLDflags=yes
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_sectionLDflags=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_sectionLDflags=no
+fi
+rm -fr conftest*
+fi
+
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    echo "$ac_t""$ac_sectionLDflags" 1>&6
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  
+  
+
+      
+    echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:7081: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <&6
+fi
+
+  for ac_func in nan copysignf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7126: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7154: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+    for ac_func in __signbit
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7183: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7211: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+  for ac_func in __signbitf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7239: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7267: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+          if test x$ac_cv_func_copysignl = x"yes"; then
+    for ac_func in __signbitl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7297: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7325: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+  fi
+
+  
+
+      
+
+      echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:7357: checking for mbstate_t" >&5
+  cat > conftest.$ac_ext <
+int main() {
+mbstate_t teststate;
+; return 0; }
+EOF
+if { (eval echo configure:7366: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  have_mbstate_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  have_mbstate_t=no
+fi
+rm -f conftest*
+  echo "$ac_t""$have_mbstate_t" 1>&6
+  if test x"$have_mbstate_t" = xyes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+  fi
+
+    for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7388: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7398: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wchar_h=no
+fi
+done
+
+  for ac_hdr in wctype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:7429: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7439: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wctype_h=no
+fi
+done
+
+  
+    if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+            echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
+echo "configure:7472: checking for WCHAR_MIN and WCHAR_MAX" >&5
+    cat > conftest.$ac_ext <
+int main() {
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+; return 0; }
+EOF
+if { (eval echo configure:7481: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_wchar_minmax=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_wchar_minmax=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_wchar_minmax" 1>&6
+    
+            echo $ac_n "checking for WEOF""... $ac_c" 1>&6
+echo "configure:7494: checking for WEOF" >&5
+    cat > conftest.$ac_ext <
+      #include 
+int main() {
+wint_t i = WEOF;
+; return 0; }
+EOF
+if { (eval echo configure:7505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_weof=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_weof=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_weof" 1>&6
+  
+        ac_wfuncs=yes
+    for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7521: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7549: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+  
+        for ac_func in btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7584: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7612: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+
+    echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
+echo "configure:7640: checking for ISO C99 wchar_t support" >&5
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
+  
+            ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
+echo "configure:7652: checking for iconv.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7662: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_iconv_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_iconv_h=no
+fi
+
+    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
+echo "configure:7686: checking for langinfo.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:7696: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_langinfo_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_langinfo_h=no
+fi
+
+
+        echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+echo "configure:7720: checking for iconv in -liconv" >&5
+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-liconv  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  libiconv="-liconv"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:7765: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:7793: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+ac_XPG2funcs=no
+fi
+done
+
+  
+    LIBS="$ac_save_LIBS"
+
+    echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
+echo "configure:7823: checking for XPG2 wchar_t support" >&5
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
+  
+            echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
+echo "configure:7834: checking for enabled wchar_t specializations" >&5
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_WCHAR_T 1
+EOF
+
+      echo "$ac_t"""yes"" 1>&6
+    else
+      echo "$ac_t"""no"" 1>&6
+    fi
+  else
+        echo "configure: warning: wchar_t support disabled." 1>&2
+  fi
+
+      os_include_dir="config/os/mingw32"
+      ;;
+    *)
+      os_include_dir="config/os/newlib"
+      cat >> confdefs.h <<\EOF
+#define HAVE_HYPOT 1
+EOF
+
+      ;;
+  esac
+
+  case "$target_alias" in
+    *-mingw32*)
+      ;;
+    *)
+      # GLIBCPP_CHECK_STDLIB_SUPPORT
+      cat >> confdefs.h <<\EOF
+#define HAVE_STRTOF 1
+EOF
+        
+      cat >> confdefs.h <<\EOF
+#define HAVE_STRTOLD 1
+EOF
+        
+      # AC_FUNC_MMAP
+      cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ACOSF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ASINF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ATAN2F 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ATANF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_CEILF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGN 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGNF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COSF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_COSHF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_EXPF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FABSF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FINITE 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FINITEF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FLOORF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FMODF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_FREXPF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ISINF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ISINFF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ISNAN 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_ISNANF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_LDEXPF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_LOG10F 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_LOGF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_MODFF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_POWF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SINF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SINHF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_SQRTF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_TANF 1
+EOF
+
+      cat >> confdefs.h <<\EOF
+#define HAVE_TANHF 1
+EOF
+
+      ;;
+  esac
+
+  # At some point, we should differentiate between architectures
+  # like x86, which have long double versions, and alpha/powerpc/etc.,
+  # which don't. For the time being, punt.
+  if test x"long_double_math_on_this_cpu" = x"yes"; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_ACOSL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_ASINL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_ATAN2L 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_ATANL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_CEILL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_COPYSIGNL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_COSL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_COSHL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_EXPL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_FABSL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_FINITEL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_FLOORL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_FMODL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_FREXPL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_ISINFL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_ISNANL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_LDEXPL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_LOG10L 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_LOGL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_MODFL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_POWL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_SINCOSL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_SINL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_SINHL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_SQRTL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_TANL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE_TANHL 1
+EOF
+
+  fi
+else
+
+  # We are being configured natively. We can do more elaborate tests
+  # that include AC_TRY_COMPILE now, as the linker is assumed to be
+  # working.
+  GLIBCPP_IS_CROSS_COMPILING=0
+  CANADIAN=no
+
+  # Check for available headers.
+  for ac_hdr in nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+  machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:8129: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:8139: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+
+  
+  # All these tests are for C++; save the language and the compiler flags.
+  # The CXXFLAGS thing is suspicious, but based on similar bits previously
+  # found in GLIBCPP_CONFIGURE.
+  
+  ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+
+  # Check for maintainer-mode bits.
+  if test x"$USE_MAINTAINER_MODE" = xno; then
+    WERROR=''
+  else
+    WERROR='-Werror'
+  fi
+
+  # Check for -ffunction-sections -fdata-sections
+  echo $ac_n "checking for g++ that supports -ffunction-sections -fdata-sections""... $ac_c" 1>&6
+echo "configure:8190: checking for g++ that supports -ffunction-sections -fdata-sections" >&5
+  CXXFLAGS='-Werror -ffunction-sections -fdata-sections'
+  cat > conftest.$ac_ext <&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_fdsections=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_fdsections=no
+fi
+rm -f conftest*
+  if test "$ac_test_CXXFLAGS" = set; then
+    CXXFLAGS="$ac_save_CXXFLAGS"
+  else
+    # this is the suspicious part
+    CXXFLAGS=''
+  fi
+  if test x"$ac_fdsections" = x"yes" &&
+     test x"$enable_debug" = x"no"; then
+    SECTION_FLAGS='-ffunction-sections -fdata-sections'
+  fi
+  echo "$ac_t""$ac_fdsections" 1>&6
+
+  ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+  
+  
+
+  
+  # If we're not using GNU ld, then there's no point in even trying these
+  # tests.  Check for that first.  We should have already tested for gld
+  # by now (in libtool), but require it now just to be safe...
+  test -z "$SECTION_LDFLAGS" && SECTION_LDFLAGS=''
+  test -z "$OPT_LDFLAGS" && OPT_LDFLAGS=''
+  
+
+  # The name set by libtool depends on the version of libtool.  Shame on us
+  # for depending on an impl detail, but c'est la vie.  Older versions used
+  # ac_cv_prog_gnu_ld, but now it's lt_cv_prog_gnu_ld, and is copied back on
+  # top of with_gnu_ld (which is also set by --with-gnu-ld, so that actually
+  # makes sense).  We'll test with_gnu_ld everywhere else, so if that isn't
+  # set (hence we're using an older libtool), then set it.
+  if test x${with_gnu_ld+set} != xset; then
+    if test x${ac_cv_prog_gnu_ld+set} != xset; then
+      # We got through "ac_require(ac_prog_ld)" and still not set?  Huh?
+      with_gnu_ld=no
+    else
+      with_gnu_ld=$ac_cv_prog_gnu_ld
+    fi
+  fi
+
+  # Start by getting the version number.  I think the libtool test already
+  # does some of this, but throws away the result.
+  
+  ldver=`$LD --version 2>/dev/null | head -1 | \
+         sed -e 's/GNU ld version \([0-9.][0-9.]*\).*/\1/'`
+  
+  glibcpp_gnu_ld_version=`echo $ldver | \
+         $AWK -F. '{ if (NF<3) $3=0; print ($1*100+$2)*100+$3 }'`
+
+  # Set --gc-sections.
+  if test "$with_gnu_ld" = "notbroken"; then
+    # GNU ld it is!  Joy and bunny rabbits!
+
+    # All these tests are for C++; save the language and the compiler flags.
+    # Need to do this so that g++ won't try to link in libstdc++
+    ac_test_CFLAGS="${CFLAGS+set}"
+    ac_save_CFLAGS="$CFLAGS"
+    CFLAGS='-x c++  -Wl,--gc-sections'
+
+    # Check for -Wl,--gc-sections
+    # XXX This test is broken at the moment, as symbols required for
+    # linking are now in libsupc++ (not built yet.....). In addition, 
+    # this test has cored on solaris in the past. In addition,
+    # --gc-sections doesn't really work at the moment (keeps on discarding
+    # used sections, first .eh_frame and now some of the glibc sections for
+    # iconv). Bzzzzt. Thanks for playing, maybe next time.
+    echo $ac_n "checking for ld that supports -Wl,--gc-sections""... $ac_c" 1>&6
+echo "configure:8283: checking for ld that supports -Wl,--gc-sections" >&5
+    if test "$cross_compiling" = yes; then
+  ac_sectionLDflags=yes
+else
+  cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_sectionLDflags=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_sectionLDflags=no
+fi
+rm -fr conftest*
+fi
+
+    if test "$ac_test_CFLAGS" = set; then
+      CFLAGS="$ac_save_CFLAGS"
+    else
+      # this is the suspicious part
+      CFLAGS=''
+    fi
+    if test "$ac_sectionLDflags" = "yes"; then
+      SECTION_LDFLAGS="-Wl,--gc-sections $SECTION_LDFLAGS"
+    fi
+    echo "$ac_t""$ac_sectionLDflags" 1>&6
+  fi
+
+  # Set linker optimization flags.
+  if test x"$with_gnu_ld" = x"yes" && test x"$enable_debug" = x"no"; then
+    OPT_LDFLAGS="-Wl,-O1 $OPT_LDFLAGS"
+  fi
+
+  
+  
+
+  
+      
+  echo $ac_n "checking for __builtin_abs declaration""... $ac_c" 1>&6
+echo "configure:8334: checking for __builtin_abs declaration" >&5
+  if test x${glibcpp_cv_func___builtin_abs_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_abs_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_abs(0);
+; return 0; }
+EOF
+if { (eval echo configure:8356: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_abs_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_abs_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_abs_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_abs_use = x"yes"; then
+    echo $ac_n "checking for __builtin_abs linkage""... $ac_c" 1>&6
+echo "configure:8380: checking for __builtin_abs linkage" >&5
+    if test x${glibcpp_cv_func___builtin_abs_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_abs_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_abs(0);
+; return 0; }
+EOF
+if { (eval echo configure:8394: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_abs_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_abs_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_abs_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_abs_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_abs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8420: checking for __builtin_fabsf declaration" >&5
+  if test x${glibcpp_cv_func___builtin_fabsf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_fabsf(0);
+; return 0; }
+EOF
+if { (eval echo configure:8442: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_fabsf_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_fabsf_use = x"yes"; then
+    echo $ac_n "checking for __builtin_fabsf linkage""... $ac_c" 1>&6
+echo "configure:8466: checking for __builtin_fabsf linkage" >&5
+    if test x${glibcpp_cv_func___builtin_fabsf_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsf_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_fabsf(0);
+; return 0; }
+EOF
+if { (eval echo configure:8480: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsf_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsf_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_fabsf_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_fabsf_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_fabsf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8506: checking for __builtin_fabs declaration" >&5
+  if test x${glibcpp_cv_func___builtin_fabs_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabs_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_fabs(0);
+; return 0; }
+EOF
+if { (eval echo configure:8528: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabs_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabs_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_fabs_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_fabs_use = x"yes"; then
+    echo $ac_n "checking for __builtin_fabs linkage""... $ac_c" 1>&6
+echo "configure:8552: checking for __builtin_fabs linkage" >&5
+    if test x${glibcpp_cv_func___builtin_fabs_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabs_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_fabs(0);
+; return 0; }
+EOF
+if { (eval echo configure:8566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabs_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabs_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_fabs_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_fabs_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_fabs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8592: checking for __builtin_fabsl declaration" >&5
+  if test x${glibcpp_cv_func___builtin_fabsl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_fabsl(0);
+; return 0; }
+EOF
+if { (eval echo configure:8614: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_fabsl_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_fabsl_use = x"yes"; then
+    echo $ac_n "checking for __builtin_fabsl linkage""... $ac_c" 1>&6
+echo "configure:8638: checking for __builtin_fabsl linkage" >&5
+    if test x${glibcpp_cv_func___builtin_fabsl_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_fabsl_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_fabsl(0);
+; return 0; }
+EOF
+if { (eval echo configure:8652: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsl_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_fabsl_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_fabsl_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_fabsl_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_fabsl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8678: checking for __builtin_labs declaration" >&5
+  if test x${glibcpp_cv_func___builtin_labs_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_labs_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_labs(0);
+; return 0; }
+EOF
+if { (eval echo configure:8700: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_labs_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_labs_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_labs_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_labs_use = x"yes"; then
+    echo $ac_n "checking for __builtin_labs linkage""... $ac_c" 1>&6
+echo "configure:8724: checking for __builtin_labs linkage" >&5
+    if test x${glibcpp_cv_func___builtin_labs_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_labs_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_labs(0);
+; return 0; }
+EOF
+if { (eval echo configure:8738: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_labs_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_labs_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_labs_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_labs_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_labs | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8765: checking for __builtin_sqrtf declaration" >&5
+  if test x${glibcpp_cv_func___builtin_sqrtf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_sqrtf(0);
+; return 0; }
+EOF
+if { (eval echo configure:8787: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_sqrtf_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_sqrtf_use = x"yes"; then
+    echo $ac_n "checking for __builtin_sqrtf linkage""... $ac_c" 1>&6
+echo "configure:8811: checking for __builtin_sqrtf linkage" >&5
+    if test x${glibcpp_cv_func___builtin_sqrtf_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtf_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_sqrtf(0);
+; return 0; }
+EOF
+if { (eval echo configure:8825: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtf_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtf_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_sqrtf_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_sqrtf_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_sqrtf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8851: checking for __builtin_sqrt declaration" >&5
+  if test x${glibcpp_cv_func___builtin_sqrt_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrt_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_sqrt(0);
+; return 0; }
+EOF
+if { (eval echo configure:8873: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrt_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrt_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_sqrt_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_sqrt_use = x"yes"; then
+    echo $ac_n "checking for __builtin_sqrt linkage""... $ac_c" 1>&6
+echo "configure:8897: checking for __builtin_sqrt linkage" >&5
+    if test x${glibcpp_cv_func___builtin_sqrt_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrt_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_sqrt(0);
+; return 0; }
+EOF
+if { (eval echo configure:8911: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrt_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrt_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_sqrt_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_sqrt_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_sqrt | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:8937: checking for __builtin_sqrtl declaration" >&5
+  if test x${glibcpp_cv_func___builtin_sqrtl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_sqrtl(0);
+; return 0; }
+EOF
+if { (eval echo configure:8959: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_sqrtl_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_sqrtl_use = x"yes"; then
+    echo $ac_n "checking for __builtin_sqrtl linkage""... $ac_c" 1>&6
+echo "configure:8983: checking for __builtin_sqrtl linkage" >&5
+    if test x${glibcpp_cv_func___builtin_sqrtl_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sqrtl_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_sqrtl(0);
+; return 0; }
+EOF
+if { (eval echo configure:8997: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtl_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sqrtl_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_sqrtl_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_sqrtl_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_sqrtl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:9024: checking for __builtin_sinf declaration" >&5
+  if test x${glibcpp_cv_func___builtin_sinf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_sinf(0);
+; return 0; }
+EOF
+if { (eval echo configure:9046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_sinf_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_sinf_use = x"yes"; then
+    echo $ac_n "checking for __builtin_sinf linkage""... $ac_c" 1>&6
+echo "configure:9070: checking for __builtin_sinf linkage" >&5
+    if test x${glibcpp_cv_func___builtin_sinf_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinf_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_sinf(0);
+; return 0; }
+EOF
+if { (eval echo configure:9084: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinf_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinf_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_sinf_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_sinf_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_sinf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:9110: checking for __builtin_sin declaration" >&5
+  if test x${glibcpp_cv_func___builtin_sin_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sin_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_sin(0);
+; return 0; }
+EOF
+if { (eval echo configure:9132: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sin_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sin_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_sin_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_sin_use = x"yes"; then
+    echo $ac_n "checking for __builtin_sin linkage""... $ac_c" 1>&6
+echo "configure:9156: checking for __builtin_sin linkage" >&5
+    if test x${glibcpp_cv_func___builtin_sin_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sin_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_sin(0);
+; return 0; }
+EOF
+if { (eval echo configure:9170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sin_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sin_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_sin_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_sin_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_sin | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:9196: checking for __builtin_sinl declaration" >&5
+  if test x${glibcpp_cv_func___builtin_sinl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_sinl(0);
+; return 0; }
+EOF
+if { (eval echo configure:9218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_sinl_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_sinl_use = x"yes"; then
+    echo $ac_n "checking for __builtin_sinl linkage""... $ac_c" 1>&6
+echo "configure:9242: checking for __builtin_sinl linkage" >&5
+    if test x${glibcpp_cv_func___builtin_sinl_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_sinl_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_sinl(0);
+; return 0; }
+EOF
+if { (eval echo configure:9256: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinl_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_sinl_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_sinl_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_sinl_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_sinl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:9283: checking for __builtin_cosf declaration" >&5
+  if test x${glibcpp_cv_func___builtin_cosf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_cosf(0);
+; return 0; }
+EOF
+if { (eval echo configure:9305: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_cosf_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_cosf_use = x"yes"; then
+    echo $ac_n "checking for __builtin_cosf linkage""... $ac_c" 1>&6
+echo "configure:9329: checking for __builtin_cosf linkage" >&5
+    if test x${glibcpp_cv_func___builtin_cosf_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosf_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_cosf(0);
+; return 0; }
+EOF
+if { (eval echo configure:9343: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosf_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosf_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_cosf_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_cosf_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_cosf | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:9369: checking for __builtin_cos declaration" >&5
+  if test x${glibcpp_cv_func___builtin_cos_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cos_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_cos(0);
+; return 0; }
+EOF
+if { (eval echo configure:9391: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cos_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cos_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_cos_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_cos_use = x"yes"; then
+    echo $ac_n "checking for __builtin_cos linkage""... $ac_c" 1>&6
+echo "configure:9415: checking for __builtin_cos linkage" >&5
+    if test x${glibcpp_cv_func___builtin_cos_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cos_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_cos(0);
+; return 0; }
+EOF
+if { (eval echo configure:9429: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cos_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cos_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_cos_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_cos_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_cos | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <&6
+echo "configure:9455: checking for __builtin_cosl declaration" >&5
+  if test x${glibcpp_cv_func___builtin_cosl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ __builtin_cosl(0);
+; return 0; }
+EOF
+if { (eval echo configure:9477: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func___builtin_cosl_use" 1>&6
+  if test x$glibcpp_cv_func___builtin_cosl_use = x"yes"; then
+    echo $ac_n "checking for __builtin_cosl linkage""... $ac_c" 1>&6
+echo "configure:9501: checking for __builtin_cosl linkage" >&5
+    if test x${glibcpp_cv_func___builtin_cosl_link+set} != xset; then
+      if eval "test \"`echo '$''{'glibcpp_cv_func___builtin_cosl_link'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+        cat > conftest.$ac_ext <
+int main() {
+ __builtin_cosl(0);
+; return 0; }
+EOF
+if { (eval echo configure:9515: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosl_link=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func___builtin_cosl_link=no
+fi
+rm -f conftest*
+      
+fi
+
+    fi
+    echo "$ac_t""$glibcpp_cv_func___builtin_cosl_link" 1>&6
+    if test x$glibcpp_cv_func___builtin_cosl_link = x"yes"; then
+      ac_tr_func=HAVE_`echo __builtin_cosl | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+      cat >> confdefs.h <> confdefs.h <<\EOF
+#define HAVE___BUILTIN_ABS 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_LABS 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_COS 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_COSF 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_COSL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_FABS 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_FABSF 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_FABSL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_SIN 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_SINF 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_SINL 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_SQRT 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_SQRTF 1
+EOF
+
+    cat >> confdefs.h <<\EOF
+#define HAVE___BUILTIN_SQRTL 1
+EOF
+
+  fi
+
+  
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+    echo $ac_n "checking for sin in -lm""... $ac_c" 1>&6
+echo "configure:9606: checking for sin in -lm" >&5
+ac_lib_var=`echo m'_'sin | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  libm="-lm"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+  ac_save_LIBS="$LIBS"
+  LIBS="$LIBS $libm"
+
+    
+  
+  echo $ac_n "checking for isinf declaration""... $ac_c" 1>&6
+echo "configure:9651: checking for isinf declaration" >&5
+  if test x${glibcpp_cv_func_isinf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_isinf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ isinf(0);
+; return 0; }
+EOF
+if { (eval echo configure:9677: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_isinf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_isinf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_isinf_use" 1>&6
+
+  if test x$glibcpp_cv_func_isinf_use = x"yes"; then
+    for ac_func in isinf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:9704: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:9732: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _isinf declaration""... $ac_c" 1>&6
+echo "configure:9759: checking for _isinf declaration" >&5
+  if test x${glibcpp_cv_func__isinf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__isinf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _isinf(0);
+; return 0; }
+EOF
+if { (eval echo configure:9785: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__isinf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__isinf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__isinf_use" 1>&6
+
+    if test x$glibcpp_cv_func__isinf_use = x"yes"; then
+      for ac_func in _isinf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:9812: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:9840: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for isnan declaration""... $ac_c" 1>&6
+echo "configure:9870: checking for isnan declaration" >&5
+  if test x${glibcpp_cv_func_isnan_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_isnan_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ isnan(0);
+; return 0; }
+EOF
+if { (eval echo configure:9896: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_isnan_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_isnan_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_isnan_use" 1>&6
+
+  if test x$glibcpp_cv_func_isnan_use = x"yes"; then
+    for ac_func in isnan
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:9923: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:9951: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _isnan declaration""... $ac_c" 1>&6
+echo "configure:9978: checking for _isnan declaration" >&5
+  if test x${glibcpp_cv_func__isnan_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__isnan_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _isnan(0);
+; return 0; }
+EOF
+if { (eval echo configure:10004: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__isnan_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__isnan_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__isnan_use" 1>&6
+
+    if test x$glibcpp_cv_func__isnan_use = x"yes"; then
+      for ac_func in _isnan
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10031: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10059: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for finite declaration""... $ac_c" 1>&6
+echo "configure:10089: checking for finite declaration" >&5
+  if test x${glibcpp_cv_func_finite_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_finite_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ finite(0);
+; return 0; }
+EOF
+if { (eval echo configure:10115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_finite_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_finite_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_finite_use" 1>&6
+
+  if test x$glibcpp_cv_func_finite_use = x"yes"; then
+    for ac_func in finite
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10142: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10170: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _finite declaration""... $ac_c" 1>&6
+echo "configure:10197: checking for _finite declaration" >&5
+  if test x${glibcpp_cv_func__finite_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__finite_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _finite(0);
+; return 0; }
+EOF
+if { (eval echo configure:10223: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__finite_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__finite_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__finite_use" 1>&6
+
+    if test x$glibcpp_cv_func__finite_use = x"yes"; then
+      for ac_func in _finite
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10250: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10278: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for copysign declaration""... $ac_c" 1>&6
+echo "configure:10308: checking for copysign declaration" >&5
+  if test x${glibcpp_cv_func_copysign_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_copysign_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ copysign(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:10330: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_copysign_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_copysign_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_copysign_use" 1>&6
+
+  if test x$glibcpp_cv_func_copysign_use = x"yes"; then
+    for ac_func in copysign
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10357: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10385: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _copysign declaration""... $ac_c" 1>&6
+echo "configure:10412: checking for _copysign declaration" >&5
+  if test x${glibcpp_cv_func__copysign_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__copysign_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _copysign(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:10434: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__copysign_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__copysign_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__copysign_use" 1>&6
+
+    if test x$glibcpp_cv_func__copysign_use = x"yes"; then
+      for ac_func in _copysign
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10461: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10489: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for sincos declaration""... $ac_c" 1>&6
+echo "configure:10519: checking for sincos declaration" >&5
+  if test x${glibcpp_cv_func_sincos_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_sincos_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ sincos(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:10541: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_sincos_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_sincos_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_sincos_use" 1>&6
+
+  if test x$glibcpp_cv_func_sincos_use = x"yes"; then
+    for ac_func in sincos
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10568: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10596: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _sincos declaration""... $ac_c" 1>&6
+echo "configure:10623: checking for _sincos declaration" >&5
+  if test x${glibcpp_cv_func__sincos_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__sincos_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _sincos(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:10645: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__sincos_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__sincos_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__sincos_use" 1>&6
+
+    if test x$glibcpp_cv_func__sincos_use = x"yes"; then
+      for ac_func in _sincos
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10672: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10700: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for fpclass declaration""... $ac_c" 1>&6
+echo "configure:10730: checking for fpclass declaration" >&5
+  if test x${glibcpp_cv_func_fpclass_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_fpclass_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ fpclass(0);
+; return 0; }
+EOF
+if { (eval echo configure:10756: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_fpclass_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_fpclass_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_fpclass_use" 1>&6
+
+  if test x$glibcpp_cv_func_fpclass_use = x"yes"; then
+    for ac_func in fpclass
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10783: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10811: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _fpclass declaration""... $ac_c" 1>&6
+echo "configure:10838: checking for _fpclass declaration" >&5
+  if test x${glibcpp_cv_func__fpclass_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__fpclass_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _fpclass(0);
+; return 0; }
+EOF
+if { (eval echo configure:10864: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__fpclass_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__fpclass_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__fpclass_use" 1>&6
+
+    if test x$glibcpp_cv_func__fpclass_use = x"yes"; then
+      for ac_func in _fpclass
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:10891: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:10919: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for qfpclass declaration""... $ac_c" 1>&6
+echo "configure:10949: checking for qfpclass declaration" >&5
+  if test x${glibcpp_cv_func_qfpclass_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_qfpclass_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ qfpclass(0);
+; return 0; }
+EOF
+if { (eval echo configure:10975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_qfpclass_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_qfpclass_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_qfpclass_use" 1>&6
+
+  if test x$glibcpp_cv_func_qfpclass_use = x"yes"; then
+    for ac_func in qfpclass
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11002: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _qfpclass declaration""... $ac_c" 1>&6
+echo "configure:11057: checking for _qfpclass declaration" >&5
+  if test x${glibcpp_cv_func__qfpclass_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__qfpclass_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _qfpclass(0);
+; return 0; }
+EOF
+if { (eval echo configure:11083: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__qfpclass_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__qfpclass_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__qfpclass_use" 1>&6
+
+    if test x$glibcpp_cv_func__qfpclass_use = x"yes"; then
+      for ac_func in _qfpclass
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11110: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11138: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for hypot declaration""... $ac_c" 1>&6
+echo "configure:11168: checking for hypot declaration" >&5
+  if test x${glibcpp_cv_func_hypot_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_hypot_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ hypot(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:11190: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_hypot_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_hypot_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_hypot_use" 1>&6
+
+  if test x$glibcpp_cv_func_hypot_use = x"yes"; then
+    for ac_func in hypot
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11217: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11245: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _hypot declaration""... $ac_c" 1>&6
+echo "configure:11272: checking for _hypot declaration" >&5
+  if test x${glibcpp_cv_func__hypot_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__hypot_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _hypot(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:11294: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__hypot_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__hypot_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__hypot_use" 1>&6
+
+    if test x$glibcpp_cv_func__hypot_use = x"yes"; then
+      for ac_func in _hypot
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11321: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11349: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+
+    
+  echo $ac_n "checking for float trig functions""... $ac_c" 1>&6
+echo "configure:11379: checking for float trig functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func_float_trig_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in acosf asinf atanf \
+                                          cosf sinf tanf \
+                                          coshf sinhf tanhf; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:11402: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_float_trig_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_float_trig_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func_float_trig_use" 1>&6
+  if test x$glibcpp_cv_func_float_trig_use = x"yes"; then
+    for ac_func in acosf asinf atanf \
+                                          cosf sinf tanf \
+                                          coshf sinhf tanhf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11428: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+  
+  echo $ac_n "checking for float round functions""... $ac_c" 1>&6
+echo "configure:11484: checking for float round functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func_float_round_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in ceilf floorf; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:11505: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_float_round_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_float_round_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func_float_round_use" 1>&6
+  if test x$glibcpp_cv_func_float_round_use = x"yes"; then
+    for ac_func in ceilf floorf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11529: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11557: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+  
+  
+  echo $ac_n "checking for expf declaration""... $ac_c" 1>&6
+echo "configure:11586: checking for expf declaration" >&5
+  if test x${glibcpp_cv_func_expf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_expf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ expf(0);
+; return 0; }
+EOF
+if { (eval echo configure:11612: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_expf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_expf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_expf_use" 1>&6
+
+  if test x$glibcpp_cv_func_expf_use = x"yes"; then
+    for ac_func in expf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11639: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11667: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _expf declaration""... $ac_c" 1>&6
+echo "configure:11694: checking for _expf declaration" >&5
+  if test x${glibcpp_cv_func__expf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__expf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _expf(0);
+; return 0; }
+EOF
+if { (eval echo configure:11720: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__expf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__expf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__expf_use" 1>&6
+
+    if test x$glibcpp_cv_func__expf_use = x"yes"; then
+      for ac_func in _expf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11747: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11775: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for isnanf declaration""... $ac_c" 1>&6
+echo "configure:11805: checking for isnanf declaration" >&5
+  if test x${glibcpp_cv_func_isnanf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_isnanf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ isnanf(0);
+; return 0; }
+EOF
+if { (eval echo configure:11831: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_isnanf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_isnanf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_isnanf_use" 1>&6
+
+  if test x$glibcpp_cv_func_isnanf_use = x"yes"; then
+    for ac_func in isnanf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11858: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11886: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _isnanf declaration""... $ac_c" 1>&6
+echo "configure:11913: checking for _isnanf declaration" >&5
+  if test x${glibcpp_cv_func__isnanf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__isnanf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _isnanf(0);
+; return 0; }
+EOF
+if { (eval echo configure:11939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__isnanf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__isnanf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__isnanf_use" 1>&6
+
+    if test x$glibcpp_cv_func__isnanf_use = x"yes"; then
+      for ac_func in _isnanf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:11966: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:11994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for isinff declaration""... $ac_c" 1>&6
+echo "configure:12024: checking for isinff declaration" >&5
+  if test x${glibcpp_cv_func_isinff_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_isinff_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ isinff(0);
+; return 0; }
+EOF
+if { (eval echo configure:12050: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_isinff_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_isinff_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_isinff_use" 1>&6
+
+  if test x$glibcpp_cv_func_isinff_use = x"yes"; then
+    for ac_func in isinff
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12077: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12105: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _isinff declaration""... $ac_c" 1>&6
+echo "configure:12132: checking for _isinff declaration" >&5
+  if test x${glibcpp_cv_func__isinff_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__isinff_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _isinff(0);
+; return 0; }
+EOF
+if { (eval echo configure:12158: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__isinff_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__isinff_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__isinff_use" 1>&6
+
+    if test x$glibcpp_cv_func__isinff_use = x"yes"; then
+      for ac_func in _isinff
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12185: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12213: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for atan2f declaration""... $ac_c" 1>&6
+echo "configure:12243: checking for atan2f declaration" >&5
+  if test x${glibcpp_cv_func_atan2f_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_atan2f_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ atan2f(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:12265: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_atan2f_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_atan2f_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_atan2f_use" 1>&6
+
+  if test x$glibcpp_cv_func_atan2f_use = x"yes"; then
+    for ac_func in atan2f
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12292: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12320: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _atan2f declaration""... $ac_c" 1>&6
+echo "configure:12347: checking for _atan2f declaration" >&5
+  if test x${glibcpp_cv_func__atan2f_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__atan2f_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _atan2f(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:12369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__atan2f_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__atan2f_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__atan2f_use" 1>&6
+
+    if test x$glibcpp_cv_func__atan2f_use = x"yes"; then
+      for ac_func in _atan2f
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12396: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for fabsf declaration""... $ac_c" 1>&6
+echo "configure:12454: checking for fabsf declaration" >&5
+  if test x${glibcpp_cv_func_fabsf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_fabsf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ fabsf(0);
+; return 0; }
+EOF
+if { (eval echo configure:12480: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_fabsf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_fabsf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_fabsf_use" 1>&6
+
+  if test x$glibcpp_cv_func_fabsf_use = x"yes"; then
+    for ac_func in fabsf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12507: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12535: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _fabsf declaration""... $ac_c" 1>&6
+echo "configure:12562: checking for _fabsf declaration" >&5
+  if test x${glibcpp_cv_func__fabsf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__fabsf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _fabsf(0);
+; return 0; }
+EOF
+if { (eval echo configure:12588: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__fabsf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__fabsf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__fabsf_use" 1>&6
+
+    if test x$glibcpp_cv_func__fabsf_use = x"yes"; then
+      for ac_func in _fabsf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12615: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12643: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for fmodf declaration""... $ac_c" 1>&6
+echo "configure:12673: checking for fmodf declaration" >&5
+  if test x${glibcpp_cv_func_fmodf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_fmodf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ fmodf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:12695: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_fmodf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_fmodf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_fmodf_use" 1>&6
+
+  if test x$glibcpp_cv_func_fmodf_use = x"yes"; then
+    for ac_func in fmodf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12722: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12750: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _fmodf declaration""... $ac_c" 1>&6
+echo "configure:12777: checking for _fmodf declaration" >&5
+  if test x${glibcpp_cv_func__fmodf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__fmodf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _fmodf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:12799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__fmodf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__fmodf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__fmodf_use" 1>&6
+
+    if test x$glibcpp_cv_func__fmodf_use = x"yes"; then
+      for ac_func in _fmodf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12826: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for frexpf declaration""... $ac_c" 1>&6
+echo "configure:12884: checking for frexpf declaration" >&5
+  if test x${glibcpp_cv_func_frexpf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_frexpf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ frexpf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:12906: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_frexpf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_frexpf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_frexpf_use" 1>&6
+
+  if test x$glibcpp_cv_func_frexpf_use = x"yes"; then
+    for ac_func in frexpf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:12933: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:12961: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _frexpf declaration""... $ac_c" 1>&6
+echo "configure:12988: checking for _frexpf declaration" >&5
+  if test x${glibcpp_cv_func__frexpf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__frexpf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _frexpf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:13010: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__frexpf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__frexpf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__frexpf_use" 1>&6
+
+    if test x$glibcpp_cv_func__frexpf_use = x"yes"; then
+      for ac_func in _frexpf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13037: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13065: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for hypotf declaration""... $ac_c" 1>&6
+echo "configure:13095: checking for hypotf declaration" >&5
+  if test x${glibcpp_cv_func_hypotf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_hypotf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ hypotf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:13117: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_hypotf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_hypotf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_hypotf_use" 1>&6
+
+  if test x$glibcpp_cv_func_hypotf_use = x"yes"; then
+    for ac_func in hypotf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13144: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13172: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _hypotf declaration""... $ac_c" 1>&6
+echo "configure:13199: checking for _hypotf declaration" >&5
+  if test x${glibcpp_cv_func__hypotf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__hypotf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _hypotf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:13221: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__hypotf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__hypotf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__hypotf_use" 1>&6
+
+    if test x$glibcpp_cv_func__hypotf_use = x"yes"; then
+      for ac_func in _hypotf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13248: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13276: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for ldexpf declaration""... $ac_c" 1>&6
+echo "configure:13306: checking for ldexpf declaration" >&5
+  if test x${glibcpp_cv_func_ldexpf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_ldexpf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ ldexpf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:13328: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_ldexpf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_ldexpf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_ldexpf_use" 1>&6
+
+  if test x$glibcpp_cv_func_ldexpf_use = x"yes"; then
+    for ac_func in ldexpf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13355: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13383: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _ldexpf declaration""... $ac_c" 1>&6
+echo "configure:13410: checking for _ldexpf declaration" >&5
+  if test x${glibcpp_cv_func__ldexpf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__ldexpf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _ldexpf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:13432: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__ldexpf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__ldexpf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__ldexpf_use" 1>&6
+
+    if test x$glibcpp_cv_func__ldexpf_use = x"yes"; then
+      for ac_func in _ldexpf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13459: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13487: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for logf declaration""... $ac_c" 1>&6
+echo "configure:13517: checking for logf declaration" >&5
+  if test x${glibcpp_cv_func_logf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_logf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ logf(0);
+; return 0; }
+EOF
+if { (eval echo configure:13543: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_logf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_logf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_logf_use" 1>&6
+
+  if test x$glibcpp_cv_func_logf_use = x"yes"; then
+    for ac_func in logf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13570: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13598: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _logf declaration""... $ac_c" 1>&6
+echo "configure:13625: checking for _logf declaration" >&5
+  if test x${glibcpp_cv_func__logf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__logf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _logf(0);
+; return 0; }
+EOF
+if { (eval echo configure:13651: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__logf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__logf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__logf_use" 1>&6
+
+    if test x$glibcpp_cv_func__logf_use = x"yes"; then
+      for ac_func in _logf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13678: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13706: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for log10f declaration""... $ac_c" 1>&6
+echo "configure:13736: checking for log10f declaration" >&5
+  if test x${glibcpp_cv_func_log10f_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_log10f_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ log10f(0);
+; return 0; }
+EOF
+if { (eval echo configure:13762: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_log10f_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_log10f_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_log10f_use" 1>&6
+
+  if test x$glibcpp_cv_func_log10f_use = x"yes"; then
+    for ac_func in log10f
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13789: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13817: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _log10f declaration""... $ac_c" 1>&6
+echo "configure:13844: checking for _log10f declaration" >&5
+  if test x${glibcpp_cv_func__log10f_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__log10f_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _log10f(0);
+; return 0; }
+EOF
+if { (eval echo configure:13870: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__log10f_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__log10f_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__log10f_use" 1>&6
+
+    if test x$glibcpp_cv_func__log10f_use = x"yes"; then
+      for ac_func in _log10f
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:13897: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:13925: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for modff declaration""... $ac_c" 1>&6
+echo "configure:13955: checking for modff declaration" >&5
+  if test x${glibcpp_cv_func_modff_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_modff_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ modff(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:13977: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_modff_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_modff_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_modff_use" 1>&6
+
+  if test x$glibcpp_cv_func_modff_use = x"yes"; then
+    for ac_func in modff
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14004: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14032: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _modff declaration""... $ac_c" 1>&6
+echo "configure:14059: checking for _modff declaration" >&5
+  if test x${glibcpp_cv_func__modff_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__modff_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _modff(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:14081: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__modff_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__modff_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__modff_use" 1>&6
+
+    if test x$glibcpp_cv_func__modff_use = x"yes"; then
+      for ac_func in _modff
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14108: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14136: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for powf declaration""... $ac_c" 1>&6
+echo "configure:14166: checking for powf declaration" >&5
+  if test x${glibcpp_cv_func_powf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_powf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ powf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:14188: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_powf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_powf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_powf_use" 1>&6
+
+  if test x$glibcpp_cv_func_powf_use = x"yes"; then
+    for ac_func in powf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14215: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14243: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _powf declaration""... $ac_c" 1>&6
+echo "configure:14270: checking for _powf declaration" >&5
+  if test x${glibcpp_cv_func__powf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__powf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _powf(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:14292: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__powf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__powf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__powf_use" 1>&6
+
+    if test x$glibcpp_cv_func__powf_use = x"yes"; then
+      for ac_func in _powf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14319: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14347: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for sqrtf declaration""... $ac_c" 1>&6
+echo "configure:14377: checking for sqrtf declaration" >&5
+  if test x${glibcpp_cv_func_sqrtf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_sqrtf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ sqrtf(0);
+; return 0; }
+EOF
+if { (eval echo configure:14403: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_sqrtf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_sqrtf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_sqrtf_use" 1>&6
+
+  if test x$glibcpp_cv_func_sqrtf_use = x"yes"; then
+    for ac_func in sqrtf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14430: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14458: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _sqrtf declaration""... $ac_c" 1>&6
+echo "configure:14485: checking for _sqrtf declaration" >&5
+  if test x${glibcpp_cv_func__sqrtf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__sqrtf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _sqrtf(0);
+; return 0; }
+EOF
+if { (eval echo configure:14511: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__sqrtf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__sqrtf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__sqrtf_use" 1>&6
+
+    if test x$glibcpp_cv_func__sqrtf_use = x"yes"; then
+      for ac_func in _sqrtf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14538: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14566: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for sincosf declaration""... $ac_c" 1>&6
+echo "configure:14596: checking for sincosf declaration" >&5
+  if test x${glibcpp_cv_func_sincosf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_sincosf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ sincosf(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:14618: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_sincosf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_sincosf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_sincosf_use" 1>&6
+
+  if test x$glibcpp_cv_func_sincosf_use = x"yes"; then
+    for ac_func in sincosf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14645: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14673: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _sincosf declaration""... $ac_c" 1>&6
+echo "configure:14700: checking for _sincosf declaration" >&5
+  if test x${glibcpp_cv_func__sincosf_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__sincosf_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _sincosf(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:14722: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__sincosf_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__sincosf_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__sincosf_use" 1>&6
+
+    if test x$glibcpp_cv_func__sincosf_use = x"yes"; then
+      for ac_func in _sincosf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14749: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14777: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for finitef declaration""... $ac_c" 1>&6
+echo "configure:14807: checking for finitef declaration" >&5
+  if test x${glibcpp_cv_func_finitef_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_finitef_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ finitef(0);
+; return 0; }
+EOF
+if { (eval echo configure:14833: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_finitef_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_finitef_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_finitef_use" 1>&6
+
+  if test x$glibcpp_cv_func_finitef_use = x"yes"; then
+    for ac_func in finitef
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14860: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14888: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _finitef declaration""... $ac_c" 1>&6
+echo "configure:14915: checking for _finitef declaration" >&5
+  if test x${glibcpp_cv_func__finitef_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__finitef_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _finitef(0);
+; return 0; }
+EOF
+if { (eval echo configure:14941: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__finitef_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__finitef_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__finitef_use" 1>&6
+
+    if test x$glibcpp_cv_func__finitef_use = x"yes"; then
+      for ac_func in _finitef
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:14968: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:14996: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+
+    
+  echo $ac_n "checking for long double trig functions""... $ac_c" 1>&6
+echo "configure:15026: checking for long double trig functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func_long_double_trig_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in acosl asinl atanl \
+                                          cosl sinl tanl \
+                                          coshl sinhl tanhl; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:15049: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_long_double_trig_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_long_double_trig_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func_long_double_trig_use" 1>&6
+  if test x$glibcpp_cv_func_long_double_trig_use = x"yes"; then
+    for ac_func in acosl asinl atanl \
+                                          cosl sinl tanl \
+                                          coshl sinhl tanhl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15075: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15103: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+  
+  echo $ac_n "checking for long double round functions""... $ac_c" 1>&6
+echo "configure:15131: checking for long double round functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func_long_double_round_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in ceill floorl; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:15152: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_long_double_round_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_long_double_round_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func_long_double_round_use" 1>&6
+  if test x$glibcpp_cv_func_long_double_round_use = x"yes"; then
+    for ac_func in ceill floorl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15176: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15204: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+  
+  
+  echo $ac_n "checking for isnanl declaration""... $ac_c" 1>&6
+echo "configure:15233: checking for isnanl declaration" >&5
+  if test x${glibcpp_cv_func_isnanl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_isnanl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ isnanl(0);
+; return 0; }
+EOF
+if { (eval echo configure:15259: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_isnanl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_isnanl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_isnanl_use" 1>&6
+
+  if test x$glibcpp_cv_func_isnanl_use = x"yes"; then
+    for ac_func in isnanl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15286: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _isnanl declaration""... $ac_c" 1>&6
+echo "configure:15341: checking for _isnanl declaration" >&5
+  if test x${glibcpp_cv_func__isnanl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__isnanl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _isnanl(0);
+; return 0; }
+EOF
+if { (eval echo configure:15367: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__isnanl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__isnanl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__isnanl_use" 1>&6
+
+    if test x$glibcpp_cv_func__isnanl_use = x"yes"; then
+      for ac_func in _isnanl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15394: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15422: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for isinfl declaration""... $ac_c" 1>&6
+echo "configure:15452: checking for isinfl declaration" >&5
+  if test x${glibcpp_cv_func_isinfl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_isinfl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ isinfl(0);
+; return 0; }
+EOF
+if { (eval echo configure:15478: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_isinfl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_isinfl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_isinfl_use" 1>&6
+
+  if test x$glibcpp_cv_func_isinfl_use = x"yes"; then
+    for ac_func in isinfl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15505: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15533: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _isinfl declaration""... $ac_c" 1>&6
+echo "configure:15560: checking for _isinfl declaration" >&5
+  if test x${glibcpp_cv_func__isinfl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__isinfl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _isinfl(0);
+; return 0; }
+EOF
+if { (eval echo configure:15586: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__isinfl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__isinfl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__isinfl_use" 1>&6
+
+    if test x$glibcpp_cv_func__isinfl_use = x"yes"; then
+      for ac_func in _isinfl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15613: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15641: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for copysignl declaration""... $ac_c" 1>&6
+echo "configure:15671: checking for copysignl declaration" >&5
+  if test x${glibcpp_cv_func_copysignl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_copysignl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ copysignl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:15693: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_copysignl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_copysignl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_copysignl_use" 1>&6
+
+  if test x$glibcpp_cv_func_copysignl_use = x"yes"; then
+    for ac_func in copysignl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15720: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15748: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _copysignl declaration""... $ac_c" 1>&6
+echo "configure:15775: checking for _copysignl declaration" >&5
+  if test x${glibcpp_cv_func__copysignl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__copysignl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _copysignl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:15797: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__copysignl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__copysignl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__copysignl_use" 1>&6
+
+    if test x$glibcpp_cv_func__copysignl_use = x"yes"; then
+      for ac_func in _copysignl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15824: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15852: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for atan2l declaration""... $ac_c" 1>&6
+echo "configure:15882: checking for atan2l declaration" >&5
+  if test x${glibcpp_cv_func_atan2l_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_atan2l_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ atan2l(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:15904: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_atan2l_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_atan2l_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_atan2l_use" 1>&6
+
+  if test x$glibcpp_cv_func_atan2l_use = x"yes"; then
+    for ac_func in atan2l
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:15931: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:15959: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _atan2l declaration""... $ac_c" 1>&6
+echo "configure:15986: checking for _atan2l declaration" >&5
+  if test x${glibcpp_cv_func__atan2l_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__atan2l_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _atan2l(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:16008: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__atan2l_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__atan2l_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__atan2l_use" 1>&6
+
+    if test x$glibcpp_cv_func__atan2l_use = x"yes"; then
+      for ac_func in _atan2l
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16035: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for expl declaration""... $ac_c" 1>&6
+echo "configure:16093: checking for expl declaration" >&5
+  if test x${glibcpp_cv_func_expl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_expl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ expl(0);
+; return 0; }
+EOF
+if { (eval echo configure:16119: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_expl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_expl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_expl_use" 1>&6
+
+  if test x$glibcpp_cv_func_expl_use = x"yes"; then
+    for ac_func in expl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16146: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16174: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _expl declaration""... $ac_c" 1>&6
+echo "configure:16201: checking for _expl declaration" >&5
+  if test x${glibcpp_cv_func__expl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__expl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _expl(0);
+; return 0; }
+EOF
+if { (eval echo configure:16227: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__expl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__expl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__expl_use" 1>&6
+
+    if test x$glibcpp_cv_func__expl_use = x"yes"; then
+      for ac_func in _expl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16254: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16282: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for fabsl declaration""... $ac_c" 1>&6
+echo "configure:16312: checking for fabsl declaration" >&5
+  if test x${glibcpp_cv_func_fabsl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_fabsl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ fabsl(0);
+; return 0; }
+EOF
+if { (eval echo configure:16338: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_fabsl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_fabsl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_fabsl_use" 1>&6
+
+  if test x$glibcpp_cv_func_fabsl_use = x"yes"; then
+    for ac_func in fabsl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16365: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16393: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _fabsl declaration""... $ac_c" 1>&6
+echo "configure:16420: checking for _fabsl declaration" >&5
+  if test x${glibcpp_cv_func__fabsl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__fabsl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _fabsl(0);
+; return 0; }
+EOF
+if { (eval echo configure:16446: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__fabsl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__fabsl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__fabsl_use" 1>&6
+
+    if test x$glibcpp_cv_func__fabsl_use = x"yes"; then
+      for ac_func in _fabsl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16473: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16501: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for fmodl declaration""... $ac_c" 1>&6
+echo "configure:16531: checking for fmodl declaration" >&5
+  if test x${glibcpp_cv_func_fmodl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_fmodl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ fmodl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:16553: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_fmodl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_fmodl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_fmodl_use" 1>&6
+
+  if test x$glibcpp_cv_func_fmodl_use = x"yes"; then
+    for ac_func in fmodl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16580: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16608: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _fmodl declaration""... $ac_c" 1>&6
+echo "configure:16635: checking for _fmodl declaration" >&5
+  if test x${glibcpp_cv_func__fmodl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__fmodl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _fmodl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:16657: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__fmodl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__fmodl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__fmodl_use" 1>&6
+
+    if test x$glibcpp_cv_func__fmodl_use = x"yes"; then
+      for ac_func in _fmodl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16684: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16712: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for frexpl declaration""... $ac_c" 1>&6
+echo "configure:16742: checking for frexpl declaration" >&5
+  if test x${glibcpp_cv_func_frexpl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_frexpl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ frexpl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:16764: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_frexpl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_frexpl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_frexpl_use" 1>&6
+
+  if test x$glibcpp_cv_func_frexpl_use = x"yes"; then
+    for ac_func in frexpl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16791: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16819: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _frexpl declaration""... $ac_c" 1>&6
+echo "configure:16846: checking for _frexpl declaration" >&5
+  if test x${glibcpp_cv_func__frexpl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__frexpl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _frexpl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:16868: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__frexpl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__frexpl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__frexpl_use" 1>&6
+
+    if test x$glibcpp_cv_func__frexpl_use = x"yes"; then
+      for ac_func in _frexpl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:16895: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:16923: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for hypotl declaration""... $ac_c" 1>&6
+echo "configure:16953: checking for hypotl declaration" >&5
+  if test x${glibcpp_cv_func_hypotl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_hypotl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ hypotl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:16975: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_hypotl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_hypotl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_hypotl_use" 1>&6
+
+  if test x$glibcpp_cv_func_hypotl_use = x"yes"; then
+    for ac_func in hypotl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17002: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17030: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _hypotl declaration""... $ac_c" 1>&6
+echo "configure:17057: checking for _hypotl declaration" >&5
+  if test x${glibcpp_cv_func__hypotl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__hypotl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _hypotl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:17079: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__hypotl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__hypotl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__hypotl_use" 1>&6
+
+    if test x$glibcpp_cv_func__hypotl_use = x"yes"; then
+      for ac_func in _hypotl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17106: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17134: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for ldexpl declaration""... $ac_c" 1>&6
+echo "configure:17164: checking for ldexpl declaration" >&5
+  if test x${glibcpp_cv_func_ldexpl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_ldexpl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ ldexpl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:17186: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_ldexpl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_ldexpl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_ldexpl_use" 1>&6
+
+  if test x$glibcpp_cv_func_ldexpl_use = x"yes"; then
+    for ac_func in ldexpl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17213: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17241: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _ldexpl declaration""... $ac_c" 1>&6
+echo "configure:17268: checking for _ldexpl declaration" >&5
+  if test x${glibcpp_cv_func__ldexpl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__ldexpl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _ldexpl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:17290: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__ldexpl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__ldexpl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__ldexpl_use" 1>&6
+
+    if test x$glibcpp_cv_func__ldexpl_use = x"yes"; then
+      for ac_func in _ldexpl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17317: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17345: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for logl declaration""... $ac_c" 1>&6
+echo "configure:17375: checking for logl declaration" >&5
+  if test x${glibcpp_cv_func_logl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_logl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ logl(0);
+; return 0; }
+EOF
+if { (eval echo configure:17401: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_logl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_logl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_logl_use" 1>&6
+
+  if test x$glibcpp_cv_func_logl_use = x"yes"; then
+    for ac_func in logl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17428: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17456: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _logl declaration""... $ac_c" 1>&6
+echo "configure:17483: checking for _logl declaration" >&5
+  if test x${glibcpp_cv_func__logl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__logl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _logl(0);
+; return 0; }
+EOF
+if { (eval echo configure:17509: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__logl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__logl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__logl_use" 1>&6
+
+    if test x$glibcpp_cv_func__logl_use = x"yes"; then
+      for ac_func in _logl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17536: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17564: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for log10l declaration""... $ac_c" 1>&6
+echo "configure:17594: checking for log10l declaration" >&5
+  if test x${glibcpp_cv_func_log10l_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_log10l_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ log10l(0);
+; return 0; }
+EOF
+if { (eval echo configure:17620: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_log10l_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_log10l_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_log10l_use" 1>&6
+
+  if test x$glibcpp_cv_func_log10l_use = x"yes"; then
+    for ac_func in log10l
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17647: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17675: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _log10l declaration""... $ac_c" 1>&6
+echo "configure:17702: checking for _log10l declaration" >&5
+  if test x${glibcpp_cv_func__log10l_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__log10l_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _log10l(0);
+; return 0; }
+EOF
+if { (eval echo configure:17728: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__log10l_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__log10l_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__log10l_use" 1>&6
+
+    if test x$glibcpp_cv_func__log10l_use = x"yes"; then
+      for ac_func in _log10l
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17755: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17783: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for modfl declaration""... $ac_c" 1>&6
+echo "configure:17813: checking for modfl declaration" >&5
+  if test x${glibcpp_cv_func_modfl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_modfl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ modfl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:17835: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_modfl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_modfl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_modfl_use" 1>&6
+
+  if test x$glibcpp_cv_func_modfl_use = x"yes"; then
+    for ac_func in modfl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17862: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17890: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _modfl declaration""... $ac_c" 1>&6
+echo "configure:17917: checking for _modfl declaration" >&5
+  if test x${glibcpp_cv_func__modfl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__modfl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _modfl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:17939: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__modfl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__modfl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__modfl_use" 1>&6
+
+    if test x$glibcpp_cv_func__modfl_use = x"yes"; then
+      for ac_func in _modfl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:17966: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:17994: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for powl declaration""... $ac_c" 1>&6
+echo "configure:18024: checking for powl declaration" >&5
+  if test x${glibcpp_cv_func_powl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_powl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ powl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:18046: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_powl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_powl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_powl_use" 1>&6
+
+  if test x$glibcpp_cv_func_powl_use = x"yes"; then
+    for ac_func in powl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18073: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18101: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _powl declaration""... $ac_c" 1>&6
+echo "configure:18128: checking for _powl declaration" >&5
+  if test x${glibcpp_cv_func__powl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__powl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _powl(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:18150: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__powl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__powl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__powl_use" 1>&6
+
+    if test x$glibcpp_cv_func__powl_use = x"yes"; then
+      for ac_func in _powl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18177: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18205: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for sqrtl declaration""... $ac_c" 1>&6
+echo "configure:18235: checking for sqrtl declaration" >&5
+  if test x${glibcpp_cv_func_sqrtl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_sqrtl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ sqrtl(0);
+; return 0; }
+EOF
+if { (eval echo configure:18261: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_sqrtl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_sqrtl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_sqrtl_use" 1>&6
+
+  if test x$glibcpp_cv_func_sqrtl_use = x"yes"; then
+    for ac_func in sqrtl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18288: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18316: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _sqrtl declaration""... $ac_c" 1>&6
+echo "configure:18343: checking for _sqrtl declaration" >&5
+  if test x${glibcpp_cv_func__sqrtl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__sqrtl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _sqrtl(0);
+; return 0; }
+EOF
+if { (eval echo configure:18369: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__sqrtl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__sqrtl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__sqrtl_use" 1>&6
+
+    if test x$glibcpp_cv_func__sqrtl_use = x"yes"; then
+      for ac_func in _sqrtl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18396: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18424: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for sincosl declaration""... $ac_c" 1>&6
+echo "configure:18454: checking for sincosl declaration" >&5
+  if test x${glibcpp_cv_func_sincosl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_sincosl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ sincosl(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:18476: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_sincosl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_sincosl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_sincosl_use" 1>&6
+
+  if test x$glibcpp_cv_func_sincosl_use = x"yes"; then
+    for ac_func in sincosl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18503: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18531: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _sincosl declaration""... $ac_c" 1>&6
+echo "configure:18558: checking for _sincosl declaration" >&5
+  if test x${glibcpp_cv_func__sincosl_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__sincosl_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ _sincosl(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:18580: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__sincosl_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__sincosl_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__sincosl_use" 1>&6
+
+    if test x$glibcpp_cv_func__sincosl_use = x"yes"; then
+      for ac_func in _sincosl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18607: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18635: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+  
+  
+  echo $ac_n "checking for finitel declaration""... $ac_c" 1>&6
+echo "configure:18665: checking for finitel declaration" >&5
+  if test x${glibcpp_cv_func_finitel_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_finitel_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ finitel(0);
+; return 0; }
+EOF
+if { (eval echo configure:18691: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_finitel_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_finitel_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_finitel_use" 1>&6
+
+  if test x$glibcpp_cv_func_finitel_use = x"yes"; then
+    for ac_func in finitel
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18718: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18746: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  else
+    
+  echo $ac_n "checking for _finitel declaration""... $ac_c" 1>&6
+echo "configure:18773: checking for _finitel declaration" >&5
+  if test x${glibcpp_cv_func__finitel_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func__finitel_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+		      #ifdef HAVE_IEEEFP_H
+		      #include 
+		      #endif
+		     
+int main() {
+ _finitel(0);
+; return 0; }
+EOF
+if { (eval echo configure:18799: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__finitel_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__finitel_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func__finitel_use" 1>&6
+
+    if test x$glibcpp_cv_func__finitel_use = x"yes"; then
+      for ac_func in _finitel
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18826: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18854: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+    fi
+  fi
+
+
+        
+    
+  echo $ac_n "checking for _float trig functions""... $ac_c" 1>&6
+echo "configure:18885: checking for _float trig functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func__float_trig_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in _acosf _asinf _atanf \
+                                          _cosf _sinf _tanf \
+                                          _coshf _sinhf _tanhf; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:18908: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__float_trig_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__float_trig_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func__float_trig_use" 1>&6
+  if test x$glibcpp_cv_func__float_trig_use = x"yes"; then
+    for ac_func in _acosf _asinf _atanf \
+                                          _cosf _sinf _tanf \
+                                          _coshf _sinhf _tanhf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:18934: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:18962: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+  
+  echo $ac_n "checking for _float round functions""... $ac_c" 1>&6
+echo "configure:18990: checking for _float round functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func__float_round_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in _ceilf _floorf; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:19011: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__float_round_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__float_round_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func__float_round_use" 1>&6
+  if test x$glibcpp_cv_func__float_round_use = x"yes"; then
+    for ac_func in _ceilf _floorf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19035: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19063: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+
+    
+  echo $ac_n "checking for _long double trig functions""... $ac_c" 1>&6
+echo "configure:19092: checking for _long double trig functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func__long_double_trig_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in _acosl _asinl _atanl \
+                                          _cosl _sinl _tanl \
+                                          _coshl _sinhl _tanhl; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:19115: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__long_double_trig_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__long_double_trig_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func__long_double_trig_use" 1>&6
+  if test x$glibcpp_cv_func__long_double_trig_use = x"yes"; then
+    for ac_func in _acosl _asinl _atanl \
+                                          _cosl _sinl _tanl \
+                                          _coshl _sinhl _tanhl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19141: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19169: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+  
+  echo $ac_n "checking for _long double round functions""... $ac_c" 1>&6
+echo "configure:19197: checking for _long double round functions" >&5
+  if eval "test \"`echo '$''{'glibcpp_cv_func__long_double_round_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+    
+    ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+    cat > conftest.$ac_ext <
+int main() {
+ `for x in _ceill _floorl; do echo "$x (0);"; done` 
+; return 0; }
+EOF
+if { (eval echo configure:19218: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func__long_double_round_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func__long_double_round_use=no
+fi
+rm -f conftest*
+    ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+fi
+
+  echo "$ac_t""$glibcpp_cv_func__long_double_round_use" 1>&6
+  if test x$glibcpp_cv_func__long_double_round_use = x"yes"; then
+    for ac_func in _ceill _floorl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19242: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19270: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+  fi
+
+
+  LIBS="$ac_save_LIBS"
+  CXXFLAGS="$ac_save_CXXFLAGS"
+
+  
+    echo $ac_n "checking for main in -lm""... $ac_c" 1>&6
+echo "configure:19302: checking for main in -lm" >&5
+ac_lib_var=`echo m'_'main | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-lm  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_lib=HAVE_LIB`echo m | sed -e 's/[^a-zA-Z0-9_]/_/g' \
+    -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
+  cat >> confdefs.h <&6
+fi
+
+  for ac_func in nan copysignf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19347: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19375: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS ${ac_func}.lo"
+fi
+done
+
+
+    for ac_func in __signbit
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19404: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19432: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbit.lo"
+fi
+done
+
+  for ac_func in __signbitf
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19460: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19488: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitf.lo"
+fi
+done
+
+
+          if test x$ac_cv_func_copysignl = x"yes"; then
+    for ac_func in __signbitl
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19518: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19546: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+LIBMATHOBJS="$LIBMATHOBJS signbitl.lo"
+fi
+done
+
+  fi
+
+  
+
+  
+
+      echo $ac_n "checking for mbstate_t""... $ac_c" 1>&6
+echo "configure:19578: checking for mbstate_t" >&5
+  cat > conftest.$ac_ext <
+int main() {
+mbstate_t teststate;
+; return 0; }
+EOF
+if { (eval echo configure:19587: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  have_mbstate_t=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  have_mbstate_t=no
+fi
+rm -f conftest*
+  echo "$ac_t""$have_mbstate_t" 1>&6
+  if test x"$have_mbstate_t" = xyes; then
+    cat >> confdefs.h <<\EOF
+#define HAVE_MBSTATE_T 1
+EOF
+
+  fi
+
+    for ac_hdr in wchar.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:19609: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:19619: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wchar_h=no
+fi
+done
+
+  for ac_hdr in wctype.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:19650: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:19660: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+ac_has_wctype_h=no
+fi
+done
+
+  
+    if test x"$ac_has_wchar_h" = xyes &&
+     test x"$ac_has_wctype_h" = xyes &&
+     test x"$enable_c_mbchar" != xno; then
+      
+            echo $ac_n "checking for WCHAR_MIN and WCHAR_MAX""... $ac_c" 1>&6
+echo "configure:19693: checking for WCHAR_MIN and WCHAR_MAX" >&5
+    cat > conftest.$ac_ext <
+int main() {
+int i = WCHAR_MIN; int j = WCHAR_MAX;
+; return 0; }
+EOF
+if { (eval echo configure:19702: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_wchar_minmax=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_wchar_minmax=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_wchar_minmax" 1>&6
+    
+            echo $ac_n "checking for WEOF""... $ac_c" 1>&6
+echo "configure:19715: checking for WEOF" >&5
+    cat > conftest.$ac_ext <
+      #include 
+int main() {
+wint_t i = WEOF;
+; return 0; }
+EOF
+if { (eval echo configure:19726: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  has_weof=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  has_weof=no
+fi
+rm -f conftest*
+    echo "$ac_t""$has_weof" 1>&6
+  
+        ac_wfuncs=yes
+    for ac_func in wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19742: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19770: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+  
+        for ac_func in btowc wctob fgetwc fgetwc fgetws fputwc fputws fwide \
+    fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf vswprintf vswscanf \
+    vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
+    mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+    wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \
+    wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19805: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:19833: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+\
+    ac_wfuncs=no
+fi
+done
+
+
+    echo $ac_n "checking for ISO C99 wchar_t support""... $ac_c" 1>&6
+echo "configure:19861: checking for ISO C99 wchar_t support" >&5
+    if test x"$has_weof" = xyes &&
+       test x"$has_wchar_minmax" = xyes &&
+       test x"$ac_wfuncs" = xyes; then
+      ac_isoC99_wchar_t=yes
+    else
+      ac_isoC99_wchar_t=no
+    fi
+    echo "$ac_t""$ac_isoC99_wchar_t" 1>&6
+  
+            ac_safe=`echo "iconv.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for iconv.h""... $ac_c" 1>&6
+echo "configure:19873: checking for iconv.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:19883: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_iconv_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_iconv_h=no
+fi
+
+    ac_safe=`echo "langinfo.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for langinfo.h""... $ac_c" 1>&6
+echo "configure:19907: checking for langinfo.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:19917: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  ac_has_langinfo_h=yes
+else
+  echo "$ac_t""no" 1>&6
+ac_has_langinfo_h=no
+fi
+
+
+        echo $ac_n "checking for iconv in -liconv""... $ac_c" 1>&6
+echo "configure:19941: checking for iconv in -liconv" >&5
+ac_lib_var=`echo iconv'_'iconv | sed 'y%./+-%__p_%'`
+if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  ac_save_LIBS="$LIBS"
+LIBS="-liconv  $LIBS"
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_lib_$ac_lib_var=no"
+fi
+rm -f conftest*
+LIBS="$ac_save_LIBS"
+
+fi
+if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  libiconv="-liconv"
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+    ac_save_LIBS="$LIBS"
+    LIBS="$LIBS $libiconv"
+
+    for ac_func in iconv_open iconv_close iconv nl_langinfo
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:19986: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:20014: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+ac_XPG2funcs=no
+fi
+done
+
+  
+    LIBS="$ac_save_LIBS"
+
+    echo $ac_n "checking for XPG2 wchar_t support""... $ac_c" 1>&6
+echo "configure:20044: checking for XPG2 wchar_t support" >&5
+    if test x"$ac_has_iconv_h" = xyes &&
+       test x"$ac_has_langinfo_h" = xyes &&
+       test x"$ac_XPG2funcs" = xyes; then
+      ac_XPG2_wchar_t=yes
+    else
+      ac_XPG2_wchar_t=no
+    fi
+    echo "$ac_t""$ac_XPG2_wchar_t" 1>&6
+  
+            echo $ac_n "checking for enabled wchar_t specializations""... $ac_c" 1>&6
+echo "configure:20055: checking for enabled wchar_t specializations" >&5
+    if test x"$ac_isoC99_wchar_t" = xyes &&
+       test x"$ac_XPG2_wchar_t" = xyes; then
+      cat >> confdefs.h <<\EOF
+#define _GLIBCPP_USE_WCHAR_T 1
+EOF
+
+      echo "$ac_t"""yes"" 1>&6
+    else
+      echo "$ac_t"""no"" 1>&6
+    fi
+  else
+        echo "configure: warning: wchar_t support disabled." 1>&2
+  fi
+
+  
+  ac_test_CXXFLAGS="${CXXFLAGS+set}"
+  ac_save_CXXFLAGS="$CXXFLAGS"
+  CXXFLAGS='-fno-builtins -D_GNU_SOURCE'
+
+  
+  echo $ac_n "checking for strtold declaration""... $ac_c" 1>&6
+echo "configure:20077: checking for strtold declaration" >&5
+  if test x${glibcpp_cv_func_strtold_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_strtold_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ strtold(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:20099: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_strtold_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_strtold_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_strtold_use" 1>&6
+  if test x$glibcpp_cv_func_strtold_use = x"yes"; then
+    for ac_func in strtold
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:20125: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:20153: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  fi
+
+  
+  echo $ac_n "checking for strtof declaration""... $ac_c" 1>&6
+echo "configure:20181: checking for strtof declaration" >&5
+  if test x${glibcpp_cv_func_strtof_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_strtof_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ strtof(0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:20203: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_strtof_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_strtof_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_strtof_use" 1>&6
+  if test x$glibcpp_cv_func_strtof_use = x"yes"; then
+    for ac_func in strtof
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:20229: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:20257: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  fi
+
+  for ac_func in drand48
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:20286: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:20314: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+
+  CXXFLAGS="$ac_save_CXXFLAGS"
+
+  
+  ac_safe=`echo "locale.h" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for locale.h""... $ac_c" 1>&6
+echo "configure:20344: checking for locale.h" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20354: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+  
+    echo $ac_n "checking for LC_MESSAGES""... $ac_c" 1>&6
+echo "configure:20372: checking for LC_MESSAGES" >&5
+if eval "test \"`echo '$''{'ac_cv_val_LC_MESSAGES'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+int main() {
+return LC_MESSAGES
+; return 0; }
+EOF
+if { (eval echo configure:20384: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  ac_cv_val_LC_MESSAGES=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_cv_val_LC_MESSAGES=no
+fi
+rm -f conftest*
+fi
+
+echo "$ac_t""$ac_cv_val_LC_MESSAGES" 1>&6
+    if test $ac_cv_val_LC_MESSAGES = yes; then
+      cat >> confdefs.h <<\EOF
+#define HAVE_LC_MESSAGES 1
+EOF
+
+    fi
+  
+else
+  echo "$ac_t""no" 1>&6
+fi
+
+
+
+  cat > conftest.$ac_ext <
+  
+int main() {
+sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
+; return 0; }
+EOF
+if { (eval echo configure:20420: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  cat >> confdefs.h <<\EOF
+#define HAVE_SIGSETJMP 1
+EOF
+
+  
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+
+  for ac_hdr in unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:20437: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20447: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+fi
+done
+
+for ac_func in getpagesize
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:20476: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:20504: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+
+echo $ac_n "checking for working mmap""... $ac_c" 1>&6
+echo "configure:20529: checking for working mmap" >&5
+if eval "test \"`echo '$''{'ac_cv_func_mmap_fixed_mapped'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  if test "$cross_compiling" = yes; then
+  ac_cv_func_mmap_fixed_mapped=no
+else
+  cat > conftest.$ac_ext <
+#include 
+#include 
+
+/* This mess was copied from the GNU getpagesize.h.  */
+#ifndef HAVE_GETPAGESIZE
+# ifdef HAVE_UNISTD_H
+#  include 
+# endif
+
+/* Assume that all systems that can run configure have sys/param.h.  */
+# ifndef HAVE_SYS_PARAM_H
+#  define HAVE_SYS_PARAM_H 1
+# endif
+
+# ifdef _SC_PAGESIZE
+#  define getpagesize() sysconf(_SC_PAGESIZE)
+# else /* no _SC_PAGESIZE */
+#  ifdef HAVE_SYS_PARAM_H
+#   include 
+#   ifdef EXEC_PAGESIZE
+#    define getpagesize() EXEC_PAGESIZE
+#   else /* no EXEC_PAGESIZE */
+#    ifdef NBPG
+#     define getpagesize() NBPG * CLSIZE
+#     ifndef CLSIZE
+#      define CLSIZE 1
+#     endif /* no CLSIZE */
+#    else /* no NBPG */
+#     ifdef NBPC
+#      define getpagesize() NBPC
+#     else /* no NBPC */
+#      ifdef PAGESIZE
+#       define getpagesize() PAGESIZE
+#      endif /* PAGESIZE */
+#     endif /* no NBPC */
+#    endif /* no NBPG */
+#   endif /* no EXEC_PAGESIZE */
+#  else /* no HAVE_SYS_PARAM_H */
+#   define getpagesize() 8192	/* punt totally */
+#  endif /* no HAVE_SYS_PARAM_H */
+# endif /* no _SC_PAGESIZE */
+
+#endif /* no HAVE_GETPAGESIZE */
+
+#ifdef __cplusplus
+extern "C" { void *malloc(unsigned); }
+#else
+char *malloc();
+#endif
+
+int
+main()
+{
+	char *data, *data2, *data3;
+	int i, pagesize;
+	int fd;
+
+	pagesize = getpagesize();
+
+	/*
+	 * First, make a file with some known garbage in it.
+	 */
+	data = malloc(pagesize);
+	if (!data)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		*(data + i) = rand();
+	umask(0);
+	fd = creat("conftestmmap", 0600);
+	if (fd < 0)
+		exit(1);
+	if (write(fd, data, pagesize) != pagesize)
+		exit(1);
+	close(fd);
+
+	/*
+	 * Next, try to mmap the file at a fixed address which
+	 * already has something else allocated at it.  If we can,
+	 * also make sure that we see the same garbage.
+	 */
+	fd = open("conftestmmap", O_RDWR);
+	if (fd < 0)
+		exit(1);
+	data2 = malloc(2 * pagesize);
+	if (!data2)
+		exit(1);
+	data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
+	if (data2 != mmap(data2, pagesize, PROT_READ | PROT_WRITE,
+	    MAP_PRIVATE | MAP_FIXED, fd, 0L))
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data2 + i))
+			exit(1);
+
+	/*
+	 * Finally, make sure that changes to the mapped area
+	 * do not percolate back to the file as seen by read().
+	 * (This is a bug on some variants of i386 svr4.0.)
+	 */
+	for (i = 0; i < pagesize; ++i)
+		*(data2 + i) = *(data2 + i) + 1;
+	data3 = malloc(pagesize);
+	if (!data3)
+		exit(1);
+	if (read(fd, data3, pagesize) != pagesize)
+		exit(1);
+	for (i = 0; i < pagesize; ++i)
+		if (*(data + i) != *(data3 + i))
+			exit(1);
+	close(fd);
+	unlink("conftestmmap");
+	exit(0);
+}
+
+EOF
+if { (eval echo configure:20677: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
+then
+  ac_cv_func_mmap_fixed_mapped=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -fr conftest*
+  ac_cv_func_mmap_fixed_mapped=no
+fi
+rm -fr conftest*
+fi
+
+fi
+
+echo "$ac_t""$ac_cv_func_mmap_fixed_mapped" 1>&6
+if test $ac_cv_func_mmap_fixed_mapped = yes; then
+  cat >> confdefs.h <<\EOF
+#define HAVE_MMAP 1
+EOF
+
+fi
+
+
+  # Establish limits on memory usage during 'make check'
+  
+  
+  setrlimit_have_headers=yes
+  for ac_hdr in sys/resource.h unistd.h
+do
+ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
+echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
+echo "configure:20708: checking for $ac_hdr" >&5
+if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+EOF
+ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
+{ (eval echo configure:20718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
+ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
+if test -z "$ac_err"; then
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=yes"
+else
+  echo "$ac_err" >&5
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_header_$ac_safe=no"
+fi
+rm -f conftest*
+fi
+if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
+  cat >> confdefs.h <&6
+setrlimit_have_headers=no
+fi
+done
+
+  # If don't have the headers, then we can't run the tests now, and we
+  # won't be seeing any of these during testsuite compilation.
+  if test $setrlimit_have_headers = yes; then
+    # Can't do these in a loop, else the resulting syntax is wrong.
+    
+  cat > conftest.$ac_ext <
+                  #include 
+                 
+int main() {
+ int f = RLIMIT_DATA ; 
+; return 0; }
+EOF
+if { (eval echo configure:20760: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_mresult=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_mresult=0
+fi
+rm -f conftest*
+  cat >> confdefs.h < conftest.$ac_ext <
+                  #include 
+                 
+int main() {
+ int f = RLIMIT_RSS ; 
+; return 0; }
+EOF
+if { (eval echo configure:20786: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_mresult=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_mresult=0
+fi
+rm -f conftest*
+  cat >> confdefs.h < conftest.$ac_ext <
+                  #include 
+                 
+int main() {
+ int f = RLIMIT_VMEM ; 
+; return 0; }
+EOF
+if { (eval echo configure:20812: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_mresult=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_mresult=0
+fi
+rm -f conftest*
+  cat >> confdefs.h < conftest.$ac_ext <
+                  #include 
+                 
+int main() {
+ int f = RLIMIT_AS ; 
+; return 0; }
+EOF
+if { (eval echo configure:20838: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_mresult=1
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_mresult=0
+fi
+rm -f conftest*
+  cat >> confdefs.h <&6
+else
+  
+      cat > conftest.$ac_ext <
+		      #include 
+		     
+int main() {
+ struct rlimit r; setrlimit(0, &r);
+; return 0; }
+EOF
+if { (eval echo configure:20869: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  ac_setrlimit=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  ac_setrlimit=no
+fi
+rm -f conftest*
+    
+fi
+
+  fi
+
+  echo $ac_n "checking for testsuite memory limit support""... $ac_c" 1>&6
+echo "configure:20885: checking for testsuite memory limit support" >&5
+  if test $setrlimit_have_headers = yes && test $ac_setrlimit = yes; then
+    ac_mem_limits=yes
+    cat >> confdefs.h <<\EOF
+#define _GLIBCPP_MEM_LIMITS 1
+EOF
+
+  else
+    ac_mem_limits=no
+  fi
+  echo "$ac_t""$ac_mem_limits" 1>&6
+
+
+  # Look for setenv, so that extended locale tests can be performed.
+  
+  echo $ac_n "checking for setenv declaration""... $ac_c" 1>&6
+echo "configure:20901: checking for setenv declaration" >&5
+  if test x${glibcpp_cv_func_setenv_use+set} != xset; then
+    if eval "test \"`echo '$''{'glibcpp_cv_func_setenv_use'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  
+      
+      ac_ext=C
+# CXXFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='${CXX-g++} -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CXX-g++} -o conftest${ac_exeext} $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cxx_cross
+
+      cat > conftest.$ac_ext <
+int main() {
+ setenv(0, 0, 0);
+; return 0; }
+EOF
+if { (eval echo configure:20923: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
+  rm -rf conftest*
+  glibcpp_cv_func_setenv_use=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_cv_func_setenv_use=no
+fi
+rm -f conftest*
+      ac_ext=c
+# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
+ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
+cross_compiling=$ac_cv_prog_cc_cross
+
+    
+fi
+
+  fi
+  echo "$ac_t""$glibcpp_cv_func_setenv_use" 1>&6
+  if test x$glibcpp_cv_func_setenv_use = x"yes"; then
+    for ac_func in setenv
+do
+echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
+echo "configure:20949: checking for $ac_func" >&5
+if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
+  echo $ac_n "(cached) $ac_c" 1>&6
+else
+  cat > conftest.$ac_ext <
+/* Override any gcc2 internal prototype to avoid an error.  */
+/* We use char because int might match the return type of a gcc2
+    builtin and then its argument prototype would still apply.  */
+char $ac_func();
+
+int main() {
+
+/* The GNU C library defines this for functions which it implements
+    to always fail with ENOSYS.  Some functions are actually named
+    something starting with __ and the normal name is an alias.  */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+$ac_func();
+#endif
+
+; return 0; }
+EOF
+if { (eval echo configure:20977: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=yes"
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  eval "ac_cv_func_$ac_func=no"
+fi
+rm -f conftest*
+fi
+
+if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
+  echo "$ac_t""yes" 1>&6
+    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
+  cat >> confdefs.h <&6
+fi
+done
+    
+  fi
+
+
+fi
+
+# This depends on the possibly-skipped linker test above.
+# Check whether --enable-symvers or --disable-symvers was given.
+if test "${enable_symvers+set}" = set; then
+  enableval="$enable_symvers"
+  case "$enableval" in
+ yes) enable_symvers=yes ;;
+ no)  enable_symvers=no ;;
+ # other names here, just as sanity checks
+ #gnu|sun|etcetera) enable_symvers=$enableval ;;
+ gnu) enable_symvers=$enableval ;;
+ *)   { echo "configure: error: Unknown argument to enable/disable symvers" 1>&2; exit 1; } ;;
+ esac
+else
+  enable_symvers=yes
+fi
+
+# If we never went through the GLIBCPP_CHECK_LINKER_FEATURES macro, then we
+# don't know enough about $LD to do tricks... 
+if test x$enable_shared = xno || 
+	test x$LD = x || 
+	test x$glibcpp_gnu_ld_version = x; then
+  enable_symvers=no
+fi
+
+# Check to see if libgcc_s exists, indicating that shared libgcc is possible.
+echo $ac_n "checking for shared libgcc""... $ac_c" 1>&6
+echo "configure:21032: checking for shared libgcc" >&5
+ac_save_CFLAGS="$CFLAGS"
+CFLAGS=' -lgcc_s'
+cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  glibcpp_shared_libgcc=yes
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+  rm -rf conftest*
+  glibcpp_shared_libgcc=no
+fi
+rm -f conftest*
+CFLAGS="$ac_save_CFLAGS"
+echo "$ac_t""$glibcpp_shared_libgcc" 1>&6
+
+# For GNU ld, we need at least this version.  It's 2.12 in the same format
+# as the tested-for version.  See GLIBCPP_CHECK_LINKER_FEATURES for more.
+glibcpp_min_gnu_ld_version=21200
+
+# Check to see if unspecified "yes" value can win, given results
+# above.  
+if test $enable_symvers = yes ; then
+  if test $with_gnu_ld = yes &&
+    test $glibcpp_shared_libgcc = yes ;
+  then
+    if test $glibcpp_gnu_ld_version -ge $glibcpp_min_gnu_ld_version ; then
+        enable_symvers=gnu
+    else
+      ac_test_CFLAGS="${CFLAGS+set}"
+      ac_save_CFLAGS="$CFLAGS"
+      CFLAGS='-shared -Wl,--version-script,conftest.map'
+      enable_symvers=no
+      
+      echo 'FOO { global: f[a-z]o; local: *; };' > conftest.map
+      
+      cat > conftest.$ac_ext <&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
+  rm -rf conftest*
+  enable_symvers=gnu
+else
+  echo "configure: failed program was:" >&5
+  cat conftest.$ac_ext >&5
+fi
+rm -f conftest*
+      if test "$ac_test_CFLAGS" = set; then
+	CFLAGS="$ac_save_CFLAGS"
+      else
+	# this is the suspicious part
+	CFLAGS=''
+      fi
+      rm -f conftest.map
+    fi
+  else
+    # just fail for now
+    enable_symvers=no
+  fi
+fi
+
+case $enable_symvers in
+  no)
+      LINKER_MAP=config/linker-map.dummy
+      ;;
+  gnu)
+      LINKER_MAP=config/linker-map.gnu
+      ;;
+esac
+
+
+
+
+if test $enable_symvers != no; then
+  GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE=
+  GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE='#'
+else
+  GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE='#'
+  GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE=
+fi
+echo $ac_n "checking versioning on shared library symbols""... $ac_c" 1>&6
+echo "configure:21126: checking versioning on shared library symbols" >&5
+echo "$ac_t""$enable_symvers" 1>&6
+
+
+# Propagate the target-specific source directories through the build chain.
+OS_INC_SRCDIR=$os_include_dir/bits
+ATOMICITY_INC_SRCDIR=$ATOMICITYH/bits
+CPU_LIMITS_INC_SRCDIR=$CPULIMITSH/bits
+
+
+
+
+# Set up cross-compile flags
+
+
+
+if test "$CANADIAN" = yes; then
+  CANADIAN_TRUE=
+  CANADIAN_FALSE='#'
+else
+  CANADIAN_TRUE='#'
+  CANADIAN_FALSE=
+fi
+ 
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+
+if test "${multilib}" = "yes"; then
+  multilib_arg="--enable-multilib"
+else
+  multilib_arg=
+fi
+
+# Needed so that g++ can find the correct include subdir automatically.
+INTERFACE=v3
+
+# Export all the install information
+
+# Assumes glibcpp_builddir, glibcpp_srcdir are alreay set up and
+# exported correctly in GLIBCPP_CONFIGURE.
+glibcpp_toolexecdir=no
+glibcpp_toolexeclibdir=no
+glibcpp_prefixdir=${prefix}
+
+echo $ac_n "checking for interface version number""... $ac_c" 1>&6
+echo "configure:21216: checking for interface version number" >&5
+libstdcxx_interface=$INTERFACE
+echo "$ac_t""$libstdcxx_interface" 1>&6
+
+# Process the option --with-gxx-include-dir=
+echo $ac_n "checking for --with-gxx-include-dir""... $ac_c" 1>&6
+echo "configure:21222: checking for --with-gxx-include-dir" >&5
+# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
+if test "${with_gxx_include_dir+set}" = set; then
+  withval="$with_gxx_include_dir"
+  case "${withval}" in
+  yes)
+    { echo "configure: error: Missing directory for --with-gxx-include-dir" 1>&2; exit 1; }
+    gxx_include_dir=no
+    ;;
+  no)
+    gxx_include_dir=no
+    ;;
+  *)
+    gxx_include_dir=${withval}
+    ;;
+esac
+else
+  gxx_include_dir=no
+fi
+
+echo "$ac_t""$gxx_include_dir" 1>&6
+
+# Process the option "--enable-version-specific-runtime-libs"
+echo $ac_n "checking for --enable-version-specific-runtime-libs""... $ac_c" 1>&6
+echo "configure:21246: checking for --enable-version-specific-runtime-libs" >&5
+# Check whether --enable-version-specific-runtime-libs or --disable-version-specific-runtime-libs was given.
+if test "${enable_version_specific_runtime_libs+set}" = set; then
+  enableval="$enable_version_specific_runtime_libs"
+  case "$enableval" in
+ yes) version_specific_libs=yes ;;
+ no)  version_specific_libs=no ;;
+ *)   { echo "configure: error: Unknown argument to enable/disable version-specific libs" 1>&2; exit 1; };;
+ esac
+else
+  version_specific_libs=no
+fi
+# Option set, now we can test it.
+echo "$ac_t""$version_specific_libs" 1>&6
+
+if test $version_specific_libs = yes; then
+  # Need the gcc compiler version to know where to install libraries
+  # and header files if --enable-version-specific-runtime-libs option
+  # is selected.
+    gcc_version_trigger=${srcdir}/../gcc/version.c
+  gcc_version_full=`grep version_string ${gcc_version_trigger} | sed -e 's/.*\"\([^\"]*\)\".*/\1/'`
+  gcc_version=`echo ${gcc_version_full} | sed -e 's/\([^ ]*\) .*/\1/'`
+  if test x"$gxx_include_dir" = x"no"; then
+    gxx_include_dir='$(libdir)/gcc-lib/$(target_alias)/'${gcc_version}/include/g++
+  fi
+  glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+  glibcpp_toolexeclibdir='$(toolexecdir)/'${gcc_version}'$(MULTISUBDIR)'
+  fi
+
+# Default case for install directory for include files.
+if test $version_specific_libs = no &&
+   test $gxx_include_dir = no; then
+  gxx_include_dir='$(prefix)'/include/g++-${libstdcxx_interface}
+fi
+
+# Calculate glibcpp_toolexecdir, glibcpp_toolexeclibdir
+# Install a library built with a cross compiler in tooldir, not libdir.
+if test x"$glibcpp_toolexecdir" = x"no"; then 
+  if test -n "$with_cross_host" &&
+     test x"$with_cross_host" != x"no"; then
+    glibcpp_toolexecdir='$(exec_prefix)/$(target_alias)'
+    glibcpp_toolexeclibdir='$(toolexecdir)/lib$(MULTISUBDIR)'
+  else
+    glibcpp_toolexecdir='$(libdir)/gcc-lib/$(target_alias)'
+    glibcpp_toolexeclibdir='$(libdir)$(MULTISUBDIR)'
+  fi
+fi
+
+echo $ac_n "checking for install location""... $ac_c" 1>&6
+echo "configure:21295: checking for install location" >&5
+echo "$ac_t""$gxx_include_dir" 1>&6
+
+
+
+
+
+
+
+# Export all the include and flag information to makefiles.
+
+  # Root level of the build directory include sources.
+  GLIBCPP_INCLUDES="-I${glibcpp_builddir}/include/${target_alias} -I${glibcpp_builddir}/include"
+
+  # Passed down for canadian crosses.
+  if test x"$CANADIAN" = xyes; then
+    TOPLEVEL_INCLUDES='-I$(includedir)'
+  fi
+
+  LIBMATH_INCLUDES='-I$(top_srcdir)/libmath'
+
+  LIBSUPCXX_INCLUDES='-I$(top_srcdir)/libsupc++'
+
+  if test x"$need_libio" = xyes; then
+    LIBIO_INCLUDES='-I$(top_builddir)/libio -I$(top_srcdir)/libio'
+    
+  fi
+
+  # Now, export this to all the little Makefiles....
+  
+  
+  
+  
+
+
+  # Optimization flags that are probably a good idea for thrill-seekers. Just
+  # uncomment the lines below and make, everything else is ready to go... 
+  # OPTIMIZE_CXXFLAGS = -O3 -fstrict-aliasing -fvtable-gc 
+  OPTIMIZE_CXXFLAGS=
+  
+
+  WARN_FLAGS='-Wall -Wno-format -W -Wwrite-strings -Winline'
+  
+
+
+if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
+   grep "enable shared" > /dev/null; then
+  LIBSUPCXX_PICFLAGS=-prefer-pic
+else
+  LIBSUPCXX_PICFLAGS=
+fi
+
+
+# Generate the various Makefiles, include files, and scripts.
+# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
+# and libsupc++/Makefile.am so that multilib installs will end up
+# installed in the correct place. To work around this not being passed
+# down from config-ml.in -> top_srcdir/Makefile.am ->
+# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
+trap '' 1 2 15
+cat > confcache <<\EOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs.  It is not useful on other systems.
+# If it contains results you don't want to keep, you may remove or edit it.
+#
+# By default, configure uses ./config.cache as the cache file,
+# creating it if it does not exist already.  You can give configure
+# the --cache-file=FILE option to use a different cache file; that is
+# what configure does when it calls configure scripts in
+# subdirectories, so they share the cache.
+# Giving --cache-file=/dev/null disables caching, for debugging configure.
+# config.status only pays attention to the cache file if you give it the
+# --recheck option to rerun configure.
+#
+EOF
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(set) 2>&1 |
+  case `(ac_space=' '; set | grep ac_space) 2>&1` in
+  *ac_space=\ *)
+    # `set' does not quote correctly, so add quotes (double-quote substitution
+    # turns \\\\ into \\, and sed turns \\ into \).
+    sed -n \
+      -e "s/'/'\\\\''/g" \
+      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
+    ;;
+  *)
+    # `set' quotes correctly as required by POSIX, so do not add quotes.
+    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
+    ;;
+  esac >> confcache
+if cmp -s $cache_file confcache; then
+  :
+else
+  if test -w $cache_file; then
+    echo "updating cache $cache_file"
+    cat confcache > $cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
+
+trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+# Any assignment to VPATH causes Sun make to only execute
+# the first set of double-colon rules, so remove it if not needed.
+# If there is a colon in the path, we need to keep it.
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=[^:]*$/d'
+fi
+
+trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
+
+DEFS=-DHAVE_CONFIG_H
+
+# Without the "./", some shells look in PATH for config.status.
+: ${CONFIG_STATUS=./config.status}
+
+echo creating $CONFIG_STATUS
+rm -f $CONFIG_STATUS
+cat > $CONFIG_STATUS </dev/null | sed 1q`:
+#
+# $0 $ac_configure_args
+#
+# Compiler output produced by configure, useful for debugging
+# configure, is in ./config.log if it exists.
+
+ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
+for ac_option
+do
+  case "\$ac_option" in
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
+    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
+  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
+    echo "$CONFIG_STATUS generated by autoconf version 2.13"
+    exit 0 ;;
+  -help | --help | --hel | --he | --h)
+    echo "\$ac_cs_usage"; exit 0 ;;
+  *) echo "\$ac_cs_usage"; exit 1 ;;
+  esac
+done
+
+ac_given_srcdir=$srcdir
+ac_given_INSTALL="$INSTALL"
+
+trap 'rm -fr `echo "Makefile \
+    include/Makefile src/Makefile \
+    libmath/Makefile libio/Makefile libsupc++/Makefile \
+    po/Makefile testsuite/Makefile mkcheck testsuite_flags config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
+EOF
+cat >> $CONFIG_STATUS < conftest.subs <<\\CEOF
+$ac_vpsub
+$extrasub
+s%@SHELL@%$SHELL%g
+s%@CFLAGS@%$CFLAGS%g
+s%@CPPFLAGS@%$CPPFLAGS%g
+s%@CXXFLAGS@%$CXXFLAGS%g
+s%@FFLAGS@%$FFLAGS%g
+s%@DEFS@%$DEFS%g
+s%@LDFLAGS@%$LDFLAGS%g
+s%@LIBS@%$LIBS%g
+s%@exec_prefix@%$exec_prefix%g
+s%@prefix@%$prefix%g
+s%@program_transform_name@%$program_transform_name%g
+s%@bindir@%$bindir%g
+s%@sbindir@%$sbindir%g
+s%@libexecdir@%$libexecdir%g
+s%@datadir@%$datadir%g
+s%@sysconfdir@%$sysconfdir%g
+s%@sharedstatedir@%$sharedstatedir%g
+s%@localstatedir@%$localstatedir%g
+s%@libdir@%$libdir%g
+s%@includedir@%$includedir%g
+s%@oldincludedir@%$oldincludedir%g
+s%@infodir@%$infodir%g
+s%@mandir@%$mandir%g
+s%@PACKAGE@%$PACKAGE%g
+s%@release_VERSION@%$release_VERSION%g
+s%@libtool_VERSION@%$libtool_VERSION%g
+s%@host@%$host%g
+s%@host_alias@%$host_alias%g
+s%@host_cpu@%$host_cpu%g
+s%@host_vendor@%$host_vendor%g
+s%@host_os@%$host_os%g
+s%@target@%$target%g
+s%@target_alias@%$target_alias%g
+s%@target_cpu@%$target_cpu%g
+s%@target_vendor@%$target_vendor%g
+s%@target_os@%$target_os%g
+s%@build@%$build%g
+s%@build_alias@%$build_alias%g
+s%@build_cpu@%$build_cpu%g
+s%@build_vendor@%$build_vendor%g
+s%@build_os@%$build_os%g
+s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
+s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
+s%@INSTALL_DATA@%$INSTALL_DATA%g
+s%@VERSION@%$VERSION%g
+s%@ACLOCAL@%$ACLOCAL%g
+s%@AUTOCONF@%$AUTOCONF%g
+s%@AUTOMAKE@%$AUTOMAKE%g
+s%@AUTOHEADER@%$AUTOHEADER%g
+s%@MAKEINFO@%$MAKEINFO%g
+s%@SET_MAKE@%$SET_MAKE%g
+s%@toplevel_srcdir@%$toplevel_srcdir%g
+s%@glibcpp_builddir@%$glibcpp_builddir%g
+s%@glibcpp_srcdir@%$glibcpp_srcdir%g
+s%@AWK@%$AWK%g
+s%@LN_S@%$LN_S%g
+s%@glibcpp_basedir@%$glibcpp_basedir%g
+s%@CC@%$CC%g
+s%@glibcpp_CXX@%$glibcpp_CXX%g
+s%@AS@%$AS%g
+s%@AR@%$AR%g
+s%@RANLIB@%$RANLIB%g
+s%@MAINTAINER_MODE_TRUE@%$MAINTAINER_MODE_TRUE%g
+s%@MAINTAINER_MODE_FALSE@%$MAINTAINER_MODE_FALSE%g
+s%@MAINT@%$MAINT%g
+s%@EXEEXT@%$EXEEXT%g
+s%@OBJEXT@%$OBJEXT%g
+s%@STRIP@%$STRIP%g
+s%@LIBTOOL@%$LIBTOOL%g
+s%@CXXCPP@%$CXXCPP%g
+s%@enable_shared@%$enable_shared%g
+s%@enable_static@%$enable_static%g
+s%@ifGNUmake@%$ifGNUmake%g
+s%@DEBUG_FLAGS@%$DEBUG_FLAGS%g
+s%@CPP@%$CPP%g
+s%@CSTDIO_H@%$CSTDIO_H%g
+s%@BASIC_FILE_H@%$BASIC_FILE_H%g
+s%@CCODECVT_C@%$CCODECVT_C%g
+s%@GLIBCPP_BUILD_LIBIO_TRUE@%$GLIBCPP_BUILD_LIBIO_TRUE%g
+s%@GLIBCPP_BUILD_LIBIO_FALSE@%$GLIBCPP_BUILD_LIBIO_FALSE%g
+s%@GLIBCPP_NEED_LIBIO_TRUE@%$GLIBCPP_NEED_LIBIO_TRUE%g
+s%@GLIBCPP_NEED_LIBIO_FALSE@%$GLIBCPP_NEED_LIBIO_FALSE%g
+s%@GLIBCPP_NEED_WLIBIO_TRUE@%$GLIBCPP_NEED_WLIBIO_TRUE%g
+s%@GLIBCPP_NEED_WLIBIO_FALSE@%$GLIBCPP_NEED_WLIBIO_FALSE%g
+s%@libio_la@%$libio_la%g
+s%@check_msgfmt@%$check_msgfmt%g
+s%@glibcpp_MOFILES@%$glibcpp_MOFILES%g
+s%@glibcpp_POFILES@%$glibcpp_POFILES%g
+s%@glibcpp_localedir@%$glibcpp_localedir%g
+s%@USE_NLS@%$USE_NLS%g
+s%@CLOCALE_H@%$CLOCALE_H%g
+s%@CCODECVT_H@%$CCODECVT_H%g
+s%@CMESSAGES_H@%$CMESSAGES_H%g
+s%@CSHADOW_FLAGS@%$CSHADOW_FLAGS%g
+s%@C_INCLUDE_DIR@%$C_INCLUDE_DIR%g
+s%@GLIBCPP_C_HEADERS_C_TRUE@%$GLIBCPP_C_HEADERS_C_TRUE%g
+s%@GLIBCPP_C_HEADERS_C_FALSE@%$GLIBCPP_C_HEADERS_C_FALSE%g
+s%@GLIBCPP_C_HEADERS_C_STD_TRUE@%$GLIBCPP_C_HEADERS_C_STD_TRUE%g
+s%@GLIBCPP_C_HEADERS_C_STD_FALSE@%$GLIBCPP_C_HEADERS_C_STD_FALSE%g
+s%@glibcpp_thread_h@%$glibcpp_thread_h%g
+s%@EXTRA_CXX_FLAGS@%$EXTRA_CXX_FLAGS%g
+s%@LIBUNWIND_FLAG@%$LIBUNWIND_FLAG%g
+s%@SECTION_FLAGS@%$SECTION_FLAGS%g
+s%@SECTION_LDFLAGS@%$SECTION_LDFLAGS%g
+s%@OPT_LDFLAGS@%$OPT_LDFLAGS%g
+s%@LIBMATHOBJS@%$LIBMATHOBJS%g
+s%@WERROR@%$WERROR%g
+s%@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@%$GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE%g
+s%@GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@%$GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE%g
+s%@OS_INC_SRCDIR@%$OS_INC_SRCDIR%g
+s%@ATOMICITY_INC_SRCDIR@%$ATOMICITY_INC_SRCDIR%g
+s%@CPU_LIMITS_INC_SRCDIR@%$CPU_LIMITS_INC_SRCDIR%g
+s%@GLIBCPP_IS_CROSS_COMPILING@%$GLIBCPP_IS_CROSS_COMPILING%g
+s%@CANADIAN_TRUE@%$CANADIAN_TRUE%g
+s%@CANADIAN_FALSE@%$CANADIAN_FALSE%g
+s%@glibcpp_prefixdir@%$glibcpp_prefixdir%g
+s%@gxx_include_dir@%$gxx_include_dir%g
+s%@glibcpp_toolexecdir@%$glibcpp_toolexecdir%g
+s%@glibcpp_toolexeclibdir@%$glibcpp_toolexeclibdir%g
+s%@LIBIO_INCLUDES@%$LIBIO_INCLUDES%g
+s%@GLIBCPP_INCLUDES@%$GLIBCPP_INCLUDES%g
+s%@TOPLEVEL_INCLUDES@%$TOPLEVEL_INCLUDES%g
+s%@LIBMATH_INCLUDES@%$LIBMATH_INCLUDES%g
+s%@LIBSUPCXX_INCLUDES@%$LIBSUPCXX_INCLUDES%g
+s%@OPTIMIZE_CXXFLAGS@%$OPTIMIZE_CXXFLAGS%g
+s%@WARN_FLAGS@%$WARN_FLAGS%g
+s%@LIBSUPCXX_PICFLAGS@%$LIBSUPCXX_PICFLAGS%g
+
+CEOF
+EOF
+
+cat >> $CONFIG_STATUS <<\EOF
+
+# Split the substitutions into bite-sized pieces for seds with
+# small command number limits, like on Digital OSF/1 and HP-UX.
+ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
+ac_file=1 # Number of current file.
+ac_beg=1 # First line for current file.
+ac_end=$ac_max_sed_cmds # Line after last line for current file.
+ac_more_lines=:
+ac_sed_cmds=""
+while $ac_more_lines; do
+  if test $ac_beg -gt 1; then
+    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
+  else
+    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
+  fi
+  if test ! -s conftest.s$ac_file; then
+    ac_more_lines=false
+    rm -f conftest.s$ac_file
+  else
+    if test -z "$ac_sed_cmds"; then
+      ac_sed_cmds="sed -f conftest.s$ac_file"
+    else
+      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
+    fi
+    ac_file=`expr $ac_file + 1`
+    ac_beg=$ac_end
+    ac_end=`expr $ac_end + $ac_max_sed_cmds`
+  fi
+done
+if test -z "$ac_sed_cmds"; then
+  ac_sed_cmds=cat
+fi
+EOF
+
+cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
+for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+    # The file is in a subdirectory.
+    test ! -d "$ac_dir" && mkdir "$ac_dir"
+    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dir_suffix.
+    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dir_suffix= ac_dots=
+  fi
+
+  case "$ac_given_srcdir" in
+  .)  srcdir=.
+      if test -z "$ac_dots"; then top_srcdir=.
+      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
+  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
+  *) # Relative path.
+    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
+    top_srcdir="$ac_dots$ac_given_srcdir" ;;
+  esac
+
+  case "$ac_given_INSTALL" in
+  [/$]*) INSTALL="$ac_given_INSTALL" ;;
+  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
+  esac
+
+  echo creating "$ac_file"
+  rm -f "$ac_file"
+  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
+  case "$ac_file" in
+  *Makefile*) ac_comsub="1i\\
+# $configure_input" ;;
+  *) ac_comsub= ;;
+  esac
+
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  sed -e "$ac_comsub
+s%@configure_input@%$configure_input%g
+s%@srcdir@%$srcdir%g
+s%@top_srcdir@%$top_srcdir%g
+s%@INSTALL@%$INSTALL%g
+" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
+fi; done
+rm -f conftest.s*
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s%^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='\([ 	][ 	]*\)[^ 	]*%\1#\2'
+ac_dC='\3'
+ac_dD='%g'
+# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
+ac_uA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='\([ 	]\)%\1#\2define\3'
+ac_uC=' '
+ac_uD='\4%g'
+# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_eA='s%^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_eB='$%\1#\2define\3'
+ac_eC=' '
+ac_eD='%g'
+
+if test "${CONFIG_HEADERS+set}" != set; then
+EOF
+cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
+fi
+for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case "$ac_file" in
+  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
+       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+  *) ac_file_in="${ac_file}.in" ;;
+  esac
+
+  echo creating $ac_file
+
+  rm -f conftest.frag conftest.in conftest.out
+  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
+  cat $ac_file_inputs > conftest.in
+
+EOF
+
+# Transform confdefs.h into a sed script conftest.vals that substitutes
+# the proper values into config.h.in to produce config.h.  And first:
+# Protect against being on the right side of a sed subst in config.status.
+# Protect against being in an unquoted here document in config.status.
+rm -f conftest.vals
+cat > conftest.hdr <<\EOF
+s/[\\&%]/\\&/g
+s%[\\$`]%\\&%g
+s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
+s%ac_d%ac_u%gp
+s%ac_u%ac_e%gp
+EOF
+sed -n -f conftest.hdr confdefs.h > conftest.vals
+rm -f conftest.hdr
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >> conftest.vals <<\EOF
+s%^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
+EOF
+
+# Break up conftest.vals because some shells have a limit on
+# the size of here documents, and old seds have small limits too.
+
+rm -f conftest.tail
+while :
+do
+  ac_lines=`grep -c . conftest.vals`
+  # grep -c gives empty output for an empty file on some AIX systems.
+  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
+  # Write a limited-size here document to conftest.frag.
+  echo '  cat > conftest.frag <> $CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
+  echo 'CEOF
+  sed -f conftest.frag conftest.in > conftest.out
+  rm -f conftest.in
+  mv conftest.out conftest.in
+' >> $CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
+  rm -f conftest.vals
+  mv conftest.tail conftest.vals
+done
+rm -f conftest.vals
+
+cat >> $CONFIG_STATUS <<\EOF
+  rm -f conftest.frag conftest.h
+  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
+  cat conftest.in >> conftest.h
+  rm -f conftest.in
+  if cmp -s $ac_file conftest.h 2>/dev/null; then
+    echo "$ac_file is unchanged"
+    rm -f conftest.h
+  else
+    # Remove last slash and all that follows it.  Not all systems have dirname.
+      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
+      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
+      # The file is in a subdirectory.
+      test ! -d "$ac_dir" && mkdir "$ac_dir"
+    fi
+    rm -f $ac_file
+    mv conftest.h $ac_file
+  fi
+fi; done
+
+EOF
+
+cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
+srcdir=$ac_given_srcdir
+while test -n "$ac_sources"; do
+  set $ac_dests; ac_dest=$1; shift; ac_dests=$*
+  set $ac_sources; ac_source=$1; shift; ac_sources=$*
+
+  echo "linking $srcdir/$ac_source to $ac_dest"
+
+  if test ! -r $srcdir/$ac_source; then
+    { echo "configure: error: $srcdir/$ac_source: File not found" 1>&2; exit 1; }
+  fi
+  rm -f $ac_dest
+
+  # Make relative symlinks.
+  # Remove last slash and all that follows it.  Not all systems have dirname.
+  ac_dest_dir=`echo $ac_dest|sed 's%/[^/][^/]*$%%'`
+  if test "$ac_dest_dir" != "$ac_dest" && test "$ac_dest_dir" != .; then
+    # The dest file is in a subdirectory.
+    test ! -d "$ac_dest_dir" && mkdir "$ac_dest_dir"
+    ac_dest_dir_suffix="/`echo $ac_dest_dir|sed 's%^\./%%'`"
+    # A "../" for each directory in $ac_dest_dir_suffix.
+    ac_dots=`echo $ac_dest_dir_suffix|sed 's%/[^/]*%../%g'`
+  else
+    ac_dest_dir_suffix= ac_dots=
+  fi
+
+  case "$srcdir" in
+  [/$]*) ac_rel_source="$srcdir/$ac_source" ;;
+  *) ac_rel_source="$ac_dots$srcdir/$ac_source" ;;
+  esac
+
+  # Make a symlink if possible; otherwise try a hard link.
+  if ln -s $ac_rel_source $ac_dest 2>/dev/null ||
+    ln $srcdir/$ac_source $ac_dest; then :
+  else
+    { echo "configure: error: can not link $ac_dest to $srcdir/$ac_source" 1>&2; exit 1; }
+  fi
+done
+EOF
+cat >> $CONFIG_STATUS <> $CONFIG_STATUS <<\EOF
+test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
+if test -n "$CONFIG_FILES"; then
+  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
+  ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+  grep '^MULTISUBDIR =' Makefile >> src/Makefile
+  grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+fi
+chmod +x mkcheck
+chmod +x testsuite_flags
+
+exit 0
+EOF
+chmod +x $CONFIG_STATUS
+rm -fr confdefs* $ac_clean_files
+test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+
+
+
+# Sanity checking & User-visible messages.
+# Checks down here, otherwise they get scrolled off before
+# the user will notice.
+
+# Trying to get more people to read documentation.  Possibly remove
+# check and warn all the time. There is no "informational" AC_MSG_
+# macro, so these are going to be printed even when --quiet/--silent
+# is given.
+if test ! -f stamp-sanity-warned; then
+  touch stamp-sanity-warned
+  echo ""
+  echo "Please make certain that you read the installation information here:"
+  echo "  faster => ${srcdir}/docs/install.html"
+  echo "  slower => "
+  echo ""
+  echo "and the configuration information here:"
+  echo "  faster => ${srcdir}/docs/configopts.html"
+  echo "  slower => "
+  echo ""
+  echo "before proceeding with ${_cv_gnu_make_command}."
+  echo ""
+fi
diff --git a/contrib/libstdc++/configure.host b/contrib/libstdc++/configure.host
new file mode 100644
index 0000000..db3c57a
--- /dev/null
+++ b/contrib/libstdc++/configure.host
@@ -0,0 +1,31 @@
+# configure.host
+
+# This shell script handles all host based configuration for libstdc++.
+# It sets various shell variables based on the the host and the
+# configuration options.  You can modify this shell script without
+# needing to rerun autoconf.
+
+# This shell script should be invoked as
+#   . configure.host
+# If it encounters an error, it will exit with a message.
+
+# It uses the following shell variables:
+#   host                  The configuration host
+#   host_cpu              The configuration host CPU
+#   target_optspace       --enable-target-optspace ("yes", "no", "")
+
+# It sets the following shell variables:
+
+
+AM_RUNTESTFLAGS= 
+
+# Set any host dependent compiler flags.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+
+
+case "${host}" in
+  *)
+    ;;
+esac
+
+
diff --git a/contrib/libstdc++/configure.in b/contrib/libstdc++/configure.in
index bd2c9c7..663e4f3 100644
--- a/contrib/libstdc++/configure.in
+++ b/contrib/libstdc++/configure.in
@@ -1,203 +1,391 @@
-# This file is a shell script fragment that supplies the information
-# necessary for a configure script to process the program in
-# this directory.  For more information, look at ../configure.
-
-# If the language specific compiler does not exist, but the "gcc" directory 
-# does, we do not build anything. Note, $r is set by the top-level Makefile.
-# Note that when we look for the compiler, we search both with and without
-# extension to handle cross and canadian cross builds. 
-# Note that if $norecursion is set we're being called from config.status,
-# so don't check for the compiler; we might be doing a make clean.
-compiler_name=cc1plus
-rm -f skip-this-dir
-if test -n "$r" && [ -z "$norecursion" ] ; then
-  if test -d "$r"/gcc; then
-    if test -f "$r"/gcc/$compiler_name \
-       || test -f "$r"/gcc/$compiler_name.exe; then
-      true
-    else
-      echo "rm -f multilib.out" > skip-this-dir
-    fi
-  fi
-fi
+# Process this file with autoconf to produce a configure script, like so:
+# aclocal && autoconf && autoheader && automake
+
+AC_PREREQ(2.13)
+AC_INIT(src/ios.cc)
+
+# This works around the fact that libtool configuration may change LD
+# for this particular configuration, but some shells, instead of
+# keeping the changes in LD private, export them just because LD is
+# exported.
+ORIGINAL_LD_FOR_MULTILIBS=$LD
+
+PACKAGE=libstdc++
+AC_SUBST(PACKAGE)
+# For typical GNU versioning info, format is MAJOR.MINOR.MICRO
+release_VERSION=3.1.0
+AC_SUBST(release_VERSION)
+# For libtool versioning info, format is CURRENT:REVISION:AGE
+libtool_VERSION=4:0:0
+AC_SUBST(libtool_VERSION)
+
+# Gets build, host, target, *_vendor, *_cpu, *_os, etc.
+# AC 2.5x sets target_alias iff the user specified --target, but we use it
+# everywhere, so we set it here just to be sure.  In AC 2.13
+# AC_CANONICAL_TARGET was known as AC_CANONICAL_SYSTEM.
+AC_CANONICAL_SYSTEM
+target_alias=${target_alias-$target}
+AC_SUBST(target_alias)
+
+AM_INIT_AUTOMAKE($PACKAGE, $release_VERSION)
+AM_CONFIG_HEADER(config.h)
+
+# Runs configure.host and configure.target, as well as finds CC, CXX
+# and assorted other critical bits.  Have to run this before the
+# GLIBCPP_ENABLE_* macros below.
+GLIBCPP_CONFIGURE(.)
+
+AC_LIBTOOL_DLOPEN
+AM_PROG_LIBTOOL
+AC_SUBST(enable_shared)
+AC_SUBST(enable_static)
+
+# Check for c++ or library specific bits that don't require linking.
+#GLIBCPP_CHECK_COMPILER_VERSION
+GLIBCPP_CHECK_GNU_MAKE
+
+# Enable all the variable C++ stuff.  C_MBCHAR must come early.
+GLIBCPP_ENABLE_DEBUG($USE_MAINTAINER_MODE)
+GLIBCPP_ENABLE_CSTDIO
+GLIBCPP_ENABLE_CLOCALE
+GLIBCPP_ENABLE_C_MBCHAR([yes])
+GLIBCPP_ENABLE_C99([yes])
+GLIBCPP_ENABLE_LONG_LONG([yes])
+GLIBCPP_ENABLE_CHEADERS([c_std])
+GLIBCPP_ENABLE_THREADS
+GLIBCPP_ENABLE_CXX_FLAGS([none])
+GLIBCPP_ENABLE_SJLJ_EXCEPTIONS
+GLIBCPP_ENABLE_LIBUNWIND_EXCEPTIONS
+GLIBCPP_ENABLE_CONCEPT_CHECKS
+
+
+if test -n "$with_cross_host" || test x"$build" != x"$host"; then
+
+  # This lets us hard-code the functionality we know
+  # we'll have in the cross target environment. "Let" is a
+  # sugar-coated word placed on an especially dull and tedious hack, actually.
+  # Here's why GLIBCPP_CHECK_MATH_SUPPORT, and other autoconf macros
+  # that involve linking can't be used:
+  # "cannot open sim-crt0.o"
+  # "cannot open crt0.o"
+  # etc. All this is because there currently exists no unified,
+  # consistent way for top level CC information to be passed down
+  # to target directories: newlib includes, newlib linking info,
+  # libgloss versus newlib crt0.o, etc. When all of this is done, all
+  # of this hokey, excessive AC_DEFINE junk for crosses can be removed.
 
-if [ "${srcdir}" = "." ] ; then
-  if [ "${with_target_subdir}" != "." ] ; then
-    topsrcdir=${with_multisrctop}../..
+  # We are being configured with some form of cross compiler.
+  GLIBCPP_IS_CROSS_COMPILING=1
+
+  # If Canadian cross, then don't pick up tools from the build
+  # directory.
+  if test -n "$with_cross_host" && test x"$build" != x"$with_cross_host"; then
+    CANADIAN=yes
   else
-    topsrcdir=${with_multisrctop}..
+    CANADIAN=no
   fi
-else
-  topsrcdir=${srcdir}/..
-fi
 
-if [ -d ${topsrcdir}/gcc ] ; then
-  configdirs="tests testsuite"
-else
-  configdirs="tests"
-fi
-srctrigger=sinst.cc
-srcname="ANSI C++ library"
-package_makefile_frag=Make.pack
-package_makefile_rules_frag=Make.pack.r
-
-# per-host:
-
-# per-target:
-
-echo "# Warning: this fragment is automatically generated" > temp.mt
-frags=
-
-# If they didn't specify --enable-shared, don't generate shared libs.
-case "${enable_shared}" in
-  yes) shared=yes ;;
-  no) shared=no ;;
-  *libstdc++*) shared=yes ;;
-  *) shared=no ;;
-esac
-
-if [ "${shared}" = "yes" ]; then
-  case "${target}" in
-    alpha*-*-linux*)	frags=../../config/mh-elfalphapic ;;
-    arm*-*-*)		frags=../../config/mh-armpic ;;
-    hppa*-*-*)		frags=../../config/mh-papic ;;
-    i[3456]86-*-*)	frags=../../config/mh-x86pic ;;
-    powerpc*-*-aix*)	;;
-    powerpc*-*-*)	frags=../../config/mh-ppcpic ;;
-    *-*-*) 		frags=../../config/mh-${target_cpu}pic ;;
-  esac
-  case "${target}" in
-    *-dec-osf*)		frags="${frags} dec-osf.ml";;
-    *-*-hpux*)		frags="${frags} hpux.ml" ;;
-    *-*-irix[56]*)	frags="${frags} irix5.ml" ;;
-    *-*-linux*aout*)	;;
-    *-*-freebsd2*)	;;
-    *-*-freebsd*)	frags="${frags} freebsd.ml" ;;
-    *-*-linux*)		frags="${frags} linux.ml" ;;
-    *-*-openbsd*)		frags="${frags} openbsd.ml" ;;
-    *-*-sysv[45]*|*-*-udk*)	frags="${frags} elf.ml" ;;
-    *-*-solaris*)	frags="${frags} sol2shm.ml" ;;
-    *-*-sunos4*)	frags="${frags} sunos4.ml" ;;
-    *-*-aix*)		frags="${frags} aix.ml" ;;
-    i[3456]86-*-interix*)	frags="${frags} x86-interix.ml" ;;
-    *-*-gnu*)		frags="${frags} gnu.ml" ;;
-  esac
-fi
+  # Construct crosses by hand, eliminating bits that need ld...
+  # GLIBCPP_CHECK_COMPILER_FEATURES
+  # GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+  # GLIBCPP_CHECK_MATH_SUPPORT
 
-# Make sure the right flags are defined for multi-threading.
-case "${target}" in
-  alpha*-*-linux-gnulibc1)	frags="${frags} linux.mt" ;;
-  powerpc*-*-linux-gnulibc1)	frags="${frags} linux.mt" ;;
-  *-*-linux-gnu)		frags="${frags} linux.mt" ;;
-  *-*-openbsd*)		
-  	case "x${enable_threads}" in
-		xyes|xposix)	frags="${frags} openbsd.mt" ;;
-	esac;;
-  m68k-motorola-sysv)		frags="${frags} delta.mt" ;;
-  *-*-solaris*)
-    case "x${enable_threads}" in
-      xposix)			frags="${frags} sol2pth.mt" ;;
-      xsolaris)			frags="${frags} sol2solth.mt" ;;
-    esac ;;
-  *)
-    case "x${enable_threads}" in
-      xposix)			frags="${frags} posix.mt" ;;
-    esac ;;
-esac
-
-for frag in ${frags}; do
-  case ${frag} in
-    ../* )
-      if [ ${srcdir} = . ]; then
-	[ -n "${with_target_subdir}" ] && frag=../${frag}
-	[ -n "${with_multisrctop}" ] && frag=${with_multisrctop}${frag}
+  case "$target_alias" in
+    *-linux*)
+      # Check for available headers.
+      AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+	machine/endian.h machine/param.h sys/machine.h sys/types.h \
+	fp.h locale.h float.h inttypes.h])
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS)
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="config/os/gnu-linux"
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_FINITEF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_HYPOTF)
+      AC_DEFINE(HAVE_SINCOS)
+      AC_DEFINE(HAVE_SINCOSF)
+      if test x"long_double_math_on_this_cpu" = x"yes"; then
+	AC_DEFINE(HAVE_HYPOTL)
       fi
       ;;
+    *-hpux*)
+      # Check for available headers.
+      AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+	machine/endian.h machine/param.h sys/machine.h sys/types.h \
+	fp.h locale.h float.h inttypes.h])
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS)
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="config/os/hpux"
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_FINITEF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_HYPOT)
+      AC_DEFINE(HAVE_SINCOS)
+      AC_DEFINE(HAVE_SINCOSF)
+      ;;
+    *-netbsd*)
+      # Check for available headers.
+      AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \
+	machine/endian.h machine/param.h sys/machine.h sys/types.h \
+	fp.h locale.h float.h inttypes.h])
+      SECTION_FLAGS='-ffunction-sections -fdata-sections'
+      AC_SUBST(SECTION_FLAGS) 
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="config/os/bsd/netbsd"
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_FINITEF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_HYPOTF)
+      ;;
+    *-mingw32*)
+      AC_CHECK_HEADERS([sys/types.h locale.h float.h])
+      GLIBCPP_CHECK_LINKER_FEATURES
+      GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+      GLIBCPP_CHECK_WCHAR_T_SUPPORT
+      os_include_dir="config/os/mingw32"
+      ;;
+    *)
+      os_include_dir="config/os/newlib"
+      AC_DEFINE(HAVE_HYPOT)
+      ;;
+  esac
+
+  case "$target_alias" in
+    *-mingw32*)
+      ;;
+    *)
+      # GLIBCPP_CHECK_STDLIB_SUPPORT
+      AC_DEFINE(HAVE_STRTOF)        
+      AC_DEFINE(HAVE_STRTOLD)        
+      # AC_FUNC_MMAP
+      AC_DEFINE(HAVE_MMAP)
+
+      AC_DEFINE(HAVE_ACOSF)
+      AC_DEFINE(HAVE_ASINF)
+      AC_DEFINE(HAVE_ATAN2F)
+      AC_DEFINE(HAVE_ATANF)
+      AC_DEFINE(HAVE_CEILF)
+      AC_DEFINE(HAVE_COPYSIGN)
+      AC_DEFINE(HAVE_COPYSIGNF)
+      AC_DEFINE(HAVE_COSF)
+      AC_DEFINE(HAVE_COSHF)
+      AC_DEFINE(HAVE_EXPF)
+      AC_DEFINE(HAVE_FABSF)
+      AC_DEFINE(HAVE_FINITE)
+      AC_DEFINE(HAVE_FINITEF)
+      AC_DEFINE(HAVE_FLOORF)
+      AC_DEFINE(HAVE_FMODF)
+      AC_DEFINE(HAVE_FREXPF)
+      AC_DEFINE(HAVE_ISINF)
+      AC_DEFINE(HAVE_ISINFF)
+      AC_DEFINE(HAVE_ISNAN)
+      AC_DEFINE(HAVE_ISNANF)
+      AC_DEFINE(HAVE_LDEXPF)
+      AC_DEFINE(HAVE_LOG10F)
+      AC_DEFINE(HAVE_LOGF)
+      AC_DEFINE(HAVE_MODFF)
+      AC_DEFINE(HAVE_POWF)
+      AC_DEFINE(HAVE_SINF)
+      AC_DEFINE(HAVE_SINHF)
+      AC_DEFINE(HAVE_SQRTF)
+      AC_DEFINE(HAVE_TANF)
+      AC_DEFINE(HAVE_TANHF)
+      ;;
   esac
-  frag=${srcdir}/config/$frag
-  if [ -f ${frag} ]; then
-    echo "Appending ${frag} to target-mkfrag"
-    echo "# Following fragment copied from ${frag}" >> temp.mt
-    cat ${frag} >> temp.mt
+
+  # At some point, we should differentiate between architectures
+  # like x86, which have long double versions, and alpha/powerpc/etc.,
+  # which don't. For the time being, punt.
+  if test x"long_double_math_on_this_cpu" = x"yes"; then
+    AC_DEFINE(HAVE_ACOSL)
+    AC_DEFINE(HAVE_ASINL)
+    AC_DEFINE(HAVE_ATAN2L)
+    AC_DEFINE(HAVE_ATANL)
+    AC_DEFINE(HAVE_CEILL)
+    AC_DEFINE(HAVE_COPYSIGNL)
+    AC_DEFINE(HAVE_COSL)
+    AC_DEFINE(HAVE_COSHL)
+    AC_DEFINE(HAVE_EXPL)
+    AC_DEFINE(HAVE_FABSL)
+    AC_DEFINE(HAVE_FINITEL)
+    AC_DEFINE(HAVE_FLOORL)
+    AC_DEFINE(HAVE_FMODL)
+    AC_DEFINE(HAVE_FREXPL)
+    AC_DEFINE(HAVE_ISINFL)
+    AC_DEFINE(HAVE_ISNANL)
+    AC_DEFINE(HAVE_LDEXPL)
+    AC_DEFINE(HAVE_LOG10L)
+    AC_DEFINE(HAVE_LOGL)
+    AC_DEFINE(HAVE_MODFL)
+    AC_DEFINE(HAVE_POWL)
+    AC_DEFINE(HAVE_SINCOSL)
+    AC_DEFINE(HAVE_SINL)
+    AC_DEFINE(HAVE_SINHL)
+    AC_DEFINE(HAVE_SQRTL)
+    AC_DEFINE(HAVE_TANL)
+    AC_DEFINE(HAVE_TANHL)
   fi
-done
-
-target_makefile_frag=target-mkfrag
-${moveifchange} temp.mt target-mkfrag
-
-LIBDIR=yes
-TO_TOPDIR=../
-ALL='libs'
-XCXXINCLUDES="-I${srcdir} -I${srcdir}/stl -I${TO_TOPDIR}libio -I${srcdir}/${TO_TOPDIR}libio"
-MOSTLYCLEAN='*.o pic stamp-picdir core so_locations $(MOSTLYCLEAN_JUNK)'
-CLEAN='$(CLEAN_JUNK)'
-EXTRA_DISTCLEAN='target-mkfrag'
-
-(. ${srcdir}/${TO_TOPDIR}libio/config.shared) >${package_makefile_frag} 2>${package_makefile_rules_frag}
-
-. ${topsrcdir}/config.if
-echo "
-LIBSTDCXX_INTERFACE=${libstdcxx_interface}
-CXX_INTERFACE=${cxx_interface}
-LIBC_INTERFACE=${libc_interface}
-" >> ${package_makefile_frag}
-
-# This duplicated the AC_PROG_LN_S macro in GNU autoconf.
-rm -f conttestdata
-if ln -s X conftestdata 2>/dev/null
-then
-  rm -f conftestdata
-  LN_S="ln -s"
 else
-  LN_S=ln
-fi
-echo "
-LN_S=$LN_S
-" >> ${package_makefile_frag}
-
-# post-target:
-
-# If cross-compiling, we install in $(tooldir)/lib or in $(libsubdir)
-# depending on --enable-version-specific-runtime-libs.
-if [ -n "${with_cross_host}" ] ; then
-    rm -f Makefile.tem
-    sed \
-        -e 's|^\([ 	]*INSTALLDIR[ 	]*=[ 	]*\)\$(libdir)|\1$(tooldir)/lib|' \
-        Makefile >Makefile.tem
-    mv -f Makefile.tem Makefile
+
+  # We are being configured natively. We can do more elaborate tests
+  # that include AC_TRY_COMPILE now, as the linker is assumed to be
+  # working.
+  GLIBCPP_IS_CROSS_COMPILING=0
+  CANADIAN=no
+
+  # Check for available headers.
+  AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h machine/endian.h \
+  machine/param.h sys/machine.h fp.h locale.h float.h inttypes.h gconv.h])
+
+  GLIBCPP_CHECK_COMPILER_FEATURES
+  GLIBCPP_CHECK_LINKER_FEATURES
+  GLIBCPP_CHECK_BUILTIN_MATH_SUPPORT
+  GLIBCPP_CHECK_MATH_SUPPORT
+  GLIBCPP_CHECK_COMPLEX_MATH_SUPPORT
+  GLIBCPP_CHECK_WCHAR_T_SUPPORT
+  GLIBCPP_CHECK_STDLIB_SUPPORT
+  AC_LC_MESSAGES
+
+  AC_TRY_COMPILE([
+  #include 
+  ], [sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);],
+  [AC_DEFINE(HAVE_SIGSETJMP, 1, [Define if sigsetjmp is available.  ])
+  ])
+
+  AC_FUNC_MMAP
+
+  # Establish limits on memory usage during 'make check'
+  GLIBCPP_CONFIGURE_TESTSUITE
 fi
 
-# enable multilib-ing by default.
-if [ -z "${enable_multilib}" ]; then
-    enable_multilib=yes
+# This depends on the possibly-skipped linker test above.
+GLIBCPP_ENABLE_SYMVERS([yes])
+
+# Propagate the target-specific source directories through the build chain.
+OS_INC_SRCDIR=$os_include_dir/bits
+ATOMICITY_INC_SRCDIR=$ATOMICITYH/bits
+CPU_LIMITS_INC_SRCDIR=$CPULIMITSH/bits
+AC_SUBST(OS_INC_SRCDIR)
+AC_SUBST(ATOMICITY_INC_SRCDIR)
+AC_SUBST(CPU_LIMITS_INC_SRCDIR)
+
+# Set up cross-compile flags
+AC_SUBST(GLIBCPP_IS_CROSS_COMPILING)
+AM_CONDITIONAL(CANADIAN, test "$CANADIAN" = yes)
+ 
+AC_CACHE_SAVE
+
+if test "${multilib}" = "yes"; then
+  multilib_arg="--enable-multilib"
+else
+  multilib_arg=
 fi
 
-. ${topsrcdir}/config-ml.in
-
-gxx_include_dir=
-# Specify the g++ header file directory
-# Check whether --with-gxx-include-dir or --without-gxx-include-dir was given.
-if test "${with_gxx_include_dir+set}" = set; then
-  withval="$with_gxx_include_dir"
-  case "${withval}" in
-    yes)
-      echo "configure.in: error: bad value ${withval} given for g++ include directory" 1>&2
-      exit 1
-      ;;
-    no)	;;
-    *)	gxx_include_dir=$with_gxx_include_dir ;;
-  esac
+# Needed so that g++ can find the correct include subdir automatically.
+INTERFACE=v3
+
+# Export all the install information
+GLIBCPP_EXPORT_INSTALL_INFO
+
+# Export all the include and flag information to makefiles.
+GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_EXPORT_FLAGS
+
+if ${CONFIG_SHELL-/bin/sh} ./libtool --tag CXX --features |
+   grep "enable shared" > /dev/null; then
+  LIBSUPCXX_PICFLAGS=-prefer-pic
+else
+  LIBSUPCXX_PICFLAGS=
 fi
+AC_SUBST(LIBSUPCXX_PICFLAGS)
 
-if test x${gxx_include_dir} = x; then
-  if test x${enable_version_specific_runtime_libs} = xyes; then
-    gxx_include_dir='${libsubdir}/include/g++'
-  else
-    gxx_include_dir='${prefix}/include/g++'-${libstdcxx_interface}
-  fi
+# Generate the various Makefiles, include files, and scripts.
+# NB: Multilibs need MULTISUBDIR defined correctly in src/Makefile.am
+# and libsupc++/Makefile.am so that multilib installs will end up
+# installed in the correct place. To work around this not being passed
+# down from config-ml.in -> top_srcdir/Makefile.am ->
+# top_srcdir/{src,libsupc++}/Makefile.am, manually append it here.
+AC_OUTPUT(Makefile \
+    include/Makefile src/Makefile \
+    libmath/Makefile libio/Makefile libsupc++/Makefile \
+    po/Makefile testsuite/Makefile mkcheck testsuite_flags,
+[if test -n "$CONFIG_FILES"; then
+  LD="${ORIGINAL_LD_FOR_MULTILIBS}"
+  ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+  grep '^MULTISUBDIR =' Makefile >> src/Makefile
+  grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
 fi
+chmod +x mkcheck
+chmod +x testsuite_flags
+],
+srcdir=${srcdir}
+host=${host}
+target=${target}
+with_multisubdir=${with_multisubdir}
+ac_configure_args="${multilib_arg} ${ac_configure_args}"
+CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+glibcpp_basedir=${glibcpp_basedir}
+CC="${CC}"
+CXX="${CXX}"
+)
+dnl  In autoconf 2.5x, AC_OUTPUT is replaced by three AC_ macros:
+dnl  AC_CONFIG_FILES(Makefile \
+dnl      include/Makefile src/Makefile \
+dnl      libmath/Makefile libio/Makefile libsupc++/Makefile \
+dnl      po/Makefile testsuite/Makefile mkcheck testsuite_flags)
+dnl  AC_CONFIG_COMMANDS([default],
+dnl  [if test -n "$CONFIG_FILES"; then
+dnl    ac_file=Makefile . ${glibcpp_basedir}/../config-ml.in
+dnl    grep '^MULTISUBDIR =' Makefile >> src/Makefile
+dnl    grep '^MULTISUBDIR =' Makefile >> libsupc++/Makefile
+dnl  fi
+dnl  chmod +x mkcheck
+dnl  chmod +x testsuite_flags
+dnl  ],
+dnl  srcdir=${srcdir}
+dnl  host=${host}
+dnl  target=${target}
+dnl  with_multisubdir=${with_multisubdir}
+dnl  ac_configure_args="${multilib_arg} ${ac_configure_args}"
+dnl  CONFIG_SHELL=${CONFIG_SHELL-/bin/sh}
+dnl  glibcpp_basedir=${glibcpp_basedir}
+dnl  CC="${CC}"
+dnl  CXX="${CXX}"
+dnl  )
+dnl  AC_OUTPUT
 
-rm -f Makefile.tem
-sed -e "s%^gxx_include_dir[ 	]*=.*$%gxx_include_dir=${gxx_include_dir}%" \
-       Makefile >Makefile.tem
-mv -f Makefile.tem Makefile
+
+# Sanity checking & User-visible messages.
+# Checks down here, otherwise they get scrolled off before
+# the user will notice.
+
+# Trying to get more people to read documentation.  Possibly remove
+# check and warn all the time. There is no "informational" AC_MSG_
+# macro, so these are going to be printed even when --quiet/--silent
+# is given.
+if test ! -f stamp-sanity-warned; then
+  touch stamp-sanity-warned
+  echo ""
+  echo "Please make certain that you read the installation information here:"
+  echo "  faster => ${srcdir}/docs/install.html"
+  echo "  slower => "
+  echo ""
+  echo "and the configuration information here:"
+  echo "  faster => ${srcdir}/docs/configopts.html"
+  echo "  slower => "
+  echo ""
+  echo "before proceeding with ${_cv_gnu_make_command}."
+  echo ""
+fi
diff --git a/contrib/libstdc++/configure.target b/contrib/libstdc++/configure.target
new file mode 100644
index 0000000..48bcdcc
--- /dev/null
+++ b/contrib/libstdc++/configure.target
@@ -0,0 +1,185 @@
+# configure.target
+
+# This shell script handles all target based configuration for libstdc++.
+# It sets various shell variables based on the the target and the
+# configuration options.  You can modify this shell script without
+# needing to rerun autoconf.
+
+# This shell script should be invoked as
+#   . configure.target
+# If it encounters an error, it will exit with a message.
+
+# It uses the following shell variables:
+#   target                The configuration target
+#   target_cpu            The configuration target CPU
+#   target_os             The configuration target OS
+
+# It possibly modifies the following shell variables:
+#   cpu_include_dir        CPU-specific include directory, relative to srcdir
+#   os_include_dir         OS-specific include directory, relative to srcdir
+
+
+# Set any CPU dependent compiler flags.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target_cpu}" in
+  alpha*)
+    cpu_include_dir="config/cpu/alpha"
+    ;;
+  arm*)
+    cpu_include_dir="config/cpu/arm"
+    ;;
+  cris)
+    cpu_include_dir="config/cpu/cris"
+    ;;
+  ia64)
+    cpu_include_dir="config/cpu/ia64"
+    ;;
+  i386)
+    cpu_include_dir="config/cpu/i386"
+    ;;
+  i486 | i586 | i686 | i786)
+    cpu_include_dir="config/cpu/i486"
+    ;;
+  m68k | m680[246]0)
+    cpu_include_dir="config/cpu/m68k"
+    ;;
+  powerpc | rs6000)
+    cpu_include_dir="config/cpu/powerpc"
+    ;;
+  s390 | s390x)
+    cpu_include_dir="config/cpu/s390"
+    ;;
+  sparc64 | ultrasparc)
+    cpu_include_dir="config/cpu/sparc/sparc64"
+    ;;
+  sparc*)
+    cpu_include_dir="config/cpu/sparc/sparc32"
+    ;;
+  x86_64*)
+    cpu_include_dir="config/cpu/x86-64"
+    ;;
+  *)
+    cpu_include_dir="config/cpu/generic"
+    ;;
+esac
+
+
+# Set any OS dependent compiler flags.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target_os}" in
+  aix4.[3456789]* | aix[56789]*)
+    os_include_dir="config/os/aix"
+    OPT_LDFLAGS="-Wl,-G"
+    ;;
+  bsd* | freebsd* )
+    os_include_dir="config/os/bsd/freebsd"
+    ;;
+  cygwin*)
+    os_include_dir="config/os/newlib"
+    ;;
+  *djgpp*)
+    os_include_dir="config/os/djgpp"
+    ;;
+  linux* | gnu*)
+    os_include_dir="config/os/gnu-linux"
+    ;;
+  irix[1-6] | irix[1-5].* | irix6.[0-4])
+   # This is known to work on at least IRIX 5.2 and 6.3.
+   os_include_dir="config/os/irix/irix5.2"
+   ;;
+  irix6.5)
+    os_include_dir="config/os/irix/irix6.5"
+    ;;
+  mingw32*)
+    os_include_dir="config/os/mingw32"
+    ;;
+  netbsd*)
+    os_include_dir="config/os/bsd/netbsd"
+    ;;
+  solaris2.5*)
+    os_include_dir="config/os/solaris/solaris2.5"
+    ;;
+  solaris2.6*)
+    os_include_dir="config/os/solaris/solaris2.6"
+    ;;
+  solaris2.7* | solaris2.8*)
+    os_include_dir="config/os/solaris/solaris2.7"
+    ;;
+  hpux*)
+    os_include_dir="config/os/hpux"
+    ;;
+  *)
+    os_include_dir="config/os/generic"
+    ;;
+esac
+
+
+# Set any flags dependent on the full target triplet.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target}" in
+   *-*-aix[456789]*)
+     # We set os_include_dir to config/os/aix only on AIX 4.3 and
+     # newer, but config/os/aix/bits/atomicity.h works on earlier
+     # versions of AIX 4.*, so we explicitly duplicate the directory
+     # here, because os_include_dir.
+     ATOMICITYH=config/os/aix
+     ;;
+   *-*-aix*)
+     ATOMICITYH=config/cpu/generic
+     ;;
+   *-*-irix*)
+     ATOMICITYH=$os_include_dir
+     ;;
+   mcore-*-pe*)
+     # The EPOC C++ environment does not support exceptions.
+     if test -z "$enable_cxx_flags"; then
+       enable_cxx_flags="-frtti -fno-exceptions"
+     fi
+     ATOMICITYH=$cpu_include_dir
+     ;;
+   *)
+     ATOMICITYH=$cpu_include_dir
+     ;;
+esac
+
+# Set CPULIMITSH to the directory where the configuration-dependent
+# cpu_limits.h can be found.
+# THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+case "${target}" in
+   *-*-hpux*)
+     CPULIMITSH=config/os/hpux
+     ;;
+   alpha*-*-*osf5*)
+     CPULIMITSH=config/os/osf/osf5.0
+     ;;
+   alpha*-*-*)
+     CPULIMITSH=config/cpu/alpha
+     ;;
+   cris-*-*)
+     CPULIMITSH=config/cpu/cris
+     ;;
+   ia64-*-*)
+     CPULIMITSH=config/cpu/ia64
+     ;;
+   i?86-*-*)
+     CPULIMITSH=config/cpu/i386
+     ;;
+   m68k-*-* | m680[246]0-*-*)
+     CPULIMITSH=config/cpu/m68k
+     ;;
+   mmix-*-*)
+     CPULIMITSH=config/cpu/mmix
+     ;;
+   powerpc-*-*)
+     CPULIMITSH=config/cpu/powerpc
+     ;;
+   s390-*-* | s390x-*-*)
+     CPULIMITSH=config/cpu/s390
+     ;;
+   x86_64-*-*)
+     CPULIMITSH=config/cpu/x86-64
+     ;;
+   *)
+     CPULIMITSH=config/cpu/generic
+     ;;
+esac
diff --git a/contrib/libstdc++/include/Makefile.am b/contrib/libstdc++/include/Makefile.am
new file mode 100644
index 0000000..38d1f7b
--- /dev/null
+++ b/contrib/libstdc++/include/Makefile.am
@@ -0,0 +1,463 @@
+## Makefile for the include subdirectory of the GNU C++ Standard library.
+##
+## Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## 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.
+
+AUTOMAKE_OPTIONS = 1.3 gnits
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Cross compiler and multilib support.
+CXX = @glibcpp_CXX@
+glibcpp_srcdir=@glibcpp_srcdir@
+glibcpp_builddir=@glibcpp_builddir@
+
+bits_srcdir = ${glibcpp_srcdir}/include/bits
+bits_builddir = ./bits
+bits_headers = \
+	${bits_srcdir}/basic_ios.h \
+	${bits_srcdir}/basic_ios.tcc \
+	${bits_srcdir}/basic_string.h \
+	${bits_srcdir}/basic_string.tcc \
+	${bits_srcdir}/boost_concept_check.h \
+	${bits_srcdir}/char_traits.h \
+	${bits_srcdir}/codecvt.h \
+	${bits_srcdir}/concept_check.h \
+	${bits_srcdir}/cpp_type_traits.h \
+	${bits_srcdir}/fpos.h \
+	${bits_srcdir}/fstream.tcc \
+	${bits_srcdir}/functexcept.h \
+	${bits_srcdir}/generic_shadow.h \
+	${bits_srcdir}/gslice.h \
+	${bits_srcdir}/gslice_array.h \
+	${bits_srcdir}/indirect_array.h \
+	${bits_srcdir}/ios_base.h \
+	${bits_srcdir}/istream.tcc \
+	${bits_srcdir}/locale_facets.h \
+	${bits_srcdir}/locale_facets.tcc \
+	${bits_srcdir}/localefwd.h \
+	${bits_srcdir}/mask_array.h \
+	${bits_srcdir}/ostream.tcc \
+	${bits_srcdir}/pthread_allocimpl.h \
+	${bits_srcdir}/stream_iterator.h \
+	${bits_srcdir}/streambuf_iterator.h \
+	${bits_srcdir}/slice.h \
+	${bits_srcdir}/slice_array.h \
+	${bits_srcdir}/sstream.tcc \
+	${bits_srcdir}/stl_algo.h \
+	${bits_srcdir}/stl_algobase.h \
+	${bits_srcdir}/stl_alloc.h \
+	${bits_srcdir}/stl_bvector.h \
+	${bits_srcdir}/stl_construct.h \
+	${bits_srcdir}/stl_deque.h \
+	${bits_srcdir}/stl_function.h \
+	${bits_srcdir}/stl_heap.h \
+	${bits_srcdir}/stl_iterator.h \
+	${bits_srcdir}/stl_iterator_base_funcs.h \
+	${bits_srcdir}/stl_iterator_base_types.h \
+	${bits_srcdir}/stl_list.h \
+	${bits_srcdir}/stl_map.h \
+	${bits_srcdir}/stl_multimap.h \
+	${bits_srcdir}/stl_multiset.h \
+	${bits_srcdir}/stl_numeric.h \
+	${bits_srcdir}/stl_pair.h \
+	${bits_srcdir}/stl_pthread_alloc.h \
+	${bits_srcdir}/stl_queue.h \
+	${bits_srcdir}/stl_raw_storage_iter.h \
+	${bits_srcdir}/stl_relops.h \
+	${bits_srcdir}/stl_set.h \
+	${bits_srcdir}/stl_stack.h \
+	${bits_srcdir}/stl_tempbuf.h \
+	${bits_srcdir}/stl_threads.h \
+	${bits_srcdir}/stl_tree.h \
+	${bits_srcdir}/stl_uninitialized.h \
+	${bits_srcdir}/stl_vector.h \
+	${bits_srcdir}/streambuf.tcc \
+	${bits_srcdir}/stringfwd.h \
+	${bits_srcdir}/type_traits.h \
+	${bits_srcdir}/valarray_array.h \
+	${bits_srcdir}/valarray_array.tcc \
+	${bits_srcdir}/valarray_meta.h
+
+backward_srcdir = ${glibcpp_srcdir}/include/backward
+backward_builddir = ./backward
+backward_headers = \
+	${backward_srcdir}/complex.h \
+	${backward_srcdir}/iomanip.h \
+	${backward_srcdir}/istream.h \
+	${backward_srcdir}/ostream.h \
+	${backward_srcdir}/stream.h \
+	${backward_srcdir}/streambuf.h \
+	${backward_srcdir}/algo.h \
+	${backward_srcdir}/algobase.h \
+	${backward_srcdir}/alloc.h \
+	${backward_srcdir}/bvector.h \
+	${backward_srcdir}/defalloc.h \
+	${backward_srcdir}/deque.h \
+	${backward_srcdir}/function.h \
+	${backward_srcdir}/hash_map.h \
+	${backward_srcdir}/hash_set.h \
+	${backward_srcdir}/hashtable.h \
+	${backward_srcdir}/heap.h \
+	${backward_srcdir}/iostream.h \
+	${backward_srcdir}/iterator.h \
+	${backward_srcdir}/list.h \
+	${backward_srcdir}/map.h \
+	${backward_srcdir}/multimap.h \
+	${backward_srcdir}/new.h \
+	${backward_srcdir}/multiset.h \
+	${backward_srcdir}/pair.h \
+	${backward_srcdir}/queue.h \
+	${backward_srcdir}/rope.h \
+	${backward_srcdir}/set.h \
+	${backward_srcdir}/slist.h \
+	${backward_srcdir}/stack.h \
+	${backward_srcdir}/tempbuf.h \
+	${backward_srcdir}/tree.h \
+	${backward_srcdir}/vector.h \
+	${backward_srcdir}/fstream.h \
+	${backward_srcdir}/strstream.h \
+	${backward_srcdir}/strstream \
+	${backward_srcdir}/backward_warning.h
+
+ext_srcdir = ${glibcpp_srcdir}/include/ext
+ext_builddir = ./ext
+ext_headers = \
+	${ext_srcdir}/algorithm \
+	${ext_srcdir}/enc_filebuf.h \
+	${ext_srcdir}/stdio_filebuf.h \
+	${ext_srcdir}/functional \
+	${ext_srcdir}/hash_map \
+	${ext_srcdir}/hash_set \
+	${ext_srcdir}/iterator \
+	${ext_srcdir}/memory \
+	${ext_srcdir}/numeric \
+	${ext_srcdir}/rb_tree \
+	${ext_srcdir}/rope \
+	${ext_srcdir}/ropeimpl.h \
+	${ext_srcdir}/slist \
+	${ext_srcdir}/stl_hash_fun.h \
+	${ext_srcdir}/stl_hashtable.h \
+	${ext_srcdir}/stl_rope.h
+
+# This is the common subset of files that all three "C" header models use.
+c_base_srcdir = @C_INCLUDE_DIR@
+c_base_builddir = .
+c_base_headers = \
+	${c_base_srcdir}/std_cassert.h \
+	${c_base_srcdir}/std_cctype.h \
+	${c_base_srcdir}/std_cerrno.h \
+	${c_base_srcdir}/std_cfloat.h \
+	${c_base_srcdir}/std_ciso646.h \
+	${c_base_srcdir}/std_climits.h \
+	${c_base_srcdir}/std_clocale.h \
+	${c_base_srcdir}/std_cmath.h \
+	${c_base_srcdir}/std_csetjmp.h \
+	${c_base_srcdir}/std_csignal.h \
+	${c_base_srcdir}/std_cstdarg.h \
+	${c_base_srcdir}/std_cstddef.h \
+	${c_base_srcdir}/std_cstdio.h \
+	${c_base_srcdir}/std_cstdlib.h \
+	${c_base_srcdir}/std_cstring.h \
+	${c_base_srcdir}/std_ctime.h \
+	${c_base_srcdir}/std_cwchar.h \
+	${c_base_srcdir}/std_cwctype.h 
+c_base_headers_rename = \
+	cassert \
+	cctype \
+	cerrno \
+	cfloat \
+	ciso646 \
+	climits \
+	clocale \
+	cmath \
+	csetjmp \
+	csignal \
+	cstdarg \
+	cstddef \
+	cstdio \
+	cstdlib \
+	cstring \
+	ctime \
+	cwchar \
+	cwctype 
+
+# Some of the different "C" header models need extra files.
+# For --enable-cheaders=c_std
+if GLIBCPP_C_HEADERS_C_STD
+c_base_headers_extra = \
+	${c_base_srcdir}/cmath.tcc 
+else
+c_base_headers_extra = 
+endif
+
+std_srcdir = ${glibcpp_srcdir}/include/std
+std_builddir = .
+std_headers = \
+	${std_srcdir}/std_algorithm.h \
+	${std_srcdir}/std_bitset.h \
+	${std_srcdir}/std_complex.h \
+	${std_srcdir}/std_deque.h \
+	${std_srcdir}/std_fstream.h \
+	${std_srcdir}/std_functional.h \
+	${std_srcdir}/std_iomanip.h \
+	${std_srcdir}/std_ios.h \
+	${std_srcdir}/std_iosfwd.h \
+	${std_srcdir}/std_iostream.h \
+	${std_srcdir}/std_istream.h \
+	${std_srcdir}/std_iterator.h \
+	${std_srcdir}/std_limits.h \
+	${std_srcdir}/std_list.h \
+	${std_srcdir}/std_locale.h \
+	${std_srcdir}/std_map.h \
+	${std_srcdir}/std_memory.h \
+	${std_srcdir}/std_numeric.h \
+	${std_srcdir}/std_ostream.h \
+	${std_srcdir}/std_queue.h \
+	${std_srcdir}/std_set.h \
+	${std_srcdir}/std_sstream.h \
+	${std_srcdir}/std_stack.h \
+	${std_srcdir}/std_stdexcept.h \
+	${std_srcdir}/std_streambuf.h \
+	${std_srcdir}/std_string.h \
+	${std_srcdir}/std_utility.h \
+	${std_srcdir}/std_valarray.h \
+	${std_srcdir}/std_vector.h
+# Renamed at build time. 
+std_headers_rename = \
+	algorithm \
+	bitset \
+	complex \
+	deque \
+	fstream \
+	functional \
+	iomanip \
+	ios \
+	iosfwd \
+	iostream \
+	istream \
+	iterator \
+	limits \
+	list \
+	locale \
+	map \
+	memory \
+	numeric \
+	ostream \
+	queue \
+	set \
+	sstream \
+	stack \
+	stdexcept \
+	streambuf \
+	string \
+	utility \
+	valarray \
+	vector
+
+target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
+target_builddir = ./${target_alias}/bits
+target_headers = \
+	${target_srcdir}/ctype_base.h \
+	${target_srcdir}/ctype_inline.h \
+	${target_srcdir}/ctype_noninline.h \
+	${target_srcdir}/os_defines.h \
+	${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
+	${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
+# These extra_target_headers files are all built with ad hoc naming rules.
+extra_target_headers = \
+	${target_builddir}/basic_file.h \
+	${target_builddir}/c++config.h \
+	${target_builddir}/c++io.h \
+	${target_builddir}/c++locale.h \
+	${target_builddir}/messages_members.h \
+	${target_builddir}/codecvt_specializations.h
+
+thread_target_headers = \
+	${target_builddir}/gthr.h \
+	${target_builddir}/gthr-single.h \
+	${target_builddir}/gthr-posix.h \
+	${target_builddir}/gthr-default.h
+
+# List of all timestamp files.  By keeping only one copy of this list, both
+# CLEANFILES and all-local are kept up-to-date.
+allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
+	${target_builddir}/stamp-target
+
+
+# Here are the rules for building the headers
+all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
+
+# This rule is slightly different, in that we must change the name of the
+# local file from std_foo.h to foo.
+stamp-std: ${std_headers}
+	@if [ ! -d "${std_builddir}" ]; then \
+	  mkdir -p ${std_builddir} ;\
+	fi ;\
+	(cd ${std_builddir} && for h in $?; do \
+	  official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+	  @LN_S@ $$h ./$${official_name} || true ;\
+	done) ;\
+	echo `date` > stamp-std 
+
+stamp-bits: ${bits_headers}
+	@if [ ! -d "${bits_builddir}" ]; then \
+	  mkdir -p ${bits_builddir} ;\
+	fi ;\
+	(cd ${bits_builddir} && @LN_S@ $? . || true) ;\
+	echo `date` > stamp-bits
+
+stamp-c_base: ${c_base_headers} ${c_base_headers_extra} 
+	@if [ ! -d "${c_base_builddir}" ]; then \
+	  mkdir -p ${c_base_builddir} ;\
+	fi ;\
+	(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
+	  official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+	  @LN_S@ $$h ./$${official_name} || true ;\
+	done) ;\
+	if [ ! -z "${c_base_headers_extra}" ]; then \
+	  (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra}  . || true) ;\
+	fi ;\
+	echo `date` > stamp-c_base
+
+stamp-backward: ${backward_headers}
+	@if [ ! -d "${backward_builddir}" ]; then \
+	  mkdir -p ${backward_builddir} ;\
+	fi ;\
+	(cd ${backward_builddir} && @LN_S@ $? . || true) ;\
+	echo `date` > stamp-backward
+
+stamp-ext: ${ext_headers}
+	@if [ ! -d "${ext_builddir}" ]; then \
+	  mkdir -p ${ext_builddir} ;\
+	fi ;\
+	(cd ${ext_builddir} && @LN_S@ $? . || true) ;\
+	echo `date` > stamp-ext
+
+stamp-${target_alias}:
+	@if [ ! -d ${target_builddir} ]; then \
+	  mkdir -p ${target_builddir} ;\
+	  echo `date` > stamp-${target_alias} ;\
+	fi
+
+# Target includes static.
+${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
+	@cd ${target_builddir} ;\
+	if [ ! -f stamp-target ]; then \
+	  @LN_S@ ${target_headers} . || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
+	  echo `date` > stamp-target; \
+	fi
+
+# Target includes dynamic.
+${target_builddir}/c++config.h: ${CONFIG_HEADER} \
+				${glibcpp_srcdir}/include/bits/c++config \
+				stamp-${target_alias}
+	@cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
+	sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
+	    -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
+	    -e 's/VERSION/_GLIBCPP_VERSION/g' \
+	    -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
+	    < ${CONFIG_HEADER} >> $@ ;\
+	echo "#endif // _CPP_CPPCONFIG_" >>$@
+
+# Target includes for threads
+glibcpp_thread_h = @glibcpp_thread_h@
+uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
+
+${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
+	sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
+	    -e 's,^#include "\(.*\)",#include ,g' \
+	    < ${toplevel_srcdir}/gcc/gthr.h > $@
+
+${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
+				  stamp-${target_alias}
+	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
+	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+	    < ${toplevel_srcdir}/gcc/gthr-single.h > $@
+
+${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
+				   stamp-${target_alias}
+	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
+	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+	    -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+	    < ${toplevel_srcdir}/gcc/gthr-posix.h > $@
+
+${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
+				   stamp-${target_alias}
+	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
+	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+	    -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+	    -e 's,^#include "\(.*\)",#include ,g' \
+	    < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
+
+# For robustness sake (in light of junk files or in-source
+# configuration), copy from the build or source tree to the install
+# tree using only the human-maintained file lists and directory
+# components.  Yes, with minor differences, this is sheer duplication
+# of the staging rules above using $(INSTALL_DATA) instead of LN_S and
+# `$(mkinstalldirs)' instead of `mkdir -p'.  In particular,
+# extra_target_headers are taken out of the build tree staging area;
+# the rest are taken from the original source tree.
+gxx_include_dir = @gxx_include_dir@
+install-data-local:
+	$(mkinstalldirs) ${gxx_include_dir}
+	$(mkinstalldirs) ${gxx_include_dir}/${bits_builddir}
+	for file in ${bits_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${backward_builddir}
+	for file in ${backward_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${ext_builddir}
+	for file in ${ext_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${c_base_builddir}
+	for file in ${c_base_headers_rename}; do \
+	  $(INSTALL_DATA) ${c_base_builddir}/$${file} \
+	    ${gxx_include_dir}/${c_base_builddir}; done
+	c_base_headers_extra_install=${c_base_headers_extra};\
+	for file in $$c_base_headers_extra_install; do \
+	  $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${std_builddir}
+	for file in ${std_headers_rename}; do \
+	  $(INSTALL_DATA) ${std_builddir}/$${file} \
+	    ${gxx_include_dir}/${std_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${target_builddir}
+	for file in ${target_headers} ${extra_target_headers} \
+	 ${thread_target_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
+
+# By adding these files here, automake will remove them for 'make clean'
+#CLEANFILES = ${allstamps}
+
+# Stop implicit '.o' make rules from ever stomping on extensionless
+# headers, in the improbable case where some foolish, crack-addled
+# developer tries to create them via make in the include build
+# directory. (This is more of an example of how this kind of rule can
+# be made.)
+.PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
+$(std_headers_rename): ; @:
+$(c_base_headers_rename): ; @:
diff --git a/contrib/libstdc++/include/Makefile.in b/contrib/libstdc++/include/Makefile.in
new file mode 100644
index 0000000..4a2cecd
--- /dev/null
+++ b/contrib/libstdc++/include/Makefile.in
@@ -0,0 +1,699 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+AS = @AS@
+ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+AWK = @AWK@
+BASIC_FILE_H = @BASIC_FILE_H@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCODECVT_C = @CCODECVT_C@
+CCODECVT_H = @CCODECVT_H@
+CLOCALE_H = @CLOCALE_H@
+CMESSAGES_H = @CMESSAGES_H@
+CPP = @CPP@
+CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
+CSHADOW_FLAGS = @CSHADOW_FLAGS@
+CSTDIO_H = @CSTDIO_H@
+CXXCPP = @CXXCPP@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DATADIRNAME = @DATADIRNAME@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DLLTOOL = @DLLTOOL@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIBICONV = @LIBICONV@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+STRIP = @STRIP@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+check_msgfmt = @check_msgfmt@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+glibcpp_CXX = @glibcpp_CXX@
+glibcpp_MOFILES = @glibcpp_MOFILES@
+glibcpp_POFILES = @glibcpp_POFILES@
+glibcpp_basedir = @glibcpp_basedir@
+glibcpp_localedir = @glibcpp_localedir@
+glibcpp_prefixdir = @glibcpp_prefixdir@
+glibcpp_toolexecdir = @glibcpp_toolexecdir@
+glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+ifGNUmake = @ifGNUmake@
+libio_la = @libio_la@
+libtool_VERSION = @libtool_VERSION@
+release_VERSION = @release_VERSION@
+toplevel_srcdir = @toplevel_srcdir@
+
+AUTOMAKE_OPTIONS = 1.3 gnits
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Cross compiler and multilib support.
+CXX = @glibcpp_CXX@
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_builddir = @glibcpp_builddir@
+
+bits_srcdir = ${glibcpp_srcdir}/include/bits
+bits_builddir = ./bits
+bits_headers = \
+	${bits_srcdir}/basic_ios.h \
+	${bits_srcdir}/basic_ios.tcc \
+	${bits_srcdir}/basic_string.h \
+	${bits_srcdir}/basic_string.tcc \
+	${bits_srcdir}/boost_concept_check.h \
+	${bits_srcdir}/char_traits.h \
+	${bits_srcdir}/codecvt.h \
+	${bits_srcdir}/concept_check.h \
+	${bits_srcdir}/cpp_type_traits.h \
+	${bits_srcdir}/fpos.h \
+	${bits_srcdir}/fstream.tcc \
+	${bits_srcdir}/functexcept.h \
+	${bits_srcdir}/generic_shadow.h \
+	${bits_srcdir}/gslice.h \
+	${bits_srcdir}/gslice_array.h \
+	${bits_srcdir}/indirect_array.h \
+	${bits_srcdir}/ios_base.h \
+	${bits_srcdir}/istream.tcc \
+	${bits_srcdir}/locale_facets.h \
+	${bits_srcdir}/locale_facets.tcc \
+	${bits_srcdir}/localefwd.h \
+	${bits_srcdir}/mask_array.h \
+	${bits_srcdir}/ostream.tcc \
+	${bits_srcdir}/pthread_allocimpl.h \
+	${bits_srcdir}/stream_iterator.h \
+	${bits_srcdir}/streambuf_iterator.h \
+	${bits_srcdir}/slice.h \
+	${bits_srcdir}/slice_array.h \
+	${bits_srcdir}/sstream.tcc \
+	${bits_srcdir}/stl_algo.h \
+	${bits_srcdir}/stl_algobase.h \
+	${bits_srcdir}/stl_alloc.h \
+	${bits_srcdir}/stl_bvector.h \
+	${bits_srcdir}/stl_construct.h \
+	${bits_srcdir}/stl_deque.h \
+	${bits_srcdir}/stl_function.h \
+	${bits_srcdir}/stl_heap.h \
+	${bits_srcdir}/stl_iterator.h \
+	${bits_srcdir}/stl_iterator_base_funcs.h \
+	${bits_srcdir}/stl_iterator_base_types.h \
+	${bits_srcdir}/stl_list.h \
+	${bits_srcdir}/stl_map.h \
+	${bits_srcdir}/stl_multimap.h \
+	${bits_srcdir}/stl_multiset.h \
+	${bits_srcdir}/stl_numeric.h \
+	${bits_srcdir}/stl_pair.h \
+	${bits_srcdir}/stl_pthread_alloc.h \
+	${bits_srcdir}/stl_queue.h \
+	${bits_srcdir}/stl_raw_storage_iter.h \
+	${bits_srcdir}/stl_relops.h \
+	${bits_srcdir}/stl_set.h \
+	${bits_srcdir}/stl_stack.h \
+	${bits_srcdir}/stl_tempbuf.h \
+	${bits_srcdir}/stl_threads.h \
+	${bits_srcdir}/stl_tree.h \
+	${bits_srcdir}/stl_uninitialized.h \
+	${bits_srcdir}/stl_vector.h \
+	${bits_srcdir}/streambuf.tcc \
+	${bits_srcdir}/stringfwd.h \
+	${bits_srcdir}/type_traits.h \
+	${bits_srcdir}/valarray_array.h \
+	${bits_srcdir}/valarray_array.tcc \
+	${bits_srcdir}/valarray_meta.h
+
+
+backward_srcdir = ${glibcpp_srcdir}/include/backward
+backward_builddir = ./backward
+backward_headers = \
+	${backward_srcdir}/complex.h \
+	${backward_srcdir}/iomanip.h \
+	${backward_srcdir}/istream.h \
+	${backward_srcdir}/ostream.h \
+	${backward_srcdir}/stream.h \
+	${backward_srcdir}/streambuf.h \
+	${backward_srcdir}/algo.h \
+	${backward_srcdir}/algobase.h \
+	${backward_srcdir}/alloc.h \
+	${backward_srcdir}/bvector.h \
+	${backward_srcdir}/defalloc.h \
+	${backward_srcdir}/deque.h \
+	${backward_srcdir}/function.h \
+	${backward_srcdir}/hash_map.h \
+	${backward_srcdir}/hash_set.h \
+	${backward_srcdir}/hashtable.h \
+	${backward_srcdir}/heap.h \
+	${backward_srcdir}/iostream.h \
+	${backward_srcdir}/iterator.h \
+	${backward_srcdir}/list.h \
+	${backward_srcdir}/map.h \
+	${backward_srcdir}/multimap.h \
+	${backward_srcdir}/new.h \
+	${backward_srcdir}/multiset.h \
+	${backward_srcdir}/pair.h \
+	${backward_srcdir}/queue.h \
+	${backward_srcdir}/rope.h \
+	${backward_srcdir}/set.h \
+	${backward_srcdir}/slist.h \
+	${backward_srcdir}/stack.h \
+	${backward_srcdir}/tempbuf.h \
+	${backward_srcdir}/tree.h \
+	${backward_srcdir}/vector.h \
+	${backward_srcdir}/fstream.h \
+	${backward_srcdir}/strstream.h \
+	${backward_srcdir}/strstream \
+	${backward_srcdir}/backward_warning.h
+
+
+ext_srcdir = ${glibcpp_srcdir}/include/ext
+ext_builddir = ./ext
+ext_headers = \
+	${ext_srcdir}/algorithm \
+	${ext_srcdir}/enc_filebuf.h \
+	${ext_srcdir}/stdio_filebuf.h \
+	${ext_srcdir}/functional \
+	${ext_srcdir}/hash_map \
+	${ext_srcdir}/hash_set \
+	${ext_srcdir}/iterator \
+	${ext_srcdir}/memory \
+	${ext_srcdir}/numeric \
+	${ext_srcdir}/rb_tree \
+	${ext_srcdir}/rope \
+	${ext_srcdir}/ropeimpl.h \
+	${ext_srcdir}/slist \
+	${ext_srcdir}/stl_hash_fun.h \
+	${ext_srcdir}/stl_hashtable.h \
+	${ext_srcdir}/stl_rope.h
+
+
+# This is the common subset of files that all three "C" header models use.
+c_base_srcdir = @C_INCLUDE_DIR@
+c_base_builddir = .
+c_base_headers = \
+	${c_base_srcdir}/std_cassert.h \
+	${c_base_srcdir}/std_cctype.h \
+	${c_base_srcdir}/std_cerrno.h \
+	${c_base_srcdir}/std_cfloat.h \
+	${c_base_srcdir}/std_ciso646.h \
+	${c_base_srcdir}/std_climits.h \
+	${c_base_srcdir}/std_clocale.h \
+	${c_base_srcdir}/std_cmath.h \
+	${c_base_srcdir}/std_csetjmp.h \
+	${c_base_srcdir}/std_csignal.h \
+	${c_base_srcdir}/std_cstdarg.h \
+	${c_base_srcdir}/std_cstddef.h \
+	${c_base_srcdir}/std_cstdio.h \
+	${c_base_srcdir}/std_cstdlib.h \
+	${c_base_srcdir}/std_cstring.h \
+	${c_base_srcdir}/std_ctime.h \
+	${c_base_srcdir}/std_cwchar.h \
+	${c_base_srcdir}/std_cwctype.h 
+
+c_base_headers_rename = \
+	cassert \
+	cctype \
+	cerrno \
+	cfloat \
+	ciso646 \
+	climits \
+	clocale \
+	cmath \
+	csetjmp \
+	csignal \
+	cstdarg \
+	cstddef \
+	cstdio \
+	cstdlib \
+	cstring \
+	ctime \
+	cwchar \
+	cwctype 
+
+@GLIBCPP_C_HEADERS_C_STD_TRUE@c_base_headers_extra = @GLIBCPP_C_HEADERS_C_STD_TRUE@\
+@GLIBCPP_C_HEADERS_C_STD_TRUE@	${c_base_srcdir}/cmath.tcc 
+@GLIBCPP_C_HEADERS_C_STD_FALSE@c_base_headers_extra = 
+
+std_srcdir = ${glibcpp_srcdir}/include/std
+std_builddir = .
+std_headers = \
+	${std_srcdir}/std_algorithm.h \
+	${std_srcdir}/std_bitset.h \
+	${std_srcdir}/std_complex.h \
+	${std_srcdir}/std_deque.h \
+	${std_srcdir}/std_fstream.h \
+	${std_srcdir}/std_functional.h \
+	${std_srcdir}/std_iomanip.h \
+	${std_srcdir}/std_ios.h \
+	${std_srcdir}/std_iosfwd.h \
+	${std_srcdir}/std_iostream.h \
+	${std_srcdir}/std_istream.h \
+	${std_srcdir}/std_iterator.h \
+	${std_srcdir}/std_limits.h \
+	${std_srcdir}/std_list.h \
+	${std_srcdir}/std_locale.h \
+	${std_srcdir}/std_map.h \
+	${std_srcdir}/std_memory.h \
+	${std_srcdir}/std_numeric.h \
+	${std_srcdir}/std_ostream.h \
+	${std_srcdir}/std_queue.h \
+	${std_srcdir}/std_set.h \
+	${std_srcdir}/std_sstream.h \
+	${std_srcdir}/std_stack.h \
+	${std_srcdir}/std_stdexcept.h \
+	${std_srcdir}/std_streambuf.h \
+	${std_srcdir}/std_string.h \
+	${std_srcdir}/std_utility.h \
+	${std_srcdir}/std_valarray.h \
+	${std_srcdir}/std_vector.h
+
+# Renamed at build time. 
+std_headers_rename = \
+	algorithm \
+	bitset \
+	complex \
+	deque \
+	fstream \
+	functional \
+	iomanip \
+	ios \
+	iosfwd \
+	iostream \
+	istream \
+	iterator \
+	limits \
+	list \
+	locale \
+	map \
+	memory \
+	numeric \
+	ostream \
+	queue \
+	set \
+	sstream \
+	stack \
+	stdexcept \
+	streambuf \
+	string \
+	utility \
+	valarray \
+	vector
+
+
+target_srcdir = ${glibcpp_srcdir}/@OS_INC_SRCDIR@
+target_builddir = ./${target_alias}/bits
+target_headers = \
+	${target_srcdir}/ctype_base.h \
+	${target_srcdir}/ctype_inline.h \
+	${target_srcdir}/ctype_noninline.h \
+	${target_srcdir}/os_defines.h \
+	${glibcpp_srcdir}/@ATOMICITY_INC_SRCDIR@/atomicity.h \
+	${glibcpp_srcdir}/@CPU_LIMITS_INC_SRCDIR@/cpu_limits.h 
+
+# These extra_target_headers files are all built with ad hoc naming rules.
+extra_target_headers = \
+	${target_builddir}/basic_file.h \
+	${target_builddir}/c++config.h \
+	${target_builddir}/c++io.h \
+	${target_builddir}/c++locale.h \
+	${target_builddir}/messages_members.h \
+	${target_builddir}/codecvt_specializations.h
+
+
+thread_target_headers = \
+	${target_builddir}/gthr.h \
+	${target_builddir}/gthr-single.h \
+	${target_builddir}/gthr-posix.h \
+	${target_builddir}/gthr-default.h
+
+
+# List of all timestamp files.  By keeping only one copy of this list, both
+# CLEANFILES and all-local are kept up-to-date.
+allstamps = stamp-std stamp-bits stamp-c_base stamp-backward stamp-ext \
+	${target_builddir}/stamp-target
+
+
+# Target includes for threads
+glibcpp_thread_h = @glibcpp_thread_h@
+uppercase = [ABCDEFGHIJKLMNOPQRSTUVWXYZ_]
+
+# For robustness sake (in light of junk files or in-source
+# configuration), copy from the build or source tree to the install
+# tree using only the human-maintained file lists and directory
+# components.  Yes, with minor differences, this is sheer duplication
+# of the staging rules above using $(INSTALL_DATA) instead of LN_S and
+# `$(mkinstalldirs)' instead of `mkdir -p'.  In particular,
+# extra_target_headers are taken out of the build tree staging area;
+# the rest are taken from the original source tree.
+gxx_include_dir = @gxx_include_dir@
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+all: all-redirect
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus include/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+tags: TAGS
+TAGS:
+
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = include
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am: 
+install-info: install-info-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am: install-data-local
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile all-local
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-generic clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-generic distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: tags distdir info-am info dvi-am dvi check check-am \
+installcheck-am installcheck install-info-am install-info \
+install-exec-am install-exec install-data-local install-data-am \
+install-data install-am install uninstall-am uninstall all-local \
+all-redirect all-am all installdirs mostlyclean-generic \
+distclean-generic clean-generic maintainer-clean-generic clean \
+mostlyclean distclean maintainer-clean
+
+
+# Here are the rules for building the headers
+all-local: ${target_builddir}/c++config.h ${thread_target_headers} ${allstamps}
+
+# This rule is slightly different, in that we must change the name of the
+# local file from std_foo.h to foo.
+stamp-std: ${std_headers}
+	@if [ ! -d "${std_builddir}" ]; then \
+	  mkdir -p ${std_builddir} ;\
+	fi ;\
+	(cd ${std_builddir} && for h in $?; do \
+	  official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+	  @LN_S@ $$h ./$${official_name} || true ;\
+	done) ;\
+	echo `date` > stamp-std 
+
+stamp-bits: ${bits_headers}
+	@if [ ! -d "${bits_builddir}" ]; then \
+	  mkdir -p ${bits_builddir} ;\
+	fi ;\
+	(cd ${bits_builddir} && @LN_S@ $? . || true) ;\
+	echo `date` > stamp-bits
+
+stamp-c_base: ${c_base_headers} ${c_base_headers_extra} 
+	@if [ ! -d "${c_base_builddir}" ]; then \
+	  mkdir -p ${c_base_builddir} ;\
+	fi ;\
+	(cd ${c_base_builddir} && for h in ${c_base_headers}; do \
+	  official_name=`echo $$h | sed -e 's,.*/std_,,' -e 's,\.h$$,,'` ;\
+	  @LN_S@ $$h ./$${official_name} || true ;\
+	done) ;\
+	if [ ! -z "${c_base_headers_extra}" ]; then \
+	  (cd ${bits_builddir} && @LN_S@ ${c_base_headers_extra}  . || true) ;\
+	fi ;\
+	echo `date` > stamp-c_base
+
+stamp-backward: ${backward_headers}
+	@if [ ! -d "${backward_builddir}" ]; then \
+	  mkdir -p ${backward_builddir} ;\
+	fi ;\
+	(cd ${backward_builddir} && @LN_S@ $? . || true) ;\
+	echo `date` > stamp-backward
+
+stamp-ext: ${ext_headers}
+	@if [ ! -d "${ext_builddir}" ]; then \
+	  mkdir -p ${ext_builddir} ;\
+	fi ;\
+	(cd ${ext_builddir} && @LN_S@ $? . || true) ;\
+	echo `date` > stamp-ext
+
+stamp-${target_alias}:
+	@if [ ! -d ${target_builddir} ]; then \
+	  mkdir -p ${target_builddir} ;\
+	  echo `date` > stamp-${target_alias} ;\
+	fi
+
+# Target includes static.
+${target_builddir}/stamp-target: ${target_headers} stamp-${target_alias}
+	@cd ${target_builddir} ;\
+	if [ ! -f stamp-target ]; then \
+	  @LN_S@ ${target_headers} . || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@BASIC_FILE_H@ basic_file.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CSTDIO_H@ c++io.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CLOCALE_H@ c++locale.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CMESSAGES_H@ messages_members.h || true ;\
+	  @LN_S@ ${glibcpp_srcdir}/@CCODECVT_H@ codecvt_specializations.h || true ;\
+	  echo `date` > stamp-target; \
+	fi
+
+# Target includes dynamic.
+${target_builddir}/c++config.h: ${CONFIG_HEADER} \
+				${glibcpp_srcdir}/include/bits/c++config \
+				stamp-${target_alias}
+	@cat ${glibcpp_srcdir}/include/bits/c++config > $@ ;\
+	sed -e 's/HAVE_/_GLIBCPP_HAVE_/g' \
+	    -e 's/PACKAGE/_GLIBCPP_PACKAGE/g' \
+	    -e 's/VERSION/_GLIBCPP_VERSION/g' \
+	    -e 's/WORDS_/_GLIBCPP_WORDS_/g' \
+	    < ${CONFIG_HEADER} >> $@ ;\
+	echo "#endif // _CPP_CPPCONFIG_" >>$@
+
+${target_builddir}/gthr.h: ${toplevel_srcdir}/gcc/gthr.h stamp-${target_alias}
+	sed -e '/^#/s/\(${uppercase}${uppercase}*\)/_GLIBCPP_\1/g' \
+	    -e 's,^#include "\(.*\)",#include ,g' \
+	    < ${toplevel_srcdir}/gcc/gthr.h > $@
+
+${target_builddir}/gthr-single.h: ${toplevel_srcdir}/gcc/gthr-single.h \
+				  stamp-${target_alias}
+	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
+	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+	    < ${toplevel_srcdir}/gcc/gthr-single.h > $@
+
+${target_builddir}/gthr-posix.h: ${toplevel_srcdir}/gcc/gthr-posix.h \
+				   stamp-${target_alias}
+	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
+	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+	    -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+	    < ${toplevel_srcdir}/gcc/gthr-posix.h > $@
+
+${target_builddir}/gthr-default.h: ${toplevel_srcdir}/gcc/${glibcpp_thread_h} \
+				   stamp-${target_alias}
+	sed -e 's/\(UNUSED\)/_GLIBCPP_\1/g' \
+	    -e 's/\(GCC${uppercase}*_H\)/_GLIBCPP_\1/g' \
+	    -e 's/\(${uppercase}*WEAK\)/_GLIBCPP_\1/g' \
+	    -e 's,^#include "\(.*\)",#include ,g' \
+	    < ${toplevel_srcdir}/gcc/${glibcpp_thread_h} > $@
+install-data-local:
+	$(mkinstalldirs) ${gxx_include_dir}
+	$(mkinstalldirs) ${gxx_include_dir}/${bits_builddir}
+	for file in ${bits_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${bits_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${backward_builddir}
+	for file in ${backward_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${backward_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${ext_builddir}
+	for file in ${ext_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${ext_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${c_base_builddir}
+	for file in ${c_base_headers_rename}; do \
+	  $(INSTALL_DATA) ${c_base_builddir}/$${file} \
+	    ${gxx_include_dir}/${c_base_builddir}; done
+	c_base_headers_extra_install=${c_base_headers_extra};\
+	for file in $$c_base_headers_extra_install; do \
+	  $(INSTALL_DATA) $$file ${gxx_include_dir}/${bits_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${std_builddir}
+	for file in ${std_headers_rename}; do \
+	  $(INSTALL_DATA) ${std_builddir}/$${file} \
+	    ${gxx_include_dir}/${std_builddir}; done
+	$(mkinstalldirs) ${gxx_include_dir}/${target_builddir}
+	for file in ${target_headers} ${extra_target_headers} \
+	 ${thread_target_headers}; do \
+	  $(INSTALL_DATA) $${file} ${gxx_include_dir}/${target_builddir}; done
+
+# By adding these files here, automake will remove them for 'make clean'
+#CLEANFILES = ${allstamps}
+
+# Stop implicit '.o' make rules from ever stomping on extensionless
+# headers, in the improbable case where some foolish, crack-addled
+# developer tries to create them via make in the include build
+# directory. (This is more of an example of how this kind of rule can
+# be made.)
+.PRECIOUS: $(std_headers_rename) $(c_base_headers_rename)
+$(std_headers_rename): ; @:
+$(c_base_headers_rename): ; @:
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/libstdc++/include/backward/algo.h b/contrib/libstdc++/include/backward/algo.h
new file mode 100644
index 0000000..a3554a8
--- /dev/null
+++ b/contrib/libstdc++/include/backward/algo.h
@@ -0,0 +1,149 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_ALGO_H
+#define _CPP_BACKWARD_ALGO_H 1
+
+#include "backward_warning.h"
+#include "algobase.h"
+#include "tempbuf.h"
+#include "iterator.h"
+#include 
+#include 
+#include 
+#include 
+
+// Names from 
+using std::for_each; 
+using std::find; 
+using std::find_if; 
+using std::adjacent_find; 
+using std::count; 
+using std::count_if; 
+using std::search; 
+using std::search_n; 
+using std::swap_ranges; 
+using std::transform; 
+using std::replace; 
+using std::replace_if; 
+using std::replace_copy; 
+using std::replace_copy_if; 
+using std::generate; 
+using std::generate_n; 
+using std::remove; 
+using std::remove_if; 
+using std::remove_copy; 
+using std::remove_copy_if; 
+using std::unique; 
+using std::unique_copy; 
+using std::reverse; 
+using std::reverse_copy; 
+using std::rotate; 
+using std::rotate_copy; 
+using std::random_shuffle; 
+using std::partition; 
+using std::stable_partition; 
+using std::sort; 
+using std::stable_sort; 
+using std::partial_sort; 
+using std::partial_sort_copy; 
+using std::nth_element; 
+using std::lower_bound; 
+using std::upper_bound; 
+using std::equal_range; 
+using std::binary_search; 
+using std::merge; 
+using std::inplace_merge; 
+using std::includes; 
+using std::set_union; 
+using std::set_intersection; 
+using std::set_difference; 
+using std::set_symmetric_difference; 
+using std::min_element; 
+using std::max_element; 
+using std::next_permutation; 
+using std::prev_permutation; 
+using std::find_first_of; 
+using std::find_end; 
+
+// Names from stl_heap.h
+using std::push_heap;
+using std::pop_heap;
+using std::make_heap;
+using std::sort_heap;
+
+// Names from stl_numeric.h
+using std::accumulate; 
+using std::inner_product; 
+using std::partial_sum; 
+using std::adjacent_difference; 
+
+// Names from ext/algorithm
+using __gnu_cxx::random_sample; 
+using __gnu_cxx::random_sample_n;
+using __gnu_cxx::is_sorted; 
+using __gnu_cxx::is_heap;
+using __gnu_cxx::count;   // Extension returning void
+using __gnu_cxx::count_if;   // Extension returning void
+
+// Names from ext/numeric
+using __gnu_cxx::power; 
+using __gnu_cxx::iota; 
+
+#endif /* _CPP_BACKWARD_ALGO_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/algobase.h b/contrib/libstdc++/include/backward/algobase.h
new file mode 100644
index 0000000..1606559
--- /dev/null
+++ b/contrib/libstdc++/include/backward/algobase.h
@@ -0,0 +1,95 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_ALGOBASE_H
+#define _CPP_BACKWARD_ALGOBASE_H 1
+
+#include "backward_warning.h"
+#include "pair.h"
+#include "iterator.h"
+#include 
+#include 
+#include 
+#include 
+
+// Names from stl_algobase.h
+using std::iter_swap; 
+using std::swap; 
+using std::min; 
+using std::max; 
+using std::copy; 
+using std::copy_backward; 
+using std::fill; 
+using std::fill_n; 
+using std::mismatch; 
+using std::equal; 
+using std::lexicographical_compare; 
+
+// Names from stl_uninitialized.h
+using std::uninitialized_copy;
+using std::uninitialized_fill;
+using std::uninitialized_fill_n;
+
+// Names from ext/algorithm
+using __gnu_cxx::copy_n; 
+using __gnu_cxx::lexicographical_compare_3way; 
+
+// Names from ext/memory
+using __gnu_cxx::uninitialized_copy_n;
+
+#endif /* _CPP_BACKWARD_ALGOBASE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/alloc.h b/contrib/libstdc++/include/backward/alloc.h
new file mode 100644
index 0000000..4344a1d
--- /dev/null
+++ b/contrib/libstdc++/include/backward/alloc.h
@@ -0,0 +1,62 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_ALLOC_H
+#define _CPP_BACKWARD_ALLOC_H 1
+
+#include "backward_warning.h"
+#include 
+#include 
+
+using std::__malloc_alloc_template; 
+using std::__simple_alloc; 
+using std::__debug_alloc; 
+using std::__alloc; 
+using std::__single_client_alloc; 
+using std::allocator;
+#ifdef __USE_MALLOC
+using std::malloc_alloc; 
+#else
+using std::__default_alloc_template; 
+#endif
+
+#endif 
diff --git a/contrib/libstdc++/include/backward/backward_warning.h b/contrib/libstdc++/include/backward/backward_warning.h
new file mode 100644
index 0000000..0f007bf
--- /dev/null
+++ b/contrib/libstdc++/include/backward/backward_warning.h
@@ -0,0 +1,39 @@
+// Copyright (C) 2001 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_BACKWARD_BACKWARD_WARNING_H
+#define _CPP_BACKWARD_BACKWARD_WARNING_H 1
+
+#ifdef __DEPRECATED
+#warning This file includes at least one deprecated or antiquated header. \
+Please consider using one of the 32 headers found in section 17.4.1.2 of the \
+C++ standard. Examples include substituting the  header for the  \
+header for C++ includes, or  instead of the deprecated header \
+. To disable this warning use -Wno-deprecated.
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/backward/bvector.h b/contrib/libstdc++/include/backward/bvector.h
new file mode 100644
index 0000000..b114052
--- /dev/null
+++ b/contrib/libstdc++/include/backward/bvector.h
@@ -0,0 +1,69 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef __SGI_STL_BVECTOR_H
+#define __SGI_STL_BVECTOR_H
+
+
+#include "backward_warning.h"
+#include 
+
+using std::bit_vector;
+
+#endif /* __SGI_STL_BVECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/complex.h b/contrib/libstdc++/include/backward/complex.h
new file mode 100644
index 0000000..0e72174
--- /dev/null
+++ b/contrib/libstdc++/include/backward/complex.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_COMPLEX_H
+#define _CPP_BACKWARD_COMPLEX_H 1
+
+#include "backward_warning.h"
+#include 
+
+using std::complex;
+typedef complex 		float_complex;
+typedef complex 	double_complex;
+typedef complex 	long_double_complex;
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/defalloc.h b/contrib/libstdc++/include/backward/defalloc.h
new file mode 100644
index 0000000..264e296
--- /dev/null
+++ b/contrib/libstdc++/include/backward/defalloc.h
@@ -0,0 +1,117 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+// Inclusion of this file is DEPRECATED.  This is the original HP
+// default allocator.  It is provided only for backward compatibility.
+// This file WILL BE REMOVED in a future release.
+//
+// DO NOT USE THIS FILE unless you have an old container implementation
+// that requires an allocator with the HP-style interface.  
+//
+// Standard-conforming allocators have a very different interface.  The
+// standard default allocator is declared in the header .
+
+#ifndef _CPP_BACKWARD_DEFALLOC_H
+#define _CPP_BACKWARD_DEFALLOC_H 1
+
+#include "backward_warning.h"
+#include "new.h"
+#include 
+#include 
+#include  
+#include "iostream.h" 
+#include "algobase.h"
+
+
+template 
+inline _Tp* allocate(ptrdiff_t __size, _Tp*) {
+    set_new_handler(0);
+    _Tp* __tmp = (_Tp*)(::operator new((size_t)(__size * sizeof(_Tp))));
+    if (__tmp == 0) {
+	cerr << "out of memory" << endl; 
+	exit(1);
+    }
+    return __tmp;
+}
+
+
+template 
+inline void deallocate(_Tp* __buffer) {
+    ::operator delete(__buffer);
+}
+
+template 
+class allocator {
+public:
+    typedef _Tp value_type;
+    typedef _Tp* pointer;
+    typedef const _Tp* const_pointer;
+    typedef _Tp& reference;
+    typedef const _Tp& const_reference;
+    typedef size_t size_type;
+    typedef ptrdiff_t difference_type;
+    pointer allocate(size_type __n) { 
+	return ::allocate((difference_type)__n, (pointer)0);
+    }
+    void deallocate(pointer __p) { ::deallocate(__p); }
+    pointer address(reference __x) { return (pointer)&__x; }
+    const_pointer const_address(const_reference __x) { 
+	return (const_pointer)&__x; 
+    }
+    size_type init_page_size() { 
+	return max(size_type(1), size_type(4096/sizeof(_Tp))); 
+    }
+    size_type max_size() const { 
+	return max(size_type(1), size_type(UINT_MAX/sizeof(_Tp))); 
+    }
+};
+
+class allocator {
+public:
+    typedef void* pointer;
+};
+
+
+
+#endif /* _CPP_BACKWARD_DEFALLOC_H */
diff --git a/contrib/libstdc++/include/backward/deque.h b/contrib/libstdc++/include/backward/deque.h
new file mode 100644
index 0000000..983ae07
--- /dev/null
+++ b/contrib/libstdc++/include/backward/deque.h
@@ -0,0 +1,70 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_DEQUE_H
+#define _CPP_BACKWARD_DEQUE_H 1
+
+#include "backward_warning.h"
+#include "algobase.h"
+#include "alloc.h"
+#include 
+
+using std::deque;
+
+#endif /* _CPP_BACKWARD_DEQUE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/fstream.h b/contrib/libstdc++/include/backward/fstream.h
new file mode 100644
index 0000000..44461f4
--- /dev/null
+++ b/contrib/libstdc++/include/backward/fstream.h
@@ -0,0 +1,52 @@
+// Copyright (C) 2000, 2001 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_BACKWARD_FSTREAM_H
+#define _CPP_BACKWARD_FSTREAM_H 1
+
+#include "backward_warning.h"
+#include 
+
+using std::filebuf;
+using std::ifstream;
+using std::ofstream;
+using std::fstream;
+using std::streampos;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+using std::wfilebuf;
+using std::wifstream;
+using std::wofstream;
+using std::wfstream;
+using std::wstreampos;
+#endif
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/function.h b/contrib/libstdc++/include/backward/function.h
new file mode 100644
index 0000000..bc96f49
--- /dev/null
+++ b/contrib/libstdc++/include/backward/function.h
@@ -0,0 +1,130 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_FUNCTION_H
+#define _CPP_BACKWARD_FUNCTION_H 1
+
+#include "backward_warning.h"
+#include 
+#include 
+#include 
+#include 
+
+// Names from stl_function.h
+using std::unary_function; 
+using std::binary_function; 
+using std::plus; 
+using std::minus; 
+using std::multiplies; 
+using std::divides; 
+using std::modulus; 
+using std::negate; 
+using std::equal_to; 
+using std::not_equal_to; 
+using std::greater; 
+using std::less; 
+using std::greater_equal; 
+using std::less_equal; 
+using std::logical_and; 
+using std::logical_or; 
+using std::logical_not; 
+using std::unary_negate; 
+using std::binary_negate; 
+using std::not1; 
+using std::not2; 
+using std::binder1st; 
+using std::binder2nd; 
+using std::bind1st; 
+using std::bind2nd; 
+using std::pointer_to_unary_function; 
+using std::pointer_to_binary_function; 
+using std::ptr_fun; 
+using std::mem_fun_t; 
+using std::const_mem_fun_t; 
+using std::mem_fun_ref_t; 
+using std::const_mem_fun_ref_t; 
+using std::mem_fun1_t; 
+using std::const_mem_fun1_t; 
+using std::mem_fun1_ref_t; 
+using std::const_mem_fun1_ref_t; 
+using std::mem_fun; 
+using std::mem_fun_ref; 
+
+// Names from ext/functional
+using __gnu_cxx::identity_element; 
+using __gnu_cxx::unary_compose; 
+using __gnu_cxx::binary_compose; 
+using __gnu_cxx::compose1; 
+using __gnu_cxx::compose2; 
+using __gnu_cxx::identity; 
+using __gnu_cxx::select1st; 
+using __gnu_cxx::select2nd; 
+using __gnu_cxx::project1st; 
+using __gnu_cxx::project2nd; 
+using __gnu_cxx::constant_void_fun; 
+using __gnu_cxx::constant_unary_fun; 
+using __gnu_cxx::constant_binary_fun; 
+using __gnu_cxx::constant0; 
+using __gnu_cxx::constant1; 
+using __gnu_cxx::constant2; 
+using __gnu_cxx::subtractive_rng; 
+using __gnu_cxx::mem_fun1; 
+using __gnu_cxx::mem_fun1_ref; 
+
+#endif /* _CPP_BACKWARD_FUNCTION_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/hash_map.h b/contrib/libstdc++/include/backward/hash_map.h
new file mode 100644
index 0000000..25c177a
--- /dev/null
+++ b/contrib/libstdc++/include/backward/hash_map.h
@@ -0,0 +1,72 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef _CPP_BACKWARD_HASH_MAP_H
+#define _CPP_BACKWARD_HASH_MAP_H 1
+
+#include "backward_warning.h"
+#include "algobase.h"
+#include 
+
+using __gnu_cxx::hash;
+using __gnu_cxx::hashtable;
+using __gnu_cxx::hash_map;
+using __gnu_cxx::hash_multimap;
+
+#endif /* _CPP_BACKWARD_HASH_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/hash_set.h b/contrib/libstdc++/include/backward/hash_set.h
new file mode 100644
index 0000000..ddb7a75
--- /dev/null
+++ b/contrib/libstdc++/include/backward/hash_set.h
@@ -0,0 +1,69 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef _CPP_BACKWARD_HASH_SET_H
+#define _CPP_BACKWARD_HASH_SET_H 1
+
+#include "backward_warning.h"
+#include "algobase.h"
+#include 
+
+using __gnu_cxx::hash;
+using __gnu_cxx::hashtable;
+using __gnu_cxx::hash_set;
+using __gnu_cxx::hash_multiset;
+
+#endif /* _CPP_BACKWARD_HASH_SET_H */
+
diff --git a/contrib/libstdc++/include/backward/hashtable.h b/contrib/libstdc++/include/backward/hashtable.h
new file mode 100644
index 0000000..bbad516
--- /dev/null
+++ b/contrib/libstdc++/include/backward/hashtable.h
@@ -0,0 +1,76 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/* NOTE: This is an internal header file, included by other STL headers.
+ *   You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BACKWARD_HASHTABLE_H
+#define _CPP_BACKWARD_HASHTABLE_H 1
+
+#include "backward_warning.h"
+#include 
+#include "algo.h"
+#include "alloc.h"
+#include "vector.h"
+
+using __gnu_cxx::hash;
+using __gnu_cxx::hashtable;
+
+#endif /* _CPP_BACKWARD_HASHTABLE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/heap.h b/contrib/libstdc++/include/backward/heap.h
new file mode 100644
index 0000000..9308f0e
--- /dev/null
+++ b/contrib/libstdc++/include/backward/heap.h
@@ -0,0 +1,71 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_HEAP_H
+#define _CPP_BACKWARD_HEAP_H 1
+
+#include "backward_warning.h"
+#include 
+#include 
+
+using std::push_heap;
+using std::pop_heap;
+using std::make_heap;
+using std::sort_heap;
+
+#endif /* _CPP_BACKWARD_HEAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/iomanip.h b/contrib/libstdc++/include/backward/iomanip.h
new file mode 100644
index 0000000..53286cd
--- /dev/null
+++ b/contrib/libstdc++/include/backward/iomanip.h
@@ -0,0 +1,70 @@
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_IOMANIP_H
+#define _CPP_BACKWARD_IOMANIP_H 1
+
+#include "backward_warning.h"
+#include "iostream.h"
+#include 
+
+// These are from  as per [27.4].
+using std::boolalpha;
+using std::noboolalpha;
+using std::showbase;
+using std::noshowbase;
+using std::showpoint;
+using std::noshowpoint;
+using std::showpos;
+using std::noshowpos;
+using std::skipws;
+using std::noskipws;
+using std::uppercase;
+using std::nouppercase;
+using std::internal;
+using std::left;
+using std::right;
+using std::dec;
+using std::hex;
+using std::oct;
+using std::fixed;
+using std::scientific;
+
+// These are from  as per [27.6].  Manipulators from 
+// and  (e.g., endl) are made available via .
+using std::resetiosflags;
+using std::setiosflags;
+using std::setbase;
+using std::setfill;
+using std::setprecision;
+using std::setw;
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/iostream.h b/contrib/libstdc++/include/backward/iostream.h
new file mode 100644
index 0000000..5346d9d
--- /dev/null
+++ b/contrib/libstdc++/include/backward/iostream.h
@@ -0,0 +1,60 @@
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_IOSTREAM_H
+#define _CPP_BACKWARD_IOSTREAM_H 1
+
+#include "backward_warning.h"
+#include 
+
+using std::iostream;
+using std::ostream;
+using std::istream;
+using std::ios;
+using std::streambuf;
+
+using std::cout;
+using std::cin;
+using std::cerr;
+using std::clog;
+#ifdef _GLIBCPP_USE_WCHAR_T
+using std::wcout;
+using std::wcin;
+using std::wcerr;
+using std::wclog;
+#endif
+
+using std::ws;
+using std::endl;
+using std::ends;
+using std::flush;
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/istream.h b/contrib/libstdc++/include/backward/istream.h
new file mode 100644
index 0000000..059e774
--- /dev/null
+++ b/contrib/libstdc++/include/backward/istream.h
@@ -0,0 +1,43 @@
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_ISTREAM_H
+#define _CPP_BACKWARD_ISTREAM_H 1
+
+#include "backward_warning.h"
+#include "iostream.h"
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
+
+
+
+
+
diff --git a/contrib/libstdc++/include/backward/iterator.h b/contrib/libstdc++/include/backward/iterator.h
new file mode 100644
index 0000000..179f457
--- /dev/null
+++ b/contrib/libstdc++/include/backward/iterator.h
@@ -0,0 +1,162 @@
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_ITERATOR_H
+#define _CPP_BACKWARD_ITERATOR_H 1
+
+#include "backward_warning.h"
+#include "function.h"
+#include 
+#include "iostream.h"
+#include 
+
+#include 
+#include 
+
+#include  // For 3-parameter distance extension
+
+// Names from stl_iterator.h
+using std::input_iterator_tag;
+using std::output_iterator_tag;
+using std::forward_iterator_tag;
+using std::bidirectional_iterator_tag;
+using std::random_access_iterator_tag;
+
+#if 0
+using std::iterator;
+#endif
+
+// The base classes input_iterator, output_iterator, forward_iterator,
+// bidirectional_iterator, and random_access_iterator are not part of
+// the C++ standard.  (They have been replaced by struct iterator.)
+// They are included for backward compatibility with the HP STL.
+template
+  struct input_iterator {
+    typedef input_iterator_tag iterator_category;
+    typedef _Tp                value_type;
+    typedef _Distance          difference_type;
+    typedef _Tp*               pointer;
+    typedef _Tp&               reference;
+  };
+
+struct output_iterator {
+  typedef output_iterator_tag iterator_category;
+  typedef void                value_type;
+  typedef void                difference_type;
+  typedef void                pointer;
+  typedef void                reference;
+};
+
+template
+  struct forward_iterator {
+    typedef forward_iterator_tag iterator_category;
+    typedef _Tp                  value_type;
+    typedef _Distance            difference_type;
+    typedef _Tp*                 pointer;
+    typedef _Tp&                 reference;
+  };
+
+template
+  struct bidirectional_iterator {
+    typedef bidirectional_iterator_tag iterator_category;
+    typedef _Tp                        value_type;
+    typedef _Distance                  difference_type;
+    typedef _Tp*                       pointer;
+    typedef _Tp&                       reference;
+  };
+
+template
+  struct random_access_iterator {
+    typedef random_access_iterator_tag iterator_category;
+    typedef _Tp                        value_type;
+    typedef _Distance                  difference_type;
+    typedef _Tp*                       pointer;
+    typedef _Tp&                       reference;
+  };
+
+using std::iterator_traits;
+
+template 
+  inline typename iterator_traits<_Iter>::iterator_category
+  iterator_category(const _Iter& __i)
+  { return __iterator_category(__i); }
+
+template 
+  inline typename iterator_traits<_Iter>::difference_type*
+  distance_type(const _Iter&)
+  { return static_cast::difference_type*>(0); }
+
+template
+  inline typename iterator_traits<_Iter>::value_type*
+  value_type(const _Iter& __i)
+  { return static_cast::value_type*>(0); }
+
+using std::distance;
+using __gnu_cxx::distance; // 3-parameter extension
+using std::advance; 
+
+using std::insert_iterator;
+using std::front_insert_iterator;
+using std::back_insert_iterator;
+using std::inserter;
+using std::front_inserter;
+using std::back_inserter;
+
+using std::reverse_iterator;
+
+using std::istream_iterator;
+using std::ostream_iterator;
+
+// Names from stl_construct.h
+template
+  inline void
+  construct(_T1* __p, const _T2& __value)
+  { std::_Construct(__p, __value); }
+
+template
+  inline void
+  construct(_T1* __p)
+  { std::_Construct(__p); }
+
+template 
+  inline void
+  destroy(_Tp* __pointer)
+  { std::_Destroy(__pointer); }
+  
+template 
+  inline void
+  destroy(_ForwardIterator __first, _ForwardIterator __last)
+  { std::_Destroy(__first, __last); }
+
+
+// Names from stl_raw_storage_iter.h
+using std::raw_storage_iterator;
+
+#endif /* _CPP_BACKWARD_ITERATOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/list.h b/contrib/libstdc++/include/backward/list.h
new file mode 100644
index 0000000..350a92a
--- /dev/null
+++ b/contrib/libstdc++/include/backward/list.h
@@ -0,0 +1,70 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_LIST_H
+#define _CPP_BACKWARD_LIST_H 1
+
+#include "backward_warning.h"
+#include "algobase.h"
+#include "alloc.h"
+#include 
+
+using std::list;
+
+#endif /* _CPP_BACKWARD_LIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/map.h b/contrib/libstdc++/include/backward/map.h
new file mode 100644
index 0000000..00f606d
--- /dev/null
+++ b/contrib/libstdc++/include/backward/map.h
@@ -0,0 +1,69 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_MAP_H
+#define _CPP_BACKWARD_MAP_H 1
+
+#include "backward_warning.h"
+#include "tree.h"
+#include 
+
+using std::map;
+
+#endif /* _CPP_BACKWARD_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/multimap.h b/contrib/libstdc++/include/backward/multimap.h
new file mode 100644
index 0000000..b9cdc84
--- /dev/null
+++ b/contrib/libstdc++/include/backward/multimap.h
@@ -0,0 +1,69 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_MULTIMAP_H
+#define _CPP_BACKWARD_MULTIMAP_H 1
+
+#include "backward_warning.h"
+#include "tree.h"
+#include 
+
+using std::multimap;
+
+#endif /* _CPP_BACKWARD_MULTIMAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/multiset.h b/contrib/libstdc++/include/backward/multiset.h
new file mode 100644
index 0000000..8aa7fd3
--- /dev/null
+++ b/contrib/libstdc++/include/backward/multiset.h
@@ -0,0 +1,69 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_MULTISET_H
+#define _CPP_BACKWARD_MULTISET_H 1
+
+#include "backward_warning.h"
+#include "tree.h"
+#include 
+
+using std::multiset;
+
+#endif /* _CPP_BACKWARD_MULTISET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/new.h b/contrib/libstdc++/include/backward/new.h
new file mode 100644
index 0000000..8e4c5c9
--- /dev/null
+++ b/contrib/libstdc++/include/backward/new.h
@@ -0,0 +1,42 @@
+// -*- C++ -*- forwarding header.
+// Copyright (C) 2000 Free Software Foundation
+
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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_BACKWARD_NEW_H
+#define _CPP_BACKWARD_NEW_H 1
+
+#include "backward_warning.h"
+#include 
+
+using std::bad_alloc;
+using std::nothrow_t;
+using std::nothrow;
+using std::new_handler;
+using std::set_new_handler;
+
+#endif 
diff --git a/contrib/libstdc++/include/backward/ostream.h b/contrib/libstdc++/include/backward/ostream.h
new file mode 100644
index 0000000..4c74756
--- /dev/null
+++ b/contrib/libstdc++/include/backward/ostream.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_OSTREAM_H
+#define _CPP_BACKWARD_OSTREAM_H 1
+
+#include "backward_warning.h"
+#include "iostream.h"
+
+#endif 
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/pair.h b/contrib/libstdc++/include/backward/pair.h
new file mode 100644
index 0000000..f0ff7d7
--- /dev/null
+++ b/contrib/libstdc++/include/backward/pair.h
@@ -0,0 +1,70 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_PAIR_H
+#define _CPP_BACKWARD_PAIR_H 1
+
+#include "backward_warning.h"
+#include 
+#include 
+
+using std::pair;
+using std::make_pair;
+
+#endif /* _CPP_BACKWARD_PAIR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/queue.h b/contrib/libstdc++/include/backward/queue.h
new file mode 100644
index 0000000..1d3b29c
--- /dev/null
+++ b/contrib/libstdc++/include/backward/queue.h
@@ -0,0 +1,41 @@
+// Copyright (C) 2001 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_BACKWARD_QUEUE_H
+#define _CPP_BACKWARD_QUEUE_H 1
+
+#include "backward_warning.h"
+#include 
+
+using std::queue;
+using std::priority_queue;
+
+#endif 
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/rope.h b/contrib/libstdc++/include/backward/rope.h
new file mode 100644
index 0000000..5f4c787
--- /dev/null
+++ b/contrib/libstdc++/include/backward/rope.h
@@ -0,0 +1,60 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_ROPE_H
+#define _CPP_BACKWARD_ROPE_H 1
+
+#include "backward_warning.h"
+#include "hashtable.h"   
+#include 
+
+using __gnu_cxx::char_producer; 
+using __gnu_cxx::sequence_buffer; 
+using __gnu_cxx::rope; 
+using __gnu_cxx::crope; 
+using __gnu_cxx::wrope; 
+
+#endif /* _CPP_BACKWARD_ROPE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/set.h b/contrib/libstdc++/include/backward/set.h
new file mode 100644
index 0000000..c189255
--- /dev/null
+++ b/contrib/libstdc++/include/backward/set.h
@@ -0,0 +1,69 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_SET_H
+#define _CPP_BACKWARD_SET_H 1
+
+#include "backward_warning.h"
+#include "tree.h"
+#include 
+
+using std::set;
+
+#endif /* _CPP_BACKWARD_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/slist.h b/contrib/libstdc++/include/backward/slist.h
new file mode 100644
index 0000000..decf04d
--- /dev/null
+++ b/contrib/libstdc++/include/backward/slist.h
@@ -0,0 +1,56 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef _CPP_BACKWARD_SLIST_H
+#define _CPP_BACKWARD_SLIST_H 1
+
+#include "backward_warning.h"
+#include 
+
+using __gnu_cxx::slist;
+
+#endif /* _CPP_BACKWARD_SLIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/stack.h b/contrib/libstdc++/include/backward/stack.h
new file mode 100644
index 0000000..6f60293
--- /dev/null
+++ b/contrib/libstdc++/include/backward/stack.h
@@ -0,0 +1,72 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_STACK_H
+#define _CPP_BACKWARD_STACK_H 1
+
+#include "backward_warning.h"
+#include "vector.h"
+#include "deque.h"
+#include "heap.h"
+#include "queue.h"
+#include 
+
+using std::stack;
+
+#endif /* _CPP_BACKWARD_STACK_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/stream.h b/contrib/libstdc++/include/backward/stream.h
new file mode 100644
index 0000000..21a851d
--- /dev/null
+++ b/contrib/libstdc++/include/backward/stream.h
@@ -0,0 +1,38 @@
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_STREAM_H
+#define _CPP_BACKWARD_STREAM_H 1
+
+#include "backward_warning.h"
+#include "iostream.h"
+
+#endif 
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/streambuf.h b/contrib/libstdc++/include/backward/streambuf.h
new file mode 100644
index 0000000..aef863f
--- /dev/null
+++ b/contrib/libstdc++/include/backward/streambuf.h
@@ -0,0 +1,40 @@
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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_BACKWARD_STREAMBUF_H
+#define _CPP_BACKWARD_STREAMBUF_H 1
+
+#include "backward_warning.h"
+#include 
+
+using std::streambuf;
+
+#endif 
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/strstream b/contrib/libstdc++/include/backward/strstream
new file mode 100644
index 0000000..28308e3
--- /dev/null
+++ b/contrib/libstdc++/include/backward/strstream
@@ -0,0 +1,188 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+// WARNING: The classes defined in this header are DEPRECATED.  This
+// header is defined in section D.7.1 of the C++ standard, and it
+// MAY BE REMOVED in a future standard revision.  You should use the
+// header  instead.
+
+#ifndef __SGI_STL_STRSTREAM
+#define __SGI_STL_STRSTREAM
+
+#include "backward_warning.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+
+//----------------------------------------------------------------------
+// Class strstreambuf, a streambuf class that manages an array of char.
+// Note that this class is not a template.
+
+class strstreambuf : public basic_streambuf >
+{
+public:                         // Types.
+  typedef char_traits              _Traits;
+  typedef basic_streambuf _Base;
+
+public:                         // Constructor, destructor
+  explicit strstreambuf(streamsize __initial_capacity = 0);
+  strstreambuf(void* (*__alloc)(size_t), void (*__free)(void*));
+
+  strstreambuf(char* __get, streamsize __n, char* __put = 0);
+  strstreambuf(signed char* __get, streamsize __n, signed char* __put = 0);
+  strstreambuf(unsigned char* __get, streamsize __n, unsigned char* __put=0);
+
+  strstreambuf(const char* __get, streamsize __n);
+  strstreambuf(const signed char* __get, streamsize __n);
+  strstreambuf(const unsigned char* __get, streamsize __n);
+
+  virtual ~strstreambuf();
+
+public:                         // strstreambuf operations.
+  void freeze(bool = true);
+  char* str();
+  int pcount() const;
+
+protected:                      // Overridden virtual member functions.
+  virtual int_type overflow(int_type __c  = _Traits::eof());
+  virtual int_type pbackfail(int_type __c = _Traits::eof());
+  virtual int_type underflow();
+  virtual _Base* setbuf(char* __buf, streamsize __n);
+  virtual pos_type seekoff(off_type __off, ios_base::seekdir __dir,
+                           ios_base::openmode __mode
+                                      = ios_base::in | ios_base::out);
+  virtual pos_type seekpos(pos_type __pos, ios_base::openmode __mode
+                                      = ios_base::in | ios_base::out);
+
+private:                        // Helper functions.
+  // Dynamic allocation, possibly using _M_alloc_fun and _M_free_fun.
+  char* _M_alloc(size_t);
+  void  _M_free(char*);
+
+  // Helper function used in constructors.
+  void _M_setup(char* __get, char* __put, streamsize __n);
+
+private:                        // Data members.
+  void* (*_M_alloc_fun)(size_t);
+  void  (*_M_free_fun)(void*);
+
+  bool _M_dynamic  : 1;
+  bool _M_frozen   : 1;
+  bool _M_constant : 1;
+};
+
+//----------------------------------------------------------------------
+// Class istrstream, an istream that manages a strstreambuf.
+
+class istrstream : public basic_istream
+{
+public:
+  explicit istrstream(char*);
+  explicit istrstream(const char*);
+  istrstream(char* , streamsize);
+  istrstream(const char*, streamsize);
+  virtual ~istrstream();
+
+  strstreambuf* rdbuf() const;
+  char* str();
+
+private:
+  strstreambuf _M_buf;
+};
+
+//----------------------------------------------------------------------
+// Class ostrstream
+
+class ostrstream : public basic_ostream
+{
+public:
+  ostrstream();
+  ostrstream(char*, int, ios_base::openmode = ios_base::out);
+  virtual ~ostrstream();
+
+  strstreambuf* rdbuf() const;
+  void freeze(bool = true);
+  char* str();
+  int pcount() const;
+
+private:
+  strstreambuf _M_buf;
+};
+
+//----------------------------------------------------------------------
+// Class strstream
+
+class strstream : public basic_iostream
+{
+public:
+  typedef char                        char_type;
+  typedef char_traits::int_type int_type;
+  typedef char_traits::pos_type pos_type;
+  typedef char_traits::off_type off_type;
+
+  strstream();
+  strstream(char*, int, ios_base::openmode = ios_base::in | ios_base::out);
+  virtual ~strstream();
+
+  strstreambuf* rdbuf() const;
+  void freeze(bool = true);
+  int pcount() const;
+  char* str();
+
+private:
+  strstreambuf _M_buf;
+};
+
+} // namespace std
+
+#endif /* __SGI_STL_STRSTREAM */
+
+// Local Variables:
+// mode:C++
+// End:
+
+
diff --git a/contrib/libstdc++/include/backward/strstream.h b/contrib/libstdc++/include/backward/strstream.h
new file mode 100644
index 0000000..82802d2
--- /dev/null
+++ b/contrib/libstdc++/include/backward/strstream.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+// Copyright (C) 2000 Free Software Foundation
+
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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_BACKWARD_STRSTREAM_H
+#define _CPP_BACKWARD_STRSTREAM_H 1
+
+#include "strstream"
+
+using std::strstreambuf;
+using std::istrstream;
+using std::ostrstream;
+using std::strstream;
+
+#endif 
+
diff --git a/contrib/libstdc++/include/backward/tempbuf.h b/contrib/libstdc++/include/backward/tempbuf.h
new file mode 100644
index 0000000..f47e707
--- /dev/null
+++ b/contrib/libstdc++/include/backward/tempbuf.h
@@ -0,0 +1,78 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_TEMPBUF_H
+#define _CPP_BACKWARD_TEMPBUF_H 1
+
+#include "backward_warning.h"
+#include "pair.h"
+#include "iterator.h"
+#include 
+#include  
+#include  
+#include   
+#include 
+#include 
+#include 
+
+using std::get_temporary_buffer;
+using std::return_temporary_buffer;
+using __gnu_cxx::temporary_buffer;
+
+#endif /* _CPP_BACKWARD_TEMPBUF_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/tree.h b/contrib/libstdc++/include/backward/tree.h
new file mode 100644
index 0000000..f3ee652
--- /dev/null
+++ b/contrib/libstdc++/include/backward/tree.h
@@ -0,0 +1,55 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+#ifndef _CPP_EXT_TREE
+#define _CPP_EXT_TREE 1
+
+#include "backward_warning.h"
+#include 
+
+using __gnu_cxx::rb_tree;
+
+#endif 
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/backward/vector.h b/contrib/libstdc++/include/backward/vector.h
new file mode 100644
index 0000000..7788068
--- /dev/null
+++ b/contrib/libstdc++/include/backward/vector.h
@@ -0,0 +1,70 @@
+// Backward-compat support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+#ifndef _CPP_BACKWARD_VECTOR_H
+#define _CPP_BACKWARD_VECTOR_H 1
+
+#include "backward_warning.h"
+#include "algobase.h"
+#include "alloc.h"  
+#include 
+
+using std::vector;
+
+#endif /* _CPP_BACKWARD_VECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/basic_ios.h b/contrib/libstdc++/include/bits/basic_ios.h
new file mode 100644
index 0000000..13ad0f8
--- /dev/null
+++ b/contrib/libstdc++/include/bits/basic_ios.h
@@ -0,0 +1,210 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// 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.
+
+/** @file basic_ios.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_BASICIOS_H
+#define _CPP_BITS_BASICIOS_H 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+namespace std 
+{
+  // 27.4.5  Template class basic_ios
+  template
+    class basic_ios : public ios_base
+    {
+    public:
+      // Types:
+      typedef _CharT 				char_type;
+      typedef typename _Traits::int_type 	int_type;
+      typedef typename _Traits::pos_type 	pos_type;
+      typedef typename _Traits::off_type 	off_type;
+      typedef _Traits 				traits_type;
+
+      // Non-standard Types:
+      typedef ctype<_CharT>           			__ctype_type;
+      typedef ostreambuf_iterator<_CharT, _Traits>      __ostreambuf_iter;
+      typedef num_put<_CharT, __ostreambuf_iter>        __numput_type;
+      typedef istreambuf_iterator<_CharT, _Traits>	__istreambuf_iter;
+      typedef num_get<_CharT, __istreambuf_iter>        __numget_type;
+      
+      // Data members:
+    protected:
+      basic_ostream<_CharT, _Traits>* 	_M_tie;
+      mutable char_type 		_M_fill;
+      mutable bool			_M_fill_init;
+      basic_streambuf<_CharT, _Traits>* _M_streambuf;
+
+      // Cached use_facet, which is based on the current locale info.
+      const __ctype_type*		_M_fctype;      
+      // From ostream.
+      const __numput_type* 		_M_fnumput;
+      // From istream.
+      const __numget_type* 		_M_fnumget;
+
+    public:
+      operator void*() const 
+      { return this->fail() ? 0 : const_cast(this); }
+
+      bool 
+      operator!() const 
+      { return this->fail(); }
+
+      iostate 
+      rdstate() const 
+      { return _M_streambuf_state; }
+
+      void 
+      clear(iostate __state = goodbit);
+
+      void 
+      setstate(iostate __state) 
+      { this->clear(this->rdstate() | __state); }
+
+      bool 
+      good() const 
+      { return this->rdstate() == 0; }
+
+      bool 
+      eof() const 
+      { return (this->rdstate() & eofbit) != 0; }
+
+      bool 
+      fail() const 
+      { return (this->rdstate() & (badbit | failbit)) != 0; }
+
+      bool 
+      bad() const 
+      { return (this->rdstate() & badbit) != 0; }
+
+      iostate 
+      exceptions() const 
+      { return _M_exception; }
+
+      void 
+      exceptions(iostate __except) 
+      { 
+	_M_exception = __except; 
+	this->clear(_M_streambuf_state); 
+      }
+
+      // Constructor/destructor:
+      explicit 
+      basic_ios(basic_streambuf<_CharT, _Traits>* __sb) : ios_base() 
+      { this->init(__sb); }
+
+      virtual 
+      ~basic_ios() { }
+      
+      // Members:
+      basic_ostream<_CharT, _Traits>*
+      tie() const      
+      { return _M_tie; }
+
+      basic_ostream<_CharT, _Traits>*
+      tie(basic_ostream<_CharT, _Traits>* __tiestr)
+      {
+	basic_ostream<_CharT, _Traits>* __old = _M_tie;
+	_M_tie = __tiestr;
+	return __old;
+      }
+
+      basic_streambuf<_CharT, _Traits>*
+      rdbuf() const    
+      { return _M_streambuf; }
+
+      basic_streambuf<_CharT, _Traits>* 
+      rdbuf(basic_streambuf<_CharT, _Traits>* __sb);
+
+      basic_ios&
+      copyfmt(const basic_ios& __rhs);
+
+      char_type 
+      fill() const 
+      {
+	if (!_M_fill_init)
+	  {
+	    _M_fill = this->widen(' ');
+	    _M_fill_init = true;
+	  }
+	return _M_fill; 
+      }
+
+      char_type 
+      fill(char_type __ch)
+      {
+	char_type __old = this->fill();
+	_M_fill = __ch;
+	return __old;
+      }
+
+      // Locales:
+      locale 
+      imbue(const locale& __loc);
+
+      char 
+      narrow(char_type __c, char __dfault) const;
+
+      char_type 
+      widen(char __c) const;
+     
+    protected:
+      // 27.4.5.1  basic_ios constructors
+      basic_ios() : ios_base() 
+      { }
+
+      void 
+      init(basic_streambuf<_CharT, _Traits>* __sb);
+
+      bool
+      _M_check_facet(const locale::facet* __f) const
+      {
+	if (!__f)
+	  __throw_bad_cast();
+	return true;
+      }
+
+      void
+      _M_cache_facets(const locale& __loc);
+    };
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#include 
+#endif
+
+#endif /* _CPP_BITS_BASICIOS_H */
diff --git a/contrib/libstdc++/include/bits/basic_ios.tcc b/contrib/libstdc++/include/bits/basic_ios.tcc
new file mode 100644
index 0000000..1e345dc
--- /dev/null
+++ b/contrib/libstdc++/include/bits/basic_ios.tcc
@@ -0,0 +1,193 @@
+// basic_ios locale and locale-related member functions -*- C++ -*-
+
+// Copyright (C) 1999, 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
+// 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_BITS_BASICIOS_TCC
+#define _CPP_BITS_BASICIOS_TCC 1
+
+#pragma GCC system_header
+
+namespace std
+{
+  template
+    void
+    basic_ios<_CharT, _Traits>::clear(iostate __state)
+    { 
+      if (this->rdbuf())
+	_M_streambuf_state = __state;
+      else
+	  _M_streambuf_state = __state | badbit;
+      if ((this->rdstate() & this->exceptions()))
+	__throw_ios_failure("basic_ios::clear(iostate) caused exception");
+    }
+  
+  template
+    basic_streambuf<_CharT, _Traits>* 
+    basic_ios<_CharT, _Traits>::rdbuf(basic_streambuf<_CharT, _Traits>* __sb)
+    {
+      basic_streambuf<_CharT, _Traits>* __old = _M_streambuf;
+      _M_streambuf = __sb;
+      this->clear();
+      return __old;
+    }
+
+  template
+    basic_ios<_CharT, _Traits>&
+    basic_ios<_CharT, _Traits>::copyfmt(const basic_ios& __rhs)
+    {
+      // Per 27.1.1.1, do not call imbue, yet must trash all caches
+      // associated with imbue()
+
+      // Alloc any new word array first, so if it fails we have "rollback".
+      _Words* __words = (__rhs._M_word_size <= _S_local_word_size) ?
+	_M_local_word : new _Words[__rhs._M_word_size];
+
+      // Bump refs before doing callbacks, for safety.
+      _Callback_list* __cb = __rhs._M_callbacks;
+      if (__cb) 
+	__cb->_M_add_reference();
+      _M_call_callbacks(erase_event);
+      if (_M_word != _M_local_word) 
+	{
+	  delete [] _M_word;
+	  _M_word = 0;
+	}
+      _M_dispose_callbacks();
+
+      _M_callbacks = __cb;  // NB: Don't want any added during above.
+      for (int __i = 0; __i < __rhs._M_word_size; ++__i)
+	__words[__i] = __rhs._M_word[__i];
+      if (_M_word != _M_local_word) 
+	{
+	  delete [] _M_word;
+	  _M_word = 0;
+	}
+      _M_word = __words;
+      _M_word_size = __rhs._M_word_size;
+
+      this->flags(__rhs.flags());
+      this->width(__rhs.width());
+      this->precision(__rhs.precision());
+      this->tie(__rhs.tie());
+      this->fill(__rhs.fill());
+      // The next is required to be the last assignment.
+      this->exceptions(__rhs.exceptions());
+      
+      _M_call_callbacks(copyfmt_event);
+      return *this;
+    }
+
+  template
+    char
+    basic_ios<_CharT, _Traits>::narrow(char_type __c, char __dfault) const
+    { 
+      char __ret = __dfault;
+      if (_M_check_facet(_M_fctype))
+	__ret = _M_fctype->narrow(__c, __dfault); 
+      return __ret;
+    }
+
+  template
+    _CharT
+    basic_ios<_CharT, _Traits>::widen(char __c) const
+    {
+      char_type __ret = char_type();
+      if (_M_check_facet(_M_fctype))
+	__ret = _M_fctype->widen(__c); 
+      return __ret;
+    }
+
+  // Locales:
+  template
+    locale
+    basic_ios<_CharT, _Traits>::imbue(const locale& __loc)
+    {
+      locale __old(this->getloc());
+      ios_base::imbue(__loc);
+      _M_cache_facets(__loc);
+      if (this->rdbuf() != 0)
+	this->rdbuf()->pubimbue(__loc);
+      return __old;
+    }
+
+  template
+    void
+    basic_ios<_CharT, _Traits>::init(basic_streambuf<_CharT, _Traits>* __sb)
+    {
+      // NB: This may be called more than once on the same object.
+      ios_base::_M_init();
+      _M_cache_facets(_M_ios_locale);
+      _M_tie = 0;
+
+      // NB: The 27.4.4.1 Postconditions Table specifies requirements
+      // after basic_ios::init() has been called. As part of this,
+      // fill() must return widen(' ') any time after init() has been
+      // called, which needs an imbued ctype facet of char_type to
+      // return without throwing an exception. Unfortunately,
+      // ctype is not necessarily a required facet, so
+      // streams with char_type != [char, wchar_t] will not have it by
+      // default. Because of this, the correct value for _M_fill is
+      // constructed on the first call of fill(). That way,
+      // unformatted input and output with non-required basic_ios
+      // instantiations is possible even without imbuing the expected
+      // ctype facet.
+      _M_fill = 0;
+      _M_fill_init = false;
+
+      _M_exception = goodbit;
+      _M_streambuf = __sb;
+      _M_streambuf_state = __sb ? goodbit : badbit;
+    }
+
+  template
+    void
+    basic_ios<_CharT, _Traits>::_M_cache_facets(const locale& __loc)
+    {
+      if (has_facet<__ctype_type>(__loc))
+	_M_fctype = &use_facet<__ctype_type>(__loc);
+      else
+	_M_fctype = 0;
+      // Should be filled in by ostream and istream, respectively.
+      if (has_facet<__numput_type>(__loc))
+	_M_fnumput = &use_facet<__numput_type>(__loc); 
+      else
+	_M_fnumput = 0;
+      if (has_facet<__numget_type>(__loc))
+	_M_fnumget = &use_facet<__numget_type>(__loc); 
+      else
+	_M_fnumget = 0;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template class basic_ios;
+  extern template class basic_ios;
+} // namespace std
+
+#endif 
diff --git a/contrib/libstdc++/include/bits/basic_string.h b/contrib/libstdc++/include/bits/basic_string.h
new file mode 100644
index 0000000..e05a1c6
--- /dev/null
+++ b/contrib/libstdc++/include/bits/basic_string.h
@@ -0,0 +1,1084 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+/** @file basic_string.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STRING_H
+#define _CPP_BITS_STRING_H	1
+
+#pragma GCC system_header
+
+#include 
+
+namespace std
+{
+  // Documentation?  What's that? 
+  // Nathan Myers .
+  //
+  // A string looks like this:
+  //
+  //                               	[_Rep]
+  //                               	_M_length
+  //  [basic_string]		_M_capacity
+  //  _M_dataplus                	_M_state
+  //  _M_p ---------------->   		unnamed array of char_type
+  
+  // Where the _M_p points to the first character in the string, and
+  // you cast it to a pointer-to-_Rep and subtract 1 to get a
+  // pointer to the header.
+  
+  // This approach has the enormous advantage that a string object
+  // requires only one allocation.  All the ugliness is confined
+  // within a single pair of inline functions, which each compile to
+  // a single "add" instruction: _Rep::_M_data(), and
+  // string::_M_rep(); and the allocation function which gets a
+  // block of raw bytes and with room enough and constructs a _Rep
+  // object at the front.
+  
+  // The reason you want _M_data pointing to the character array and
+  // not the _Rep is so that the debugger can see the string
+  // contents. (Probably we should add a non-inline member to get
+  // the _Rep for the debugger to use, so users can check the actual
+  // string length.)
+  
+  // Note that the _Rep object is a POD so that you can have a
+  // static "empty string" _Rep object already "constructed" before
+  // static constructors have run.  The reference-count encoding is
+  // chosen so that a 0 indicates one reference, so you never try to
+  // destroy the empty-string _Rep object.
+  
+  // All but the last paragraph is considered pretty conventional
+  // for a C++ string implementation.
+  
+  // 21.3  Template class basic_string
+  template
+    class basic_string
+    {
+      // Types:
+    public:
+      typedef _Traits 					    traits_type;
+      typedef typename _Traits::char_type 		    value_type;
+      typedef _Alloc 					    allocator_type;
+      typedef typename _Alloc::size_type 		    size_type;
+      typedef typename _Alloc::difference_type 		    difference_type;
+      typedef typename _Alloc::reference 		    reference;
+      typedef typename _Alloc::const_reference 		    const_reference;
+      typedef typename _Alloc::pointer 			    pointer;
+      typedef typename _Alloc::const_pointer 	   	    const_pointer;
+      typedef __gnu_cxx::__normal_iterator  iterator;
+      typedef __gnu_cxx::__normal_iterator
+                                                            const_iterator;
+      typedef reverse_iterator 	const_reverse_iterator;
+      typedef reverse_iterator 		    reverse_iterator;
+    
+    private:
+      // _Rep: string representation
+      //   Invariants:
+      //   1. String really contains _M_length + 1 characters; last is set
+      //      to 0 only on call to c_str().  We avoid instantiating
+      //      _CharT() where the interface does not require it.
+      //   2. _M_capacity >= _M_length
+      //      Allocated memory is always _M_capacity + (1 * sizeof(_CharT)).
+      //   3. _M_references has three states:
+      //      -1: leaked, one reference, no ref-copies allowed, non-const.
+      //       0: one reference, non-const.
+      //     n>0: n + 1 references, operations require a lock, const.
+      //   4. All fields==0 is an empty string, given the extra storage
+      //      beyond-the-end for a null terminator; thus, the shared
+      //      empty string representation needs no constructor.
+      struct _Rep
+      {
+	// Types:
+	typedef typename _Alloc::template rebind::other _Raw_bytes_alloc;
+
+	// (Public) Data members: 
+
+	// The maximum number of individual char_type elements of an
+	// individual string is determined by _S_max_size. This is the
+	// value that will be returned by max_size().  (Whereas npos
+	// is the maximum number of bytes the allocator can allocate.)
+	// If one was to divvy up the theoretical largest size string,
+	// with a terminating character and m _CharT elements, it'd
+	// look like this: 
+	// npos = sizeof(_Rep) + (m * sizeof(_CharT)) + sizeof(_CharT)
+	// Solving for m:
+	// m = ((npos - sizeof(_Rep))/sizeof(CharT)) - 1 
+	// In addition, this implementation quarters this ammount.
+	static const size_type 	_S_max_size;
+	static const _CharT 	_S_terminal;
+
+	size_type 		_M_length;
+	size_type 		_M_capacity;
+	_Atomic_word		_M_references;
+	
+        bool
+	_M_is_leaked() const
+        { return _M_references < 0; }
+
+        bool
+	_M_is_shared() const
+        { return _M_references > 0; }
+
+        void
+	_M_set_leaked() 
+        { _M_references = -1; }
+
+        void
+	_M_set_sharable() 
+        { _M_references = 0; }
+
+	_CharT* 
+	_M_refdata() throw()
+	{ return reinterpret_cast<_CharT*>(this + 1); }
+
+	_CharT& 
+	operator[](size_t __s) throw()
+	{ return _M_refdata() [__s]; }
+
+	_CharT* 
+	_M_grab(const _Alloc& __alloc1, const _Alloc& __alloc2)
+	{ 
+	  return (!_M_is_leaked() && __alloc1 == __alloc2) 
+	          ? _M_refcopy() : _M_clone(__alloc1);  
+	}
+
+	// Create & Destroy
+	static _Rep* 
+	_S_create(size_t, const _Alloc&);
+
+	void 
+	_M_dispose(const _Alloc& __a)
+	{ 
+	  if (__exchange_and_add(&_M_references, -1) <= 0)  
+	    _M_destroy(__a); 
+	}  // XXX MT
+
+	void 
+	_M_destroy(const _Alloc&) throw();
+
+	_CharT* 
+	_M_refcopy() throw()
+	{ 
+	  __atomic_add(&_M_references, 1); 
+	  return _M_refdata(); 
+	}  // XXX MT
+
+	_CharT* 
+	_M_clone(const _Alloc&, size_type __res = 0);
+      };
+
+      // Use empty-base optimization: http://www.cantrip.org/emptyopt.html
+      struct _Alloc_hider : _Alloc
+      {
+	_Alloc_hider(_CharT* __dat, const _Alloc& __a)
+	: _Alloc(__a), _M_p(__dat) { }
+
+	_CharT* _M_p; // The actual data.
+      };
+
+    public:
+      // Data Members (public):
+      // NB: This is an unsigned type, and thus represents the maximum
+      // size that the allocator can hold.
+      static const size_type 	npos = static_cast(-1);
+
+    private:
+      // Data Members (private):
+      mutable _Alloc_hider 	_M_dataplus;
+
+      // The following storage is init'd to 0 by the linker, resulting
+      // (carefully) in an empty string with one reference.
+      static size_type _S_empty_rep_storage[(sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)];
+
+      _CharT* 
+      _M_data() const 
+      { return  _M_dataplus._M_p; }
+
+      _CharT* 
+      _M_data(_CharT* __p) 
+      { return (_M_dataplus._M_p = __p); }
+
+      _Rep* 
+      _M_rep() const
+      { return &((reinterpret_cast<_Rep*> (_M_data()))[-1]); }
+
+      // For the internal use we have functions similar to `begin'/`end'
+      // but they do not call _M_leak.
+      iterator 
+      _M_ibegin() const { return iterator(_M_data()); }
+
+      iterator 
+      _M_iend() const { return iterator(_M_data() + this->size()); }
+
+      void 
+      _M_leak()    // for use in begin() & non-const op[]
+      { 
+	if (!_M_rep()->_M_is_leaked()) 
+	  _M_leak_hard(); 
+      }
+
+      iterator 
+      _M_check(size_type __pos) const
+      { 
+	if (__pos > this->size())
+	  __throw_out_of_range("basic_string::_M_check"); 
+	return _M_ibegin() + __pos; 
+      }
+
+      // NB: _M_fold doesn't check for a bad __pos1 value.
+      iterator 
+      _M_fold(size_type __pos, size_type __off) const
+      { 
+	bool __testoff =  __off < this->size() - __pos;
+	size_type __newoff = __testoff ? __off : this->size() - __pos;
+	return (_M_ibegin() + __pos + __newoff);
+      }
+
+      // _S_copy_chars is a separate template to permit specialization
+      // to optimize for the common case of pointers as iterators.
+      template
+        static void
+        _S_copy_chars(_CharT* __p, _Iterator __k1, _Iterator __k2)
+        { 
+	  for (; __k1 != __k2; ++__k1, ++__p) 
+	    traits_type::assign(*__p, *__k1); // These types are off.
+	}
+
+      static void
+      _S_copy_chars(_CharT* __p, iterator __k1, iterator __k2)
+      { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+
+      static void
+      _S_copy_chars(_CharT* __p, const_iterator __k1, const_iterator __k2)
+      { _S_copy_chars(__p, __k1.base(), __k2.base()); }
+ 
+      static void
+      _S_copy_chars(_CharT* __p, _CharT* __k1, _CharT* __k2)
+      { traits_type::copy(__p, __k1, __k2 - __k1); }
+
+      static void
+      _S_copy_chars(_CharT* __p, const _CharT* __k1, const _CharT* __k2)
+      { traits_type::copy(__p, __k1, __k2 - __k1); }
+
+      void 
+      _M_mutate(size_type __pos, size_type __len1, size_type __len2);
+
+      void 
+      _M_leak_hard();
+
+      static _Rep& 
+      _S_empty_rep()
+      { return *reinterpret_cast<_Rep*>(&_S_empty_rep_storage); }
+
+    public:
+      // Construct/copy/destroy:
+      // NB: We overload ctors in some cases instead of using default
+      // arguments, per 17.4.4.4 para. 2 item 2.
+
+      inline 
+      basic_string();
+
+      explicit 
+      basic_string(const _Alloc& __a);
+
+      // NB: per LWG issue 42, semantics different from IS:
+      basic_string(const basic_string& __str);
+      basic_string(const basic_string& __str, size_type __pos,
+		   size_type __n = npos);
+      basic_string(const basic_string& __str, size_type __pos,
+		   size_type __n, const _Alloc& __a);
+
+      basic_string(const _CharT* __s, size_type __n,
+		   const _Alloc& __a = _Alloc());
+      basic_string(const _CharT* __s, const _Alloc& __a = _Alloc());
+      basic_string(size_type __n, _CharT __c, const _Alloc& __a = _Alloc());
+
+      template
+        basic_string(_InputIterator __beg, _InputIterator __end,
+		     const _Alloc& __a = _Alloc());
+
+      ~basic_string() 
+      { _M_rep()->_M_dispose(this->get_allocator()); }
+
+      basic_string& 
+      operator=(const basic_string& __str) { return this->assign(__str); }
+
+      basic_string& 
+      operator=(const _CharT* __s) { return this->assign(__s); }
+
+      basic_string& 
+      operator=(_CharT __c) { return this->assign(1, __c); }
+
+      // Iterators:
+      iterator 
+      begin() 
+      { 
+	_M_leak(); 
+	return iterator(_M_data());
+      }
+
+      const_iterator 
+      begin() const 
+      { return const_iterator(_M_data()); }
+
+      iterator 
+      end()
+      {
+         _M_leak();
+	 return iterator(_M_data() + this->size());
+      }
+
+      const_iterator 
+      end() const
+      { return const_iterator(_M_data() + this->size()); }
+
+      reverse_iterator 
+      rbegin() 
+      { return reverse_iterator(this->end()); }
+
+      const_reverse_iterator 
+      rbegin() const 
+      { return const_reverse_iterator(this->end()); }
+
+      reverse_iterator 
+      rend() 
+      { return reverse_iterator(this->begin()); }
+
+      const_reverse_iterator 
+      rend() const 
+      { return const_reverse_iterator(this->begin()); }
+
+    public:
+      // Capacity:
+      size_type 
+      size() const { return _M_rep()->_M_length; }
+
+      size_type 
+      length() const { return _M_rep()->_M_length; }
+
+      size_type 
+      max_size() const { return _Rep::_S_max_size; }
+
+      void 
+      resize(size_type __n, _CharT __c);
+
+      void 
+      resize(size_type __n) { this->resize(__n, _CharT()); }
+
+      size_type 
+      capacity() const { return _M_rep()->_M_capacity; }
+
+      void 
+      reserve(size_type __res_arg = 0);
+
+      void 
+      clear() { _M_mutate(0, this->size(), 0); }
+
+      bool 
+      empty() const { return this->size() == 0; }
+
+      // Element access:
+      const_reference 
+      operator[] (size_type __pos) const 
+      { return _M_data()[__pos]; }
+
+      reference 
+      operator[](size_type __pos) 
+      { 
+	_M_leak(); 
+	return _M_data()[__pos]; 
+      }
+
+      const_reference 
+      at(size_type __n) const
+      {
+	if (__n >= this->size())
+	  __throw_out_of_range("basic_string::at");
+	return _M_data()[__n]; 
+      }
+
+      reference 
+      at(size_type __n)
+      {
+	if (__n >= size())
+	  __throw_out_of_range("basic_string::at");
+	_M_leak(); 
+	return _M_data()[__n]; 
+      }
+
+      // Modifiers:
+      basic_string& 
+      operator+=(const basic_string& __str) { return this->append(__str); }
+
+      basic_string& 
+      operator+=(const _CharT* __s) { return this->append(__s); }
+
+      basic_string& 
+      operator+=(_CharT __c) { return this->append(size_type(1), __c); }
+
+      basic_string& 
+      append(const basic_string& __str);
+
+      basic_string& 
+      append(const basic_string& __str, size_type __pos, size_type __n);
+
+      basic_string& 
+      append(const _CharT* __s, size_type __n);
+
+      basic_string& 
+      append(const _CharT* __s)
+      { return this->append(__s, traits_type::length(__s)); }
+
+      basic_string& 
+      append(size_type __n, _CharT __c);
+
+      template
+        basic_string& 
+        append(_InputIterator __first, _InputIterator __last)
+        { return this->replace(_M_iend(), _M_iend(), __first, __last); }
+
+      void 
+      push_back(_CharT __c)
+      { this->replace(_M_iend(), _M_iend(), 1, __c); }
+
+      basic_string& 
+      assign(const basic_string& __str);
+
+      basic_string& 
+      assign(const basic_string& __str, size_type __pos, size_type __n)
+      {
+	const size_type __strsize = __str.size();
+	if (__pos > __strsize)
+	  __throw_out_of_range("basic_string::assign");
+	const bool __testn = __n < __strsize - __pos;
+	const size_type __newsize = __testn ? __n : __strsize - __pos;
+	return this->assign(__str._M_data() + __pos, __newsize);
+      }
+
+      basic_string& 
+      assign(const _CharT* __s, size_type __n)
+      {
+	if (__n > this->max_size())
+	  __throw_length_error("basic_string::assign");
+	if (_M_rep()->_M_is_shared() || less()(__s, _M_data())
+	    || less()(_M_data() + this->size(), __s))
+	  return _M_replace_safe(_M_ibegin(), _M_iend(), __s, __s + __n);
+	else
+	  {
+	    // Work in-place
+	    const size_type __pos = __s - _M_data();
+	    if (__pos >= __n)
+	      traits_type::copy(_M_data(), __s, __n);
+	    else if (__pos)
+	      traits_type::move(_M_data(), __s, __n);
+	    _M_rep()->_M_length = __n;
+	    _M_data()[__n] = _Rep::_S_terminal;
+	    return *this;
+	  }
+      }
+
+      basic_string& 
+      assign(const _CharT* __s)
+      { return this->assign(__s, traits_type::length(__s)); }
+
+      basic_string& 
+      assign(size_type __n, _CharT __c)
+      { return this->replace(_M_ibegin(), _M_iend(), __n, __c); }
+
+      template
+        basic_string& 
+        assign(_InputIterator __first, _InputIterator __last)
+        { return this->replace(_M_ibegin(), _M_iend(), __first, __last); }
+
+      void 
+      insert(iterator __p, size_type __n, _CharT __c)
+      {	this->replace(__p, __p, __n, __c);  }
+
+      template
+        void insert(iterator __p, _InputIterator __beg, _InputIterator __end)
+        { this->replace(__p, __p, __beg, __end); }
+
+      basic_string& 
+      insert(size_type __pos1, const basic_string& __str)
+      { return this->insert(__pos1, __str, 0, __str.size()); }
+
+      basic_string& 
+      insert(size_type __pos1, const basic_string& __str,
+	     size_type __pos2, size_type __n)
+      {
+	const size_type __strsize = __str.size();
+ 	if (__pos2 > __strsize)
+	  __throw_out_of_range("basic_string::insert");
+	const bool __testn = __n < __strsize - __pos2;
+	const size_type __newsize = __testn ? __n : __strsize - __pos2;
+	return this->insert(__pos1, __str._M_data() + __pos2, __newsize); 
+      }
+
+      basic_string& 
+      insert(size_type __pos, const _CharT* __s, size_type __n)
+      {
+	const size_type __size = this->size();
+ 	if (__pos > __size)
+	  __throw_out_of_range("basic_string::insert");
+	if (__size > this->max_size() - __n)
+	  __throw_length_error("basic_string::insert");
+	if (_M_rep()->_M_is_shared() || less()(__s, _M_data())
+	    || less()(_M_data() + __size, __s))
+	  return _M_replace_safe(_M_ibegin() + __pos, _M_ibegin() + __pos,
+				 __s, __s + __n);
+	else
+	  {
+	    // Work in-place. If _M_mutate reallocates the string, __s
+	    // does not point anymore to valid data, therefore we save its
+	    // offset, then we restore it.
+	    const size_type __off = __s - _M_data();
+	    _M_mutate(__pos, 0, __n);
+	    __s = _M_data() + __off;
+	    _CharT* __p = _M_data() + __pos;
+	    if (__s  + __n <= __p)
+	      traits_type::copy(__p, __s, __n);
+	    else if (__s >= __p)
+	      traits_type::copy(__p, __s + __n, __n);
+	    else
+	      {
+		traits_type::copy(__p, __s, __p - __s);
+		traits_type::copy(__p + (__p - __s), __p + __n, __n - (__p - __s));
+	      }
+	    return *this;
+	  }
+       }
+
+      basic_string&  
+      insert(size_type __pos, const _CharT* __s)
+      { return this->insert(__pos, __s, traits_type::length(__s)); }
+
+      basic_string& 
+      insert(size_type __pos, size_type __n, _CharT __c)
+      { 
+	this->insert(_M_check(__pos), __n, __c); 
+	return *this; 
+      }
+
+      iterator 
+      insert(iterator __p, _CharT __c = _CharT())
+      {
+	size_type __pos = __p - _M_ibegin();
+	this->insert(_M_check(__pos), size_type(1), __c);
+	_M_rep()->_M_set_leaked(); 
+ 	return this->_M_ibegin() + __pos; 
+      }
+
+      basic_string& 
+      erase(size_type __pos = 0, size_type __n = npos)
+      { 
+	return this->replace(_M_check(__pos), _M_fold(__pos, __n),
+			     _M_data(), _M_data()); 
+      }
+
+      iterator 
+      erase(iterator __position)
+      {
+	size_type __i = __position - _M_ibegin();
+        this->replace(__position, __position + 1, _M_data(), _M_data());
+	_M_rep()->_M_set_leaked(); 
+	return _M_ibegin() + __i;
+      }
+
+      iterator 
+      erase(iterator __first, iterator __last)
+      {
+        size_type __i = __first - _M_ibegin();
+	this->replace(__first, __last, _M_data(), _M_data());
+	_M_rep()->_M_set_leaked();
+       return _M_ibegin() + __i;
+      }
+
+      basic_string& 
+      replace(size_type __pos, size_type __n, const basic_string& __str)
+      { return this->replace(__pos, __n, __str._M_data(), __str.size()); }
+
+      basic_string& 
+      replace(size_type __pos1, size_type __n1, const basic_string& __str,
+	      size_type __pos2, size_type __n2);
+
+      basic_string& 
+      replace(size_type __pos, size_type __n1, const _CharT* __s,
+	      size_type __n2)
+      { 
+	const size_type __size = this->size();
+ 	if (__pos > __size)
+	  __throw_out_of_range("basic_string::replace");
+	const bool __testn1 = __n1 < __size - __pos;
+	const size_type __foldn1 = __testn1 ? __n1 : __size - __pos;
+	if (__size - __foldn1 > this->max_size() - __n2)
+	  __throw_length_error("basic_string::replace");
+	if (_M_rep()->_M_is_shared() || less()(__s, _M_data())
+	    || less()(_M_data() + __size, __s))
+	  return _M_replace_safe(_M_ibegin() + __pos,
+				 _M_ibegin() + __pos + __foldn1, __s, __s + __n2);	
+	else return this->replace(_M_check(__pos), _M_fold(__pos, __n1),
+				  __s, __s + __n2); 
+      }
+
+      basic_string& 
+      replace(size_type __pos, size_type __n1, const _CharT* __s)
+      { return this->replace(__pos, __n1, __s, traits_type::length(__s)); }
+
+      basic_string& 
+      replace(size_type __pos, size_type __n1, size_type __n2, _CharT __c)
+      { return this->replace(_M_check(__pos), _M_fold(__pos, __n1), __n2, __c); }
+
+      basic_string& 
+      replace(iterator __i1, iterator __i2, const basic_string& __str)
+      { return this->replace(__i1, __i2, __str._M_data(), __str.size()); }
+
+      basic_string& 
+      replace(iterator __i1, iterator __i2,
+                           const _CharT* __s, size_type __n)
+      { return this->replace(__i1 - _M_ibegin(), __i2 - __i1, __s, __n); }
+
+      basic_string& 
+      replace(iterator __i1, iterator __i2, const _CharT* __s)
+      { return this->replace(__i1, __i2, __s, traits_type::length(__s)); }
+
+      basic_string& 
+      replace(iterator __i1, iterator __i2, size_type __n, _CharT __c);
+
+      template
+        basic_string& 
+        replace(iterator __i1, iterator __i2,
+		_InputIterator __k1, _InputIterator __k2)
+        { return _M_replace(__i1, __i2, __k1, __k2,
+	     typename iterator_traits<_InputIterator>::iterator_category()); }
+
+    private:
+      template
+        basic_string& 
+        _M_replace(iterator __i1, iterator __i2, _InputIterator __k1, 
+		   _InputIterator __k2, input_iterator_tag);
+
+      template
+        basic_string& 
+        _M_replace_safe(iterator __i1, iterator __i2, _ForwardIterator __k1, 
+		   _ForwardIterator __k2);
+
+      // _S_construct_aux is used to implement the 21.3.1 para 15 which
+      // requires special behaviour if _InIter is an integral type
+      template
+        static _CharT*
+        _S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a,
+			 __false_type)
+	{
+          typedef typename iterator_traits<_InIter>::iterator_category _Tag;
+          return _S_construct(__beg, __end, __a, _Tag());
+	}
+ 
+      template
+        static _CharT*
+        _S_construct_aux(_InIter __beg, _InIter __end, const _Alloc& __a,
+			 __true_type)
+	{
+	  return _S_construct(static_cast(__beg),
+			      static_cast(__end), __a);
+	}
+ 
+      template
+        static _CharT*
+        _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a)
+	{
+	  typedef typename _Is_integer<_InIter>::_Integral _Integral;
+	  return _S_construct_aux(__beg, __end, __a, _Integral());
+        }
+
+      // For Input Iterators, used in istreambuf_iterators, etc.
+      template
+        static _CharT*
+         _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
+		      input_iterator_tag);
+      
+      // For forward_iterators up to random_access_iterators, used for
+      // string::iterator, _CharT*, etc.
+      template
+        static _CharT*
+        _S_construct(_FwdIter __beg, _FwdIter __end, const _Alloc& __a,
+		     forward_iterator_tag);
+
+      static _CharT* 
+      _S_construct(size_type __req, _CharT __c, const _Alloc& __a);
+
+    public:
+
+      size_type 
+      copy(_CharT* __s, size_type __n, size_type __pos = 0) const;
+
+      void 
+      swap(basic_string<_CharT, _Traits, _Alloc>& __s);
+
+      // String operations:
+      const _CharT* 
+      c_str() const
+      {
+	// MT: This assumes concurrent writes are OK.
+	size_type __n = this->size();
+	traits_type::assign(_M_data()[__n], _Rep::_S_terminal);
+        return _M_data();
+      }
+
+      const _CharT* 
+      data() const { return _M_data(); }
+
+      allocator_type 
+      get_allocator() const { return _M_dataplus; }
+
+      size_type 
+      find(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      size_type 
+      find(const basic_string& __str, size_type __pos = 0) const
+      { return this->find(__str.data(), __pos, __str.size()); }
+
+      size_type 
+      find(const _CharT* __s, size_type __pos = 0) const
+      { return this->find(__s, __pos, traits_type::length(__s)); }
+
+      size_type 
+      find(_CharT __c, size_type __pos = 0) const;
+
+      size_type 
+      rfind(const basic_string& __str, size_type __pos = npos) const
+      { return this->rfind(__str.data(), __pos, __str.size()); }
+
+      size_type 
+      rfind(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      size_type 
+      rfind(const _CharT* __s, size_type __pos = npos) const
+      { return this->rfind(__s, __pos, traits_type::length(__s)); }
+
+      size_type 
+      rfind(_CharT __c, size_type __pos = npos) const;
+
+      size_type 
+      find_first_of(const basic_string& __str, size_type __pos = 0) const
+      { return this->find_first_of(__str.data(), __pos, __str.size()); }
+
+      size_type 
+      find_first_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      size_type 
+      find_first_of(const _CharT* __s, size_type __pos = 0) const
+      { return this->find_first_of(__s, __pos, traits_type::length(__s)); }
+
+      size_type 
+      find_first_of(_CharT __c, size_type __pos = 0) const
+      { return this->find(__c, __pos); }
+
+      size_type 
+      find_last_of(const basic_string& __str, size_type __pos = npos) const
+      { return this->find_last_of(__str.data(), __pos, __str.size()); }
+
+      size_type 
+      find_last_of(const _CharT* __s, size_type __pos, size_type __n) const;
+
+      size_type 
+      find_last_of(const _CharT* __s, size_type __pos = npos) const
+      { return this->find_last_of(__s, __pos, traits_type::length(__s)); }
+
+      size_type 
+      find_last_of(_CharT __c, size_type __pos = npos) const
+      { return this->rfind(__c, __pos); }
+
+      size_type 
+      find_first_not_of(const basic_string& __str, size_type __pos = 0) const
+      { return this->find_first_not_of(__str.data(), __pos, __str.size()); }
+
+      size_type 
+      find_first_not_of(const _CharT* __s, size_type __pos, 
+			size_type __n) const;
+
+      size_type 
+      find_first_not_of(const _CharT* __s, size_type __pos = 0) const
+      { return this->find_first_not_of(__s, __pos, traits_type::length(__s)); }
+
+      size_type 
+      find_first_not_of(_CharT __c, size_type __pos = 0) const;
+
+      size_type 
+      find_last_not_of(const basic_string& __str, size_type __pos = npos) const
+      { return this->find_last_not_of(__str.data(), __pos, __str.size()); }
+
+      size_type 
+      find_last_not_of(const _CharT* __s, size_type __pos, 
+		       size_type __n) const;
+      size_type 
+      find_last_not_of(const _CharT* __s, size_type __pos = npos) const
+      { return this->find_last_not_of(__s, __pos, traits_type::length(__s)); }
+
+      size_type 
+      find_last_not_of(_CharT __c, size_type __pos = npos) const;
+
+      basic_string 
+      substr(size_type __pos = 0, size_type __n = npos) const
+      { 
+	if (__pos > this->size())
+	  __throw_out_of_range("basic_string::substr");
+	return basic_string(*this, __pos, __n); 
+      }
+
+      int 
+      compare(const basic_string& __str) const
+      {
+	size_type __size = this->size();
+	size_type __osize = __str.size();
+	size_type __len = min(__size, __osize);
+      
+	int __r = traits_type::compare(_M_data(), __str.data(), __len);
+	if (!__r)
+	  __r =  __size - __osize;
+	return __r;
+      }
+
+      int 
+      compare(size_type __pos, size_type __n, const basic_string& __str) const;
+
+      int 
+      compare(size_type __pos1, size_type __n1, const basic_string& __str,
+	      size_type __pos2, size_type __n2) const;
+
+      int 
+      compare(const _CharT* __s) const;
+
+      // _GLIBCPP_RESOLVE_LIB_DEFECTS
+      // 5. String::compare specification questionable
+      int 
+      compare(size_type __pos, size_type __n1, const _CharT* __s) const;
+
+      int 
+      compare(size_type __pos, size_type __n1, const _CharT* __s, 
+	      size_type __n2) const;
+  };
+
+
+  template
+    inline basic_string<_CharT, _Traits, _Alloc>::
+    basic_string()
+    : _M_dataplus(_S_empty_rep()._M_refcopy(), _Alloc()) { }
+
+  // operator+
+  template
+    basic_string<_CharT, _Traits, _Alloc>
+    operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    {
+      basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  template
+    basic_string<_CharT,_Traits,_Alloc>
+    operator+(const _CharT* __lhs,
+	      const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+
+  template
+    basic_string<_CharT,_Traits,_Alloc>
+    operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
+
+  template
+    inline basic_string<_CharT, _Traits, _Alloc>
+    operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	     const _CharT* __rhs)
+    {
+      basic_string<_CharT, _Traits, _Alloc> __str(__lhs);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  template
+    inline basic_string<_CharT, _Traits, _Alloc>
+    operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
+    {
+      typedef basic_string<_CharT, _Traits, _Alloc> 	__string_type;
+      typedef typename __string_type::size_type		__size_type;
+      __string_type __str(__lhs);
+      __str.append(__size_type(1), __rhs);
+      return __str;
+    }
+
+  // operator ==
+  template
+    inline bool
+    operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) == 0; }
+
+  template
+    inline bool
+    operator==(const _CharT* __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) == 0; }
+
+  template
+    inline bool
+    operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) == 0; }
+
+  // operator !=
+  template
+    inline bool
+    operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) != 0; }
+
+  template
+    inline bool
+    operator!=(const _CharT* __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) != 0; }
+
+  template
+    inline bool
+    operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) != 0; }
+
+  // operator <
+  template
+    inline bool
+    operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) < 0; }
+
+  template
+    inline bool
+    operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const _CharT* __rhs)
+    { return __lhs.compare(__rhs) < 0; }
+
+  template
+    inline bool
+    operator<(const _CharT* __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) > 0; }
+
+  // operator >
+  template
+    inline bool
+    operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) > 0; }
+
+  template
+    inline bool
+    operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	      const _CharT* __rhs)
+    { return __lhs.compare(__rhs) > 0; }
+
+  template
+    inline bool
+    operator>(const _CharT* __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) < 0; }
+
+  // operator <=
+  template
+    inline bool
+    operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) <= 0; }
+
+  template
+    inline bool
+    operator<=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) <= 0; }
+
+  template
+    inline bool
+    operator<=(const _CharT* __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+  { return __rhs.compare(__lhs) >= 0; }
+
+  // operator >=
+  template
+    inline bool
+    operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __lhs.compare(__rhs) >= 0; }
+
+  template
+    inline bool
+    operator>=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	       const _CharT* __rhs)
+    { return __lhs.compare(__rhs) >= 0; }
+
+  template
+    inline bool
+    operator>=(const _CharT* __lhs,
+	     const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { return __rhs.compare(__lhs) <= 0; }
+
+
+  template
+    inline void
+    swap(basic_string<_CharT, _Traits, _Alloc>& __lhs,
+	 basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    { __lhs.swap(__rhs); }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __is,
+	       basic_string<_CharT, _Traits, _Alloc>& __str);
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __os,
+	       const basic_string<_CharT, _Traits, _Alloc>& __str);
+
+  template
+    basic_istream<_CharT,_Traits>&
+    getline(basic_istream<_CharT, _Traits>& __is,
+	    basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim);
+
+  template
+    inline basic_istream<_CharT,_Traits>&
+    getline(basic_istream<_CharT, _Traits>& __is,
+	    basic_string<_CharT, _Traits, _Alloc>& __str);
+} // namespace std
+
+#endif /* _CPP_BITS_STRING_H */
diff --git a/contrib/libstdc++/include/bits/basic_string.tcc b/contrib/libstdc++/include/bits/basic_string.tcc
new file mode 100644
index 0000000..35a2f11
--- /dev/null
+++ b/contrib/libstdc++/include/bits/basic_string.tcc
@@ -0,0 +1,981 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+// This file is included by .  It is not meant to be included
+// separately.
+
+// Written by Jason Merrill based upon the specification by Takanori Adachi
+// in ANSI X3J16/94-0013R2.  Rewritten by Nathan Myers to ISO-14882.
+
+#ifndef _CPP_BITS_STRING_TCC
+#define _CPP_BITS_STRING_TCC 1
+
+#pragma GCC system_header
+
+namespace std
+{
+  template
+    const typename basic_string<_CharT, _Traits, _Alloc>::size_type 
+    basic_string<_CharT, _Traits, _Alloc>::
+    _Rep::_S_max_size = (((npos - sizeof(_Rep))/sizeof(_CharT)) - 1) / 4;
+
+  template
+    const _CharT 
+    basic_string<_CharT, _Traits, _Alloc>::
+    _Rep::_S_terminal = _CharT();
+
+  template
+    const typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::npos;
+
+  // Linker sets _S_empty_rep_storage to all 0s (one reference, empty string)
+  // at static init time (before static ctors are run).
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::_S_empty_rep_storage[
+    (sizeof(_Rep) + sizeof(_CharT) + sizeof(size_type) - 1)/sizeof(size_type)];
+
+  // NB: This is the special case for Input Iterators, used in
+  // istreambuf_iterators, etc.
+  // Input Iterators have a cost structure very different from
+  // pointers, calling for a different coding style.
+  template
+    template
+      _CharT*
+      basic_string<_CharT, _Traits, _Alloc>::
+      _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a,
+		   input_iterator_tag)
+      {
+	if (__beg == __end && __a == _Alloc())
+	  return _S_empty_rep()._M_refcopy();
+	// Avoid reallocation for common case.
+	_CharT __buf[100];
+	size_type __i = 0;
+	while (__beg != __end && __i < sizeof(__buf) / sizeof(_CharT))
+	  { 
+	    __buf[__i++] = *__beg; 
+	    ++__beg; 
+	  }
+	_Rep* __r = _Rep::_S_create(__i, __a);
+	traits_type::copy(__r->_M_refdata(), __buf, __i);
+	__r->_M_length = __i;
+	try 
+	  {
+	    // NB: this loop looks precisely this way because
+	    // it avoids comparing __beg != __end any more
+	    // than strictly necessary; != might be expensive!
+	    for (;;)
+	      {
+		_CharT* __p = __r->_M_refdata() + __r->_M_length;
+		_CharT* __last = __r->_M_refdata() + __r->_M_capacity;
+		for (;;)
+		  {
+		    if (__beg == __end)
+		      {
+			__r->_M_length = __p - __r->_M_refdata();
+			*__p = _Rep::_S_terminal;       // grrr.
+			return __r->_M_refdata();
+		      }
+		    if (__p == __last)
+		      break;
+		    *__p++ = *__beg; 
+		    ++__beg;
+		  }
+		// Allocate more space.
+		size_type __len = __p - __r->_M_refdata();
+		_Rep* __another = _Rep::_S_create(__len + 1, __a);
+		traits_type::copy(__another->_M_refdata(), 
+				  __r->_M_refdata(), __len);
+		__r->_M_destroy(__a);
+		__r = __another;
+		__r->_M_length = __len;
+	      }
+	  }
+	catch(...) 
+	  {
+	    __r->_M_destroy(__a); 
+	    __throw_exception_again;
+	  }
+	return 0;
+      }
+  
+  template
+    template 
+      _CharT*
+      basic_string<_CharT, _Traits, _Alloc>::
+      _S_construct(_InIter __beg, _InIter __end, const _Alloc& __a, 
+		   forward_iterator_tag)
+      {
+	size_type __dnew = static_cast(distance(__beg, __end));
+
+	// NB: Not required, but considered best practice.
+	if (__builtin_expect(__beg == _InIter(0), 0))
+	  __throw_logic_error("attempt to create string with null pointer");
+	
+	if (__beg == __end && __a == _Alloc())
+	  return _S_empty_rep()._M_refcopy();
+
+	// Check for out_of_range and length_error exceptions.
+	_Rep* __r = _Rep::_S_create(__dnew, __a);
+	try 
+	  { _S_copy_chars(__r->_M_refdata(), __beg, __end); }
+	catch(...) 
+	  { 
+	    __r->_M_destroy(__a); 
+	    __throw_exception_again;
+	  }
+	__r->_M_length = __dnew;
+
+	__r->_M_refdata()[__dnew] = _Rep::_S_terminal;  // grrr.
+	return __r->_M_refdata();
+      }
+
+  template
+    _CharT*
+    basic_string<_CharT, _Traits, _Alloc>::
+    _S_construct(size_type __n, _CharT __c, const _Alloc& __a)
+    {
+      if (__n == 0 && __a == _Alloc())
+	return _S_empty_rep()._M_refcopy();
+
+      // Check for out_of_range and length_error exceptions.
+      _Rep* __r = _Rep::_S_create(__n, __a);
+      try 
+	{ 
+	  if (__n) 
+	    traits_type::assign(__r->_M_refdata(), __n, __c); 
+	}
+      catch(...) 
+	{ 
+	  __r->_M_destroy(__a); 
+	  __throw_exception_again;
+	}
+      __r->_M_length = __n;
+      __r->_M_refdata()[__n] = _Rep::_S_terminal;  // grrr
+      return __r->_M_refdata();
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const basic_string& __str)
+    : _M_dataplus(__str._M_rep()->_M_grab(_Alloc(), __str.get_allocator()),
+		 __str.get_allocator())
+    { }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const _Alloc& __a)
+    : _M_dataplus(_S_construct(size_type(), _CharT(), __a), __a)
+    { }
+ 
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const basic_string& __str, size_type __pos, size_type __n)
+    : _M_dataplus(_S_construct(__str._M_check(__pos), 
+			       __str._M_fold(__pos, __n), _Alloc()), _Alloc())
+    { }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const basic_string& __str, size_type __pos,
+		 size_type __n, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__str._M_check(__pos), 
+			       __str._M_fold(__pos, __n), __a), __a)
+    { }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const _CharT* __s, size_type __n, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__s, __s + __n, __a), __a)
+    { }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(const _CharT* __s, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__s, __s ? __s + traits_type::length(__s) : 0, 
+			       __a), __a)
+    { }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(size_type __n, _CharT __c, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__n, __c, __a), __a)
+    { }
+ 
+  template
+    template
+    basic_string<_CharT, _Traits, _Alloc>::
+    basic_string(_InputIter __beg, _InputIter __end, const _Alloc& __a)
+    : _M_dataplus(_S_construct(__beg, __end, __a), __a)
+    { }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::assign(const basic_string& __str)
+    {
+      if (_M_rep() != __str._M_rep())
+	{
+	  // XXX MT
+	  allocator_type __a = this->get_allocator();
+	  _CharT* __tmp = __str._M_rep()->_M_grab(__a, __str.get_allocator());
+	  _M_rep()->_M_dispose(__a);
+	  _M_data(__tmp);
+	}
+      return *this;
+    }
+  
+  template
+    void
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::
+    _M_destroy(const _Alloc& __a) throw ()
+    {
+      size_type __size = sizeof(_Rep) + (_M_capacity + 1) * sizeof(_CharT);
+      _Raw_bytes_alloc(__a).deallocate(reinterpret_cast(this), __size);
+    }
+
+  template
+    void
+    basic_string<_CharT, _Traits, _Alloc>::_M_leak_hard()
+    {
+      if (_M_rep()->_M_is_shared()) 
+	_M_mutate(0, 0, 0);
+      _M_rep()->_M_set_leaked();
+    }
+
+  // _M_mutate and, below, _M_clone, include, in the same form, an exponential
+  // growth policy, necessary to meet amortized linear time requirements of
+  // the library: see http://gcc.gnu.org/ml/libstdc++/2001-07/msg00085.html.
+  // The policy is active for allocations requiring an amount of memory above
+  // system pagesize. This is consistent with the requirements of the standard:
+  // see, f.i., http://gcc.gnu.org/ml/libstdc++/2001-07/msg00130.html
+  template
+    void
+    basic_string<_CharT, _Traits, _Alloc>::
+    _M_mutate(size_type __pos, size_type __len1, size_type __len2)
+    {
+      size_type       __old_size = this->size();
+      const size_type __new_size = __old_size + __len2 - __len1;
+      const _CharT*        __src = _M_data()  + __pos + __len1;
+      const size_type __how_much = __old_size - __pos - __len1;
+      
+      if (_M_rep()->_M_is_shared() || __new_size > capacity())
+	{
+	  // Must reallocate.
+	  allocator_type __a = get_allocator();
+	  // See below (_S_create) for the meaning and value of these
+	  // constants.
+	  const size_type __pagesize = 4096;
+	  const size_type __malloc_header_size = 4 * sizeof (void*);
+	  // The biggest string which fits in a memory page
+	  const size_type __page_capacity = (__pagesize - __malloc_header_size
+					     - sizeof(_Rep) - sizeof(_CharT)) 
+	    				     / sizeof(_CharT);
+	  _Rep* __r;
+	  if (__new_size > capacity() && __new_size > __page_capacity)
+	    // Growing exponentially.
+	    __r = _Rep::_S_create(__new_size > 2*capacity() ?
+				  __new_size : 2*capacity(), __a);
+	  else
+	    __r = _Rep::_S_create(__new_size, __a);
+	  try 
+	    {
+	      if (__pos)
+		traits_type::copy(__r->_M_refdata(), _M_data(), __pos);
+	      if (__how_much)
+		traits_type::copy(__r->_M_refdata() + __pos + __len2, 
+				  __src, __how_much);
+	    }
+	  catch(...) 
+	    { 
+	      __r->_M_dispose(get_allocator()); 
+	      __throw_exception_again;
+	    }
+	  _M_rep()->_M_dispose(__a);
+	  _M_data(__r->_M_refdata());
+      }
+      else if (__how_much && __len1 != __len2)
+	{
+	  // Work in-place
+	  traits_type::move(_M_data() + __pos + __len2, __src, __how_much);
+	}
+      _M_rep()->_M_set_sharable();
+      _M_rep()->_M_length = __new_size;
+      _M_data()[__new_size] = _Rep::_S_terminal; // grrr. (per 21.3.4)
+    // You cannot leave those LWG people alone for a second.
+    }
+  
+  template
+    void
+    basic_string<_CharT, _Traits, _Alloc>::reserve(size_type __res)
+    {
+      if (__res > this->capacity() || _M_rep()->_M_is_shared())
+        {
+	  if (__res > this->max_size())
+	    __throw_length_error("basic_string::reserve");
+	  // Make sure we don't shrink below the current size
+	  if (__res < this->size())
+	    __res = this->size();
+	  allocator_type __a = get_allocator();
+	  _CharT* __tmp = _M_rep()->_M_clone(__a, __res - this->size());
+	  _M_rep()->_M_dispose(__a);
+	  _M_data(__tmp);
+        }
+    }
+  
+  template
+    void basic_string<_CharT, _Traits, _Alloc>::swap(basic_string& __s)
+    {
+      if (_M_rep()->_M_is_leaked()) 
+	_M_rep()->_M_set_sharable();
+      if (__s._M_rep()->_M_is_leaked()) 
+	__s._M_rep()->_M_set_sharable();
+      if (this->get_allocator() == __s.get_allocator())
+	{
+	  _CharT* __tmp = _M_data();
+	  _M_data(__s._M_data());
+	  __s._M_data(__tmp);
+	}
+      // The code below can usually be optimized away.
+      else 
+	{
+	  basic_string __tmp1(_M_ibegin(), _M_iend(), __s.get_allocator());
+	  basic_string __tmp2(__s._M_ibegin(), __s._M_iend(), 
+			      this->get_allocator());
+	  *this = __tmp2;
+	  __s = __tmp1;
+	}
+    }
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::_Rep*
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::
+    _S_create(size_t __capacity, const _Alloc& __alloc)
+    {
+      typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+      // 83.  String::npos vs. string::max_size()
+      if (__capacity > _S_max_size)
+#else
+      if (__capacity == npos)
+#endif
+	__throw_length_error("basic_string::_S_create");
+
+      // NB: Need an array of char_type[__capacity], plus a
+      // terminating null char_type() element, plus enough for the
+      // _Rep data structure. Whew. Seemingly so needy, yet so elemental.
+      size_t __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+
+      // The standard places no restriction on allocating more memory
+      // than is strictly needed within this layer at the moment or as
+      // requested by an explicit application call to reserve().  Many
+      // malloc implementations perform quite poorly when an
+      // application attempts to allocate memory in a stepwise fashion
+      // growing each allocation size by only 1 char.  Additionally,
+      // it makes little sense to allocate less linear memory than the
+      // natural blocking size of the malloc implementation.
+      // Unfortunately, we would need a somewhat low-level calculation
+      // with tuned parameters to get this perfect for any particular
+      // malloc implementation.  Fortunately, generalizations about
+      // common features seen among implementations seems to suffice.
+
+      // __pagesize need not match the actual VM page size for good
+      // results in practice, thus we pick a common value on the low
+      // side.  __malloc_header_size is an estimate of the amount of
+      // overhead per memory allocation (in practice seen N * sizeof
+      // (void*) where N is 0, 2 or 4).  According to folklore,
+      // picking this value on the high side is better than
+      // low-balling it (especially when this algorithm is used with
+      // malloc implementations that allocate memory blocks rounded up
+      // to a size which is a power of 2).
+      const size_t __pagesize = 4096; // must be 2^i * __subpagesize
+      const size_t __subpagesize = 128; // should be >> __malloc_header_size
+      const size_t __malloc_header_size = 4 * sizeof (void*);
+      if ((__size + __malloc_header_size) > __pagesize)
+	{
+	  size_t __extra =
+	    (__pagesize - ((__size + __malloc_header_size) % __pagesize))
+	    % __pagesize;
+	  __capacity += __extra / sizeof(_CharT);
+	  __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+	}
+      else if (__size > __subpagesize)
+	{
+	  size_t __extra =
+	    (__subpagesize - ((__size + __malloc_header_size) % __subpagesize))
+	    % __subpagesize;
+	  __capacity += __extra / sizeof(_CharT);
+	  __size = (__capacity + 1) * sizeof(_CharT) + sizeof(_Rep);
+	}
+
+      // NB: Might throw, but no worries about a leak, mate: _Rep()
+      // does not throw.
+      void* __place = _Raw_bytes_alloc(__alloc).allocate(__size);
+      _Rep *__p = new (__place) _Rep;
+      __p->_M_capacity = __capacity;
+      __p->_M_set_sharable();  // One reference.
+      __p->_M_length = 0;
+      return __p;
+    }
+
+  template
+    _CharT*
+    basic_string<_CharT, _Traits, _Alloc>::_Rep::
+    _M_clone(const _Alloc& __alloc, size_type __res)
+    {
+      // Requested capacity of the clone.
+      const size_type __requested_cap = _M_length + __res;
+      // See above (_S_create) for the meaning and value of these constants.
+      const size_type __pagesize = 4096;
+      const size_type __malloc_header_size = 4 * sizeof (void*);
+      // The biggest string which fits in a memory page.
+      const size_type __page_capacity =
+        (__pagesize - __malloc_header_size - sizeof(_Rep) - sizeof(_CharT))
+        / sizeof(_CharT);
+      _Rep* __r;
+      if (__requested_cap > _M_capacity && __requested_cap > __page_capacity)
+        // Growing exponentially.
+        __r = _Rep::_S_create(__requested_cap > 2*_M_capacity ?
+                              __requested_cap : 2*_M_capacity, __alloc);
+      else
+        __r = _Rep::_S_create(__requested_cap, __alloc);
+      
+      if (_M_length)
+	{
+	  try 
+	    { traits_type::copy(__r->_M_refdata(), _M_refdata(), _M_length); }
+	  catch(...)  
+	    { 
+	      __r->_M_destroy(__alloc); 
+	      __throw_exception_again;
+	    }
+	}
+      __r->_M_length = _M_length;
+      return __r->_M_refdata();
+    }
+  
+  template
+    void
+    basic_string<_CharT, _Traits, _Alloc>::resize(size_type __n, _CharT __c)
+    {
+      if (__n > max_size())
+	__throw_length_error("basic_string::resize");
+      size_type __size = this->size();
+      if (__size < __n)
+	this->append(__n - __size, __c);
+      else if (__n < __size)
+	this->erase(__n);
+      // else nothing (in particular, avoid calling _M_mutate() unnecessarily.)
+    }
+  
+  // This is the general replace helper, which gets instantiated both
+  // for input-iterators and forward-iterators. It buffers internally and
+  // then calls _M_replace_safe. For input-iterators this is almost the
+  // best we can do, but for forward-iterators many optimizations could be
+  // conceived: f.i., when source and destination ranges do not overlap
+  // buffering is not really needed. In order to easily implement them, it
+  // could become useful to add an _M_replace(forward_iterator_tag)
+  template
+    template
+      basic_string<_CharT, _Traits, _Alloc>&
+      basic_string<_CharT, _Traits, _Alloc>::
+      _M_replace(iterator __i1, iterator __i2, _InputIter __k1, 
+		 _InputIter __k2, input_iterator_tag)
+      {
+	// Save concerned source string data in a temporary.
+	basic_string __s(__k1, __k2);
+	return _M_replace_safe(__i1, __i2, __s._M_ibegin(), __s._M_iend());
+      }
+
+  // This is a special replace helper, which does not buffer internally
+  // and can be used in the "safe" situations involving forward-iterators,
+  // i.e., when source and destination ranges are known to not overlap.
+  // Presently, is called by _M_replace, by the various append and by
+  // the assigns.
+  template
+    template
+      basic_string<_CharT, _Traits, _Alloc>&
+      basic_string<_CharT, _Traits, _Alloc>::
+      _M_replace_safe(iterator __i1, iterator __i2, _ForwardIter __k1, 
+		      _ForwardIter __k2)
+      {
+	size_type __dnew = static_cast(distance(__k1, __k2));
+	size_type __dold = __i2 - __i1;
+	size_type __dmax = this->max_size();
+
+	if (__dmax <= __dnew)
+	  __throw_length_error("basic_string::_M_replace");
+	size_type __off = __i1 - _M_ibegin();
+	_M_mutate(__off, __dold, __dnew);
+
+	// Invalidated __i1, __i2
+        if (__dnew)
+	  _S_copy_chars(_M_data() + __off, __k1, __k2);
+
+	return *this;
+      }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    replace(size_type __pos1, size_type __n1, const basic_string& __str,
+	    size_type __pos2, size_type __n2)
+    {
+      const size_type __strsize = __str.size();
+      if (__pos2 > __strsize)
+	__throw_out_of_range("basic_string::replace");
+      const bool __testn2 = __n2 < __strsize - __pos2;
+      const size_type __foldn2 = __testn2 ? __n2 : __strsize - __pos2;
+      return this->replace(__pos1, __n1,
+			   __str._M_data() + __pos2, __foldn2);      
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(const basic_string& __str)
+    {
+      // Iff appending itself, string needs to pre-reserve the
+      // correct size so that _M_mutate does not clobber the
+      // iterators formed here.
+      size_type __size = __str.size();
+      size_type __len = __size + this->size();
+      if (__len > this->capacity())
+	this->reserve(__len);
+      return _M_replace_safe(_M_iend(), _M_iend(), __str._M_ibegin(),
+			     __str._M_iend());
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(const basic_string& __str, size_type __pos, size_type __n)
+    {
+      // Iff appending itself, string needs to pre-reserve the
+      // correct size so that _M_mutate does not clobber the
+      // iterators formed here.
+      size_type __len = min(__str.size() - __pos, __n) + this->size();
+      if (__len > this->capacity())
+	this->reserve(__len);
+      return _M_replace_safe(_M_iend(), _M_iend(), __str._M_check(__pos),
+			     __str._M_fold(__pos, __n));
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(const _CharT* __s, size_type __n)
+    {
+      size_type __len = __n + this->size();
+      if (__len > this->capacity())
+	this->reserve(__len);
+      return _M_replace_safe(_M_iend(), _M_iend(), __s, __s + __n);
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    append(size_type __n, _CharT __c)
+    {
+      size_type __len = __n + this->size();
+      if (__len > this->capacity())
+	this->reserve(__len);
+       return this->replace(_M_iend(), _M_iend(), __n, __c);
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>
+    operator+(const _CharT* __lhs,
+	      const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    {
+      typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+      typedef typename __string_type::size_type	  __size_type;
+      __size_type __len = _Traits::length(__lhs);
+      __string_type __str;
+      __str.reserve(__len + __rhs.size());
+      __str.append(__lhs, __lhs + __len);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>
+    operator+(_CharT __lhs, const basic_string<_CharT, _Traits, _Alloc>& __rhs)
+    {
+      typedef basic_string<_CharT, _Traits, _Alloc> __string_type;
+      typedef typename __string_type::size_type	  __size_type;
+      __string_type __str;
+      __size_type __len = __rhs.size();
+      __str.reserve(__len + 1);
+      __str.append(__size_type(1), __lhs);
+      __str.append(__rhs);
+      return __str;
+    }
+
+  template
+    basic_string<_CharT, _Traits, _Alloc>&
+    basic_string<_CharT, _Traits, _Alloc>::
+    replace(iterator __i1, iterator __i2, size_type __n2, _CharT __c)
+    {
+      size_type __n1 = __i2 - __i1;
+      size_type __off1 = __i1 - _M_ibegin();
+      if (max_size() - (this->size() - __n1) <= __n2)
+	__throw_length_error("basic_string::replace");
+      _M_mutate (__off1, __n1, __n2);
+      // Invalidated __i1, __i2
+      if (__n2)
+	traits_type::assign(_M_data() + __off1, __n2, __c);
+      return *this;
+    }
+  
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    copy(_CharT* __s, size_type __n, size_type __pos) const
+    {
+      if (__pos > this->size())
+	__throw_out_of_range("basic_string::copy");
+      
+      if (__n > this->size() - __pos)
+	__n = this->size() - __pos;
+      
+      traits_type::copy(__s, _M_data() + __pos, __n);
+      // 21.3.5.7 par 3: do not append null.  (good.)
+      return __n;
+    }
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      size_type __size = this->size();
+      size_t __xpos = __pos;
+      const _CharT* __data = _M_data();
+      for (; __xpos + __n <= __size; ++__xpos)
+	if (traits_type::compare(__data + __xpos, __s, __n) == 0)
+	  return __xpos;
+      return npos;
+    }
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find(_CharT __c, size_type __pos) const
+    {
+      size_type __size = this->size();
+      size_type __ret = npos;
+      if (__pos < __size)
+	{
+	  const _CharT* __data = _M_data();
+	  size_type __n = __size - __pos;
+	  const _CharT* __p = traits_type::find(__data + __pos, __n, __c);
+	  if (__p)
+	    __ret = __p - __data;
+	}
+      return __ret;
+    }
+
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    rfind(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      size_type __size = this->size();
+      if (__n <= __size)
+	{
+	  __pos = std::min(__size - __n, __pos);
+	  const _CharT* __data = _M_data();
+	  do 
+	    {
+	      if (traits_type::compare(__data + __pos, __s, __n) == 0)
+		return __pos;
+	    } 
+	  while (__pos-- > 0);
+	}
+      return npos;
+    }
+  
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    rfind(_CharT __c, size_type __pos) const
+    {
+      size_type __size = this->size();
+      if (__size)
+	{
+	  size_t __xpos = __size - 1;
+	  if (__xpos > __pos)
+	    __xpos = __pos;
+      
+	  for (++__xpos; __xpos-- > 0; )
+	    if (traits_type::eq(_M_data()[__xpos], __c))
+	      return __xpos;
+	}
+      return npos;
+    }
+  
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_first_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      for (; __n && __pos < this->size(); ++__pos)
+	{
+	  const _CharT* __p = traits_type::find(__s, __n, _M_data()[__pos]);
+	  if (__p)
+	    return __pos;
+	}
+      return npos;
+    }
+ 
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_last_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      size_type __size = this->size();
+      if (__size && __n)
+	{ 
+	  if (--__size > __pos) 
+	    __size = __pos;
+	  do
+	    {
+	      if (traits_type::find(__s, __n, _M_data()[__size]))
+		return __size;
+	    } 
+	  while (__size-- != 0);
+	}
+      return npos;
+    }
+  
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_first_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      size_t __xpos = __pos;
+      for (; __xpos < this->size(); ++__xpos)
+	if (!traits_type::find(__s, __n, _M_data()[__xpos]))
+	  return __xpos;
+      return npos;
+    }
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_first_not_of(_CharT __c, size_type __pos) const
+    {
+      size_t __xpos = __pos;
+      for (; __xpos < this->size(); ++__xpos)
+	if (!traits_type::eq(_M_data()[__xpos], __c))
+	  return __xpos;
+      return npos;
+    }
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_last_not_of(const _CharT* __s, size_type __pos, size_type __n) const
+    {
+      size_type __size = this->size();
+      if (__size)
+	{ 
+	  if (--__size > __pos) 
+	    __size = __pos;
+	  do
+	    {
+	      if (!traits_type::find(__s, __n, _M_data()[__size]))
+		return __size;
+	    } 
+	  while (__size--);
+	}
+      return npos;
+    }
+
+  template
+    typename basic_string<_CharT, _Traits, _Alloc>::size_type
+    basic_string<_CharT, _Traits, _Alloc>::
+    find_last_not_of(_CharT __c, size_type __pos) const
+    {
+      size_type __size = this->size();
+      if (__size)
+	{ 
+	  if (--__size > __pos) 
+	    __size = __pos;
+	  do
+	    {
+	      if (!traits_type::eq(_M_data()[__size], __c))
+		return __size;
+	    } 
+	  while (__size--);
+	}
+      return npos;
+    }
+  
+  template
+    int
+    basic_string<_CharT, _Traits, _Alloc>::
+    compare(size_type __pos, size_type __n, const basic_string& __str) const
+    {
+      size_type __size = this->size();
+      size_type __osize = __str.size();
+      if (__pos > __size)
+	__throw_out_of_range("basic_string::compare");
+      
+      size_type __rsize= min(__size - __pos, __n);
+      size_type __len = min(__rsize, __osize);
+      int __r = traits_type::compare(_M_data() + __pos, __str.data(), __len);
+      if (!__r)
+	__r = __rsize - __osize;
+      return __r;
+    }
+
+  template
+    int
+    basic_string<_CharT, _Traits, _Alloc>::
+    compare(size_type __pos1, size_type __n1, const basic_string& __str,
+	    size_type __pos2, size_type __n2) const
+    {
+      size_type __size = this->size();
+      size_type __osize = __str.size();
+      if (__pos1 > __size || __pos2 > __osize)
+	__throw_out_of_range("basic_string::compare");
+      
+      size_type __rsize = min(__size - __pos1, __n1);
+      size_type __rosize = min(__osize - __pos2, __n2);
+      size_type __len = min(__rsize, __rosize);
+      int __r = traits_type::compare(_M_data() + __pos1, 
+				     __str.data() + __pos2, __len);
+      if (!__r)
+	__r = __rsize - __rosize;
+      return __r;
+    }
+
+
+  template
+    int
+    basic_string<_CharT, _Traits, _Alloc>::
+    compare(const _CharT* __s) const
+    {
+      size_type __size = this->size();
+      int __r = traits_type::compare(_M_data(), __s, __size);
+      if (!__r)
+	__r = __size - traits_type::length(__s);
+      return __r;
+    }
+
+
+  template
+    int
+    basic_string <_CharT, _Traits, _Alloc>::
+    compare(size_type __pos, size_type __n1, const _CharT* __s) const
+    {
+      size_type __size = this->size();
+      if (__pos > __size)
+	__throw_out_of_range("basic_string::compare");
+      
+      size_type __osize = traits_type::length(__s);
+      size_type __rsize = min(__size - __pos, __n1);
+      size_type __len = min(__rsize, __osize);
+      int __r = traits_type::compare(_M_data() + __pos, __s, __len);
+      if (!__r)
+	__r = __rsize - __osize;
+      return __r;
+    }
+
+  template
+    int
+    basic_string <_CharT, _Traits, _Alloc>::
+    compare(size_type __pos, size_type __n1, const _CharT* __s, 
+	    size_type __n2) const
+    {
+      size_type __size = this->size();
+      if (__pos > __size)
+	__throw_out_of_range("basic_string::compare");
+      
+      size_type __osize = min(traits_type::length(__s), __n2);
+      size_type __rsize = min(__size - __pos, __n1);
+      size_type __len = min(__rsize, __osize);
+      int __r = traits_type::compare(_M_data() + __pos, __s, __len);
+      if (!__r)
+	__r = __rsize - __osize;
+      return __r;
+    }
+
+  template 
+    void
+    _S_string_copy(const basic_string<_CharT, _Traits, _Alloc>& __str,
+		   _CharT* __buf, typename _Alloc::size_type __bufsiz)
+    {
+      typedef typename _Alloc::size_type size_type;
+      size_type __strsize = __str.size();
+      size_type __bytes = min(__strsize, __bufsiz - 1);
+      _Traits::copy(__buf, __str.data(), __bytes);
+      __buf[__bytes] = _CharT();
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB: This syntax is a GNU extension.
+  extern template class basic_string;
+  extern template 
+    basic_istream& 
+    operator>>(basic_istream&, string&);
+  extern template 
+    basic_ostream& 
+    operator<<(basic_ostream&, const string&);
+  extern template 
+    basic_istream& 
+    getline(basic_istream&, string&, char);
+  extern template 
+    basic_istream& 
+    getline(basic_istream&, string&);
+
+  extern template class basic_string;
+  extern template 
+    basic_istream& 
+    operator>>(basic_istream&, wstring&);
+  extern template 
+    basic_ostream& 
+    operator<<(basic_ostream&, const wstring&);
+  extern template 
+    basic_istream& 
+    getline(basic_istream&, wstring&, wchar_t);
+  extern template 
+    basic_istream& 
+    getline(basic_istream&, wstring&);
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/boost_concept_check.h b/contrib/libstdc++/include/bits/boost_concept_check.h
new file mode 100644
index 0000000..29ca61b
--- /dev/null
+++ b/contrib/libstdc++/include/bits/boost_concept_check.h
@@ -0,0 +1,899 @@
+//
+// (C) Copyright Jeremy Siek 2000. Permission to copy, use, modify,
+// sell and distribute this software is granted provided this
+// copyright notice appears in all copies. This software is provided
+// "as is" without express or implied warranty, and with no claim as
+// to its suitability for any purpose.
+//
+
+// GCC Note:  based on version 1.12.0 of the Boost library.
+
+/** @file boost_concept_check.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCPP_BOOST_CONCEPT_CHECK
+#define _GLIBCPP_BOOST_CONCEPT_CHECK 1
+
+#pragma GCC system_header
+#include                 // for ptrdiff_t, used next
+#include     // for traits and tags
+#include                            // for pair<>
+
+
+namespace __gnu_cxx
+{
+
+#define _IsUnused __attribute__ ((__unused__))
+
+// When the C-C code is in use, we would like this function to do as little
+// as possible at runtime, use as few resources as possible, and hopefully
+// be elided out of existence... hmmm.
+template 
+inline void __function_requires()
+{
+  void (_Concept::*__x)() _IsUnused = &_Concept::__constraints;
+}
+
+
+// ??? Should the "concept_checking*" structs begin with more than _ ?
+#define _GLIBCPP_CLASS_REQUIRES(_type_var, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var>::* _func##_type_var##_concept)(); \
+  template <_func##_type_var##_concept _Tp1> \
+  struct _concept_checking##_type_var##_concept { }; \
+  typedef _concept_checking##_type_var##_concept< \
+    &_ns::_concept <_type_var>::__constraints> \
+    _concept_checking_typedef##_type_var##_concept
+
+#define _GLIBCPP_CLASS_REQUIRES2(_type_var1, _type_var2, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var1,_type_var2>::* _func##_type_var1##_type_var2##_concept)(); \
+  template <_func##_type_var1##_type_var2##_concept _Tp1> \
+  struct _concept_checking##_type_var1##_type_var2##_concept { }; \
+  typedef _concept_checking##_type_var1##_type_var2##_concept< \
+    &_ns::_concept <_type_var1,_type_var2>::__constraints> \
+    _concept_checking_typedef##_type_var1##_type_var2##_concept
+
+#define _GLIBCPP_CLASS_REQUIRES3(_type_var1, _type_var2, _type_var3, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3>::* _func##_type_var1##_type_var2##_type_var3##_concept)(); \
+  template <_func##_type_var1##_type_var2##_type_var3##_concept _Tp1> \
+  struct _concept_checking##_type_var1##_type_var2##_type_var3##_concept { }; \
+  typedef _concept_checking##_type_var1##_type_var2##_type_var3##_concept< \
+    &_ns::_concept <_type_var1,_type_var2,_type_var3>::__constraints>  \
+  _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_concept
+
+#define _GLIBCPP_CLASS_REQUIRES4(_type_var1, _type_var2, _type_var3, _type_var4, _ns, _concept) \
+  typedef void (_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::* _func##_type_var1##_type_var2##_type_var3##_type_var4##_concept)(); \
+  template <_func##_type_var1##_type_var2##_type_var3##_type_var4##_concept _Tp1> \
+  struct _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept { }; \
+  typedef _concept_checking##_type_var1##_type_var2##_type_var3##_type_var4##_concept< \
+  &_ns::_concept <_type_var1,_type_var2,_type_var3,_type_var4>::__constraints> \
+    _concept_checking_typedef##_type_var1##_type_var2##_type_var3##_type_var4##_concept
+
+
+template 
+struct _Aux_require_same { };
+
+template 
+struct _Aux_require_same<_Tp,_Tp> { typedef _Tp _Type; };
+
+  template 
+  struct _SameTypeConcept
+  {
+    void __constraints() {
+      typedef typename _Aux_require_same<_Tp1, _Tp2>::_Type _Required;
+    }
+  };
+
+  template 
+  struct _IntegerConcept {
+    void __constraints() { 
+      __error_type_must_be_an_integer_type();
+    }
+  };
+  template <> struct _IntegerConcept { void __constraints() {} };
+  template <> struct _IntegerConcept { void __constraints(){} };
+  template <> struct _IntegerConcept { void __constraints() {} };
+  template <> struct _IntegerConcept { void __constraints() {} };
+  template <> struct _IntegerConcept { void __constraints() {} };
+  template <> struct _IntegerConcept { void __constraints() {} };
+  template <> struct _IntegerConcept { void __constraints() {} };
+  template <> struct _IntegerConcept
+                                                { void __constraints() {} };
+
+  template 
+  struct _SignedIntegerConcept {
+    void __constraints() { 
+      __error_type_must_be_a_signed_integer_type();
+    }
+  };
+  template <> struct _SignedIntegerConcept { void __constraints() {} };
+  template <> struct _SignedIntegerConcept { void __constraints() {} };
+  template <> struct _SignedIntegerConcept { void __constraints() {} };
+  template <> struct _SignedIntegerConcept { void __constraints(){}};
+
+  template 
+  struct _UnsignedIntegerConcept {
+    void __constraints() { 
+      __error_type_must_be_an_unsigned_integer_type();
+    }
+  };
+  template <> struct _UnsignedIntegerConcept
+    { void __constraints() {} };
+  template <> struct _UnsignedIntegerConcept
+    { void __constraints() {} };
+  template <> struct _UnsignedIntegerConcept
+    { void __constraints() {} };
+  template <> struct _UnsignedIntegerConcept
+    { void __constraints() {} };
+
+  //===========================================================================
+  // Basic Concepts
+
+  template 
+  struct _DefaultConstructibleConcept
+  {
+    void __constraints() {
+      _Tp __a _IsUnused;                // require default constructor
+    }
+  };
+
+  template 
+  struct _AssignableConcept
+  {
+    void __constraints() {
+      __a = __a;                        // require assignment operator
+      __const_constraints(__a);
+    }
+    void __const_constraints(const _Tp& __b) {
+      __a = __b;                   // const required for argument to assignment
+    }
+    _Tp __a;
+  };
+
+  template 
+  struct _CopyConstructibleConcept
+  {
+    void __constraints() {
+      _Tp __a(__b);                     // require copy constructor
+      _Tp* __ptr _IsUnused = &__a;      // require address of operator
+      __const_constraints(__a);
+    }
+    void __const_constraints(const _Tp& __a) {
+      _Tp __c(__a) _IsUnused;           // require const copy constructor
+      const _Tp* __ptr _IsUnused = &__a; // require const address of operator
+    }
+    _Tp __b;
+  };
+
+  // The SGI STL version of Assignable requires copy constructor and operator=
+  template 
+  struct _SGIAssignableConcept
+  {
+    void __constraints() {
+      _Tp __b(__a) _IsUnused;
+      __a = __a;                        // require assignment operator
+      __const_constraints(__a);
+    }
+    void __const_constraints(const _Tp& __b) {
+      _Tp __c(__b) _IsUnused;
+      __a = __b;              // const required for argument to assignment
+    }
+    _Tp __a;
+  };
+
+  template 
+  struct _ConvertibleConcept
+  {
+    void __constraints() {
+      _To __y _IsUnused = __x;
+    }
+    _From __x;
+  };
+
+  // The C++ standard requirements for many concepts talk about return
+  // types that must be "convertible to bool".  The problem with this
+  // requirement is that it leaves the door open for evil proxies that
+  // define things like operator|| with strange return types.  Two
+  // possible solutions are:
+  // 1) require the return type to be exactly bool
+  // 2) stay with convertible to bool, and also
+  //    specify stuff about all the logical operators.
+  // For now we just test for convertible to bool.
+  template 
+  void __aux_require_boolean_expr(const _Tp& __t) {
+    bool __x _IsUnused = __t;
+  }
+
+// FIXME
+  template 
+  struct _EqualityComparableConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__a == __b);
+      __aux_require_boolean_expr(__a != __b);
+    }
+    _Tp __a, __b;
+  };
+
+  template 
+  struct _LessThanComparableConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__a < __b);
+    }
+    _Tp __a, __b;
+  };
+
+  // This is equivalent to SGI STL's LessThanComparable.
+  template 
+  struct _ComparableConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__a < __b);
+      __aux_require_boolean_expr(__a > __b);
+      __aux_require_boolean_expr(__a <= __b);
+      __aux_require_boolean_expr(__a >= __b);
+    }
+    _Tp __a, __b;
+  };
+
+#define _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(_OP,_NAME) \
+  template  \
+  struct _NAME { \
+    void __constraints() { (void)__constraints_(); } \
+    bool __constraints_() {  \
+      return  __a _OP __b; \
+    } \
+    _First __a; \
+    _Second __b; \
+  }
+
+#define _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(_OP,_NAME) \
+  template  \
+  struct _NAME { \
+    void __constraints() { (void)__constraints_(); } \
+    _Ret __constraints_() {  \
+      return __a _OP __b; \
+    } \
+    _First __a; \
+    _Second __b; \
+  }
+
+  _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(==, _EqualOpConcept);
+  _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(!=, _NotEqualOpConcept);
+  _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<, _LessThanOpConcept);
+  _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(<=, _LessEqualOpConcept);
+  _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>, _GreaterThanOpConcept);
+  _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT(>=, _GreaterEqualOpConcept);
+
+  _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(+, _PlusOpConcept);
+  _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(*, _TimesOpConcept);
+  _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(/, _DivideOpConcept);
+  _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(-, _SubtractOpConcept);
+  _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT(%, _ModOpConcept);
+
+#undef _GLIBCPP_DEFINE_BINARY_PREDICATE_OP_CONSTRAINT
+#undef _GLIBCPP_DEFINE_BINARY_OPERATOR_CONSTRAINT
+
+  //===========================================================================
+  // Function Object Concepts
+
+  template 
+  struct _GeneratorConcept
+  {
+    void __constraints() {
+      const _Return& __r _IsUnused = __f();// require operator() member function
+    }
+    _Func __f;
+  };
+
+
+  template 
+  struct _GeneratorConcept<_Func,void>
+  {
+    void __constraints() {
+      __f();                            // require operator() member function
+    }
+    _Func __f;
+  };
+
+  template 
+  struct _UnaryFunctionConcept
+  {
+    void __constraints() {
+      __r = __f(__arg);                  // require operator()
+    }
+    _Func __f;
+    _Arg __arg;
+    _Return __r;
+  };
+
+  template 
+  struct _UnaryFunctionConcept<_Func, void, _Arg> {
+    void __constraints() { 
+      __f(__arg);                       // require operator()
+    }
+    _Func __f;
+    _Arg __arg;
+  };
+
+  template 
+  struct _BinaryFunctionConcept
+  {
+    void __constraints() { 
+      __r = __f(__first, __second);     // require operator()
+    }
+    _Func __f;
+    _First __first;
+    _Second __second;
+    _Return __r;
+  };
+
+  template 
+  struct _BinaryFunctionConcept<_Func, void, _First, _Second>
+  {
+    void __constraints() {
+      __f(__first, __second);           // require operator()
+    }
+    _Func __f;
+    _First __first;
+    _Second __second;
+  };
+
+  template 
+  struct _UnaryPredicateConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__f(__arg)); // require op() returning bool
+    }
+    _Func __f;
+    _Arg __arg;
+  };
+
+  template 
+  struct _BinaryPredicateConcept
+  {
+    void __constraints() {
+      __aux_require_boolean_expr(__f(__a, __b)); // require op() returning bool
+    }
+    _Func __f;
+    _First __a;
+    _Second __b;
+  };
+
+  // use this when functor is used inside a container class like std::set
+  template 
+  struct _Const_BinaryPredicateConcept {
+    void __constraints() { 
+      __const_constraints(__f);
+    }
+    void __const_constraints(const _Func& __fun) {
+      __function_requires<_BinaryPredicateConcept<_Func, _First, _Second> >();
+      // operator() must be a const member function
+      __aux_require_boolean_expr(__fun(__a, __b));
+    }
+    _Func __f;
+    _First __a;
+    _Second __b;
+  };
+
+  //===========================================================================
+  // Iterator Concepts
+
+  template 
+  struct _TrivialIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _DefaultConstructibleConcept<_Tp> >();
+      __function_requires< _AssignableConcept<_Tp> >();
+      __function_requires< _EqualityComparableConcept<_Tp> >();
+//      typedef typename std::iterator_traits<_Tp>::value_type _V;
+      (void)*__i;                       // require dereference operator
+    }
+    _Tp __i;
+  };
+
+  template 
+  struct _Mutable_TrivialIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _TrivialIteratorConcept<_Tp> >();
+      *__i = *__j;                      // require dereference and assignment
+    }
+    _Tp __i, __j;
+  };
+
+  template 
+  struct _InputIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _TrivialIteratorConcept<_Tp> >();
+      // require iterator_traits typedef's
+      typedef typename std::iterator_traits<_Tp>::difference_type _D;
+//      __function_requires< _SignedIntegerConcept<_D> >();
+      typedef typename std::iterator_traits<_Tp>::reference _R;
+      typedef typename std::iterator_traits<_Tp>::pointer _Pt;
+      typedef typename std::iterator_traits<_Tp>::iterator_category _Cat;
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::input_iterator_tag> >();
+      ++__i;                            // require preincrement operator
+      __i++;                            // require postincrement operator
+    }
+    _Tp __i;
+  };
+
+  template 
+  struct _OutputIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _AssignableConcept<_Tp> >();
+      ++__i;                            // require preincrement operator
+      __i++;                            // require postincrement operator
+      *__i++ = __t;                     // require postincrement and assignment
+    }
+    _Tp __i;
+    _ValueT __t;
+  };
+
+  template 
+  struct _ForwardIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _InputIteratorConcept<_Tp> >();
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::forward_iterator_tag> >();
+      typedef typename std::iterator_traits<_Tp>::reference _R;
+      _R __r _IsUnused = *__i;
+    }
+    _Tp __i;
+  };
+
+  template 
+  struct _Mutable_ForwardIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardIteratorConcept<_Tp> >();
+      *__i++ = *__i;                    // require postincrement and assignment
+    }
+    _Tp __i;
+  };
+
+  template 
+  struct _BidirectionalIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardIteratorConcept<_Tp> >();
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::bidirectional_iterator_tag> >();
+      --__i;                            // require predecrement operator
+      __i--;                            // require postdecrement operator
+    }
+    _Tp __i;
+  };
+
+  template 
+  struct _Mutable_BidirectionalIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _BidirectionalIteratorConcept<_Tp> >();
+      __function_requires< _Mutable_ForwardIteratorConcept<_Tp> >();
+      *__i-- = *__i;                    // require postdecrement and assignment
+    }
+    _Tp __i;
+  };
+
+
+  template 
+  struct _RandomAccessIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _BidirectionalIteratorConcept<_Tp> >();
+      __function_requires< _ComparableConcept<_Tp> >();
+      __function_requires< _ConvertibleConcept<
+        typename std::iterator_traits<_Tp>::iterator_category,
+        std::random_access_iterator_tag> >();
+      // ??? We don't use _R, are we just checking for "referenceability"?
+      typedef typename std::iterator_traits<_Tp>::reference _R;
+
+      __i += __n;                       // require assignment addition operator
+      __i = __i + __n; __i = __n + __i; // require addition with difference type
+      __i -= __n;                       // require assignment subtraction op
+      __i = __i - __n;                  // require subtraction with
+                                        //            difference type
+      __n = __i - __j;                  // require difference operator
+      (void)__i[__n];                   // require element access operator
+    }
+    _Tp __a, __b;
+    _Tp __i, __j;
+    typename std::iterator_traits<_Tp>::difference_type __n;
+  };
+
+  template 
+  struct _Mutable_RandomAccessIteratorConcept
+  {
+    void __constraints() {
+      __function_requires< _RandomAccessIteratorConcept<_Tp> >();
+      __function_requires< _Mutable_BidirectionalIteratorConcept<_Tp> >();
+      __i[__n] = *__i;                  // require element access and assignment
+    }
+    _Tp __i;
+    typename std::iterator_traits<_Tp>::difference_type __n;
+  };
+
+  //===========================================================================
+  // Container Concepts
+
+  template 
+  struct _ContainerConcept
+  {
+    typedef typename _Container::value_type _Value_type;
+    typedef typename _Container::difference_type _Difference_type;
+    typedef typename _Container::size_type _Size_type;
+    typedef typename _Container::const_reference _Const_reference;
+    typedef typename _Container::const_pointer _Const_pointer;
+    typedef typename _Container::const_iterator _Const_iterator;
+
+    void __constraints() {
+      __function_requires< _InputIteratorConcept<_Const_iterator> >();
+      __function_requires< _AssignableConcept<_Container> >();
+      const _Container __c;
+      __i = __c.begin();
+      __i = __c.end();
+      __n = __c.size();
+      __n = __c.max_size();
+      __b = __c.empty();
+    }
+    bool __b;
+    _Const_iterator __i;
+    _Size_type __n;
+  };
+
+  template 
+  struct _Mutable_ContainerConcept
+  {
+    typedef typename _Container::value_type _Value_type;
+    typedef typename _Container::reference _Reference;
+    typedef typename _Container::iterator _Iterator;
+    typedef typename _Container::pointer _Pointer;
+    
+    void __constraints() {
+      __function_requires< _ContainerConcept<_Container> >();
+      __function_requires< _AssignableConcept<_Value_type> >();
+      __function_requires< _InputIteratorConcept<_Iterator> >();
+
+      __i = __c.begin();
+      __i = __c.end();
+      __c.swap(__c2);
+    }
+    _Iterator __i;
+    _Container __c, __c2;
+  };
+
+  template 
+  struct _ForwardContainerConcept
+  {
+    void __constraints() {
+      __function_requires< _ContainerConcept<_ForwardContainer> >();
+      typedef typename _ForwardContainer::const_iterator _Const_iterator;
+      __function_requires< _ForwardIteratorConcept<_Const_iterator> >();
+    }
+  };  
+
+  template 
+  struct _Mutable_ForwardContainerConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardContainerConcept<_ForwardContainer> >();
+      __function_requires< _Mutable_ContainerConcept<_ForwardContainer> >();
+      typedef typename _ForwardContainer::iterator _Iterator;
+      __function_requires< _Mutable_ForwardIteratorConcept<_Iterator> >();
+    }
+  };  
+
+  template 
+  struct _ReversibleContainerConcept
+  {
+    typedef typename _ReversibleContainer::const_iterator _Const_iterator;
+    typedef typename _ReversibleContainer::const_reverse_iterator
+      _Const_reverse_iterator;
+
+    void __constraints() {
+      __function_requires< _ForwardContainerConcept<_ReversibleContainer> >();
+      __function_requires< _BidirectionalIteratorConcept<_Const_iterator> >();
+      __function_requires<
+        _BidirectionalIteratorConcept<_Const_reverse_iterator> >();
+
+      const _ReversibleContainer __c;
+      _Const_reverse_iterator __i = __c.rbegin();
+      __i = __c.rend();
+    }
+  };
+
+  template 
+  struct _Mutable_ReversibleContainerConcept
+  {
+    typedef typename _ReversibleContainer::iterator _Iterator;
+    typedef typename _ReversibleContainer::reverse_iterator _Reverse_iterator;
+
+    void __constraints() {
+      __function_requires<_ReversibleContainerConcept<_ReversibleContainer> >();
+      __function_requires<
+        _Mutable_ForwardContainerConcept<_ReversibleContainer> >();
+      __function_requires<_Mutable_BidirectionalIteratorConcept<_Iterator> >();
+      __function_requires<
+        _Mutable_BidirectionalIteratorConcept<_Reverse_iterator> >();
+
+      _Reverse_iterator __i = __c.rbegin();
+      __i = __c.rend();
+    }
+    _ReversibleContainer __c;
+  };
+
+  template 
+  struct _RandomAccessContainerConcept
+  {
+    typedef typename _RandomAccessContainer::size_type _Size_type;
+    typedef typename _RandomAccessContainer::const_reference _Const_reference;
+    typedef typename _RandomAccessContainer::const_iterator _Const_iterator;
+    typedef typename _RandomAccessContainer::const_reverse_iterator
+      _Const_reverse_iterator;
+
+    void __constraints() {
+      __function_requires<
+        _ReversibleContainerConcept<_RandomAccessContainer> >();
+      __function_requires< _RandomAccessIteratorConcept<_Const_iterator> >();
+      __function_requires<
+        _RandomAccessIteratorConcept<_Const_reverse_iterator> >();
+
+      const _RandomAccessContainer __c;
+      _Const_reference __r _IsUnused = __c[__n];
+    }
+    _Size_type __n;
+  };
+
+  template 
+  struct _Mutable_RandomAccessContainerConcept
+  {
+    typedef typename _RandomAccessContainer::size_type _Size_type;
+    typedef typename _RandomAccessContainer::reference _Reference;
+    typedef typename _RandomAccessContainer::iterator _Iterator;
+    typedef typename _RandomAccessContainer::reverse_iterator _Reverse_iterator;
+
+    void __constraints() {
+      __function_requires<
+        _RandomAccessContainerConcept<_RandomAccessContainer> >();
+      __function_requires<
+        _Mutable_ReversibleContainerConcept<_RandomAccessContainer> >();
+      __function_requires< _Mutable_RandomAccessIteratorConcept<_Iterator> >();
+      __function_requires<
+        _Mutable_RandomAccessIteratorConcept<_Reverse_iterator> >();
+
+      _Reference __r _IsUnused = __c[__i];
+    }
+    _Size_type __i;
+    _RandomAccessContainer __c;
+  };
+
+  // A Sequence is inherently mutable
+  template 
+  struct _SequenceConcept
+  {
+    typedef typename _Sequence::reference _Reference;
+    typedef typename _Sequence::const_reference _Const_reference;
+
+    void __constraints() {
+      // Matt Austern's book puts DefaultConstructible here, the C++
+      // standard places it in Container
+      //    function_requires< DefaultConstructible >();
+      __function_requires< _Mutable_ForwardContainerConcept<_Sequence> >();
+      __function_requires< _DefaultConstructibleConcept<_Sequence> >();
+
+      _Sequence 
+        __c(__n) _IsUnused,
+        __c2(__n, __t) _IsUnused,
+        __c3(__first, __last) _IsUnused;
+
+      __c.insert(__p, __t);
+      __c.insert(__p, __n, __t);
+      __c.insert(__p, __first, __last);
+
+      __c.erase(__p);
+      __c.erase(__p, __q);
+
+      _Reference __r _IsUnused = __c.front();
+
+      __const_constraints(__c);
+    }
+    void __const_constraints(const _Sequence& __c) {
+      _Const_reference __r _IsUnused = __c.front();
+    }
+    typename _Sequence::value_type __t;
+    typename _Sequence::size_type __n;
+    typename _Sequence::value_type *__first, *__last;
+    typename _Sequence::iterator __p, __q;
+  };
+
+  template 
+  struct _FrontInsertionSequenceConcept
+  {
+    void __constraints() {
+      __function_requires< _SequenceConcept<_FrontInsertionSequence> >();
+
+      __c.push_front(__t);
+      __c.pop_front();
+    }
+    _FrontInsertionSequence __c;
+    typename _FrontInsertionSequence::value_type __t;
+  };
+
+  template 
+  struct _BackInsertionSequenceConcept
+  {
+    typedef typename _BackInsertionSequence::reference _Reference;
+    typedef typename _BackInsertionSequence::const_reference _Const_reference;
+
+    void __constraints() {
+      __function_requires< _SequenceConcept<_BackInsertionSequence> >();
+
+      __c.push_back(__t);
+      __c.pop_back();
+      _Reference __r _IsUnused = __c.back();
+    }
+    void __const_constraints(const _BackInsertionSequence& __c) {
+      _Const_reference __r _IsUnused = __c.back();
+    };
+    _BackInsertionSequence __c;
+    typename _BackInsertionSequence::value_type __t;
+  };
+
+  template 
+  struct _AssociativeContainerConcept
+  {
+    void __constraints() {
+      __function_requires< _ForwardContainerConcept<_AssociativeContainer> >();
+      __function_requires<
+        _DefaultConstructibleConcept<_AssociativeContainer> >();
+    
+      __i = __c.find(__k);
+      __r = __c.equal_range(__k);
+      __c.erase(__k);
+      __c.erase(__i);
+      __c.erase(__r.first, __r.second);
+      __const_constraints(__c);
+    }
+    void __const_constraints(const _AssociativeContainer& __c) {
+      __ci = __c.find(__k);
+      __n = __c.count(__k);
+      __cr = __c.equal_range(__k);
+    }
+    typedef typename _AssociativeContainer::iterator _Iterator;
+    typedef typename _AssociativeContainer::const_iterator _Const_iterator;
+
+    _AssociativeContainer __c;
+    _Iterator __i;
+    std::pair<_Iterator,_Iterator> __r;
+    _Const_iterator __ci;
+    std::pair<_Const_iterator,_Const_iterator> __cr;
+    typename _AssociativeContainer::key_type __k;
+    typename _AssociativeContainer::size_type __n;
+  };
+
+  template 
+  struct _UniqueAssociativeContainerConcept
+  {
+    void __constraints() {
+      __function_requires<
+        _AssociativeContainerConcept<_UniqueAssociativeContainer> >();
+    
+      _UniqueAssociativeContainer __c(__first, __last);
+      
+      __pos_flag = __c.insert(__t);
+      __c.insert(__first, __last);
+    }
+    std::pair __pos_flag;
+    typename _UniqueAssociativeContainer::value_type __t;
+    typename _UniqueAssociativeContainer::value_type *__first, *__last;
+  };
+
+  template 
+  struct _MultipleAssociativeContainerConcept
+  {
+    void __constraints() {
+      __function_requires<
+        _AssociativeContainerConcept<_MultipleAssociativeContainer> >();
+
+      _MultipleAssociativeContainer __c(__first, __last);
+      
+      __pos = __c.insert(__t);
+      __c.insert(__first, __last);
+
+    }
+    typename _MultipleAssociativeContainer::iterator __pos _IsUnused;
+    typename _MultipleAssociativeContainer::value_type __t;
+    typename _MultipleAssociativeContainer::value_type *__first, *__last;
+  };
+
+  template 
+  struct _SimpleAssociativeContainerConcept
+  {
+    void __constraints() {
+      __function_requires<
+        _AssociativeContainerConcept<_SimpleAssociativeContainer> >();
+      typedef typename _SimpleAssociativeContainer::key_type _Key_type;
+      typedef typename _SimpleAssociativeContainer::value_type _Value_type;
+      typedef typename _Aux_require_same<_Key_type, _Value_type>::_Type
+        _Requqired;
+    }
+  };
+
+  template 
+  struct _PairAssociativeContainerConcept
+  {
+    void __constraints() {
+      __function_requires<
+        _AssociativeContainerConcept<_SimpleAssociativeContainer> >();
+      typedef typename _SimpleAssociativeContainer::key_type _Key_type;
+      typedef typename _SimpleAssociativeContainer::value_type _Value_type;
+      typedef typename _SimpleAssociativeContainer::mapped_type _Mapped_type;
+      typedef std::pair _Required_value_type;
+      typedef typename _Aux_require_same<_Value_type,
+        _Required_value_type>::_Type _Required;
+    }
+  };
+
+  template 
+  struct _SortedAssociativeContainerConcept
+  {
+    void __constraints() {
+      __function_requires<
+        _AssociativeContainerConcept<_SortedAssociativeContainer> >();
+      __function_requires<
+        _ReversibleContainerConcept<_SortedAssociativeContainer> >();
+
+      _SortedAssociativeContainer 
+        __c(__kc) _IsUnused,
+        __c2(__first, __last) _IsUnused,
+        __c3(__first, __last, __kc) _IsUnused;
+
+      __p = __c.upper_bound(__k);
+      __p = __c.lower_bound(__k);
+      __r = __c.equal_range(__k);
+      
+      __c.insert(__p, __t);
+    }
+    void __const_constraints(const _SortedAssociativeContainer& __c) {
+      __kc = __c.key_comp();
+      __vc = __c.value_comp();
+
+      __cp = __c.upper_bound(__k);
+      __cp = __c.lower_bound(__k);
+      __cr = __c.equal_range(__k);
+    }
+    typename _SortedAssociativeContainer::key_compare __kc;
+    typename _SortedAssociativeContainer::value_compare __vc;
+    typename _SortedAssociativeContainer::value_type __t;
+    typename _SortedAssociativeContainer::key_type __k;
+    typedef typename _SortedAssociativeContainer::iterator _Iterator;
+    typedef typename _SortedAssociativeContainer::const_iterator
+      _Const_iterator;
+
+    _Iterator __p;
+    _Const_iterator __cp;
+    std::pair<_Iterator,_Iterator> __r;
+    std::pair<_Const_iterator,_Const_iterator> __cr;
+    typename _SortedAssociativeContainer::value_type *__first, *__last;
+  };
+
+  // HashedAssociativeContainer
+
+} // namespace __gnu_cxx
+
+#undef _IsUnused
+
+#endif // _GLIBCPP_BOOST_CONCEPT_CHECK
+
+
diff --git a/contrib/libstdc++/include/bits/c++config b/contrib/libstdc++/include/bits/c++config
new file mode 100644
index 0000000..d5bf458
--- /dev/null
+++ b/contrib/libstdc++/include/bits/c++config
@@ -0,0 +1,77 @@
+// Predefined symbols and macros -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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_CPPCONFIG
+#define _CPP_CPPCONFIG 1
+
+// Pick up any OS-specific definitions.
+#include 
+
+// The current version of the C++ library in compressed ISO date format.
+#define __GLIBCPP__ 20020513
+
+// This is necessary until GCC supports separate template
+// compilation.  
+#define _GLIBCPP_NO_TEMPLATE_EXPORT 1
+
+// This is a hack around not having either pre-compiled headers or
+// export compilation. If defined, the io, string, and valarray
+// headers will include all the necessary bits. If not defined, the
+// implementation optimizes the headers for the most commonly-used
+// types. For the io library, this means that larger, out-of-line
+// member functions are only declared, and definitions are not parsed
+// by the compiler, but instead instantiated into the library binary.
+#define _GLIBCPP_FULLY_COMPLIANT_HEADERS 1
+
+// To enable older, ARM-style iostreams and other anachronisms use this.
+//#define _GLIBCPP_DEPRECATED 1
+
+// Use corrected code from the committee library group's issues list.
+#define _GLIBCPP_RESOLVE_LIB_DEFECTS 1
+
+// In those parts of the standard C++ library that use a mutex instead
+// of a spin-lock, we now unconditionally use GCC's gthr.h mutex
+// abstraction layer.  All support to directly map to various
+// threading models has been removed.  Note: gthr.h may well map to
+// gthr-single.h which is a correct way to express no threads support
+// in gcc.  Support for the undocumented _NOTHREADS has been removed.
+
+// Default to the typically high-speed, pool-based allocator (as
+// libstdc++-v2) instead of the malloc-based allocator (libstdc++-v3
+// snapshots).  See libstdc++-v3/docs/html/17_intro/howto.html for
+// details on why you don't want to override this setting.  Ensure
+// that threads are properly configured on your platform before
+// assigning blame to the STL container-memory allocator.  After doing
+// so, please report any possible issues to libstdc++@gcc.gnu.org .
+// Do not blindly #define __USE_MALLOC here or on the command line.
+
+// The remainder of the prewritten config is mostly automatic; all the
+// user hooks are listed above.
+
+// End of prewritten config; the discovered settings follow.
diff --git a/contrib/libstdc++/include/bits/char_traits.h b/contrib/libstdc++/include/bits/char_traits.h
new file mode 100644
index 0000000..7d14838
--- /dev/null
+++ b/contrib/libstdc++/include/bits/char_traits.h
@@ -0,0 +1,280 @@
+// Character Traits for use by standard string and iostream -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+/** @file char_traits.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_CHAR_TRAITS_H
+#define _CPP_BITS_CHAR_TRAITS_H 1
+
+#pragma GCC system_header
+
+#include  	// For memmove, memset, memchr
+#include  		// For streampos
+
+namespace std 
+{
+  /// 21.1.2 Basis for explicit _Traits specialization 
+  /// NB: That for any given actual character type this definition is
+  /// probably wrong.
+  template
+    struct char_traits
+    {
+      typedef _CharT 		char_type;
+      // Unsigned as wint_t in unsigned.
+      typedef unsigned long  	int_type;
+      typedef streampos 	pos_type;
+      typedef streamoff 	off_type;
+      typedef mbstate_t 	state_type;
+      
+      static void 
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool 
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool 
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int 
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      { 
+	for (size_t __i = 0; __i < __n; ++__i)
+	  if (!eq(__s1[__i], __s2[__i]))
+	    return lt(__s1[__i], __s2[__i]) ? -1 : 1;
+	return 0; 
+      }
+
+      static size_t
+      length(const char_type* __s)
+      { 
+	const char_type* __p = __s; 
+	while (*__p) ++__p; 
+	return (__p - __s); 
+      }
+
+      static const char_type* 
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      { 
+	for (const char_type* __p = __s; size_t(__p - __s) < __n; ++__p)
+	  if (*__p == __a) return __p;
+	return 0;
+      }
+
+      static char_type* 
+      move(char_type* __s1, const char_type* __s2, size_t __n)
+      { return (char_type*) memmove(__s1, __s2, __n * sizeof(char_type)); }
+
+      static char_type* 
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      { return (char_type*) memcpy(__s1, __s2, __n * sizeof(char_type)); }
+
+      static char_type* 
+      assign(char_type* __s, size_t __n, char_type __a)
+      { 
+	for (char_type* __p = __s; __p < __s + __n; ++__p) 
+	  assign(*__p, __a);
+        return __s; 
+      }
+
+      static char_type 
+      to_char_type(const int_type& __c)
+      { return char_type(__c); }
+
+      static int_type 
+      to_int_type(const char_type& __c) { return int_type(__c); }
+
+      static bool 
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type 
+      eof() { return static_cast(-1); }
+
+      static int_type 
+      not_eof(const int_type& __c)
+      { return eq_int_type(__c, eof()) ? int_type(0) : __c; }
+    };
+
+
+  /// 21.1.4  char_traits specializations
+  template<>
+    struct char_traits
+    {
+      typedef char 		char_type;
+      typedef int 	        int_type;
+      typedef streampos 	pos_type;
+      typedef streamoff 	off_type;
+      typedef mbstate_t 	state_type;
+
+      static void 
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool 
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool 
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int 
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      { return memcmp(__s1, __s2, __n); }
+
+      static size_t
+      length(const char_type* __s)
+      { return strlen(__s); }
+
+      static const char_type* 
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      { return static_cast(memchr(__s, __a, __n)); }
+
+      static char_type* 
+      move(char_type* __s1, const char_type* __s2, size_t __n)
+      { return static_cast(memmove(__s1, __s2, __n)); }
+
+      static char_type* 
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      {  return static_cast(memcpy(__s1, __s2, __n)); }
+
+      static char_type* 
+      assign(char_type* __s, size_t __n, char_type __a)
+      { return static_cast(memset(__s, __a, __n)); }
+
+      static char_type 
+      to_char_type(const int_type& __c)
+      { return static_cast(__c); }
+
+      // To keep both the byte 0xff and the eof symbol 0xffffffff
+      // from ending up as 0xffffffff.
+      static int_type 
+      to_int_type(const char_type& __c)
+      { return static_cast(static_cast(__c)); }
+
+      static bool 
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type 
+      eof() { return static_cast(EOF); }
+
+      static int_type 
+      not_eof(const int_type& __c)
+      { return (__c == eof()) ? 0 : __c; }
+  };
+
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    struct char_traits
+    {
+      typedef wchar_t 		char_type;
+      typedef wint_t 		int_type;
+      typedef streamoff 	off_type;
+      typedef wstreampos 	pos_type;
+      typedef mbstate_t 	state_type;
+      
+      static void 
+      assign(char_type& __c1, const char_type& __c2)
+      { __c1 = __c2; }
+
+      static bool 
+      eq(const char_type& __c1, const char_type& __c2)
+      { return __c1 == __c2; }
+
+      static bool 
+      lt(const char_type& __c1, const char_type& __c2)
+      { return __c1 < __c2; }
+
+      static int 
+      compare(const char_type* __s1, const char_type* __s2, size_t __n)
+      { return wmemcmp(__s1, __s2, __n); }
+
+      static size_t
+      length(const char_type* __s)
+      { return wcslen(__s); }
+
+      static const char_type* 
+      find(const char_type* __s, size_t __n, const char_type& __a)
+      { return wmemchr(__s, __a, __n); }
+
+      static char_type* 
+      move(char_type* __s1, const char_type* __s2, int_type __n)
+      { return wmemmove(__s1, __s2, __n); }
+
+      static char_type* 
+      copy(char_type* __s1, const char_type* __s2, size_t __n)
+      { return wmemcpy(__s1, __s2, __n); }
+
+      static char_type* 
+      assign(char_type* __s, size_t __n, char_type __a)
+      { return wmemset(__s, __a, __n); }
+
+      static char_type 
+      to_char_type(const int_type& __c) { return char_type(__c); }
+
+      static int_type 
+      to_int_type(const char_type& __c) { return int_type(__c); }
+
+      static bool 
+      eq_int_type(const int_type& __c1, const int_type& __c2)
+      { return __c1 == __c2; }
+
+      static int_type 
+      eof() { return static_cast(WEOF); }
+
+      static int_type 
+      not_eof(const int_type& __c)
+      { return eq_int_type(__c, eof()) ? 0 : __c; }
+  };
+#endif //_GLIBCPP_USE_WCHAR_T
+
+  template
+    struct _Char_traits_match
+    {
+      _CharT _M_c;
+      _Char_traits_match(_CharT const& __c) : _M_c(__c) { }
+
+      bool 
+      operator()(_CharT const& __a) { return _Traits::eq(_M_c, __a); }
+    };
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/codecvt.h b/contrib/libstdc++/include/bits/codecvt.h
new file mode 100644
index 0000000..506752f
--- /dev/null
+++ b/contrib/libstdc++/include/bits/codecvt.h
@@ -0,0 +1,336 @@
+// Locale support (codecvt) -*- C++ -*-
+
+// Copyright (C) 2000, 2001 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.2.1.5 Template class codecvt
+//
+
+// Written by Benjamin Kosnik 
+
+/** @file codecvt.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_CODECVT_H
+#define _CPP_BITS_CODECVT_H	1
+
+#pragma GCC system_header
+
+  //  22.2.1.5  Template class codecvt
+  class codecvt_base
+  {
+  public:
+    enum result
+    {
+      ok,
+      partial,
+      error,
+      noconv
+    };
+  };
+
+  // Template class __codecvt_abstract_base
+  // NB: An abstract base class that fills in the public inlines, so
+  // that the specializations don't have to re-copy the public
+  // interface.
+  template
+    class __codecvt_abstract_base 
+    : public locale::facet, public codecvt_base
+    {
+    public:
+      // Types:
+      typedef codecvt_base::result			result;
+      typedef _InternT 					intern_type;
+      typedef _ExternT 					extern_type;
+      typedef _StateT  					state_type;
+      
+      // 22.2.1.5.1 codecvt members
+      result
+      out(state_type& __state, const intern_type* __from, 
+	  const intern_type* __from_end, const intern_type*& __from_next,
+	  extern_type* __to, extern_type* __to_end, 
+	  extern_type*& __to_next) const
+      { 
+	return this->do_out(__state, __from, __from_end, __from_next, 
+			    __to, __to_end, __to_next); 
+      }
+
+      result
+      unshift(state_type& __state, extern_type* __to, extern_type* __to_end,
+	      extern_type*& __to_next) const
+      { return this->do_unshift(__state, __to,__to_end,__to_next); }
+
+      result
+      in(state_type& __state, const extern_type* __from, 
+	 const extern_type* __from_end, const extern_type*& __from_next,
+	 intern_type* __to, intern_type* __to_end, 
+	 intern_type*& __to_next) const
+      { 
+	return this->do_in(__state, __from, __from_end, __from_next,
+			   __to, __to_end, __to_next); 
+      }
+
+      int 
+      encoding() const throw()
+      { return this->do_encoding(); }
+
+      bool 
+      always_noconv() const throw()
+      { return this->do_always_noconv(); }
+
+      int
+      length(const state_type& __state, const extern_type* __from,
+	     const extern_type* __end, size_t __max) const
+      { return this->do_length(__state, __from, __end, __max); }
+
+      int 
+      max_length() const throw()
+      { return this->do_max_length(); }
+
+    protected:
+      explicit 
+      __codecvt_abstract_base(size_t __refs = 0) : locale::facet(__refs) { }
+
+      virtual 
+      ~__codecvt_abstract_base() { }
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from, 
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const = 0;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to, 
+		 extern_type* __to_end, extern_type*& __to_next) const = 0;
+      
+      virtual result
+      do_in(state_type& __state, const extern_type* __from, 
+	    const extern_type* __from_end, const extern_type*& __from_next, 
+	    intern_type* __to, intern_type* __to_end, 
+	    intern_type*& __to_next) const = 0;
+      
+      virtual int 
+      do_encoding() const throw() = 0;
+
+      virtual bool 
+      do_always_noconv() const throw() = 0;
+
+      virtual int 
+      do_length(const state_type&, const extern_type* __from, 
+		const extern_type* __end, size_t __max) const = 0;
+
+      virtual int 
+      do_max_length() const throw() = 0;
+    };
+
+  // 22.2.1.5 Template class codecvt
+  // NB: Generic, mostly useless implementation.
+  template
+    class codecvt 
+    : public __codecvt_abstract_base<_InternT, _ExternT, _StateT>
+    {
+    public:      
+      // Types:
+      typedef codecvt_base::result			result;
+      typedef _InternT intern_type;
+      typedef _ExternT extern_type;
+      typedef _StateT  state_type;
+
+      // Data Members:
+      static locale::id id;
+
+      explicit 
+      codecvt(size_t __refs = 0) 
+      : __codecvt_abstract_base<_InternT,_ExternT,_StateT> (__refs) { }
+
+    protected:
+      virtual 
+      ~codecvt() { }
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from, 
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to, 
+		 extern_type* __to_end, extern_type*& __to_next) const;
+      
+      virtual result
+      do_in(state_type& __state, const extern_type* __from, 
+	    const extern_type* __from_end, const extern_type*& __from_next, 
+	    intern_type* __to, intern_type* __to_end, 
+	    intern_type*& __to_next) const;
+      
+      virtual int 
+      do_encoding() const throw();
+
+      virtual bool 
+      do_always_noconv() const throw();
+
+      virtual int 
+      do_length(const state_type&, const extern_type* __from, 
+		const extern_type* __end, size_t __max) const;
+
+      virtual int 
+      do_max_length() const throw();
+    };
+
+  template
+    locale::id codecvt<_InternT, _ExternT, _StateT>::id;
+
+  // codecvt required specialization
+  template<>
+    class codecvt 
+    : public __codecvt_abstract_base
+    {
+    public:      
+      // Types:
+      typedef char 	intern_type;
+      typedef char 	extern_type;
+      typedef mbstate_t state_type;
+
+      // Data Members:
+      static locale::id id;
+
+      explicit 
+      codecvt(size_t __refs = 0);
+
+    protected:
+      virtual 
+      ~codecvt();
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from, 
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state, extern_type* __to, 
+		 extern_type* __to_end, extern_type*& __to_next) const;
+
+      virtual result
+      do_in(state_type& __state, const extern_type* __from, 
+	    const extern_type* __from_end, const extern_type*& __from_next,
+	    intern_type* __to, intern_type* __to_end, 
+	    intern_type*& __to_next) const;
+
+      virtual int 
+      do_encoding() const throw();
+
+      virtual bool 
+      do_always_noconv() const throw();
+
+      virtual int 
+      do_length(const state_type&, const extern_type* __from, 
+		const extern_type* __end, size_t __max) const;
+
+      virtual int 
+      do_max_length() const throw();
+  };
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  // codecvt required specialization
+  template<>
+    class codecvt 
+    : public __codecvt_abstract_base
+    {
+    public:
+      // Types:
+      typedef wchar_t 	intern_type;
+      typedef char 	extern_type;
+      typedef mbstate_t state_type;
+
+      // Data Members:
+      static locale::id id;
+
+      explicit 
+      codecvt(size_t __refs = 0);
+
+    protected:
+      virtual 
+      ~codecvt();
+
+      virtual result
+      do_out(state_type& __state, const intern_type* __from, 
+	     const intern_type* __from_end, const intern_type*& __from_next,
+	     extern_type* __to, extern_type* __to_end,
+	     extern_type*& __to_next) const;
+
+      virtual result
+      do_unshift(state_type& __state,
+		 extern_type* __to, extern_type* __to_end,
+		 extern_type*& __to_next) const;
+
+      virtual result
+      do_in(state_type& __state,
+	     const extern_type* __from, const extern_type* __from_end,
+	     const extern_type*& __from_next,
+	     intern_type* __to, intern_type* __to_end,
+	     intern_type*& __to_next) const;
+
+      virtual 
+      int do_encoding() const throw();
+
+      virtual 
+      bool do_always_noconv() const throw();
+
+      virtual 
+      int do_length(const state_type&, const extern_type* __from,
+		    const extern_type* __end, size_t __max) const;
+
+      virtual int 
+      do_max_length() const throw();
+    };
+#endif //_GLIBCPP_USE_WCHAR_T
+
+  // 22.2.1.6  Template class codecvt_byname
+  template
+    class codecvt_byname : public codecvt<_InternT, _ExternT, _StateT>
+    {
+    public:
+      explicit 
+      codecvt_byname(const char*, size_t __refs = 0) 
+      : codecvt<_InternT, _ExternT, _StateT>(__refs) { }
+    protected:
+      virtual 
+      ~codecvt_byname() { }
+    };
+
+  // Include host and configuration specific partial specializations
+  // with additional functionality, if possible.
+#ifdef _GLIBCPP_USE_WCHAR_T
+  #include 
+#endif
+
+#endif // _CPP_BITS_CODECVT_H
diff --git a/contrib/libstdc++/include/bits/concept_check.h b/contrib/libstdc++/include/bits/concept_check.h
new file mode 100644
index 0000000..92ceefb
--- /dev/null
+++ b/contrib/libstdc++/include/bits/concept_check.h
@@ -0,0 +1,86 @@
+// Concept-checking control -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/** @file concept_check.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _GLIBCPP_CONCEPT_CHECK
+#define _GLIBCPP_CONCEPT_CHECK 1
+
+#pragma GCC system_header
+
+#include 
+
+// All places in libstdc++-v3 where these are used, or /might/ be used, or
+// don't need to be used, or perhaps /should/ be used, are commented with
+// "concept requirements" (and maybe some more text).  So grep like crazy
+// if you're looking for additional places to use these.
+
+// Concept-checking code is off by default unless users turn it on via
+// configure options or editing c++config.h.
+
+#ifndef _GLIBCPP_CONCEPT_CHECKS
+
+#define __glibcpp_function_requires(...)
+#define __glibcpp_class_requires(_a,_b)
+#define __glibcpp_class_requires2(_a,_b,_c)
+#define __glibcpp_class_requires3(_a,_b,_c,_d)
+#define __glibcpp_class_requires4(_a,_b,_c,_d,_e)
+
+#else // the checks are on
+
+#include 
+
+// Note that the obvious and elegant approach of
+//
+//#define glibcpp_function_requires(C)      \
+//            boost::function_requires< boost::C >()
+//
+// won't work due to concept templates with more than one parameter, e.g.,
+// BinaryPredicateConcept.  The preprocessor tries to split things up on
+// the commas in the template argument list.  We can't use an inner pair of
+// parenthesis to hide the commas, because "boost::(Temp)" isn't
+// a valid instantiation pattern.  Thus, we steal a feature from C99.
+
+#define __glibcpp_function_requires(...)                                 \
+            __gnu_cxx::__function_requires< __gnu_cxx::__VA_ARGS__ >();
+#define __glibcpp_class_requires(_a,_C)                                  \
+            _GLIBCPP_CLASS_REQUIRES(_a, __gnu_cxx, _C);
+#define __glibcpp_class_requires2(_a,_b,_C)                              \
+            _GLIBCPP_CLASS_REQUIRES2(_a, _b, __gnu_cxx, _C);
+#define __glibcpp_class_requires3(_a,_b,_c,_C)                           \
+            _GLIBCPP_CLASS_REQUIRES3(_a, _b, _c, __gnu_cxx, _C);
+#define __glibcpp_class_requires4(_a,_b,_c,_d,_C)                        \
+            _GLIBCPP_CLASS_REQUIRES4(_a, _b, _c, _d, __gnu_cxx, _C);
+
+#endif // enable/disable
+
+#endif // _GLIBCPP_CONCEPT_CHECK
diff --git a/contrib/libstdc++/include/bits/cpp_type_traits.h b/contrib/libstdc++/include/bits/cpp_type_traits.h
new file mode 100644
index 0000000..d66fe76
--- /dev/null
+++ b/contrib/libstdc++/include/bits/cpp_type_traits.h
@@ -0,0 +1,300 @@
+// The  -*- C++ -*- type traits classes for internal use in libstdc++
+
+// Copyright (C) 2000, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file cpp_type_traits.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_CPP_TYPE_TRAITS_H
+#define _CPP_BITS_CPP_TYPE_TRAITS_H 1
+
+#pragma GCC system_header
+
+//
+// This file provides some compile-time information about various types.
+// These representations were designed, on purpose, to be constant-expressions
+// and not types as found in .  In particular, they
+// can be used in control structures and the optimizer hopefully will do
+// the obvious thing.
+//
+// Why integral expressions, and not functions nor types?
+// Firstly, these compile-time entities are used as template-arguments
+// so function return values won't work:  We need compile-time entities.
+// We're left with types and constant  integral expressions.
+// Secondly, from the point of view of ease of use, type-based compile-time
+// information is -not- *that* convenient.  On has to write lots of
+// overloaded functions and to hope that the compiler will select the right
+// one. As a net effect, the overall structure isn't very clear at first
+// glance.
+// Thirdly, partial ordering and overload resolution (of function templates)
+// is highly costly in terms of compiler-resource.  It is a Good Thing to
+// keep these resource consumption as least as possible.
+//
+// See valarray_array.h for a case use.
+//
+// -- Gaby (dosreis@cmla.ens-cachan.fr) 2000-03-06.
+//
+
+namespace std
+{
+  template
+    struct __is_void
+    {
+      enum
+      {
+        _M_type = 0
+      };
+    };
+
+  template<>
+    struct __is_void
+    {
+      enum
+      {
+        _M_type = 1
+      };
+    };
+
+  //
+  // Integer types
+  //
+  template
+    struct __is_integer
+    {
+      enum
+      {
+	_M_type = 0
+      };
+    };
+
+  // Thirteen specializations (yes there are eleven standard integer
+  // types; 'long long' and 'unsigned long long' are supported as
+  // extensions)
+  template<>
+    struct __is_integer
+    {
+      enum
+      {
+	_M_type = 1
+      };
+    };
+  
+  template<>
+    struct __is_integer
+    {
+      enum
+      {
+	_M_type = 1
+      };
+    };
+
+  template<>
+    struct __is_integer
+    {
+      enum
+      {
+	_M_type = 1
+      };
+    };
+  
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+# ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+# endif
+  
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_integer
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  //
+  // Floating point types
+  //
+  template
+  struct __is_floating
+  {
+    enum
+    {
+      _M_type = 0
+    };
+  };
+
+  // three specializations (float, double and 'long double')
+  template<>
+  struct __is_floating
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_floating
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  template<>
+  struct __is_floating
+  {
+    enum
+    {
+      _M_type = 1
+    };
+  };
+
+  //
+  // An arithmetic type is an integer type or a floating point type
+  //
+  template
+  struct __is_arithmetic
+  {
+    enum
+    {
+      _M_type = __is_integer<_Tp>::_M_type || __is_floating<_Tp>::_M_type
+    };
+  };
+
+  //
+  // A fundamental type is `void' or and arithmetic type
+  //
+  template
+  struct __is_fundamental
+  {
+    enum
+    {
+      _M_type = __is_void<_Tp>::_M_type || __is_arithmetic<_Tp>::_M_type
+    };
+  };
+
+  //
+  // For the immediate use, the following is a good approximation
+  //
+  template
+  struct __is_pod
+  {
+    enum
+    {
+      _M_type = __is_fundamental<_Tp>::_M_type
+    };
+  };
+
+} // namespace std
+
+
+#endif //_CPP_BITS_CPP_TYPE_TRAITS_H
diff --git a/contrib/libstdc++/include/bits/fpos.h b/contrib/libstdc++/include/bits/fpos.h
new file mode 100644
index 0000000..3cb3e4b
--- /dev/null
+++ b/contrib/libstdc++/include/bits/fpos.h
@@ -0,0 +1,123 @@
+// File position object and stream types
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27 Input/output library
+//
+
+/** @file fpos.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_FPOS_H
+#define _CPP_BITS_FPOS_H 1
+
+#pragma GCC system_header
+
+#include 
+#include  	// For mbstate_t.
+
+namespace std
+{
+  // 27.4.1  Types
+
+  // 27.4.3  Template class fpos
+  template
+    class fpos
+    {
+    public:
+      // Types:
+      typedef _StateT __state_type;
+
+    private:
+      streamoff 	_M_off;
+      __state_type 	_M_st;
+
+    public:
+      __state_type
+      state() const  { return _M_st; }
+
+      void 
+      state(__state_type __st)  { _M_st = __st; }
+
+      // NB: The standard defines only the implicit copy ctor and the
+      // previous two members.  The rest is a "conforming extension".
+      fpos(): _M_off(streamoff()), _M_st(__state_type()) { }
+
+      fpos(streamoff __off, __state_type __st = __state_type())
+      :  _M_off(__off), _M_st(__st) { }
+
+      operator streamoff() const { return _M_off; }
+
+      fpos& 
+      operator+=(streamoff __off) { _M_off += __off; return *this; }
+
+      fpos& 
+      operator-=(streamoff __off) { _M_off -= __off; return *this; }
+
+      fpos 
+      operator+(streamoff __off) 
+      { 
+	fpos __t(*this); 
+	__t += __off;
+	return __t;
+      }
+
+      fpos      
+      operator-(streamoff __off) 
+      { 
+	fpos __t(*this); 
+	__t -= __off; 
+	return __t;
+      }
+
+      bool  
+      operator==(const fpos& __pos) const
+      { return _M_off == __pos._M_off; }
+
+      bool  
+      operator!=(const fpos& __pos) const
+      { return _M_off != __pos._M_off; }
+      
+      streamoff 
+      _M_position() const { return _M_off; }
+
+      void
+      _M_position(streamoff __off)  { _M_off = __off; }
+    };
+
+  // 27.2, paragraph 10 about fpos/char_traits circularity
+  typedef fpos 		streampos;
+#  ifdef _GLIBCPP_USE_WCHAR_T
+  typedef fpos 		wstreampos;
+#  endif
+}  // namespace std
+
+#endif 
diff --git a/contrib/libstdc++/include/bits/fstream.tcc b/contrib/libstdc++/include/bits/fstream.tcc
new file mode 100644
index 0000000..90850f5
--- /dev/null
+++ b/contrib/libstdc++/include/bits/fstream.tcc
@@ -0,0 +1,589 @@
+// File based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+#ifndef _CPP_BITS_FSTREAM_TCC
+#define _CPP_BITS_FSTREAM_TCC 1
+
+#pragma GCC system_header
+
+namespace std
+{
+  template
+    void
+    basic_filebuf<_CharT, _Traits>::
+    _M_allocate_internal_buffer()
+    {
+      if (!_M_buf && _M_buf_size_opt)
+	{
+	  _M_buf_size = _M_buf_size_opt;
+
+	  // Allocate internal buffer.
+	  try { _M_buf = new char_type[_M_buf_size]; }
+	  catch(...) 
+	    {
+	      delete [] _M_buf;
+	      __throw_exception_again;
+	    }
+	  _M_buf_allocated = true;
+	}
+    }
+
+  // Both close and setbuf need to deallocate internal buffers, if it exists.
+  template
+    void
+    basic_filebuf<_CharT, _Traits>::
+    _M_destroy_internal_buffer()
+    {
+      if (_M_buf_allocated)
+	{
+	  delete [] _M_buf;
+	  _M_buf = NULL;
+	  _M_buf_allocated = false;
+	  this->setg(NULL, NULL, NULL);
+	  this->setp(NULL, NULL);
+	}
+    }
+
+  template
+    basic_filebuf<_CharT, _Traits>::
+    basic_filebuf() : __streambuf_type(), _M_file(&_M_lock), 
+    _M_state_cur(__state_type()), _M_state_beg(__state_type()), 
+    _M_buf_allocated(false), _M_last_overflowed(false)
+    { _M_buf_unified = true; }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::__filebuf_type* 
+    basic_filebuf<_CharT, _Traits>::
+    open(const char* __s, ios_base::openmode __mode)
+    {
+      __filebuf_type *__ret = NULL;
+      if (!this->is_open())
+	{
+	  _M_file.open(__s, __mode);
+	  if (this->is_open())
+	    {
+	      _M_allocate_internal_buffer();
+	      _M_mode = __mode;
+	      
+	      // For time being, set both (in/out) sets  of pointers.
+	      _M_set_indeterminate();
+	      if ((__mode & ios_base::ate)
+		  && this->seekoff(0, ios_base::end, __mode) < 0)
+		this->close();
+	      __ret = this;
+	    }
+	}
+      return __ret;
+    }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::__filebuf_type* 
+    basic_filebuf<_CharT, _Traits>::
+    close()
+    {
+      __filebuf_type *__ret = NULL;
+      if (this->is_open())
+	{
+	  const int_type __eof = traits_type::eof();
+	  bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
+	  if (__testput && _M_really_overflow(__eof) == __eof)
+	    return __ret;
+
+	  // NB: Do this here so that re-opened filebufs will be cool...
+	  _M_mode = ios_base::openmode(0);
+	  _M_destroy_internal_buffer();
+	  _M_pback_destroy();
+	  
+#if 0
+	  // XXX not done
+	  if (_M_last_overflowed)
+	    {
+	      _M_output_unshift();
+	      _M_really_overflow(__eof);
+	    }
+#endif
+
+	  if (_M_file.close())
+	    __ret = this;
+	}
+
+      _M_last_overflowed = false;	
+      return __ret;
+    }
+
+  template
+    streamsize 
+    basic_filebuf<_CharT, _Traits>::
+    showmanyc()
+    {
+      streamsize __ret = -1;
+      bool __testin = _M_mode & ios_base::in;
+
+      if (__testin && this->is_open())
+	{
+	  if (_M_in_cur < _M_in_end)
+	    __ret = _M_in_end - _M_in_cur;
+	  else
+	    __ret = 0;
+	}
+      _M_last_overflowed = false;	
+      return __ret;
+    }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::int_type 
+    basic_filebuf<_CharT, _Traits>::
+    _M_underflow_common(bool __bump)
+    {
+      int_type __ret = traits_type::eof();
+      bool __testin = _M_mode & ios_base::in;
+      bool __testout = _M_mode & ios_base::out;
+
+      if (__testin)
+	{
+	  // Check for pback madness, and if so swich back to the
+	  // normal buffers and jet outta here before expensive
+	  // fileops happen...
+	  if (_M_pback_init)
+	    {
+	      _M_pback_destroy();
+	      if (_M_in_cur < _M_in_end)
+		return traits_type::to_int_type(*_M_in_cur);
+	    }
+
+	  // Sync internal and external buffers.
+	  // NB: __testget -> __testput as _M_buf_unified here.
+	  bool __testget = _M_in_cur && _M_in_beg < _M_in_cur;
+	  bool __testinit = _M_is_indeterminate();
+	  if (__testget)
+	    {
+	      if (__testout)
+		_M_really_overflow();
+	      else if (_M_in_cur != _M_filepos)
+		_M_file.seekoff(_M_in_cur - _M_filepos,
+				ios_base::cur, ios_base::in);
+	    }
+
+	  if (__testinit || __testget)
+	    {
+	      const locale __loc = this->getloc();
+	      const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc); 
+
+	      streamsize __elen = 0;
+	      streamsize __ilen = 0;
+	      if (__cvt.always_noconv())
+		{
+		  __elen = _M_file.xsgetn(reinterpret_cast(_M_in_beg), 
+					  _M_buf_size);
+		  __ilen = __elen;
+		}
+	      else
+		{
+		  char* __buf = static_cast(__builtin_alloca(_M_buf_size));
+		  __elen = _M_file.xsgetn(__buf, _M_buf_size);
+
+		  const char* __eend;
+		  char_type* __iend;
+		  __res_type __r = __cvt.in(_M_state_cur, __buf, 
+					    __buf + __elen, __eend, _M_in_beg, 
+					    _M_in_beg + _M_buf_size, __iend);
+		  if (__r == codecvt_base::ok)
+		    __ilen = __iend - _M_in_beg;
+		  else 
+		    {
+		      // Unwind.
+		      __ilen = 0;
+		      _M_file.seekoff(-__elen, ios_base::cur, ios_base::in);
+		    }
+		}
+
+	      if (0 < __ilen)
+		{
+		  _M_set_determinate(__ilen);
+		  if (__testout)
+		    _M_out_cur = _M_in_cur;
+		  __ret = traits_type::to_int_type(*_M_in_cur);
+		  if (__bump)
+		    _M_in_cur_move(1);
+		  else if (_M_buf_size == 1)
+		    {
+		      // If we are synced with stdio, we have to unget the
+		      // character we just read so that the file pointer
+		      // doesn't move.
+		      _M_file.sys_ungetc(*_M_in_cur);
+		      _M_set_indeterminate();
+		    }
+		}	   
+	    }
+	}
+      _M_last_overflowed = false;	
+      return __ret;
+    }
+  
+  template
+    typename basic_filebuf<_CharT, _Traits>::int_type 
+    basic_filebuf<_CharT, _Traits>::
+    pbackfail(int_type __i)
+    {
+      int_type __ret = traits_type::eof();
+      bool __testin = _M_mode & ios_base::in;
+
+      if (__testin)
+	{
+	  bool __testpb = _M_in_beg < _M_in_cur;
+	  char_type __c = traits_type::to_char_type(__i);
+	  bool __testeof = traits_type::eq_int_type(__i, __ret);
+
+	  if (__testpb)
+	    {
+	      bool __testout = _M_mode & ios_base::out;
+	      bool __testeq = traits_type::eq(__c, this->gptr()[-1]);
+
+	      // Try to put back __c into input sequence in one of three ways.
+	      // Order these tests done in is unspecified by the standard.
+	      if (!__testeof && __testeq)
+		{
+		  --_M_in_cur;
+		  if (__testout)
+		    --_M_out_cur;
+		  __ret = __i;
+		}
+	      else if (__testeof)
+		{
+		  --_M_in_cur;
+		  if (__testout)
+		    --_M_out_cur;
+		  __ret = traits_type::not_eof(__i);
+		}
+	      else if (!__testeof)
+		{
+		  --_M_in_cur;
+		  if (__testout)
+		    --_M_out_cur;
+		  _M_pback_create();
+		  *_M_in_cur = __c; 
+		  __ret = __i;
+		}
+	    }
+	  else
+	    {	 
+ 	      // At the beginning of the buffer, need to make a
+	      // putback position available.
+	      this->seekoff(-1, ios_base::cur);
+	      this->underflow();
+ 	      if (!__testeof)
+ 		{
+		  if (!traits_type::eq(__c, *_M_in_cur))
+		    {
+		      _M_pback_create();
+		      *_M_in_cur = __c;
+		    }
+ 		  __ret = __i;
+ 		}
+ 	      else
+ 		__ret = traits_type::not_eof(__i);
+ 	    }
+	}
+      _M_last_overflowed = false;	
+      return __ret;
+    }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::int_type 
+    basic_filebuf<_CharT, _Traits>::
+    overflow(int_type __c)
+    {
+      int_type __ret = traits_type::eof();
+      bool __testput = _M_out_cur && _M_out_cur < _M_buf + _M_buf_size;
+      bool __testout = _M_mode & ios_base::out;
+      
+      if (__testout)
+	{
+	  if (__testput)
+	    {
+	      *_M_out_cur = traits_type::to_char_type(__c);
+	      _M_out_cur_move(1);
+	      __ret = traits_type::not_eof(__c);
+	    }
+	  else 
+	    __ret = this->_M_really_overflow(__c);
+	}
+
+      _M_last_overflowed = false;    // Set in _M_really_overflow, below.
+      return __ret;
+    }
+  
+  template
+    void
+    basic_filebuf<_CharT, _Traits>::
+    _M_convert_to_external(_CharT* __ibuf, streamsize __ilen,
+			   streamsize& __elen, streamsize& __plen)
+    {
+      const locale __loc = this->getloc();
+      const __codecvt_type& __cvt = use_facet<__codecvt_type>(__loc);
+      
+      if (__cvt.always_noconv() && __ilen)
+	{
+	  __elen += _M_file.xsputn(reinterpret_cast(__ibuf), __ilen);
+	  __plen += __ilen;
+	}
+      else
+	{
+	  // Worst-case number of external bytes needed.
+	  int __ext_multiplier = __cvt.encoding();
+	  if (__ext_multiplier ==  -1 || __ext_multiplier == 0)
+	    __ext_multiplier = sizeof(char_type);
+	  streamsize __blen = __ilen * __ext_multiplier;
+	  char* __buf = static_cast(__builtin_alloca(__blen));
+	  char* __bend;
+	  const char_type* __iend;
+	  __res_type __r = __cvt.out(_M_state_cur, __ibuf, __ibuf + __ilen, 
+		 		     __iend, __buf, __buf + __blen, __bend);
+	  // Result == ok, partial, noconv
+	  if (__r != codecvt_base::error)
+	    __blen = __bend - __buf;
+	  // Result == error
+	  else 
+	    __blen = 0;
+	  
+	  if (__blen)
+	    {
+	      __elen += _M_file.xsputn(__buf, __blen);
+	      __plen += __blen;
+	    }
+
+	  // Try once more for partial conversions.
+	  if (__r == codecvt_base::partial)
+	    {
+	      const char_type* __iresume = __iend;
+	      streamsize __rlen = _M_out_end - __iend;
+	      __r = __cvt.out(_M_state_cur, __iresume, __iresume + __rlen, 
+			      __iend, __buf, __buf + __blen, __bend);
+	      if (__r != codecvt_base::error)
+		__rlen = __bend - __buf;
+	      else 
+		__rlen = 0;
+	      if (__rlen)
+		{
+		  __elen += _M_file.xsputn(__buf, __rlen);
+		  __plen += __rlen;
+		}
+	    }
+	}
+    }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::int_type 
+    basic_filebuf<_CharT, _Traits>::
+    _M_really_overflow(int_type __c)
+    {
+      int_type __ret = traits_type::eof();
+      bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
+      bool __testunbuffered = _M_file.is_open() && !_M_buf_size;
+
+      if (__testput || __testunbuffered)
+	{
+	  // Sizes of external and pending output.
+	  streamsize __elen = 0;
+	  streamsize __plen = 0;
+
+	  // Need to restore current position. The position of the external
+	  // byte sequence (_M_file) corresponds to _M_filepos, and we need
+	  // to move it to _M_out_beg for the write.
+	  if (_M_filepos && _M_filepos != _M_out_beg)
+	    {
+	      off_type __off = _M_out_beg - _M_filepos;
+	      _M_file.seekoff(__off, ios_base::cur);
+	    }
+
+	  // Convert internal buffer to external representation, output.
+	  // NB: In the unbuffered case, no internal buffer exists. 
+	  if (!__testunbuffered)
+	    _M_convert_to_external(_M_out_beg,  _M_out_end - _M_out_beg, 
+				   __elen, __plen);
+
+	  // Convert pending sequence to external representation, output.
+	  // If eof, then just attempt sync.
+	  if (!traits_type::eq_int_type(__c, traits_type::eof()))
+	    {
+	      char_type __pending = traits_type::to_char_type(__c);
+	      _M_convert_to_external(&__pending, 1, __elen, __plen);
+
+	      // User code must flush when switching modes (thus don't sync).
+	      if (__elen == __plen)
+		{
+		  _M_set_indeterminate();
+		  __ret = traits_type::not_eof(__c);
+		}
+	    }
+	  else if (!_M_file.sync())
+	    {
+	      _M_set_indeterminate();
+	      __ret = traits_type::not_eof(__c);
+	    }
+	}	      
+      _M_last_overflowed = true;	
+      return __ret;
+    }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::__streambuf_type* 
+    basic_filebuf<_CharT, _Traits>::
+    setbuf(char_type* __s, streamsize __n)
+    {
+      if (!this->is_open() && __s == 0 && __n == 0)
+	_M_buf_size_opt = 0;
+      else if (__s && __n)
+	{
+	  // This is implementation-defined behavior, and assumes
+	  // that an external char_type array of length (__s + __n)
+	  // exists and has been pre-allocated. If this is not the
+	  // case, things will quickly blow up.
+	  // Step 1: Destroy the current internal array.
+	  _M_destroy_internal_buffer();
+	  
+	  // Step 2: Use the external array.
+	  _M_buf = __s;
+	  _M_buf_size_opt = _M_buf_size = __n;
+	  _M_set_indeterminate();
+	}
+      _M_last_overflowed = false;	
+      return this; 
+    }
+  
+  template
+    typename basic_filebuf<_CharT, _Traits>::pos_type
+    basic_filebuf<_CharT, _Traits>::
+    seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
+    {
+      pos_type __ret =  pos_type(off_type(-1)); 
+      bool __testin = (ios_base::in & _M_mode & __mode) != 0;
+      bool __testout = (ios_base::out & _M_mode & __mode) != 0;
+
+      // Should probably do has_facet checks here.
+      int __width = use_facet<__codecvt_type>(_M_buf_locale).encoding();
+      if (__width < 0)
+	__width = 0;
+      bool __testfail = __off != 0 && __width <= 0;
+      
+      if (this->is_open() && !__testfail && (__testin || __testout)) 
+	{
+	  // Ditch any pback buffers to avoid confusion.
+	  _M_pback_destroy();
+
+	  if (__way != ios_base::cur || __off != 0)
+	    { 
+	      off_type __computed_off = __width * __off;
+	      
+	      bool __testget = _M_in_cur && _M_in_beg < _M_in_end;
+	      bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
+	      // Sync the internal and external streams.
+	      // out
+	      if (__testput || _M_last_overflowed)
+		{
+		  // Part one: update the output sequence.
+		  this->sync();
+		  // Part two: output unshift sequence.
+		  _M_output_unshift();
+		}
+	      //in
+	      else if (__testget && __way == ios_base::cur)
+		__computed_off += _M_in_cur - _M_filepos;
+	  
+	      __ret = _M_file.seekoff(__computed_off, __way, __mode);
+	      _M_set_indeterminate();
+	    }
+	  // NB: Need to do this in case _M_file in indeterminate
+	  // state, ie _M_file._offset == -1
+	  else
+	    {
+	      __ret = _M_file.seekoff(__off, ios_base::cur, __mode);
+	      __ret += max(_M_out_cur, _M_in_cur) - _M_filepos;
+	    }
+	}
+      _M_last_overflowed = false;	
+      return __ret;
+    }
+
+  template
+    typename basic_filebuf<_CharT, _Traits>::pos_type
+    basic_filebuf<_CharT, _Traits>::
+    seekpos(pos_type __pos, ios_base::openmode __mode)
+    {
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 171. Strange seekpos() semantics due to joint position
+      return this->seekoff(off_type(__pos), ios_base::beg, __mode);
+#endif
+    }
+
+  template
+    void 
+    basic_filebuf<_CharT, _Traits>::
+    _M_output_unshift()
+    { }
+
+  template
+    void
+    basic_filebuf<_CharT, _Traits>::
+    imbue(const locale& __loc)
+    {
+      bool __testbeg = gptr() == eback() && pptr() == pbase();
+
+      if (__testbeg && _M_buf_locale != __loc)
+	{
+	  _M_buf_locale = __loc;
+	  _M_buf_locale_init = true;
+	}
+
+      // NB this may require the reconversion of previously
+      // converted chars. This in turn may cause the reconstruction
+      // of the original file. YIKES!!
+      // XXX The part in the above comment is not done.
+      _M_last_overflowed = false;	
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template class basic_filebuf;
+  extern template class basic_filebuf;
+  extern template class basic_ifstream;
+  extern template class basic_ifstream;
+  extern template class basic_ofstream;
+  extern template class basic_ofstream;
+  extern template class basic_fstream;
+  extern template class basic_fstream;
+} // namespace std
+
+#endif 
diff --git a/contrib/libstdc++/include/bits/functexcept.h b/contrib/libstdc++/include/bits/functexcept.h
new file mode 100644
index 0000000..eac2c95
--- /dev/null
+++ b/contrib/libstdc++/include/bits/functexcept.h
@@ -0,0 +1,85 @@
+// Function-Based Exception Support -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.1  Exception classes
+//
+
+#include 
+
+namespace std
+{
+  // Helper for exception objects in  
+  void
+  __throw_bad_exception(void);
+
+  // Helper for exception objects in  
+  void
+  __throw_bad_alloc(void);
+
+  // Helper for exception objects in  
+  void
+  __throw_bad_cast(void);
+
+  void
+  __throw_bad_typeid(void);
+
+  // Helpers for exception objects in  
+  void
+  __throw_logic_error(const char* __s);
+
+  void
+  __throw_domain_error(const char* __s);
+
+  void
+  __throw_invalid_argument(const char* __s);
+
+  void
+  __throw_length_error(const char* __s);
+
+  void
+  __throw_out_of_range(const char* __s);
+
+  void
+  __throw_runtime_error(const char* __s);
+
+  void
+  __throw_range_error(const char* __s);
+
+  void
+  __throw_overflow_error(const char* __s);
+
+  void
+  __throw_underflow_error(const char* __s);
+
+  // Helpers for exception objects in basic_ios
+  void
+  __throw_ios_failure(const char* __s);
+} // namespace std
+
diff --git a/contrib/libstdc++/include/bits/generic_shadow.h b/contrib/libstdc++/include/bits/generic_shadow.h
new file mode 100644
index 0000000..b87e717
--- /dev/null
+++ b/contrib/libstdc++/include/bits/generic_shadow.h
@@ -0,0 +1,59 @@
+// generic C header shadow file -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// This file is included by all the standard C  headers
+// after defining _SHADOW_NAME.
+
+#ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+
+      // Get out of the "swamp."
+    } // Close extern "C"
+  }   // Close namespace _C_legacy::
+
+# undef _IN_C_LEGACY_
+# include _SHADOW_NAME
+
+  // Dive back into the "swamp."
+  namespace _C_legacy {
+    extern "C" {
+#     define _IN_C_LEGACY_
+  
+#else /* not _IN_C_LEGACY_:  directly included by user program */
+  
+# include _SHADOW_NAME
+  
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+  using namespace ::_C_legacy::_C_shadow;
+  
+#endif /* _IN_C_LEGACY_ */
+    
+
+
diff --git a/contrib/libstdc++/include/bits/gslice.h b/contrib/libstdc++/include/bits/gslice.h
new file mode 100644
index 0000000..95781f9
--- /dev/null
+++ b/contrib/libstdc++/include/bits/gslice.h
@@ -0,0 +1,124 @@
+// The template and inlines for the -*- C++ -*- gslice class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file gslice.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_GSLICE_H
+#define _CPP_BITS_GSLICE_H 1
+
+#pragma GCC system_header
+
+namespace std {
+    
+    class gslice
+    {
+    public:
+        gslice ();
+        gslice (size_t, const valarray&, const valarray&);
+        // XXX: the IS says the copy-ctor and copy-assignment operators are
+        //      synthetized by the compiler but they are just unsuitable
+        //      for a ref-counted semantic
+        gslice(const gslice&);
+        ~gslice();
+
+        // XXX: See the note above.
+        gslice& operator= (const gslice&);
+        
+        size_t           start () const;
+        valarray size () const;
+        valarray stride () const;
+        
+    private:
+        struct _Indexer {
+            size_t _M_count;
+            size_t _M_start;
+            valarray _M_size;
+            valarray _M_stride;
+            valarray _M_index;
+            _Indexer(size_t, const valarray&,
+                     const valarray&);
+            void _M_increment_use() { ++_M_count; }
+            size_t _M_decrement_use() { return --_M_count; }
+        };
+
+        _Indexer* _M_index;
+        
+        template friend class valarray;
+    };
+    
+    inline size_t
+    gslice::start () const
+    { return _M_index ? _M_index->_M_start : 0; }
+    
+    inline valarray
+    gslice::size () const
+    { return _M_index ? _M_index->_M_size : valarray(); }
+    
+    inline valarray
+    gslice::stride () const
+    { return _M_index ? _M_index->_M_stride : valarray(); }
+    
+    inline gslice::gslice () : _M_index(0) {}
+
+    inline
+    gslice::gslice(size_t __o, const valarray& __l,
+                   const valarray& __s)
+            : _M_index(new gslice::_Indexer(__o, __l, __s)) {}
+
+    inline
+    gslice::gslice(const gslice& __g) : _M_index(__g._M_index)
+    { if (_M_index) _M_index->_M_increment_use(); }
+    
+    inline
+    gslice::~gslice()
+    { if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index; }
+
+    inline gslice&
+    gslice::operator= (const gslice& __g)
+    {
+        if (__g._M_index) __g._M_index->_M_increment_use();
+        if (_M_index && _M_index->_M_decrement_use() == 0) delete _M_index;
+        _M_index = __g._M_index;
+        return *this;
+    }
+            
+    
+} // std::
+
+
+#endif /* _CPP_BITS_GSLICE_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/gslice_array.h b/contrib/libstdc++/include/bits/gslice_array.h
new file mode 100644
index 0000000..8989ac5
--- /dev/null
+++ b/contrib/libstdc++/include/bits/gslice_array.h
@@ -0,0 +1,176 @@
+// The template and inlines for the -*- C++ -*- gslice_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file gslice_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_GSLICE_ARRAY
+#define _CPP_BITS_GSLICE_ARRAY 1
+
+#pragma GCC system_header
+
+namespace std {
+
+    template class gslice_array
+    {
+    public:
+        typedef _Tp value_type;
+
+        void operator=  (const valarray<_Tp>&) const;
+        void operator*= (const valarray<_Tp>&) const;
+        void operator/= (const valarray<_Tp>&) const;
+        void operator%= (const valarray<_Tp>&) const;
+        void operator+= (const valarray<_Tp>&) const;
+        void operator-= (const valarray<_Tp>&) const;
+        void operator^= (const valarray<_Tp>&) const;
+        void operator&= (const valarray<_Tp>&) const;
+        void operator|= (const valarray<_Tp>&) const;
+        void operator<<=(const valarray<_Tp>&) const;
+        void operator>>=(const valarray<_Tp>&) const;
+        void operator=(const _Tp&);
+
+        template
+        void operator= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator*= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator/= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator%= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator+= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator-= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator^= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator&= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator|= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator<<= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator>>= (const _Expr<_Dom,_Tp>&) const;
+        
+    private:
+        _Array<_Tp>    _M_array;
+        const valarray& _M_index;
+        
+        friend class valarray<_Tp>;
+        
+        gslice_array (_Array<_Tp>, const valarray&);
+
+        // this constructor needs to be implemented.
+        gslice_array (const gslice_array&);
+
+        // not implemented
+        gslice_array();
+        gslice_array& operator= (const gslice_array&);
+    };
+
+    template
+    inline
+    gslice_array<_Tp>::gslice_array (_Array<_Tp> __a,
+                                     const valarray& __i)
+            : _M_array (__a), _M_index (__i) {}
+
+
+    template
+    inline
+    gslice_array<_Tp>::gslice_array (const gslice_array<_Tp>& __a)
+            : _M_array (__a._M_array), _M_index (__a._M_index) {}
+
+    
+    template
+    inline void
+    gslice_array<_Tp>::operator= (const _Tp& __t) 
+    { 
+        __valarray_fill (_M_array, _Array(_M_index),
+                         _M_index.size(), __t); 
+    }
+
+    template
+    inline void
+    gslice_array<_Tp>::operator= (const valarray<_Tp>& __v) const
+    {
+        __valarray_copy (_Array<_Tp> (__v), __v.size (),
+                         _M_array, _Array(_M_index));
+    }
+
+    template
+    template
+    inline void
+    gslice_array<_Tp>::operator= (const _Expr& __e) const
+    {
+        __valarray_copy (__e, _M_index.size(), _M_array,
+                         _Array(_M_index));
+    }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(op, name)				\
+template							\
+inline void								\
+gslice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const	\
+{									\
+    _Array_augmented_##name (_M_array, _Array(_M_index),	\
+                              _Array<_Tp> (__v), __v.size ());		\
+}									\
+									\
+template template        			\
+inline void 								\
+gslice_array<_Tp>::operator op##= (const _Expr& __e) const	\
+{									\
+    _Array_augmented_##name (_M_array, _Array(_M_index), __e,	\
+                              _M_index.size());				\
+}
+
+_DEFINE_VALARRAY_OPERATOR(*, multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, divides)    
+_DEFINE_VALARRAY_OPERATOR(%, modulus)
+_DEFINE_VALARRAY_OPERATOR(+, plus)    
+_DEFINE_VALARRAY_OPERATOR(-, minus)
+_DEFINE_VALARRAY_OPERATOR(^, xor)
+_DEFINE_VALARRAY_OPERATOR(&, and)
+_DEFINE_VALARRAY_OPERATOR(|, or)
+_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+} // std::
+
+#endif /* _CPP_BITS_GSLICE_ARRAY */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/indirect_array.h b/contrib/libstdc++/include/bits/indirect_array.h
new file mode 100644
index 0000000..a5737e9
--- /dev/null
+++ b/contrib/libstdc++/include/bits/indirect_array.h
@@ -0,0 +1,176 @@
+// The template and inlines for the -*- C++ -*- indirect_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file indirect_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_INDIRECT_ARRAY_H
+#define _CPP_BITS_INDIRECT_ARRAY_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+  template 
+     class indirect_array
+     {
+     public:
+       typedef _Tp value_type;
+
+       // XXX: This is a proposed resolution for DR-253.
+       indirect_array& operator= (const indirect_array&);
+
+       void operator=  (const valarray<_Tp>&) const;
+       void operator*= (const valarray<_Tp>&) const;
+       void operator/= (const valarray<_Tp>&) const;
+       void operator%= (const valarray<_Tp>&) const; 
+       void operator+= (const valarray<_Tp>&) const;
+       void operator-= (const valarray<_Tp>&) const;  
+       void operator^= (const valarray<_Tp>&) const;
+       void operator&= (const valarray<_Tp>&) const;
+       void operator|= (const valarray<_Tp>&) const;
+       void operator<<= (const valarray<_Tp>&) const;
+       void operator>>= (const valarray<_Tp>&) const; 
+       void operator= (const _Tp&);
+       //    ~indirect_array();
+
+       template
+       void operator=  (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator*= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator/= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator%= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator+= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator-= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator^= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator&= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator|= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator<<= (const _Expr<_Dom, _Tp>&) const;
+       template
+       void operator>>= (const _Expr<_Dom, _Tp>&) const; 
+
+     private:
+       indirect_array (const indirect_array&);
+       indirect_array (_Array<_Tp>, size_t, _Array);
+
+       friend class valarray<_Tp>;
+       friend class gslice_array<_Tp>;
+
+       const size_t 	 _M_sz;
+       const _Array _M_index;
+       const _Array<_Tp> 	 _M_array;
+
+       // not implemented
+       indirect_array ();
+     };
+
+  template
+  inline indirect_array<_Tp>::indirect_array(const indirect_array<_Tp>& __a)
+          : _M_sz (__a._M_sz), _M_index (__a._M_index),
+            _M_array (__a._M_array) {}
+
+  template
+     inline
+     indirect_array<_Tp>::indirect_array (_Array<_Tp> __a, size_t __s, 
+                                          _Array __i)
+             : _M_sz (__s), _M_index (__i), _M_array (__a) {}
+
+  template
+     inline indirect_array<_Tp>&
+     indirect_array<_Tp>::operator=(const indirect_array<_Tp>& __a)
+     {
+       __valarray_copy(__a._M_array, _M_sz, __a._M_index, _M_array, _M_index);
+       return *this;
+     }
+
+
+  template
+     inline void
+     indirect_array<_Tp>::operator= (const _Tp& __t)
+     { __valarray_fill(_M_array, _M_index, _M_sz, __t); }
+
+  template
+     inline void
+     indirect_array<_Tp>::operator= (const valarray<_Tp>& __v) const
+     { __valarray_copy (_Array<_Tp> (__v), _M_sz, _M_array, _M_index); }
+
+  template
+     template
+     inline void
+     indirect_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const
+     { __valarray_copy (__e, _M_sz, _M_array, _M_index); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(op, name)				\
+template							\
+inline void								\
+indirect_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const	\
+{									\
+  _Array_augmented_##name (_M_array, _M_index, _Array<_Tp> (__v), _M_sz); \
+}									\
+									\
+template template				\
+inline void								\
+indirect_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const \
+{									\
+  _Array_augmented_##name (_M_array, _M_index, __e, _M_sz);		\
+}
+
+_DEFINE_VALARRAY_OPERATOR(*, multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, divides)
+_DEFINE_VALARRAY_OPERATOR(%, modulus)
+_DEFINE_VALARRAY_OPERATOR(+, plus)
+_DEFINE_VALARRAY_OPERATOR(-, minus)
+_DEFINE_VALARRAY_OPERATOR(^, xor)
+_DEFINE_VALARRAY_OPERATOR(&, and)
+_DEFINE_VALARRAY_OPERATOR(|, or)
+_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+} // std::
+
+#endif /* _CPP_BITS_INDIRECT_ARRAY_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/ios_base.h b/contrib/libstdc++/include/bits/ios_base.h
new file mode 100644
index 0000000..f5b0269
--- /dev/null
+++ b/contrib/libstdc++/include/bits/ios_base.h
@@ -0,0 +1,589 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file ios_base.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_IOSBASE_H
+#define _CPP_BITS_IOSBASE_H 1
+
+#pragma GCC system_header
+
+#include 
+
+namespace std
+{
+  // The following definitions of bitmask types are enums, not ints,
+  // as permitted (but not required) in the standard, in order to provide
+  // better type safety in iostream calls.  A side effect is that
+  // expressions involving them are no longer compile-time constants.
+  enum _Ios_Fmtflags { _M_ios_fmtflags_end = 1L << 16 };
+
+  inline _Ios_Fmtflags 
+  operator&(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+  { return _Ios_Fmtflags(static_cast(__a) & static_cast(__b)); }
+
+  inline _Ios_Fmtflags 
+  operator|(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+  { return _Ios_Fmtflags(static_cast(__a) | static_cast(__b)); }
+
+  inline _Ios_Fmtflags 
+  operator^(_Ios_Fmtflags __a, _Ios_Fmtflags __b)
+  { return _Ios_Fmtflags(static_cast(__a) ^ static_cast(__b)); }
+
+  inline _Ios_Fmtflags 
+  operator|=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+  { return __a = __a | __b; }
+
+  inline _Ios_Fmtflags 
+  operator&=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+  { return __a = __a & __b; }
+
+  inline _Ios_Fmtflags 
+  operator^=(_Ios_Fmtflags& __a, _Ios_Fmtflags __b)
+  { return __a = __a ^ __b; }
+
+  inline _Ios_Fmtflags 
+  operator~(_Ios_Fmtflags __a)
+  { return _Ios_Fmtflags(~static_cast(__a)); }
+
+
+  enum _Ios_Openmode { _M_ios_openmode_end = 1L << 16 };
+
+  inline _Ios_Openmode 
+  operator&(_Ios_Openmode __a, _Ios_Openmode __b)
+  { return _Ios_Openmode(static_cast(__a) & static_cast(__b)); }
+
+  inline _Ios_Openmode 
+  operator|(_Ios_Openmode __a, _Ios_Openmode __b)
+  { return _Ios_Openmode(static_cast(__a) | static_cast(__b)); }
+
+  inline _Ios_Openmode 
+  operator^(_Ios_Openmode __a, _Ios_Openmode __b)
+  { return _Ios_Openmode(static_cast(__a) ^ static_cast(__b)); }
+
+  inline _Ios_Openmode 
+  operator|=(_Ios_Openmode& __a, _Ios_Openmode __b)
+  { return __a = __a | __b; }
+
+  inline _Ios_Openmode 
+  operator&=(_Ios_Openmode& __a, _Ios_Openmode __b)
+  { return __a = __a & __b; }
+
+  inline _Ios_Openmode 
+  operator^=(_Ios_Openmode& __a, _Ios_Openmode __b)
+  { return __a = __a ^ __b; }
+
+  inline _Ios_Openmode 
+  operator~(_Ios_Openmode __a)
+  { return _Ios_Openmode(~static_cast(__a)); }
+
+
+  enum _Ios_Iostate { _M_ios_iostate_end = 1L << 16 };
+
+  inline _Ios_Iostate 
+  operator&(_Ios_Iostate __a, _Ios_Iostate __b)
+  { return _Ios_Iostate(static_cast(__a) & static_cast(__b)); }
+
+  inline _Ios_Iostate 
+  operator|(_Ios_Iostate __a, _Ios_Iostate __b)
+  { return _Ios_Iostate(static_cast(__a) | static_cast(__b)); }
+
+  inline _Ios_Iostate 
+  operator^(_Ios_Iostate __a, _Ios_Iostate __b)
+  { return _Ios_Iostate(static_cast(__a) ^ static_cast(__b)); }
+
+  inline _Ios_Iostate 
+  operator|=(_Ios_Iostate& __a, _Ios_Iostate __b)
+  { return __a = __a | __b; }
+
+  inline _Ios_Iostate 
+  operator&=(_Ios_Iostate& __a, _Ios_Iostate __b)
+  { return __a = __a & __b; }
+
+  inline _Ios_Iostate 
+  operator^=(_Ios_Iostate& __a, _Ios_Iostate __b)
+  { return __a = __a ^ __b; }
+
+  inline _Ios_Iostate 
+  operator~(_Ios_Iostate __a)
+  { return _Ios_Iostate(~static_cast(__a)); }
+
+  enum _Ios_Seekdir { _M_ios_seekdir_end = 1L << 16 };
+
+  // 27.4.2  Class ios_base
+  class ios_base
+  {
+  public:
+    
+    // 27.4.2.1.1  Class ios_base::failure
+    class failure : public exception
+    {
+    public:
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+      //48.  Use of non-existent exception constructor
+      explicit 
+      failure(const string& __str) throw();
+
+      // This declaration is not useless:
+      // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+      virtual 
+      ~failure() throw();
+
+      virtual const char*
+      what() const throw();
+      
+    private:
+      enum { _M_bufsize = 256 };
+      char _M_name[_M_bufsize];
+#endif
+    };
+
+    // 27.4.2.1.2  Type ios_base::fmtflags
+    typedef _Ios_Fmtflags fmtflags;
+    // 27.4.2.1.2  Type fmtflags
+    static const fmtflags boolalpha =   fmtflags(__ios_flags::_S_boolalpha);
+    static const fmtflags dec =         fmtflags(__ios_flags::_S_dec);
+    static const fmtflags fixed =       fmtflags(__ios_flags::_S_fixed);
+    static const fmtflags hex =         fmtflags(__ios_flags::_S_hex);
+    static const fmtflags internal =    fmtflags(__ios_flags::_S_internal);
+    static const fmtflags left =        fmtflags(__ios_flags::_S_left);
+    static const fmtflags oct =         fmtflags(__ios_flags::_S_oct);
+    static const fmtflags right =       fmtflags(__ios_flags::_S_right);
+    static const fmtflags scientific =  fmtflags(__ios_flags::_S_scientific);
+    static const fmtflags showbase =    fmtflags(__ios_flags::_S_showbase);
+    static const fmtflags showpoint =   fmtflags(__ios_flags::_S_showpoint);
+    static const fmtflags showpos =     fmtflags(__ios_flags::_S_showpos);
+    static const fmtflags skipws =      fmtflags(__ios_flags::_S_skipws);
+    static const fmtflags unitbuf =     fmtflags(__ios_flags::_S_unitbuf);
+    static const fmtflags uppercase =   fmtflags(__ios_flags::_S_uppercase);
+    static const fmtflags adjustfield = fmtflags(__ios_flags::_S_adjustfield);
+    static const fmtflags basefield =   fmtflags(__ios_flags::_S_basefield);
+    static const fmtflags floatfield =  fmtflags(__ios_flags::_S_floatfield);
+
+    // 27.4.2.1.3  Type ios_base::iostate
+    typedef _Ios_Iostate iostate;
+    static const iostate badbit =  	iostate(__ios_flags::_S_badbit);
+    static const iostate eofbit =  	iostate(__ios_flags::_S_eofbit);
+    static const iostate failbit = 	iostate(__ios_flags::_S_failbit);
+    static const iostate goodbit = 	iostate(0);
+
+    // 27.4.2.1.4  Type openmode
+    typedef _Ios_Openmode openmode;
+    static const openmode app =    	openmode(__ios_flags::_S_app);
+    static const openmode ate =    	openmode(__ios_flags::_S_ate);
+    static const openmode binary = 	openmode(__ios_flags::_S_bin);
+    static const openmode in =     	openmode(__ios_flags::_S_in);
+    static const openmode out =    	openmode(__ios_flags::_S_out);
+    static const openmode trunc =  	openmode(__ios_flags::_S_trunc);
+
+    // 27.4.2.1.5  Type seekdir
+    typedef _Ios_Seekdir seekdir;
+    static const seekdir beg = 		seekdir(0);
+    static const seekdir cur = 		seekdir(SEEK_CUR);
+    static const seekdir end = 		seekdir(SEEK_END);
+
+#ifdef _GLIBCPP_DEPRECATED
+    typedef int io_state;
+    typedef int open_mode;
+    typedef int seek_dir;
+#endif
+
+    // Callbacks;
+    enum event
+    {
+      erase_event,
+      imbue_event,
+      copyfmt_event
+    };
+
+    typedef void (*event_callback) (event, ios_base&, int);
+
+    void 
+    register_callback(event_callback __fn, int __index);
+
+  protected:
+    // Data Members
+    streamsize 		_M_precision;
+    streamsize 		_M_width;
+    fmtflags 		_M_flags;
+    iostate 		_M_exception;
+    iostate 	       	_M_streambuf_state;
+
+    // 27.4.2.6  Members for callbacks
+    // 27.4.2.6  ios_base callbacks
+    struct _Callback_list
+    {
+      // Data Members
+      _Callback_list* 		_M_next;
+      ios_base::event_callback 	_M_fn;
+      int 			_M_index;
+      _Atomic_word		_M_refcount;  // 0 means one reference.
+    
+      _Callback_list(ios_base::event_callback __fn, int __index, 
+		     _Callback_list* __cb)
+      : _M_next(__cb), _M_fn(__fn), _M_index(__index), _M_refcount(0) { }
+      
+      void 
+      _M_add_reference() { __atomic_add(&_M_refcount, 1); }
+
+      // 0 => OK to delete.
+      int 
+      _M_remove_reference() { return __exchange_and_add(&_M_refcount, -1); }
+    };
+
+     _Callback_list*  	_M_callbacks;
+
+    void 
+    _M_call_callbacks(event __ev) throw();
+
+    void 
+    _M_dispose_callbacks(void);
+
+    // 27.4.2.5  Members for iword/pword storage
+    struct _Words 
+    { 
+      void* 	_M_pword; 
+      long 	_M_iword; 
+      _Words() : _M_pword(0), _M_iword(0) { }
+    };
+
+    // Only for failed iword/pword calls.
+    _Words  		_M_word_zero;    
+
+    // Guaranteed storage.
+    static const int 	_S_local_word_size = 8;
+    _Words  		_M_local_word[_S_local_word_size];  
+
+    // Allocated storage.
+    int     		_M_word_size;
+    _Words* 		_M_word;
+ 
+    _Words& 
+    _M_grow_words(int __index);
+
+    // Members for locale and locale caching.
+    locale 		_M_ios_locale;
+
+    void 
+    _M_init();
+
+  public:
+
+    // 27.4.2.1.6  Class ios_base::Init
+    // Used to initialize standard streams. In theory, g++ could use
+    // -finit-priority to order this stuff correctly without going
+    // through these machinations. 
+    class Init 
+    {
+      friend class ios_base;
+    public:
+      Init();
+      ~Init();
+      
+      static void
+      _S_ios_create(bool __sync);
+      
+      static void
+      _S_ios_destroy();
+
+    private:
+      static int 	_S_ios_base_init;
+      static bool	_S_synced_with_stdio;
+    };
+
+    // Fmtflags state:
+    inline fmtflags 
+    flags() const { return _M_flags; }
+
+    inline fmtflags 
+    flags(fmtflags __fmtfl)
+    { 
+      fmtflags __old = _M_flags; 
+      _M_flags = __fmtfl; 
+      return __old; 
+    }
+
+    inline fmtflags 
+    setf(fmtflags __fmtfl)
+    { 
+      fmtflags __old = _M_flags; 
+      _M_flags |= __fmtfl; 
+      return __old; 
+    }
+
+    inline fmtflags 
+    setf(fmtflags __fmtfl, fmtflags __mask)
+    {
+      fmtflags __old = _M_flags;
+      _M_flags &= ~__mask;
+      _M_flags |= (__fmtfl & __mask);
+      return __old;
+    }
+
+    inline void 
+    unsetf(fmtflags __mask) { _M_flags &= ~__mask; }
+
+    inline streamsize 
+    precision() const { return _M_precision; }
+
+    inline streamsize 
+    precision(streamsize __prec)
+    { 
+      streamsize __old = _M_precision; 
+      _M_precision = __prec; 
+      return __old; 
+    }
+
+    inline streamsize 
+    width() const { return _M_width; }
+
+    inline streamsize 
+    width(streamsize __wide)
+    { 
+      streamsize __old = _M_width; 
+      _M_width = __wide; 
+      return __old; 
+    }
+
+    static bool 
+    sync_with_stdio(bool __sync = true);
+
+    // Locales:
+    locale 
+    imbue(const locale& __loc);
+
+    inline locale 
+    getloc() const { return _M_ios_locale; }
+
+    // Storage:
+    static int 
+    xalloc() throw();
+
+    inline long& 
+    iword(int __ix)
+    {
+      _Words& __word = (__ix < _M_word_size) 
+			? _M_word[__ix] : _M_grow_words(__ix);
+      return __word._M_iword;
+    }
+
+    inline void*& 
+    pword(int __ix)
+    {
+      _Words& __word = (__ix < _M_word_size) 
+			? _M_word[__ix] : _M_grow_words(__ix);
+      return __word._M_pword;
+    }
+
+    // Destructor
+    ~ios_base();
+
+  protected:
+    ios_base();
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+  //50.  Copy constructor and assignment operator of ios_base
+  private:
+    ios_base(const ios_base&);
+
+    ios_base& 
+    operator=(const ios_base&);
+#endif
+  };
+ 
+  // 27.4.5.1 fmtflags manipulators:
+  inline ios_base& 
+  boolalpha(ios_base& __base)
+  {
+    __base.setf(ios_base::boolalpha);
+    return __base;
+  }
+
+  inline ios_base& 
+  noboolalpha(ios_base& __base)
+  {
+    __base.unsetf(ios_base::boolalpha);
+    return __base;
+  }
+
+  inline ios_base& 
+  showbase(ios_base& __base)
+  {
+    __base.setf(ios_base::showbase);
+    return __base;
+  }
+
+  inline ios_base& 
+  noshowbase(ios_base& __base)
+  {
+    __base.unsetf(ios_base::showbase);
+    return __base;
+  }
+
+  inline ios_base& 
+  showpoint(ios_base& __base)
+  {
+    __base.setf(ios_base::showpoint);
+    return __base;
+  }
+
+  inline ios_base& 
+  noshowpoint(ios_base& __base)
+  {
+    __base.unsetf(ios_base::showpoint);
+    return __base;
+  }
+
+  inline ios_base& 
+  showpos(ios_base& __base)
+  {
+    __base.setf(ios_base::showpos);
+    return __base;
+  }
+
+  inline ios_base& 
+  noshowpos(ios_base& __base)
+  {
+    __base.unsetf(ios_base::showpos);
+    return __base;
+  }
+
+  inline ios_base& 
+  skipws(ios_base& __base)
+  {
+    __base.setf(ios_base::skipws);
+    return __base;
+  }
+  
+  inline ios_base& 
+  noskipws(ios_base& __base)
+  {
+    __base.unsetf(ios_base::skipws);
+    return __base;
+  }
+
+  inline ios_base& 
+  uppercase(ios_base& __base)
+  {
+    __base.setf(ios_base::uppercase);
+    return __base;
+  }
+
+  inline ios_base& 
+  nouppercase(ios_base& __base)
+  {
+    __base.unsetf(ios_base::uppercase);
+    return __base;
+  }
+
+  inline ios_base& 
+  unitbuf(ios_base& __base)
+  {
+     __base.setf(ios_base::unitbuf);      
+     return __base;
+  }
+
+  inline ios_base& 
+  nounitbuf(ios_base& __base)
+  {
+     __base.unsetf(ios_base::unitbuf);
+     return __base;    
+  }
+
+  // 27.4.5.2 adjustfield anipulators:
+  inline ios_base& 
+  internal(ios_base& __base)
+  {
+     __base.setf(ios_base::internal, ios_base::adjustfield);
+     return __base;    
+  }
+
+  inline ios_base& 
+  left(ios_base& __base)
+  {
+    __base.setf(ios_base::left, ios_base::adjustfield);
+    return __base;
+  }
+  
+  inline ios_base& 
+  right(ios_base& __base)
+  {
+    __base.setf(ios_base::right, ios_base::adjustfield);
+    return __base;
+  }
+  
+  // 27.4.5.3 basefield anipulators:
+  inline ios_base& 
+  dec(ios_base& __base)
+  {
+    __base.setf(ios_base::dec, ios_base::basefield);
+    return __base;
+  }
+  
+  inline ios_base& 
+  hex(ios_base& __base)
+  {
+    __base.setf(ios_base::hex, ios_base::basefield);
+    return __base;
+  }
+
+  inline ios_base& 
+  oct(ios_base& __base)
+  {
+    __base.setf(ios_base::oct, ios_base::basefield);
+    return __base;
+  }
+  
+  // 27.4.5.4 floatfield anipulators:
+  inline ios_base& 
+  fixed(ios_base& __base)
+  {
+    __base.setf(ios_base::fixed, ios_base::floatfield);
+    return __base;
+  }
+
+  inline ios_base& 
+  scientific(ios_base& __base)
+  {
+    __base.setf(ios_base::scientific, ios_base::floatfield);
+    return __base;
+  }
+
+} // namespace std
+
+#endif /* _CPP_BITS_IOSBASE_H */
+
diff --git a/contrib/libstdc++/include/bits/istream.tcc b/contrib/libstdc++/include/bits/istream.tcc
new file mode 100644
index 0000000..636a738
--- /dev/null
+++ b/contrib/libstdc++/include/bits/istream.tcc
@@ -0,0 +1,1228 @@
+// istream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.2  Output streams
+//
+
+#pragma GCC system_header
+
+#include 
+#include  // For flush()
+
+namespace std 
+{
+  template
+    basic_istream<_CharT, _Traits>::sentry::
+    sentry(basic_istream<_CharT, _Traits>& __in, bool __noskipws)
+    {
+      if (__in.good()) 
+	{
+	  if (__in.tie())
+	    __in.tie()->flush();
+	  if (!__noskipws && (__in.flags() & ios_base::skipws))
+	    {	  
+	      const __int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = __in.rdbuf();
+	      __int_type __c = __sb->sgetc();
+
+	      if (__in._M_check_facet(__in._M_fctype))
+		while (__c != __eof
+		       && __in._M_fctype->is(ctype_base::space, __c))
+		  __c = __sb->snextc();
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//195.  Should basic_istream::sentry's constructor ever set eofbit? 
+	      if (__c == __eof)
+		__in.setstate(ios_base::eofbit);
+#endif
+	    }
+	}
+
+      if (__in.good())
+	_M_ok = true;
+      else
+	{
+	  _M_ok = false;
+	  __in.setstate(ios_base::failbit);
+	}
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(__istream_type& (*__pf)(__istream_type&))
+    {
+      __pf(*this);
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(__ios_type& (*__pf)(__ios_type&))
+    {
+      __pf(*this);
+      return *this;
+    }
+  
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(ios_base& (*__pf)(ios_base&))
+    {
+      __pf(*this);
+      return *this;
+    }
+  
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(bool& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(short& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      long __l;
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __l);
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+	      // 118. basic_istream uses nonexistent num_get member functions.
+	      if (!(__err & ios_base::failbit)
+		  && (numeric_limits::min() <= __l 
+		      && __l <= numeric_limits::max()))
+		__n = __l;
+	      else
+                __err |= ios_base::failbit;
+#endif
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(unsigned short& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(int& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      long __l;
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __l);
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+	      // 118. basic_istream uses nonexistent num_get member functions.
+	      if (!(__err & ios_base::failbit)
+		  && (numeric_limits::min() <= __l 
+		      && __l <= numeric_limits::max()))
+		__n = __l;
+	      else
+                __err |= ios_base::failbit;
+#endif
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(unsigned int& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(long& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(unsigned long& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(long long& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+	      __throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(unsigned long long& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+#endif
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(float& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(double& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(long double& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(void*& __n)
+    {
+      sentry __cerb(*this, false);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);
+	      if (_M_check_facet(_M_fnumget))
+		_M_fnumget->get(*this, 0, *this, __err, __n);
+	      this->setstate(__err);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>& 
+    basic_istream<_CharT, _Traits>::
+    operator>>(__streambuf_type* __sbout)
+    {
+       sentry __cerb(*this, false);
+       if (__cerb)
+	 {
+	   try
+	     {
+	       streamsize __xtrct = 0;
+	       if (__sbout)
+		 {
+		   __streambuf_type* __sbin = this->rdbuf();
+		   __xtrct = __copy_streambufs(*this, __sbin, __sbout);
+		 }
+	       if (!__sbout || !__xtrct)
+		 this->setstate(ios_base::failbit);
+	     }
+	   catch(exception& __fail)
+	     {
+	       // 27.6.2.5.1 Common requirements.
+	       // Turn this on without causing an ios::failure to be thrown.
+	       this->setstate(ios_base::badbit);
+	       if ((this->exceptions() & ios_base::badbit) != 0)
+		 __throw_exception_again;
+	     }
+	 }
+       return *this;
+    }
+
+  template
+    typename basic_istream<_CharT, _Traits>::int_type
+    basic_istream<_CharT, _Traits>::
+    get(void)
+    {
+      const int_type __eof = traits_type::eof();
+      int_type __c = __eof;
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      __c = this->rdbuf()->sbumpc();
+	      // 27.6.1.1 paragraph 3
+	      if (__c != __eof)
+		_M_gcount = 1;
+	      else
+		this->setstate(ios_base::eofbit | ios_base::failbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __c;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    get(char_type& __c)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+ 	  try 
+	    {
+	      const int_type __eof = traits_type::eof();
+	      int_type __bufval = this->rdbuf()->sbumpc();
+	      // 27.6.1.1 paragraph 3
+	      if (__bufval != __eof)
+		{
+		  _M_gcount = 1;
+		  __c = traits_type::to_char_type(__bufval);
+		}
+	      else
+		this->setstate(ios_base::eofbit | ios_base::failbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    get(char_type* __s, streamsize __n, char_type __delim)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      const int_type __idelim = traits_type::to_int_type(__delim);
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      int_type __c = __sb->sgetc();	
+	      
+	      while (_M_gcount + 1 < __n && __c != __eof && __c != __idelim)
+		{
+		  *__s++ = traits_type::to_char_type(__c);
+		  __c = __sb->snextc();
+		  ++_M_gcount;
+		}
+	      if (__c == __eof)
+		this->setstate(ios_base::eofbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      *__s = char_type();
+      if (!_M_gcount)
+	this->setstate(ios_base::failbit);
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    get(__streambuf_type& __sb, char_type __delim)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      const int_type __idelim = traits_type::to_int_type(__delim);
+	      const int_type __eof = traits_type::eof();	      
+	      __streambuf_type* __this_sb = this->rdbuf();
+	      int_type __c = __this_sb->sgetc();
+	      
+	      while (__c != __eof && __c != __idelim 
+		     && (__sb.sputc(traits_type::to_char_type(__c)) != __eof))
+		{
+		  ++_M_gcount;
+		  __c = __this_sb->snextc();
+		}
+	      if (__c == __eof)
+		this->setstate(ios_base::eofbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      if (!_M_gcount)
+	this->setstate(ios_base::failbit);
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    getline(char_type* __s, streamsize __n, char_type __delim)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+          try 
+	    {
+	      const int_type __idelim = traits_type::to_int_type(__delim);
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      int_type __c = __sb->sgetc();
+	    
+	      while (_M_gcount + 1 < __n && __c != __eof && __c != __idelim)
+		{
+		  *__s++ = traits_type::to_char_type(__c);
+		  __c = __sb->snextc();
+		  ++_M_gcount;
+		}
+	      if (__c == __eof)
+		this->setstate(ios_base::eofbit);
+	      else
+		{
+		  if (__c == __idelim)
+		    {
+		      __sb->snextc();
+		      ++_M_gcount;
+		    }
+		  else
+		    this->setstate(ios_base::failbit);
+		}
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      *__s = char_type();
+      if (!_M_gcount)
+	this->setstate(ios_base::failbit);
+      return *this;
+    }
+  
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    ignore(streamsize __n, int_type __delim)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      int_type __c = __sb->sgetc();	
+	      
+	      __n = min(__n, numeric_limits::max());
+	      while (_M_gcount < __n  && __c !=__eof && __c != __delim)
+		{
+		  __c = __sb->snextc();
+		  ++_M_gcount;
+		}
+	      if (__c == __eof)
+		this->setstate(ios_base::eofbit);
+	      else if (__c == __delim)
+		{
+		  __sb->snextc();
+		  ++_M_gcount;
+		}
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+  
+  template
+    typename basic_istream<_CharT, _Traits>::int_type
+    basic_istream<_CharT, _Traits>::
+    peek(void)
+    {
+      int_type __c = traits_type::eof();
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb)
+	{
+	  try 
+	    { __c = this->rdbuf()->sgetc(); }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	} 
+      return __c;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    read(char_type* __s, streamsize __n)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      _M_gcount = this->rdbuf()->sgetn(__s, __n);
+	      if (_M_gcount != __n)
+		this->setstate(ios_base::eofbit | ios_base::failbit);
+	    }	    
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      else
+	this->setstate(ios_base::failbit);
+      return *this;
+    }
+  
+  template
+    streamsize 
+    basic_istream<_CharT, _Traits>::
+    readsome(char_type* __s, streamsize __n)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      const int_type __eof = traits_type::eof(); 
+	      streamsize __num = this->rdbuf()->in_avail();
+	      if (__num != static_cast(__eof))
+		{
+		  __num = min(__num, __n);
+		  if (__num)
+		    _M_gcount = this->rdbuf()->sgetn(__s, __num);
+		}
+	      else
+		this->setstate(ios_base::eofbit);		    
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      else
+	this->setstate(ios_base::failbit);
+      return _M_gcount;
+    }
+      
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    putback(char_type __c)
+    {
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      if (!__sb || __sb->sputbackc(__c) == __eof) 
+		this->setstate(ios_base::badbit);		    
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      else
+	this->setstate(ios_base::failbit);
+      return *this;
+    }
+  
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    unget(void)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      const int_type __eof = traits_type::eof();
+	      __streambuf_type* __sb = this->rdbuf();
+	      if (!__sb || __eof == __sb->sungetc())
+		this->setstate(ios_base::badbit);		    
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      else
+	this->setstate(ios_base::failbit);
+      return *this;
+    }
+  
+  template
+    int
+    basic_istream<_CharT, _Traits>::
+    sync(void)
+    {
+      int __ret = traits_type::eof();
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      __streambuf_type* __sb = this->rdbuf();
+	      if (!__sb || __ret == __sb->pubsync())
+		this->setstate(ios_base::badbit);		    
+	      else 
+		__ret = 0;
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __ret;
+    }
+  
+  template
+    typename basic_istream<_CharT, _Traits>::pos_type
+    basic_istream<_CharT, _Traits>::
+    tellg(void)
+    {
+      pos_type __ret = pos_type(-1);
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	     __ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::in);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __ret;
+    }
+
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    seekg(pos_type __pos)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 136.  seekp, seekg setting wrong streams?
+	      pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::in);
+
+// 129. Need error indication from seekp() and seekg()
+	      if (__err == pos_type(off_type(-1)))
+		this->setstate(ios_base::failbit);
+#endif
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    basic_istream<_CharT, _Traits>::
+    seekg(off_type __off, ios_base::seekdir __dir)
+    {
+      _M_gcount = 0;
+      sentry __cerb(*this, true);
+      if (__cerb) 
+	{
+	  try 
+	    {
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 136.  seekp, seekg setting wrong streams?
+	      pos_type __err = this->rdbuf()->pubseekoff(__off, __dir, 
+							 ios_base::in);
+
+// 129. Need error indication from seekp() and seekg()
+	      if (__err == pos_type(off_type(-1)))
+		this->setstate(ios_base::failbit);
+#endif
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.3 paragraph 1
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  // 27.6.1.2.3 Character extraction templates
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c)
+    {
+      typedef basic_istream<_CharT, _Traits> 		__istream_type;
+      typename __istream_type::sentry __cerb(__in, false);
+      if (__cerb)
+	{
+	  try 
+	    { __in.get(__c); }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __in.setstate(ios_base::badbit);
+	      if ((__in.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      else
+	__in.setstate(ios_base::failbit);
+      return __in;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s)
+    {
+      typedef basic_istream<_CharT, _Traits> 		__istream_type;
+      typedef typename __istream_type::__streambuf_type __streambuf_type;
+      typedef typename _Traits::int_type 		int_type;
+      typedef _CharT                     		char_type;
+      typedef ctype<_CharT>     			__ctype_type;
+      streamsize __extracted = 0;
+
+      typename __istream_type::sentry __cerb(__in, false);
+      if (__cerb)
+	{
+	  try 
+	    {
+	      // Figure out how many characters to extract.
+	      streamsize __num = __in.width();
+	      if (__num == 0)
+		__num = numeric_limits::max();
+	      
+	      const __ctype_type& __ctype = use_facet<__ctype_type>(__in.getloc());
+	      const int_type __eof = _Traits::eof();
+	      __streambuf_type* __sb = __in.rdbuf();
+	      int_type __c = __sb->sgetc();
+	      
+	      while (__extracted < __num - 1 
+		     && __c != __eof && !__ctype.is(ctype_base::space, __c))
+		{
+		  *__s++ = __c;
+		  ++__extracted;
+		  __c = __sb->snextc();
+		}
+	      if (__c == __eof)
+		__in.setstate(ios_base::eofbit);
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//68.  Extractors for char* should store null at end
+	      *__s = char_type();
+#endif
+	      __in.width(0);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __in.setstate(ios_base::badbit);
+	      if ((__in.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      if (!__extracted)
+	__in.setstate(ios_base::failbit);
+      return __in;
+    }
+
+  // 27.6.1.4 Standard basic_istream manipulators
+  template
+    basic_istream<_CharT,_Traits>& 
+    ws(basic_istream<_CharT,_Traits>& __in)
+    {
+      typedef basic_istream<_CharT, _Traits> 		__istream_type;
+      typedef typename __istream_type::__streambuf_type __streambuf_type;
+      typedef typename __istream_type::__ctype_type 	__ctype_type;
+      typedef typename __istream_type::int_type 	__int_type;
+
+      const __ctype_type& __ctype = use_facet<__ctype_type>(__in.getloc());
+      const __int_type __eof = _Traits::eof();	      
+      __streambuf_type* __sb = __in.rdbuf();
+      __int_type __c = __sb->sgetc();
+
+      while (__c != __eof && __ctype.is(ctype_base::space, __c))
+	__c = __sb->snextc();
+      if (__c == __eof)
+	__in.setstate(ios_base::eofbit);
+
+      return __in;
+    }
+
+  // 21.3.7.9 basic_string::getline and operators
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in,
+	       basic_string<_CharT, _Traits, _Alloc>& __str)
+    {
+      typedef basic_istream<_CharT, _Traits> 		__istream_type;
+      typedef typename __istream_type::int_type 	__int_type;
+      typedef typename __istream_type::__streambuf_type __streambuf_type;
+      typedef typename __istream_type::__ctype_type 	__ctype_type;
+      typedef basic_string<_CharT, _Traits, _Alloc> 	__string_type;
+      typedef typename __string_type::size_type		__size_type;
+      __size_type __extracted = 0;
+
+      typename __istream_type::sentry __cerb(__in, false);
+      if (__cerb) 
+	{
+	  __str.erase();
+	  streamsize __w = __in.width();
+	  __size_type __n;
+	  __n = __w > 0 ? static_cast<__size_type>(__w) : __str.max_size();
+
+	  const __ctype_type& __ctype = use_facet<__ctype_type>(__in.getloc());
+	  const __int_type __eof = _Traits::eof();
+	  __streambuf_type* __sb = __in.rdbuf();
+	  __int_type __c = __sb->sgetc();
+	  
+	  while (__extracted < __n 
+		 && __c != __eof && !__ctype.is(ctype_base::space, __c))
+	    {
+	      __str += _Traits::to_char_type(__c);
+	      ++__extracted;
+	      __c = __sb->snextc();
+	    }
+	  if (__c == __eof)
+	    __in.setstate(ios_base::eofbit);
+	  __in.width(0);
+	}
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//211.  operator>>(istream&, string&) doesn't set failbit
+      if (!__extracted)
+	__in.setstate (ios_base::failbit);
+#endif
+      return __in;
+    }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    getline(basic_istream<_CharT, _Traits>& __in,
+	    basic_string<_CharT, _Traits, _Alloc>& __str, _CharT __delim)
+    {
+      typedef basic_istream<_CharT, _Traits> 		__istream_type;
+      typedef typename __istream_type::int_type 	__int_type;
+      typedef typename __istream_type::__streambuf_type __streambuf_type;
+      typedef typename __istream_type::__ctype_type 	__ctype_type;
+      typedef basic_string<_CharT, _Traits, _Alloc> 	__string_type;
+      typedef typename __string_type::size_type		__size_type;
+
+      __size_type __extracted = 0;
+      bool __testdelim = false;
+      typename __istream_type::sentry __cerb(__in, true);
+      if (__cerb) 
+	{
+	  __str.erase();
+	  __size_type __n = __str.max_size();
+
+	  __int_type __idelim = _Traits::to_int_type(__delim);
+	  __streambuf_type* __sb = __in.rdbuf();
+	  __int_type __c = __sb->sbumpc();
+	  const __int_type __eof = _Traits::eof();
+	  __testdelim = __c ==  __idelim;
+
+	  while (__extracted <= __n && __c != __eof && !__testdelim)
+	    {
+	      __str += _Traits::to_char_type(__c);
+	      ++__extracted;
+	      __c = __sb->sbumpc();
+	      __testdelim = __c == __idelim;
+	    }
+	  if (__c == __eof)
+	    __in.setstate(ios_base::eofbit);
+	}
+      if (!__extracted && !__testdelim)
+	__in.setstate(ios_base::failbit);
+      return __in;
+    }
+
+  template
+    inline basic_istream<_CharT,_Traits>&
+    getline(basic_istream<_CharT, _Traits>& __in, 
+	    basic_string<_CharT,_Traits,_Alloc>& __str)
+    { return getline(__in, __str, __in.widen('\n')); }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template class basic_istream;
+  extern template istream& ws(istream&);
+  extern template istream& operator>>(istream&, char&);
+  extern template istream& operator>>(istream&, char*);
+  extern template istream& operator>>(istream&, unsigned char&);
+  extern template istream& operator>>(istream&, signed char&);
+  extern template istream& operator>>(istream&, unsigned char*);
+  extern template istream& operator>>(istream&, signed char*);
+
+  extern template class basic_istream;
+  extern template wistream& ws(wistream&);
+  extern template wistream& operator>>(wistream&, wchar_t&);
+  extern template wistream& operator>>(wistream&, wchar_t*);
+} // namespace std
diff --git a/contrib/libstdc++/include/bits/locale_facets.h b/contrib/libstdc++/include/bits/locale_facets.h
new file mode 100644
index 0000000..d63eb5d
--- /dev/null
+++ b/contrib/libstdc++/include/bits/locale_facets.h
@@ -0,0 +1,1813 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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
+//
+
+/** @file locale_facets.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_LOCFACETS_H
+#define _CPP_BITS_LOCFACETS_H	1
+
+#pragma GCC system_header
+
+#include 	// For struct tm
+#include 	// For wctype_t
+#include 		// For ios_base
+
+namespace std
+{
+  // NB: Don't instantiate required wchar_t facets if no wchar_t support.
+#ifdef _GLIBCPP_USE_WCHAR_T
+# define  _GLIBCPP_NUM_FACETS 28
+#else
+# define  _GLIBCPP_NUM_FACETS 14
+#endif
+
+  // 22.2.1.1  Template class ctype
+  // Include host and configuration specific ctype enums for ctype_base.
+  #include 
+
+  // Common base for ctype<_CharT>.  
+  template
+    class __ctype_abstract_base : public locale::facet, public ctype_base
+    {
+    public:
+      // Types:
+      typedef _CharT char_type;
+
+      bool 
+      is(mask __m, char_type __c) const
+      { return this->do_is(__m, __c); }
+
+      const char_type*
+      is(const char_type *__lo, const char_type *__hi, mask *__vec) const   
+      { return this->do_is(__lo, __hi, __vec); }
+
+      const char_type*
+      scan_is(mask __m, const char_type* __lo, const char_type* __hi) const
+      { return this->do_scan_is(__m, __lo, __hi); }
+
+      const char_type*
+      scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+      { return this->do_scan_not(__m, __lo, __hi); }
+
+      char_type 
+      toupper(char_type __c) const
+      { return this->do_toupper(__c); }
+
+      const char_type*
+      toupper(char_type *__lo, const char_type* __hi) const
+      { return this->do_toupper(__lo, __hi); }
+
+      char_type 
+      tolower(char_type __c) const
+      { return this->do_tolower(__c); }
+
+      const char_type*
+      tolower(char_type* __lo, const char_type* __hi) const
+      { return this->do_tolower(__lo, __hi); }
+
+      char_type 
+      widen(char __c) const
+      { return this->do_widen(__c); }
+
+      const char*
+      widen(const char* __lo, const char* __hi, char_type* __to) const
+      { return this->do_widen(__lo, __hi, __to); }
+
+      char 
+      narrow(char_type __c, char __dfault) const
+      { return this->do_narrow(__c, __dfault); }
+
+      const char_type*
+      narrow(const char_type* __lo, const char_type* __hi,
+	      char __dfault, char *__to) const
+      { return this->do_narrow(__lo, __hi, __dfault, __to); }
+
+    protected:
+      explicit 
+      __ctype_abstract_base(size_t __refs = 0): locale::facet(__refs) { }
+
+      virtual 
+      ~__ctype_abstract_base() { }
+      
+      virtual bool 
+      do_is(mask __m, char_type __c) const = 0;
+
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi, 
+	    mask* __vec) const = 0;
+
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo,
+		 const char_type* __hi) const = 0;
+
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo, 
+		  const char_type* __hi) const = 0;
+
+      virtual char_type 
+      do_toupper(char_type) const = 0;
+
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const = 0;
+
+      virtual char_type 
+      do_tolower(char_type) const = 0;
+
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const = 0;
+      
+      virtual char_type 
+      do_widen(char) const = 0;
+
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, 
+	       char_type* __dest) const = 0;
+
+      virtual char 
+      do_narrow(char_type, char __dfault) const = 0;
+
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		 char __dfault, char* __dest) const = 0;
+    };
+
+  // NB: Generic, mostly useless implementation.
+  template
+    class ctype : public __ctype_abstract_base<_CharT>
+    {
+    public:
+      // Types:
+      typedef _CharT 		  	char_type;
+      typedef typename ctype::mask 	mask;
+
+      static locale::id 	       	id;
+
+      explicit 
+      ctype(size_t __refs = 0) : __ctype_abstract_base<_CharT>(__refs) { }
+
+   protected:
+      virtual 
+      ~ctype();
+
+      virtual bool 
+      do_is(mask __m, char_type __c) const;
+
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo,
+		  const char_type* __hi) const;
+
+      virtual char_type 
+      do_toupper(char_type __c) const;
+
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const;
+
+      virtual char_type 
+      do_tolower(char_type __c) const;
+
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const;
+
+      virtual char_type 
+      do_widen(char __c) const;
+
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+      virtual char 
+      do_narrow(char_type, char __dfault) const;
+
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char __dfault, char* __dest) const;
+    };
+
+  template
+    locale::id ctype<_CharT>::id;
+
+  // 22.2.1.3  ctype specialization.
+  template<>
+    class ctype : public __ctype_abstract_base
+    {
+    public:
+      // Types:
+      typedef char 	       	char_type;
+
+    protected:
+      // Data Members:
+      __c_locale		_M_c_locale_ctype;
+      bool 		       	_M_del;
+      __to_type 	       	_M_toupper;
+      __to_type  	       	_M_tolower;
+      const mask*              	_M_table;
+      
+    public:
+      static locale::id        id;
+      static const size_t      table_size = 1 + static_cast(-1);
+
+      explicit 
+      ctype(const mask* __table = 0, bool __del = false, size_t __refs = 0);
+
+      explicit 
+      ctype(__c_locale __cloc, const mask* __table = 0, bool __del = false, 
+	    size_t __refs = 0);
+
+      inline bool 
+      is(mask __m, char __c) const;
+ 
+      inline const char*
+      is(const char* __lo, const char* __hi, mask* __vec) const;
+ 
+      inline const char*
+      scan_is(mask __m, const char* __lo, const char* __hi) const;
+
+      inline const char*
+      scan_not(mask __m, const char* __lo, const char* __hi) const;
+     
+    protected:
+      const mask* 
+      table() const throw()
+      { return _M_table; }
+
+      static const mask* 
+      classic_table() throw();
+
+      virtual 
+      ~ctype();
+
+      virtual bool 
+      do_is(mask __m, char_type __c) const;
+
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo, 
+		  const char_type* __hi) const;
+
+      virtual char_type 
+      do_toupper(char_type) const;
+
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const;
+
+      virtual char_type 
+      do_tolower(char_type) const;
+
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const;
+      
+      virtual char_type 
+      do_widen(char) const;
+
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+      virtual char 
+      do_narrow(char_type, char __dfault) const;
+
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char __dfault, char* __dest) const;
+    };
+ 
+  template<>
+    const ctype&
+    use_facet >(const locale& __loc);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  // 22.2.1.3  ctype specialization
+  template<>
+    class ctype : public __ctype_abstract_base
+    {
+    public:
+      // Types:
+      typedef wchar_t 	       	char_type;
+      typedef wctype_t	       	__wmask_type;
+
+    protected:
+      __c_locale		_M_c_locale_ctype;
+
+    public:
+      // Data Members:
+      static locale::id        	id;
+
+      explicit 
+      ctype(size_t __refs = 0);
+
+      explicit 
+      ctype(__c_locale __cloc, size_t __refs = 0);
+
+    protected:
+      __wmask_type
+      _M_convert_to_wmask(const mask __m) const;
+
+      virtual 
+      ~ctype();
+
+      virtual bool 
+      do_is(mask __m, char_type __c) const;
+
+      virtual const char_type*
+      do_is(const char_type* __lo, const char_type* __hi, mask* __vec) const;
+
+      virtual const char_type*
+      do_scan_is(mask __m, const char_type* __lo, const char_type* __hi) const;
+
+      virtual const char_type*
+      do_scan_not(mask __m, const char_type* __lo, 
+		  const char_type* __hi) const;
+
+      virtual char_type 
+      do_toupper(char_type) const;
+
+      virtual const char_type*
+      do_toupper(char_type* __lo, const char_type* __hi) const;
+
+      virtual char_type 
+      do_tolower(char_type) const;
+
+      virtual const char_type*
+      do_tolower(char_type* __lo, const char_type* __hi) const;
+      
+      virtual char_type 
+      do_widen(char) const;
+
+      virtual const char*
+      do_widen(const char* __lo, const char* __hi, char_type* __dest) const;
+
+      virtual char 
+      do_narrow(char_type, char __dfault) const;
+
+      virtual const char_type*
+      do_narrow(const char_type* __lo, const char_type* __hi,
+		char __dfault, char* __dest) const;
+
+    };
+
+  template<>
+    const ctype&
+    use_facet >(const locale& __loc);
+#endif //_GLIBCPP_USE_WCHAR_T
+
+  // Include host and configuration specific ctype inlines.
+  #include 
+
+  // 22.2.1.2  Template class ctype_byname
+  template
+    class ctype_byname : public ctype<_CharT>
+    {
+    public:
+      typedef _CharT 		char_type;
+
+      explicit 
+      ctype_byname(const char* __s, size_t __refs = 0);
+
+    protected:
+      virtual 
+      ~ctype_byname() { };
+    };
+
+  // 22.2.1.4  Class ctype_byname specializations.
+  template<>
+    ctype_byname::ctype_byname(const char*, size_t refs);
+
+  template<>
+    ctype_byname::ctype_byname(const char*, size_t refs);
+
+  // 22.2.1.5  Template class codecvt
+  #include 
+
+
+  // 22.2.2  The numeric category.
+  class __num_base 
+  {
+  protected:
+    // String literal of acceptable (narrow) input, for num_get.
+    // "0123456789eEabcdfABCDF"
+    static const char _S_atoms[];
+
+    enum 
+    {  
+      _M_zero,
+      _M_e = _M_zero + 10,
+      _M_E = _M_zero + 11,
+      _M_size = 21 + 1
+    };
+
+    // num_put
+    // Construct and return valid scanf format for floating point types.
+    static bool
+    _S_format_float(const ios_base& __io, char* __fptr, char __mod, 
+		    streamsize __prec);
+    
+    // Construct and return valid scanf format for integer types.
+    static void
+    _S_format_int(const ios_base& __io, char* __fptr, char __mod, char __modl);
+  };
+
+
+  template
+    class numpunct : public locale::facet
+    {
+    public:
+      // Types:
+      typedef _CharT          		char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+      static locale::id 		id;
+
+    private:
+      char_type 			_M_decimal_point;
+      char_type 			_M_thousands_sep;
+      const char* 			_M_grouping;
+      const char_type* 			_M_truename;
+      const char_type*			_M_falsename;
+
+    public:
+      explicit 
+      numpunct(size_t __refs = 0) : locale::facet(__refs) 
+      { _M_initialize_numpunct(); }
+
+      explicit 
+      numpunct(__c_locale __cloc, size_t __refs = 0) : locale::facet(__refs) 
+      { _M_initialize_numpunct(__cloc); }
+
+      char_type    
+      decimal_point() const
+      { return this->do_decimal_point(); }
+
+      char_type    
+      thousands_sep() const
+      { return this->do_thousands_sep(); }
+
+      string       
+      grouping() const
+      { return this->do_grouping(); }
+
+      string_type  
+      truename() const
+      { return this->do_truename(); }
+
+      string_type  
+      falsename() const
+      { return this->do_falsename(); }
+
+    protected:
+      virtual 
+      ~numpunct();
+
+      virtual char_type    
+      do_decimal_point() const
+      { return _M_decimal_point; }
+
+      virtual char_type    
+      do_thousands_sep() const
+      { return _M_thousands_sep; }
+
+      virtual string
+      do_grouping() const
+      { return _M_grouping; }
+
+      virtual string_type  
+      do_truename() const
+      { return _M_truename; }
+
+      virtual string_type  
+      do_falsename() const
+      { return _M_falsename; }
+
+      // For use at construction time only.
+      void 
+      _M_initialize_numpunct(__c_locale __cloc = _S_c_locale);
+    };
+
+  template
+    locale::id numpunct<_CharT>::id;
+
+  template<> 
+    numpunct::~numpunct();
+
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale __cloc);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    numpunct::~numpunct();
+
+  template<> 
+    void
+    numpunct::_M_initialize_numpunct(__c_locale __cloc);
+#endif
+
+  template
+    class numpunct_byname : public numpunct<_CharT>
+    {
+      // Data Member.
+      __c_locale			_M_c_locale_numpunct;
+
+    public:
+      typedef _CharT               	char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+      explicit 
+      numpunct_byname(const char* __s, size_t __refs = 0)
+      : numpunct<_CharT>(__refs)
+      {
+	_S_create_c_locale(_M_c_locale_numpunct, __s);
+	_M_initialize_numpunct(_M_c_locale_numpunct);	
+      }
+
+    protected:
+      virtual 
+      ~numpunct_byname() 
+      { _S_destroy_c_locale(_M_c_locale_numpunct); }
+    };
+
+  template
+    class num_get : public locale::facet, public __num_base
+    {
+    public:
+      // Types:
+      typedef _CharT   			char_type;
+      typedef _InIter  			iter_type;
+
+      static locale::id 		id;
+
+      explicit 
+      num_get(size_t __refs = 0) : locale::facet(__refs) { }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, bool& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type
+      get(iter_type __in, iter_type __end, ios_base& __io, 
+	  ios_base::iostate& __err, long& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned short& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned int& __v)   const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned long& __v)  const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, long long& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, unsigned long long& __v)  const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+#endif
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, float& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, double& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, long double& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }
+
+      iter_type 
+      get(iter_type __in, iter_type __end, ios_base& __io,
+	  ios_base::iostate& __err, void*& __v) const
+      { return this->do_get(__in, __end, __io, __err, __v); }      
+
+    protected:
+      virtual ~num_get() { }
+
+      iter_type 
+      _M_extract_float(iter_type, iter_type, ios_base&, ios_base::iostate&, 
+		       string& __xtrc) const;
+
+      iter_type 
+      _M_extract_int(iter_type, iter_type, ios_base&, ios_base::iostate&, 
+		     string& __xtrc, int& __base) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, bool&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate&, long&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	      unsigned short&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     unsigned int&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     unsigned long&) const;
+
+#ifdef _GLIBCPP_USE_LONG_LONG 
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     long long&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     unsigned long long&) const;
+#endif
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     float&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     double&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     long double&) const;
+
+      virtual iter_type 
+      do_get(iter_type, iter_type, ios_base&, ios_base::iostate& __err, 
+	     void*&) const;
+    };
+
+  template
+    locale::id num_get<_CharT, _InIter>::id;
+
+  template
+    class num_put : public locale::facet, public __num_base
+    {
+    public:
+      // Types:
+      typedef _CharT       	char_type;
+      typedef _OutIter     	iter_type;
+
+      static locale::id		id;
+
+      explicit 
+      num_put(size_t __refs = 0) : locale::facet(__refs) { }
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, bool __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, 
+	  unsigned long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+#ifdef _GLIBCPP_USE_LONG_LONG 
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, long long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, 
+	  unsigned long long __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+#endif
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, double __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, 
+	  long double __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+      iter_type 
+      put(iter_type __s, ios_base& __f, char_type __fill, 
+	  const void* __v) const
+      { return this->do_put(__s, __f, __fill, __v); }
+
+    protected:
+      template
+        iter_type
+        _M_convert_float(iter_type, ios_base& __io, char_type __fill, 
+			 char __mod, _ValueT __v) const;
+
+      template
+        iter_type
+        _M_convert_int(iter_type, ios_base& __io, char_type __fill, 
+		       char __mod, char __modl, _ValueT __v) const;
+
+      iter_type
+      _M_widen_float(iter_type, ios_base& __io, char_type __fill, char* __cs, 
+		     int __len) const;
+
+      iter_type
+      _M_widen_int(iter_type, ios_base& __io, char_type __fill, char* __cs, 
+		   int __len) const;
+
+      iter_type
+      _M_insert(iter_type, ios_base& __io, char_type __fill, 
+		const char_type* __ws, int __len) const;
+
+      virtual 
+      ~num_put() { };
+
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, bool __v) const;
+
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, long __v) const;
+
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, unsigned long) const;
+
+#ifdef _GLIBCPP_USE_LONG_LONG 
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, long long __v) const;
+
+      virtual iter_type
+      do_put(iter_type, ios_base&, char_type __fill, unsigned long long) const;
+#endif
+
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, double __v) const;
+
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, long double __v) const;
+
+      virtual iter_type 
+      do_put(iter_type, ios_base&, char_type __fill, const void* __v) const;
+    };
+
+  template 
+    locale::id num_put<_CharT, _OutIter>::id;
+
+
+  template
+    class collate : public locale::facet
+    {
+    public:
+      // Types:
+      typedef _CharT               	char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+    protected:
+      // Underlying "C" library locale information saved from
+      // initialization, needed by collate_byname as well.
+      __c_locale			_M_c_locale_collate;
+ 
+    public:
+      static locale::id 		id;
+
+      explicit 
+      collate(size_t __refs = 0)
+      : locale::facet(__refs)
+      { _M_c_locale_collate = _S_c_locale; }
+
+      // Non-standard.
+      explicit 
+      collate(__c_locale __cloc, size_t __refs = 0) 
+      : locale::facet(__refs)
+      { _M_c_locale_collate = _S_clone_c_locale(__cloc); }
+
+      int 
+      compare(const _CharT* __lo1, const _CharT* __hi1,
+	      const _CharT* __lo2, const _CharT* __hi2) const
+      { return this->do_compare(__lo1, __hi1, __lo2, __hi2); }
+
+      string_type 
+      transform(const _CharT* __lo, const _CharT* __hi) const
+      { return this->do_transform(__lo, __hi); }
+
+      long 
+      hash(const _CharT* __lo, const _CharT* __hi) const
+      { return this->do_hash(__lo, __hi); }
+      
+      // Used to abstract out _CharT bits in virtual member functions, below.
+      int
+      _M_compare(const _CharT*, const _CharT*) const;
+
+      size_t
+      _M_transform(_CharT*, const _CharT*, size_t) const;
+
+  protected:
+      virtual
+      ~collate() 
+      {
+	if (_M_c_locale_collate != _S_c_locale)
+	  _S_destroy_c_locale(_M_c_locale_collate); 
+      }
+
+      virtual int  
+      do_compare(const _CharT* __lo1, const _CharT* __hi1,
+		 const _CharT* __lo2, const _CharT* __hi2) const;
+
+      virtual string_type 
+      do_transform(const _CharT* __lo, const _CharT* __hi) const;
+
+      virtual long   
+      do_hash(const _CharT* __lo, const _CharT* __hi) const;
+    };
+
+  template
+    locale::id collate<_CharT>::id;
+
+  // Specializations.
+  template<>
+    int 
+    collate::_M_compare(const char*, const char*) const;
+
+  template<>
+    size_t
+    collate::_M_transform(char*, const char*, size_t) const;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    int 
+    collate::_M_compare(const wchar_t*, const wchar_t*) const;
+
+  template<>
+    size_t
+    collate::_M_transform(wchar_t*, const wchar_t*, size_t) const;
+#endif
+
+  template
+    class collate_byname : public collate<_CharT>
+    {
+    public:
+      typedef _CharT               char_type;
+      typedef basic_string<_CharT> string_type;
+
+      explicit 
+      collate_byname(const char* __s, size_t __refs = 0)
+      : collate<_CharT>(__refs) 
+      { 
+	if (_M_c_locale_collate != _S_c_locale)
+	  _S_destroy_c_locale(_M_c_locale_collate);
+	_S_create_c_locale(_M_c_locale_collate, __s); 
+      }
+
+    protected:
+      virtual   
+      ~collate_byname() { }
+    };
+
+
+  class time_base
+  {
+  public:
+    enum dateorder { no_order, dmy, mdy, ymd, ydm };
+  };
+
+  template
+    class __timepunct : public locale::facet
+    {
+    public:
+      // Types:
+      typedef _CharT          		__char_type;
+      typedef basic_string<_CharT> 	__string_type;
+
+      static locale::id 		id;
+
+      // List of all known timezones, with GMT first.
+      static const _CharT* 		_S_timezones[14];
+
+    protected:
+      __c_locale			_M_c_locale_timepunct;
+      const char*			_M_name_timepunct;
+      const _CharT* 			_M_date_format;
+      const _CharT* 			_M_date_era_format;
+      const _CharT* 			_M_time_format;
+      const _CharT* 			_M_time_era_format;
+      const _CharT*			_M_date_time_format;
+      const _CharT*			_M_date_time_era_format;
+      const _CharT* 			_M_am;
+      const _CharT* 			_M_pm;
+      const _CharT*			_M_am_pm_format;
+
+      // Day names, starting with "C"'s Sunday.
+      const _CharT*  			_M_day1;
+      const _CharT*  			_M_day2;
+      const _CharT*  			_M_day3;
+      const _CharT*  			_M_day4;
+      const _CharT*  			_M_day5;
+      const _CharT*  			_M_day6;
+      const _CharT*  			_M_day7;
+
+      // Abbreviated day names, starting with "C"'s Sun.
+      const _CharT*  			_M_day_a1;
+      const _CharT*  			_M_day_a2;
+      const _CharT*  			_M_day_a3;
+      const _CharT*  			_M_day_a4;
+      const _CharT*  			_M_day_a5;
+      const _CharT*  			_M_day_a6;
+      const _CharT*  			_M_day_a7;
+
+      // Month names, starting with "C"'s January.
+      const _CharT*  			_M_month01;
+      const _CharT*  			_M_month02;
+      const _CharT*  			_M_month03;
+      const _CharT*  			_M_month04;
+      const _CharT*  			_M_month05;
+      const _CharT*  			_M_month06;
+      const _CharT*  			_M_month07;
+      const _CharT*  			_M_month08;
+      const _CharT*  			_M_month09;
+      const _CharT*  			_M_month10;
+      const _CharT*  			_M_month11;
+      const _CharT*  			_M_month12;
+
+      // Abbreviated month names, starting with "C"'s Jan.
+      const _CharT*  			_M_month_a01;
+      const _CharT*  			_M_month_a02;
+      const _CharT*  			_M_month_a03;
+      const _CharT*  			_M_month_a04;
+      const _CharT*  			_M_month_a05;
+      const _CharT*  			_M_month_a06;
+      const _CharT*  			_M_month_a07;
+      const _CharT*  			_M_month_a08;
+      const _CharT*  			_M_month_a09;
+      const _CharT*  			_M_month_a10;
+      const _CharT*  			_M_month_a11;
+      const _CharT*  			_M_month_a12;
+
+    public:
+      explicit 
+      __timepunct(size_t __refs = 0) 
+      : locale::facet(__refs), _M_name_timepunct("C")
+      { _M_initialize_timepunct(); }
+
+      explicit 
+      __timepunct(__c_locale __cloc, const char* __s, size_t __refs = 0) 
+      : locale::facet(__refs), _M_name_timepunct(__s)
+      { _M_initialize_timepunct(__cloc); }
+
+      void
+      _M_put(_CharT* __s, size_t __maxlen, const _CharT* __format, 
+	     const tm* __tm) const;
+
+      void
+      _M_date_formats(const _CharT** __date) const
+      {
+	// Always have default first.
+	__date[0] = _M_date_format;
+	__date[1] = _M_date_era_format;	
+      }
+
+      void
+      _M_time_formats(const _CharT** __time) const
+      {
+	// Always have default first.
+	__time[0] = _M_time_format;
+	__time[1] = _M_time_era_format;	
+      }
+
+      void
+      _M_ampm(const _CharT** __ampm) const
+      { 
+	__ampm[0] = _M_am;
+	__ampm[1] = _M_pm;
+      }      
+
+      void
+      _M_date_time_formats(const _CharT** __dt) const
+      {
+	// Always have default first.
+	__dt[0] = _M_date_time_format;
+	__dt[1] = _M_date_time_era_format;	
+      }
+
+      void
+      _M_days(const _CharT** __days) const
+      { 
+	__days[0] = _M_day1;
+	__days[1] = _M_day2;
+	__days[2] = _M_day3;
+	__days[3] = _M_day4;
+	__days[4] = _M_day5;
+	__days[5] = _M_day6;
+	__days[6] = _M_day7;
+      }
+
+      void
+      _M_days_abbreviated(const _CharT** __days) const
+      { 
+	__days[0] = _M_day_a1;
+	__days[1] = _M_day_a2;
+	__days[2] = _M_day_a3;
+	__days[3] = _M_day_a4;
+	__days[4] = _M_day_a5;
+	__days[5] = _M_day_a6;
+	__days[6] = _M_day_a7;
+      }
+
+      void
+      _M_months(const _CharT** __months) const
+      { 
+	__months[0] = _M_month01;
+	__months[1] = _M_month02;
+	__months[2] = _M_month03;
+	__months[3] = _M_month04;
+	__months[4] = _M_month05;
+	__months[5] = _M_month06;
+	__months[6] = _M_month07;
+	__months[7] = _M_month08;
+	__months[8] = _M_month09;
+	__months[9] = _M_month10;
+	__months[10] = _M_month11;
+	__months[11] = _M_month12;
+      }
+
+      void
+      _M_months_abbreviated(const _CharT** __months) const
+      { 
+	__months[0] = _M_month_a01;
+	__months[1] = _M_month_a02;
+	__months[2] = _M_month_a03;
+	__months[3] = _M_month_a04;
+	__months[4] = _M_month_a05;
+	__months[5] = _M_month_a06;
+	__months[6] = _M_month_a07;
+	__months[7] = _M_month_a08;
+	__months[8] = _M_month_a09;
+	__months[9] = _M_month_a10;
+	__months[10] = _M_month_a11;
+	__months[11] = _M_month_a12;
+      }
+
+    protected:
+      virtual 
+      ~__timepunct();
+
+      // For use at construction time only.
+      void 
+      _M_initialize_timepunct(__c_locale __cloc = _S_c_locale);
+    };
+
+  template
+    locale::id __timepunct<_CharT>::id;
+
+  // Specializations.
+  template<>
+    __timepunct::~__timepunct();
+
+  template<> 
+    const char*
+    __timepunct::_S_timezones[14];
+
+  template<> 
+    void
+    __timepunct::_M_initialize_timepunct(__c_locale __cloc);
+
+  template<>
+    void
+    __timepunct::_M_put(char*, size_t, const char*, const tm*) const;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    __timepunct::~__timepunct();
+
+  template<> 
+    const wchar_t*
+    __timepunct::_S_timezones[14];
+
+  template<> 
+    void
+    __timepunct::_M_initialize_timepunct(__c_locale __cloc);
+
+  template<>
+    void
+    __timepunct::_M_put(wchar_t*, size_t, const wchar_t*, 
+				 const tm*) const;
+#endif
+
+  // Generic.
+  template
+    const _CharT* __timepunct<_CharT>::_S_timezones[14];
+
+
+  template
+    class time_get : public locale::facet, public time_base
+    {
+    public:
+      // Types:
+      typedef _CharT     		char_type;
+      typedef _InIter    		iter_type;
+      typedef basic_string<_CharT> 	__string_type;
+
+      static locale::id 		id;
+
+      explicit 
+      time_get(size_t __refs = 0) 
+      : locale::facet (__refs) { }
+
+      dateorder 
+      date_order()  const
+      { return this->do_date_order(); }
+
+      iter_type 
+      get_time(iter_type __beg, iter_type __end, ios_base& __io, 
+	       ios_base::iostate& __err, tm* __tm)  const
+      { return this->do_get_time(__beg, __end, __io, __err, __tm); }
+
+      iter_type 
+      get_date(iter_type __beg, iter_type __end, ios_base& __io,
+	       ios_base::iostate& __err, tm* __tm)  const
+      { return this->do_get_date(__beg, __end, __io, __err, __tm); }
+
+      iter_type 
+      get_weekday(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const
+      { return this->do_get_weekday(__beg, __end, __io, __err, __tm); }
+
+      iter_type 
+      get_monthname(iter_type __beg, iter_type __end, ios_base& __io, 
+		    ios_base::iostate& __err, tm* __tm) const
+      { return this->do_get_monthname(__beg, __end, __io, __err, __tm); }
+
+      iter_type 
+      get_year(iter_type __beg, iter_type __end, ios_base& __io,
+	       ios_base::iostate& __err, tm* __tm) const
+      { return this->do_get_year(__beg, __end, __io, __err, __tm); }
+
+    protected:
+      virtual 
+      ~time_get() { }
+
+      virtual dateorder 
+      do_date_order() const;
+
+      virtual iter_type 
+      do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const;
+
+      virtual iter_type 
+      do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const;
+
+      virtual iter_type 
+      do_get_weekday(iter_type __beg, iter_type __end, ios_base&,
+		     ios_base::iostate& __err, tm* __tm) const;
+
+      virtual iter_type 
+      do_get_monthname(iter_type __beg, iter_type __end, ios_base&, 
+		       ios_base::iostate& __err, tm* __tm) const;
+
+      virtual iter_type 
+      do_get_year(iter_type __beg, iter_type __end, ios_base& __io,
+		  ios_base::iostate& __err, tm* __tm) const;
+
+      // Extract numeric component of length __len.
+      void
+      _M_extract_num(iter_type& __beg, iter_type& __end, int& __member,
+		     int __min, int __max, size_t __len,
+		     const ctype<_CharT>& __ctype, 
+		     ios_base::iostate& __err) const;
+      
+      // Extract day or month name, or any unique array of string
+      // literals in a const _CharT* array.
+      void
+      _M_extract_name(iter_type& __beg, iter_type& __end, int& __member,
+		      const _CharT** __names, size_t __indexlen, 
+		      ios_base::iostate& __err) const;
+
+      // Extract on a component-by-component basis, via __format argument.
+      void
+      _M_extract_via_format(iter_type& __beg, iter_type& __end, ios_base& __io,
+			    ios_base::iostate& __err, tm* __tm, 
+			    const _CharT* __format) const;
+    };
+
+  template
+    locale::id time_get<_CharT, _InIter>::id;
+
+  template
+    class time_get_byname : public time_get<_CharT, _InIter>
+    {
+    public:
+      // Types:
+      typedef _CharT     		char_type;
+      typedef _InIter    		iter_type;
+
+      explicit 
+      time_get_byname(const char*, size_t __refs = 0) 
+      : time_get<_CharT, _InIter>(__refs) { }
+
+    protected:
+      virtual 
+      ~time_get_byname() { }
+    };
+
+  template
+    class time_put : public locale::facet, public time_base
+    {
+    public:
+      // Types:
+      typedef _CharT     		char_type;
+      typedef _OutIter   		iter_type;
+
+      static locale::id 	     	id;
+
+      explicit 
+      time_put(size_t __refs = 0) 
+      : locale::facet(__refs) { }
+
+      iter_type 
+      put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 
+	  const _CharT* __beg, const _CharT* __end) const;
+
+      iter_type 
+      put(iter_type __s, ios_base& __io, char_type __fill,
+	  const tm* __tm, char __format, char __mod = 0) const
+      { return this->do_put(__s, __io, __fill, __tm, __format, __mod); }
+
+    protected:
+      virtual 
+      ~time_put()
+      { }
+
+      virtual iter_type 
+      do_put(iter_type __s, ios_base& __io, char_type __fill, const tm* __tm, 
+	     char __format, char __mod) const;
+    };
+
+  template
+    locale::id time_put<_CharT, _OutIter>::id;
+
+  template
+    class time_put_byname : public time_put<_CharT, _OutIter>
+    {
+    public:
+      // Types:
+      typedef _CharT     		char_type;
+      typedef _OutIter   		iter_type;
+
+      explicit 
+      time_put_byname(const char* /*__s*/, size_t __refs = 0) 
+      : time_put<_CharT, _OutIter>(__refs) 
+      { };
+
+    protected:
+      virtual 
+      ~time_put_byname() { }
+    };
+
+
+  class money_base
+  {
+  public:
+    enum part { none, space, symbol, sign, value };
+    struct pattern { char field[4]; };
+
+    static const pattern _S_default_pattern;
+
+    // Construct and return valid pattern consisting of some combination of:
+    // space none symbol sign value
+    static pattern 
+    _S_construct_pattern(char __precedes, char __space, char __posn);
+  };
+
+  template
+    class moneypunct : public locale::facet, public money_base
+    {
+    public:
+      // Types:
+      typedef _CharT 			char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+      static const bool 		intl = _Intl;
+      static locale::id 		id;
+
+    private:
+      const char* 			_M_grouping;
+      char_type 			_M_decimal_point;
+      char_type 			_M_thousands_sep;
+      const char_type* 			_M_curr_symbol;
+      const char_type*			_M_positive_sign;
+      const char_type*			_M_negative_sign;
+      int 				_M_frac_digits;
+      pattern 				_M_pos_format;
+      pattern 				_M_neg_format;
+
+    public:
+      explicit 
+      moneypunct(size_t __refs = 0) : locale::facet(__refs)
+      { _M_initialize_moneypunct(); }
+
+      explicit 
+      moneypunct(__c_locale __cloc, size_t __refs = 0) : locale::facet(__refs)
+      { _M_initialize_moneypunct(__cloc); }
+
+      char_type
+      decimal_point() const
+      { return this->do_decimal_point(); }
+      
+      char_type
+      thousands_sep() const
+      { return this->do_thousands_sep(); }
+      
+      string 
+      grouping() const
+      { return this->do_grouping(); }
+
+      string_type  
+      curr_symbol() const
+      { return this->do_curr_symbol(); }
+
+      string_type  
+      positive_sign() const
+      { return this->do_positive_sign(); }
+
+      string_type  
+      negative_sign() const
+      { return this->do_negative_sign(); }
+
+      int          
+      frac_digits() const
+      { return this->do_frac_digits(); }
+
+      pattern      
+      pos_format() const
+      { return this->do_pos_format(); }
+
+      pattern      
+      neg_format() const
+      { return this->do_neg_format(); }
+
+    protected:
+      virtual 
+      ~moneypunct();
+
+      virtual char_type
+      do_decimal_point() const
+      { return _M_decimal_point; }
+      
+      virtual char_type
+      do_thousands_sep() const
+      { return _M_thousands_sep; }
+      
+      virtual string 
+      do_grouping() const
+      { return _M_grouping; }
+
+      virtual string_type  
+      do_curr_symbol()   const
+      { return _M_curr_symbol; }
+
+      virtual string_type  
+      do_positive_sign() const
+      { return _M_positive_sign; }
+
+      virtual string_type  
+      do_negative_sign() const
+      { return _M_negative_sign; }
+
+      virtual int          
+      do_frac_digits() const
+      { return _M_frac_digits; }
+
+      virtual pattern      
+      do_pos_format() const
+      { return _M_pos_format; }
+
+      virtual pattern      
+      do_neg_format() const
+      { return _M_neg_format; }
+
+      // For use at construction time only.
+       void 
+       _M_initialize_moneypunct(__c_locale __cloc = _S_c_locale);
+    };
+
+  template
+    locale::id moneypunct<_CharT, _Intl>::id;
+
+  template
+    const bool moneypunct<_CharT, _Intl>::intl;
+
+  template<>
+    moneypunct::~moneypunct();
+
+  template<>
+    moneypunct::~moneypunct();
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc);
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    moneypunct::~moneypunct();
+
+  template<>
+    moneypunct::~moneypunct();
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc);
+
+  template<> 
+    void
+    moneypunct::_M_initialize_moneypunct(__c_locale __cloc);
+#endif
+
+  template
+    class moneypunct_byname : public moneypunct<_CharT, _Intl>
+    {
+      __c_locale			_M_c_locale_moneypunct;
+
+    public:
+      typedef _CharT 			char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+      static const bool intl = _Intl;
+
+      explicit 
+      moneypunct_byname(const char* __s, size_t __refs = 0)
+      : moneypunct<_CharT, _Intl>(__refs)
+      {
+	_S_create_c_locale(_M_c_locale_moneypunct, __s);
+	_M_initialize_moneypunct(_M_c_locale_moneypunct);	
+      }
+
+    protected:
+      virtual 
+      ~moneypunct_byname() 
+      { _S_destroy_c_locale(_M_c_locale_moneypunct); }
+    };
+
+  template
+    const bool moneypunct_byname<_CharT, _Intl>::intl;
+
+  template
+    class money_get : public locale::facet
+    {
+    public:
+      // Types:
+      typedef _CharT        		char_type;
+      typedef _InIter       		iter_type;
+      typedef basic_string<_CharT> 	string_type;
+
+      static locale::id 		id;
+
+      explicit 
+      money_get(size_t __refs = 0) : locale::facet(__refs) { }
+
+      iter_type 
+      get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 
+	  ios_base::iostate& __err, long double& __units) const
+      { return this->do_get(__s, __end, __intl, __io, __err, __units); }
+
+      iter_type 
+      get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 
+	  ios_base::iostate& __err, string_type& __digits) const
+      { return this->do_get(__s, __end, __intl, __io, __err, __digits); }
+
+    protected:
+      virtual 
+      ~money_get() { }
+
+      virtual iter_type 
+      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 
+	     ios_base::iostate& __err, long double& __units) const;
+
+      virtual iter_type 
+      do_get(iter_type __s, iter_type __end, bool __intl, ios_base& __io, 
+	     ios_base::iostate& __err, string_type& __digits) const;
+    };
+
+  template
+    locale::id money_get<_CharT, _InIter>::id;
+
+  template
+    class money_put : public locale::facet
+    {
+    public:
+      typedef _CharT              	char_type;
+      typedef _OutIter            	iter_type;
+      typedef basic_string<_CharT>	string_type;
+
+      static locale::id 		id;
+
+      explicit 
+      money_put(size_t __refs = 0) : locale::facet(__refs) { }
+
+      iter_type 
+      put(iter_type __s, bool __intl, ios_base& __io,
+	  char_type __fill, long double __units) const
+      { return this->do_put(__s, __intl, __io, __fill, __units); }
+
+      iter_type 
+      put(iter_type __s, bool __intl, ios_base& __io,
+	  char_type __fill, const string_type& __digits) const
+      { return this->do_put(__s, __intl, __io, __fill, __digits); }
+
+    protected:
+      virtual 
+      ~money_put() { }
+
+      virtual iter_type
+      do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     long double __units) const;
+
+      virtual iter_type
+      do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	     const string_type& __digits) const;
+    };
+
+  template
+    locale::id money_put<_CharT, _OutIter>::id;
+
+
+  struct messages_base
+  {
+    typedef int catalog;
+  };
+
+  template
+    class messages : public locale::facet, public messages_base
+    {
+    public:
+      // Types:
+      typedef _CharT 			char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+    protected:
+      // Underlying "C" library locale information saved from
+      // initialization, needed by messages_byname as well.
+      __c_locale			_M_c_locale_messages;
+#if 1
+      // Only needed if glibc < 2.3
+      const char*			_M_name_messages;
+#endif
+
+    public:
+      static locale::id 		id;
+
+      explicit 
+      messages(size_t __refs = 0) 
+      : locale::facet(__refs), _M_name_messages("C")
+      { _M_c_locale_messages = _S_c_locale; }
+
+      // Non-standard.
+      explicit 
+      messages(__c_locale __cloc, const char* __name, size_t __refs = 0) 
+      : locale::facet(__refs)
+      { 
+	_M_name_messages = __name;
+	_M_c_locale_messages = _S_clone_c_locale(__cloc); 
+      }
+
+      catalog 
+      open(const basic_string& __s, const locale& __loc) const
+      { return this->do_open(__s, __loc); }
+
+      // Non-standard and unorthodox, yet effective.
+      catalog 
+      open(const basic_string&, const locale&, const char*) const;
+
+      string_type  
+      get(catalog __c, int __set, int __msgid, const string_type& __s) const
+      { return this->do_get(__c, __set, __msgid, __s); }
+
+      void 
+      close(catalog __c) const
+      { return this->do_close(__c); }
+
+    protected:
+      virtual 
+      ~messages()
+       { 
+	 if (_M_c_locale_messages != _S_c_locale)
+	   _S_destroy_c_locale(_M_c_locale_messages); 
+       }
+
+      virtual catalog 
+      do_open(const basic_string&, const locale&) const;
+
+      virtual string_type  
+      do_get(catalog, int, int, const string_type& __dfault) const;
+
+      virtual void    
+      do_close(catalog) const;
+
+      // Returns a locale and codeset-converted string, given a char* message.
+      char*
+      _M_convert_to_char(const string_type& __msg) const
+      {
+	// XXX
+	return reinterpret_cast(const_cast<_CharT*>(__msg.c_str()));
+      }
+
+      // Returns a locale and codeset-converted string, given a char* message.
+      string_type
+      _M_convert_from_char(char* __msg) const
+      {
+	// Length of message string without terminating null.
+	size_t __len = char_traits::length(__msg) - 1;
+
+	// "everybody can easily convert the string using
+	// mbsrtowcs/wcsrtombs or with iconv()"
+#if 0
+	// Convert char* to _CharT in locale used to open catalog.
+	// XXX need additional template parameter on messages class for this..
+	// typedef typename codecvt __codecvt_type;
+	typedef typename codecvt __codecvt_type;      
+
+	__codecvt_type::state_type __state;
+	// XXX may need to initialize state.
+	//initialize_state(__state._M_init());
+	
+	char* __from_next;
+	// XXX what size for this string?
+	_CharT* __to = static_cast<_CharT*>(__builtin_alloca(__len + 1));
+	const __codecvt_type& __cvt = use_facet<__codecvt_type>(_M_locale_conv);
+	__cvt.out(__state, __msg, __msg + __len, __from_next,
+		  __to, __to + __len + 1, __to_next);
+	return string_type(__to);
+#endif
+#if 0
+	typedef ctype<_CharT> __ctype_type;
+	// const __ctype_type& __cvt = use_facet<__ctype_type>(_M_locale_msg);
+	const __ctype_type& __cvt = use_facet<__ctype_type>(locale());
+	// XXX Again, proper length of converted string an issue here.
+	// For now, assume the converted length is not larger.
+	_CharT* __dest = static_cast<_CharT*>(__builtin_alloca(__len + 1));
+	__cvt.widen(__msg, __msg + __len, __dest);
+	return basic_string<_CharT>(__dest);
+#endif
+	return string_type();
+      }
+     };
+
+  template
+    locale::id messages<_CharT>::id;
+
+  // Specializations for required instantiations.
+  template<>
+    string
+    messages::do_get(catalog, int, int, const string&) const;
+
+  // Include host and configuration specific messages virtual functions.
+  #include 
+
+  template
+    class messages_byname : public messages<_CharT>
+    {
+    public:
+      typedef _CharT               	char_type;
+      typedef basic_string<_CharT> 	string_type;
+
+      explicit 
+      messages_byname(const char* __s, size_t __refs = 0)
+      : messages<_CharT>(__refs) 
+      { 
+	_M_name_messages = __s;
+	if (_M_c_locale_messages != _S_c_locale)
+	  _S_destroy_c_locale(_M_c_locale_messages);
+	_S_create_c_locale(_M_c_locale_messages, __s); 
+      }
+
+    protected:
+      virtual 
+      ~messages_byname() 
+      { }
+    };
+
+
+  // Subclause convenience interfaces, inlines.
+  // NB: These are inline because, when used in a loop, some compilers
+  // can hoist the body out of the loop; then it's just as fast as the
+  // C is*() function.
+  template
+    inline bool 
+    isspace(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::space, __c); }
+
+  template
+    inline bool 
+    isprint(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::print, __c); }
+
+  template
+    inline bool 
+    iscntrl(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::cntrl, __c); }
+
+  template
+    inline bool 
+    isupper(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::upper, __c); }
+
+  template
+    inline bool islower(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::lower, __c); }
+
+  template
+    inline bool 
+    isalpha(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::alpha, __c); }
+
+  template
+    inline bool 
+    isdigit(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::digit, __c); }
+
+  template
+    inline bool 
+    ispunct(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::punct, __c); }
+
+  template
+    inline bool 
+    isxdigit(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::xdigit, __c); }
+
+  template
+    inline bool 
+    isalnum(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::alnum, __c); }
+
+  template
+    inline bool 
+    isgraph(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).is(ctype_base::graph, __c); }
+
+  template
+    inline _CharT 
+    toupper(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).toupper(__c); }
+
+  template
+    inline _CharT 
+    tolower(_CharT __c, const locale& __loc)
+    { return use_facet >(__loc).tolower(__c); }
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/locale_facets.tcc b/contrib/libstdc++/include/bits/locale_facets.tcc
new file mode 100644
index 0000000..d362c33
--- /dev/null
+++ b/contrib/libstdc++/include/bits/locale_facets.tcc
@@ -0,0 +1,2401 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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.
+
+// Warning: this file is not meant for user inclusion. Use .
+
+#ifndef _CPP_BITS_LOCFACETS_TCC
+#define _CPP_BITS_LOCFACETS_TCC 1
+
+#pragma GCC system_header
+
+#include 
+#include    // For localeconv
+#include    // For strof, strtold
+#include      // For ceil
+#include     // For isspace
+#include     // For numeric_limits
+#include 
+#include   // For bad_cast.
+
+namespace std
+{
+  template
+    locale
+    locale::combine(const locale& __other) const
+    {
+      _Impl* __tmp = new _Impl(*_M_impl, 1);
+      __tmp->_M_replace_facet(__other._M_impl, &_Facet::id);
+      return locale(__tmp);
+    }
+
+  template
+    bool
+    locale::operator()(const basic_string<_CharT, _Traits, _Alloc>& __s1,
+                       const basic_string<_CharT, _Traits, _Alloc>& __s2) const
+    {
+      typedef std::collate<_CharT> __collate_type;
+      const __collate_type& __collate = use_facet<__collate_type>(*this);
+      return (__collate.compare(__s1.data(), __s1.data() + __s1.length(),
+				__s2.data(), __s2.data() + __s2.length()) < 0);
+    }
+
+  template
+    const _Facet&
+    use_facet(const locale& __loc)
+    {
+      size_t __i = _Facet::id._M_id();
+      locale::facet** __facets = __loc._M_impl->_M_facets;
+      if (!(__i < __loc._M_impl->_M_facets_size && __facets[__i]))
+        __throw_bad_cast();
+      return static_cast(*__facets[__i]);
+    }
+
+  template
+    bool
+    has_facet(const locale& __loc) throw()
+    {
+      size_t __i = _Facet::id._M_id();
+      locale::facet** __facets = __loc._M_impl->_M_facets;
+      return (__i < __loc._M_impl->_M_facets_size && __facets[__i]);
+    }
+
+
+  // Stage 1: Determine a conversion specifier.
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    _M_extract_float(_InIter __beg, _InIter __end, ios_base& __io,
+		     ios_base::iostate& __err, string& __xtrc) const
+    {
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc);
+      const numpunct<_CharT>& __np = use_facet >(__loc);
+
+      // First check for sign.
+      const char_type __plus = __ctype.widen('+');
+      const char_type __minus = __ctype.widen('-');
+      int __pos = 0;
+      char_type  __c = *__beg;
+      if ((__c == __plus || __c == __minus) && __beg != __end)
+	{
+	  __xtrc += __ctype.narrow(__c, char());
+	  ++__pos;
+	  __c = *(++__beg);
+	}
+
+      // Next, strip leading zeros.
+      const char_type __zero = __ctype.widen(_S_atoms[_M_zero]);
+      bool __found_zero = false;
+      while (__c == __zero && __beg != __end)
+	{
+	  __c = *(++__beg);
+	  __found_zero = true;
+	}
+      if (__found_zero)
+	{
+	  __xtrc += _S_atoms[_M_zero];
+	  ++__pos;
+	}
+
+      // Only need acceptable digits for floating point numbers.
+      const size_t __len = _M_E - _M_zero + 1;
+      char_type  __watoms[__len];
+      __ctype.widen(_S_atoms, _S_atoms + __len, __watoms);
+      bool __found_dec = false;
+      bool __found_sci = false;
+      const char_type __dec = __np.decimal_point();
+
+      string __found_grouping;
+      const string __grouping = __np.grouping();
+      bool __check_grouping = __grouping.size();
+      int __sep_pos = 0;
+      const char_type __sep = __np.thousands_sep();
+
+      while (__beg != __end)
+        {
+	  // Only look in digits.
+	  typedef char_traits<_CharT> 	__traits_type;
+          const char_type* __p = __traits_type::find(__watoms, 10,  __c);
+
+          // NB: strchr returns true for __c == 0x0
+          if (__p && __c)
+	    {
+	      // Try first for acceptable digit; record it if found.
+	      ++__pos;
+	      __xtrc += _S_atoms[__p - __watoms];
+	      ++__sep_pos;
+	      __c = *(++__beg);
+	    }
+          else if (__c == __sep && __check_grouping && !__found_dec)
+	    {
+              // NB: Thousands separator at the beginning of a string
+              // is a no-no, as is two consecutive thousands separators.
+              if (__sep_pos)
+                {
+                  __found_grouping += static_cast(__sep_pos);
+                  __sep_pos = 0;
+		  __c = *(++__beg);
+                }
+              else
+		{
+		  __err |= ios_base::failbit;
+		  break;
+		}
+            }
+	  else if (__c == __dec && !__found_dec)
+	    {
+	      // According to the standard, if no grouping chars are seen,
+	      // no grouping check is applied. Therefore __found_grouping
+	      // must be adjusted only if __dec comes after some __sep.
+	      if (__found_grouping.size())
+		__found_grouping += static_cast(__sep_pos);
+	      ++__pos;
+	      __xtrc += '.';
+	      __c = *(++__beg);
+	      __found_dec = true;
+	    }
+	  else if ((__c == __watoms[_M_e] || __c == __watoms[_M_E]) 
+		   && !__found_sci && __pos)
+	    {
+	      // Scientific notation.
+	      ++__pos;
+	      __xtrc += __ctype.narrow(__c, char());
+	      __c = *(++__beg);
+
+	      // Remove optional plus or minus sign, if they exist.
+	      if (__c == __plus || __c == __minus)
+		{
+		  ++__pos;
+		  __xtrc += __ctype.narrow(__c, char());
+		  __c = *(++__beg);
+		}
+	      __found_sci = true;
+	    }
+	  else
+	    // Not a valid input item.
+	    break;
+        }
+
+      // Digit grouping is checked. If grouping and found_grouping don't
+      // match, then get very very upset, and set failbit.
+      if (__check_grouping && __found_grouping.size())
+        {
+          // Add the ending grouping if a decimal wasn't found.
+	  if (!__found_dec)
+	    __found_grouping += static_cast(__sep_pos);
+          if (!__verify_grouping(__grouping, __found_grouping))
+	    __err |= ios_base::failbit;
+        }
+
+      // Finish up
+      __xtrc += char();
+      if (__beg == __end)
+        __err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  // Stage 1: Determine a conversion specifier.
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    _M_extract_int(_InIter __beg, _InIter __end, ios_base& __io,
+		   ios_base::iostate& __err, string& __xtrc, int& __base) const
+    {
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc);
+      const numpunct<_CharT>& __np = use_facet >(__loc);
+ 
+      // NB: Iff __basefield == 0, this can change based on contents.
+      ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield;
+      if (__basefield == ios_base::oct)
+        __base = 8;
+      else if (__basefield == ios_base::hex)
+        __base = 16;
+      else
+	__base = 10;
+
+     // First check for sign.
+      int __pos = 0;
+      char_type  __c = *__beg;
+      if ((__c == __ctype.widen('+') || __c == __ctype.widen('-'))
+	  && __beg != __end)
+	{
+	  __xtrc += __ctype.narrow(__c, char());
+	  ++__pos;
+	  __c = *(++__beg);
+	}
+
+      // Next, strip leading zeros and check required digits for base formats.
+      const char_type __zero = __ctype.widen(_S_atoms[_M_zero]);
+      const char_type __x = __ctype.widen('x');
+      const char_type __X = __ctype.widen('X');
+      if (__base == 10)
+	{
+	  bool __found_zero = false;
+	  while (__c == __zero && __beg != __end)
+	    {
+	      __c = *(++__beg);
+	      __found_zero = true;
+	    }
+	  if (__found_zero)
+	    {
+	      __xtrc += _S_atoms[_M_zero];
+	      ++__pos;
+	      if (__basefield == 0)
+		{	      
+		  if ((__c == __x || __c == __X) && __beg != __end)
+		    {
+		      __xtrc += __ctype.narrow(__c, char());
+		      ++__pos;
+		      __c = *(++__beg);
+		      __base = 16;
+		    }
+		  else 
+		    __base = 8;
+		}
+	    }
+	}
+      else if (__base == 16)
+	{
+	  if (__c == __zero && __beg != __end)
+	    {
+	      __xtrc += _S_atoms[_M_zero];
+	      ++__pos;
+	      __c = *(++__beg); 
+	      if  ((__c == __x || __c == __X) && __beg != __end)
+		{
+		  __xtrc += __ctype.narrow(__c, char());
+		  ++__pos;
+		  __c = *(++__beg);
+		}
+	    }
+	}
+
+      // At this point, base is determined. If not hex, only allow
+      // base digits as valid input.
+      size_t __len;
+      if (__base == 16)
+	__len = _M_size;
+      else
+	__len = __base;
+
+      // Extract.
+      char_type __watoms[_M_size];
+      __ctype.widen(_S_atoms, _S_atoms + __len, __watoms);
+      string __found_grouping;
+      const string __grouping = __np.grouping();
+      bool __check_grouping = __grouping.size();
+      int __sep_pos = 0;
+      const char_type __sep = __np.thousands_sep();
+      while (__beg != __end)
+        {
+	  typedef char_traits<_CharT> 	__traits_type;
+          const char_type* __p = __traits_type::find(__watoms, __len,  __c);
+
+          // NB: strchr returns true for __c == 0x0
+          if (__p && __c)
+	    {
+	      // Try first for acceptable digit; record it if found.
+	      __xtrc += _S_atoms[__p - __watoms];
+	      ++__pos;
+	      ++__sep_pos;
+	      __c = *(++__beg);
+	    }
+          else if (__c == __sep && __check_grouping)
+	    {
+              // NB: Thousands separator at the beginning of a string
+              // is a no-no, as is two consecutive thousands separators.
+              if (__sep_pos)
+                {
+                  __found_grouping += static_cast(__sep_pos);
+                  __sep_pos = 0;
+		  __c = *(++__beg);
+                }
+              else
+		{
+		  __err |= ios_base::failbit;
+		  break;
+		}
+            }
+	  else
+	    // Not a valid input item.
+	    break;
+        }
+
+      // Digit grouping is checked. If grouping and found_grouping don't
+      // match, then get very very upset, and set failbit.
+      if (__check_grouping && __found_grouping.size())
+        {
+          // Add the ending grouping.
+          __found_grouping += static_cast(__sep_pos);
+          if (!__verify_grouping(__grouping, __found_grouping))
+	    __err |= ios_base::failbit;
+        }
+
+      // Finish up.
+      __xtrc += char();
+      if (__beg == __end)
+        __err |= ios_base::eofbit;
+      return __beg;
+    }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+  //17.  Bad bool parsing
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, bool& __v) const
+    {
+      // Parse bool values as unsigned long
+      if (!(__io.flags() & ios_base::boolalpha))
+        {
+          // NB: We can't just call do_get(long) here, as it might
+          // refer to a derived class.
+          string __xtrc;
+          int __base;
+          __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+
+	  unsigned long __ul; 
+	  __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
+	  if (!(__err & ios_base::failbit) && __ul <= 1)
+	    __v = __ul;
+	  else 
+            __err |= ios_base::failbit;
+        }
+
+      // Parse bool values as alphanumeric
+      else
+        {
+	  typedef basic_string<_CharT> __string_type;
+          locale __loc = __io.getloc();
+	  const numpunct<_CharT>& __np = use_facet >(__loc); 
+	  const __string_type __true = __np.truename();
+	  const __string_type __false = __np.falsename();
+          const char_type* __trues = __true.c_str();
+          const char_type* __falses = __false.c_str();
+          const size_t __truen =  __true.size() - 1;
+          const size_t __falsen =  __false.size() - 1;
+
+          for (size_t __n = 0; __beg != __end; ++__n)
+            {
+              char_type __c = *__beg++;
+              bool __testf = __n <= __falsen ? __c == __falses[__n] : false;
+              bool __testt = __n <= __truen ? __c == __trues[__n] : false;
+              if (!(__testf || __testt))
+                {
+                  __err |= ios_base::failbit;
+                  break;
+                }
+              else if (__testf && __n == __falsen)
+                {
+                  __v = 0;
+                  break;
+                }
+              else if (__testt && __n == __truen)
+                {
+                  __v = 1;
+                  break;
+                }
+            }
+          if (__beg == __end)
+            __err |= ios_base::eofbit;
+        }
+      return __beg;
+    }
+#endif
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, long& __v) const
+    {
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, unsigned short& __v) const
+    {
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+      unsigned long __ul;
+      __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
+      if (!(__err & ios_base::failbit) 
+	  && __ul <= numeric_limits::max())
+	__v = static_cast(__ul);
+      else 
+	__err |= ios_base::failbit;
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, unsigned int& __v) const
+    {
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+      unsigned long __ul;
+      __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
+      if (!(__err & ios_base::failbit) 
+	  && __ul <= numeric_limits::max())
+	__v = static_cast(__ul);
+      else 
+	__err |= ios_base::failbit;
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, unsigned long& __v) const
+    {
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
+      return __beg;
+    }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, long long& __v) const
+    {
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, unsigned long long& __v) const
+    {
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale, __base);
+      return __beg;
+    }
+#endif
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io, 
+	   ios_base::iostate& __err, float& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale);
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, double& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale);
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, long double& __v) const
+    {
+      string __xtrc;
+      __xtrc.reserve(32);
+      __beg = _M_extract_float(__beg, __end, __io, __err, __xtrc);
+      __convert_to_v(__xtrc.c_str(), __v, __err, _S_c_locale);
+      return __beg;
+    }
+
+  template
+    _InIter
+    num_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, ios_base& __io,
+           ios_base::iostate& __err, void*& __v) const
+    {
+      // Prepare for hex formatted input
+      typedef ios_base::fmtflags        fmtflags;
+      fmtflags __fmt = __io.flags();
+      fmtflags __fmtmask = ~(ios_base::showpos | ios_base::basefield
+                             | ios_base::uppercase | ios_base::internal);
+      __io.flags(__fmt & __fmtmask | (ios_base::hex | ios_base::showbase));
+
+      string __xtrc;
+      int __base;
+      __beg = _M_extract_int(__beg, __end, __io, __err, __xtrc, __base);
+
+      // Reset from hex formatted input
+      __io.flags(__fmt);
+
+      unsigned long __ul;
+      __convert_to_v(__xtrc.c_str(), __ul, __err, _S_c_locale, __base);
+      if (!(__err & ios_base::failbit))
+	__v = reinterpret_cast(__ul);
+      else 
+	__err |= ios_base::failbit;
+      return __beg;
+    }
+
+  // The following code uses snprintf (or sprintf(), when _GLIBCPP_USE_C99
+  // is not defined) to convert floating point values for insertion into a
+  // stream.  An optimization would be to replace them with code that works
+  // directly on a wide buffer and then use __pad to do the padding.
+  // It would be good to replace them anyway to gain back the efficiency
+  // that C++ provides by knowing up front the type of the values to insert.
+  // Also, sprintf is dangerous since may lead to accidental buffer overruns.
+  // This implementation follows the C++ standard fairly directly as
+  // outlined in 22.2.2.2 [lib.locale.num.put]
+  template
+    template
+      _OutIter
+      num_put<_CharT, _OutIter>::
+      _M_convert_float(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
+		       _ValueT __v) const
+      {
+	// Note: digits10 is rounded down.  We need to add 1 to ensure
+	// we get the full available precision.
+	const int __max_digits = numeric_limits<_ValueT>::digits10 + 1;
+	streamsize __prec = __io.precision();
+
+	if (__prec > static_cast(__max_digits))
+	  __prec = static_cast(__max_digits);
+
+	// Long enough for the max format spec.
+	char __fbuf[16];
+
+	// [22.2.2.2.2] Stage 1, numeric conversion to character.
+	int __len;
+#ifdef _GLIBCPP_USE_C99
+	// First try a buffer perhaps big enough (for sure sufficient for
+	// non-ios_base::fixed outputs)
+	int __cs_size = __max_digits * 3;
+	char* __cs = static_cast(__builtin_alloca(__cs_size));
+
+	const bool __fp = _S_format_float(__io, __fbuf, __mod, __prec);
+	if (__fp)
+	  __len = __convert_from_v(__cs, __cs_size, __fbuf, __v, 
+				   _S_c_locale, __prec);
+	else
+	  __len = __convert_from_v(__cs, __cs_size, __fbuf, __v, _S_c_locale);
+
+	// If the buffer was not large enough, try again with the correct size.
+	if (__len >= __cs_size)
+	  {
+	    __cs_size = __len + 1; 
+	    __cs = static_cast(__builtin_alloca(__cs_size));
+	    if (__fp)
+	      __len = __convert_from_v(__cs, __cs_size, __fbuf, __v, 
+				       _S_c_locale, __prec);
+	    else
+	      __len = __convert_from_v(__cs, __cs_size, __fbuf, __v, 
+				       _S_c_locale);
+	  }
+#else
+	// Consider the possibility of long ios_base::fixed outputs
+	const bool __fixed = __io.flags() & ios_base::fixed;
+	const int __max_exp = numeric_limits<_ValueT>::max_exponent10;
+	// ios_base::fixed outputs may need up to __max_exp+1 chars
+	// for the integer part + up to __max_digits chars for the
+	// fractional part + 3 chars for sign, decimal point, '\0'. On
+	// the other hand, for non-fixed outputs __max_digits*3 chars
+	// are largely sufficient.
+	const int __cs_size = __fixed ? __max_exp + __max_digits + 4 
+	                              : __max_digits * 3;
+	char* __cs = static_cast(__builtin_alloca(__cs_size));
+
+	if (_S_format_float(__io, __fbuf, __mod, __prec))
+	  __len = __convert_from_v(__cs, 0, __fbuf, __v, _S_c_locale, __prec);
+	else
+	  __len = __convert_from_v(__cs, 0, __fbuf, __v, _S_c_locale);
+#endif
+	return _M_widen_float(__s, __io, __fill, __cs, __len);
+      }
+
+  template
+    template
+      _OutIter
+      num_put<_CharT, _OutIter>::
+      _M_convert_int(_OutIter __s, ios_base& __io, _CharT __fill, char __mod,
+		     char __modl, _ValueT __v) const
+      {
+	// [22.2.2.2.2] Stage 1, numeric conversion to character.
+
+	// Long enough for the max format spec.
+	char __fbuf[16];
+	_S_format_int(__io, __fbuf, __mod, __modl);
+#ifdef _GLIBCPP_USE_C99
+	// First try a buffer perhaps big enough.
+	int __cs_size = 64;
+	char* __cs = static_cast(__builtin_alloca(__cs_size));
+	int __len = __convert_from_v(__cs, __cs_size, __fbuf, __v, 
+				     _S_c_locale);
+	// If the buffer was not large enough, try again with the correct size.
+	if (__len >= __cs_size)
+	  {
+	    __cs_size = __len + 1;
+	    __cs = static_cast(__builtin_alloca(__cs_size));
+	    __len = __convert_from_v(__cs, __cs_size, __fbuf, __v, 
+				     _S_c_locale);
+	  }
+#else
+	// Leave room for "+/-," "0x," and commas. This size is
+	// arbitrary, but should be largely sufficient.
+	char __cs[128];
+	int __len = __convert_from_v(__cs, 0, __fbuf, __v, _S_c_locale);
+#endif
+	return _M_widen_int(__s, __io, __fill, __cs, __len);
+      }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    _M_widen_float(_OutIter __s, ios_base& __io, _CharT __fill, char* __cs, 
+		   int __len) const
+    {
+      // [22.2.2.2.2] Stage 2, convert to char_type, using correct
+      // numpunct.decimal_point() values for '.' and adding grouping.
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc);
+      _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 
+							   * __len));
+      // Grouping can add (almost) as many separators as the number of
+      // digits, but no more.
+      _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 
+			 				    * __len * 2));
+      __ctype.widen(__cs, __cs + __len, __ws);
+      
+      // Replace decimal point.
+      const _CharT* __p;
+      const numpunct<_CharT>& __np = use_facet >(__loc);
+      if (__p = char_traits<_CharT>::find(__ws, __len, __ctype.widen('.')))
+	__ws[__p - __ws] = __np.decimal_point();
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//282. What types does numpunct grouping refer to?
+      // Add grouping, if necessary. 
+      const string __grouping = __np.grouping();
+      ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield;
+      if (__grouping.size())
+	{
+	  _CharT* __p2;
+	  int __declen = __p ? __p - __ws : __len;
+	  __p2 = __add_grouping(__ws2, __np.thousands_sep(), 
+				__grouping.c_str(),
+				__grouping.c_str() + __grouping.size(),
+				__ws, __ws + __declen);
+	  int __newlen = __p2 - __ws2;
+	
+	  // Tack on decimal part.
+	  if (__p)
+	    {
+	      char_traits<_CharT>::copy(__p2, __p, __len - __declen);
+	      __newlen += __len - __declen;
+	    }    
+
+	  // Switch strings, establish correct new length.
+	  __ws = __ws2;
+	  __len = __newlen;
+	}
+#endif
+      return _M_insert(__s, __io, __fill, __ws, __len);
+    }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    _M_widen_int(_OutIter __s, ios_base& __io, _CharT __fill, char* __cs, 
+		 int __len) const
+    {
+      // [22.2.2.2.2] Stage 2, convert to char_type, using correct
+      // numpunct.decimal_point() values for '.' and adding grouping.
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc);
+      _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 
+							   * __len));
+      // Grouping can add (almost) as many separators as the number of
+      // digits, but no more.
+      _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 
+							    * __len * 2));
+      __ctype.widen(__cs, __cs + __len, __ws);
+
+      // Add grouping, if necessary. 
+      const numpunct<_CharT>& __np = use_facet >(__loc);
+      const string __grouping = __np.grouping();
+      const ios_base::fmtflags __basefield = __io.flags() & ios_base::basefield;
+      if (__grouping.size())
+	{
+	  // By itself __add_grouping cannot deal correctly with __ws when
+	  // ios::showbase is set and ios_base::oct || ios_base::hex.
+	  // Therefore we take care "by hand" of the initial 0, 0x or 0X.
+	  streamsize __off = 0;
+	  if (__io.flags() & ios_base::showbase)
+	    if (__basefield == ios_base::oct)
+	      {
+		__off = 1;
+		*__ws2 = *__ws;
+	      }
+	    else if (__basefield == ios_base::hex)
+	      {
+		__off = 2;
+		*__ws2 = *__ws;
+		*(__ws2 + 1) = *(__ws + 1);
+	      }
+	  _CharT* __p;
+	  __p = __add_grouping(__ws2 + __off, __np.thousands_sep(), 
+			       __grouping.c_str(),
+			       __grouping.c_str() + __grouping.size(),
+			       __ws + __off, __ws + __len);
+	  __len = __p - __ws2;
+	  // Switch strings.
+	  __ws = __ws2;
+	}
+      return _M_insert(__s, __io, __fill, __ws, __len);
+    }
+
+  // For use by integer and floating-point types after they have been
+  // converted into a char_type string.
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    _M_insert(_OutIter __s, ios_base& __io, _CharT __fill, const _CharT* __ws, 
+	      int __len) const
+    {
+      // [22.2.2.2.2] Stage 3.
+      streamsize __w = __io.width();
+      _CharT* __ws2 = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) 
+							    * __w));
+      if (__w > static_cast(__len))
+	{
+	  __pad(__io, __fill, __ws2, __ws, __w, __len, true);
+	  __len = static_cast(__w);
+	  // Switch strings.
+	  __ws = __ws2;
+	}
+      __io.width(0);
+
+      // [22.2.2.2.2] Stage 4.
+      // Write resulting, fully-formatted string to output iterator.
+      for (int __j = 0; __j < __len; ++__j, ++__s)
+	*__s = __ws[__j];
+      return __s;
+    }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill, bool __v) const
+    {
+      ios_base::fmtflags __flags = __io.flags();
+      if ((__flags & ios_base::boolalpha) == 0)
+        {
+          unsigned long __uv = __v;
+          __s = _M_convert_int(__s, __io, __fill, 'u', char_type(), __uv);
+        }
+      else
+        {
+	  typedef basic_string<_CharT> __string_type;
+          locale __loc = __io.getloc();
+	  const numpunct<_CharT>& __np = use_facet >(__loc); 
+	  __string_type __name;
+          if (__v)
+	    __name = __np.truename();
+          else
+	    __name = __np.falsename();
+	  __s = _M_insert(__s, __io, __fill, __name.c_str(), __name.size()); 
+	}
+      return __s;
+    }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill, long __v) const
+    { return _M_convert_int(__s, __io, __fill, 'd', char_type(), __v); }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill,
+           unsigned long __v) const
+    { return _M_convert_int(__s, __io, __fill, 'u', char_type(), __v); }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __b, char_type __fill, long long __v) const
+    { return _M_convert_int(__s, __b, __fill, 'd', 'l', __v); }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill,
+           unsigned long long __v) const
+    { return _M_convert_int(__s, __io, __fill, 'u', 'l', __v); }
+#endif
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill, double __v) const
+    { return _M_convert_float(__s, __io, __fill, char_type(), __v); }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill, 
+	   long double __v) const
+    { return _M_convert_float(__s, __io, __fill, 'L', __v); }
+
+  template
+    _OutIter
+    num_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type __fill,
+           const void* __v) const
+    {
+      ios_base::fmtflags __flags = __io.flags();
+      ios_base::fmtflags __fmt = ~(ios_base::showpos | ios_base::basefield
+				   | ios_base::uppercase | ios_base::internal);
+      __io.flags(__flags & __fmt | (ios_base::hex | ios_base::showbase));
+      try 
+	{
+	  __s = _M_convert_int(__s, __io, __fill, 'u', char_type(),
+			       reinterpret_cast(__v));
+	  __io.flags(__flags);
+	}
+      catch (...) 
+	{
+	  __io.flags(__flags);
+	  __throw_exception_again;
+	}
+      return __s;
+    }
+
+
+  template
+    _InIter
+    money_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, 
+	   ios_base::iostate& __err, long double& __units) const
+    { 
+      string_type __str;
+      __beg = this->do_get(__beg, __end, __intl, __io, __err, __str); 
+
+      const int __n = numeric_limits::digits10;
+      char* __cs = static_cast(__builtin_alloca(__n));
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc); 
+      const _CharT* __wcs = __str.c_str();
+      __ctype.narrow(__wcs, __wcs + __str.size() + 1, char(), __cs);      
+      __convert_to_v(__cs, __units, __err, _S_c_locale);
+      return __beg;
+    }
+
+  template
+    _InIter
+    money_get<_CharT, _InIter>::
+    do_get(iter_type __beg, iter_type __end, bool __intl, ios_base& __io, 
+	   ios_base::iostate& __err, string_type& __units) const
+    { 
+      // These contortions are quite unfortunate.
+      typedef moneypunct<_CharT, true> 		__money_true;
+      typedef moneypunct<_CharT, false> 	__money_false;
+      typedef money_base::part 			part;
+      typedef typename string_type::size_type 	size_type;
+
+      const locale __loc = __io.getloc();
+      const __money_true& __mpt = use_facet<__money_true>(__loc); 
+      const __money_false& __mpf = use_facet<__money_false>(__loc); 
+      const ctype<_CharT>& __ctype = use_facet >(__loc); 
+
+      const money_base::pattern __p = __intl ? __mpt.neg_format() 
+					     : __mpf.neg_format();
+
+      const string_type __pos_sign =__intl ? __mpt.positive_sign() 
+					   : __mpf.positive_sign();
+      const string_type __neg_sign =__intl ? __mpt.negative_sign() 
+					   : __mpf.negative_sign();
+      const char_type __d = __intl ? __mpt.decimal_point() 
+  	    	       		   : __mpf.decimal_point();
+      const char_type __sep = __intl ? __mpt.thousands_sep() 
+		    		     : __mpf.thousands_sep();
+
+      const string __grouping = __intl ? __mpt.grouping() : __mpf.grouping();
+
+      // Set to deduced positive or negative sign, depending.
+      string_type __sign;
+      // String of grouping info from thousands_sep plucked from __units.
+      string __grouping_tmp; 
+      // Marker for thousands_sep position.
+      int __sep_pos = 0;
+      // If input iterator is in a valid state.
+      bool __testvalid = true;
+      // Flag marking when a decimal point is found.
+      bool __testdecfound = false; 
+
+      // The tentative returned string is stored here.
+      string_type __temp_units;
+
+      char_type __c = *__beg;
+      char_type __eof = static_cast(char_traits::eof());
+      for (int __i = 0; __beg != __end && __i < 4 && __testvalid; ++__i)
+	{
+	  part __which = static_cast(__p.field[__i]);
+	  switch (__which)
+		{
+		case money_base::symbol:
+		  if (__io.flags() & ios_base::showbase 
+		      || __i < 2 || __sign.size() > 1
+		      || ((static_cast(__p.field[3]) != money_base::none)
+			  && __i == 2)) 
+		    {
+		      // According to 22.2.6.1.2.2, symbol is required
+		      // if (__io.flags() & ios_base::showbase),
+		      // otherwise is optional and consumed only if
+		      // other characters are needed to complete the
+		      // format.
+		      const string_type __symbol = __intl ? __mpt.curr_symbol()
+						    	 : __mpf.curr_symbol();
+		      size_type __len = __symbol.size();
+		      size_type __j = 0;
+		      while (__beg != __end 
+			     && __j < __len && __symbol[__j] == __c)
+			{
+			  __c = *(++__beg);
+			  ++__j;
+			}
+		      // When (__io.flags() & ios_base::showbase)
+		      // symbol is required.
+		      if (__j != __len && (__io.flags() & ios_base::showbase))
+			__testvalid = false;
+		    }
+		  break;
+		case money_base::sign:		    
+		  // Sign might not exist, or be more than one character long. 
+		  if (__pos_sign.size() && __neg_sign.size())
+		  {
+		    // Sign is mandatory.
+		    if (__c == __pos_sign[0])
+		      {
+			__sign = __pos_sign;
+			__c = *(++__beg);
+		      }
+		    else if (__c == __neg_sign[0])
+		      {
+			__sign = __neg_sign;
+			__c = *(++__beg);
+		      }
+		    else
+		      __testvalid = false;
+		  }
+		  else if (__pos_sign.size() && __c == __pos_sign[0])
+		    {
+		      __sign = __pos_sign;
+		      __c = *(++__beg);
+		    }
+		  else if (__neg_sign.size() && __c == __neg_sign[0])
+		    {
+		      __sign = __neg_sign;
+		      __c = *(++__beg);
+		    }
+		  break;
+		case money_base::value:
+		  // Extract digits, remove and stash away the
+		  // grouping of found thousands separators.
+		  while (__beg != __end 
+			 && (__ctype.is(ctype_base::digit, __c) 
+			     || (__c == __d && !__testdecfound)
+			     || __c == __sep))
+		    {
+		      if (__c == __d)
+			{
+			  __grouping_tmp += static_cast(__sep_pos);
+			  __sep_pos = 0;
+			  __testdecfound = true;
+			}
+		      else if (__c == __sep)
+			{
+			  if (__grouping.size())
+			    {
+			      // Mark position for later analysis.
+			      __grouping_tmp += static_cast(__sep_pos);
+			      __sep_pos = 0;
+			    }
+			  else
+			    {
+			      __testvalid = false;
+			      break;
+			    }
+			}
+		      else
+			{
+			  __temp_units += __c;
+			  ++__sep_pos;
+			}
+		      __c = *(++__beg);
+		    }
+		  break;
+		case money_base::space:
+		case money_base::none:
+		  // Only if not at the end of the pattern.
+		  if (__i != 3)
+		    while (__beg != __end 
+			   && __ctype.is(ctype_base::space, __c))
+		      __c = *(++__beg);
+		  break;
+		}
+	}
+
+      // Need to get the rest of the sign characters, if they exist.
+      if (__sign.size() > 1)
+	{
+	  size_type __len = __sign.size();
+	  size_type __i = 1;
+	  for (; __c != __eof && __i < __len; ++__i)
+	    while (__beg != __end && __c != __sign[__i])
+	      __c = *(++__beg);
+	  
+	  if (__i != __len)
+	    __testvalid = false;
+	}
+
+      // Strip leading zeros.
+      while (__temp_units[0] == __ctype.widen('0'))
+	__temp_units.erase(__temp_units.begin());
+
+      if (__sign.size() && __sign == __neg_sign)
+	__temp_units.insert(__temp_units.begin(), __ctype.widen('-'));
+
+      // Test for grouping fidelity.
+      if (__grouping.size() && __grouping_tmp.size())
+	{
+	  if (!__verify_grouping(__grouping, __grouping_tmp))
+	    __testvalid = false;
+	}
+
+      // Iff no more characters are available.      
+      if (__c == __eof)
+	__err |= ios_base::eofbit;
+
+      // Iff valid sequence is not recognized.
+      if (!__testvalid || !__temp_units.size())
+	__err |= ios_base::failbit;
+      else
+	// Use the "swap trick" to copy __temp_units into __units.
+	__temp_units.swap(__units);
+
+      return __beg; 
+    }
+
+  template
+    _OutIter
+    money_put<_CharT, _OutIter>::
+    do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	   long double __units) const
+    { 
+      const locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc);
+#ifdef _GLIBCPP_USE_C99
+      // First try a buffer perhaps big enough.
+      int __cs_size = 64;
+      char* __cs = static_cast(__builtin_alloca(__cs_size));
+      int __len = __convert_from_v(__cs, __cs_size, "%.01Lf", __units, 
+				   _S_c_locale);
+      // If the buffer was not large enough, try again with the correct size.
+      if (__len >= __cs_size)
+	{
+	  __cs_size = __len + 1;
+	  __cs = static_cast(__builtin_alloca(__cs_size));
+	  __len = __convert_from_v(__cs, __cs_size, "%.01Lf", __units, 
+				   _S_c_locale);
+	}
+#else
+      // max_exponent10 + 1 for the integer part, + 4 for sign, decimal point,
+      // decimal digit, '\0'. 
+      const int __cs_size = numeric_limits::max_exponent10 + 5;
+      char* __cs = static_cast(__builtin_alloca(__cs_size));
+      int __len = __convert_from_v(__cs, 0, "%.01Lf", __units, _S_c_locale);
+#endif
+      _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __cs_size));
+      __ctype.widen(__cs, __cs + __len, __ws);
+      string_type __digits(__ws);
+      return this->do_put(__s, __intl, __io, __fill, __digits); 
+    }
+
+  template
+    _OutIter
+    money_put<_CharT, _OutIter>::
+    do_put(iter_type __s, bool __intl, ios_base& __io, char_type __fill,
+	   const string_type& __digits) const
+    { 
+      typedef typename string_type::size_type 	size_type;
+      typedef money_base::part 			part;
+
+      const locale __loc = __io.getloc();
+      const size_type __width = static_cast(__io.width());
+
+      // These contortions are quite unfortunate.
+      typedef moneypunct<_CharT, true> __money_true;
+      typedef moneypunct<_CharT, false> __money_false;
+      const __money_true& __mpt = use_facet<__money_true>(__loc); 
+      const __money_false& __mpf = use_facet<__money_false>(__loc); 
+      const ctype<_CharT>& __ctype = use_facet >(__loc); 
+
+      // Determine if negative or positive formats are to be used, and
+      // discard leading negative_sign if it is present.
+      const char_type* __beg = __digits.data();
+      const char_type* __end = __beg + __digits.size();
+      money_base::pattern __p;
+      string_type __sign;
+      if (*__beg != __ctype.widen('-'))
+	{
+	  __p = __intl ? __mpt.pos_format() : __mpf.pos_format();
+	  __sign =__intl ? __mpt.positive_sign() : __mpf.positive_sign();
+	}
+      else
+	{
+	  __p = __intl ? __mpt.neg_format() : __mpf.neg_format();
+	  __sign =__intl ? __mpt.negative_sign() : __mpf.negative_sign();
+	  ++__beg;
+	}
+      
+      // Look for valid numbers in the current ctype facet within input digits.
+      __end = __ctype.scan_not(ctype_base::digit, __beg, __end);
+      if (__beg != __end)
+	{
+	  // Assume valid input, and attempt to format.
+	  // Break down input numbers into base components, as follows:
+	  //   final_value = grouped units + (decimal point) + (digits)
+	  string_type __res;
+	  string_type __value;
+	  const string_type __symbol = __intl ? __mpt.curr_symbol() 
+	    				      : __mpf.curr_symbol();
+
+	  // Deal with decimal point, decimal digits.
+	  const int __frac = __intl ? __mpt.frac_digits() 
+	    			    : __mpf.frac_digits();
+	  if (__frac > 0)
+	    {
+	      const char_type __d = __intl ? __mpt.decimal_point() 
+					   : __mpf.decimal_point();
+	      if (__end - __beg >= __frac)
+		{
+		  __value = string_type(__end - __frac, __end);
+		  __value.insert(__value.begin(), __d);
+		  __end -= __frac;
+		}
+	      else
+		{
+		  // Have to pad zeros in the decimal position.
+		  __value = string_type(__beg, __end);
+		  int __paddec = __frac - (__end - __beg);
+		  char_type __zero = __ctype.widen('0');
+		  __value.insert(__value.begin(), __paddec, __zero);
+		  __value.insert(__value.begin(), __d);
+		  __beg = __end;
+		}
+	    }
+
+	  // Add thousands separators to non-decimal digits, per
+	  // grouping rules.
+	  if (__beg != __end)
+	    {
+	      const string __grouping = __intl ? __mpt.grouping() 
+					       : __mpf.grouping();
+	      if (__grouping.size())
+		{
+		  const char_type __sep = __intl ? __mpt.thousands_sep() 
+		    			         : __mpf.thousands_sep();
+		  const char* __gbeg = __grouping.c_str();
+		  const char* __gend = __gbeg + __grouping.size();
+		  const int __n = (__end - __beg) * 2;
+		  _CharT* __ws2 =
+		    static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __n));
+		  _CharT* __ws_end = __add_grouping(__ws2, __sep, __gbeg, 
+						    __gend, __beg, __end);
+		  __value.insert(0, __ws2, __ws_end - __ws2);
+		}
+	      else
+		__value.insert(0, string_type(__beg, __end));
+	    }
+
+	  // Calculate length of resulting string.
+	  ios_base::fmtflags __f = __io.flags() & ios_base::adjustfield;
+	  size_type __len = __value.size() + __sign.size();
+	  __len += (__io.flags() & ios_base::showbase) ? __symbol.size() : 0;
+	  bool __testipad = __f == ios_base::internal && __len < __width;
+
+	  // Fit formatted digits into the required pattern.
+	  for (int __i = 0; __i < 4; ++__i)
+	    {
+	      part __which = static_cast(__p.field[__i]);
+	      switch (__which)
+		{
+		case money_base::symbol:
+		  if (__io.flags() & ios_base::showbase)
+		    __res += __symbol;
+		  break;
+		case money_base::sign:		    
+		  // Sign might not exist, or be more than one
+		  // charater long. In that case, add in the rest
+		  // below.
+		  if (__sign.size())
+		    __res += __sign[0];
+		  break;
+		case money_base::value:
+		  __res += __value;
+		  break;
+		case money_base::space:
+		  // At least one space is required, but if internal
+		  // formatting is required, an arbitrary number of
+		  // fill spaces will be necessary.
+		  if (__testipad)
+		    __res += string_type(__width - __len, __fill);
+		  else
+		    __res += __ctype.widen(__fill);
+		  break;
+		case money_base::none:
+		  if (__testipad)
+		    __res += string_type(__width - __len, __fill);
+		  break;
+		}
+	    }
+
+	  // Special case of multi-part sign parts.
+	  if (__sign.size() > 1)
+	    __res += string_type(__sign.begin() + 1, __sign.end());
+
+	  // Pad, if still necessary.
+	  __len = __res.size();
+	  if (__width > __len)
+	    {
+	      if (__f == ios_base::left)
+		// After.
+		__res.append(__width - __len, __fill);
+	      else
+		// Before.
+		__res.insert(0, string_type(__width - __len, __fill));
+	      __len = __width;
+	    }
+
+	  // Write resulting, fully-formatted string to output iterator.
+	  for (size_type __j = 0; __j < __len; ++__j, ++__s)
+	    *__s = __res[__j];
+	}
+      __io.width(0);
+      return __s; 
+    }
+
+
+  // NB: Not especially useful. Without an ios_base object or some
+  // kind of locale reference, we are left clawing at the air where
+  // the side of the mountain used to be...
+  template
+    time_base::dateorder
+    time_get<_CharT, _InIter>::do_date_order() const
+    { return time_base::no_order; }
+
+  template
+    void
+    time_get<_CharT, _InIter>::
+    _M_extract_via_format(iter_type& __beg, iter_type& __end, ios_base& __io,
+			  ios_base::iostate& __err, tm* __tm, 
+			  const _CharT* __format) const
+    {  
+      locale __loc = __io.getloc();
+      __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const ctype<_CharT>& __ctype = use_facet >(__loc); 
+      size_t __len = char_traits<_CharT>::length(__format);
+
+      for (size_t __i = 0; __beg != __end && __i < __len && !__err; ++__i)
+	{
+	  char __c = __format[__i];
+	  if (__c == '%')
+	    {
+	      // Verify valid formatting code, attempt to extract.
+	      __c = __format[++__i];
+	      char __mod = 0;
+	      int __mem = 0; 
+	      if (__c == 'E' || __c == 'O')
+		{
+		  __mod = __c;
+		  __c = __format[++__i];
+		}
+	      switch (__c)
+		{
+		  const char* __cs;
+		  _CharT __wcs[10];
+		case 'a':
+		  // Abbreviated weekday name [tm_wday]
+		  const char_type*  __days1[7];
+		  __tp._M_days_abbreviated(__days1);
+		  _M_extract_name(__beg, __end, __tm->tm_wday, __days1, 7, 
+				  __err);
+		  break;
+		case 'A':
+		  // Weekday name [tm_wday].
+		  const char_type*  __days2[7];
+		  __tp._M_days(__days2);
+		  _M_extract_name(__beg, __end, __tm->tm_wday, __days2, 7, 
+				  __err);
+		  break;
+		case 'h':
+		case 'b':
+		  // Abbreviated month name [tm_mon]
+		  const char_type*  __months1[12];
+		  __tp._M_months_abbreviated(__months1);
+		  _M_extract_name(__beg, __end, __tm->tm_mon, __months1, 12, 
+				  __err);
+		  break;
+		case 'B':
+		  // Month name [tm_mon].
+		  const char_type*  __months2[12];
+		  __tp._M_months(__months2);
+		  _M_extract_name(__beg, __end, __tm->tm_mon, __months2, 12, 
+				  __err);
+		  break;
+		case 'c':
+		  // Default time and date representation.
+		  const char_type*  __dt[2];
+		  __tp._M_date_time_formats(__dt);
+		  _M_extract_via_format(__beg, __end, __io, __err, __tm, 
+					__dt[0]);
+		  break;
+		case 'd':
+		  // Day [01, 31]. [tm_mday]
+		  _M_extract_num(__beg, __end, __tm->tm_mday, 1, 31, 2, 
+				 __ctype, __err);
+		  break;
+		case 'D':
+		  // Equivalent to %m/%d/%y.[tm_mon, tm_mday, tm_year]
+		  __cs = "%m/%d/%y";
+		  __ctype.widen(__cs, __cs + 9, __wcs);
+		  _M_extract_via_format(__beg, __end, __io, __err, __tm, 
+					__wcs);
+		  break;
+		case 'H':
+		  // Hour [00, 23]. [tm_hour]
+		  _M_extract_num(__beg, __end, __tm->tm_hour, 0, 23, 2,
+				 __ctype, __err);
+		  break;
+		case 'I':
+		  // Hour [01, 12]. [tm_hour]
+		  _M_extract_num(__beg, __end, __tm->tm_hour, 1, 12, 2, 
+				 __ctype, __err);
+		  break;
+		case 'm':
+		  // Month [01, 12]. [tm_mon]
+		  _M_extract_num(__beg, __end, __mem, 1, 12, 2, __ctype, 
+				 __err);
+		  if (!__err)
+		    __tm->tm_mon = __mem - 1;
+		  break;
+		case 'M':
+		  // Minute [00, 59]. [tm_min]
+		  _M_extract_num(__beg, __end, __tm->tm_min, 0, 59, 2,
+				 __ctype, __err);
+		  break;
+		case 'n':
+		  if (__ctype.narrow(*__beg, 0) == '\n')
+		    ++__beg;
+		  else
+		    __err |= ios_base::failbit;
+		  break;
+		case 'R':
+		  // Equivalent to (%H:%M).
+		  __cs = "%H:%M";
+		  __ctype.widen(__cs, __cs + 6, __wcs);
+		  _M_extract_via_format(__beg, __end, __io, __err, __tm, 
+					__wcs);
+		  break;
+		case 'S':
+		  // Seconds.
+		  _M_extract_num(__beg, __end, __tm->tm_sec, 0, 59, 2,
+				 __ctype, __err);
+		  break;
+		case 't':
+		  if (__ctype.narrow(*__beg, 0) == '\t')
+		    ++__beg;
+		  else
+		__err |= ios_base::failbit;
+		  break;
+		case 'T':
+		  // Equivalent to (%H:%M:%S).
+		  __cs = "%H:%M:%S";
+		  __ctype.widen(__cs, __cs + 9, __wcs);
+		  _M_extract_via_format(__beg, __end, __io, __err, __tm, 
+					__wcs);
+		  break;
+		case 'x':
+		  // Locale's date.
+		  const char_type*  __dates[2];
+		  __tp._M_date_formats(__dates);
+		  _M_extract_via_format(__beg, __end, __io, __err, __tm, 
+					__dates[0]);
+		  break;
+		case 'X':
+		  // Locale's time.
+		  const char_type*  __times[2];
+		  __tp._M_time_formats(__times);
+		  _M_extract_via_format(__beg, __end, __io, __err, __tm, 
+					__times[0]);
+		  break;
+		case 'y':
+		  // Two digit year. [tm_year]
+		  _M_extract_num(__beg, __end, __tm->tm_year, 0, 99, 2, 
+				 __ctype, __err);
+		  break;
+		case 'Y':
+		  // Year [1900). [tm_year]
+		  _M_extract_num(__beg, __end, __mem, 0, 
+				 numeric_limits::max(), 4, 
+				 __ctype, __err);
+		  if (!__err)
+		    __tm->tm_year = __mem - 1900;
+		  break;
+		case 'Z':
+		  // Timezone info.
+		  if (__ctype.is(ctype_base::upper, *__beg))
+		    {
+		      int __tmp;
+		      _M_extract_name(__beg, __end, __tmp, 
+				      __timepunct<_CharT>::_S_timezones, 
+				      14, __err);
+		      
+		      // GMT requires special effort.
+		      char_type __c = *__beg;
+		      if (!__err && __tmp == 0 
+			  && (__c == __ctype.widen('-') 
+			      || __c == __ctype.widen('+')))
+			{
+			  _M_extract_num(__beg, __end, __tmp, 0, 23, 2,
+					  __ctype, __err);
+			  _M_extract_num(__beg, __end, __tmp, 0, 59, 2,
+					  __ctype, __err);
+			}	    
+			  }
+		      else
+			__err |= ios_base::failbit;
+		      break;
+		    default:
+		      // Not recognized.
+		      __err |= ios_base::failbit;
+		    }
+		}
+	      else
+		{
+		  // Verify format and input match, extract and discard.
+		  if (__c == __ctype.narrow(*__beg, 0))
+		    ++__beg;
+		  else
+		    __err |= ios_base::failbit;
+		}
+	}
+    }
+
+  template
+    void
+    time_get<_CharT, _InIter>::
+    _M_extract_num(iter_type& __beg, iter_type& __end, int& __member,
+		   int __min, int __max, size_t __len, 
+		   const ctype<_CharT>& __ctype, 
+		   ios_base::iostate& __err) const
+    {
+      size_t __i = 0;
+      string __digits;
+      bool __testvalid = true;
+      char_type __c = *__beg;
+      while (__beg != __end && __i < __len 
+	     && __ctype.is(ctype_base::digit, __c)) 
+	{
+	  __digits += __ctype.narrow(__c, 0);
+	  __c = *(++__beg);
+	  ++__i;
+	}
+      if (__i == __len)
+	{
+	  int __value = atoi(__digits.c_str());
+	  if (__min <= __value && __value <= __max)
+	    __member = __value;
+	  else
+	    __testvalid = false;
+	}
+      else
+	__testvalid = false;
+      if (!__testvalid)
+	__err |= ios_base::failbit;
+    }
+
+  // Assumptions:
+  // All elements in __names are unique.
+  template
+    void
+    time_get<_CharT, _InIter>::
+    _M_extract_name(iter_type& __beg, iter_type& __end, int& __member,
+		    const _CharT** __names, size_t __indexlen, 
+		    ios_base::iostate& __err) const
+    {
+      typedef char_traits __traits_type;
+      int* __matches = static_cast(__builtin_alloca(sizeof(int) * __indexlen));
+      size_t __nmatches = 0;
+      size_t __pos = 0;
+      bool __testvalid = true;
+      const char_type* __name;
+
+      char_type __c = *__beg;
+      // Look for initial matches.
+      for (size_t __i1 = 0; __i1 < __indexlen; ++__i1)
+	if (__c == __names[__i1][0])
+	  __matches[__nmatches++] = __i1;
+      
+      while(__nmatches > 1)
+	{
+	  // Find smallest matching string.
+	  size_t __minlen = 10;
+	  for (size_t __i2 = 0; __i2 < __nmatches; ++__i2)
+	    __minlen = min(__minlen, 
+			   __traits_type::length(__names[__matches[__i2]]));
+	  
+	  if (__pos < __minlen && __beg != __end)
+	    {
+	      ++__pos;
+	      __c = *(++__beg);
+	      for (size_t __i3 = 0; __i3 < __nmatches; ++__i3)
+		{
+		  __name = __names[__matches[__i3]];
+		  if (__name[__pos] != __c)
+		    __matches[__i3] = __matches[--__nmatches];
+		}
+	    }
+	  else
+	    break;
+	}
+
+      if (__nmatches == 1)
+	{
+	  // Make sure found name is completely extracted.
+	  __name = __names[__matches[0]];
+	  const size_t __len = __traits_type::length(__name);
+	  while (__pos < __len && __beg != __end && __name[__pos] == *__beg)
+	    ++__beg, ++__pos;
+
+	  if (__len == __pos)
+	    __member = __matches[0];
+	  else
+	    __testvalid = false;
+	}
+      else
+	__testvalid = false;
+      if (!__testvalid)
+	__err |= ios_base::failbit;
+    }
+
+  template
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_time(iter_type __beg, iter_type __end, ios_base& __io,
+		ios_base::iostate& __err, tm* __tm) const
+    {
+      _CharT __wcs[3];
+      const char* __cs = "%X";
+      locale __loc = __io.getloc();
+      ctype<_CharT> const& __ctype = use_facet >(__loc);
+      __ctype.widen(__cs, __cs + 3, __wcs);
+      _M_extract_via_format(__beg, __end, __io, __err, __tm, __wcs);
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_date(iter_type __beg, iter_type __end, ios_base& __io,
+		ios_base::iostate& __err, tm* __tm) const
+    {
+      _CharT __wcs[3];
+      const char* __cs = "%x";
+      locale __loc = __io.getloc();
+      ctype<_CharT> const& __ctype = use_facet >(__loc);
+      __ctype.widen(__cs, __cs + 3, __wcs);
+      _M_extract_via_format(__beg, __end, __io, __err, __tm, __wcs);
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_weekday(iter_type __beg, iter_type __end, ios_base& __io, 
+		   ios_base::iostate& __err, tm* __tm) const
+    {
+      typedef char_traits __traits_type;
+      locale __loc = __io.getloc();
+      __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const char_type*  __days[7];
+      __tp._M_days_abbreviated(__days);
+      int __tmpwday;
+      _M_extract_name(__beg, __end, __tmpwday, __days, 7, __err);
+
+      // Check to see if non-abbreviated name exists, and extract.
+      // NB: Assumes both _M_days and _M_days_abbreviated organized in
+      // exact same order, first to last, such that the resulting
+      // __days array with the same index points to a day, and that
+      // day's abbreviated form.
+      // NB: Also assumes that an abbreviated name is a subset of the name. 
+      if (!__err)
+	{
+	  size_t __pos = __traits_type::length(__days[__tmpwday]);
+	  __tp._M_days(__days);
+	  const char_type* __name = __days[__tmpwday];
+	  if (__name[__pos] == *__beg)
+	    {
+	      // Extract the rest of it.
+	      const size_t __len = __traits_type::length(__name);
+	      while (__pos < __len && __beg != __end 
+		     && __name[__pos] == *__beg)
+		++__beg, ++__pos;
+	      if (__len != __pos)
+		__err |= ios_base::failbit;
+	    }
+	  if (!__err)
+	    __tm->tm_wday = __tmpwday;
+	}
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+     }
+
+  template
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_monthname(iter_type __beg, iter_type __end,
+                     ios_base& __io, ios_base::iostate& __err, tm* __tm) const
+    {
+      typedef char_traits __traits_type;
+      locale __loc = __io.getloc();
+      __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+      const char_type*  __months[12];
+      __tp._M_months_abbreviated(__months);
+      int __tmpmon;
+      _M_extract_name(__beg, __end, __tmpmon, __months, 12, __err);
+
+      // Check to see if non-abbreviated name exists, and extract.
+      // NB: Assumes both _M_months and _M_months_abbreviated organized in
+      // exact same order, first to last, such that the resulting
+      // __months array with the same index points to a month, and that
+      // month's abbreviated form.
+      // NB: Also assumes that an abbreviated name is a subset of the name. 
+      if (!__err)
+	{
+	  size_t __pos = __traits_type::length(__months[__tmpmon]);
+	  __tp._M_months(__months);
+	  const char_type* __name = __months[__tmpmon];
+	  if (__name[__pos] == *__beg)
+	    {
+	      // Extract the rest of it.
+	      const size_t __len = __traits_type::length(__name);
+	      while (__pos < __len && __beg != __end 
+		     && __name[__pos] == *__beg)
+		++__beg, ++__pos;
+	      if (__len != __pos)
+		__err |= ios_base::failbit;
+	    }
+	  if (!__err)
+	    __tm->tm_mon = __tmpmon;
+	}
+ 
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template
+    _InIter
+    time_get<_CharT, _InIter>::
+    do_get_year(iter_type __beg, iter_type __end, ios_base& __io, 
+		ios_base::iostate& __err, tm* __tm) const
+    {
+      locale __loc = __io.getloc();
+      const ctype<_CharT>& __ctype = use_facet >(__loc); 
+
+      char_type __c = *__beg;
+      size_t __i = 0;
+      string __digits;
+      while (__i < 4 && __beg != __end && __ctype.is(ctype_base::digit, __c))
+	{
+	  __digits += __ctype.narrow(__c, 0);
+	  __c = *(++__beg);
+	  ++__i;
+	}
+      if (__i == 2 || __i == 4)
+	{
+	  long __l;
+	  __convert_to_v(__digits.c_str(), __l, __err, _S_c_locale);
+	  if (!(__err & ios_base::failbit) && __l <= INT_MAX)
+	    {
+	      __l = __i == 2 ? __l : __l - 1900; 
+	      __tm->tm_year = static_cast(__l);
+	    }
+	}
+      else
+	__err |= ios_base::failbit;
+      if (__beg == __end)
+	__err |= ios_base::eofbit;
+      return __beg;
+    }
+
+  template
+    _OutIter
+    time_put<_CharT, _OutIter>::
+    put(iter_type __s, ios_base& __io, char_type, const tm* __tm, 
+	const _CharT* __beg, const _CharT* __end) const
+    {
+      locale __loc = __io.getloc();
+      ctype<_CharT> const& __ctype = use_facet >(__loc);
+      while (__beg != __end)
+	{
+	  char __c = __ctype.narrow(*__beg, 0);
+	  ++__beg;
+	  if (__c == '%')
+	    {
+	      char __format;
+	      char __mod = 0;
+	      size_t __len = 1; 
+	      __c = __ctype.narrow(*__beg, 0);
+	      ++__beg;
+	      if (__c == 'E' || __c == 'O')
+		{
+		  __mod = __c;
+		  __format = __ctype.narrow(*__beg, 0);
+		  ++__beg;
+		}
+	      else
+		__format = __c;
+	      __s = this->do_put(__s, __io, char_type(), __tm, __format, 
+				 __mod);
+	    }
+	  else
+	    {
+	      *__s = __c;
+	      ++__s;
+	    }
+	}
+      return __s;
+    }
+
+  template
+    _OutIter
+    time_put<_CharT, _OutIter>::
+    do_put(iter_type __s, ios_base& __io, char_type, const tm* __tm, 
+	   char __format, char __mod) const
+    { 
+      locale __loc = __io.getloc();
+      ctype<_CharT> const& __ctype = use_facet >(__loc);
+      __timepunct<_CharT> const& __tp = use_facet<__timepunct<_CharT> >(__loc);
+
+      // NB: This size is arbitrary. Should this be a data member,
+      // initialized at construction?
+      const size_t __maxlen = 64;
+      char_type* __res =
+	static_cast(__builtin_alloca(sizeof(char_type) * __maxlen));
+
+      // NB: In IEE 1003.1-200x, and perhaps other locale models, it
+      // is possible that the format character will be longer than one
+      // character. Possibilities include 'E' or 'O' followed by a
+      // format character: if __mod is not the default argument, assume
+      // it's a valid modifier.
+      char_type __fmt[4];
+      __fmt[0] = __ctype.widen('%'); 
+      if (!__mod)
+	{
+	  __fmt[1] = __format;
+	  __fmt[2] = char_type();
+	}
+      else
+	{
+	  __fmt[1] = __mod;
+	  __fmt[2] = __format;
+	  __fmt[3] = char_type();
+	}
+
+      __tp._M_put(__res, __maxlen, __fmt, __tm);
+
+      // Write resulting, fully-formatted string to output iterator.
+      size_t __len = char_traits::length(__res);
+      for (size_t __i = 0; __i < __len; ++__i, ++__s)
+	*__s = __res[__i];
+      return __s;
+    }
+
+
+  // Generic version does nothing.
+  template
+    int
+    collate<_CharT>::_M_compare(const _CharT*, const _CharT*) const
+    { return 0; }
+
+  // Generic version does nothing.
+  template
+    size_t
+    collate<_CharT>::_M_transform(_CharT*, const _CharT*, size_t) const
+    { return 0; }
+
+  template
+    int
+    collate<_CharT>::
+    do_compare(const _CharT* __lo1, const _CharT* __hi1, 
+	       const _CharT* __lo2, const _CharT* __hi2) const
+    { 
+      const string_type __one(__lo1, __hi1);
+      const string_type __two(__lo2, __hi2);
+      return _M_compare(__one.c_str(), __two.c_str());
+    }
+
+ template
+    typename collate<_CharT>::string_type
+    collate<_CharT>::
+    do_transform(const _CharT* __lo, const _CharT* __hi) const
+    {
+      size_t __len = (__hi - __lo) * 2;
+      // First try a buffer perhaps big enough.
+      _CharT* __c =
+	static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __len));
+      size_t __res = _M_transform(__c, __lo, __len);
+      // If the buffer was not large enough, try again with the correct size.
+      if (__res >= __len)
+	{
+	  __c =
+	    static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__res + 1)));
+	  _M_transform(__c, __lo, __res + 1);
+	}
+      return string_type(__c);
+    }
+
+ template
+    long
+    collate<_CharT>::
+    do_hash(const _CharT* __lo, const _CharT* __hi) const
+    { 
+      unsigned long __val = 0;
+      for (; __lo < __hi; ++__lo)
+	__val = *__lo + ((__val << 7) | 
+		       (__val >> (numeric_limits::digits - 7)));
+      return static_cast(__val);
+    }
+
+  // Convert string to numeric value of type _Tv and store results.  
+  // NB: This is specialized for all required types, there is no
+  // generic definition.
+  template
+    void
+    __convert_to_v(const char* __in, _Tv& __out, ios_base::iostate& __err, 
+		   const __c_locale& __cloc, int __base = 10);
+
+  // Convert numeric value of type _Tv to string and return length of string.
+  // If snprintf is available use it, otherwise fall back to the unsafe sprintf
+  // which, in general, can be dangerous and should be avoided.
+#ifdef _GLIBCPP_USE_C99
+  template
+    int
+    __convert_from_v(char* __out, const int __size, const char* __fmt,
+		     _Tv __v, const __c_locale&, int __prec = -1)
+    {
+      int __ret;
+      const char* __old = setlocale(LC_ALL, "C");
+      if (__prec >= 0)
+        __ret = snprintf(__out, __size, __fmt, __prec, __v);
+      else
+        __ret = snprintf(__out, __size, __fmt, __v);
+      setlocale(LC_ALL, __old);
+      return __ret;
+    }
+#else
+  template
+    int
+    __convert_from_v(char* __out, const int, const char* __fmt, _Tv __v,
+		     const __c_locale&, int __prec = -1)
+    {
+      int __ret;
+      const char* __old = setlocale(LC_ALL, "C");
+      if (__prec >= 0)
+        __ret = sprintf(__out, __fmt, __prec, __v);
+      else
+        __ret = sprintf(__out, __fmt, __v);
+      setlocale(LC_ALL, __old);
+      return __ret;
+    }
+#endif
+
+  // Construct correctly padded string, as per 22.2.2.2.2
+  // Assumes 
+  // __newlen > __oldlen
+  // __news is allocated for __newlen size
+  // Used by both num_put and ostream inserters: if __num,
+  // internal-adjusted objects are padded according to the rules below
+  // concerning 0[xX] and +-, otherwise, exactly as right-adjusted
+  // ones are.
+  template
+    void
+    __pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds,
+	  const streamsize __newlen, const streamsize __oldlen, 
+	  const bool __num)
+    {
+      typedef _CharT	char_type;
+      typedef _Traits	traits_type;
+      typedef typename traits_type::int_type int_type;
+      
+      int_type __plen = static_cast(__newlen - __oldlen); 
+      char_type* __pads = static_cast(__builtin_alloca(sizeof(char_type) * __plen));
+      traits_type::assign(__pads, __plen, __fill); 
+
+      char_type* __beg;
+      char_type* __end;
+      size_t __mod = 0;
+      size_t __beglen; //either __plen or __oldlen
+      ios_base::fmtflags __adjust = __io.flags() & ios_base::adjustfield;
+
+      if (__adjust == ios_base::left)
+	{
+	  // Padding last.
+	  __beg = const_cast(__olds);
+	  __beglen = __oldlen;
+	  __end = __pads;
+	}
+      else if (__adjust == ios_base::internal && __num)
+	{
+	  // Pad after the sign, if there is one.
+	  // Pad after 0[xX], if there is one.
+	  // Who came up with these rules, anyway? Jeeze.
+          locale __loc = __io.getloc();
+	  const ctype<_CharT>& __ctype = use_facet >(__loc); 
+	  const char_type __minus = __ctype.widen('-');
+	  const char_type __plus = __ctype.widen('+');
+	  bool __testsign = __olds[0] == __minus || __olds[0] == __plus;
+	  bool __testhex = __ctype.widen('0') == __olds[0] 
+	                   && (__ctype.widen('x') == __olds[1] 
+			       || __ctype.widen('X') == __olds[1]);
+	  if (__testhex)
+	    {
+	      __news[0] = __olds[0]; 
+	      __news[1] = __olds[1];
+	      __mod += 2;
+	      __news += 2;
+	      __beg = __pads;
+	      __beglen = __plen;
+	      __end = const_cast(__olds + __mod);
+	    }
+	  else if (__testsign)
+	    {
+	      __news[0] = __olds[0] == __plus ? __plus : __minus;
+	      ++__mod;
+	      ++__news;
+	      __beg = __pads;
+	      __beglen = __plen;
+	      __end = const_cast(__olds + __mod);
+	    }
+	  else
+	    {
+	      // Padding first.
+	      __beg = __pads;
+	      __beglen = __plen;
+	      __end = const_cast(__olds);
+	    }
+	}
+      else
+	{
+	  // Padding first.
+	  __beg = __pads;
+	  __beglen = __plen;
+	  __end = const_cast(__olds);
+	}
+      traits_type::copy(__news, __beg, __beglen);
+      traits_type::copy(__news + __beglen, __end, __newlen - __beglen - __mod);
+    }
+
+  // NB: Can't have default argument on non-member template, and
+  // num_put doesn't have a _Traits template parameter, so this
+  // forwarding template adds in the default template argument.
+  template
+    void
+    __pad(ios_base& __io, _CharT __fill, _CharT* __news, const _CharT* __olds,
+	  const streamsize __newlen, const streamsize __oldlen, 
+	  const bool __num)
+    { 
+      return __pad<_CharT, char_traits<_CharT> >(__io, __fill, __news, __olds,
+						 __newlen, __oldlen, __num); 
+    }
+
+  // Used by both numeric and monetary facets.
+  // Check to make sure that the __grouping_tmp string constructed in
+  // money_get or num_get matches the canonical grouping for a given
+  // locale.
+  // __grouping_tmp is parsed L to R
+  // 1,222,444 == __grouping_tmp of "/1/3/3"
+  // __grouping is parsed R to L
+  // 1,222,444 == __grouping of "/3" == "/3/3/3"
+  template
+    bool
+    __verify_grouping(const basic_string<_CharT>& __grouping, 
+		      basic_string<_CharT>& __grouping_tmp)
+    {         
+      int __i = 0;
+      int __j = 0;
+      const int __len = __grouping.size();
+      const int __n = __grouping_tmp.size();
+      bool __test = true;
+      
+      // Parsed number groupings have to match the
+      // numpunct::grouping string exactly, starting at the
+      // right-most point of the parsed sequence of elements ...
+      while (__test && __i < __n - 1)
+	for (__j = 0; __test && __j < __len && __i < __n - 1; ++__j,++__i)
+	  __test &= __grouping[__j] == __grouping_tmp[__n - __i - 1];
+      // ... but the last parsed grouping can be <= numpunct
+      // grouping.
+      __j == __len ? __j = 0 : __j;
+      __test &= __grouping[__j] >= __grouping_tmp[__n - __i - 1];
+      return __test;
+    }
+
+  // Used by both numeric and monetary facets.
+  // Inserts "group separator" characters into an array of characters.
+  // It's recursive, one iteration per group.  It moves the characters
+  // in the buffer this way: "xxxx12345" -> "12,345xxx".  Call this
+  // only with __gbeg != __gend.
+  template
+    _CharT*
+    __add_grouping(_CharT* __s, _CharT __sep,  
+		   const char* __gbeg, const char* __gend, 
+		   const _CharT* __first, const _CharT* __last)
+    {
+      if (__last - __first > *__gbeg)
+        {
+          __s = __add_grouping(__s,  __sep, 
+			       (__gbeg + 1 == __gend ? __gbeg : __gbeg + 1),
+			       __gend, __first, __last - *__gbeg);
+          __first = __last - *__gbeg;
+          *__s++ = __sep;
+        }
+      do
+	*__s++ = *__first++;
+      while (__first != __last);
+      return __s;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB: This syntax is a GNU extension.
+  extern template class moneypunct;
+  extern template class moneypunct;
+  extern template class moneypunct_byname;
+  extern template class moneypunct_byname;
+  extern template class money_get;
+  extern template class money_put;
+  extern template class moneypunct;
+  extern template class moneypunct;
+  extern template class moneypunct_byname;
+  extern template class moneypunct_byname;
+  extern template class money_get;
+  extern template class money_put;
+  extern template class numpunct;
+  extern template class numpunct_byname;
+  extern template class num_get;
+  extern template class num_put; 
+  extern template class numpunct;
+  extern template class numpunct_byname;
+  extern template class num_get;
+  extern template class num_put;
+  extern template class __timepunct;
+  extern template class time_put;
+  extern template class time_put_byname;
+  extern template class time_get;
+  extern template class time_get_byname;
+  extern template class __timepunct;
+  extern template class time_put;
+  extern template class time_put_byname;
+  extern template class time_get;
+  extern template class time_get_byname;
+  extern template class messages;
+  extern template class messages_byname;
+  extern template class messages;
+  extern template class messages_byname;
+  extern template class ctype_byname;
+  extern template class ctype_byname;
+  extern template class codecvt_byname;
+  extern template class codecvt_byname;
+  extern template class collate;
+  extern template class collate_byname;
+  extern template class collate;
+  extern template class collate_byname;
+
+  extern template
+    const codecvt& 
+    use_facet >(const locale&);
+
+  extern template
+    const collate& 
+    use_facet >(const locale&);
+
+  extern template
+    const numpunct& 
+    use_facet >(const locale&);
+
+  extern template 
+    const num_put& 
+    use_facet >(const locale&);
+
+  extern template 
+    const num_get& 
+    use_facet >(const locale&);
+
+  extern template
+    const moneypunct& 
+    use_facet >(const locale&);
+
+  extern template
+    const moneypunct& 
+    use_facet >(const locale&);
+
+  extern template 
+    const money_put& 
+    use_facet >(const locale&);
+
+  extern template 
+    const money_get& 
+    use_facet >(const locale&);
+
+  extern template
+    const __timepunct& 
+    use_facet<__timepunct >(const locale&);
+
+  extern template 
+    const time_put& 
+    use_facet >(const locale&);
+
+  extern template 
+    const time_get& 
+    use_facet >(const locale&);
+
+  extern template 
+    const messages& 
+    use_facet >(const locale&);
+
+  extern template
+    const codecvt& 
+    use_facet >(locale const&);
+
+  extern template
+    const collate& 
+    use_facet >(const locale&);
+
+  extern template
+    const numpunct& 
+    use_facet >(const locale&);
+
+  extern template 
+    const num_put& 
+    use_facet >(const locale&);
+
+  extern template 
+    const num_get& 
+    use_facet >(const locale&);
+
+  extern template
+    const moneypunct& 
+    use_facet >(const locale&);
+
+  extern template
+    const moneypunct& 
+    use_facet >(const locale&);
+ 
+  extern template 
+    const money_put& 
+    use_facet >(const locale&);
+
+  extern template 
+    const money_get& 
+    use_facet >(const locale&);
+
+  extern template
+    const __timepunct& 
+    use_facet<__timepunct >(const locale&);
+
+  extern template 
+    const time_put& 
+    use_facet >(const locale&);
+
+  extern template 
+    const time_get& 
+    use_facet >(const locale&);
+
+  extern template 
+    const messages& 
+    use_facet >(const locale&);
+
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet<__timepunct >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+ extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet<__timepunct >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+
+  extern template 
+    bool
+    has_facet >(const locale&);
+} // namespace std
+
+#endif
+
+
diff --git a/contrib/libstdc++/include/bits/localefwd.h b/contrib/libstdc++/include/bits/localefwd.h
new file mode 100644
index 0000000..028c412
--- /dev/null
+++ b/contrib/libstdc++/include/bits/localefwd.h
@@ -0,0 +1,476 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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
+//
+
+/** @file localefwd.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_LOCCORE_H
+#define _CPP_BITS_LOCCORE_H	1
+
+#pragma GCC system_header
+
+#include 
+#include      // Defines __c_locale, config-specific includes
+#include 		// For CHAR_BIT
+#include 		// For isspace, etc.
+#include  		// For string.
+#include 
+#include 
+
+namespace std
+{
+  // 22.1.1 Locale
+  class locale;
+
+  // 22.1.3 Convenience interfaces
+  template 
+    inline bool 
+    isspace(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isprint(_CharT, const locale&);
+
+  template 
+    inline bool 
+    iscntrl(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isupper(_CharT, const locale&);
+
+  template 
+    inline bool 
+    islower(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isalpha(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isdigit(_CharT, const locale&);
+
+  template 
+    inline bool 
+    ispunct(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isxdigit(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isalnum(_CharT, const locale&);
+
+  template 
+    inline bool 
+    isgraph(_CharT, const locale&);
+
+  template 
+    inline _CharT 
+    toupper(_CharT, const locale&);
+
+  template 
+    inline _CharT 
+    tolower(_CharT, const locale&);
+
+
+  // 22.2.1 and 22.2.1.3 ctype
+  class ctype_base;
+  template 
+    class ctype;
+  template<> class ctype;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> class ctype;
+#endif
+  template 
+    class ctype_byname;
+  // NB: Specialized for char and wchar_t in locale_facets.h.
+
+  class codecvt_base;
+  class __enc_traits;
+  template
+    class codecvt;
+  template<> class codecvt;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> class codecvt;
+#endif
+  template
+    class codecvt_byname;
+
+  // 22.2.2 and 22.2.3 numeric
+  template >
+    class num_get;
+  template >
+    class num_put;
+  template class numpunct;
+  template class numpunct_byname;
+
+  // 22.2.4 collation
+  template 
+    class collate;
+  template class 
+    collate_byname;
+
+  // 22.2.5 date and time
+  class time_base;
+  template >
+    class time_get;
+  template >
+    class time_get_byname;
+  template >
+    class time_put;
+  template >
+    class time_put_byname;
+
+  // 22.2.6 money
+  class money_base;
+  template >
+    class money_get;
+  template >
+    class money_put;
+  template 
+    class moneypunct;
+  template 
+    class moneypunct_byname;
+
+  // 22.2.7 message retrieval
+  class messages_base;
+  template 
+    class messages;
+  template 
+    class messages_byname;
+
+  // 22.1.1 Class locale
+  class locale
+  {
+  public:
+    // Types:
+    typedef unsigned int 	category;
+
+    // Forward decls and friends:
+    class facet;
+    class id;
+    class _Impl;
+
+    friend class facet;
+    friend class _Impl;
+
+    template
+      friend const _Facet& 
+      use_facet(const locale&);
+    
+    template
+      friend bool 
+      has_facet(const locale&) throw();
+ 
+    // Category values:
+    // NB: Order must match _S_facet_categories definition in locale.cc
+    static const category none		= 0;
+    static const category ctype 	= 1L << 0;
+    static const category numeric 	= 1L << 1;
+    static const category collate  	= 1L << 2;
+    static const category time 		= 1L << 3;
+    static const category monetary 	= 1L << 4;
+    static const category messages 	= 1L << 5;
+    static const category all 		= (collate | ctype | monetary |
+				 	   numeric | time  | messages);
+
+    // Construct/copy/destroy:
+    locale() throw();
+
+    locale(const locale& __other) throw();
+
+    explicit  
+    locale(const char* __s);
+
+    locale(const locale& __base, const char* __s, category __cat);
+
+    locale(const locale& __base, const locale& __add, category __cat);
+
+    template
+      locale(const locale& __other, _Facet* __f);
+
+    ~locale() throw();
+
+    const locale&  
+    operator=(const locale& __other) throw();
+
+    template
+      locale  
+      combine(const locale& __other) const;
+
+    // Locale operations:
+    string 
+    name() const;
+
+    bool 
+    operator==(const locale& __other) const throw ();
+
+    inline bool  
+    operator!=(const locale& __other) const throw ()
+    { return !(this->operator==(__other));  }
+
+    template
+      bool  
+      operator()(const basic_string<_Char, _Traits, _Alloc>& __s1,
+		 const basic_string<_Char, _Traits, _Alloc>& __s2) const;
+
+    // Global locale objects:
+    static locale 
+    global(const locale&);
+
+    static const locale& 
+    classic();
+
+  private:
+    // The (shared) implementation
+    _Impl* 		_M_impl;  
+
+    // The "C" reference locale
+    static _Impl* 	_S_classic; 
+
+    // Current global reference locale
+    static _Impl* 	_S_global;  
+
+    static const size_t	_S_num_categories = 6;
+
+    explicit 
+    locale(_Impl*) throw();
+
+    static inline void  
+    _S_initialize()
+    { 
+      if (!_S_classic) 
+	classic();  
+    }
+
+    static category  
+    _S_normalize_category(category);
+
+    void
+    _M_coalesce(const locale& __base, const locale& __add, category __cat);
+  };
+
+
+  // Implementation object for locale 
+  class locale::_Impl
+  {
+  public:
+    // Friends.
+    friend class locale;
+    friend class locale::facet;
+
+    template
+      friend const _Facet&  
+      use_facet(const locale&);
+
+    template
+      friend bool  
+      has_facet(const locale&) throw();
+
+  private:
+    // Data Members.
+    _Atomic_word			_M_references;
+    facet** 				_M_facets;
+    size_t 				_M_facets_size;
+    const char* 			_M_names[_S_num_categories];
+    static const locale::id* const 	_S_id_ctype[];
+    static const locale::id* const 	_S_id_numeric[];
+    static const locale::id* const 	_S_id_collate[];
+    static const locale::id* const 	_S_id_time[];
+    static const locale::id* const 	_S_id_monetary[];
+    static const locale::id* const 	_S_id_messages[];
+    static const locale::id* const* const _S_facet_categories[];
+
+    inline void 
+    _M_add_reference() throw()
+    { __atomic_add(&_M_references, 1); }
+
+    inline void 
+    _M_remove_reference() throw()
+    {
+      if (__exchange_and_add(&_M_references, -1) == 1)
+	{
+	  try 
+	    { delete this; } 
+	  catch(...) 
+	    { }
+	}
+    }
+
+    _Impl(const _Impl&, size_t);
+    _Impl(const char*, size_t);
+    _Impl(facet**, size_t, bool);
+
+   ~_Impl() throw();
+
+    _Impl(const _Impl&);  // Not defined.
+
+    void 
+    operator=(const _Impl&);  // Not defined.
+
+    inline bool
+    _M_check_same_name()
+    {
+      bool __ret = true;
+      for (size_t i = 0; __ret && i < _S_num_categories - 1; ++i)
+	__ret &= (strcmp(_M_names[i], _M_names[i + 1]) == 0);
+      return __ret;
+    }
+
+    void 
+    _M_replace_categories(const _Impl*, category);
+
+    void 
+    _M_replace_category(const _Impl*, const locale::id* const*);
+
+    void 
+    _M_replace_facet(const _Impl*, const locale::id*);
+
+    void 
+    _M_install_facet(const locale::id*, facet*);
+
+    template
+      inline void 
+      _M_init_facet(_Facet* __facet)
+      { _M_install_facet(&_Facet::id, __facet);  }
+  };
+
+  template
+    locale::locale(const locale& __other, _Facet* __f)
+    {
+      _M_impl = new _Impl(*__other._M_impl, 1);
+      _M_impl->_M_install_facet(&_Facet::id, __f);
+      for (size_t __i = 0; __i < _S_num_categories; ++__i)
+	_M_impl->_M_names[__i] = "*";
+    }
+
+  // 22.1.1.1.2  Class locale::facet
+  class locale::facet
+  {
+  private:
+    friend class locale;
+    friend class locale::_Impl;
+
+    _Atomic_word _M_references;
+
+  protected:
+    // Contains data from the underlying "C" library for default "C"
+    // or "POSIX" locale.
+    static __c_locale		     _S_c_locale;
+    
+    explicit 
+    facet(size_t __refs = 0) throw();
+
+    virtual 
+    ~facet();
+
+    static void
+    _S_create_c_locale(__c_locale& __cloc, const char* __s, 
+		       __c_locale __old = 0);
+
+    static __c_locale
+    _S_clone_c_locale(__c_locale& __cloc);
+
+    static void
+    _S_destroy_c_locale(__c_locale& __cloc);
+
+  private:
+    void 
+    _M_add_reference() throw();
+
+    void 
+    _M_remove_reference() throw();
+
+    facet(const facet&);  // Not defined.
+
+    void 
+    operator=(const facet&);  // Not defined.
+  };
+
+
+  // 22.1.1.1.3 Class locale::id
+  class locale::id
+  {
+  private:
+    friend class locale;
+    friend class locale::_Impl;
+    template
+      friend const _Facet&  
+      use_facet(const locale&);
+    template
+      friend bool           
+      has_facet(const locale&) throw ();
+
+    // NB: There is no accessor for _M_index because it may be used
+    // before the constructor is run; the effect of calling a member
+    // function (even an inline) would be undefined.
+    mutable size_t 		_M_index;
+
+    // Last id number assigned.
+    static _Atomic_word 	_S_highwater;   
+
+    void 
+    operator=(const id&);  // Not defined.
+
+    id(const id&);  // Not defined.
+
+  public:
+    // NB: This class is always a static data member, and thus can be
+    // counted on to be zero-initialized.
+    id();
+
+    inline size_t
+    _M_id() const
+    {
+      if (!_M_index)
+	_M_index = 1 + __exchange_and_add(&_S_highwater, 1);
+      return _M_index - 1;
+    }
+  };
+
+  template
+    const _Facet&
+    use_facet(const locale& __loc);
+
+  template
+    bool
+    has_facet(const locale& __loc) throw();
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/mask_array.h b/contrib/libstdc++/include/bits/mask_array.h
new file mode 100644
index 0000000..13c01d3
--- /dev/null
+++ b/contrib/libstdc++/include/bits/mask_array.h
@@ -0,0 +1,167 @@
+// The template and inlines for the -*- C++ -*- mask_array class.
+
+// Copyright (C) 1997-2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file mask_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_MASK_ARRAY_H
+#define _CPP_BITS_MASK_ARRAY_H 1
+
+#pragma GCC system_header
+
+namespace std {
+
+    template  class mask_array
+    { 
+    public:
+        typedef _Tp value_type;
+    
+        void operator=  (const valarray<_Tp>&) const;
+        void operator*= (const valarray<_Tp>&) const;
+        void operator/= (const valarray<_Tp>&) const;
+        void operator%= (const valarray<_Tp>&) const;
+        void operator+= (const valarray<_Tp>&) const; 
+        void operator-= (const valarray<_Tp>&) const;
+        void operator^= (const valarray<_Tp>&) const;  
+        void operator&= (const valarray<_Tp>&) const;
+        void operator|= (const valarray<_Tp>&) const;
+        void operator<<=(const valarray<_Tp>&) const;  
+        void operator>>=(const valarray<_Tp>&) const; 
+        void operator= (const _Tp&);
+    
+        //        ~mask_array ();
+        
+        template
+        void operator=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator*= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator/= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator%= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator+= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator-= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator^= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator&= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator|= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator<<=(const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator>>=(const _Expr<_Dom,_Tp>&) const; 
+
+    private:
+        mask_array (_Array<_Tp>, size_t, _Array);
+        friend class valarray<_Tp>;
+        
+        const size_t       _M_sz;
+        const _Array _M_mask;
+        const _Array<_Tp>   _M_array;
+        
+        mask_array (const mask_array&);
+        
+        // not implemented
+        mask_array ();
+        mask_array& operator= (const mask_array&);
+    };
+
+
+    template
+    inline mask_array<_Tp>::mask_array (const mask_array<_Tp>& a)
+            : _M_sz (a._M_sz), _M_mask (a._M_mask), _M_array (a._M_array) {}
+
+    template
+    inline 
+    mask_array<_Tp>::mask_array (_Array<_Tp> __a, size_t __s, _Array __m)
+            : _M_sz (__s), _M_mask (__m), _M_array (__a) {}
+    
+    //    template
+    //    inline mask_array<_Tp>::~mask_array () {}
+    
+    template
+    inline void
+    mask_array<_Tp>::operator= (const _Tp& __t)
+    { __valarray_fill (_M_array, _M_sz, _M_mask, __t); }
+    
+    template
+    inline void
+    mask_array<_Tp>::operator= (const valarray<_Tp>& __v) const
+    { __valarray_copy (_Array<_Tp> (__v), __v.size (), _M_array, _M_mask); }
+
+    template
+    template
+    inline void
+    mask_array<_Tp>::operator= (const _Expr& __e) const
+    { __valarray_copy (__e, __e.size (), _M_array, _M_mask); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(op, name)				\
+template							\
+inline void								\
+mask_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const	\
+{									\
+  _Array_augmented_##name (_M_array, _M_mask, 				\
+                           _Array<_Tp> (__v), __v.size ());		\
+}									\
+									\
+template template				\
+inline void								\
+mask_array<_Tp>::operator op##= (const _Expr& __e) const	\
+{									\
+  _Array_augmented_##name (_M_array, _M_mask, __e, __e.size ());	\
+}
+
+_DEFINE_VALARRAY_OPERATOR(*, multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, divides)
+_DEFINE_VALARRAY_OPERATOR(%, modulus)
+_DEFINE_VALARRAY_OPERATOR(+, plus)
+_DEFINE_VALARRAY_OPERATOR(-, minus)
+_DEFINE_VALARRAY_OPERATOR(^, xor)
+_DEFINE_VALARRAY_OPERATOR(&, and)
+_DEFINE_VALARRAY_OPERATOR(|, or)
+_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR    
+    
+} // std::
+
+#endif /* _CPP_BITS_MASK_ARRAY_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/ostream.tcc b/contrib/libstdc++/include/bits/ostream.tcc
new file mode 100644
index 0000000..d15b9f2
--- /dev/null
+++ b/contrib/libstdc++/include/bits/ostream.tcc
@@ -0,0 +1,704 @@
+// ostream classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.2  Output streams
+//
+
+#pragma GCC system_header
+
+#include 
+
+namespace std 
+{
+  template
+    basic_ostream<_CharT, _Traits>::sentry::
+    sentry(basic_ostream<_CharT,_Traits>& __os)
+    : _M_ok(__os.good()), _M_os(__os)
+    {
+      // XXX MT 
+      if (_M_ok && __os.tie())
+	__os.tie()->flush();  
+    }
+  
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::
+    operator<<(__ostream_type& (*__pf)(__ostream_type&))
+    {
+      sentry __cerb(*this);
+      if (__cerb)
+	{ 
+	  try 
+	    { __pf(*this); }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.2.5.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+  
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::
+    operator<<(__ios_type& (*__pf)(__ios_type&))
+    {
+      sentry __cerb(*this);
+      if (__cerb)
+	{ 
+	  try 
+	    { __pf(*this); }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.2.5.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::
+    operator<<(ios_base& (*__pf)(ios_base&))
+    {
+      sentry __cerb(*this);
+      if (__cerb)
+	{ 
+	  try 
+	    { __pf(*this); }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.2.5.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(__streambuf_type* __sbin)
+    {
+      sentry __cerb(*this);
+      if (__cerb)
+	{
+	  try
+	    {
+	      streamsize __xtrct = 0;
+	      if (__sbin)
+		{
+		  __streambuf_type* __sbout = this->rdbuf();
+		  __xtrct = __copy_streambufs(*this, __sbin, __sbout);
+		}
+	      else
+		this->setstate(ios_base::badbit);
+	      if (!__xtrct)
+		this->setstate(ios_base::failbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.2.5.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(bool __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      if (_M_check_facet(_M_fnumput))
+		if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
+		  this->setstate(ios_base::badbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(long __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      char_type __c = this->fill();
+	      ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+	      if (_M_check_facet(_M_fnumput))
+		{
+		  bool __b = false;
+		  if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
+		    {
+		      unsigned long __l = static_cast(__n);
+		      __b = _M_fnumput->put(*this, *this, __c, __l).failed();
+		    }
+		  else
+		    __b = _M_fnumput->put(*this, *this, __c, __n).failed();
+		  if (__b)  
+		    this->setstate(ios_base::badbit);
+		}
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(unsigned long __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      if (_M_check_facet(_M_fnumput))
+		if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
+		  this->setstate(ios_base::badbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(long long __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      char_type __c = this->fill();
+	      ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+	      if (_M_check_facet(_M_fnumput))
+		{
+		  bool __b = false;
+		  if ((__fmt & ios_base::oct) || (__fmt & ios_base::hex))
+		    {
+		      unsigned long long __l;
+		      __l = static_cast(__n);
+		      __b = _M_fnumput->put(*this, *this, __c, __l).failed();
+		    }
+		  else
+		    __b = _M_fnumput->put(*this, *this, __c, __n).failed();
+		  if (__b)  
+		    this->setstate(ios_base::badbit);
+		}
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(unsigned long long __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      if (_M_check_facet(_M_fnumput))
+		if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
+		  this->setstate(ios_base::badbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+#endif
+  
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(double __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      if (_M_check_facet(_M_fnumput))
+		if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
+		  this->setstate(ios_base::badbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+  
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(long double __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      if (_M_check_facet(_M_fnumput))
+		if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
+		  this->setstate(ios_base::badbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    basic_ostream<_CharT, _Traits>::operator<<(const void* __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  try 
+	    {
+	      if (_M_check_facet(_M_fnumput))
+		if (_M_fnumput->put(*this, *this, this->fill(), __n).failed())
+		  this->setstate(ios_base::badbit);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      this->setstate(ios_base::badbit);
+	      if ((this->exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::put(char_type __c)
+    { 
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  int_type __put = rdbuf()->sputc(__c); 
+	  if (traits_type::eq_int_type(__put, traits_type::eof()))
+	    this->setstate(ios_base::badbit);
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::write(const _CharT* __s, streamsize __n)
+    {
+      sentry __cerb(*this);
+      if (__cerb)
+	{
+	  streamsize __put = this->rdbuf()->sputn(__s, __n);
+	  if ( __put != __n)
+	    this->setstate(ios_base::badbit);
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::flush()
+    {
+      sentry __cerb(*this);
+      if (__cerb) 
+	{
+	  if (this->rdbuf() && this->rdbuf()->pubsync() == -1)
+	    this->setstate(ios_base::badbit);
+	}
+      return *this;
+    }
+  
+  template
+    typename basic_ostream<_CharT, _Traits>::pos_type
+    basic_ostream<_CharT, _Traits>::tellp()
+    {
+      pos_type __ret = pos_type(-1);
+      if (!this->fail())
+	__ret = this->rdbuf()->pubseekoff(0, ios_base::cur, ios_base::out);
+      return __ret;
+    }
+
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::seekp(pos_type __pos)
+    {
+      if (!this->fail())
+	{
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 136.  seekp, seekg setting wrong streams?
+	  pos_type __err = this->rdbuf()->pubseekpos(__pos, ios_base::out);
+
+// 129. Need error indication from seekp() and seekg()
+	  if (__err == pos_type(off_type(-1)))
+	    this->setstate(ios_base::failbit);
+#endif
+	}
+      return *this;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    basic_ostream<_CharT, _Traits>::
+    seekp(off_type __off, ios_base::seekdir __d)
+    {
+      if (!this->fail())
+	{
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 136.  seekp, seekg setting wrong streams?
+	  pos_type __err = this->rdbuf()->pubseekoff(__off, __d, 
+						     ios_base::out);
+
+// 129. Need error indication from seekp() and seekg()
+	  if (__err == pos_type(off_type(-1)))
+	    this->setstate(ios_base::failbit);
+#endif
+	}
+      return *this;
+    }
+
+  // 27.6.2.5.4 Character inserters.
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
+    {
+      typedef basic_ostream<_CharT, _Traits> __ostream_type;
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  try 
+	    {
+	      streamsize __w = __out.width();
+	      _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__w + 1)));
+	      __pads[0] = __c;
+	      streamsize __len = 1;
+	      if (__w > __len)
+		{
+		  __pad(__out, __out.fill(), __pads, &__c, __w, __len, false);
+		  __len = __w;
+		}
+	      __out.write(__pads, __len);
+	      __out.width(0);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __out.setstate(ios_base::badbit);
+	      if ((__out.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __out;
+    }
+  
+  // Specializations.
+  template  
+    basic_ostream&
+    operator<<(basic_ostream& __out, char __c)
+    {
+      typedef basic_ostream __ostream_type;
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  try 
+	    {
+	      streamsize __w = __out.width();
+	      char* __pads = static_cast(__builtin_alloca(__w + 1));
+	      __pads[0] = __c;
+	      streamsize __len = 1;
+	      if (__w > __len)
+		{
+		  __pad(__out, __out.fill(), __pads, &__c, __w, __len, false);
+		  __len = __w;
+		}
+	      __out.write(__pads, __len);
+	      __out.width(0);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __out.setstate(ios_base::badbit);
+	      if ((__out.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __out;
+     }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
+    {
+      typedef basic_ostream<_CharT, _Traits> __ostream_type;
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  try 
+	    {
+	      streamsize __w = __out.width();
+	      _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
+	      streamsize __len = static_cast(_Traits::length(__s));
+	      if (__w > __len)
+		{
+		  __pad(__out, __out.fill(), __pads, __s, __w, __len, false);
+		  __s = __pads;
+		  __len = __w;
+		}
+	      __out.write(__s, __len);
+	      __out.width(0);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __out.setstate(ios_base::badbit);
+	      if ((__out.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __out;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
+    {
+      typedef basic_ostream<_CharT, _Traits> __ostream_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 167.  Improper use of traits_type::length()
+// Note that this is only in 'Review' status.
+      typedef char_traits		     __ctraits_type;
+#endif
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  size_t __clen = __ctraits_type::length(__s);
+	  _CharT* __ws = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * (__clen + 1)));
+	  for (size_t  __i = 0; __i <= __clen; ++__i)
+	    __ws[__i] = __out.widen(__s[__i]);
+	  _CharT* __str = __ws;
+	  
+	  try 
+	    {
+	      streamsize __len = static_cast(__clen);
+	      streamsize __w = __out.width();
+	      _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
+	      
+	      if (__w > __len)
+		{
+		  __pad(__out, __out.fill(), __pads, __ws, __w, __len, false);
+		  __str = __pads;
+		  __len = __w;
+		}
+	      __out.write(__str, __len);
+	      __out.width(0);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __out.setstate(ios_base::badbit);
+	      if ((__out.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __out;
+    }
+
+  // Partial specializations.
+  template
+    basic_ostream&
+    operator<<(basic_ostream& __out, const char* __s)
+    {
+      typedef basic_ostream __ostream_type;
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  try 
+	    {
+	      streamsize __w = __out.width();
+	      char* __pads = static_cast(__builtin_alloca(__w));
+	      streamsize __len = static_cast(_Traits::length(__s));
+	      if (__w > __len)
+		{
+		  __pad(__out, __out.fill(), __pads, __s, __w, __len, false);
+		  __s = __pads;
+		  __len = __w;
+		}
+	      __out.write(__s, __len);
+	      __out.width(0);
+	    }
+	  catch(exception& __fail)
+	    {
+	      // 27.6.1.2.1 Common requirements.
+	      // Turn this on without causing an ios::failure to be thrown.
+	      __out.setstate(ios_base::badbit);
+	      if ((__out.exceptions() & ios_base::badbit) != 0)
+		__throw_exception_again;
+	    }
+	}
+      return __out;
+    }
+
+  // 21.3.7.9 basic_string::operator<<
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out,
+	       const basic_string<_CharT, _Traits, _Alloc>& __str)
+    { 
+      typedef basic_ostream<_CharT, _Traits> __ostream_type;
+      typename __ostream_type::sentry __cerb(__out);
+      if (__cerb)
+	{
+	  const _CharT* __s = __str.data();
+	  streamsize __w = __out.width();
+	  _CharT* __pads = static_cast<_CharT*>(__builtin_alloca(sizeof(_CharT) * __w));
+	  streamsize __len = static_cast(__str.size());
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+	  // 25. String operator<< uses width() value wrong
+#endif
+	  if (__w > __len)
+	    {
+	      __pad(__out, __out.fill(), __pads, __s, __w, __len, false);
+	      __s = __pads;
+	      __len = __w;
+	    }
+	  streamsize __res = __out.rdbuf()->sputn(__s, __len);
+	  __out.width(0);
+	  if (__res != __len)
+	    __out.setstate(ios_base::failbit);
+	}
+      return __out;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template class basic_ostream;
+  extern template ostream& endl(ostream&);
+  extern template ostream& ends(ostream&);
+  extern template ostream& flush(ostream&);
+  extern template ostream& operator<<(ostream&, char);
+  extern template ostream& operator<<(ostream&, unsigned char);
+  extern template ostream& operator<<(ostream&, signed char);
+  extern template ostream& operator<<(ostream&, const char*);
+  extern template ostream& operator<<(ostream&, const unsigned char*);
+  extern template ostream& operator<<(ostream&, const signed char*);
+
+  extern template class basic_ostream;
+  extern template wostream& endl(wostream&);
+  extern template wostream& ends(wostream&);
+  extern template wostream& flush(wostream&);
+  extern template wostream& operator<<(wostream&, wchar_t);
+  extern template wostream& operator<<(wostream&, char);
+  extern template wostream& operator<<(wostream&, const wchar_t*);
+  extern template wostream& operator<<(wostream&, const char*);
+} // namespace std
diff --git a/contrib/libstdc++/include/bits/pthread_allocimpl.h b/contrib/libstdc++/include/bits/pthread_allocimpl.h
new file mode 100644
index 0000000..050b206
--- /dev/null
+++ b/contrib/libstdc++/include/bits/pthread_allocimpl.h
@@ -0,0 +1,525 @@
+// POSIX thread-related memory allocation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file pthread_allocimpl.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_PTHREAD_ALLOCIMPL_H
+#define _CPP_BITS_PTHREAD_ALLOCIMPL_H 1
+
+// Pthread-specific node allocator.
+// This is similar to the default allocator, except that free-list
+// information is kept separately for each thread, avoiding locking.
+// This should be reasonably fast even in the presence of threads.
+// The down side is that storage may not be well-utilized.
+// It is not an error to allocate memory in thread A and deallocate
+// it in thread B.  But this effectively transfers ownership of the memory,
+// so that it can only be reallocated by thread B.  Thus this can effectively
+// result in a storage leak if it's done on a regular basis.
+// It can also result in frequent sharing of
+// cache lines among processors, with potentially serious performance
+// consequences.
+
+#include 
+#include 
+#include 
+#ifndef __RESTRICT
+#  define __RESTRICT
+#endif
+
+#include 
+
+namespace std
+{
+
+#define __STL_DATA_ALIGNMENT 8
+
+union _Pthread_alloc_obj {
+    union _Pthread_alloc_obj * __free_list_link;
+    char __client_data[__STL_DATA_ALIGNMENT];    /* The client sees this.    */
+};
+
+// Pthread allocators don't appear to the client to have meaningful
+// instances.  We do in fact need to associate some state with each
+// thread.  That state is represented by
+// _Pthread_alloc_per_thread_state<_Max_size>.
+
+template
+struct _Pthread_alloc_per_thread_state {
+  typedef _Pthread_alloc_obj __obj;
+  enum { _S_NFREELISTS = _Max_size/__STL_DATA_ALIGNMENT };
+  _Pthread_alloc_obj* volatile __free_list[_S_NFREELISTS]; 
+  _Pthread_alloc_per_thread_state<_Max_size> * __next; 
+	// Free list link for list of available per thread structures.
+  	// When one of these becomes available for reuse due to thread
+	// termination, any objects in its free list remain associated
+	// with it.  The whole structure may then be used by a newly
+	// created thread.
+  _Pthread_alloc_per_thread_state() : __next(0)
+  {
+    memset((void *)__free_list, 0, (size_t) _S_NFREELISTS * sizeof(__obj *));
+  }
+  // Returns an object of size __n, and possibly adds to size n free list.
+  void *_M_refill(size_t __n);
+};
+
+// Pthread-specific allocator.
+// The argument specifies the largest object size allocated from per-thread
+// free lists.  Larger objects are allocated using malloc_alloc.
+// Max_size must be a power of 2.
+template 
+class _Pthread_alloc_template {
+
+public: // but only for internal use:
+
+  typedef _Pthread_alloc_obj __obj;
+
+  // Allocates a chunk for nobjs of size size.  nobjs may be reduced
+  // if it is inconvenient to allocate the requested number.
+  static char *_S_chunk_alloc(size_t __size, int &__nobjs);
+
+  enum {_S_ALIGN = __STL_DATA_ALIGNMENT};
+
+  static size_t _S_round_up(size_t __bytes) {
+    return (((__bytes) + (int) _S_ALIGN-1) & ~((int) _S_ALIGN - 1));
+  }
+  static size_t _S_freelist_index(size_t __bytes) {
+    return (((__bytes) + (int) _S_ALIGN-1)/(int)_S_ALIGN - 1);
+  }
+
+private:
+  // Chunk allocation state. And other shared state.
+  // Protected by _S_chunk_allocator_lock.
+  static pthread_mutex_t _S_chunk_allocator_lock;
+  static char *_S_start_free;
+  static char *_S_end_free;
+  static size_t _S_heap_size;
+  static _Pthread_alloc_per_thread_state<_Max_size>* _S_free_per_thread_states;
+  static pthread_key_t _S_key;
+  static bool _S_key_initialized;
+        // Pthread key under which per thread state is stored. 
+        // Allocator instances that are currently unclaimed by any thread.
+  static void _S_destructor(void *instance);
+        // Function to be called on thread exit to reclaim per thread
+        // state.
+  static _Pthread_alloc_per_thread_state<_Max_size> *_S_new_per_thread_state();
+        // Return a recycled or new per thread state.
+  static _Pthread_alloc_per_thread_state<_Max_size> *_S_get_per_thread_state();
+        // ensure that the current thread has an associated
+        // per thread state.
+  class _M_lock;
+  friend class _M_lock;
+  class _M_lock {
+      public:
+        _M_lock () { pthread_mutex_lock(&_S_chunk_allocator_lock); }
+        ~_M_lock () { pthread_mutex_unlock(&_S_chunk_allocator_lock); }
+  };
+
+public:
+
+  /* n must be > 0      */
+  static void * allocate(size_t __n)
+  {
+    __obj * volatile * __my_free_list;
+    __obj * __RESTRICT __result;
+    _Pthread_alloc_per_thread_state<_Max_size>* __a;
+
+    if (__n > _Max_size) {
+        return(malloc_alloc::allocate(__n));
+    }
+    if (!_S_key_initialized ||
+        !(__a = (_Pthread_alloc_per_thread_state<_Max_size>*)
+                                 pthread_getspecific(_S_key))) {
+        __a = _S_get_per_thread_state();
+    }
+    __my_free_list = __a -> __free_list + _S_freelist_index(__n);
+    __result = *__my_free_list;
+    if (__result == 0) {
+        void *__r = __a -> _M_refill(_S_round_up(__n));
+        return __r;
+    }
+    *__my_free_list = __result -> __free_list_link;
+    return (__result);
+  };
+
+  /* p may not be 0 */
+  static void deallocate(void *__p, size_t __n)
+  {
+    __obj *__q = (__obj *)__p;
+    __obj * volatile * __my_free_list;
+    _Pthread_alloc_per_thread_state<_Max_size>* __a;
+
+    if (__n > _Max_size) {
+        malloc_alloc::deallocate(__p, __n);
+        return;
+    }
+    if (!_S_key_initialized ||
+        !(__a = (_Pthread_alloc_per_thread_state<_Max_size> *)
+                pthread_getspecific(_S_key))) {
+        __a = _S_get_per_thread_state();
+    }
+    __my_free_list = __a->__free_list + _S_freelist_index(__n);
+    __q -> __free_list_link = *__my_free_list;
+    *__my_free_list = __q;
+  }
+
+  static void * reallocate(void *__p, size_t __old_sz, size_t __new_sz);
+
+} ;
+
+typedef _Pthread_alloc_template<> pthread_alloc;
+
+
+template 
+void _Pthread_alloc_template<_Max_size>::_S_destructor(void * __instance)
+{
+    _M_lock __lock_instance;	// Need to acquire lock here.
+    _Pthread_alloc_per_thread_state<_Max_size>* __s =
+        (_Pthread_alloc_per_thread_state<_Max_size> *)__instance;
+    __s -> __next = _S_free_per_thread_states;
+    _S_free_per_thread_states = __s;
+}
+
+template 
+_Pthread_alloc_per_thread_state<_Max_size> *
+_Pthread_alloc_template<_Max_size>::_S_new_per_thread_state()
+{    
+    /* lock already held here.	*/
+    if (0 != _S_free_per_thread_states) {
+        _Pthread_alloc_per_thread_state<_Max_size> *__result =
+					_S_free_per_thread_states;
+        _S_free_per_thread_states = _S_free_per_thread_states -> __next;
+        return __result;
+    } else {
+        return new _Pthread_alloc_per_thread_state<_Max_size>;
+    }
+}
+
+template 
+_Pthread_alloc_per_thread_state<_Max_size> *
+_Pthread_alloc_template<_Max_size>::_S_get_per_thread_state()
+{
+    /*REFERENCED*/
+    _M_lock __lock_instance;	// Need to acquire lock here.
+    int __ret_code;
+    _Pthread_alloc_per_thread_state<_Max_size> * __result;
+    if (!_S_key_initialized) {
+        if (pthread_key_create(&_S_key, _S_destructor)) {
+	    std::__throw_bad_alloc();  // defined in funcexcept.h
+        }
+        _S_key_initialized = true;
+    }
+    __result = _S_new_per_thread_state();
+    __ret_code = pthread_setspecific(_S_key, __result);
+    if (__ret_code) {
+      if (__ret_code == ENOMEM) {
+	std::__throw_bad_alloc();
+      } else {
+	// EINVAL
+	abort();
+      }
+    }
+    return __result;
+}
+
+/* We allocate memory in large chunks in order to avoid fragmenting     */
+/* the malloc heap too much.                                            */
+/* We assume that size is properly aligned.                             */
+template 
+char *_Pthread_alloc_template<_Max_size>
+::_S_chunk_alloc(size_t __size, int &__nobjs)
+{
+  {
+    char * __result;
+    size_t __total_bytes;
+    size_t __bytes_left;
+    /*REFERENCED*/
+    _M_lock __lock_instance;         // Acquire lock for this routine
+
+    __total_bytes = __size * __nobjs;
+    __bytes_left = _S_end_free - _S_start_free;
+    if (__bytes_left >= __total_bytes) {
+        __result = _S_start_free;
+        _S_start_free += __total_bytes;
+        return(__result);
+    } else if (__bytes_left >= __size) {
+        __nobjs = __bytes_left/__size;
+        __total_bytes = __size * __nobjs;
+        __result = _S_start_free;
+        _S_start_free += __total_bytes;
+        return(__result);
+    } else {
+        size_t __bytes_to_get =
+		2 * __total_bytes + _S_round_up(_S_heap_size >> 4);
+        // Try to make use of the left-over piece.
+        if (__bytes_left > 0) {
+            _Pthread_alloc_per_thread_state<_Max_size>* __a = 
+                (_Pthread_alloc_per_thread_state<_Max_size>*)
+			pthread_getspecific(_S_key);
+            __obj * volatile * __my_free_list =
+                        __a->__free_list + _S_freelist_index(__bytes_left);
+
+            ((__obj *)_S_start_free) -> __free_list_link = *__my_free_list;
+            *__my_free_list = (__obj *)_S_start_free;
+        }
+#       ifdef _SGI_SOURCE
+          // Try to get memory that's aligned on something like a
+          // cache line boundary, so as to avoid parceling out
+          // parts of the same line to different threads and thus
+          // possibly different processors.
+          {
+            const int __cache_line_size = 128;  // probable upper bound
+            __bytes_to_get &= ~(__cache_line_size-1);
+            _S_start_free = (char *)memalign(__cache_line_size, __bytes_to_get); 
+            if (0 == _S_start_free) {
+              _S_start_free = (char *)malloc_alloc::allocate(__bytes_to_get);
+            }
+          }
+#       else  /* !SGI_SOURCE */
+          _S_start_free = (char *)malloc_alloc::allocate(__bytes_to_get);
+#       endif
+        _S_heap_size += __bytes_to_get;
+        _S_end_free = _S_start_free + __bytes_to_get;
+    }
+  }
+  // lock is released here
+  return(_S_chunk_alloc(__size, __nobjs));
+}
+
+
+/* Returns an object of size n, and optionally adds to size n free list.*/
+/* We assume that n is properly aligned.                                */
+/* We hold the allocation lock.                                         */
+template 
+void *_Pthread_alloc_per_thread_state<_Max_size>
+::_M_refill(size_t __n)
+{
+    int __nobjs = 128;
+    char * __chunk =
+	_Pthread_alloc_template<_Max_size>::_S_chunk_alloc(__n, __nobjs);
+    __obj * volatile * __my_free_list;
+    __obj * __result;
+    __obj * __current_obj, * __next_obj;
+    int __i;
+
+    if (1 == __nobjs)  {
+        return(__chunk);
+    }
+    __my_free_list = __free_list
+		 + _Pthread_alloc_template<_Max_size>::_S_freelist_index(__n);
+
+    /* Build free list in chunk */
+      __result = (__obj *)__chunk;
+      *__my_free_list = __next_obj = (__obj *)(__chunk + __n);
+      for (__i = 1; ; __i++) {
+        __current_obj = __next_obj;
+        __next_obj = (__obj *)((char *)__next_obj + __n);
+        if (__nobjs - 1 == __i) {
+            __current_obj -> __free_list_link = 0;
+            break;
+        } else {
+            __current_obj -> __free_list_link = __next_obj;
+        }
+      }
+    return(__result);
+}
+
+template 
+void *_Pthread_alloc_template<_Max_size>
+::reallocate(void *__p, size_t __old_sz, size_t __new_sz)
+{
+    void * __result;
+    size_t __copy_sz;
+
+    if (__old_sz > _Max_size
+	&& __new_sz > _Max_size) {
+        return(realloc(__p, __new_sz));
+    }
+    if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return(__p);
+    __result = allocate(__new_sz);
+    __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
+    memcpy(__result, __p, __copy_sz);
+    deallocate(__p, __old_sz);
+    return(__result);
+}
+
+template 
+_Pthread_alloc_per_thread_state<_Max_size> *
+_Pthread_alloc_template<_Max_size>::_S_free_per_thread_states = 0;
+
+template 
+pthread_key_t _Pthread_alloc_template<_Max_size>::_S_key;
+
+template 
+bool _Pthread_alloc_template<_Max_size>::_S_key_initialized = false;
+
+template 
+pthread_mutex_t _Pthread_alloc_template<_Max_size>::_S_chunk_allocator_lock
+= PTHREAD_MUTEX_INITIALIZER;
+
+template 
+char *_Pthread_alloc_template<_Max_size>
+::_S_start_free = 0;
+
+template 
+char *_Pthread_alloc_template<_Max_size>
+::_S_end_free = 0;
+
+template 
+size_t _Pthread_alloc_template<_Max_size>
+::_S_heap_size = 0;
+
+
+template 
+class pthread_allocator {
+  typedef pthread_alloc _S_Alloc;          // The underlying allocator.
+public:
+  typedef size_t     size_type;
+  typedef ptrdiff_t  difference_type;
+  typedef _Tp*       pointer;
+  typedef const _Tp* const_pointer;
+  typedef _Tp&       reference;
+  typedef const _Tp& const_reference;
+  typedef _Tp        value_type;
+
+  template  struct rebind {
+    typedef pthread_allocator<_NewType> other;
+  };
+
+  pthread_allocator() throw() {}
+  pthread_allocator(const pthread_allocator& a) throw() {}
+  template 
+	pthread_allocator(const pthread_allocator<_OtherType>&)
+		throw() {}
+  ~pthread_allocator() throw() {}
+
+  pointer address(reference __x) const { return &__x; }
+  const_pointer address(const_reference __x) const { return &__x; }
+
+  // __n is permitted to be 0.  The C++ standard says nothing about what
+  // the return value is when __n == 0.
+  _Tp* allocate(size_type __n, const void* = 0) {
+    return __n != 0 ? static_cast<_Tp*>(_S_Alloc::allocate(__n * sizeof(_Tp)))
+                    : 0;
+  }
+
+  // p is not permitted to be a null pointer.
+  void deallocate(pointer __p, size_type __n)
+    { _S_Alloc::deallocate(__p, __n * sizeof(_Tp)); }
+
+  size_type max_size() const throw() 
+    { return size_t(-1) / sizeof(_Tp); }
+
+  void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
+  void destroy(pointer _p) { _p->~_Tp(); }
+};
+
+template<>
+class pthread_allocator {
+public:
+  typedef size_t      size_type;
+  typedef ptrdiff_t   difference_type;
+  typedef void*       pointer;
+  typedef const void* const_pointer;
+  typedef void        value_type;
+
+  template  struct rebind {
+    typedef pthread_allocator<_NewType> other;
+  };
+};
+
+template 
+inline bool operator==(const _Pthread_alloc_template<_Max_size>&,
+                       const _Pthread_alloc_template<_Max_size>&)
+{
+  return true;
+}
+
+template 
+inline bool operator==(const pthread_allocator<_T1>&,
+                       const pthread_allocator<_T2>& a2) 
+{
+  return true;
+}
+
+template 
+inline bool operator!=(const pthread_allocator<_T1>&,
+                       const pthread_allocator<_T2>&)
+{
+  return false;
+}
+
+template 
+struct _Alloc_traits<_Tp, _Pthread_alloc_template<_Max_size> >
+{
+  static const bool _S_instanceless = true;
+  typedef simple_alloc<_Tp, _Pthread_alloc_template<_Max_size> > _Alloc_type;
+  typedef __allocator<_Tp, _Pthread_alloc_template<_Max_size> > 
+          allocator_type;
+};
+
+template 
+struct _Alloc_traits<_Tp, __allocator<_Atype, _Pthread_alloc_template<_Max> > >
+{
+  static const bool _S_instanceless = true;
+  typedef simple_alloc<_Tp, _Pthread_alloc_template<_Max> > _Alloc_type;
+  typedef __allocator<_Tp, _Pthread_alloc_template<_Max> > allocator_type;
+};
+
+template 
+struct _Alloc_traits<_Tp, pthread_allocator<_Atype> >
+{
+  static const bool _S_instanceless = true;
+  typedef simple_alloc<_Tp, _Pthread_alloc_template<> > _Alloc_type;
+  typedef pthread_allocator<_Tp> allocator_type;
+};
+
+
+} // namespace std
+
+#endif /* _CPP_BITS_PTHREAD_ALLOCIMPL_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/slice.h b/contrib/libstdc++/include/bits/slice.h
new file mode 100644
index 0000000..d3da664
--- /dev/null
+++ b/contrib/libstdc++/include/bits/slice.h
@@ -0,0 +1,85 @@
+// The template and inlines for the -*- C++ -*- slice class.
+
+// Copyright (C) 1997-1999, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file slice.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_SLICE_H
+#define _CPP_BITS_SLICE_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+
+class slice
+{
+public:
+    slice ();
+    slice (size_t, size_t, size_t);
+
+    size_t start () const;
+    size_t size () const;
+    size_t stride () const;
+
+private:
+    size_t _M_off;                      // offset
+    size_t _M_sz;			// size
+    size_t _M_st;			// stride unit
+};
+
+inline slice::slice () {}
+
+inline slice::slice (size_t __o, size_t __d, size_t __s)
+        : _M_off (__o), _M_sz (__d), _M_st (__s) {}
+
+inline size_t
+slice::start () const
+  { return _M_off; }
+
+inline size_t
+slice::size () const
+  { return _M_sz; }
+
+inline size_t
+slice::stride () const
+  { return _M_st; }
+
+} // std::
+
+
+#endif /* _CPP_BITS_SLICE_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/slice_array.h b/contrib/libstdc++/include/bits/slice_array.h
new file mode 100644
index 0000000..c8908f8
--- /dev/null
+++ b/contrib/libstdc++/include/bits/slice_array.h
@@ -0,0 +1,180 @@
+// The template and inlines for the -*- C++ -*- slice_array class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file slice_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_SLICE_ARRAY_H
+#define _CPP_BITS_SLICE_ARRAY_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+    
+    template
+    class slice_array
+    {
+    public:
+        typedef _Tp value_type;
+
+      // This constructor is implemented since we need to return a value.
+      slice_array (const slice_array&);
+
+      // This operator must be public.  See DR-253.
+      slice_array& operator= (const slice_array&);
+
+        void operator=   (const valarray<_Tp>&) const;
+        void operator*=  (const valarray<_Tp>&) const;
+        void operator/=  (const valarray<_Tp>&) const;
+        void operator%=  (const valarray<_Tp>&) const;
+        void operator+=  (const valarray<_Tp>&) const;
+        void operator-=  (const valarray<_Tp>&) const;
+        void operator^=  (const valarray<_Tp>&) const;
+        void operator&=  (const valarray<_Tp>&) const;
+        void operator|=  (const valarray<_Tp>&) const;
+        void operator<<= (const valarray<_Tp>&) const;
+        void operator>>= (const valarray<_Tp>&) const;
+        void operator= (const _Tp &);
+        //        ~slice_array ();
+        
+        template
+        void operator=   (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator*=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator/=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator%=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator+=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator-=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator^=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator&=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator|=  (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator<<= (const _Expr<_Dom,_Tp>&) const;
+        template
+        void operator>>= (const _Expr<_Dom,_Tp>&) const;
+        
+    private:
+        friend class valarray<_Tp>;
+        slice_array(_Array<_Tp>, const slice&);
+        
+        const size_t     _M_sz;
+        const size_t     _M_stride;
+        const _Array<_Tp> _M_array;
+
+        // not implemented
+        slice_array ();
+    };
+
+    template
+    inline slice_array<_Tp>::slice_array (_Array<_Tp> __a, const slice& __s)
+            : _M_sz (__s.size ()), _M_stride (__s.stride ()),
+              _M_array (__a.begin () + __s.start ()) {}
+
+    
+    template
+    inline slice_array<_Tp>::slice_array(const slice_array<_Tp>& a)
+            : _M_sz(a._M_sz), _M_stride(a._M_stride), _M_array(a._M_array) {}
+    
+    //    template
+    //    inline slice_array<_Tp>::~slice_array () {}
+
+  template
+  inline slice_array<_Tp>&
+  slice_array<_Tp>::operator=(const slice_array<_Tp>& __a)
+  {
+    __valarray_copy(_M_array, _M_sz, _M_stride, __a._M_array, __a._M_stride);
+    return *this;
+  }
+
+
+    template
+    inline void
+    slice_array<_Tp>::operator= (const _Tp& __t) 
+    { __valarray_fill (_M_array, _M_sz, _M_stride, __t); }
+    
+    template
+    inline void
+    slice_array<_Tp>::operator= (const valarray<_Tp>& __v) const
+    { __valarray_copy (_Array<_Tp> (__v), _M_array, _M_sz, _M_stride); }
+    
+    template
+    template
+    inline void
+    slice_array<_Tp>::operator= (const _Expr<_Dom,_Tp>& __e) const
+    { __valarray_copy (__e, _M_sz, _M_array, _M_stride); }
+
+#undef _DEFINE_VALARRAY_OPERATOR
+#define _DEFINE_VALARRAY_OPERATOR(op, name)				\
+template							\
+inline void								\
+slice_array<_Tp>::operator op##= (const valarray<_Tp>& __v) const	\
+{									\
+  _Array_augmented_##name (_M_array, _M_sz, _M_stride, _Array<_Tp> (__v));\
+}									\
+									\
+template template				\
+inline void								\
+slice_array<_Tp>::operator op##= (const _Expr<_Dom,_Tp>& __e) const	\
+{									\
+    _Array_augmented_##name (_M_array, _M_stride, __e, _M_sz);		\
+}
+        
+
+_DEFINE_VALARRAY_OPERATOR(*, multiplies)
+_DEFINE_VALARRAY_OPERATOR(/, divides)
+_DEFINE_VALARRAY_OPERATOR(%, modulus)
+_DEFINE_VALARRAY_OPERATOR(+, plus)
+_DEFINE_VALARRAY_OPERATOR(-, minus)
+_DEFINE_VALARRAY_OPERATOR(^, xor)
+_DEFINE_VALARRAY_OPERATOR(&, and)
+_DEFINE_VALARRAY_OPERATOR(|, or)
+_DEFINE_VALARRAY_OPERATOR(<<, shift_left)
+_DEFINE_VALARRAY_OPERATOR(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_OPERATOR
+
+} // std::
+
+#endif /* _CPP_BITS_SLICE_ARRAY_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/sstream.tcc b/contrib/libstdc++/include/bits/sstream.tcc
new file mode 100644
index 0000000..e741950
--- /dev/null
+++ b/contrib/libstdc++/include/bits/sstream.tcc
@@ -0,0 +1,238 @@
+// String based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.7  String-based streams
+//
+
+#ifndef _CPP_BITS_SSTREAM_TCC
+#define _CPP_BITS_SSTREAM_TCC	1
+
+#pragma GCC system_header
+
+#include 
+
+namespace std
+{
+  template 
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    pbackfail(int_type __c)
+    {
+      int_type __ret = traits_type::eof();
+      bool __testeof = traits_type::eq_int_type(__c, traits_type::eof());
+      bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur; 
+      
+      // Try to put back __c into input sequence in one of three ways.
+      // Order these tests done in is unspecified by the standard.
+      if (__testpos)
+	{
+	  if (traits_type::eq(traits_type::to_char_type(__c), this->gptr()[-1])
+	      && !__testeof)
+	    {
+	      --_M_in_cur;
+	      __ret = __c;
+	    }
+	  else if (!__testeof)
+	    {
+	      --_M_in_cur;
+	      *_M_in_cur = traits_type::to_char_type(__c);
+	      __ret = __c;
+	    }
+	  else if (__testeof)
+	    {
+	      --_M_in_cur;
+	      __ret = traits_type::not_eof(__c);
+	    }
+	}
+      return __ret;
+    }
+  
+  template 
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::int_type 
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    overflow(int_type __c)
+    {
+      int_type __ret = traits_type::eof();
+      bool __testeof = traits_type::eq_int_type(__c, __ret);
+      bool __testwrite = _M_out_cur < _M_buf + _M_buf_size;
+      bool __testout = _M_mode & ios_base::out;
+
+      // Try to append __c into output sequence in one of two ways.
+      // Order these tests done in is unspecified by the standard.
+      if (__testout)
+	{
+	  if (!__testeof)
+	    {
+	      __size_type __len = max(_M_buf_size, _M_buf_size_opt);
+	      __len *= 2;
+
+	      if (__testwrite)
+		__ret = this->sputc(__c);
+	      else if (__len <= _M_string.max_size())
+		{
+		  // Force-allocate, re-sync.
+		  _M_string = this->str();
+		  _M_string.reserve(__len);
+		  _M_buf_size = static_cast(__len);
+		  _M_really_sync(_M_in_cur - _M_in_beg, 
+				 _M_out_cur - _M_out_beg);
+		  *_M_out_cur = traits_type::to_char_type(__c);
+		  _M_out_cur_move(1);
+		  __ret = __c;
+		}
+	    }
+	  else
+	    __ret = traits_type::not_eof(__c);
+	}
+      return __ret;
+    }
+
+  template 
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    seekoff(off_type __off, ios_base::seekdir __way, ios_base::openmode __mode)
+    {
+      pos_type __ret =  pos_type(off_type(-1)); 
+      bool __testin = (ios_base::in & _M_mode & __mode) != 0;
+      bool __testout = (ios_base::out & _M_mode & __mode) != 0;
+      bool __testboth = __testin && __testout && __way != ios_base::cur;
+      __testin &= !(__mode & ios_base::out);
+      __testout &= !(__mode & ios_base::in);
+
+      if (_M_buf_size && (__testin || __testout || __testboth))
+	{
+	  char_type* __beg = _M_buf;
+	  char_type* __curi = NULL;
+	  char_type* __curo = NULL;
+	  char_type* __endi = NULL;
+	  char_type* __endo = NULL;
+
+	  if (__testin || __testboth)
+	    {
+	      __curi = this->gptr();
+	      __endi = this->egptr();
+	    }
+	  if (__testout || __testboth)
+	    {
+	      __curo = this->pptr();
+	      __endo = this->epptr();
+	    }
+
+	  off_type __newoffi = 0;
+	  off_type __newoffo = 0;
+	  if (__way == ios_base::cur)
+	    {
+	      __newoffi = __curi - __beg;
+	      __newoffo = __curo - __beg;
+	    }
+	  else if (__way == ios_base::end)
+	    {
+	      __newoffi = __endi - __beg;
+	      __newoffo = __endo - __beg;
+	    }
+
+	  if ((__testin || __testboth)
+	      && __newoffi + __off >= 0 && __endi - __beg >= __newoffi + __off)
+	    {
+	      _M_in_cur = __beg + __newoffi + __off;
+	      __ret = pos_type(__newoffi);
+	    }
+	  if ((__testout || __testboth)
+	      && __newoffo + __off >= 0 && __endo - __beg >= __newoffo + __off)
+	    {
+	      _M_out_cur_move(__newoffo + __off - (_M_out_cur - __beg));
+	      __ret = pos_type(__newoffo);
+	    }
+	}
+      return __ret;
+    }
+
+  template 
+    typename basic_stringbuf<_CharT, _Traits, _Alloc>::pos_type
+    basic_stringbuf<_CharT, _Traits, _Alloc>::
+    seekpos(pos_type __sp, ios_base::openmode __mode)
+    {
+      pos_type __ret =  pos_type(off_type(-1)); 
+      
+      if (_M_buf_size)
+	{
+	  off_type __pos = __sp._M_position();
+	  char_type* __beg = NULL;
+	  char_type* __end = NULL;
+	  bool __testin = (ios_base::in & _M_mode & __mode) != 0;
+	  bool __testout = (ios_base::out & _M_mode & __mode) != 0;
+	  bool __testboth = __testin && __testout;
+	  __testin &= !(__mode & ios_base::out);
+	  __testout &= !(__mode & ios_base::in);
+	  
+	  // NB: Ordered.
+	  bool __testposi = false;
+	  bool __testposo = false;
+	  if (__testin || __testboth)
+	    {
+	      __beg = this->eback();
+	      __end = this->egptr();
+	      if (0 <= __pos && __pos <= __end - __beg)
+		__testposi = true;
+	    }
+	  if (__testout || __testboth)
+	    {
+	      __beg = this->pbase();
+	      __end = _M_buf + _M_buf_size;
+	      if (0 <= __pos && __pos <= __end - __beg)
+		__testposo = true;
+	    }
+	  if (__testposi || __testposo)
+	    {
+	      if (__testposi)
+		_M_in_cur = _M_in_beg + __pos;
+	      if (__testposo)
+		_M_out_cur_move((__pos) - (_M_out_cur - __beg));
+	      __ret = pos_type(off_type(__pos));
+	    }
+	}
+      return __ret;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template class basic_stringbuf;
+  extern template class basic_stringbuf;
+  extern template class basic_istringstream;
+  extern template class basic_istringstream;
+  extern template class basic_ostringstream;
+  extern template class basic_ostringstream;
+  extern template class basic_stringstream;
+  extern template class basic_stringstream;
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/bits/stl_algo.h b/contrib/libstdc++/include/bits/stl_algo.h
new file mode 100644
index 0000000..009c409
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_algo.h
@@ -0,0 +1,4351 @@
+// Algorithm implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_algo.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_ALGO_H
+#define __GLIBCPP_INTERNAL_ALGO_H
+
+#include 
+#include      // for _Temporary_buffer
+
+// See concept_check.h for the __glibcpp_*_requires macros.
+
+namespace std
+{
+
+  /**
+   *  @brief Find the median of three values.
+   *  @param  a  A value.
+   *  @param  b  A value.
+   *  @param  c  A value.
+   *  @return One of @p a, @p b or @p c.
+   *
+   *  If @c {l,m,n} is some convolution of @p {a,b,c} such that @c l<=m<=n
+   *  then the value returned will be @c m.
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+  */
+  template
+  inline const _Tp&
+    __median(const _Tp& __a, const _Tp& __b, const _Tp& __c)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+      if (__a < __b)
+	if (__b < __c)
+	  return __b;
+	else if (__a < __c)
+	  return __c;
+	else
+	  return __a;
+      else if (__a < __c)
+	return __a;
+      else if (__b < __c)
+	return __c;
+      else
+	return __b;
+    }
+
+  /**
+   *  @brief Find the median of three values using a predicate for comparison.
+   *  @param  a     A value.
+   *  @param  b     A value.
+   *  @param  c     A value.
+   *  @param  comp  A binary predicate.
+   *  @return One of @p a, @p b or @p c.
+   *
+   *  If @c {l,m,n} is some convolution of @p {a,b,c} such that @p comp(l,m)
+   *  and @p comp(m,n) are both true then the value returned will be @c m.
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+  */
+  template
+    inline const _Tp&
+    __median(const _Tp& __a, const _Tp& __b, const _Tp& __c, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BinaryFunctionConcept<_Compare,bool,_Tp,_Tp>)
+      if (__comp(__a, __b))
+	if (__comp(__b, __c))
+	  return __b;
+	else if (__comp(__a, __c))
+	  return __c;
+	else
+	  return __a;
+      else if (__comp(__a, __c))
+	return __a;
+      else if (__comp(__b, __c))
+	return __c;
+      else
+	return __b;
+    }
+
+  /**
+   *  @brief Apply a function to every element of a sequence.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  f      A unary function object.
+   *  @return   @p f.
+   *
+   *  Applies the function object @p f to each element in the range
+   *  @p [first,last).  @p f must not modify the order of the sequence.
+   *  If @p f has a return value it is ignored.
+  */
+  template
+    _Function
+    for_each(_InputIter __first, _InputIter __last, _Function __f)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      for ( ; __first != __last; ++__first)
+	__f(*__first);
+      return __f;
+    }
+
+  /**
+   *  @if maint
+   *  This is an overload used by find() for the Input Iterator case.
+   *  @endif
+  */
+  template
+    inline _InputIter
+    find(_InputIter __first, _InputIter __last,
+	 const _Tp& __val,
+	 input_iterator_tag)
+    {
+      while (__first != __last && !(*__first == __val))
+	++__first;
+      return __first;
+    }
+
+  /**
+   *  @if maint
+   *  This is an overload used by find_if() for the Input Iterator case.
+   *  @endif
+  */
+  template
+    inline _InputIter
+    find_if(_InputIter __first, _InputIter __last,
+	    _Predicate __pred,
+	    input_iterator_tag)
+    {
+      while (__first != __last && !__pred(*__first))
+	++__first;
+      return __first;
+    }
+
+  /**
+   *  @if maint
+   *  This is an overload used by find() for the RAI case.
+   *  @endif
+  */
+  template
+    _RandomAccessIter
+    find(_RandomAccessIter __first, _RandomAccessIter __last,
+	 const _Tp& __val,
+	 random_access_iterator_tag)
+    {
+      typename iterator_traits<_RandomAccessIter>::difference_type __trip_count
+	= (__last - __first) >> 2;
+
+      for ( ; __trip_count > 0 ; --__trip_count) {
+	if (*__first == __val) return __first;
+	++__first;
+
+	if (*__first == __val) return __first;
+	++__first;
+
+	if (*__first == __val) return __first;
+	++__first;
+
+	if (*__first == __val) return __first;
+	++__first;
+      }
+
+      switch(__last - __first) {
+      case 3:
+	if (*__first == __val) return __first;
+	++__first;
+      case 2:
+	if (*__first == __val) return __first;
+	++__first;
+      case 1:
+	if (*__first == __val) return __first;
+	++__first;
+      case 0:
+      default:
+	return __last;
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is an overload used by find_if() for the RAI case.
+   *  @endif
+  */
+  template
+    _RandomAccessIter
+    find_if(_RandomAccessIter __first, _RandomAccessIter __last,
+	    _Predicate __pred,
+	    random_access_iterator_tag)
+    {
+      typename iterator_traits<_RandomAccessIter>::difference_type __trip_count
+	= (__last - __first) >> 2;
+
+      for ( ; __trip_count > 0 ; --__trip_count) {
+	if (__pred(*__first)) return __first;
+	++__first;
+
+	if (__pred(*__first)) return __first;
+	++__first;
+
+	if (__pred(*__first)) return __first;
+	++__first;
+
+	if (__pred(*__first)) return __first;
+	++__first;
+      }
+
+      switch(__last - __first) {
+      case 3:
+	if (__pred(*__first)) return __first;
+	++__first;
+      case 2:
+	if (__pred(*__first)) return __first;
+	++__first;
+      case 1:
+	if (__pred(*__first)) return __first;
+	++__first;
+      case 0:
+      default:
+	return __last;
+      }
+    }
+
+  /**
+   *  @brief Find the first occurrence of a value in a sequence.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  val    The value to find.
+   *  @return   The first iterator @c i in the range @p [first,last)
+   *  such that @c *i == @p val, or @p last if no such iterator exists.
+  */
+  template
+    inline _InputIter
+    find(_InputIter __first, _InputIter __last,
+	 const _Tp& __val)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_EqualOpConcept<
+		typename iterator_traits<_InputIter>::value_type, _Tp>)
+      return find(__first, __last, __val, __iterator_category(__first));
+    }
+
+  /**
+   *  @brief Find the first element in a sequence for which a predicate is true.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  pred   A predicate.
+   *  @return   The first iterator @c i in the range @p [first,last)
+   *  such that @p pred(*i) is true, or @p last if no such iterator exists.
+  */
+  template
+    inline _InputIter
+    find_if(_InputIter __first, _InputIter __last,
+	    _Predicate __pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	      typename iterator_traits<_InputIter>::value_type>)
+      return find_if(__first, __last, __pred, __iterator_category(__first));
+    }
+
+  /**
+   *  @brief Find two adjacent values in a sequence that are equal.
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @return   The first iterator @c i such that @c i and @c i+1 are both
+   *  valid iterators in @p [first,last) and such that @c *i == @c *(i+1),
+   *  or @p last if no such iterator exists.
+  */
+  template
+    _ForwardIter
+    adjacent_find(_ForwardIter __first, _ForwardIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_ForwardIter>::value_type>)
+      if (__first == __last)
+	return __last;
+      _ForwardIter __next = __first;
+      while(++__next != __last) {
+	if (*__first == *__next)
+	  return __first;
+	__first = __next;
+      }
+      return __last;
+    }
+
+  /**
+   *  @brief Find two adjacent values in a sequence using a predicate.
+   *  @param  first         A forward iterator.
+   *  @param  last          A forward iterator.
+   *  @param  binary_pred   A binary predicate.
+   *  @return   The first iterator @c i such that @c i and @c i+1 are both
+   *  valid iterators in @p [first,last) and such that
+   *  @p binary_pred(*i,*(i+1)) is true, or @p last if no such iterator
+   *  exists.
+  */
+  template
+    _ForwardIter
+    adjacent_find(_ForwardIter __first, _ForwardIter __last,
+		  _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIter>::value_type,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+      if (__first == __last)
+	return __last;
+      _ForwardIter __next = __first;
+      while(++__next != __last) {
+	if (__binary_pred(*__first, *__next))
+	  return __first;
+	__first = __next;
+      }
+      return __last;
+    }
+
+  /**
+   *  @brief Count the number of copies of a value in a sequence.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  value  The value to be counted.
+   *  @return   The number of iterators @c i in the range @p [first,last)
+   *  for which @c *i == @p value
+  */
+  template
+    typename iterator_traits<_InputIter>::difference_type
+    count(_InputIter __first, _InputIter __last, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_InputIter>::value_type >)
+      __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
+      typename iterator_traits<_InputIter>::difference_type __n = 0;
+      for ( ; __first != __last; ++__first)
+	if (*__first == __value)
+	  ++__n;
+      return __n;
+    }
+
+  /**
+   *  @brief Count the elements of a sequence for which a predicate is true.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  pred   A predicate.
+   *  @return   The number of iterators @c i in the range @p [first,last)
+   *  for which @p pred(*i) is true.
+  */
+  template
+    typename iterator_traits<_InputIter>::difference_type
+    count_if(_InputIter __first, _InputIter __last, _Predicate __pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIter>::value_type>)
+      typename iterator_traits<_InputIter>::difference_type __n = 0;
+      for ( ; __first != __last; ++__first)
+	if (__pred(*__first))
+	  ++__n;
+      return __n;
+    }
+
+
+  /**
+   *  @brief Search a sequence for a matching sub-sequence.
+   *  @param  first1  A forward iterator.
+   *  @param  last1   A forward iterator.
+   *  @param  first2  A forward iterator.
+   *  @param  last2   A forward iterator.
+   *  @return   The first iterator @c i in the range
+   *  @p [first1,last1-(last2-first2)) such that @c *(i+N) == @p *(first2+N)
+   *  for each @c N in the range @p [0,last2-first2), or @p last1 if no
+   *  such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for a sub-sequence that compares
+   *  equal value-by-value with the sequence given by @p [first2,last2) and
+   *  returns an iterator to the first element of the sub-sequence, or
+   *  @p last1 if the sub-sequence is not found.
+   *
+   *  Because the sub-sequence must lie completely within the range
+   *  @p [first1,last1) it must start at a position less than
+   *  @p last1-(last2-first2) where @p last2-first2 is the length of the
+   *  sub-sequence.
+   *  This means that the returned iterator @c i will be in the range
+   *  @p [first1,last1-(last2-first2))
+  */
+  template
+    _ForwardIter1
+    search(_ForwardIter1 __first1, _ForwardIter1 __last1,
+	   _ForwardIter2 __first2, _ForwardIter2 __last2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIter1>::value_type,
+	    typename iterator_traits<_ForwardIter2>::value_type>)
+
+      // Test for empty ranges
+      if (__first1 == __last1 || __first2 == __last2)
+	return __first1;
+
+      // Test for a pattern of length 1.
+      _ForwardIter2 __tmp(__first2);
+      ++__tmp;
+      if (__tmp == __last2)
+	return find(__first1, __last1, *__first2);
+
+      // General case.
+
+      _ForwardIter2 __p1, __p;
+
+      __p1 = __first2; ++__p1;
+
+      _ForwardIter1 __current = __first1;
+
+      while (__first1 != __last1) {
+	__first1 = find(__first1, __last1, *__first2);
+	if (__first1 == __last1)
+	  return __last1;
+
+	__p = __p1;
+	__current = __first1;
+	if (++__current == __last1)
+	  return __last1;
+
+	while (*__current == *__p) {
+	  if (++__p == __last2)
+	    return __first1;
+	  if (++__current == __last1)
+	    return __last1;
+	}
+
+	++__first1;
+      }
+      return __first1;
+    }
+
+  /**
+   *  @brief Search a sequence for a matching sub-sequence using a predicate.
+   *  @param  first1     A forward iterator.
+   *  @param  last1      A forward iterator.
+   *  @param  first2     A forward iterator.
+   *  @param  last2      A forward iterator.
+   *  @param  predicate  A binary predicate.
+   *  @return   The first iterator @c i in the range
+   *  @p [first1,last1-(last2-first2)) such that
+   *  @p predicate(*(i+N),*(first2+N)) is true for each @c N in the range
+   *  @p [0,last2-first2), or @p last1 if no such iterator exists.
+   *
+   *  Searches the range @p [first1,last1) for a sub-sequence that compares
+   *  equal value-by-value with the sequence given by @p [first2,last2),
+   *  using @p predicate to determine equality, and returns an iterator
+   *  to the first element of the sub-sequence, or @p last1 if no such
+   *  iterator exists.
+   *
+   *  @see search(_ForwardIter1, _ForwardIter1, _ForwardIter2, _ForwardIter2)
+  */
+  template
+    _ForwardIter1
+    search(_ForwardIter1 __first1, _ForwardIter1 __last1,
+	   _ForwardIter2 __first2, _ForwardIter2 __last2,
+	   _BinaryPred  __predicate)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPred,
+	    typename iterator_traits<_ForwardIter1>::value_type,
+	    typename iterator_traits<_ForwardIter2>::value_type>)
+
+      // Test for empty ranges
+      if (__first1 == __last1 || __first2 == __last2)
+	return __first1;
+
+      // Test for a pattern of length 1.
+      _ForwardIter2 __tmp(__first2);
+      ++__tmp;
+      if (__tmp == __last2) {
+	while (__first1 != __last1 && !__predicate(*__first1, *__first2))
+	  ++__first1;
+	return __first1;
+      }
+
+      // General case.
+
+      _ForwardIter2 __p1, __p;
+
+      __p1 = __first2; ++__p1;
+
+      _ForwardIter1 __current = __first1;
+
+      while (__first1 != __last1) {
+	while (__first1 != __last1) {
+	  if (__predicate(*__first1, *__first2))
+	    break;
+	  ++__first1;
+	}
+	while (__first1 != __last1 && !__predicate(*__first1, *__first2))
+	  ++__first1;
+	if (__first1 == __last1)
+	  return __last1;
+
+	__p = __p1;
+	__current = __first1;
+	if (++__current == __last1) return __last1;
+
+	while (__predicate(*__current, *__p)) {
+	  if (++__p == __last2)
+	    return __first1;
+	  if (++__current == __last1)
+	    return __last1;
+	}
+
+	++__first1;
+      }
+      return __first1;
+    }
+
+  /**
+   *  @brief Search a sequence for a number of consecutive values.
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  count  The number of consecutive values.
+   *  @param  val    The value to find.
+   *  @return   The first iterator @c i in the range @p [first,last-count)
+   *  such that @c *(i+N) == @p val for each @c N in the range @p [0,count),
+   *  or @p last if no such iterator exists.
+   *
+   *  Searches the range @p [first,last) for @p count consecutive elements
+   *  equal to @p val.
+  */
+  template
+    _ForwardIter
+    search_n(_ForwardIter __first, _ForwardIter __last,
+	     _Integer __count, const _Tp& __val)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_ForwardIter>::value_type>)
+      __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
+
+      if (__count <= 0)
+	return __first;
+      else {
+	__first = find(__first, __last, __val);
+	while (__first != __last) {
+	  _Integer __n = __count - 1;
+	  _ForwardIter __i = __first;
+	  ++__i;
+	  while (__i != __last && __n != 0 && *__i == __val) {
+	    ++__i;
+	    --__n;
+	  }
+	  if (__n == 0)
+	    return __first;
+	  else
+	    __first = find(__i, __last, __val);
+	}
+	return __last;
+      }
+    }
+
+  /**
+   *  @brief Search a sequence for a number of consecutive values using a
+   *         predicate.
+   *  @param  first        A forward iterator.
+   *  @param  last         A forward iterator.
+   *  @param  count        The number of consecutive values.
+   *  @param  val          The value to find.
+   *  @param  binary_pred  A binary predicate.
+   *  @return   The first iterator @c i in the range @p [first,last-count)
+   *  such that @p binary_pred(*(i+N),val) is true for each @c N in the
+   *  range @p [0,count), or @p last if no such iterator exists.
+   *
+   *  Searches the range @p [first,last) for @p count consecutive elements
+   *  for which the predicate returns true.
+  */
+  template
+    _ForwardIter
+    search_n(_ForwardIter __first, _ForwardIter __last,
+	     _Integer __count, const _Tp& __val,
+	     _BinaryPred __binary_pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPred,
+	    typename iterator_traits<_ForwardIter>::value_type, _Tp>)
+
+      if (__count <= 0)
+	return __first;
+      else {
+	while (__first != __last) {
+	  if (__binary_pred(*__first, __val))
+	    break;
+	  ++__first;
+	}
+	while (__first != __last) {
+	  _Integer __n = __count - 1;
+	  _ForwardIter __i = __first;
+	  ++__i;
+	  while (__i != __last && __n != 0 && __binary_pred(*__i, __val)) {
+	    ++__i;
+	    --__n;
+	  }
+	  if (__n == 0)
+	    return __first;
+	  else {
+	    while (__i != __last) {
+	      if (__binary_pred(*__i, __val))
+		break;
+	      ++__i;
+	    }
+	    __first = __i;
+	  }
+	}
+	return __last;
+      }
+    }
+
+  /**
+   *  @brief Swap the elements of two sequences.
+   *  @param  first1  A forward iterator.
+   *  @param  last1   A forward iterator.
+   *  @param  first2  A forward iterator.
+   *  @return   An iterator equal to @p first2+(last1-first1).
+   *
+   *  Swaps each element in the range @p [first1,last1) with the
+   *  corresponding element in the range @p [first2,(last1-first1)).
+   *  The ranges must not overlap.
+  */
+  template
+    _ForwardIter2
+    swap_ranges(_ForwardIter1 __first1, _ForwardIter1 __last1,
+		_ForwardIter2 __first2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>)
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>)
+      __glibcpp_function_requires(_ConvertibleConcept<
+	    typename iterator_traits<_ForwardIter1>::value_type,
+	    typename iterator_traits<_ForwardIter2>::value_type>)
+      __glibcpp_function_requires(_ConvertibleConcept<
+	    typename iterator_traits<_ForwardIter2>::value_type,
+	    typename iterator_traits<_ForwardIter1>::value_type>)
+
+      for ( ; __first1 != __last1; ++__first1, ++__first2)
+	iter_swap(__first1, __first2);
+      return __first2;
+    }
+
+  /**
+   *  @brief Perform an operation on a sequence.
+   *  @param  first     An input iterator.
+   *  @param  last      An input iterator.
+   *  @param  result    An output iterator.
+   *  @param  unary_op  A unary operator.
+   *  @return   An output iterator equal to @p result+(last-first).
+   *
+   *  Applies the operator to each element in the input range and assigns
+   *  the results to successive elements of the output sequence.
+   *  Evaluates @p *(result+N)=unary_op(*(first+N)) for each @c N in the
+   *  range @p [0,last-first).
+   *
+   *  @p unary_op must not alter its argument.
+  */
+  template
+    _OutputIter
+    transform(_InputIter __first, _InputIter __last,
+	      _OutputIter __result, _UnaryOperation __unary_op)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+            // "the type returned by a _UnaryOperation"
+            __typeof__(__unary_op(*__first))>)
+
+      for ( ; __first != __last; ++__first, ++__result)
+	*__result = __unary_op(*__first);
+      return __result;
+    }
+
+  /**
+   *  @brief Perform an operation on corresponding elements of two sequences.
+   *  @param  first1     An input iterator.
+   *  @param  last1      An input iterator.
+   *  @param  first2     An input iterator.
+   *  @param  result     An output iterator.
+   *  @param  binary_op  A binary operator.
+   *  @return   An output iterator equal to @p result+(last-first).
+   *
+   *  Applies the operator to the corresponding elements in the two
+   *  input ranges and assigns the results to successive elements of the
+   *  output sequence.
+   *  Evaluates @p *(result+N)=binary_op(*(first1+N),*(first2+N)) for each
+   *  @c N in the range @p [0,last1-first1).
+   *
+   *  @p binary_op must not alter either of its arguments.
+  */
+  template
+    _OutputIter
+    transform(_InputIter1 __first1, _InputIter1 __last1,
+	      _InputIter2 __first2, _OutputIter __result,
+	      _BinaryOperation __binary_op)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+            // "the type returned by a _BinaryOperation"
+            __typeof__(__binary_op(*__first1,*__first2))>)
+
+      for ( ; __first1 != __last1; ++__first1, ++__first2, ++__result)
+	*__result = __binary_op(*__first1, *__first2);
+      return __result;
+    }
+
+  /**
+   *  @brief Replace each occurrence of one value in a sequence with another
+   *         value.
+   *  @param  first      A forward iterator.
+   *  @param  last       A forward iterator.
+   *  @param  old_value  The value to be replaced.
+   *  @param  new_value  The replacement value.
+   *  @return   replace() returns no value.
+   *
+   *  For each iterator @c i in the range @p [first,last) if @c *i ==
+   *  @p old_value then the assignment @c *i = @p new_value is performed.
+  */
+  template
+    void
+    replace(_ForwardIter __first, _ForwardIter __last,
+	    const _Tp& __old_value, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIter>::value_type, _Tp>)
+      __glibcpp_function_requires(_ConvertibleConcept<_Tp,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      for ( ; __first != __last; ++__first)
+	if (*__first == __old_value)
+	  *__first = __new_value;
+    }
+
+  /**
+   *  @brief Replace each value in a sequence for which a predicate returns
+   *         true with another value.
+   *  @param  first      A forward iterator.
+   *  @param  last       A forward iterator.
+   *  @param  pred       A predicate.
+   *  @param  new_value  The replacement value.
+   *  @return   replace_if() returns no value.
+   *
+   *  For each iterator @c i in the range @p [first,last) if @p pred(*i)
+   *  is true then the assignment @c *i = @p new_value is performed.
+  */
+  template
+    void
+    replace_if(_ForwardIter __first, _ForwardIter __last,
+	       _Predicate __pred, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_ConvertibleConcept<_Tp,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      for ( ; __first != __last; ++__first)
+	if (__pred(*__first))
+	  *__first = __new_value;
+    }
+
+  /**
+   *  @brief Copy a sequence, replacing each element of one value with another
+   *         value.
+   *  @param  first      An input iterator.
+   *  @param  last       An input iterator.
+   *  @param  result     An output iterator.
+   *  @param  old_value  The value to be replaced.
+   *  @param  new_value  The replacement value.
+   *  @return   The end of the output sequence, @p result+(last-first).
+   *
+   *  Copies each element in the input range @p [first,last) to the
+   *  output range @p [result,result+(last-first)) replacing elements
+   *  equal to @p old_value with @p new_value.
+  */
+  template
+    _OutputIter
+    replace_copy(_InputIter __first, _InputIter __last,
+		 _OutputIter __result,
+		 const _Tp& __old_value, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIter>::value_type, _Tp>)
+
+      for ( ; __first != __last; ++__first, ++__result)
+	*__result = *__first == __old_value ? __new_value : *__first;
+      return __result;
+    }
+
+  /**
+   *  @brief Copy a sequence, replacing each value for which a predicate
+   *         returns true with another value.
+   *  @param  first      An input iterator.
+   *  @param  last       An input iterator.
+   *  @param  result     An output iterator.
+   *  @param  pred       A predicate.
+   *  @param  new_value  The replacement value.
+   *  @return   The end of the output sequence, @p result+(last-first).
+   *
+   *  Copies each element in the range @p [first,last) to the range
+   *  @p [result,result+(last-first)) replacing elements for which
+   *  @p pred returns true with @p new_value.
+  */
+  template
+    _OutputIter
+    replace_copy_if(_InputIter __first, _InputIter __last,
+		    _OutputIter __result,
+		    _Predicate __pred, const _Tp& __new_value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIter>::value_type>)
+
+      for ( ; __first != __last; ++__first, ++__result)
+	*__result = __pred(*__first) ? __new_value : *__first;
+      return __result;
+    }
+
+  /**
+   *  @brief Assign the result of a function object to each value in a
+   *         sequence.
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  gen    A function object taking no arguments.
+   *  @return   generate() returns no value.
+   *
+   *  Performs the assignment @c *i = @p gen() for each @c i in the range
+   *  @p [first,last).
+  */
+  template
+    void
+    generate(_ForwardIter __first, _ForwardIter __last, _Generator __gen)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_GeneratorConcept<_Generator,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      for ( ; __first != __last; ++__first)
+	*__first = __gen();
+    }
+
+  /**
+   *  @brief Assign the result of a function object to each value in a
+   *         sequence.
+   *  @param  first  A forward iterator.
+   *  @param  n      The length of the sequence.
+   *  @param  gen    A function object taking no arguments.
+   *  @return   The end of the sequence, @p first+n
+   *
+   *  Performs the assignment @c *i = @p gen() for each @c i in the range
+   *  @p [first,first+n).
+  */
+  template
+    _OutputIter
+    generate_n(_OutputIter __first, _Size __n, _Generator __gen)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+            // "the type returned by a _Generator"
+            __typeof__(gen())>)
+
+      for ( ; __n > 0; --__n, ++__first)
+	*__first = __gen();
+      return __first;
+    }
+
+  /**
+   *  @brief Copy a sequence, removing elements of a given value.
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @param  value   The value to be removed.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) not equal to @p value
+   *  to the range beginning at @p result.
+   *  remove_copy() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template
+    _OutputIter
+    remove_copy(_InputIter __first, _InputIter __last,
+		_OutputIter __result, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIter>::value_type, _Tp>)
+
+      for ( ; __first != __last; ++__first)
+	if (!(*__first == __value)) {
+	  *__result = *__first;
+	  ++__result;
+	}
+      return __result;
+    }
+
+  /**
+   *  @brief Copy a sequence, removing elements for which a predicate is true.
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @param  pred    A predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) for which
+   *  @p pred returns true to the range beginning at @p result.
+   *
+   *  remove_copy_if() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template
+    _OutputIter
+    remove_copy_if(_InputIter __first, _InputIter __last,
+		   _OutputIter __result, _Predicate __pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIter>::value_type>)
+
+      for ( ; __first != __last; ++__first)
+	if (!__pred(*__first)) {
+	  *__result = *__first;
+	  ++__result;
+	}
+      return __result;
+    }
+
+  /**
+   *  @brief Remove elements from a sequence.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  value  The value to be removed.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  All elements equal to @p value are removed from the range
+   *  @p [first,last).
+   *
+   *  remove() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template
+    _ForwardIter
+    remove(_ForwardIter __first, _ForwardIter __last,
+	   const _Tp& __value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_ConvertibleConcept<_Tp,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIter>::value_type, _Tp>)
+
+      __first = find(__first, __last, __value);
+      _ForwardIter __i = __first;
+      return __first == __last ? __first
+			       : remove_copy(++__i, __last, __first, __value);
+    }
+
+  /**
+   *  @brief Remove elements from a sequence using a predicate.
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  pred   A predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  All elements for which @p pred returns true are removed from the range
+   *  @p [first,last).
+   *
+   *  remove_if() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template
+    _ForwardIter
+    remove_if(_ForwardIter __first, _ForwardIter __last,
+	      _Predicate __pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      __first = find_if(__first, __last, __pred);
+      _ForwardIter __i = __first;
+      return __first == __last ? __first
+			       : remove_copy_if(++__i, __last, __first, __pred);
+    }
+
+  /**
+   *  @if maint
+   *  This is an uglified unique_copy(_InputIter, _InputIter, _OutputIter)
+   *  overloaded for output iterators.
+   *  @endif
+  */
+  template
+    _OutputIter
+    __unique_copy(_InputIter __first, _InputIter __last,
+		  _OutputIter __result,
+		  output_iterator_tag)
+    {
+      // concept requirements -- taken care of in dispatching function
+      typename iterator_traits<_InputIter>::value_type __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	if (!(__value == *__first)) {
+	  __value = *__first;
+	  *++__result = __value;
+	}
+      return ++__result;
+    }
+
+  /**
+   *  @if maint
+   *  This is an uglified unique_copy(_InputIter, _InputIter, _OutputIter)
+   *  overloaded for forward iterators.
+   *  @endif
+  */
+  template
+    _ForwardIter
+    __unique_copy(_InputIter __first, _InputIter __last,
+		  _ForwardIter __result,
+		  forward_iterator_tag)
+    {
+      // concept requirements -- taken care of in dispatching function
+      *__result = *__first;
+      while (++__first != __last)
+	if (!(*__result == *__first))
+	  *++__result = *__first;
+      return ++__result;
+    }
+
+  /**
+   *  @brief Copy a sequence, removing consecutive duplicate values.
+   *  @param  first   An input iterator.
+   *  @param  last    An input iterator.
+   *  @param  result  An output iterator.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) to the range
+   *  beginning at @p result, except that only the first element is copied
+   *  from groups of consecutive elements that compare equal.
+   *  unique_copy() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template
+    inline _OutputIter
+    unique_copy(_InputIter __first, _InputIter __last,
+		_OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_InputIter>::value_type>)
+
+      typedef typename iterator_traits<_OutputIter>::iterator_category _IterType;
+
+      if (__first == __last) return __result;
+      return __unique_copy(__first, __last, __result, _IterType());
+    }
+
+  /**
+   *  @if maint
+   *  This is an uglified
+   *  unique_copy(_InputIter, _InputIter, _OutputIter, _BinaryPredicate)
+   *  overloaded for output iterators.
+   *  @endif
+  */
+  template
+    _OutputIter
+    __unique_copy(_InputIter __first, _InputIter __last,
+		  _OutputIter __result,
+		  _BinaryPredicate __binary_pred,
+		  output_iterator_tag)
+    {
+      // concept requirements -- iterators already checked
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	  typename iterator_traits<_InputIter>::value_type,
+	  typename iterator_traits<_InputIter>::value_type>)
+
+      typename iterator_traits<_InputIter>::value_type __value = *__first;
+      *__result = __value;
+      while (++__first != __last)
+	if (!__binary_pred(__value, *__first)) {
+	  __value = *__first;
+	  *++__result = __value;
+	}
+      return ++__result;
+    }
+
+  /**
+   *  @if maint
+   *  This is an uglified
+   *  unique_copy(_InputIter, _InputIter, _OutputIter, _BinaryPredicate)
+   *  overloaded for forward iterators.
+   *  @endif
+  */
+  template
+    _ForwardIter
+    __unique_copy(_InputIter __first, _InputIter __last,
+		  _ForwardIter __result,
+		  _BinaryPredicate __binary_pred,
+		  forward_iterator_tag)
+    {
+      // concept requirements -- iterators already checked
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIter>::value_type,
+	    typename iterator_traits<_InputIter>::value_type>)
+
+      *__result = *__first;
+      while (++__first != __last)
+	if (!__binary_pred(*__result, *__first)) *++__result = *__first;
+      return ++__result;
+    }
+
+  /**
+   *  @brief Copy a sequence, removing consecutive values using a predicate.
+   *  @param  first        An input iterator.
+   *  @param  last         An input iterator.
+   *  @param  result       An output iterator.
+   *  @param  binary_pred  A binary predicate.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies each element in the range @p [first,last) to the range
+   *  beginning at @p result, except that only the first element is copied
+   *  from groups of consecutive elements for which @p binary_pred returns
+   *  true.
+   *  unique_copy() is stable, so the relative order of elements that are
+   *  copied is unchanged.
+  */
+  template
+    inline _OutputIter
+    unique_copy(_InputIter __first, _InputIter __last,
+		_OutputIter __result,
+		_BinaryPredicate __binary_pred)
+    {
+      // concept requirements -- predicates checked later
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+
+      typedef typename iterator_traits<_OutputIter>::iterator_category _IterType;
+
+      if (__first == __last) return __result;
+      return __unique_copy(__first, __last,
+__result, __binary_pred, _IterType());
+    }
+
+  /**
+   *  @brief Remove consecutive duplicate values from a sequence.
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @return  An iterator designating the end of the resulting sequence.
+   *
+   *  Removes all but the first element from each group of consecutive
+   *  values that compare equal.
+   *  unique() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template
+    _ForwardIter
+    unique(_ForwardIter __first, _ForwardIter __last)
+    {
+	  // concept requirements
+	  __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+	  __glibcpp_function_requires(_EqualityComparableConcept<
+		    typename iterator_traits<_ForwardIter>::value_type>)
+
+	  __first = adjacent_find(__first, __last);
+	  return unique_copy(__first, __last, __first);
+    }
+
+  /**
+   *  @brief Remove consecutive values from a sequence using a predicate.
+   *  @param  first        A forward iterator.
+   *  @param  last         A forward iterator.
+   *  @param  binary_pred  A binary predicate.
+   *  @return  An iterator designating the end of the resulting sequence.
+   *
+   *  Removes all but the first element from each group of consecutive
+   *  values for which @p binary_pred returns true.
+   *  unique() is stable, so the relative order of elements that are
+   *  not removed is unchanged.
+   *  Elements between the end of the resulting sequence and @p last
+   *  are still present, but their value is unspecified.
+  */
+  template
+    _ForwardIter
+    unique(_ForwardIter __first, _ForwardIter __last,
+           _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+		typename iterator_traits<_ForwardIter>::value_type,
+		typename iterator_traits<_ForwardIter>::value_type>)
+
+      __first = adjacent_find(__first, __last, __binary_pred);
+      return unique_copy(__first, __last, __first, __binary_pred);
+    }
+
+  /**
+   *  @if maint
+   *  This is an uglified reverse(_BidirectionalIter, _BidirectionalIter)
+   *  overloaded for bidirectional iterators.
+   *  @endif
+  */
+  template
+    void
+    __reverse(_BidirectionalIter __first, _BidirectionalIter __last,
+			  bidirectional_iterator_tag)
+    {
+	  while (true)
+	    if (__first == __last || __first == --__last)
+		  return;
+	    else
+		  iter_swap(__first++, __last);
+    }
+
+  /**
+   *  @if maint
+   *  This is an uglified reverse(_BidirectionalIter, _BidirectionalIter)
+   *  overloaded for bidirectional iterators.
+   *  @endif
+  */
+  template
+    void
+    __reverse(_RandomAccessIter __first, _RandomAccessIter __last,
+			  random_access_iterator_tag)
+    {
+	  while (__first < __last)
+	    iter_swap(__first++, --__last);
+    }
+
+  /**
+   *  @brief Reverse a sequence.
+   *  @param  first  A bidirectional iterator.
+   *  @param  last   A bidirectional iterator.
+   *  @return   reverse() returns no value.
+   *
+   *  Reverses the order of the elements in the range @p [first,last),
+   *  so that the first element becomes the last etc.
+   *  For every @c i such that @p 0<=i<=(last-first)/2), @p reverse()
+   *  swaps @p *(first+i) and @p *(last-(i+1))
+  */
+  template
+    inline void
+    reverse(_BidirectionalIter __first, _BidirectionalIter __last)
+    {
+	  // concept requirements
+	  __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
+		    _BidirectionalIter>)
+	  __reverse(__first, __last, __iterator_category(__first));
+    }
+
+  /**
+   *  @brief Copy a sequence, reversing its elements.
+   *  @param  first   A bidirectional iterator.
+   *  @param  last    A bidirectional iterator.
+   *  @param  result  An output iterator.
+   *  @return  An iterator designating the end of the resulting sequence.
+   *
+   *  Copies the elements in the range @p [first,last) to the range
+   *  @p [result,result+(last-first)) such that the order of the
+   *  elements is reversed.
+   *  For every @c i such that @p 0<=i<=(last-first), @p reverse_copy()
+   *  performs the assignment @p *(result+(last-first)-i) = *(first+i).
+   *  The ranges @p [first,last) and @p [result,result+(last-first))
+   *  must not overlap.
+  */
+  template
+    _OutputIter
+    reverse_copy(_BidirectionalIter __first, _BidirectionalIter __last,
+			     _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+		typename iterator_traits<_BidirectionalIter>::value_type>)
+
+      while (__first != __last) {
+	--__last;
+	*__result = *__last;
+	++__result;
+      }
+      return __result;
+    }
+
+
+  /**
+   *  @if maint
+   *  This is a helper function for the rotate algorithm specialized on RAIs.
+   *  It returns the greatest common divisor of two integer values.
+   *  @endif
+  */
+  template
+    _EuclideanRingElement
+    __gcd(_EuclideanRingElement __m, _EuclideanRingElement __n)
+    {
+      while (__n != 0) {
+	_EuclideanRingElement __t = __m % __n;
+	__m = __n;
+	__n = __t;
+      }
+      return __m;
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the rotate algorithm.
+   *  @endif
+  */
+  template
+    void
+    __rotate(_ForwardIter __first,
+	     _ForwardIter __middle,
+	     _ForwardIter __last,
+	      forward_iterator_tag)
+    {
+      if ((__first == __middle) || (__last  == __middle))
+	return;
+
+      _ForwardIter __first2 = __middle;
+      do {
+	swap(*__first++, *__first2++);
+	if (__first == __middle)
+	  __middle = __first2;
+      } while (__first2 != __last);
+
+      __first2 = __middle;
+
+      while (__first2 != __last) {
+	swap(*__first++, *__first2++);
+	if (__first == __middle)
+	  __middle = __first2;
+	else if (__first2 == __last)
+	  __first2 = __middle;
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the rotate algorithm.
+   *  @endif
+  */
+  template
+    void
+    __rotate(_BidirectionalIter __first,
+	     _BidirectionalIter __middle,
+	     _BidirectionalIter __last,
+	      bidirectional_iterator_tag)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
+	    _BidirectionalIter>)
+
+      if ((__first == __middle) || (__last  == __middle))
+	return;
+
+      __reverse(__first,  __middle, bidirectional_iterator_tag());
+      __reverse(__middle, __last,   bidirectional_iterator_tag());
+
+      while (__first != __middle && __middle != __last)
+	swap (*__first++, *--__last);
+
+      if (__first == __middle) {
+	__reverse(__middle, __last,   bidirectional_iterator_tag());
+      }
+      else {
+	__reverse(__first,  __middle, bidirectional_iterator_tag());
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the rotate algorithm.
+   *  @endif
+  */
+  template
+    void
+    __rotate(_RandomAccessIter __first,
+	     _RandomAccessIter __middle,
+	     _RandomAccessIter __last,
+	     random_access_iterator_tag)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+
+      if ((__first == __middle) || (__last  == __middle))
+	return;
+
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _Distance;
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      _Distance __n = __last   - __first;
+      _Distance __k = __middle - __first;
+      _Distance __l = __n - __k;
+
+      if (__k == __l) {
+	swap_ranges(__first, __middle, __middle);
+	return;
+      }
+
+      _Distance __d = __gcd(__n, __k);
+
+      for (_Distance __i = 0; __i < __d; __i++) {
+	_ValueType __tmp = *__first;
+	_RandomAccessIter __p = __first;
+
+	if (__k < __l) {
+	  for (_Distance __j = 0; __j < __l/__d; __j++) {
+	    if (__p > __first + __l) {
+	      *__p = *(__p - __l);
+	      __p -= __l;
+	    }
+
+	    *__p = *(__p + __k);
+	    __p += __k;
+	  }
+	}
+
+	else {
+	  for (_Distance __j = 0; __j < __k/__d - 1; __j ++) {
+	    if (__p < __last - __k) {
+	      *__p = *(__p + __k);
+	      __p += __k;
+	    }
+
+	    *__p = * (__p - __l);
+	    __p -= __l;
+	  }
+	}
+
+	*__p = __tmp;
+	++__first;
+      }
+    }
+
+  /**
+   *  @brief Rotate the elements of a sequence.
+   *  @param  first   A forward iterator.
+   *  @param  middle  A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @return  Nothing.
+   *
+   *  Rotates the elements of the range @p [first,last) by @p (middle-first)
+   *  positions so that the element at @p middle is moved to @p first, the
+   *  element at @p middle+1 is moved to @first+1 and so on for each element
+   *  in the range @p [first,last).
+   *
+   *  This effectively swaps the ranges @p [first,middle) and
+   *  @p [middle,last).
+   *
+   *  Performs @p *(first+(n+(last-middle))%(last-first))=*(first+n) for
+   *  each @p n in the range @p [0,last-first).
+  */
+  template
+    inline void
+    rotate(_ForwardIter __first, _ForwardIter __middle, _ForwardIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+
+      typedef typename iterator_traits<_ForwardIter>::iterator_category _IterType;
+      __rotate(__first, __middle, __last, _IterType());
+    }
+
+  /**
+   *  @brief Copy a sequence, rotating its elements.
+   *  @param  first   A forward iterator.
+   *  @param  middle  A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  result  An output iterator.
+   *  @return   An iterator designating the end of the resulting sequence.
+   *
+   *  Copies the elements of the range @p [first,last) to the range
+   *  beginning at @result, rotating the copied elements by @p (middle-first)
+   *  positions so that the element at @p middle is moved to @p result, the
+   *  element at @p middle+1 is moved to @result+1 and so on for each element
+   *  in the range @p [first,last).
+   *
+   *  Performs @p *(result+(n+(last-middle))%(last-first))=*(first+n) for
+   *  each @p n in the range @p [0,last-first).
+  */
+  template
+    _OutputIter
+    rotate_copy(_ForwardIter __first, _ForwardIter __middle,
+                _ForwardIter __last, _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+		typename iterator_traits<_ForwardIter>::value_type>)
+
+      return copy(__first, __middle, copy(__middle, __last, __result));
+    }
+
+
+  /**
+   *  @if maint
+   *  Return a random number in the range [0, __n).  This function encapsulates
+   *  whether we're using rand (part of the standard C library) or lrand48
+   *  (not standard, but a much better choice whenever it's available).
+   *
+   *  XXX There is no corresponding encapsulation fn to seed the generator.
+   *  @endif
+  */
+  template
+    inline _Distance
+    __random_number(_Distance __n)
+    {
+  #ifdef _GLIBCPP_HAVE_DRAND48
+      return lrand48() % __n;
+  #else
+      return rand() % __n;
+  #endif
+    }
+
+
+  /**
+   *  @brief Randomly shuffle the elements of a sequence.
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @return  Nothing.
+   *
+   *  Reorder the elements in the range @p [first,last) using a random
+   *  distribution, so that every possible ordering of the sequence is
+   *  equally likely.
+  */
+  template
+    inline void
+    random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+
+      if (__first == __last) return;
+      for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+	iter_swap(__i, __first + __random_number((__i - __first) + 1));
+    }
+
+  /**
+   *  @brief Shuffle the elements of a sequence using a random number
+   *         generator.
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  rand    The RNG functor or function.
+   *  @return  Nothing.
+   *
+   *  Reorders the elements in the range @p [first,last) using @p rand to
+   *  provide a random distribution. Calling @p rand(N) for a positive
+   *  integer @p N should return a randomly chosen integer from the
+   *  range [0,N).
+  */
+  template
+    void
+    random_shuffle(_RandomAccessIter __first, _RandomAccessIter __last,
+		   _RandomNumberGenerator& __rand)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+
+      if (__first == __last) return;
+      for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+	iter_swap(__i, __first + __rand((__i - __first) + 1));
+    }
+
+
+  /**
+   *  @if maint
+   *  This is a helper function...
+   *  @endif
+  */
+  template
+    _ForwardIter
+    __partition(_ForwardIter __first, _ForwardIter __last,
+		_Predicate   __pred,
+		forward_iterator_tag)
+    {
+      if (__first == __last) return __first;
+
+      while (__pred(*__first))
+	if (++__first == __last) return __first;
+
+      _ForwardIter __next = __first;
+
+      while (++__next != __last)
+	if (__pred(*__next)) {
+	  swap(*__first, *__next);
+	  ++__first;
+	}
+
+      return __first;
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function...
+   *  @endif
+  */
+  template
+    _BidirectionalIter
+    __partition(_BidirectionalIter __first, _BidirectionalIter __last,
+		_Predicate __pred,
+		bidirectional_iterator_tag)
+    {
+      while (true) {
+	while (true)
+	  if (__first == __last)
+	    return __first;
+	  else if (__pred(*__first))
+	    ++__first;
+	  else
+	    break;
+	--__last;
+	while (true)
+	  if (__first == __last)
+	    return __first;
+	  else if (!__pred(*__last))
+	    --__last;
+	  else
+	    break;
+	iter_swap(__first, __last);
+	++__first;
+      }
+    }
+
+  /**
+   *  @brief Move elements for which a predicate is true to the beginning
+   *         of a sequence.
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  pred    A predicate functor.
+   *  @return  An iterator @p middle such that @p pred(i) is true for each
+   *  iterator @p i in the range @p [first,middle) and false for each @p i
+   *  in the range @p [middle,last).
+   *  
+   *  @p pred must not modify its operand. @p partition() does not preserve
+   *  the relative ordering of elements in each group, use
+   *  @p stable_partition() if this is needed.
+  */
+  template
+    inline _ForwardIter
+    partition(_ForwardIter __first, _ForwardIter __last,
+	      _Predicate   __pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      return __partition(__first, __last, __pred, __iterator_category(__first));
+    }
+
+
+  /**
+   *  @if maint
+   *  This is a helper function...
+   *  @endif
+  */
+  template
+    _ForwardIter
+    __inplace_stable_partition(_ForwardIter __first, _ForwardIter __last,
+			       _Predicate __pred, _Distance __len)
+    {
+      if (__len == 1)
+	return __pred(*__first) ? __last : __first;
+      _ForwardIter __middle = __first;
+      advance(__middle, __len / 2);
+      _ForwardIter __begin = __inplace_stable_partition(__first, __middle,
+							__pred,
+							__len / 2);
+      _ForwardIter __end = __inplace_stable_partition(__middle, __last,
+						      __pred,
+						      __len - __len / 2);
+      rotate(__begin, __middle, __end);
+      advance(__begin, distance(__middle, __end));
+      return __begin;
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function...
+   *  @endif
+  */
+  template
+    _ForwardIter
+    __stable_partition_adaptive(_ForwardIter __first, _ForwardIter __last,
+				_Predicate __pred, _Distance __len,
+				_Pointer __buffer,
+				_Distance __buffer_size)
+    {
+      if (__len <= __buffer_size) {
+	_ForwardIter __result1 = __first;
+	_Pointer __result2 = __buffer;
+	for ( ; __first != __last ; ++__first)
+	  if (__pred(*__first)) {
+	    *__result1 = *__first;
+	    ++__result1;
+	  }
+	  else {
+	    *__result2 = *__first;
+	    ++__result2;
+	  }
+	copy(__buffer, __result2, __result1);
+	return __result1;
+      }
+      else {
+	_ForwardIter __middle = __first;
+	advance(__middle, __len / 2);
+	_ForwardIter __begin = __stable_partition_adaptive(__first, __middle,
+							   __pred,
+							   __len / 2,
+							   __buffer, __buffer_size);
+	_ForwardIter __end = __stable_partition_adaptive( __middle, __last,
+							  __pred,
+							  __len - __len / 2,
+							  __buffer, __buffer_size);
+	rotate(__begin, __middle, __end);
+	advance(__begin, distance(__middle, __end));
+	return __begin;
+      }
+    }
+
+  /**
+   *  @brief Move elements for which a predicate is true to the beginning
+   *         of a sequence, preserving relative ordering.
+   *  @param  first   A forward iterator.
+   *  @param  last    A forward iterator.
+   *  @param  pred    A predicate functor.
+   *  @return  An iterator @p middle such that @p pred(i) is true for each
+   *  iterator @p i in the range @p [first,middle) and false for each @p i
+   *  in the range @p [middle,last).
+   *  
+   *  Performs the same function as @p partition() with the additional
+   *  guarantee that the relative ordering of elements in each group is
+   *  preserved, so any two elements @p x and @p y in the range
+   *  @p [first,last) such that @p pred(x)==pred(y) will have the same
+   *  relative ordering after calling @p stable_partition().
+  */
+  template
+    _ForwardIter
+    stable_partition(_ForwardIter __first, _ForwardIter __last,
+		     _Predicate __pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last)
+	return __first;
+      else
+      {
+	typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+	typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+	_Temporary_buffer<_ForwardIter, _ValueType> __buf(__first, __last);
+	if (__buf.size() > 0)
+	  return __stable_partition_adaptive(__first, __last, __pred,
+					     _DistanceType(__buf.requested_size()),
+					     __buf.begin(), __buf.size());
+	else
+	  return __inplace_stable_partition(__first, __last, __pred,
+					    _DistanceType(__buf.requested_size()));
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function...
+   *  @endif
+  */
+  template
+    _RandomAccessIter
+    __unguarded_partition(_RandomAccessIter __first, _RandomAccessIter __last,
+			  _Tp __pivot)
+    {
+      while (true) {
+	while (*__first < __pivot)
+	  ++__first;
+	--__last;
+	while (__pivot < *__last)
+	  --__last;
+	if (!(__first < __last))
+	  return __first;
+	iter_swap(__first, __last);
+	++__first;
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function...
+   *  @endif
+  */
+  template
+    _RandomAccessIter
+    __unguarded_partition(_RandomAccessIter __first, _RandomAccessIter __last,
+			  _Tp __pivot, _Compare __comp)
+    {
+      while (true) {
+	while (__comp(*__first, __pivot))
+	  ++__first;
+	--__last;
+	while (__comp(__pivot, *__last))
+	  --__last;
+	if (!(__first < __last))
+	  return __first;
+	iter_swap(__first, __last);
+	++__first;
+      }
+    }
+
+
+  /**
+   *  @if maint
+   *  @doctodo
+   *  This controls some aspect of the sort routines.
+   *  @endif
+  */
+  enum { _M_threshold = 16 };
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val)
+    {
+      _RandomAccessIter __next = __last;
+      --__next;
+      while (__val < *__next) {
+	*__last = *__next;
+	__last = __next;
+	--__next;
+      }
+      *__last = __val;
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __unguarded_linear_insert(_RandomAccessIter __last, _Tp __val, _Compare __comp)
+    {
+      _RandomAccessIter __next = __last;
+      --__next;
+      while (__comp(__val, *__next)) {
+	*__last = *__next;
+	__last = __next;
+	--__next;
+      }
+      *__last = __val;
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      if (__first == __last) return;
+
+      for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+      {
+	typename iterator_traits<_RandomAccessIter>::value_type __val = *__i;
+	if (__val < *__first) {
+	  copy_backward(__first, __i, __i + 1);
+	  *__first = __val;
+	}
+	else
+	  __unguarded_linear_insert(__i, __val);
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
+		     _Compare __comp)
+    {
+      if (__first == __last) return;
+
+      for (_RandomAccessIter __i = __first + 1; __i != __last; ++__i)
+      {
+	typename iterator_traits<_RandomAccessIter>::value_type __val = *__i;
+	if (__comp(__val, *__first)) {
+	  copy_backward(__first, __i, __i + 1);
+	  *__first = __val;
+	}
+	else
+	  __unguarded_linear_insert(__i, __val, __comp);
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    inline void
+    __unguarded_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      for (_RandomAccessIter __i = __first; __i != __last; ++__i)
+	__unguarded_linear_insert(__i, _ValueType(*__i));
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    inline void
+    __unguarded_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
+			       _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      for (_RandomAccessIter __i = __first; __i != __last; ++__i)
+	__unguarded_linear_insert(__i, _ValueType(*__i), __comp);
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      if (__last - __first > _M_threshold) {
+	__insertion_sort(__first, __first + _M_threshold);
+	__unguarded_insertion_sort(__first + _M_threshold, __last);
+      }
+      else
+	__insertion_sort(__first, __last);
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __final_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
+			   _Compare __comp)
+    {
+      if (__last - __first > _M_threshold) {
+	__insertion_sort(__first, __first + _M_threshold, __comp);
+	__unguarded_insertion_sort(__first + _M_threshold, __last, __comp);
+      }
+      else
+	__insertion_sort(__first, __last, __comp);
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    inline _Size
+    __lg(_Size __n)
+    {
+      _Size __k;
+      for (__k = 0; __n != 1; __n >>= 1) ++__k;
+      return __k;
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __introsort_loop(_RandomAccessIter __first, _RandomAccessIter __last,
+		     _Size __depth_limit)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      while (__last - __first > _M_threshold) {
+	if (__depth_limit == 0) {
+	  partial_sort(__first, __last, __last);
+	  return;
+	}
+	--__depth_limit;
+	_RandomAccessIter __cut =
+	  __unguarded_partition(__first, __last,
+				_ValueType(__median(*__first,
+						    *(__first + (__last - __first)/2),
+						    *(__last - 1))));
+	__introsort_loop(__cut, __last, __depth_limit);
+	__last = __cut;
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the sort routine.
+   *  @endif
+  */
+  template
+    void
+    __introsort_loop(_RandomAccessIter __first, _RandomAccessIter __last,
+		     _Size __depth_limit, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      while (__last - __first > _M_threshold) {
+	if (__depth_limit == 0) {
+	  partial_sort(__first, __last, __last, __comp);
+	  return;
+	}
+	--__depth_limit;
+	_RandomAccessIter __cut =
+	  __unguarded_partition(__first, __last,
+				_ValueType(__median(*__first,
+						    *(__first + (__last - __first)/2),
+						    *(__last - 1), __comp)),
+	   __comp);
+	__introsort_loop(__cut, __last, __depth_limit, __comp);
+	__last = __cut;
+      }
+    }
+
+  /**
+   *  @brief Sort the elements of a sequence.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p *(i+1)<*i is false for each iterator @p i in the range
+   *  @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is not preserved, use
+   *  @p stable_sort() if this is needed.
+  */
+  template
+    inline void
+    sort(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      if (__first != __last) {
+	__introsort_loop(__first, __last, __lg(__last - __first) * 2);
+	__final_insertion_sort(__first, __last);
+      }
+    }
+
+  /**
+   *  @brief Sort the elements of a sequence using a predicate for comparison.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p comp(*(i+1),*i) is false for every iterator @p i in the
+   *  range @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is not preserved, use
+   *  @p stable_sort() if this is needed.
+  */
+  template
+    inline void
+    sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _ValueType, _ValueType>)
+
+      if (__first != __last) {
+	__introsort_loop(__first, __last, __lg(__last - __first) * 2, __comp);
+	__final_insertion_sort(__first, __last, __comp);
+      }
+    }
+
+
+  /**
+   *  @if maint
+   *  This is a helper function for the stable sorting routines.
+   *  @endif
+  */
+  template
+    void
+    __inplace_stable_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      if (__last - __first < 15) {
+	__insertion_sort(__first, __last);
+	return;
+      }
+      _RandomAccessIter __middle = __first + (__last - __first) / 2;
+      __inplace_stable_sort(__first, __middle);
+      __inplace_stable_sort(__middle, __last);
+      __merge_without_buffer(__first, __middle, __last,
+			     __middle - __first,
+			     __last - __middle);
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the stable sorting routines.
+   *  @endif
+  */
+  template
+    void
+    __inplace_stable_sort(_RandomAccessIter __first, _RandomAccessIter __last,
+			  _Compare __comp)
+    {
+      if (__last - __first < 15) {
+	__insertion_sort(__first, __last, __comp);
+	return;
+      }
+      _RandomAccessIter __middle = __first + (__last - __first) / 2;
+      __inplace_stable_sort(__first, __middle, __comp);
+      __inplace_stable_sort(__middle, __last, __comp);
+      __merge_without_buffer(__first, __middle, __last,
+			     __middle - __first,
+			     __last - __middle,
+			     __comp);
+    }
+
+  template
+    void
+    __merge_sort_loop(_RandomAccessIter1 __first, _RandomAccessIter1 __last,
+		      _RandomAccessIter2 __result, _Distance __step_size)
+    {
+      _Distance __two_step = 2 * __step_size;
+
+      while (__last - __first >= __two_step) {
+	__result = merge(__first, __first + __step_size,
+			 __first + __step_size, __first + __two_step,
+			 __result);
+	__first += __two_step;
+      }
+
+      __step_size = min(_Distance(__last - __first), __step_size);
+      merge(__first, __first + __step_size, __first + __step_size, __last,
+	    __result);
+    }
+
+  template
+    void
+    __merge_sort_loop(_RandomAccessIter1 __first, _RandomAccessIter1 __last,
+		      _RandomAccessIter2 __result, _Distance __step_size,
+		      _Compare __comp)
+    {
+      _Distance __two_step = 2 * __step_size;
+
+      while (__last - __first >= __two_step) {
+	__result = merge(__first, __first + __step_size,
+			 __first + __step_size, __first + __two_step,
+			 __result,
+			 __comp);
+	__first += __two_step;
+      }
+      __step_size = min(_Distance(__last - __first), __step_size);
+
+      merge(__first, __first + __step_size,
+	    __first + __step_size, __last,
+	    __result,
+	    __comp);
+    }
+
+  enum { _M_chunk_size = 7 };
+
+  template
+    void
+    __chunk_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
+			   _Distance __chunk_size)
+    {
+      while (__last - __first >= __chunk_size) {
+	__insertion_sort(__first, __first + __chunk_size);
+	__first += __chunk_size;
+      }
+      __insertion_sort(__first, __last);
+    }
+
+  template
+    void
+    __chunk_insertion_sort(_RandomAccessIter __first, _RandomAccessIter __last,
+			   _Distance __chunk_size, _Compare __comp)
+    {
+      while (__last - __first >= __chunk_size) {
+	__insertion_sort(__first, __first + __chunk_size, __comp);
+	__first += __chunk_size;
+      }
+      __insertion_sort(__first, __last, __comp);
+    }
+
+  template
+    void
+    __merge_sort_with_buffer(_RandomAccessIter __first, _RandomAccessIter __last,
+                             _Pointer __buffer)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _Distance;
+
+      _Distance __len = __last - __first;
+      _Pointer __buffer_last = __buffer + __len;
+
+      _Distance __step_size = _M_chunk_size;
+      __chunk_insertion_sort(__first, __last, __step_size);
+
+      while (__step_size < __len) {
+	__merge_sort_loop(__first, __last, __buffer, __step_size);
+	__step_size *= 2;
+	__merge_sort_loop(__buffer, __buffer_last, __first, __step_size);
+	__step_size *= 2;
+      }
+    }
+
+  template
+    void
+    __merge_sort_with_buffer(_RandomAccessIter __first, _RandomAccessIter __last,
+                             _Pointer __buffer, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _Distance;
+
+      _Distance __len = __last - __first;
+      _Pointer __buffer_last = __buffer + __len;
+
+      _Distance __step_size = _M_chunk_size;
+      __chunk_insertion_sort(__first, __last, __step_size, __comp);
+
+      while (__step_size < __len) {
+	__merge_sort_loop(__first, __last, __buffer, __step_size, __comp);
+	__step_size *= 2;
+	__merge_sort_loop(__buffer, __buffer_last, __first, __step_size, __comp);
+	__step_size *= 2;
+      }
+    }
+
+  template
+    void
+    __stable_sort_adaptive(_RandomAccessIter __first, _RandomAccessIter __last,
+                           _Pointer __buffer, _Distance __buffer_size)
+    {
+      _Distance __len = (__last - __first + 1) / 2;
+      _RandomAccessIter __middle = __first + __len;
+      if (__len > __buffer_size) {
+	__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size);
+	__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size);
+      }
+      else {
+	__merge_sort_with_buffer(__first, __middle, __buffer);
+	__merge_sort_with_buffer(__middle, __last, __buffer);
+      }
+      __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
+                       _Distance(__last - __middle), __buffer, __buffer_size);
+    }
+
+  template
+    void
+    __stable_sort_adaptive(_RandomAccessIter __first, _RandomAccessIter __last,
+                           _Pointer __buffer, _Distance __buffer_size,
+                           _Compare __comp)
+    {
+      _Distance __len = (__last - __first + 1) / 2;
+      _RandomAccessIter __middle = __first + __len;
+      if (__len > __buffer_size) {
+	__stable_sort_adaptive(__first, __middle, __buffer, __buffer_size,
+                               __comp);
+	__stable_sort_adaptive(__middle, __last, __buffer, __buffer_size,
+                               __comp);
+      }
+      else {
+	__merge_sort_with_buffer(__first, __middle, __buffer, __comp);
+	__merge_sort_with_buffer(__middle, __last, __buffer, __comp);
+      }
+      __merge_adaptive(__first, __middle, __last, _Distance(__middle - __first),
+                       _Distance(__last - __middle), __buffer, __buffer_size,
+                       __comp);
+    }
+
+  /**
+   *  @brief Sort the elements of a sequence, preserving the relative order
+   *         of equivalent elements.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p *(i+1)<*i is false for each iterator @p i in the range
+   *  @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is preserved, so any two
+   *  elements @p x and @p y in the range @p [first,last) such that
+   *  @p x
+    inline void
+    stable_sort(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      _Temporary_buffer<_RandomAccessIter, _ValueType> buf(__first, __last);
+      if (buf.begin() == 0)
+	__inplace_stable_sort(__first, __last);
+      else
+	__stable_sort_adaptive(__first, __last, buf.begin(), _DistanceType(buf.size()));
+    }
+
+  /**
+   *  @brief Sort the elements of a sequence using a predicate for comparison,
+   *         preserving the relative order of equivalent elements.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Sorts the elements in the range @p [first,last) in ascending order,
+   *  such that @p comp(*(i+1),*i) is false for each iterator @p i in the
+   *  range @p [first,last-1).
+   *
+   *  The relative ordering of equivalent elements is preserved, so any two
+   *  elements @p x and @p y in the range @p [first,last) such that
+   *  @p comp(x,y) is false and @p comp(y,x) is false will have the same
+   *  relative ordering after calling @p stable_sort().
+  */
+  template
+    inline void
+    stable_sort(_RandomAccessIter __first, _RandomAccessIter __last, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+							  _ValueType, _ValueType>)
+
+      _Temporary_buffer<_RandomAccessIter, _ValueType> buf(__first, __last);
+      if (buf.begin() == 0)
+	__inplace_stable_sort(__first, __last, __comp);
+      else
+	__stable_sort_adaptive(__first, __last, buf.begin(), _DistanceType(buf.size()),
+			       __comp);
+    }
+
+  /**
+   *  @brief Sort the smallest elements of a sequence.
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Sorts the smallest @p (middle-first) elements in the range
+   *  @p [first,last) and moves them to the range @p [first,middle). The
+   *  order of the remaining elements in the range @p [middle,last) is
+   *  undefined.
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [first,middle) such that @i precedes @j and @k is an iterator in
+   *  the range @p [middle,last) then @p *j<*i and @p *k<*i are both false.
+  */
+  template
+    void
+    partial_sort(_RandomAccessIter __first,
+		 _RandomAccessIter __middle,
+		 _RandomAccessIter __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      make_heap(__first, __middle);
+      for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
+	if (*__i < *__first)
+	  __pop_heap(__first, __middle, __i, _ValueType(*__i));
+      sort_heap(__first, __middle);
+    }
+
+  /**
+   *  @brief Sort the smallest elements of a sequence using a predicate
+   *         for comparison.
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Sorts the smallest @p (middle-first) elements in the range
+   *  @p [first,last) and moves them to the range @p [first,middle). The
+   *  order of the remaining elements in the range @p [middle,last) is
+   *  undefined.
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [first,middle) such that @i precedes @j and @k is an iterator in
+   *  the range @p [middle,last) then @p *comp(j,*i) and @p comp(*k,*i)
+   *  are both false.
+  */
+  template
+    void
+    partial_sort(_RandomAccessIter __first,
+		 _RandomAccessIter __middle,
+		 _RandomAccessIter __last,
+		 _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+							  _ValueType, _ValueType>)
+
+      make_heap(__first, __middle, __comp);
+      for (_RandomAccessIter __i = __middle; __i < __last; ++__i)
+	if (__comp(*__i, *__first))
+	  __pop_heap(__first, __middle, __i, _ValueType(*__i), __comp);
+      sort_heap(__first, __middle, __comp);
+    }
+
+  /**
+   *  @brief Copy the smallest elements of a sequence.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  result_first   A random-access iterator.
+   *  @param  result_last    Another random-access iterator.
+   *  @return   An iterator indicating the end of the resulting sequence.
+   *
+   *  Copies and sorts the smallest N values from the range @p [first,last)
+   *  to the range beginning at @p result_first, where the number of
+   *  elements to be copied, @p N, is the smaller of @p (last-first) and
+   *  @p (result_last-result_first).
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [result_first,result_first+N) such that @i precedes @j then
+   *  @p *j<*i is false.
+   *  The value returned is @p result_first+N.
+  */
+  template
+    _RandomAccessIter
+    partial_sort_copy(_InputIter __first, _InputIter __last,
+		      _RandomAccessIter __result_first,
+		      _RandomAccessIter __result_last)
+    {
+      typedef typename iterator_traits<_InputIter>::value_type _InputValueType;
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _OutputValueType;
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_ConvertibleConcept<_InputValueType, _OutputValueType>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_OutputValueType>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_InputValueType>)
+
+      if (__result_first == __result_last) return __result_last;
+      _RandomAccessIter __result_real_last = __result_first;
+      while(__first != __last && __result_real_last != __result_last) {
+	*__result_real_last = *__first;
+	++__result_real_last;
+	++__first;
+      }
+      make_heap(__result_first, __result_real_last);
+      while (__first != __last) {
+	if (*__first < *__result_first)
+	  __adjust_heap(__result_first, _DistanceType(0),
+			_DistanceType(__result_real_last - __result_first),
+			_InputValueType(*__first));
+	++__first;
+      }
+      sort_heap(__result_first, __result_real_last);
+      return __result_real_last;
+    }
+
+  /**
+   *  @brief Copy the smallest elements of a sequence using a predicate for
+   *         comparison.
+   *  @param  first   An input iterator.
+   *  @param  last    Another input iterator.
+   *  @param  result_first   A random-access iterator.
+   *  @param  result_last    Another random-access iterator.
+   *  @param  comp    A comparison functor.
+   *  @return   An iterator indicating the end of the resulting sequence.
+   *
+   *  Copies and sorts the smallest N values from the range @p [first,last)
+   *  to the range beginning at @p result_first, where the number of
+   *  elements to be copied, @p N, is the smaller of @p (last-first) and
+   *  @p (result_last-result_first).
+   *  After the sort if @p i and @j are iterators in the range
+   *  @p [result_first,result_first+N) such that @i precedes @j then
+   *  @p comp(*j,*i) is false.
+   *  The value returned is @p result_first+N.
+  */
+  template
+    _RandomAccessIter
+    partial_sort_copy(_InputIter __first, _InputIter __last,
+		      _RandomAccessIter __result_first,
+		      _RandomAccessIter __result_last,
+		      _Compare __comp)
+    {
+      typedef typename iterator_traits<_InputIter>::value_type _InputValueType;
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _OutputValueType;
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<_RandomAccessIter>)
+      __glibcpp_function_requires(_ConvertibleConcept<_InputValueType, _OutputValueType>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+				  _OutputValueType, _OutputValueType>)
+
+      if (__result_first == __result_last) return __result_last;
+      _RandomAccessIter __result_real_last = __result_first;
+      while(__first != __last && __result_real_last != __result_last) {
+	*__result_real_last = *__first;
+	++__result_real_last;
+	++__first;
+      }
+      make_heap(__result_first, __result_real_last, __comp);
+      while (__first != __last) {
+	if (__comp(*__first, *__result_first))
+	  __adjust_heap(__result_first, _DistanceType(0),
+			_DistanceType(__result_real_last - __result_first),
+			_InputValueType(*__first),
+			__comp);
+	++__first;
+      }
+      sort_heap(__result_first, __result_real_last, __comp);
+      return __result_real_last;
+    }
+
+  /**
+   *  @brief Sort a sequence just enough to find a particular position.
+   *  @param  first   An iterator.
+   *  @param  nth     Another iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Rearranges the elements in the range @p [first,last) so that @p *nth
+   *  is the same element that would have been in that position had the
+   *  whole sequence been sorted. 
+   *  whole sequence been sorted. The elements either side of @p *nth are
+   *  not completely sorted, but for any iterator @i in the range
+   *  @p [first,nth) and any iterator @j in the range @p [nth,last) it
+   *  holds that @p *j<*i is false.
+  */
+  template
+    void
+    nth_element(_RandomAccessIter __first,
+		_RandomAccessIter __nth,
+		_RandomAccessIter __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<_RandomAccessIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      while (__last - __first > 3) {
+	_RandomAccessIter __cut =
+	  __unguarded_partition(__first, __last,
+				_ValueType(__median(*__first,
+						    *(__first + (__last - __first)/2),
+						    *(__last - 1))));
+	if (__cut <= __nth)
+	  __first = __cut;
+	else
+	  __last = __cut;
+      }
+      __insertion_sort(__first, __last);
+    }
+
+  /**
+   *  @brief Sort a sequence just enough to find a particular position
+   *         using a predicate for comparison.
+   *  @param  first   An iterator.
+   *  @param  nth     Another iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A comparison functor.
+   *  @return  Nothing.
+   *
+   *  Rearranges the elements in the range @p [first,last) so that @p *nth
+   *  is the same element that would have been in that position had the
+   *  whole sequence been sorted. The elements either side of @p *nth are
+   *  not completely sorted, but for any iterator @i in the range
+   *  @p [first,nth) and any iterator @j in the range @p [nth,last) it
+   *  holds that @p comp(*j,*i) is false.
+  */
+  template
+    void
+    nth_element(_RandomAccessIter __first,
+		_RandomAccessIter __nth,
+		_RandomAccessIter __last,
+			    _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<_RandomAccessIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+				  _ValueType, _ValueType>)
+
+      while (__last - __first > 3) {
+	_RandomAccessIter __cut =
+	  __unguarded_partition(__first, __last,
+				_ValueType(__median(*__first,
+						    *(__first + (__last - __first)/2),
+						    *(__last - 1),
+						    __comp)),
+				__comp);
+	if (__cut <= __nth)
+	  __first = __cut;
+	else
+	  __last = __cut;
+      }
+      __insertion_sort(__first, __last, __comp);
+    }
+
+
+  /**
+   *  @brief Finds the first position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  An iterator pointing to the first element "not less than" @a val.
+   *  @ingroup binarysearch
+  */
+  template
+    _ForwardIter
+    lower_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+      // concept requirements
+      // Note that these are slightly stricter than those of the 4-argument
+      // version, defined next.  The difference is in the strictness of the
+      // comparison operations... so for looser checking, define your own
+      // comparison function, as was intended.
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_SameTypeConcept<_Tp, _ValueType>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+
+      _DistanceType __len = distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIter __middle;
+
+      while (__len > 0) {
+	__half = __len >> 1;
+	__middle = __first;
+	advance(__middle, __half);
+	if (*__middle < __val) {
+	  __first = __middle;
+	  ++__first;
+	  __len = __len - __half - 1;
+	}
+	else
+	  __len = __half;
+      }
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the first position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  An iterator pointing to the first element "not less than" @a val.
+   *  @ingroup binarysearch
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template
+    _ForwardIter
+    lower_bound(_ForwardIter __first, _ForwardIter __last,
+		const _Tp& __val, _Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _ValueType, _Tp>)
+
+      _DistanceType __len = distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIter __middle;
+
+      while (__len > 0) {
+	__half = __len >> 1;
+	__middle = __first;
+	advance(__middle, __half);
+	if (__comp(*__middle, __val)) {
+	  __first = __middle;
+	  ++__first;
+	  __len = __len - __half - 1;
+	}
+	else
+	  __len = __half;
+      }
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the last position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  An iterator pointing to the first element greater than @a val.
+   *  @ingroup binarysearch
+  */
+  template
+    _ForwardIter
+    upper_bound(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+      // concept requirements
+      // See comments on lower_bound.
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_SameTypeConcept<_Tp, _ValueType>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+
+      _DistanceType __len = distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIter __middle;
+
+      while (__len > 0) {
+	__half = __len >> 1;
+	__middle = __first;
+	advance(__middle, __half);
+	if (__val < *__middle)
+	  __len = __half;
+	else {
+	  __first = __middle;
+	  ++__first;
+	  __len = __len - __half - 1;
+	}
+      }
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the last position in which @a val could be inserted
+   *         without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  An iterator pointing to the first element greater than @a val.
+   *  @ingroup binarysearch
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template
+    _ForwardIter
+    upper_bound(_ForwardIter __first, _ForwardIter __last,
+		const _Tp& __val, _Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _ValueType>)
+
+      _DistanceType __len = distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIter __middle;
+
+      while (__len > 0) {
+	__half = __len >> 1;
+	__middle = __first;
+	advance(__middle, __half);
+	if (__comp(__val, *__middle))
+	  __len = __half;
+	else {
+	  __first = __middle;
+	  ++__first;
+	  __len = __len - __half - 1;
+	}
+      }
+      return __first;
+    }
+
+  /**
+   *  @brief Finds the largest subrange in which @a val could be inserted
+   *         at any place in it without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  An pair of iterators defining the subrange.
+   *  @ingroup binarysearch
+   *
+   *  This is equivalent to
+   *  @code
+   *    std::make_pair(lower_bound(first, last, val),
+   *                   upper_bound(first, last, val))
+   *  @endcode
+   *  but does not actually call those functions.
+  */
+  template
+    pair<_ForwardIter, _ForwardIter>
+    equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+      // concept requirements
+      // See comments on lower_bound.
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_SameTypeConcept<_Tp, _ValueType>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+
+      _DistanceType __len = distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIter __middle, __left, __right;
+
+      while (__len > 0) {
+	__half = __len >> 1;
+	__middle = __first;
+	advance(__middle, __half);
+	if (*__middle < __val) {
+	  __first = __middle;
+	  ++__first;
+	  __len = __len - __half - 1;
+	}
+	else if (__val < *__middle)
+	  __len = __half;
+	else {
+	  __left = lower_bound(__first, __middle, __val);
+	  advance(__first, __len);
+	  __right = upper_bound(++__middle, __first, __val);
+	  return pair<_ForwardIter, _ForwardIter>(__left, __right);
+	}
+      }
+      return pair<_ForwardIter, _ForwardIter>(__first, __first);
+    }
+
+  /**
+   *  @brief Finds the largest subrange in which @a val could be inserted
+   *         at any place in it without changing the ordering.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  An pair of iterators defining the subrange.
+   *  @ingroup binarysearch
+   *
+   *  This is equivalent to
+   *  @code
+   *    std::make_pair(lower_bound(first, last, val, comp),
+   *                   upper_bound(first, last, val, comp))
+   *  @endcode
+   *  but does not actually call those functions.
+  */
+  template
+    pair<_ForwardIter, _ForwardIter>
+    equal_range(_ForwardIter __first, _ForwardIter __last, const _Tp& __val,
+		_Compare __comp)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename iterator_traits<_ForwardIter>::difference_type _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _ValueType, _Tp>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp, _ValueType>)
+
+      _DistanceType __len = distance(__first, __last);
+      _DistanceType __half;
+      _ForwardIter __middle, __left, __right;
+
+      while (__len > 0) {
+	__half = __len >> 1;
+	__middle = __first;
+	advance(__middle, __half);
+	if (__comp(*__middle, __val)) {
+	  __first = __middle;
+	  ++__first;
+	  __len = __len - __half - 1;
+	}
+	else if (__comp(__val, *__middle))
+	  __len = __half;
+	else {
+	  __left = lower_bound(__first, __middle, __val, __comp);
+	  advance(__first, __len);
+	  __right = upper_bound(++__middle, __first, __val, __comp);
+	  return pair<_ForwardIter, _ForwardIter>(__left, __right);
+	}
+      }
+      return pair<_ForwardIter, _ForwardIter>(__first, __first);
+    }
+
+  /**
+   *  @brief Determines whether an element exists in a range.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @return  True if @a val (or its equivelent) is in [@a first,@a last ].
+   *  @ingroup binarysearch
+   *
+   *  Note that this does not actually return an iterator to @a val.  For
+   *  that, use std::find or a container's specialized find member functions.
+  */
+  template
+    bool
+    binary_search(_ForwardIter __first, _ForwardIter __last,
+                  const _Tp& __val)
+    {
+      // concept requirements
+      // See comments on lower_bound.
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_SameTypeConcept<_Tp,
+		typename iterator_traits<_ForwardIter>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+
+      _ForwardIter __i = lower_bound(__first, __last, __val);
+      return __i != __last && !(__val < *__i);
+    }
+
+  /**
+   *  @brief Determines whether an element exists in a range.
+   *  @param  first   An iterator.
+   *  @param  last    Another iterator.
+   *  @param  val     The search term.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  True if @a val (or its equivelent) is in [@a first,@a last ].
+   *  @ingroup binarysearch
+   *
+   *  Note that this does not actually return an iterator to @a val.  For
+   *  that, use std::find or a container's specialized find member functions.
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template
+    bool
+    binary_search(_ForwardIter __first, _ForwardIter __last,
+                  const _Tp& __val, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+		typename iterator_traits<_ForwardIter>::value_type, _Tp>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare, _Tp,
+		typename iterator_traits<_ForwardIter>::value_type>)
+
+      _ForwardIter __i = lower_bound(__first, __last, __val, __comp);
+      return __i != __last && !__comp(__val, *__i);
+    }
+
+  /**
+   *  @brief Merges two sorted ranges.
+   *  @param  first1  An iterator.
+   *  @param  first2  Another iterator.
+   *  @param  last1   Another iterator.
+   *  @param  last2   Another iterator.
+   *  @param  result  An iterator pointing to the end of the merged range.
+   *  @return  An iterator pointing to the first element "not less than" @a val.
+   *
+   *  Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+   *  [result, result + (last1-first1) + (last2-first2)).  Both input ranges
+   *  must be sorted, and the output range must not overlap with either of
+   *  the input ranges.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+  */
+  template
+    _OutputIter
+    merge(_InputIter1 __first1, _InputIter1 __last1,
+	  _InputIter2 __first2, _InputIter2 __last2,
+	  _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2) {
+	if (*__first2 < *__first1) {
+	  *__result = *__first2;
+	  ++__first2;
+	}
+	else {
+	  *__result = *__first1;
+	  ++__first1;
+	}
+	++__result;
+      }
+      return copy(__first2, __last2, copy(__first1, __last1, __result));
+    }
+
+  /**
+   *  @brief Merges two sorted ranges.
+   *  @param  first1  An iterator.
+   *  @param  first2  Another iterator.
+   *  @param  last1   Another iterator.
+   *  @param  last2   Another iterator.
+   *  @param  result  An iterator pointing to the end of the merged range.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  An iterator pointing to the first element "not less than" @a val.
+   *
+   *  Merges the ranges [first1,last1) and [first2,last2) into the sorted range
+   *  [result, result + (last1-first1) + (last2-first2)).  Both input ranges
+   *  must be sorted, and the output range must not overlap with either of
+   *  the input ranges.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template
+    _OutputIter
+    merge(_InputIter1 __first1, _InputIter1 __last1,
+	  _InputIter2 __first2, _InputIter2 __last2,
+	  _OutputIter __result, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2) {
+	if (__comp(*__first2, *__first1)) {
+	  *__result = *__first2;
+	  ++__first2;
+	}
+	else {
+	  *__result = *__first1;
+	  ++__first1;
+	}
+	++__result;
+      }
+      return copy(__first2, __last2, copy(__first1, __last1, __result));
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    void
+    __merge_without_buffer(_BidirectionalIter __first,
+			   _BidirectionalIter __middle,
+			   _BidirectionalIter __last,
+			   _Distance __len1, _Distance __len2)
+    {
+      if (__len1 == 0 || __len2 == 0)
+	return;
+      if (__len1 + __len2 == 2) {
+	if (*__middle < *__first)
+	      iter_swap(__first, __middle);
+	return;
+      }
+      _BidirectionalIter __first_cut = __first;
+      _BidirectionalIter __second_cut = __middle;
+      _Distance __len11 = 0;
+      _Distance __len22 = 0;
+      if (__len1 > __len2) {
+	__len11 = __len1 / 2;
+	advance(__first_cut, __len11);
+	__second_cut = lower_bound(__middle, __last, *__first_cut);
+	__len22 = distance(__middle, __second_cut);
+      }
+      else {
+	__len22 = __len2 / 2;
+	advance(__second_cut, __len22);
+	__first_cut = upper_bound(__first, __middle, *__second_cut);
+	__len11 = distance(__first, __first_cut);
+      }
+      rotate(__first_cut, __middle, __second_cut);
+      _BidirectionalIter __new_middle = __first_cut;
+      advance(__new_middle, distance(__middle, __second_cut));
+      __merge_without_buffer(__first, __first_cut, __new_middle,
+			     __len11, __len22);
+      __merge_without_buffer(__new_middle, __second_cut, __last,
+			     __len1 - __len11, __len2 - __len22);
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    void
+    __merge_without_buffer(_BidirectionalIter __first,
+                           _BidirectionalIter __middle,
+			   _BidirectionalIter __last,
+			   _Distance __len1, _Distance __len2,
+			   _Compare __comp)
+    {
+      if (__len1 == 0 || __len2 == 0)
+	return;
+      if (__len1 + __len2 == 2) {
+	if (__comp(*__middle, *__first))
+	      iter_swap(__first, __middle);
+	return;
+      }
+      _BidirectionalIter __first_cut = __first;
+      _BidirectionalIter __second_cut = __middle;
+      _Distance __len11 = 0;
+      _Distance __len22 = 0;
+      if (__len1 > __len2) {
+	__len11 = __len1 / 2;
+	advance(__first_cut, __len11);
+	__second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
+	__len22 = distance(__middle, __second_cut);
+      }
+      else {
+	__len22 = __len2 / 2;
+	advance(__second_cut, __len22);
+	__first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
+	__len11 = distance(__first, __first_cut);
+      }
+      rotate(__first_cut, __middle, __second_cut);
+      _BidirectionalIter __new_middle = __first_cut;
+      advance(__new_middle, distance(__middle, __second_cut));
+      __merge_without_buffer(__first, __first_cut, __new_middle,
+			     __len11, __len22, __comp);
+      __merge_without_buffer(__new_middle, __second_cut, __last,
+			     __len1 - __len11, __len2 - __len22, __comp);
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    _BidirectionalIter1
+    __rotate_adaptive(_BidirectionalIter1 __first,
+		      _BidirectionalIter1 __middle,
+		      _BidirectionalIter1 __last,
+		      _Distance __len1, _Distance __len2,
+		      _BidirectionalIter2 __buffer,
+		      _Distance __buffer_size)
+    {
+      _BidirectionalIter2 __buffer_end;
+      if (__len1 > __len2 && __len2 <= __buffer_size) {
+	__buffer_end = copy(__middle, __last, __buffer);
+	copy_backward(__first, __middle, __last);
+	return copy(__buffer, __buffer_end, __first);
+      }
+      else if (__len1 <= __buffer_size) {
+	__buffer_end = copy(__first, __middle, __buffer);
+	copy(__middle, __last, __first);
+	return copy_backward(__buffer, __buffer_end, __last);
+      }
+      else {
+	rotate(__first, __middle, __last);
+	advance(__first, distance(__middle, __last));
+	return __first;
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    _BidirectionalIter3
+    __merge_backward(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
+		     _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+		     _BidirectionalIter3 __result)
+    {
+      if (__first1 == __last1)
+	return copy_backward(__first2, __last2, __result);
+      if (__first2 == __last2)
+	return copy_backward(__first1, __last1, __result);
+      --__last1;
+      --__last2;
+      while (true) {
+	if (*__last2 < *__last1) {
+	  *--__result = *__last1;
+	  if (__first1 == __last1)
+	    return copy_backward(__first2, ++__last2, __result);
+	  --__last1;
+	}
+	else {
+	  *--__result = *__last2;
+	  if (__first2 == __last2)
+	    return copy_backward(__first1, ++__last1, __result);
+	  --__last2;
+	}
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    _BidirectionalIter3
+    __merge_backward(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
+		     _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+		     _BidirectionalIter3 __result,
+		     _Compare __comp)
+    {
+      if (__first1 == __last1)
+	return copy_backward(__first2, __last2, __result);
+      if (__first2 == __last2)
+	return copy_backward(__first1, __last1, __result);
+      --__last1;
+      --__last2;
+      while (true) {
+	if (__comp(*__last2, *__last1)) {
+	  *--__result = *__last1;
+	  if (__first1 == __last1)
+	    return copy_backward(__first2, ++__last2, __result);
+	  --__last1;
+	}
+	else {
+	  *--__result = *__last2;
+	  if (__first2 == __last2)
+	    return copy_backward(__first1, ++__last1, __result);
+	  --__last2;
+	}
+      }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    void
+    __merge_adaptive(_BidirectionalIter __first,
+                     _BidirectionalIter __middle,
+		     _BidirectionalIter __last,
+		     _Distance __len1, _Distance __len2,
+		     _Pointer __buffer, _Distance __buffer_size)
+    {
+	  if (__len1 <= __len2 && __len1 <= __buffer_size) {
+	    _Pointer __buffer_end = copy(__first, __middle, __buffer);
+	    merge(__buffer, __buffer_end, __middle, __last, __first);
+	  }
+	  else if (__len2 <= __buffer_size) {
+	    _Pointer __buffer_end = copy(__middle, __last, __buffer);
+	    __merge_backward(__first, __middle, __buffer, __buffer_end, __last);
+	  }
+	  else {
+	    _BidirectionalIter __first_cut = __first;
+	    _BidirectionalIter __second_cut = __middle;
+	    _Distance __len11 = 0;
+	    _Distance __len22 = 0;
+	    if (__len1 > __len2) {
+		  __len11 = __len1 / 2;
+		  advance(__first_cut, __len11);
+		  __second_cut = lower_bound(__middle, __last, *__first_cut);
+		  __len22 = distance(__middle, __second_cut);
+	    }
+	    else {
+		  __len22 = __len2 / 2;
+		  advance(__second_cut, __len22);
+		  __first_cut = upper_bound(__first, __middle, *__second_cut);
+		  __len11 = distance(__first, __first_cut);
+	    }
+	    _BidirectionalIter __new_middle =
+		  __rotate_adaptive(__first_cut, __middle, __second_cut,
+				    __len1 - __len11, __len22, __buffer,
+				    __buffer_size);
+	    __merge_adaptive(__first, __first_cut, __new_middle, __len11,
+			     __len22, __buffer, __buffer_size);
+	    __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
+			     __len2 - __len22, __buffer, __buffer_size);
+	  }
+    }
+
+  /**
+   *  @if maint
+   *  This is a helper function for the merge routines.
+   *  @endif
+  */
+  template
+    void
+    __merge_adaptive(_BidirectionalIter __first,
+                     _BidirectionalIter __middle,
+		     _BidirectionalIter __last,
+		     _Distance __len1, _Distance __len2,
+		     _Pointer __buffer, _Distance __buffer_size,
+		     _Compare __comp)
+    {
+	  if (__len1 <= __len2 && __len1 <= __buffer_size) {
+	    _Pointer __buffer_end = copy(__first, __middle, __buffer);
+	    merge(__buffer, __buffer_end, __middle, __last, __first, __comp);
+	  }
+	  else if (__len2 <= __buffer_size) {
+	    _Pointer __buffer_end = copy(__middle, __last, __buffer);
+	    __merge_backward(__first, __middle, __buffer, __buffer_end, __last,
+					     __comp);
+	  }
+	  else {
+	    _BidirectionalIter __first_cut = __first;
+	    _BidirectionalIter __second_cut = __middle;
+	    _Distance __len11 = 0;
+	    _Distance __len22 = 0;
+	    if (__len1 > __len2) {
+		  __len11 = __len1 / 2;
+		  advance(__first_cut, __len11);
+		  __second_cut = lower_bound(__middle, __last, *__first_cut, __comp);
+		  __len22 = distance(__middle, __second_cut);
+	    }
+	    else {
+		  __len22 = __len2 / 2;
+		  advance(__second_cut, __len22);
+		  __first_cut = upper_bound(__first, __middle, *__second_cut, __comp);
+		  __len11 = distance(__first, __first_cut);
+	    }
+	    _BidirectionalIter __new_middle =
+		  __rotate_adaptive(__first_cut, __middle, __second_cut,
+				    __len1 - __len11, __len22, __buffer,
+				    __buffer_size);
+	    __merge_adaptive(__first, __first_cut, __new_middle, __len11,
+			     __len22, __buffer, __buffer_size, __comp);
+	    __merge_adaptive(__new_middle, __second_cut, __last, __len1 - __len11,
+			     __len2 - __len22, __buffer, __buffer_size, __comp);
+	  }
+    }
+
+  /**
+   *  @brief Merges two sorted ranges in place.
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @return  Nothing.
+   *
+   *  Merges two sorted and consecutive ranges, [first,middle) and
+   *  [middle,last), and puts the result in [first,last).  The output will
+   *  be sorted.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+   *
+   *  If enough additional memory is available, this takes (last-first)-1
+   *  comparisons.  Otherwise an NlogN algorithm is used, where N is
+   *  distance(first,last).
+  */
+  template
+    void
+    inplace_merge(_BidirectionalIter __first,
+		  _BidirectionalIter __middle,
+		  _BidirectionalIter __last)
+    {
+      typedef typename iterator_traits<_BidirectionalIter>::value_type
+          _ValueType;
+      typedef typename iterator_traits<_BidirectionalIter>::difference_type
+          _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
+	    _BidirectionalIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      if (__first == __middle || __middle == __last)
+	return;
+
+      _DistanceType __len1 = distance(__first, __middle);
+      _DistanceType __len2 = distance(__middle, __last);
+
+      _Temporary_buffer<_BidirectionalIter, _ValueType> __buf(__first, __last);
+      if (__buf.begin() == 0)
+	__merge_without_buffer(__first, __middle, __last, __len1, __len2);
+      else
+	__merge_adaptive(__first, __middle, __last, __len1, __len2,
+			 __buf.begin(), _DistanceType(__buf.size()));
+    }
+
+  /**
+   *  @brief Merges two sorted ranges in place.
+   *  @param  first   An iterator.
+   *  @param  middle  Another iterator.
+   *  @param  last    Another iterator.
+   *  @param  comp    A functor to use for comparisons.
+   *  @return  Nothing.
+   *
+   *  Merges two sorted and consecutive ranges, [first,middle) and
+   *  [middle,last), and puts the result in [first,last).  The output will
+   *  be sorted.  The sort is @e stable, that is, for equivalent
+   *  elements in the two ranges, elements from the first range will always
+   *  come before elements from the second.
+   *
+   *  If enough additional memory is available, this takes (last-first)-1
+   *  comparisons.  Otherwise an NlogN algorithm is used, where N is
+   *  distance(first,last).
+   *
+   *  The comparison function should have the same effects on ordering as
+   *  the function used for the initial sort.
+  */
+  template
+    void
+    inplace_merge(_BidirectionalIter __first,
+		  _BidirectionalIter __middle,
+		  _BidirectionalIter __last,
+		  _Compare __comp)
+    {
+      typedef typename iterator_traits<_BidirectionalIter>::value_type
+          _ValueType;
+      typedef typename iterator_traits<_BidirectionalIter>::difference_type
+          _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<
+	    _BidirectionalIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    _ValueType, _ValueType>)
+
+      if (__first == __middle || __middle == __last)
+	return;
+
+      _DistanceType __len1 = distance(__first, __middle);
+      _DistanceType __len2 = distance(__middle, __last);
+
+      _Temporary_buffer<_BidirectionalIter, _ValueType> __buf(__first, __last);
+      if (__buf.begin() == 0)
+	__merge_without_buffer(__first, __middle, __last, __len1, __len2, __comp);
+      else
+	__merge_adaptive(__first, __middle, __last, __len1, __len2,
+			 __buf.begin(), _DistanceType(__buf.size()),
+			 __comp);
+    }
+
+  // Set algorithms: includes, set_union, set_intersection, set_difference,
+  // set_symmetric_difference.  All of these algorithms have the precondition
+  // that their input ranges are sorted and the postcondition that their output
+  // ranges are sorted.
+
+  template
+    bool
+    includes(_InputIter1 __first1, _InputIter1 __last1,
+	     _InputIter2 __first2, _InputIter2 __last2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first2 < *__first1)
+	  return false;
+	else if(*__first1 < *__first2)
+	  ++__first1;
+	else
+	  ++__first1, ++__first2;
+
+      return __first2 == __last2;
+    }
+
+  template
+    bool
+    includes(_InputIter1 __first1, _InputIter1 __last1,
+	     _InputIter2 __first2, _InputIter2 __last2, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first2, *__first1))
+	  return false;
+	else if(__comp(*__first1, *__first2))
+	  ++__first1;
+	else
+	  ++__first1, ++__first2;
+
+      return __first2 == __last2;
+    }
+
+  template
+    _OutputIter
+    set_union(_InputIter1 __first1, _InputIter1 __last1,
+	      _InputIter2 __first2, _InputIter2 __last2,
+	      _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2) {
+	if (*__first1 < *__first2) {
+	  *__result = *__first1;
+	  ++__first1;
+	}
+	else if (*__first2 < *__first1) {
+	  *__result = *__first2;
+	  ++__first2;
+	}
+	else {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__first2;
+	}
+	++__result;
+      }
+      return copy(__first2, __last2, copy(__first1, __last1, __result));
+    }
+
+  template
+    _OutputIter
+    set_union(_InputIter1 __first1, _InputIter1 __last1,
+	      _InputIter2 __first2, _InputIter2 __last2,
+	      _OutputIter __result, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2) {
+	if (__comp(*__first1, *__first2)) {
+	  *__result = *__first1;
+	  ++__first1;
+	}
+	else if (__comp(*__first2, *__first1)) {
+	  *__result = *__first2;
+	  ++__first2;
+	}
+	else {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__first2;
+	}
+	++__result;
+      }
+      return copy(__first2, __last2, copy(__first1, __last1, __result));
+    }
+
+  template
+    _OutputIter
+    set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+		     _InputIter2 __first2, _InputIter2 __last2,
+		     _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first1 < *__first2)
+	  ++__first1;
+	else if (*__first2 < *__first1)
+	  ++__first2;
+	else {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__first2;
+	  ++__result;
+	}
+      return __result;
+    }
+
+  template
+    _OutputIter
+    set_intersection(_InputIter1 __first1, _InputIter1 __last1,
+		     _InputIter2 __first2, _InputIter2 __last2,
+		     _OutputIter __result, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first1, *__first2))
+	  ++__first1;
+	else if (__comp(*__first2, *__first1))
+	  ++__first2;
+	else {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__first2;
+	  ++__result;
+	}
+      return __result;
+    }
+
+  template
+    _OutputIter
+    set_difference(_InputIter1 __first1, _InputIter1 __last1,
+		   _InputIter2 __first2, _InputIter2 __last2,
+		   _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first1 < *__first2) {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__result;
+	}
+	else if (*__first2 < *__first1)
+	  ++__first2;
+	else {
+	  ++__first1;
+	  ++__first2;
+	}
+      return copy(__first1, __last1, __result);
+    }
+
+  template
+    _OutputIter
+    set_difference(_InputIter1 __first1, _InputIter1 __last1,
+		   _InputIter2 __first2, _InputIter2 __last2,
+		   _OutputIter __result, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first1, *__first2)) {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__result;
+	}
+	else if (__comp(*__first2, *__first1))
+	  ++__first2;
+	else {
+	  ++__first1;
+	  ++__first2;
+	}
+      return copy(__first1, __last1, __result);
+    }
+
+  template
+    _OutputIter
+    set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+			     _InputIter2 __first2, _InputIter2 __last2,
+			     _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (*__first1 < *__first2) {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__result;
+	}
+	else if (*__first2 < *__first1) {
+	  *__result = *__first2;
+	  ++__first2;
+	  ++__result;
+	}
+	else {
+	  ++__first1;
+	  ++__first2;
+	}
+      return copy(__first2, __last2, copy(__first1, __last1, __result));
+    }
+
+  template
+    _OutputIter
+    set_symmetric_difference(_InputIter1 __first1, _InputIter1 __last1,
+			     _InputIter2 __first2, _InputIter2 __last2,
+			     _OutputIter __result,
+			     _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_SameTypeConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && __first2 != __last2)
+	if (__comp(*__first1, *__first2)) {
+	  *__result = *__first1;
+	  ++__first1;
+	  ++__result;
+	}
+	else if (__comp(*__first2, *__first1)) {
+	  *__result = *__first2;
+	  ++__first2;
+	  ++__result;
+	}
+	else {
+	  ++__first1;
+	  ++__first2;
+	}
+      return copy(__first2, __last2, copy(__first1, __last1, __result));
+    }
+
+  // min_element and max_element, with and without an explicitly supplied
+  // comparison function.
+
+  template
+    _ForwardIter
+    max_element(_ForwardIter __first, _ForwardIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last) return __first;
+      _ForwardIter __result = __first;
+      while (++__first != __last)
+	if (*__result < *__first)
+	  __result = __first;
+      return __result;
+    }
+
+  template
+    _ForwardIter
+    max_element(_ForwardIter __first, _ForwardIter __last,
+		_Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_ForwardIter>::value_type,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last) return __first;
+      _ForwardIter __result = __first;
+      while (++__first != __last)
+	if (__comp(*__result, *__first)) __result = __first;
+      return __result;
+    }
+
+  template
+    _ForwardIter
+    min_element(_ForwardIter __first, _ForwardIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last) return __first;
+      _ForwardIter __result = __first;
+      while (++__first != __last)
+	if (*__first < *__result)
+	  __result = __first;
+      return __result;
+    }
+
+  template
+    _ForwardIter
+    min_element(_ForwardIter __first, _ForwardIter __last,
+		_Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_ForwardIter>::value_type,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last) return __first;
+      _ForwardIter __result = __first;
+      while (++__first != __last)
+	if (__comp(*__first, *__result))
+	  __result = __first;
+      return __result;
+    }
+
+  // next_permutation and prev_permutation, with and without an explicitly
+  // supplied comparison function.
+
+  template
+    bool
+    next_permutation(_BidirectionalIter __first, _BidirectionalIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_BidirectionalIter>::value_type>)
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIter __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;) {
+	_BidirectionalIter __ii = __i;
+	--__i;
+	if (*__i < *__ii) {
+	  _BidirectionalIter __j = __last;
+	  while (!(*__i < *--__j))
+	    {}
+	  iter_swap(__i, __j);
+	  reverse(__ii, __last);
+	  return true;
+	}
+	if (__i == __first) {
+	  reverse(__first, __last);
+	  return false;
+	}
+      }
+    }
+
+  template
+    bool
+    next_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+		     _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_BidirectionalIter>::value_type,
+	    typename iterator_traits<_BidirectionalIter>::value_type>)
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIter __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;) {
+	_BidirectionalIter __ii = __i;
+	--__i;
+	if (__comp(*__i, *__ii)) {
+	  _BidirectionalIter __j = __last;
+	  while (!__comp(*__i, *--__j))
+	    {}
+	  iter_swap(__i, __j);
+	  reverse(__ii, __last);
+	  return true;
+	}
+	if (__i == __first) {
+	  reverse(__first, __last);
+	  return false;
+	}
+      }
+    }
+
+  template
+    bool
+    prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_BidirectionalIter>::value_type>)
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIter __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;) {
+	_BidirectionalIter __ii = __i;
+	--__i;
+	if (*__ii < *__i) {
+	  _BidirectionalIter __j = __last;
+	  while (!(*--__j < *__i))
+	    {}
+	  iter_swap(__i, __j);
+	  reverse(__ii, __last);
+	  return true;
+	}
+	if (__i == __first) {
+	  reverse(__first, __last);
+	  return false;
+	}
+      }
+    }
+
+  template
+    bool
+    prev_permutation(_BidirectionalIter __first, _BidirectionalIter __last,
+		     _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_Compare,
+	    typename iterator_traits<_BidirectionalIter>::value_type,
+	    typename iterator_traits<_BidirectionalIter>::value_type>)
+
+      if (__first == __last)
+	return false;
+      _BidirectionalIter __i = __first;
+      ++__i;
+      if (__i == __last)
+	return false;
+      __i = __last;
+      --__i;
+
+      for(;;) {
+	_BidirectionalIter __ii = __i;
+	--__i;
+	if (__comp(*__ii, *__i)) {
+	  _BidirectionalIter __j = __last;
+	  while (!__comp(*--__j, *__i))
+	    {}
+	  iter_swap(__i, __j);
+	  reverse(__ii, __last);
+	  return true;
+	}
+	if (__i == __first) {
+	  reverse(__first, __last);
+	  return false;
+	}
+      }
+    }
+
+  // find_first_of, with and without an explicitly supplied comparison function.
+
+  template
+    _InputIter
+    find_first_of(_InputIter __first1, _InputIter __last1,
+		  _ForwardIter __first2, _ForwardIter __last2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIter>::value_type,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      for ( ; __first1 != __last1; ++__first1)
+	for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
+	  if (*__first1 == *__iter)
+	    return __first1;
+      return __last1;
+    }
+
+  template
+    _InputIter
+    find_first_of(_InputIter __first1, _InputIter __last1,
+		  _ForwardIter __first2, _ForwardIter __last2,
+		  _BinaryPredicate __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIter>::value_type,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_InputIter>::value_type,
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      for ( ; __first1 != __last1; ++__first1)
+	for (_ForwardIter __iter = __first2; __iter != __last2; ++__iter)
+	  if (__comp(*__first1, *__iter))
+	    return __first1;
+      return __last1;
+    }
+
+
+  // find_end, with and without an explicitly supplied comparison function.
+  // Search [first2, last2) as a subsequence in [first1, last1), and return
+  // the *last* possible match.  Note that find_end for bidirectional iterators
+  // is much faster than for forward iterators.
+
+  // find_end for forward iterators.
+  template
+    _ForwardIter1
+    __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+	       _ForwardIter2 __first2, _ForwardIter2 __last2,
+	       forward_iterator_tag, forward_iterator_tag)
+    {
+      if (__first2 == __last2)
+	return __last1;
+      else {
+	_ForwardIter1 __result = __last1;
+	while (1) {
+	  _ForwardIter1 __new_result
+	    = search(__first1, __last1, __first2, __last2);
+	  if (__new_result == __last1)
+	    return __result;
+	  else {
+	    __result = __new_result;
+	    __first1 = __new_result;
+	    ++__first1;
+	  }
+	}
+      }
+    }
+
+  template
+    _ForwardIter1
+    __find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+	       _ForwardIter2 __first2, _ForwardIter2 __last2,
+	       forward_iterator_tag, forward_iterator_tag,
+	       _BinaryPredicate __comp)
+    {
+      if (__first2 == __last2)
+	return __last1;
+      else {
+	_ForwardIter1 __result = __last1;
+	while (1) {
+	  _ForwardIter1 __new_result
+	    = search(__first1, __last1, __first2, __last2, __comp);
+	  if (__new_result == __last1)
+	    return __result;
+	  else {
+	    __result = __new_result;
+	    __first1 = __new_result;
+	    ++__first1;
+	  }
+	}
+      }
+    }
+
+  // find_end for bidirectional iterators.  Requires partial specialization.
+  template
+    _BidirectionalIter1
+    __find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
+	       _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+	       bidirectional_iterator_tag, bidirectional_iterator_tag)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter1>)
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter2>)
+
+      typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
+      typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
+
+      _RevIter1 __rlast1(__first1);
+      _RevIter2 __rlast2(__first2);
+      _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
+				   _RevIter2(__last2), __rlast2);
+
+      if (__rresult == __rlast1)
+	return __last1;
+      else {
+	_BidirectionalIter1 __result = __rresult.base();
+	advance(__result, -distance(__first2, __last2));
+	return __result;
+      }
+    }
+
+  template
+    _BidirectionalIter1
+    __find_end(_BidirectionalIter1 __first1, _BidirectionalIter1 __last1,
+	       _BidirectionalIter2 __first2, _BidirectionalIter2 __last2,
+	       bidirectional_iterator_tag, bidirectional_iterator_tag,
+	       _BinaryPredicate __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter1>)
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIter2>)
+
+      typedef reverse_iterator<_BidirectionalIter1> _RevIter1;
+      typedef reverse_iterator<_BidirectionalIter2> _RevIter2;
+
+      _RevIter1 __rlast1(__first1);
+      _RevIter2 __rlast2(__first2);
+      _RevIter1 __rresult = search(_RevIter1(__last1), __rlast1,
+				   _RevIter2(__last2), __rlast2,
+				   __comp);
+
+      if (__rresult == __rlast1)
+	return __last1;
+      else {
+	_BidirectionalIter1 __result = __rresult.base();
+	advance(__result, -distance(__first2, __last2));
+	return __result;
+      }
+    }
+
+  // Dispatching functions for find_end.
+
+  template
+    inline _ForwardIter1
+    find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+	     _ForwardIter2 __first2, _ForwardIter2 __last2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_ForwardIter1>::value_type,
+	    typename iterator_traits<_ForwardIter2>::value_type>)
+
+      return __find_end(__first1, __last1, __first2, __last2,
+			__iterator_category(__first1),
+			__iterator_category(__first2));
+    }
+
+  template
+    inline _ForwardIter1
+    find_end(_ForwardIter1 __first1, _ForwardIter1 __last1,
+	     _ForwardIter2 __first2, _ForwardIter2 __last2,
+	     _BinaryPredicate __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter1>)
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter2>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_BinaryPredicate,
+	    typename iterator_traits<_ForwardIter1>::value_type,
+	    typename iterator_traits<_ForwardIter2>::value_type>)
+
+      return __find_end(__first1, __last1, __first2, __last2,
+			__iterator_category(__first1),
+			__iterator_category(__first2),
+			__comp);
+    }
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_ALGO_H */
+
diff --git a/contrib/libstdc++/include/bits/stl_algobase.h b/contrib/libstdc++/include/bits/stl_algobase.h
new file mode 100644
index 0000000..6e488ea
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_algobase.h
@@ -0,0 +1,820 @@
+// Bits and pieces used in algorithms -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_algobase.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_ALGOBASE_H
+#define __GLIBCPP_INTERNAL_ALGOBASE_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+  // swap and iter_swap
+
+  /**
+   *  @brief Swaps the contents of two iterators.
+   *  @param  a  An iterator.
+   *  @param  b  Another iterator.
+   *  @return   Nothing.
+   *
+   *  This function swaps the values pointed to by two iterators, not the
+   *  iterators themselves.
+  */
+  template
+    inline void
+    iter_swap(_ForwardIter1 __a, _ForwardIter2 __b)
+    {
+      typedef typename iterator_traits<_ForwardIter1>::value_type _ValueType1;
+      typedef typename iterator_traits<_ForwardIter2>::value_type _ValueType2;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter1>)
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter2>)
+      __glibcpp_function_requires(_ConvertibleConcept<_ValueType1, _ValueType2>)
+      __glibcpp_function_requires(_ConvertibleConcept<_ValueType2, _ValueType1>)
+
+      _ValueType1 __tmp = *__a;
+      *__a = *__b;
+      *__b = __tmp;
+    }
+
+  /**
+   *  @brief Swaps two values.
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @return   Nothing.
+   *
+   *  This is the simple classic generic implementation.  It will work on
+   *  any type which has a copy constructor and an assignment operator.
+  */
+  template
+    inline void
+    swap(_Tp& __a, _Tp& __b)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_SGIAssignableConcept<_Tp>)
+      
+      _Tp __tmp = __a;
+      __a = __b;
+      __b = __tmp;
+    }
+
+  //--------------------------------------------------
+  // min and max
+
+  #undef min
+  #undef max
+
+  /**
+   *  @brief This does what you think it does.
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @return   The lesser of the parameters.
+   *
+   *  This is the simple classic generic implementation.  It will work on
+   *  temporary expressions, since they are only evaluated once, unlike a
+   *  preprocessor macro.
+  */
+  template
+    inline const _Tp&
+    min(const _Tp& __a, const _Tp& __b)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+      //return __b < __a ? __b : __a;
+      if (__b < __a) return __b; return __a;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @return   The greater of the parameters.
+   *
+   *  This is the simple classic generic implementation.  It will work on
+   *  temporary expressions, since they are only evaluated once, unlike a
+   *  preprocessor macro.
+  */
+  template
+    inline const _Tp&
+    max(const _Tp& __a, const _Tp& __b) 
+    {
+      // concept requirements
+      __glibcpp_function_requires(_LessThanComparableConcept<_Tp>)
+      //return  __a < __b ? __b : __a;
+      if (__a < __b) return __b; return __a;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @param  comp  A @link s20_3_3_comparisons comparison functor@endlink.
+   *  @return   The lesser of the parameters.
+   *
+   *  This will work on temporary expressions, since they are only evaluated
+   *  once, unlike a preprocessor macro.
+  */
+  template
+    inline const _Tp&
+    min(const _Tp& __a, const _Tp& __b, _Compare __comp)
+    {
+      //return __comp(__b, __a) ? __b : __a;
+      if (__comp(__b, __a)) return __b; return __a;
+    }
+
+  /**
+   *  @brief This does what you think it does.
+   *  @param  a  A thing of arbitrary type.
+   *  @param  b  Another thing of arbitrary type.
+   *  @param  comp  A @link s20_3_3_comparisons comparison functor@endlink.
+   *  @return   The greater of the parameters.
+   *
+   *  This will work on temporary expressions, since they are only evaluated
+   *  once, unlike a preprocessor macro.
+  */
+  template
+    inline const _Tp&
+    max(const _Tp& __a, const _Tp& __b, _Compare __comp)
+    {
+      //return __comp(__a, __b) ? __b : __a;
+      if (__comp(__a, __b)) return __b; return __a;
+    }
+
+  //--------------------------------------------------
+  // copy
+
+  // All of these auxiliary functions serve two purposes.  (1) Replace
+  // calls to copy with memmove whenever possible.  (Memmove, not memcpy,
+  // because the input and output ranges are permitted to overlap.)
+  // (2) If we're using random access iterators, then write the loop as
+  // a for loop with an explicit count.
+
+  template
+    inline _OutputIter
+    __copy(_InputIter __first, _InputIter __last,
+	   _OutputIter __result,
+	   input_iterator_tag)
+    {
+      for ( ; __first != __last; ++__result, ++__first)
+	*__result = *__first;
+      return __result;
+    }
+
+  template
+    inline _OutputIter
+    __copy(_RandomAccessIter __first, _RandomAccessIter __last,
+	   _OutputIter __result,
+	   random_access_iterator_tag)
+    {
+      typedef typename iterator_traits<_RandomAccessIter>::difference_type
+          _Distance;
+      for (_Distance __n = __last - __first; __n > 0; --__n) {
+	*__result = *__first;
+	++__first;
+	++__result;
+      }
+      return __result;
+    }
+
+  template
+    inline _Tp*
+    __copy_trivial(const _Tp* __first, const _Tp* __last, _Tp* __result)
+    {
+      memmove(__result, __first, sizeof(_Tp) * (__last - __first));
+      return __result + (__last - __first);
+    }
+
+  template
+    inline _OutputIter
+    __copy_aux2(_InputIter __first, _InputIter __last,
+		_OutputIter __result, __false_type)
+    { return __copy(__first, __last, __result, __iterator_category(__first)); }
+
+  template
+    inline _OutputIter
+    __copy_aux2(_InputIter __first, _InputIter __last,
+		_OutputIter __result, __true_type)
+    { return __copy(__first, __last, __result, __iterator_category(__first)); }
+
+  template
+    inline _Tp*
+    __copy_aux2(_Tp* __first, _Tp* __last,
+		_Tp* __result, __true_type)
+    { return __copy_trivial(__first, __last, __result); }
+
+  template
+    inline _Tp*
+    __copy_aux2(const _Tp* __first, const _Tp* __last,
+		_Tp* __result, __true_type)
+    { return __copy_trivial(__first, __last, __result); }
+
+  template
+    inline _OutputIter
+    __copy_ni2(_InputIter __first, _InputIter __last,
+	       _OutputIter __result, __true_type)
+    {
+      typedef typename iterator_traits<_InputIter>::value_type
+	  _ValueType;
+      typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
+	  _Trivial;
+      return _OutputIter(__copy_aux2(__first, __last,
+                                     __result.base(),
+				     _Trivial()));
+    }
+
+  template
+    inline _OutputIter
+    __copy_ni2(_InputIter __first, _InputIter __last,
+	       _OutputIter __result, __false_type)
+    {
+      typedef typename iterator_traits<_InputIter>::value_type
+          _ValueType;
+      typedef typename __type_traits<_ValueType>::has_trivial_assignment_operator
+          _Trivial;
+      return __copy_aux2(__first, __last,
+                         __result,
+			 _Trivial());
+    }
+
+  template
+    inline _OutputIter
+    __copy_ni1(_InputIter __first, _InputIter __last,
+	       _OutputIter __result, __true_type)
+    {
+      typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
+      return __copy_ni2(__first.base(), __last.base(), __result, __Normal());
+    }
+
+  template
+    inline _OutputIter
+    __copy_ni1(_InputIter __first, _InputIter __last,
+	       _OutputIter __result, __false_type)
+    {
+      typedef typename _Is_normal_iterator<_OutputIter>::_Normal __Normal;
+      return __copy_ni2(__first, __last, __result, __Normal());
+    }
+
+  /**
+   *  @brief Copies the range [first,last) into result.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  result An output iterator.
+   *  @return   result + (first - last)
+   *
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).  If the input range and the output
+   *  range overlap, then the copy_backward function should be used instead.
+  */
+  template
+    inline _OutputIter
+    copy(_InputIter __first, _InputIter __last, _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+
+       typedef typename _Is_normal_iterator<_InputIter>::_Normal __Normal;
+       return __copy_ni1(__first, __last, __result, __Normal());
+    }
+
+  //--------------------------------------------------
+  // copy_backward
+
+  template
+    inline _BidirectionalIter2
+    __copy_backward(_BidirectionalIter1 __first, _BidirectionalIter1 __last, 
+		    _BidirectionalIter2 __result,
+		    bidirectional_iterator_tag)
+    {
+      while (__first != __last)
+        *--__result = *--__last;
+      return __result;
+    }
+
+  template
+    inline _BidirectionalIter
+    __copy_backward(_RandomAccessIter __first, _RandomAccessIter __last, 
+		    _BidirectionalIter __result,
+		    random_access_iterator_tag)
+    {
+      typename iterator_traits<_RandomAccessIter>::difference_type __n;
+      for (__n = __last - __first; __n > 0; --__n)
+        *--__result = *--__last;
+      return __result;
+    }
+
+
+  // This dispatch class is a workaround for compilers that do not 
+  // have partial ordering of function templates.  All we're doing is
+  // creating a specialization so that we can turn a call to copy_backward
+  // into a memmove whenever possible.
+
+  template
+    struct __copy_backward_dispatch
+    {
+      static _BidirectionalIter2
+      copy(_BidirectionalIter1 __first, _BidirectionalIter1 __last, 
+	   _BidirectionalIter2 __result)
+      {
+        return __copy_backward(__first, __last,
+	                       __result,
+			       __iterator_category(__first));
+      }
+    };
+
+  template
+    struct __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
+    {
+      static _Tp*
+      copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
+      {
+	const ptrdiff_t _Num = __last - __first;
+	memmove(__result - _Num, __first, sizeof(_Tp) * _Num);
+	return __result - _Num;
+      }
+    };
+
+  template
+    struct __copy_backward_dispatch
+    {
+      static _Tp*
+      copy(const _Tp* __first, const _Tp* __last, _Tp* __result)
+      {
+	return  __copy_backward_dispatch<_Tp*, _Tp*, __true_type>
+	  ::copy(__first, __last, __result);
+      }
+    };
+
+  template
+    inline _BI2
+    __copy_backward_aux(_BI1 __first, _BI1 __last, _BI2 __result)
+    {
+      typedef typename __type_traits::value_type>
+			    ::has_trivial_assignment_operator _Trivial;
+      return __copy_backward_dispatch<_BI1, _BI2, _Trivial>
+		  ::copy(__first, __last, __result);
+    }
+
+  template 
+    inline _BI2
+    __copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
+					   _BI2 __result, __true_type)
+    { return _BI2(__copy_backward_aux(__first, __last, __result.base())); }
+
+  template 
+    inline _BI2
+    __copy_backward_output_normal_iterator(_BI1 __first, _BI1 __last,
+					   _BI2 __result, __false_type)
+    { return __copy_backward_aux(__first, __last, __result); }
+
+  template 
+    inline _BI2
+    __copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last,
+					  _BI2 __result, __true_type)
+    {
+      typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
+      return __copy_backward_output_normal_iterator(__first.base(), __last.base(),
+						    __result, __Normal());
+    }
+
+  template 
+    inline _BI2
+    __copy_backward_input_normal_iterator(_BI1 __first, _BI1 __last,
+					  _BI2 __result, __false_type)
+    {
+      typedef typename _Is_normal_iterator<_BI2>::_Normal __Normal;
+      return __copy_backward_output_normal_iterator(__first, __last, __result,
+						    __Normal());
+    }
+
+  /**
+   *  @brief Copies the range [first,last) into result.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  result An output iterator.
+   *  @return   result - (first - last)
+   *
+   *  The function has the same effect as copy, but starts at the end of the
+   *  range and works its way to the start, returning the start of the result.
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).
+  */
+  template 
+    inline _BI2
+    copy_backward(_BI1 __first, _BI1 __last, _BI2 __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_BidirectionalIteratorConcept<_BI1>)
+      __glibcpp_function_requires(_Mutable_BidirectionalIteratorConcept<_BI2>)
+      __glibcpp_function_requires(_ConvertibleConcept<
+	    typename iterator_traits<_BI1>::value_type,
+	    typename iterator_traits<_BI2>::value_type>)
+
+      typedef typename _Is_normal_iterator<_BI1>::_Normal __Normal;
+      return __copy_backward_input_normal_iterator(__first, __last, __result,
+						   __Normal());
+    }
+
+
+  //--------------------------------------------------
+  // fill and fill_n
+
+
+  /**
+   *  @brief Fills the range [first,last) with copies of value.
+   *  @param  first  A forward iterator.
+   *  @param  last   A forward iterator.
+   *  @param  value  A reference-to-const of arbitrary type.
+   *  @return   Nothing.
+   *
+   *  This function fills a range with copies of the same value.  For one-byte
+   *  types filling contiguous areas of memory, this becomes an inline call to
+   *  @c memset.
+  */
+  template
+    void
+    fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+
+      for ( ; __first != __last; ++__first)
+	*__first = __value;
+    }
+
+  /**
+   *  @brief Fills the range [first,first+n) with copies of value.
+   *  @param  first  An output iterator.
+   *  @param  n      The count of copies to perform.
+   *  @param  value  A reference-to-const of arbitrary type.
+   *  @return   The iterator at first+n.
+   *
+   *  This function fills a range with copies of the same value.  For one-byte
+   *  types filling contiguous areas of memory, this becomes an inline call to
+   *  @c memset.
+  */
+  template
+    _OutputIter
+    fill_n(_OutputIter __first, _Size __n, const _Tp& __value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,_Tp>)
+
+      for ( ; __n > 0; --__n, ++__first)
+	*__first = __value;
+      return __first;
+    }
+
+  // Specialization: for one-byte types we can use memset.
+
+  inline void
+  fill(unsigned char* __first, unsigned char* __last, const unsigned char& __c)
+  {
+    unsigned char __tmp = __c;
+    memset(__first, __tmp, __last - __first);
+  }
+
+  inline void
+  fill(signed char* __first, signed char* __last, const signed char& __c)
+  {
+    signed char __tmp = __c;
+    memset(__first, static_cast(__tmp), __last - __first);
+  }
+
+  inline void
+  fill(char* __first, char* __last, const char& __c)
+  {
+    char __tmp = __c;
+    memset(__first, static_cast(__tmp), __last - __first);
+  }
+
+  template
+    inline unsigned char*
+    fill_n(unsigned char* __first, _Size __n, const unsigned char& __c)
+    {
+      fill(__first, __first + __n, __c);
+      return __first + __n;
+    }
+
+  template
+    inline signed char*
+    fill_n(char* __first, _Size __n, const signed char& __c)
+    {
+      fill(__first, __first + __n, __c);
+      return __first + __n;
+    }
+
+  template
+    inline char*
+    fill_n(char* __first, _Size __n, const char& __c)
+    {
+      fill(__first, __first + __n, __c);
+      return __first + __n;
+    }
+
+
+  //--------------------------------------------------
+  // equal and mismatch
+
+  /**
+   *  @brief Finds the places in ranges which don't match.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @return   A pair of iterators pointing to the first mismatch.
+   *
+   *  This compares the elements of two ranges using @c == and returns a pair
+   *  of iterators.  The first iterator points into the first range, the
+   *  second iterator points into the second range, and the elements pointed
+   *  to by the iterators are not equal.
+  */
+  template
+    pair<_InputIter1, _InputIter2>
+    mismatch(_InputIter1 __first1, _InputIter1 __last1,
+	     _InputIter2 __first2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      while (__first1 != __last1 && *__first1 == *__first2) {
+	++__first1;
+	++__first2;
+      }
+      return pair<_InputIter1, _InputIter2>(__first1, __first2);
+    }
+
+  /**
+   *  @brief Finds the places in ranges which don't match.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  binary_pred  A binary predicate @link s20_3_1_base functor@endlink.
+   *  @return   A pair of iterators pointing to the first mismatch.
+   *
+   *  This compares the elements of two ranges using the binary_pred
+   *  parameter, and returns a pair
+   *  of iterators.  The first iterator points into the first range, the
+   *  second iterator points into the second range, and the elements pointed
+   *  to by the iterators are not equal.
+  */
+  template
+    pair<_InputIter1, _InputIter2>
+    mismatch(_InputIter1 __first1, _InputIter1 __last1,
+	     _InputIter2 __first2,
+	     _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+
+      while (__first1 != __last1 && __binary_pred(*__first1, *__first2)) {
+	++__first1;
+	++__first2;
+      }
+      return pair<_InputIter1, _InputIter2>(__first1, __first2);
+    }
+
+  /**
+   *  @brief Tests a range for element-wise equality.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @return   A boolean true or false.
+   *
+   *  This compares the elements of two ranges using @c == and returns true or
+   *  false depending on whether all of the corresponding elements of the
+   *  ranges are equal.
+  */
+  template
+    inline bool
+    equal(_InputIter1 __first1, _InputIter1 __last1,
+	  _InputIter2 __first2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_EqualOpConcept<
+	    typename iterator_traits<_InputIter1>::value_type,
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      for ( ; __first1 != __last1; ++__first1, ++__first2)
+	if (!(*__first1 == *__first2))
+	  return false;
+      return true;
+    }
+
+  /**
+   *  @brief Tests a range for element-wise equality.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  binary_pred  A binary predicate @link s20_3_1_base functor@endlink.
+   *  @return   A boolean true or false.
+   *
+   *  This compares the elements of two ranges using the binary_pred
+   *  parameter, and returns true or
+   *  false depending on whether all of the corresponding elements of the
+   *  ranges are equal.
+  */
+  template
+    inline bool
+    equal(_InputIter1 __first1, _InputIter1 __last1,
+	  _InputIter2 __first2,
+	  _BinaryPredicate __binary_pred)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+
+      for ( ; __first1 != __last1; ++__first1, ++__first2)
+	if (!__binary_pred(*__first1, *__first2))
+	  return false;
+      return true;
+    }
+
+  //--------------------------------------------------
+  // lexicographical_compare
+
+  /**
+   *  @brief Performs "dictionary" comparison on ranges.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  last2   An input iterator.
+   *  @return   A boolean true or false.
+   *
+   *  "Returns true if the sequence of elements defined by the range
+   *  [first1,last1) is lexicographically less than the sequence of elements
+   *  defined by the range [first2,last2).  Returns false otherwise."
+   *  (Quoted from [25.3.8]/1.)  If the iterators are all character pointers,
+   *  then this is an inline call to @c memcmp.
+  */
+  template
+    bool
+    lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
+			    _InputIter2 __first2, _InputIter2 __last2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      for ( ; __first1 != __last1 && __first2 != __last2
+	    ; ++__first1, ++__first2) {
+	if (*__first1 < *__first2)
+	  return true;
+	if (*__first2 < *__first1)
+	  return false;
+      }
+      return __first1 == __last1 && __first2 != __last2;
+    }
+
+  /**
+   *  @brief Performs "dictionary" comparison on ranges.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  last2   An input iterator.
+   *  @param  comp  A @link s20_3_3_comparisons comparison functor@endlink.
+   *  @return   A boolean true or false.
+   *
+   *  The same as the four-parameter @c lexigraphical_compare, but uses the
+   *  comp parameter instead of @c <.
+  */
+  template
+    bool
+    lexicographical_compare(_InputIter1 __first1, _InputIter1 __last1,
+			    _InputIter2 __first2, _InputIter2 __last2,
+			    _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+
+      for ( ; __first1 != __last1 && __first2 != __last2
+	    ; ++__first1, ++__first2) {
+	if (__comp(*__first1, *__first2))
+	  return true;
+	if (__comp(*__first2, *__first1))
+	  return false;
+      }
+      return __first1 == __last1 && __first2 != __last2;
+    }
+
+  inline bool 
+  lexicographical_compare(const unsigned char* __first1, const unsigned char* __last1,
+			  const unsigned char* __first2, const unsigned char* __last2)
+  {
+    const size_t __len1 = __last1 - __first1;
+    const size_t __len2 = __last2 - __first2;
+    const int __result = memcmp(__first1, __first2, min(__len1, __len2));
+    return __result != 0 ? __result < 0 : __len1 < __len2;
+  }
+
+  inline bool
+  lexicographical_compare(const char* __first1, const char* __last1,
+			  const char* __first2, const char* __last2)
+  {
+#if CHAR_MAX == SCHAR_MAX
+    return lexicographical_compare((const signed char*) __first1,
+				   (const signed char*) __last1,
+				   (const signed char*) __first2,
+				   (const signed char*) __last2);
+#else /* CHAR_MAX == SCHAR_MAX */
+    return lexicographical_compare((const unsigned char*) __first1,
+				   (const unsigned char*) __last1,
+				   (const unsigned char*) __first2,
+				   (const unsigned char*) __last2);
+#endif /* CHAR_MAX == SCHAR_MAX */
+  }
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_ALGOBASE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_alloc.h b/contrib/libstdc++/include/bits/stl_alloc.h
new file mode 100644
index 0000000..7c34000
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_alloc.h
@@ -0,0 +1,941 @@
+// Allocators -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_alloc.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_ALLOC_H
+#define __GLIBCPP_INTERNAL_ALLOC_H
+
+/**
+ *  @defgroup Allocators Memory Allocators
+ *  @if maint
+ *  stl_alloc.h implements some node allocators.  These are NOT the same as
+ *  allocators in the C++ standard, nor in the original H-P STL.  They do not
+ *  encapsulate different pointer types; we assume that there is only one
+ *  pointer type.  The C++ standard allocators are intended to allocate
+ *  individual objects, not pools or arenas.
+ *
+ *  In this file allocators are of two different styles:  "standard" and
+ *  "SGI" (quotes included).  "Standard" allocators conform to 20.4.  "SGI"
+ *  allocators differ in AT LEAST the following ways (add to this list as you
+ *  discover them):
+ *
+ *   - "Standard" allocate() takes two parameters (n_count,hint=0) but "SGI"
+ *     allocate() takes one paramter (n_size).
+ *   - Likewise, "standard" deallocate()'s argument is a count, but in "SGI"
+ *     is a byte size.
+ *   - max_size(), construct(), and destroy() are missing in "SGI" allocators.
+ *   - reallocate(p,oldsz,newsz) is added in "SGI", and behaves as
+ *     if p=realloc(p,newsz).
+ *
+ *  "SGI" allocators may be wrapped in __allocator to convert the interface
+ *  into a "standard" one.
+ *  @endif
+ *
+ *  The canonical description of these classes is in docs/html/ext/howto.html
+ *  or online at http://gcc.gnu.org/onlinedocs/libstdc++/ext/howto.html#3
+*/
+
+#include 
+#include 
+#include 
+#include 
+#include    // For __throw_bad_alloc
+#include 
+
+namespace std
+{
+  /**
+   *  @if maint
+   *  A new-based allocator, as required by the standard.  Allocation and
+   *  deallocation forward to global new and delete.  "SGI" style, minus
+   *  reallocate().
+   *  @endif
+   *  (See @link Allocators allocators info @endlink for more.)
+  */
+  class __new_alloc 
+  {
+  public:
+    static void* 
+    allocate(size_t __n)
+    { return ::operator new(__n); }
+    
+    static void 
+    deallocate(void* __p, size_t)
+    { ::operator delete(__p); }
+  };
+  
+
+  /**
+   *  @if maint
+   *  A malloc-based allocator.  Typically slower than the
+   *  __default_alloc_template (below).  Typically thread-safe and more
+   *  storage efficient.  The template argument is unused and is only present
+   *  to permit multiple instantiations (but see __default_alloc_template
+   *  for caveats).  "SGI" style, plus __set_malloc_handler for OOM conditions.
+   *  @endif
+   *  (See @link Allocators allocators info @endlink for more.)
+  */
+  template 
+    class __malloc_alloc_template 
+    {
+    private:
+      static void* _S_oom_malloc(size_t);
+      static void* _S_oom_realloc(void*, size_t);
+      static void (* __malloc_alloc_oom_handler)();
+      
+    public:
+      static void* 
+      allocate(size_t __n)
+      {
+	void* __result = malloc(__n);
+	if (0 == __result) __result = _S_oom_malloc(__n);
+	return __result;
+      }
+
+      static void 
+      deallocate(void* __p, size_t /* __n */)
+      { free(__p); }
+
+      static void* 
+      reallocate(void* __p, size_t /* old_sz */, size_t __new_sz)
+      {
+	void* __result = realloc(__p, __new_sz);
+	if (0 == __result) __result = _S_oom_realloc(__p, __new_sz);
+	return __result;
+      }
+      
+      static void (* __set_malloc_handler(void (*__f)()))()
+      {
+	void (* __old)() = __malloc_alloc_oom_handler;
+	__malloc_alloc_oom_handler = __f;
+	return(__old);
+      }
+    };
+
+  // malloc_alloc out-of-memory handling
+  template 
+    void (* __malloc_alloc_template<__inst>::__malloc_alloc_oom_handler)() = 0;
+
+  template 
+    void*
+    __malloc_alloc_template<__inst>::_S_oom_malloc(size_t __n)
+    {
+      void (* __my_malloc_handler)();
+      void* __result;
+      
+      for (;;) 
+	{
+	  __my_malloc_handler = __malloc_alloc_oom_handler;
+	  if (0 == __my_malloc_handler) 
+	    std::__throw_bad_alloc();
+	  (*__my_malloc_handler)();
+	  __result = malloc(__n);
+	  if (__result) 
+	    return(__result);
+	}
+    }
+  
+  template 
+    void* 
+    __malloc_alloc_template<__inst>::_S_oom_realloc(void* __p, size_t __n)
+    { 
+      void (* __my_malloc_handler)();
+      void* __result;
+      
+      for (;;) 
+	{
+	  __my_malloc_handler = __malloc_alloc_oom_handler;
+	  if (0 == __my_malloc_handler) 
+	    std::__throw_bad_alloc();
+	  (*__my_malloc_handler)();
+	  __result = realloc(__p, __n);
+	  if (__result) 
+	    return(__result);
+	}
+    }
+
+
+// Determines the underlying allocator choice for the node allocator.
+#ifdef __USE_MALLOC
+  typedef __malloc_alloc_template<0>  __mem_interface;
+#else
+  typedef __new_alloc                 __mem_interface;
+#endif
+
+
+  /**
+   *  @if maint
+   *  This is used primarily (only?) in _Alloc_traits and other places to
+   *  help provide the _Alloc_type typedef.
+   *
+   *  This is neither "standard"-conforming nor "SGI".  The _Alloc parameter
+   *  must be "SGI" style.
+   *  @endif
+   *  (See @link Allocators allocators info @endlink for more.)
+  */
+  template
+  class __simple_alloc
+  {
+  public:
+    static _Tp* allocate(size_t __n)
+    { return 0 == __n ? 0 : (_Tp*) _Alloc::allocate(__n * sizeof (_Tp)); }
+
+    static _Tp* allocate()
+    { return (_Tp*) _Alloc::allocate(sizeof (_Tp)); }
+
+    static void deallocate(_Tp* __p, size_t __n)
+    { if (0 != __n) _Alloc::deallocate(__p, __n * sizeof (_Tp)); }
+
+    static void deallocate(_Tp* __p)
+    { _Alloc::deallocate(__p, sizeof (_Tp)); }
+  };
+
+
+  /**
+   *  @if maint
+   *  An adaptor for an underlying allocator (_Alloc) to check the size
+   *  arguments for debugging.  Errors are reported using assert; these
+   *  checks can be disabled via NDEBUG, but the space penalty is still
+   *  paid, therefore it is far better to just use the underlying allocator
+   *  by itelf when no checking is desired.
+   *
+   *  "There is some evidence that this can confuse Purify." - SGI comment
+   *
+   *  This adaptor is "SGI" style.  The _Alloc parameter must also be "SGI".
+   *  @endif
+   *  (See @link Allocators allocators info @endlink for more.)
+  */
+  template 
+  class __debug_alloc
+  {
+  private:
+    enum {_S_extra = 8};  // Size of space used to store size.  Note that this
+                          // must be large enough to preserve alignment.
+  
+  public:
+  
+    static void* allocate(size_t __n)
+    {
+      char* __result = (char*)_Alloc::allocate(__n + (int) _S_extra);
+      *(size_t*)__result = __n;
+      return __result + (int) _S_extra;
+    }
+  
+    static void deallocate(void* __p, size_t __n)
+    {
+      char* __real_p = (char*)__p - (int) _S_extra;
+      assert(*(size_t*)__real_p == __n);
+      _Alloc::deallocate(__real_p, __n + (int) _S_extra);
+    }
+  
+    static void* reallocate(void* __p, size_t __old_sz, size_t __new_sz)
+    {
+      char* __real_p = (char*)__p - (int) _S_extra;
+      assert(*(size_t*)__real_p == __old_sz);
+      char* __result = (char*)
+        _Alloc::reallocate(__real_p, __old_sz + (int) _S_extra,
+                                     __new_sz + (int) _S_extra);
+      *(size_t*)__result = __new_sz;
+      return __result + (int) _S_extra;
+    }
+  };
+
+
+#ifdef __USE_MALLOC
+
+typedef __mem_interface __alloc;
+typedef __mem_interface __single_client_alloc;
+
+#else
+
+
+/**
+ *  @if maint
+ *  Default node allocator.  "SGI" style.  Uses __mem_interface for its
+ *  underlying requests (and makes as few requests as possible).
+ *  **** Currently __mem_interface is always __new_alloc, never __malloc*.
+ * 
+ *  Important implementation properties:
+ *  1. If the clients request an object of size > _MAX_BYTES, the resulting
+ *     object will be obtained directly from the underlying __mem_interface.
+ *  2. In all other cases, we allocate an object of size exactly
+ *     _S_round_up(requested_size).  Thus the client has enough size
+ *     information that we can return the object to the proper free list
+ *     without permanently losing part of the object.
+ * 
+ *  The first template parameter specifies whether more than one thread may
+ *  use this allocator.  It is safe to allocate an object from one instance
+ *  of a default_alloc and deallocate it with another one.  This effectively
+ *  transfers its ownership to the second one.  This may have undesirable
+ *  effects on reference locality.
+ *
+ *  The second parameter is unused and serves only to allow the creation of
+ *  multiple default_alloc instances.  Note that containers built on different
+ *  allocator instances have different types, limiting the utility of this
+ *  approach.  If you do not wish to share the free lists with the main
+ *  default_alloc instance, instantiate this with a non-zero __inst.
+ *
+ *  @endif
+ *  (See @link Allocators allocators info @endlink for more.)
+*/
+template
+  class __default_alloc_template
+  {
+  private:
+    enum {_ALIGN = 8};
+    enum {_MAX_BYTES = 128};
+    enum {_NFREELISTS = _MAX_BYTES / _ALIGN};
+    
+    union _Obj 
+    {
+      union _Obj* _M_free_list_link;
+      char        _M_client_data[1];    // The client sees this.
+    };
+
+    static _Obj* volatile 	_S_free_list[_NFREELISTS]; 
+
+    // Chunk allocation state.
+    static char* 		_S_start_free;
+    static char* 		_S_end_free;
+    static size_t 		_S_heap_size;
+    
+    static _STL_mutex_lock 	_S_node_allocator_lock;
+
+    static size_t
+    _S_round_up(size_t __bytes) 
+    { return (((__bytes) + (size_t) _ALIGN-1) & ~((size_t) _ALIGN - 1)); }
+
+    static size_t 
+    _S_freelist_index(size_t __bytes)
+    { return (((__bytes) + (size_t)_ALIGN-1)/(size_t)_ALIGN - 1); }
+
+    // Returns an object of size __n, and optionally adds to size __n
+    // free list.
+    static void* 
+    _S_refill(size_t __n);
+
+    // Allocates a chunk for nobjs of size size.  nobjs may be reduced
+    // if it is inconvenient to allocate the requested number.
+    static char* 
+    _S_chunk_alloc(size_t __size, int& __nobjs);
+    
+    // It would be nice to use _STL_auto_lock here.  But we need a
+    // test whether threads are in use.
+    class _Lock 
+    {
+    public:
+      _Lock() { if (__threads) _S_node_allocator_lock._M_acquire_lock(); }
+      ~_Lock() { if (__threads) _S_node_allocator_lock._M_release_lock(); }
+    } __attribute__ ((__unused__));
+    friend class _Lock;
+    
+  public:
+    // __n must be > 0
+    static void* 
+    allocate(size_t __n)
+    {
+      void* __ret = 0;
+      
+      if (__n > (size_t) _MAX_BYTES) 
+	__ret = __mem_interface::allocate(__n);
+      else 
+	{
+	  _Obj* volatile* __my_free_list = _S_free_list 
+	    + _S_freelist_index(__n);
+	  // Acquire the lock here with a constructor call.  This
+	  // ensures that it is released in exit or during stack
+	  // unwinding.
+	  _Lock __lock_instance;
+	  _Obj* __restrict__ __result = *__my_free_list;
+	  if (__result == 0)
+	    __ret = _S_refill(_S_round_up(__n));
+	  else 
+	    {
+	      *__my_free_list = __result -> _M_free_list_link;
+	      __ret = __result;
+	    }
+	}
+      return __ret;
+    };
+
+    // __p may not be 0
+    static void 
+    deallocate(void* __p, size_t __n)
+    {
+      if (__n > (size_t) _MAX_BYTES)
+	__mem_interface::deallocate(__p, __n);
+      else 
+	{
+	  _Obj* volatile*  __my_free_list
+	    = _S_free_list + _S_freelist_index(__n);
+	  _Obj* __q = (_Obj*)__p;
+	  
+	  // Acquire the lock here with a constructor call.  This ensures that
+	  // it is released in exit or during stack unwinding.
+	  _Lock __lock_instance;
+	  __q -> _M_free_list_link = *__my_free_list;
+	  *__my_free_list = __q;
+	}
+    }
+    
+    static void* 
+    reallocate(void* __p, size_t __old_sz, size_t __new_sz);
+  };
+
+
+  template
+    inline bool 
+    operator==(const __default_alloc_template<__threads, __inst>&,
+	       const __default_alloc_template<__threads, __inst>&)
+    { return true; }
+
+  template
+    inline bool 
+    operator!=(const __default_alloc_template<__threads, __inst>&,
+	       const __default_alloc_template<__threads, __inst>&)
+    { return false; }
+
+
+  // We allocate memory in large chunks in order to avoid fragmenting the
+  // malloc heap (or whatever __mem_interface is using) too much.  We assume
+  // that __size is properly aligned.  We hold the allocation lock.
+  template
+    char*
+    __default_alloc_template<__threads, __inst>::_S_chunk_alloc(size_t __size, 
+								int& __nobjs)
+    {
+      char* __result;
+      size_t __total_bytes = __size * __nobjs;
+      size_t __bytes_left = _S_end_free - _S_start_free;
+      
+      if (__bytes_left >= __total_bytes) 
+      {
+        __result = _S_start_free;
+        _S_start_free += __total_bytes;
+        return(__result);
+      } 
+      else if (__bytes_left >= __size) 
+	{
+	  __nobjs = (int)(__bytes_left/__size);
+	  __total_bytes = __size * __nobjs;
+	  __result = _S_start_free;
+	  _S_start_free += __total_bytes;
+	  return(__result);
+	} 
+      else 
+	{
+	  size_t __bytes_to_get = 
+	    2 * __total_bytes + _S_round_up(_S_heap_size >> 4);
+	  // Try to make use of the left-over piece.
+	  if (__bytes_left > 0) 
+	    {
+	      _Obj* volatile* __my_free_list =
+		_S_free_list + _S_freelist_index(__bytes_left);
+	      
+	      ((_Obj*)_S_start_free) -> _M_free_list_link = *__my_free_list;
+	      *__my_free_list = (_Obj*)_S_start_free;
+	    }
+	  _S_start_free = (char*) __mem_interface::allocate(__bytes_to_get);
+	  if (0 == _S_start_free) 
+	    {
+	      size_t __i;
+	      _Obj* volatile* __my_free_list;
+	      _Obj* __p;
+	      // Try to make do with what we have.  That can't hurt.  We
+	      // do not try smaller requests, since that tends to result
+	      // in disaster on multi-process machines.
+	      __i = __size;
+	      for (; __i <= (size_t) _MAX_BYTES; __i += (size_t) _ALIGN) 
+		{
+		  __my_free_list = _S_free_list + _S_freelist_index(__i);
+		  __p = *__my_free_list;
+		  if (0 != __p) 
+		    {
+		      *__my_free_list = __p -> _M_free_list_link;
+		      _S_start_free = (char*)__p;
+		      _S_end_free = _S_start_free + __i;
+		      return(_S_chunk_alloc(__size, __nobjs));
+		      // Any leftover piece will eventually make it to the
+		      // right free list.
+		    }
+		}
+	      _S_end_free = 0;	// In case of exception.
+	      _S_start_free = (char*)__mem_interface::allocate(__bytes_to_get);
+	      // This should either throw an exception or remedy the situation.
+	      // Thus we assume it succeeded.
+	    }
+	  _S_heap_size += __bytes_to_get;
+	  _S_end_free = _S_start_free + __bytes_to_get;
+	  return(_S_chunk_alloc(__size, __nobjs));
+	}
+    }
+  
+  
+  // Returns an object of size __n, and optionally adds to "size
+  // __n"'s free list.  We assume that __n is properly aligned.  We
+  // hold the allocation lock.
+  template
+    void*
+    __default_alloc_template<__threads, __inst>::_S_refill(size_t __n)
+    {
+      int __nobjs = 20;
+      char* __chunk = _S_chunk_alloc(__n, __nobjs);
+      _Obj* volatile* __my_free_list;
+      _Obj* __result;
+      _Obj* __current_obj;
+      _Obj* __next_obj;
+      int __i;
+      
+      if (1 == __nobjs) return(__chunk);
+      __my_free_list = _S_free_list + _S_freelist_index(__n);
+      
+      /* Build free list in chunk */
+      __result = (_Obj*)__chunk;
+      *__my_free_list = __next_obj = (_Obj*)(__chunk + __n);
+      for (__i = 1; ; __i++) {
+        __current_obj = __next_obj;
+        __next_obj = (_Obj*)((char*)__next_obj + __n);
+        if (__nobjs - 1 == __i) {
+	  __current_obj -> _M_free_list_link = 0;
+	  break;
+        } else {
+	  __current_obj -> _M_free_list_link = __next_obj;
+        }
+      }
+      return(__result);
+    }
+
+
+  template
+    void*
+    __default_alloc_template::reallocate(void* __p, 
+							size_t __old_sz,
+							size_t __new_sz)
+    {
+      void* __result;
+      size_t __copy_sz;
+      
+      if (__old_sz > (size_t) _MAX_BYTES && __new_sz > (size_t) _MAX_BYTES) {
+        return(realloc(__p, __new_sz));
+      }
+      if (_S_round_up(__old_sz) == _S_round_up(__new_sz)) return(__p);
+      __result = allocate(__new_sz);
+      __copy_sz = __new_sz > __old_sz? __old_sz : __new_sz;
+      memcpy(__result, __p, __copy_sz);
+      deallocate(__p, __old_sz);
+      return(__result);
+    }
+  
+  template
+  _STL_mutex_lock
+  __default_alloc_template<__threads, __inst>::_S_node_allocator_lock
+  __STL_MUTEX_INITIALIZER;
+  
+  template
+  char* __default_alloc_template<__threads, __inst>::_S_start_free = 0;
+  
+  template
+  char* __default_alloc_template<__threads, __inst>::_S_end_free = 0;
+  
+  template
+  size_t __default_alloc_template<__threads, __inst>::_S_heap_size = 0;
+  
+  template
+  typename __default_alloc_template<__threads, __inst>::_Obj* volatile
+  __default_alloc_template<__threads, __inst>::_S_free_list[_NFREELISTS];
+  
+  typedef __default_alloc_template    __alloc;
+  typedef __default_alloc_template   __single_client_alloc;
+
+
+#endif /* ! __USE_MALLOC */
+
+
+/**
+ *  This is a "standard" allocator, as per [20.4].  The private _Alloc is
+ *  "SGI" style.  (See comments at the top of stl_alloc.h.)
+ *
+ *  The underlying allocator behaves as follows.
+ *  - if __USE_MALLOC then
+ *    - thread safety depends on malloc and is entirely out of our hands
+ *    - __malloc_alloc_template is used for memory requests
+ *  - else (the default)
+ *    - __default_alloc_template is used via two typedefs
+ *    - "__single_client_alloc" typedef does no locking for threads
+ *    - "__alloc" typedef is threadsafe via the locks
+ *    - __new_alloc is used for memory requests
+ *
+ *  (See @link Allocators allocators info @endlink for more.)
+*/
+template 
+class allocator
+{
+  typedef __alloc _Alloc;          // The underlying allocator.
+public:
+  typedef size_t     size_type;
+  typedef ptrdiff_t  difference_type;
+  typedef _Tp*       pointer;
+  typedef const _Tp* const_pointer;
+  typedef _Tp&       reference;
+  typedef const _Tp& const_reference;
+  typedef _Tp        value_type;
+
+  template  struct rebind {
+    typedef allocator<_Tp1> other;
+  };
+
+  allocator() throw() {}
+  allocator(const allocator&) throw() {}
+  template  allocator(const allocator<_Tp1>&) throw() {}
+  ~allocator() throw() {}
+
+  pointer address(reference __x) const { return &__x; }
+  const_pointer address(const_reference __x) const { return &__x; }
+
+  // __n is permitted to be 0.  The C++ standard says nothing about what
+  // the return value is when __n == 0.
+  _Tp* allocate(size_type __n, const void* = 0) {
+    return __n != 0 ? static_cast<_Tp*>(_Alloc::allocate(__n * sizeof(_Tp))) 
+                    : 0;
+  }
+
+  // __p is not permitted to be a null pointer.
+  void deallocate(pointer __p, size_type __n)
+    { _Alloc::deallocate(__p, __n * sizeof(_Tp)); }
+
+  size_type max_size() const throw() 
+    { return size_t(-1) / sizeof(_Tp); }
+
+  void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
+  void destroy(pointer __p) { __p->~_Tp(); }
+};
+
+template<>
+class allocator {
+public:
+  typedef size_t      size_type;
+  typedef ptrdiff_t   difference_type;
+  typedef void*       pointer;
+  typedef const void* const_pointer;
+  typedef void        value_type;
+
+  template  struct rebind {
+    typedef allocator<_Tp1> other;
+  };
+};
+
+
+template 
+inline bool operator==(const allocator<_T1>&, const allocator<_T2>&) 
+{
+  return true;
+}
+
+template 
+inline bool operator!=(const allocator<_T1>&, const allocator<_T2>&)
+{
+  return false;
+}
+
+
+/**
+ *  @if maint
+ *  Allocator adaptor to turn an "SGI" style allocator (e.g., __alloc,
+ *  __malloc_alloc_template) into a "standard" conforming allocator.  Note
+ *  that this adaptor does *not* assume that all objects of the underlying
+ *  alloc class are identical, nor does it assume that all of the underlying
+ *  alloc's member functions are static member functions.  Note, also, that
+ *  __allocator<_Tp, __alloc> is essentially the same thing as allocator<_Tp>.
+ *  @endif
+ *  (See @link Allocators allocators info @endlink for more.)
+*/
+template 
+struct __allocator
+{
+  _Alloc __underlying_alloc;
+
+  typedef size_t    size_type;
+  typedef ptrdiff_t difference_type;
+  typedef _Tp*       pointer;
+  typedef const _Tp* const_pointer;
+  typedef _Tp&       reference;
+  typedef const _Tp& const_reference;
+  typedef _Tp        value_type;
+
+  template  struct rebind {
+    typedef __allocator<_Tp1, _Alloc> other;
+  };
+
+  __allocator() throw() {}
+  __allocator(const __allocator& __a) throw()
+    : __underlying_alloc(__a.__underlying_alloc) {}
+  template  
+  __allocator(const __allocator<_Tp1, _Alloc>& __a) throw()
+    : __underlying_alloc(__a.__underlying_alloc) {}
+  ~__allocator() throw() {}
+
+  pointer address(reference __x) const { return &__x; }
+  const_pointer address(const_reference __x) const { return &__x; }
+
+  // __n is permitted to be 0.
+  _Tp* allocate(size_type __n, const void* = 0) {
+    return __n != 0 
+        ? static_cast<_Tp*>(__underlying_alloc.allocate(__n * sizeof(_Tp))) 
+        : 0;
+  }
+
+  // __p is not permitted to be a null pointer.
+  void deallocate(pointer __p, size_type __n)
+    { __underlying_alloc.deallocate(__p, __n * sizeof(_Tp)); }
+
+  size_type max_size() const throw() 
+    { return size_t(-1) / sizeof(_Tp); }
+
+  void construct(pointer __p, const _Tp& __val) { new(__p) _Tp(__val); }
+  void destroy(pointer __p) { __p->~_Tp(); }
+};
+
+template 
+class __allocator {
+  typedef size_t      size_type;
+  typedef ptrdiff_t   difference_type;
+  typedef void*       pointer;
+  typedef const void* const_pointer;
+  typedef void        value_type;
+
+  template  struct rebind {
+    typedef __allocator<_Tp1, _Alloc> other;
+  };
+};
+
+template 
+inline bool operator==(const __allocator<_Tp, _Alloc>& __a1,
+                       const __allocator<_Tp, _Alloc>& __a2)
+{
+  return __a1.__underlying_alloc == __a2.__underlying_alloc;
+}
+
+template 
+inline bool operator!=(const __allocator<_Tp, _Alloc>& __a1,
+                       const __allocator<_Tp, _Alloc>& __a2)
+{
+  return __a1.__underlying_alloc != __a2.__underlying_alloc;
+}
+
+
+//@{
+/** Comparison operators for all of the predifined SGI-style allocators.
+ *  This ensures that __allocator (for example) will work
+ *  correctly.  As required, all allocators compare equal.
+*/
+template 
+inline bool operator==(const __malloc_alloc_template&,
+                       const __malloc_alloc_template&)
+{
+  return true;
+}
+
+template 
+inline bool operator!=(const __malloc_alloc_template<__inst>&,
+                       const __malloc_alloc_template<__inst>&)
+{
+  return false;
+}
+
+template 
+inline bool operator==(const __debug_alloc<_Alloc>&,
+                       const __debug_alloc<_Alloc>&) {
+  return true;
+}
+
+template 
+inline bool operator!=(const __debug_alloc<_Alloc>&,
+                       const __debug_alloc<_Alloc>&) {
+  return false;
+}
+//@}
+
+
+/**
+ *  @if maint
+ *  Another allocator adaptor:  _Alloc_traits.  This serves two purposes.
+ *  First, make it possible to write containers that can use either "SGI"
+ *  style allocators or "standard" allocators.  Second, provide a mechanism
+ *  so that containers can query whether or not the allocator has distinct
+ *  instances.  If not, the container can avoid wasting a word of memory to
+ *  store an empty object.  For examples of use, see stl_vector.h, etc, or
+ *  any of the other classes derived from this one.
+ *
+ *  This adaptor uses partial specialization.  The general case of
+ *  _Alloc_traits<_Tp, _Alloc> assumes that _Alloc is a
+ *  standard-conforming allocator, possibly with non-equal instances and
+ *  non-static members.  (It still behaves correctly even if _Alloc has
+ *  static member and if all instances are equal.  Refinements affect
+ *  performance, not correctness.)
+ *
+ *  There are always two members:  allocator_type, which is a standard-
+ *  conforming allocator type for allocating objects of type _Tp, and
+ *  _S_instanceless, a static const member of type bool.  If
+ *  _S_instanceless is true, this means that there is no difference
+ *  between any two instances of type allocator_type.  Furthermore, if
+ *  _S_instanceless is true, then _Alloc_traits has one additional
+ *  member:  _Alloc_type.  This type encapsulates allocation and
+ *  deallocation of objects of type _Tp through a static interface; it
+ *  has two member functions, whose signatures are
+ *
+ *  -  static _Tp* allocate(size_t)
+ *  -  static void deallocate(_Tp*, size_t)
+ *
+ *  The size_t parameters are "standard" style (see top of stl_alloc.h) in
+ *  that they take counts, not sizes.
+ *
+ *  @endif
+ *  (See @link Allocators allocators info @endlink for more.)
+*/
+//@{
+// The fully general version.
+template 
+struct _Alloc_traits
+{
+  static const bool _S_instanceless = false;
+  typedef typename _Allocator::template rebind<_Tp>::other allocator_type;
+};
+
+template 
+const bool _Alloc_traits<_Tp, _Allocator>::_S_instanceless;
+
+/// The version for the default allocator.
+template 
+struct _Alloc_traits<_Tp, allocator<_Tp1> >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __alloc> _Alloc_type;
+  typedef allocator<_Tp> allocator_type;
+};
+//@}
+
+//@{
+/// Versions for the predefined "SGI" style allocators.
+template 
+struct _Alloc_traits<_Tp, __malloc_alloc_template<__inst> >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
+  typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type;
+};
+
+#ifndef __USE_MALLOC
+template 
+struct _Alloc_traits<_Tp, __default_alloc_template<__threads, __inst> >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __default_alloc_template<__threads, __inst> > 
+          _Alloc_type;
+  typedef __allocator<_Tp, __default_alloc_template<__threads, __inst> > 
+          allocator_type;
+};
+#endif
+
+template 
+struct _Alloc_traits<_Tp, __debug_alloc<_Alloc> >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __debug_alloc<_Alloc> > _Alloc_type;
+  typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
+};
+//@}
+
+//@{
+/// Versions for the __allocator adaptor used with the predefined "SGI" style allocators.
+template 
+struct _Alloc_traits<_Tp, 
+                     __allocator<_Tp1, __malloc_alloc_template<__inst> > >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __malloc_alloc_template<__inst> > _Alloc_type;
+  typedef __allocator<_Tp, __malloc_alloc_template<__inst> > allocator_type;
+};
+
+#ifndef __USE_MALLOC
+template 
+struct _Alloc_traits<_Tp, 
+                      __allocator<_Tp1, 
+                                  __default_alloc_template<__thr, __inst> > >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __default_alloc_template<__thr,__inst> > 
+          _Alloc_type;
+  typedef __allocator<_Tp, __default_alloc_template<__thr,__inst> > 
+          allocator_type;
+};
+#endif
+
+template 
+struct _Alloc_traits<_Tp, __allocator<_Tp1, __debug_alloc<_Alloc> > >
+{
+  static const bool _S_instanceless = true;
+  typedef __simple_alloc<_Tp, __debug_alloc<_Alloc> > _Alloc_type;
+  typedef __allocator<_Tp, __debug_alloc<_Alloc> > allocator_type;
+};
+//@}
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB: This syntax is a GNU extension.
+  extern template class allocator;
+  extern template class allocator;
+#ifdef __USE_MALLOC
+  extern template class __malloc_alloc_template<0>;
+#else
+  extern template class __default_alloc_template;
+#endif
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_ALLOC_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_bvector.h b/contrib/libstdc++/include/bits/stl_bvector.h
new file mode 100644
index 0000000..6cb6d9c
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_bvector.h
@@ -0,0 +1,726 @@
+// bit_vector and vector specialization -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_bvector.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_BVECTOR_H
+#define __GLIBCPP_INTERNAL_BVECTOR_H
+
+namespace std
+{ 
+  typedef unsigned long _Bit_type;
+  enum { _M_word_bit = int(CHAR_BIT * sizeof(_Bit_type)) };
+
+struct _Bit_reference {
+
+  _Bit_type * _M_p;
+  _Bit_type _M_mask;
+  _Bit_reference(_Bit_type * __x, _Bit_type __y) 
+    : _M_p(__x), _M_mask(__y) {}
+
+public:
+  _Bit_reference() : _M_p(0), _M_mask(0) {}
+  operator bool() const { return !!(*_M_p & _M_mask); }
+  _Bit_reference& operator=(bool __x)
+  {
+    if (__x)  *_M_p |= _M_mask;
+    else      *_M_p &= ~_M_mask;
+    return *this;
+  }
+  _Bit_reference& operator=(const _Bit_reference& __x) 
+    { return *this = bool(__x); }
+  bool operator==(const _Bit_reference& __x) const
+    { return bool(*this) == bool(__x); }
+  bool operator<(const _Bit_reference& __x) const
+    { return !bool(*this) && bool(__x); }
+  void flip() { *_M_p ^= _M_mask; }
+};
+
+inline void swap(_Bit_reference __x, _Bit_reference __y)
+{
+  bool __tmp = __x;
+  __x = __y;
+  __y = __tmp;
+}
+
+struct _Bit_iterator_base : public iterator
+{
+  _Bit_type * _M_p;
+  unsigned int _M_offset;
+
+  _Bit_iterator_base(_Bit_type * __x, unsigned int __y)
+    : _M_p(__x), _M_offset(__y) {}
+
+  void _M_bump_up() {
+    if (_M_offset++ == _M_word_bit - 1) {
+      _M_offset = 0;
+      ++_M_p;
+    }
+  }
+  void _M_bump_down() {
+    if (_M_offset-- == 0) {
+      _M_offset = _M_word_bit - 1;
+      --_M_p;
+    }
+  }
+
+  void _M_incr(ptrdiff_t __i) {
+    difference_type __n = __i + _M_offset;
+    _M_p += __n / _M_word_bit;
+    __n = __n % _M_word_bit;
+    if (__n < 0) {
+      _M_offset = (unsigned int) __n + _M_word_bit;
+      --_M_p;
+    } else
+      _M_offset = (unsigned int) __n;
+  }
+
+  bool operator==(const _Bit_iterator_base& __i) const {
+    return _M_p == __i._M_p && _M_offset == __i._M_offset;
+  }
+  bool operator<(const _Bit_iterator_base& __i) const {
+    return _M_p < __i._M_p || (_M_p == __i._M_p && _M_offset < __i._M_offset);
+  }
+  bool operator!=(const _Bit_iterator_base& __i) const {
+    return !(*this == __i);
+  }
+  bool operator>(const _Bit_iterator_base& __i) const {
+    return __i < *this;
+  }
+  bool operator<=(const _Bit_iterator_base& __i) const {
+    return !(__i < *this); 
+  }
+  bool operator>=(const _Bit_iterator_base& __i) const {
+    return !(*this < __i);
+  }
+};
+
+inline ptrdiff_t
+operator-(const _Bit_iterator_base& __x, const _Bit_iterator_base& __y) {
+  return _M_word_bit * (__x._M_p - __y._M_p) + __x._M_offset - __y._M_offset;
+}
+
+
+struct _Bit_iterator : public _Bit_iterator_base
+{
+  typedef _Bit_reference  reference;
+  typedef _Bit_reference* pointer;
+  typedef _Bit_iterator   iterator;
+
+  _Bit_iterator() : _Bit_iterator_base(0, 0) {}
+  _Bit_iterator(_Bit_type * __x, unsigned int __y) 
+    : _Bit_iterator_base(__x, __y) {}
+
+  reference operator*() const { return reference(_M_p, 1U << _M_offset); }
+  iterator& operator++() {
+    _M_bump_up();
+    return *this;
+  }
+  iterator operator++(int) {
+    iterator __tmp = *this;
+    _M_bump_up();
+    return __tmp;
+  }
+  iterator& operator--() {
+    _M_bump_down();
+    return *this;
+  }
+  iterator operator--(int) {
+    iterator __tmp = *this;
+    _M_bump_down();
+    return __tmp;
+  }
+  iterator& operator+=(difference_type __i) {
+    _M_incr(__i);
+    return *this;
+  }
+  iterator& operator-=(difference_type __i) {
+    *this += -__i;
+    return *this;
+  }
+  iterator operator+(difference_type __i) const {
+    iterator __tmp = *this;
+    return __tmp += __i;
+  }
+  iterator operator-(difference_type __i) const {
+    iterator __tmp = *this;
+    return __tmp -= __i;
+  }
+
+  reference operator[](difference_type __i) { return *(*this + __i); }
+};
+
+inline _Bit_iterator 
+operator+(ptrdiff_t __n, const _Bit_iterator& __x) { return __x + __n; }
+
+
+struct _Bit_const_iterator : public _Bit_iterator_base
+{
+  typedef bool                 reference;
+  typedef bool                 const_reference;
+  typedef const bool*          pointer;
+  typedef _Bit_const_iterator  const_iterator;
+
+  _Bit_const_iterator() : _Bit_iterator_base(0, 0) {}
+  _Bit_const_iterator(_Bit_type * __x, unsigned int __y) 
+    : _Bit_iterator_base(__x, __y) {}
+  _Bit_const_iterator(const _Bit_iterator& __x) 
+    : _Bit_iterator_base(__x._M_p, __x._M_offset) {}
+
+  const_reference operator*() const {
+    return _Bit_reference(_M_p, 1U << _M_offset);
+  }
+  const_iterator& operator++() {
+    _M_bump_up();
+    return *this;
+  }
+  const_iterator operator++(int) {
+    const_iterator __tmp = *this;
+    _M_bump_up();
+    return __tmp;
+  }
+  const_iterator& operator--() {
+    _M_bump_down();
+    return *this;
+  }
+  const_iterator operator--(int) {
+    const_iterator __tmp = *this;
+    _M_bump_down();
+    return __tmp;
+  }
+  const_iterator& operator+=(difference_type __i) {
+    _M_incr(__i);
+    return *this;
+  }
+  const_iterator& operator-=(difference_type __i) {
+    *this += -__i;
+    return *this;
+  }
+  const_iterator operator+(difference_type __i) const {
+    const_iterator __tmp = *this;
+    return __tmp += __i;
+  }
+  const_iterator operator-(difference_type __i) const {
+    const_iterator __tmp = *this;
+    return __tmp -= __i;
+  }
+  const_reference operator[](difference_type __i) { 
+    return *(*this + __i); 
+  }
+};
+
+inline _Bit_const_iterator 
+operator+(ptrdiff_t __n, const _Bit_const_iterator& __x) { return __x + __n; }
+
+
+// Bit-vector base class, which encapsulates the difference between
+// old SGI-style allocators and standard-conforming allocators.
+
+// Base class for ordinary allocators.
+template 
+class _Bvector_alloc_base {
+public:
+  typedef typename _Alloc_traits::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return _M_data_allocator; }
+
+  _Bvector_alloc_base(const allocator_type& __a)
+    : _M_data_allocator(__a), _M_start(), _M_finish(), _M_end_of_storage(0) {}
+
+protected:
+  _Bit_type * _M_bit_alloc(size_t __n) 
+    { return _M_data_allocator.allocate((__n + _M_word_bit - 1)/_M_word_bit); }
+  void _M_deallocate() {
+    if (_M_start._M_p)
+      _M_data_allocator.deallocate(_M_start._M_p, 
+                                   _M_end_of_storage - _M_start._M_p);
+  }  
+
+  typename _Alloc_traits<_Bit_type, _Allocator>::allocator_type 
+          _M_data_allocator;
+  _Bit_iterator _M_start;
+  _Bit_iterator _M_finish;
+  _Bit_type * _M_end_of_storage;
+};
+
+// Specialization for instanceless allocators.
+template 
+class _Bvector_alloc_base<_Allocator, true> {
+public:
+  typedef typename _Alloc_traits::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return allocator_type(); }
+
+  _Bvector_alloc_base(const allocator_type&)
+    : _M_start(), _M_finish(), _M_end_of_storage(0) {}
+
+protected:
+  typedef typename _Alloc_traits<_Bit_type, _Allocator>::_Alloc_type
+          _Alloc_type;
+          
+  _Bit_type * _M_bit_alloc(size_t __n) 
+    { return _Alloc_type::allocate((__n + _M_word_bit - 1)/_M_word_bit); }
+  void _M_deallocate() {
+    if (_M_start._M_p)
+      _Alloc_type::deallocate(_M_start._M_p,
+                              _M_end_of_storage - _M_start._M_p);
+  }  
+
+  _Bit_iterator _M_start;
+  _Bit_iterator _M_finish;
+  _Bit_type * _M_end_of_storage;
+};  
+
+template 
+class _Bvector_base
+  : public _Bvector_alloc_base<_Alloc,
+                               _Alloc_traits::_S_instanceless>
+{
+  typedef _Bvector_alloc_base<_Alloc,
+                              _Alloc_traits::_S_instanceless>
+          _Base;
+public:
+  typedef typename _Base::allocator_type allocator_type;
+
+  _Bvector_base(const allocator_type& __a) : _Base(__a) {}
+  ~_Bvector_base() { _Base::_M_deallocate(); }
+};
+
+} // namespace std
+
+// Declare a partial specialization of vector.
+#include 
+namespace std
+{
+
+template  
+  class vector : public _Bvector_base<_Alloc> 
+  {
+  public:
+    typedef bool value_type;
+    typedef size_t size_type;
+    typedef ptrdiff_t difference_type; 
+    typedef _Bit_reference reference;
+    typedef bool const_reference;
+    typedef _Bit_reference* pointer;
+    typedef const bool* const_pointer;
+  
+    typedef _Bit_iterator                iterator;
+    typedef _Bit_const_iterator          const_iterator;
+  
+    typedef reverse_iterator const_reverse_iterator;
+    typedef reverse_iterator reverse_iterator;
+  
+    typedef typename _Bvector_base<_Alloc>::allocator_type allocator_type;
+    allocator_type get_allocator() const {
+      return _Bvector_base<_Alloc>::get_allocator();
+    }
+  
+  protected:
+    using _Bvector_base<_Alloc>::_M_bit_alloc;
+    using _Bvector_base<_Alloc>::_M_deallocate;
+    using _Bvector_base<_Alloc>::_M_start;
+    using _Bvector_base<_Alloc>::_M_finish;
+    using _Bvector_base<_Alloc>::_M_end_of_storage;
+  
+  protected:
+    void _M_initialize(size_type __n) {
+      _Bit_type * __q = _M_bit_alloc(__n);
+      _M_end_of_storage = __q + (__n + _M_word_bit - 1)/_M_word_bit;
+      _M_start = iterator(__q, 0);
+      _M_finish = _M_start + difference_type(__n);
+    }
+    void _M_insert_aux(iterator __position, bool __x) {
+      if (_M_finish._M_p != _M_end_of_storage) {
+        copy_backward(__position, _M_finish, _M_finish + 1);
+        *__position = __x;
+        ++_M_finish;
+      }
+      else {
+        size_type __len = size() 
+	                  ? 2 * size() : static_cast(_M_word_bit);
+        _Bit_type * __q = _M_bit_alloc(__len);
+        iterator __i = copy(begin(), __position, iterator(__q, 0));
+        *__i++ = __x;
+        _M_finish = copy(__position, end(), __i);
+        _M_deallocate();
+        _M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
+        _M_start = iterator(__q, 0);
+      }
+    }
+  
+    template 
+    void _M_initialize_range(_InputIterator __first, _InputIterator __last,
+                             input_iterator_tag) {
+      _M_start = iterator();
+      _M_finish = iterator();
+      _M_end_of_storage = 0;
+      for ( ; __first != __last; ++__first) 
+        push_back(*__first);
+    }
+  
+    template 
+    void _M_initialize_range(_ForwardIterator __first, _ForwardIterator __last,
+                             forward_iterator_tag) {
+      size_type __n = distance(__first, __last);
+      _M_initialize(__n);
+      copy(__first, __last, _M_start);
+    }
+  
+    template 
+    void _M_insert_range(iterator __pos,
+                         _InputIterator __first, _InputIterator __last,
+                         input_iterator_tag) {
+      for ( ; __first != __last; ++__first) {
+        __pos = insert(__pos, *__first);
+        ++__pos;
+      }
+    }
+  
+    template 
+    void _M_insert_range(iterator __position,
+                         _ForwardIterator __first, _ForwardIterator __last,
+                         forward_iterator_tag) {
+      if (__first != __last) {
+        size_type __n = distance(__first, __last);
+        if (capacity() - size() >= __n) {
+          copy_backward(__position, end(), _M_finish + difference_type(__n));
+          copy(__first, __last, __position);
+          _M_finish += difference_type(__n);
+        }
+        else {
+          size_type __len = size() + max(size(), __n);
+          _Bit_type * __q = _M_bit_alloc(__len);
+          iterator __i = copy(begin(), __position, iterator(__q, 0));
+          __i = copy(__first, __last, __i);
+          _M_finish = copy(__position, end(), __i);
+          _M_deallocate();
+          _M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
+          _M_start = iterator(__q, 0);
+        }
+      }
+    }      
+  
+  public:
+    iterator begin() { return _M_start; }
+    const_iterator begin() const { return _M_start; }
+    iterator end() { return _M_finish; }
+    const_iterator end() const { return _M_finish; }
+  
+    reverse_iterator rbegin() { return reverse_iterator(end()); }
+    const_reverse_iterator rbegin() const { 
+      return const_reverse_iterator(end()); 
+    }
+    reverse_iterator rend() { return reverse_iterator(begin()); }
+    const_reverse_iterator rend() const { 
+      return const_reverse_iterator(begin()); 
+    }
+  
+    size_type size() const { return size_type(end() - begin()); }
+    size_type max_size() const { return size_type(-1); }
+    size_type capacity() const {
+      return size_type(const_iterator(_M_end_of_storage, 0) - begin());
+    }
+    bool empty() const { return begin() == end(); }
+  
+    reference operator[](size_type __n)
+      { return *(begin() + difference_type(__n)); }
+    const_reference operator[](size_type __n) const
+      { return *(begin() + difference_type(__n)); }
+  
+    void _M_range_check(size_type __n) const {
+      if (__n >= this->size())
+        __throw_out_of_range("vector");
+    }
+  
+    reference at(size_type __n)
+      { _M_range_check(__n); return (*this)[__n]; }
+    const_reference at(size_type __n) const
+      { _M_range_check(__n); return (*this)[__n]; }
+  
+    explicit vector(const allocator_type& __a = allocator_type())
+      : _Bvector_base<_Alloc>(__a) {}
+  
+    vector(size_type __n, bool __value,
+              const allocator_type& __a = allocator_type())
+      : _Bvector_base<_Alloc>(__a)
+    {
+      _M_initialize(__n);
+      fill(_M_start._M_p, _M_end_of_storage, __value ? ~0 : 0);
+    }
+  
+    explicit vector(size_type __n)
+      : _Bvector_base<_Alloc>(allocator_type())
+    {
+      _M_initialize(__n);
+      fill(_M_start._M_p, _M_end_of_storage, 0);
+    }
+  
+    vector(const vector& __x) : _Bvector_base<_Alloc>(__x.get_allocator()) {
+      _M_initialize(__x.size());
+      copy(__x.begin(), __x.end(), _M_start);
+    }
+  
+    // Check whether it's an integral type.  If so, it's not an iterator.
+  
+    template 
+    void _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type) {
+      _M_initialize(__n);
+      fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0);
+    }
+  
+    template 
+    void _M_initialize_dispatch(_InputIterator __first, _InputIterator __last,
+                                __false_type) {
+      _M_initialize_range(__first, __last, __iterator_category(__first));
+    }
+  
+    template 
+    vector(_InputIterator __first, _InputIterator __last,
+             const allocator_type& __a = allocator_type())
+      : _Bvector_base<_Alloc>(__a)
+    {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_initialize_dispatch(__first, __last, _Integral());
+    }
+      
+    ~vector() { }
+  
+    vector& operator=(const vector& __x) {
+      if (&__x == this) return *this;
+      if (__x.size() > capacity()) {
+        _M_deallocate();
+        _M_initialize(__x.size());
+      }
+      copy(__x.begin(), __x.end(), begin());
+      _M_finish = begin() + difference_type(__x.size());
+      return *this;
+    }
+  
+    // assign(), a generalized assignment member function.  Two
+    // versions: one that takes a count, and one that takes a range.
+    // The range version is a member template, so we dispatch on whether
+    // or not the type is an integer.
+  
+    void _M_fill_assign(size_t __n, bool __x) {
+      if (__n > size()) {
+        fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0);
+        insert(end(), __n - size(), __x);
+      }
+      else {
+        erase(begin() + __n, end());
+        fill(_M_start._M_p, _M_end_of_storage, __x ? ~0 : 0);
+      }
+    }
+  
+    void assign(size_t __n, bool __x) { _M_fill_assign(__n, __x); }
+  
+    template 
+    void assign(_InputIterator __first, _InputIterator __last) {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_assign_dispatch(__first, __last, _Integral());
+    }
+  
+    template 
+    void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+      { _M_fill_assign((size_t) __n, (bool) __val); }
+  
+    template 
+    void _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
+      { _M_assign_aux(__first, __last, __iterator_category(__first)); }
+  
+    template 
+    void _M_assign_aux(_InputIterator __first, _InputIterator __last,
+                       input_iterator_tag) {
+      iterator __cur = begin();
+      for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
+        *__cur = *__first;
+      if (__first == __last)
+        erase(__cur, end());
+      else
+        insert(end(), __first, __last);
+    }
+  
+    template 
+    void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+                       forward_iterator_tag) {
+      size_type __len = distance(__first, __last);
+      if (__len < size())
+        erase(copy(__first, __last, begin()), end());
+      else {
+        _ForwardIterator __mid = __first;
+        advance(__mid, size());
+        copy(__first, __mid, begin());
+        insert(end(), __mid, __last);
+      }
+    }    
+  
+    void reserve(size_type __n) {
+      if (capacity() < __n) {
+        _Bit_type * __q = _M_bit_alloc(__n);
+        _M_finish = copy(begin(), end(), iterator(__q, 0));
+        _M_deallocate();
+        _M_start = iterator(__q, 0);
+        _M_end_of_storage = __q + (__n + _M_word_bit - 1)/_M_word_bit;
+      }
+    }
+  
+    reference front() { return *begin(); }
+    const_reference front() const { return *begin(); }
+    reference back() { return *(end() - 1); }
+    const_reference back() const { return *(end() - 1); }
+    void push_back(bool __x) {
+      if (_M_finish._M_p != _M_end_of_storage)
+        *_M_finish++ = __x;
+      else
+        _M_insert_aux(end(), __x);
+    }
+    void swap(vector& __x) {
+      std::swap(_M_start, __x._M_start);
+      std::swap(_M_finish, __x._M_finish);
+      std::swap(_M_end_of_storage, __x._M_end_of_storage);
+    }
+    iterator insert(iterator __position, bool __x = bool()) {
+      difference_type __n = __position - begin();
+      if (_M_finish._M_p != _M_end_of_storage && __position == end())
+        *_M_finish++ = __x;
+      else
+        _M_insert_aux(__position, __x);
+      return begin() + __n;
+    }
+  
+    // Check whether it's an integral type.  If so, it's not an iterator.
+  
+    template 
+    void _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x,
+                            __true_type) {
+      _M_fill_insert(__pos, __n, __x);
+    }
+  
+    template 
+    void _M_insert_dispatch(iterator __pos,
+                            _InputIterator __first, _InputIterator __last,
+                            __false_type) {
+      _M_insert_range(__pos, __first, __last, __iterator_category(__first));
+    }
+  
+    template 
+    void insert(iterator __position,
+                _InputIterator __first, _InputIterator __last) {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_insert_dispatch(__position, __first, __last, _Integral());
+    }
+  
+    void _M_fill_insert(iterator __position, size_type __n, bool __x) {
+      if (__n == 0) return;
+      if (capacity() - size() >= __n) {
+        copy_backward(__position, end(), _M_finish + difference_type(__n));
+        fill(__position, __position + difference_type(__n), __x);
+        _M_finish += difference_type(__n);
+      }
+      else {
+        size_type __len = size() + max(size(), __n);
+        _Bit_type * __q = _M_bit_alloc(__len);
+        iterator __i = copy(begin(), __position, iterator(__q, 0));
+        fill_n(__i, __n, __x);
+        _M_finish = copy(__position, end(), __i + difference_type(__n));
+        _M_deallocate();
+        _M_end_of_storage = __q + (__len + _M_word_bit - 1)/_M_word_bit;
+        _M_start = iterator(__q, 0);
+      }
+    }
+  
+    void insert(iterator __position, size_type __n, bool __x) {
+      _M_fill_insert(__position, __n, __x);
+    }
+  
+    void pop_back() { --_M_finish; }
+    iterator erase(iterator __position) {
+      if (__position + 1 != end())
+        copy(__position + 1, end(), __position);
+        --_M_finish;
+      return __position;
+    }
+    iterator erase(iterator __first, iterator __last) {
+      _M_finish = copy(__last, end(), __first);
+      return __first;
+    }
+    void resize(size_type __new_size, bool __x = bool()) {
+      if (__new_size < size()) 
+        erase(begin() + difference_type(__new_size), end());
+      else
+        insert(end(), __new_size - size(), __x);
+    }
+    void flip() {
+      for (_Bit_type * __p = _M_start._M_p; __p != _M_end_of_storage; ++__p)
+        *__p = ~*__p;
+    }
+  
+    void clear() { erase(begin(), end()); }
+  };
+
+// This typedef is non-standard.  It is provided for backward compatibility.
+typedef vector bit_vector;
+
+} // namespace std 
+
+#endif /* __GLIBCPP_INTERNAL_BVECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_construct.h b/contrib/libstdc++/include/bits/stl_construct.h
new file mode 100644
index 0000000..6859138
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_construct.h
@@ -0,0 +1,148 @@
+// nonstandard construct and destroy functions -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_construct.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_CONSTRUCT_H
+#define _CPP_BITS_STL_CONSTRUCT_H 1
+
+#include 
+#include 
+
+namespace std
+{
+  /**
+   * @if maint
+   * Constructs an object in existing memory by invoking an allocated
+   * object's constructor with an initializer.
+   * @endif
+   */
+  template 
+    inline void
+    _Construct(_T1* __p, const _T2& __value)
+    { new (static_cast(__p)) _T1(__value); }
+  
+  /**
+   * @if maint
+   * Constructs an object in existing memory by invoking an allocated
+   * object's default constructor (no initializers).
+   * @endif
+   */
+  template 
+    inline void
+    _Construct(_T1* __p)
+    { new (static_cast(__p)) _T1(); }
+
+  /**
+   * @if maint
+   * Destroy a range of objects with nontrivial destructors.  
+   *
+   * This is a helper function used only by _Destroy().
+   * @endif
+   */
+  template 
+    inline void
+    __destroy_aux(_ForwardIterator __first, _ForwardIterator __last, __false_type)
+    { for ( ; __first != __last; ++__first) _Destroy(&*__first); }
+
+  /**
+   * @if maint
+   * Destroy a range of objects with trivial destructors.  Since the destructors
+   * are trivial, there's nothing to do and hopefully this function will be
+   * entirely optimized away.
+   *
+   * This is a helper function used only by _Destroy().
+   * @endif
+   */
+  template  
+    inline void
+    __destroy_aux(_ForwardIterator, _ForwardIterator, __true_type)
+    { }
+
+  /**
+   * @if maint
+   * Destroy the object pointed to by a pointer type.
+   * @endif
+   */
+  template 
+    inline void
+    _Destroy(_Tp* __pointer)
+    { __pointer->~_Tp(); }
+  
+  /**
+   * @if maint
+   * Destroy a range of objects.  If the value_type of the object has
+   * a trivial destructor, the compiler should optimize all of this
+   * away, otherwise the objects' destructors must be invoked.
+   * @endif
+   */
+  template 
+    inline void
+    _Destroy(_ForwardIterator __first, _ForwardIterator __last)
+    {
+      typedef typename iterator_traits<_ForwardIterator>::value_type
+                       _Value_type;
+      typedef typename __type_traits<_Value_type>::has_trivial_destructor
+                       _Has_trivial_destructor;
+
+      __destroy_aux(__first, __last, _Has_trivial_destructor());
+    }
+} // namespace std
+
+#endif /* _CPP_BITS_STL_CONSTRUCT_H */
+
diff --git a/contrib/libstdc++/include/bits/stl_deque.h b/contrib/libstdc++/include/bits/stl_deque.h
new file mode 100644
index 0000000..5fa8d12
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_deque.h
@@ -0,0 +1,1580 @@
+// deque implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_deque.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#include 
+#include 
+#include 
+
+#ifndef __GLIBCPP_INTERNAL_DEQUE_H
+#define __GLIBCPP_INTERNAL_DEQUE_H
+
+
+// Since this entire file is within namespace std, there's no reason to
+// waste two spaces along the left column.  Thus the leading indentation is
+// slightly violated from here on.
+namespace std
+{ 
+
+/**
+ *  @if maint
+ *  @brief This function controls the size of memory nodes.
+ *  @param  size  The size of an element.
+ *  @return   The number (not bytesize) of elements per node.
+ *
+ *  This function started off as a compiler kludge from SGI, but seems to
+ *  be a useful wrapper around a repeated constant expression.
+ *  @endif
+*/
+inline size_t 
+__deque_buf_size(size_t __size) 
+{ return __size < 512 ? size_t(512 / __size) : size_t(1); }
+
+
+/// A deque::iterator.
+/**
+ *  Quite a bit of intelligence here.  Much of the functionality of deque is
+ *  actually passed off to this class.  A deque holds two of these internally,
+ *  marking its valid range.  Access to elements is done as offsets of either
+ *  of those two, relying on operator overloading in this class.
+ *
+ *  @if maint
+ *  All the functions are op overloads except for _M_set_node.
+ *  @endif
+*/
+template 
+struct _Deque_iterator
+{
+  typedef _Deque_iterator<_Tp, _Tp&, _Tp*>             iterator;
+  typedef _Deque_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+  static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); }
+
+  typedef random_access_iterator_tag iterator_category;
+  typedef _Tp                        value_type;
+  typedef _Ptr                       pointer;
+  typedef _Ref                       reference;
+  typedef size_t                     size_type;
+  typedef ptrdiff_t                  difference_type;
+  typedef _Tp**                      _Map_pointer;
+  typedef _Deque_iterator            _Self;
+
+  _Tp* _M_cur;
+  _Tp* _M_first;
+  _Tp* _M_last;
+  _Map_pointer _M_node;
+
+  _Deque_iterator(_Tp* __x, _Map_pointer __y) 
+    : _M_cur(__x), _M_first(*__y),
+      _M_last(*__y + _S_buffer_size()), _M_node(__y) {}
+  _Deque_iterator() : _M_cur(0), _M_first(0), _M_last(0), _M_node(0) {}
+  _Deque_iterator(const iterator& __x)
+    : _M_cur(__x._M_cur), _M_first(__x._M_first), 
+      _M_last(__x._M_last), _M_node(__x._M_node) {}
+
+  reference operator*() const { return *_M_cur; }
+  pointer operator->() const { return _M_cur; }
+
+  difference_type operator-(const _Self& __x) const {
+    return difference_type(_S_buffer_size()) * (_M_node - __x._M_node - 1) +
+      (_M_cur - _M_first) + (__x._M_last - __x._M_cur);
+  }
+
+  _Self& operator++() {
+    ++_M_cur;
+    if (_M_cur == _M_last) {
+      _M_set_node(_M_node + 1);
+      _M_cur = _M_first;
+    }
+    return *this; 
+  }
+  _Self operator++(int)  {
+    _Self __tmp = *this;
+    ++*this;
+    return __tmp;
+  }
+
+  _Self& operator--() {
+    if (_M_cur == _M_first) {
+      _M_set_node(_M_node - 1);
+      _M_cur = _M_last;
+    }
+    --_M_cur;
+    return *this;
+  }
+  _Self operator--(int) {
+    _Self __tmp = *this;
+    --*this;
+    return __tmp;
+  }
+
+  _Self& operator+=(difference_type __n)
+  {
+    difference_type __offset = __n + (_M_cur - _M_first);
+    if (__offset >= 0 && __offset < difference_type(_S_buffer_size()))
+      _M_cur += __n;
+    else {
+      difference_type __node_offset =
+        __offset > 0 ? __offset / difference_type(_S_buffer_size())
+                   : -difference_type((-__offset - 1) / _S_buffer_size()) - 1;
+      _M_set_node(_M_node + __node_offset);
+      _M_cur = _M_first + 
+        (__offset - __node_offset * difference_type(_S_buffer_size()));
+    }
+    return *this;
+  }
+
+  _Self operator+(difference_type __n) const
+  {
+    _Self __tmp = *this;
+    return __tmp += __n;
+  }
+
+  _Self& operator-=(difference_type __n) { return *this += -__n; }
+ 
+  _Self operator-(difference_type __n) const {
+    _Self __tmp = *this;
+    return __tmp -= __n;
+  }
+
+  reference operator[](difference_type __n) const { return *(*this + __n); }
+
+  bool operator==(const _Self& __x) const { return _M_cur == __x._M_cur; }
+  bool operator!=(const _Self& __x) const { return !(*this == __x); }
+  bool operator<(const _Self& __x) const {
+    return (_M_node == __x._M_node) ? 
+      (_M_cur < __x._M_cur) : (_M_node < __x._M_node);
+  }
+  bool operator>(const _Self& __x) const  { return __x < *this; }
+  bool operator<=(const _Self& __x) const { return !(__x < *this); }
+  bool operator>=(const _Self& __x) const { return !(*this < __x); }
+
+  /** @if maint
+   *  Prepares to traverse new_node.  Sets everything except _M_cur, which
+   *  should therefore be set by the caller immediately afterwards, based on
+   *  _M_first and _M_last.
+   *  @endif
+  */
+  void _M_set_node(_Map_pointer __new_node) {
+    _M_node = __new_node;
+    _M_first = *__new_node;
+    _M_last = _M_first + difference_type(_S_buffer_size());
+  }
+};
+
+template 
+inline _Deque_iterator<_Tp, _Ref, _Ptr>
+operator+(ptrdiff_t __n, const _Deque_iterator<_Tp, _Ref, _Ptr>& __x)
+{
+  return __x + __n;
+}
+
+
+/// @if maint Primary default version.  @endif
+/**
+ *  @if maint
+ *  Deque base class.  It has two purposes.  First, its constructor
+ *  and destructor allocate (but don't initialize) storage.  This makes
+ *  exception safety easier.  Second, the base class encapsulates all of
+ *  the differences between SGI-style allocators and standard-conforming
+ *  allocators.  There are two versions:  this ordinary one, and the
+ *  space-saving specialization for instanceless allocators.
+ *  @endif
+*/
+template 
+class _Deque_alloc_base
+{
+public:
+  typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type;
+  allocator_type get_allocator() const { return _M_node_allocator; }
+
+  _Deque_alloc_base(const allocator_type& __a)
+    : _M_node_allocator(__a), _M_map_allocator(__a),
+      _M_map(0), _M_map_size(0)
+  {}
+  
+protected:
+  typedef typename _Alloc_traits<_Tp*, _Alloc>::allocator_type
+          _Map_allocator_type;
+
+  allocator_type      _M_node_allocator;
+  _Map_allocator_type _M_map_allocator;
+
+  _Tp* _M_allocate_node() {
+    return _M_node_allocator.allocate(__deque_buf_size(sizeof(_Tp)));
+  }
+  void _M_deallocate_node(_Tp* __p) {
+    _M_node_allocator.deallocate(__p, __deque_buf_size(sizeof(_Tp)));
+  }
+  _Tp** _M_allocate_map(size_t __n) 
+    { return _M_map_allocator.allocate(__n); }
+  void _M_deallocate_map(_Tp** __p, size_t __n) 
+    { _M_map_allocator.deallocate(__p, __n); }
+
+  _Tp** _M_map;
+  size_t _M_map_size;
+};
+
+/// @if maint Specialization for instanceless allocators.  @endif
+template 
+class _Deque_alloc_base<_Tp, _Alloc, true>
+{
+public:
+  typedef typename _Alloc_traits<_Tp,_Alloc>::allocator_type allocator_type;
+  allocator_type get_allocator() const { return allocator_type(); }
+
+  _Deque_alloc_base(const allocator_type&) : _M_map(0), _M_map_size(0) {}
+  
+protected:
+  typedef typename _Alloc_traits<_Tp, _Alloc>::_Alloc_type _Node_alloc_type;
+  typedef typename _Alloc_traits<_Tp*, _Alloc>::_Alloc_type _Map_alloc_type;
+
+  _Tp* _M_allocate_node() {
+    return _Node_alloc_type::allocate(__deque_buf_size(sizeof(_Tp)));
+  }
+  void _M_deallocate_node(_Tp* __p) {
+    _Node_alloc_type::deallocate(__p, __deque_buf_size(sizeof(_Tp)));
+  }
+  _Tp** _M_allocate_map(size_t __n) 
+    { return _Map_alloc_type::allocate(__n); }
+  void _M_deallocate_map(_Tp** __p, size_t __n) 
+    { _Map_alloc_type::deallocate(__p, __n); }
+
+  _Tp** _M_map;
+  size_t _M_map_size;
+};
+
+
+/**
+ *  @if maint
+ *  Deque base class.  Using _Alloc_traits in the instantiation of the parent
+ *  class provides the compile-time dispatching mentioned in the parent's docs.
+ *  This class provides the unified face for deque's allocation.
+ *
+ *  Nothing in this class ever constructs or destroys an actual Tp element.
+ *  (Deque handles that itself.)  Only/All memory management is performed here.
+ *  @endif
+*/
+template 
+class _Deque_base
+  : public _Deque_alloc_base<_Tp,_Alloc,
+                              _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+{
+public:
+  typedef _Deque_alloc_base<_Tp,_Alloc,
+                             _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+          _Base;
+  typedef typename _Base::allocator_type             allocator_type;
+  typedef _Deque_iterator<_Tp,_Tp&,_Tp*>             iterator;
+  typedef _Deque_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
+
+  _Deque_base(const allocator_type& __a, size_t __num_elements)
+    : _Base(__a), _M_start(), _M_finish()
+    { _M_initialize_map(__num_elements); }
+  _Deque_base(const allocator_type& __a) 
+    : _Base(__a), _M_start(), _M_finish() {}
+  ~_Deque_base();    
+
+protected:
+  void _M_initialize_map(size_t);
+  void _M_create_nodes(_Tp** __nstart, _Tp** __nfinish);
+  void _M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish);
+  enum { _S_initial_map_size = 8 };
+
+protected:
+  iterator _M_start;
+  iterator _M_finish;
+};
+
+
+template 
+_Deque_base<_Tp,_Alloc>::~_Deque_base()
+{
+  if (_M_map) {
+    _M_destroy_nodes(_M_start._M_node, _M_finish._M_node + 1);
+    _M_deallocate_map(_M_map, _M_map_size);
+  }
+}
+
+/**
+ *  @if maint
+ *  @brief Layout storage.
+ *  @param  num_elements  The count of T's for which to allocate space at first.
+ *  @return   Nothing.
+ *
+ *  The initial underlying memory layout is a bit complicated...
+ *  @endif
+*/
+template 
+void
+_Deque_base<_Tp,_Alloc>::_M_initialize_map(size_t __num_elements)
+{
+  size_t __num_nodes = 
+    __num_elements / __deque_buf_size(sizeof(_Tp)) + 1;
+
+  _M_map_size = max((size_t) _S_initial_map_size, __num_nodes + 2);
+  _M_map = _M_allocate_map(_M_map_size);
+
+  _Tp** __nstart = _M_map + (_M_map_size - __num_nodes) / 2;
+  _Tp** __nfinish = __nstart + __num_nodes;
+    
+  try 
+    { _M_create_nodes(__nstart, __nfinish); }
+  catch(...)
+    {
+      _M_deallocate_map(_M_map, _M_map_size);
+      _M_map = 0;
+      _M_map_size = 0;
+      __throw_exception_again;
+    }
+  
+  _M_start._M_set_node(__nstart);
+  _M_finish._M_set_node(__nfinish - 1);
+  _M_start._M_cur = _M_start._M_first;
+  _M_finish._M_cur = _M_finish._M_first +
+               __num_elements % __deque_buf_size(sizeof(_Tp));
+}
+
+template 
+void _Deque_base<_Tp,_Alloc>::_M_create_nodes(_Tp** __nstart, _Tp** __nfinish)
+{
+  _Tp** __cur;
+  try {
+    for (__cur = __nstart; __cur < __nfinish; ++__cur)
+      *__cur = _M_allocate_node();
+  }
+  catch(...)
+    { 
+      _M_destroy_nodes(__nstart, __cur);
+      __throw_exception_again; 
+    }
+}
+
+template 
+void
+_Deque_base<_Tp,_Alloc>::_M_destroy_nodes(_Tp** __nstart, _Tp** __nfinish)
+{
+  for (_Tp** __n = __nstart; __n < __nfinish; ++__n)
+    _M_deallocate_node(*__n);
+}
+
+
+/**
+ *  @ingroup Containers
+ *  @ingroup Sequences
+ *
+ *  Meets the requirements of a container, a
+ *  reversible container, and a
+ *  sequence, including the
+ *  optional sequence requirements.
+ *
+ *  Placeholder:  see http://www.sgi.com/tech/stl/Deque.html for now.
+ *
+ *  In previous HP/SGI versions of deque, there was an extra template parameter
+ *  so users could control the node size.  This extension turned out to violate
+ *  the C++ standard (it can be detected using template template parameters),
+ *  and it was removed.
+ *
+ *  @if maint
+ *  Here's how a deque manages memory.  Each deque has 4 members:
+ *  
+ *  - Tp**        _M_map
+ *  - size_t      _M_map_size
+ *  - iterator    _M_start, _M_finish
+ *  
+ *  map_size is at least 8.  %map is an array of map_size pointers-to-"nodes".
+ *  (The name has nothing to do with the std::map class.)
+ *  
+ *  A "node" has no specific type name as such, but it is referred to as
+ *  "node" in this file.  It is a simple array-of-Tp.  If Tp is very large,
+ *  there will be one Tp element per node (i.e., an "array" of one).
+ *  For non-huge Tp's, node size is inversely related to Tp size:  the
+ *  larger the Tp, the fewer Tp's will fit in a node.  The goal here is to
+ *  keep the total size of a node relatively small and constant over different
+ *  Tp's, to improve allocator efficiency.
+ *  
+ *  **** As I write this, the nodes are /not/ allocated using the high-speed
+ *  memory pool.  There are 20 hours left in the year; perhaps I can fix
+ *  this before 2002.
+ *  
+ *  Not every pointer in the %map array will point to a node.  If the initial
+ *  number of elements in the deque is small, the /middle/ %map pointers will
+ *  be valid, and the ones at the edges will be unused.  This same situation
+ *  will arise as the %map grows:  available %map pointers, if any, will be on
+ *  the ends.  As new nodes are created, only a subset of the %map's pointers
+ *  need to be copied "outward".
+ *
+ *  Class invariants:
+ * - For any nonsingular iterator i:
+ *    - i.node points to a member of the %map array.  (Yes, you read that
+ *      correctly:  i.node does not actually point to a node.)  The member of
+ *      the %map array is what actually points to the node.
+ *    - i.first == *(i.node)    (This points to the node (first Tp element).)
+ *    - i.last  == i.first + node_size
+ *    - i.cur is a pointer in the range [i.first, i.last).  NOTE:
+ *      the implication of this is that i.cur is always a dereferenceable
+ *      pointer, even if i is a past-the-end iterator.
+ * - Start and Finish are always nonsingular iterators.  NOTE: this means that
+ *   an empty deque must have one node, a deque with  >
+class deque : protected _Deque_base<_Tp, _Alloc>
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+
+  typedef _Deque_base<_Tp, _Alloc> _Base;
+
+public:
+  typedef _Tp                                value_type;
+  typedef value_type*                        pointer;
+  typedef const value_type*                  const_pointer;
+  typedef value_type&                        reference;
+  typedef const value_type&                  const_reference;
+  typedef size_t                             size_type;
+  typedef ptrdiff_t                          difference_type;
+
+  typedef typename _Base::allocator_type allocator_type;
+  allocator_type get_allocator() const { return _Base::get_allocator(); }
+
+  typedef typename _Base::iterator           iterator;
+  typedef typename _Base::const_iterator     const_iterator;
+  typedef reverse_iterator   const_reverse_iterator;
+  typedef reverse_iterator         reverse_iterator;
+
+protected:
+  typedef pointer* _Map_pointer;
+  static size_t _S_buffer_size() { return __deque_buf_size(sizeof(_Tp)); }
+
+  // Functions controlling memory layout, and nothing else.
+  using _Base::_M_initialize_map;
+  using _Base::_M_create_nodes;
+  using _Base::_M_destroy_nodes;
+  using _Base::_M_allocate_node;
+  using _Base::_M_deallocate_node;
+  using _Base::_M_allocate_map;
+  using _Base::_M_deallocate_map;
+
+  /** @if maint
+   *  A total of four data members accumulated down the heirarchy.  If the
+   *  _Alloc type requires separate instances, then two of them will also be
+   *  included in each deque.
+   *  @endif
+  */
+  using _Base::_M_map;
+  using _Base::_M_map_size;
+  using _Base::_M_start;
+  using _Base::_M_finish;
+
+public:                         // Basic accessors
+  iterator begin() { return _M_start; }
+  iterator end() { return _M_finish; }
+  const_iterator begin() const { return _M_start; }
+  const_iterator end() const { return _M_finish; }
+
+  reverse_iterator rbegin() { return reverse_iterator(_M_finish); }
+  reverse_iterator rend() { return reverse_iterator(_M_start); }
+  const_reverse_iterator rbegin() const 
+    { return const_reverse_iterator(_M_finish); }
+  const_reverse_iterator rend() const 
+    { return const_reverse_iterator(_M_start); }
+
+  reference operator[](size_type __n)
+    { return _M_start[difference_type(__n)]; }
+  const_reference operator[](size_type __n) const 
+    { return _M_start[difference_type(__n)]; }
+
+  void _M_range_check(size_type __n) const {
+    if (__n >= this->size())
+      __throw_range_error("deque");
+  }
+
+  reference at(size_type __n)
+    { _M_range_check(__n); return (*this)[__n]; }
+  const_reference at(size_type __n) const
+    { _M_range_check(__n); return (*this)[__n]; }
+
+  reference front() { return *_M_start; }
+  reference back() {
+    iterator __tmp = _M_finish;
+    --__tmp;
+    return *__tmp;
+  }
+  const_reference front() const { return *_M_start; }
+  const_reference back() const {
+    const_iterator __tmp = _M_finish;
+    --__tmp;
+    return *__tmp;
+  }
+
+  size_type size() const { return _M_finish - _M_start; }
+  size_type max_size() const { return size_type(-1); }
+  bool empty() const { return _M_finish == _M_start; }
+
+public:                         // Constructor, destructor.
+  explicit deque(const allocator_type& __a = allocator_type()) 
+    : _Base(__a, 0) {}
+  deque(const deque& __x) : _Base(__x.get_allocator(), __x.size()) 
+    { uninitialized_copy(__x.begin(), __x.end(), _M_start); }
+  deque(size_type __n, const value_type& __value,
+        const allocator_type& __a = allocator_type()) : _Base(__a, __n)
+    { _M_fill_initialize(__value); }
+
+  explicit
+  deque(size_type __n)
+  : _Base(allocator_type(), __n)
+  { _M_fill_initialize(value_type()); }
+
+  // Check whether it's an integral type.  If so, it's not an iterator.
+  template
+    deque(_InputIterator __first, _InputIterator __last,
+          const allocator_type& __a = allocator_type())
+    : _Base(__a)
+    {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_initialize_dispatch(__first, __last, _Integral());
+    }
+
+  template
+    void
+    _M_initialize_dispatch(_Integer __n, _Integer __x, __true_type)
+    {
+      _M_initialize_map(__n);
+      _M_fill_initialize(__x);
+    }
+
+  template
+    void
+    _M_initialize_dispatch(_InputIter __first, _InputIter __last, __false_type)
+    {
+      typedef typename iterator_traits<_InputIter>::iterator_category _IterCategory;
+      _M_range_initialize(__first, __last, _IterCategory());
+    }
+
+  ~deque()
+  { _Destroy(_M_start, _M_finish); }
+
+  deque& operator= (const deque& __x) {
+    const size_type __len = size();
+    if (&__x != this) {
+      if (__len >= __x.size())
+        erase(copy(__x.begin(), __x.end(), _M_start), _M_finish);
+      else {
+        const_iterator __mid = __x.begin() + difference_type(__len);
+        copy(__x.begin(), __mid, _M_start);
+        insert(_M_finish, __mid, __x.end());
+      }
+    }
+    return *this;
+  }        
+
+  void swap(deque& __x) {
+    std::swap(_M_start, __x._M_start);
+    std::swap(_M_finish, __x._M_finish);
+    std::swap(_M_map, __x._M_map);
+    std::swap(_M_map_size, __x._M_map_size);
+  }
+
+public: 
+  // assign(), a generalized assignment member function.  Two
+  // versions: one that takes a count, and one that takes a range.
+  // The range version is a member template, so we dispatch on whether
+  // or not the type is an integer.
+
+  void _M_fill_assign(size_type __n, const _Tp& __val) {
+    if (__n > size()) {
+      fill(begin(), end(), __val);
+      insert(end(), __n - size(), __val);
+    }
+    else {
+      erase(begin() + __n, end());
+      fill(begin(), end(), __val);
+    }
+  }
+
+  void
+  assign(size_type __n, const _Tp& __val)
+  { _M_fill_assign(__n, __val); }
+
+  template
+    void
+    assign(_InputIterator __first, _InputIterator __last)
+    {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_assign_dispatch(__first, __last, _Integral());
+    }
+
+private:                        // helper functions for assign() 
+
+  template
+    void
+    _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+    { _M_fill_assign(static_cast(__n), static_cast<_Tp>(__val)); }
+
+  template
+    void
+    _M_assign_dispatch(_InputIterator __first, _InputIterator __last, __false_type)
+    {
+      typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
+      _M_assign_aux(__first, __last, _IterCategory());
+    }
+
+  template 
+  void _M_assign_aux(_InputIterator __first, _InputIterator __last,
+                     input_iterator_tag);
+
+  template 
+  void _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+                     forward_iterator_tag) {
+    size_type __len = distance(__first, __last);
+    if (__len > size()) {
+      _ForwardIterator __mid = __first;
+      advance(__mid, size());
+      copy(__first, __mid, begin());
+      insert(end(), __mid, __last);
+    }
+    else
+      erase(copy(__first, __last, begin()), end());
+  }
+
+public:                         // push_* and pop_*
+  
+  void
+  push_back(const value_type& __t)
+  {
+    if (_M_finish._M_cur != _M_finish._M_last - 1) {
+      _Construct(_M_finish._M_cur, __t);
+      ++_M_finish._M_cur;
+    }
+    else
+      _M_push_back_aux(__t);
+  }
+
+  void
+  push_back()
+  {
+    if (_M_finish._M_cur != _M_finish._M_last - 1) {
+      _Construct(_M_finish._M_cur);
+      ++_M_finish._M_cur;
+    }
+    else
+      _M_push_back_aux();
+  }
+
+  void
+  push_front(const value_type& __t) 
+  {
+    if (_M_start._M_cur != _M_start._M_first) {
+      _Construct(_M_start._M_cur - 1, __t);
+      --_M_start._M_cur;
+    }
+    else
+      _M_push_front_aux(__t);
+  }
+
+  void
+  push_front()
+  {
+    if (_M_start._M_cur != _M_start._M_first) {
+      _Construct(_M_start._M_cur - 1);
+      --_M_start._M_cur;
+    }
+    else
+      _M_push_front_aux();
+  }
+
+
+  void
+  pop_back()
+  {
+    if (_M_finish._M_cur != _M_finish._M_first) {
+      --_M_finish._M_cur;
+      _Destroy(_M_finish._M_cur);
+    }
+    else
+      _M_pop_back_aux();
+  }
+
+  void
+  pop_front()
+  {
+    if (_M_start._M_cur != _M_start._M_last - 1) {
+      _Destroy(_M_start._M_cur);
+      ++_M_start._M_cur;
+    }
+    else 
+      _M_pop_front_aux();
+  }
+
+public:                         // Insert
+
+  iterator
+  insert(iterator position, const value_type& __x)
+  {
+    if (position._M_cur == _M_start._M_cur) {
+      push_front(__x);
+      return _M_start;
+    }
+    else if (position._M_cur == _M_finish._M_cur) {
+      push_back(__x);
+      iterator __tmp = _M_finish;
+      --__tmp;
+      return __tmp;
+    }
+    else {
+      return _M_insert_aux(position, __x);
+    }
+  }
+
+  iterator
+  insert(iterator __position)
+  { return insert(__position, value_type()); }
+
+  void
+  insert(iterator __pos, size_type __n, const value_type& __x)
+  { _M_fill_insert(__pos, __n, __x); }
+
+  void
+  _M_fill_insert(iterator __pos, size_type __n, const value_type& __x); 
+
+  // Check whether it's an integral type.  If so, it's not an iterator.
+  template
+    void
+    insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+    {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_insert_dispatch(__pos, __first, __last, _Integral());
+    }
+
+  template
+    void
+    _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type)
+    { _M_fill_insert(__pos, static_cast(__n), static_cast(__x)); }
+
+  template
+    void
+    _M_insert_dispatch(iterator __pos,
+                       _InputIterator __first, _InputIterator __last,
+                       __false_type)
+    {
+      typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
+      insert(__pos, __first, __last, _IterCategory());
+    }
+
+  void resize(size_type __new_size, const value_type& __x) {
+    const size_type __len = size();
+    if (__new_size < __len) 
+      erase(_M_start + __new_size, _M_finish);
+    else
+      insert(_M_finish, __new_size - __len, __x);
+  }
+
+  void resize(size_type new_size) { resize(new_size, value_type()); }
+
+public:                         // Erase
+  iterator erase(iterator __pos) {
+    iterator __next = __pos;
+    ++__next;
+    size_type __index = __pos - _M_start;
+    if (__index < (size() >> 1)) {
+      copy_backward(_M_start, __pos, __next);
+      pop_front();
+    }
+    else {
+      copy(__next, _M_finish, __pos);
+      pop_back();
+    }
+    return _M_start + __index;
+  }
+
+  iterator erase(iterator __first, iterator __last);
+  void clear(); 
+
+protected:                        // Internal construction/destruction
+
+  void _M_fill_initialize(const value_type& __value);
+
+  template 
+  void _M_range_initialize(_InputIterator __first, _InputIterator __last,
+                        input_iterator_tag);
+
+  template 
+  void _M_range_initialize(_ForwardIterator __first, _ForwardIterator __last,
+                        forward_iterator_tag);
+
+protected:                        // Internal push_* and pop_*
+
+  void _M_push_back_aux(const value_type&);
+  void _M_push_back_aux();
+  void _M_push_front_aux(const value_type&);
+  void _M_push_front_aux();
+  void _M_pop_back_aux();
+  void _M_pop_front_aux();
+
+protected:                        // Internal insert functions
+
+  template 
+  void insert(iterator __pos, _InputIterator __first, _InputIterator __last,
+              input_iterator_tag);
+
+  template 
+  void insert(iterator __pos,
+              _ForwardIterator __first, _ForwardIterator __last,
+              forward_iterator_tag);
+
+  iterator _M_insert_aux(iterator __pos, const value_type& __x);
+  iterator _M_insert_aux(iterator __pos);
+  void _M_insert_aux(iterator __pos, size_type __n, const value_type& __x);
+
+  template 
+  void _M_insert_aux(iterator __pos, 
+                     _ForwardIterator __first, _ForwardIterator __last,
+                     size_type __n);
+
+  iterator _M_reserve_elements_at_front(size_type __n) {
+    size_type __vacancies = _M_start._M_cur - _M_start._M_first;
+    if (__n > __vacancies) 
+      _M_new_elements_at_front(__n - __vacancies);
+    return _M_start - difference_type(__n);
+  }
+
+  iterator _M_reserve_elements_at_back(size_type __n) {
+    size_type __vacancies = (_M_finish._M_last - _M_finish._M_cur) - 1;
+    if (__n > __vacancies)
+      _M_new_elements_at_back(__n - __vacancies);
+    return _M_finish + difference_type(__n);
+  }
+
+  void _M_new_elements_at_front(size_type __new_elements);
+  void _M_new_elements_at_back(size_type __new_elements);
+
+protected:                      // Allocation of _M_map and nodes
+
+  // Makes sure the _M_map has space for new nodes.  Does not actually
+  //  add the nodes.  Can invalidate _M_map pointers.  (And consequently, 
+  //  deque iterators.)
+
+  void _M_reserve_map_at_back (size_type __nodes_to_add = 1) {
+    if (__nodes_to_add + 1 > _M_map_size - (_M_finish._M_node - _M_map))
+      _M_reallocate_map(__nodes_to_add, false);
+  }
+
+  void _M_reserve_map_at_front (size_type __nodes_to_add = 1) {
+    if (__nodes_to_add > size_type(_M_start._M_node - _M_map))
+      _M_reallocate_map(__nodes_to_add, true);
+  }
+
+  void _M_reallocate_map(size_type __nodes_to_add, bool __add_at_front);
+};
+
+// Non-inline member functions
+
+template 
+template 
+void deque<_Tp, _Alloc>
+  ::_M_assign_aux(_InputIter __first, _InputIter __last, input_iterator_tag)
+{
+  iterator __cur = begin();
+  for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
+    *__cur = *__first;
+  if (__first == __last)
+    erase(__cur, end());
+  else
+    insert(end(), __first, __last);
+}
+
+template 
+void deque<_Tp, _Alloc>::_M_fill_insert(iterator __pos,
+                                        size_type __n, const value_type& __x)
+{
+  if (__pos._M_cur == _M_start._M_cur) {
+    iterator __new_start = _M_reserve_elements_at_front(__n);
+    try {
+      uninitialized_fill(__new_start, _M_start, __x);
+      _M_start = __new_start;
+    }
+    catch(...)
+      {
+	_M_destroy_nodes(__new_start._M_node, _M_start._M_node);
+	__throw_exception_again;
+      }
+  }
+  else if (__pos._M_cur == _M_finish._M_cur) {
+    iterator __new_finish = _M_reserve_elements_at_back(__n);
+    try {
+      uninitialized_fill(_M_finish, __new_finish, __x);
+      _M_finish = __new_finish;
+    }
+    catch(...)
+      {
+	_M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);    
+	__throw_exception_again;
+      }
+  }
+  else 
+    _M_insert_aux(__pos, __n, __x);
+}
+
+template 
+typename deque<_Tp,_Alloc>::iterator 
+deque<_Tp,_Alloc>::erase(iterator __first, iterator __last)
+{
+  if (__first == _M_start && __last == _M_finish) {
+    clear();
+    return _M_finish;
+  }
+  else {
+    difference_type __n = __last - __first;
+    difference_type __elems_before = __first - _M_start;
+    if (static_cast(__elems_before) < (size() - __n) / 2) {
+      copy_backward(_M_start, __first, __last);
+      iterator __new_start = _M_start + __n;
+      _Destroy(_M_start, __new_start);
+      _M_destroy_nodes(_M_start._M_node, __new_start._M_node);
+      _M_start = __new_start;
+    }
+    else {
+      copy(__last, _M_finish, __first);
+      iterator __new_finish = _M_finish - __n;
+      _Destroy(__new_finish, _M_finish);
+      _M_destroy_nodes(__new_finish._M_node + 1, _M_finish._M_node + 1);
+      _M_finish = __new_finish;
+    }
+    return _M_start + __elems_before;
+  }
+}
+
+template  
+void deque<_Tp,_Alloc>::clear()
+{
+  for (_Map_pointer __node = _M_start._M_node + 1;
+       __node < _M_finish._M_node;
+       ++__node) {
+    _Destroy(*__node, *__node + _S_buffer_size());
+    _M_deallocate_node(*__node);
+  }
+
+  if (_M_start._M_node != _M_finish._M_node) {
+    _Destroy(_M_start._M_cur, _M_start._M_last);
+    _Destroy(_M_finish._M_first, _M_finish._M_cur);
+    _M_deallocate_node(_M_finish._M_first);
+  }
+  else
+    _Destroy(_M_start._M_cur, _M_finish._M_cur);
+
+  _M_finish = _M_start;
+}
+
+/**
+ *  @if maint
+ *  @brief Fills the deque with copies of value.
+ *  @param  value  Initial value.
+ *  @return   Nothing.
+ *  @pre _M_start and _M_finish have already been initialized, but none of the
+ *       deque's elements have yet been constructed.
+ *
+ *  This function is called only when the user provides an explicit size (with
+ *  or without an explicit exemplar value).
+ *  @endif
+*/
+template 
+void deque<_Tp,_Alloc>::_M_fill_initialize(const value_type& __value)
+{
+  _Map_pointer __cur;
+  try {
+    for (__cur = _M_start._M_node; __cur < _M_finish._M_node; ++__cur)
+      uninitialized_fill(*__cur, *__cur + _S_buffer_size(), __value);
+    uninitialized_fill(_M_finish._M_first, _M_finish._M_cur, __value);
+  }
+  catch(...)
+    {
+      _Destroy(_M_start, iterator(*__cur, __cur));
+      __throw_exception_again;
+    }
+}
+
+/** @{
+ *  @if maint
+ *  @brief Fills the deque with whatever is in [first,last).
+ *  @param  first  An input iterator.
+ *  @param  last  An input iterator.
+ *  @return   Nothing.
+ *
+ *  If the iterators are actually forward iterators (or better), then the
+ *  memory layout can be done all at once.  Else we move forward using
+ *  push_back on each value from the iterator.
+ *  @endif
+*/
+template  template 
+void deque<_Tp,_Alloc>::_M_range_initialize(_InputIterator __first,
+                                            _InputIterator __last,
+                                            input_iterator_tag)
+{
+  _M_initialize_map(0);
+  try {
+    for ( ; __first != __last; ++__first)
+      push_back(*__first);
+  }
+  catch(...)
+    {
+      clear();
+      __throw_exception_again;
+    }
+}
+
+template  template 
+void deque<_Tp,_Alloc>::_M_range_initialize(_ForwardIterator __first,
+                                            _ForwardIterator __last,
+                                            forward_iterator_tag)
+{
+  size_type __n = distance(__first, __last);
+  _M_initialize_map(__n);
+
+  _Map_pointer __cur_node;
+  try {
+    for (__cur_node = _M_start._M_node; 
+         __cur_node < _M_finish._M_node; 
+         ++__cur_node) {
+      _ForwardIterator __mid = __first;
+      advance(__mid, _S_buffer_size());
+      uninitialized_copy(__first, __mid, *__cur_node);
+      __first = __mid;
+    }
+    uninitialized_copy(__first, __last, _M_finish._M_first);
+  }
+  catch(...)
+    {
+      _Destroy(_M_start, iterator(*__cur_node, __cur_node));
+      __throw_exception_again;
+    }
+}
+/** @} */
+
+// Called only if _M_finish._M_cur == _M_finish._M_last - 1.
+template 
+void
+deque<_Tp,_Alloc>::_M_push_back_aux(const value_type& __t)
+{
+  value_type __t_copy = __t;
+  _M_reserve_map_at_back();
+  *(_M_finish._M_node + 1) = _M_allocate_node();
+  try {
+    _Construct(_M_finish._M_cur, __t_copy);
+    _M_finish._M_set_node(_M_finish._M_node + 1);
+    _M_finish._M_cur = _M_finish._M_first;
+  }
+  catch(...)
+    {
+      _M_deallocate_node(*(_M_finish._M_node + 1));
+      __throw_exception_again;
+    }
+}
+
+// Called only if _M_finish._M_cur == _M_finish._M_last - 1.
+template 
+void
+deque<_Tp,_Alloc>::_M_push_back_aux()
+{
+  _M_reserve_map_at_back();
+  *(_M_finish._M_node + 1) = _M_allocate_node();
+  try {
+    _Construct(_M_finish._M_cur);
+    _M_finish._M_set_node(_M_finish._M_node + 1);
+    _M_finish._M_cur = _M_finish._M_first;
+  }
+  catch(...)
+    {
+      _M_deallocate_node(*(_M_finish._M_node + 1));
+      __throw_exception_again;
+    }
+}
+
+// Called only if _M_start._M_cur == _M_start._M_first.
+template 
+void
+deque<_Tp,_Alloc>::_M_push_front_aux(const value_type& __t)
+{
+  value_type __t_copy = __t;
+  _M_reserve_map_at_front();
+  *(_M_start._M_node - 1) = _M_allocate_node();
+  try {
+    _M_start._M_set_node(_M_start._M_node - 1);
+    _M_start._M_cur = _M_start._M_last - 1;
+    _Construct(_M_start._M_cur, __t_copy);
+  }
+  catch(...)
+    {
+      ++_M_start;
+      _M_deallocate_node(*(_M_start._M_node - 1));
+      __throw_exception_again;
+    }
+} 
+
+// Called only if _M_start._M_cur == _M_start._M_first.
+template 
+void
+deque<_Tp,_Alloc>::_M_push_front_aux()
+{
+  _M_reserve_map_at_front();
+  *(_M_start._M_node - 1) = _M_allocate_node();
+  try {
+    _M_start._M_set_node(_M_start._M_node - 1);
+    _M_start._M_cur = _M_start._M_last - 1;
+    _Construct(_M_start._M_cur);
+  }
+  catch(...)
+    {
+      ++_M_start;
+      _M_deallocate_node(*(_M_start._M_node - 1));
+      __throw_exception_again;
+    }
+} 
+
+// Called only if _M_finish._M_cur == _M_finish._M_first.
+template 
+void deque<_Tp,_Alloc>::_M_pop_back_aux()
+{
+  _M_deallocate_node(_M_finish._M_first);
+  _M_finish._M_set_node(_M_finish._M_node - 1);
+  _M_finish._M_cur = _M_finish._M_last - 1;
+  _Destroy(_M_finish._M_cur);
+}
+
+// Called only if _M_start._M_cur == _M_start._M_last - 1.  Note that 
+// if the deque has at least one element (a precondition for this member 
+// function), and if _M_start._M_cur == _M_start._M_last, then the deque 
+// must have at least two nodes.
+template 
+void deque<_Tp,_Alloc>::_M_pop_front_aux()
+{
+  _Destroy(_M_start._M_cur);
+  _M_deallocate_node(_M_start._M_first);
+  _M_start._M_set_node(_M_start._M_node + 1);
+  _M_start._M_cur = _M_start._M_first;
+}      
+
+template  template 
+void deque<_Tp,_Alloc>::insert(iterator __pos,
+                               _InputIterator __first, _InputIterator __last,
+                               input_iterator_tag)
+{
+  copy(__first, __last, inserter(*this, __pos));
+}
+
+template  template 
+void
+deque<_Tp,_Alloc>::insert(iterator __pos,
+                          _ForwardIterator __first, _ForwardIterator __last,
+                          forward_iterator_tag) {
+  size_type __n = distance(__first, __last);
+  if (__pos._M_cur == _M_start._M_cur) {
+    iterator __new_start = _M_reserve_elements_at_front(__n);
+    try {
+      uninitialized_copy(__first, __last, __new_start);
+      _M_start = __new_start;
+    }
+    catch(...)
+      {
+	_M_destroy_nodes(__new_start._M_node, _M_start._M_node);
+	__throw_exception_again;
+      }
+  }
+  else if (__pos._M_cur == _M_finish._M_cur) {
+    iterator __new_finish = _M_reserve_elements_at_back(__n);
+    try {
+      uninitialized_copy(__first, __last, _M_finish);
+      _M_finish = __new_finish;
+    }
+    catch(...)
+      {
+	_M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
+	__throw_exception_again;
+      }
+  }
+  else
+    _M_insert_aux(__pos, __first, __last, __n);
+}
+
+template 
+typename deque<_Tp, _Alloc>::iterator
+deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos, const value_type& __x)
+{
+  difference_type __index = __pos - _M_start;
+  value_type __x_copy = __x;
+  if (static_cast(__index) < size() / 2) {
+    push_front(front());
+    iterator __front1 = _M_start;
+    ++__front1;
+    iterator __front2 = __front1;
+    ++__front2;
+    __pos = _M_start + __index;
+    iterator __pos1 = __pos;
+    ++__pos1;
+    copy(__front2, __pos1, __front1);
+  }
+  else {
+    push_back(back());
+    iterator __back1 = _M_finish;
+    --__back1;
+    iterator __back2 = __back1;
+    --__back2;
+    __pos = _M_start + __index;
+    copy_backward(__pos, __back2, __back1);
+  }
+  *__pos = __x_copy;
+  return __pos;
+}
+
+template 
+typename deque<_Tp,_Alloc>::iterator 
+deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos)
+{
+  difference_type __index = __pos - _M_start;
+  if (static_cast(__index) < size() / 2) {
+    push_front(front());
+    iterator __front1 = _M_start;
+    ++__front1;
+    iterator __front2 = __front1;
+    ++__front2;
+    __pos = _M_start + __index;
+    iterator __pos1 = __pos;
+    ++__pos1;
+    copy(__front2, __pos1, __front1);
+  }
+  else {
+    push_back(back());
+    iterator __back1 = _M_finish;
+    --__back1;
+    iterator __back2 = __back1;
+    --__back2;
+    __pos = _M_start + __index;
+    copy_backward(__pos, __back2, __back1);
+  }
+  *__pos = value_type();
+  return __pos;
+}
+
+template 
+void deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos,
+                                      size_type __n,
+                                      const value_type& __x)
+{
+  const difference_type __elems_before = __pos - _M_start;
+  size_type __length = this->size();
+  value_type __x_copy = __x;
+  if (__elems_before < difference_type(__length / 2)) {
+    iterator __new_start = _M_reserve_elements_at_front(__n);
+    iterator __old_start = _M_start;
+    __pos = _M_start + __elems_before;
+    try {
+      if (__elems_before >= difference_type(__n)) {
+        iterator __start_n = _M_start + difference_type(__n);
+        uninitialized_copy(_M_start, __start_n, __new_start);
+        _M_start = __new_start;
+        copy(__start_n, __pos, __old_start);
+        fill(__pos - difference_type(__n), __pos, __x_copy);
+      }
+      else {
+        __uninitialized_copy_fill(_M_start, __pos, __new_start, 
+                                  _M_start, __x_copy);
+        _M_start = __new_start;
+        fill(__old_start, __pos, __x_copy);
+      }
+    }
+    catch(...)
+      { 
+	_M_destroy_nodes(__new_start._M_node, _M_start._M_node);
+	__throw_exception_again;
+      }
+  }
+  else {
+    iterator __new_finish = _M_reserve_elements_at_back(__n);
+    iterator __old_finish = _M_finish;
+    const difference_type __elems_after = 
+      difference_type(__length) - __elems_before;
+    __pos = _M_finish - __elems_after;
+    try {
+      if (__elems_after > difference_type(__n)) {
+        iterator __finish_n = _M_finish - difference_type(__n);
+        uninitialized_copy(__finish_n, _M_finish, _M_finish);
+        _M_finish = __new_finish;
+        copy_backward(__pos, __finish_n, __old_finish);
+        fill(__pos, __pos + difference_type(__n), __x_copy);
+      }
+      else {
+        __uninitialized_fill_copy(_M_finish, __pos + difference_type(__n),
+                                  __x_copy, __pos, _M_finish);
+        _M_finish = __new_finish;
+        fill(__pos, __old_finish, __x_copy);
+      }
+    }
+    catch(...)
+      { 
+	_M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
+	__throw_exception_again;
+      }
+  }
+}
+
+template  template 
+void deque<_Tp,_Alloc>::_M_insert_aux(iterator __pos,
+                                      _ForwardIterator __first,
+                                      _ForwardIterator __last,
+                                      size_type __n)
+{
+  const difference_type __elemsbefore = __pos - _M_start;
+  size_type __length = size();
+  if (static_cast(__elemsbefore) < __length / 2) {
+    iterator __new_start = _M_reserve_elements_at_front(__n);
+    iterator __old_start = _M_start;
+    __pos = _M_start + __elemsbefore;
+    try {
+      if (__elemsbefore >= difference_type(__n)) {
+        iterator __start_n = _M_start + difference_type(__n); 
+        uninitialized_copy(_M_start, __start_n, __new_start);
+        _M_start = __new_start;
+        copy(__start_n, __pos, __old_start);
+        copy(__first, __last, __pos - difference_type(__n));
+      }
+      else {
+        _ForwardIterator __mid = __first;
+        advance(__mid, difference_type(__n) - __elemsbefore);
+        __uninitialized_copy_copy(_M_start, __pos, __first, __mid,
+                                  __new_start);
+        _M_start = __new_start;
+        copy(__mid, __last, __old_start);
+      }
+    }
+    catch(...)
+      {
+	_M_destroy_nodes(__new_start._M_node, _M_start._M_node);
+	__throw_exception_again;
+      }
+  }
+  else {
+    iterator __new_finish = _M_reserve_elements_at_back(__n);
+    iterator __old_finish = _M_finish;
+    const difference_type __elemsafter = 
+      difference_type(__length) - __elemsbefore;
+    __pos = _M_finish - __elemsafter;
+    try {
+      if (__elemsafter > difference_type(__n)) {
+        iterator __finish_n = _M_finish - difference_type(__n);
+        uninitialized_copy(__finish_n, _M_finish, _M_finish);
+        _M_finish = __new_finish;
+        copy_backward(__pos, __finish_n, __old_finish);
+        copy(__first, __last, __pos);
+      }
+      else {
+        _ForwardIterator __mid = __first;
+        advance(__mid, __elemsafter);
+        __uninitialized_copy_copy(__mid, __last, __pos, _M_finish, _M_finish);
+        _M_finish = __new_finish;
+        copy(__first, __mid, __pos);
+      }
+    }
+    catch(...)
+      {
+	_M_destroy_nodes(_M_finish._M_node + 1, __new_finish._M_node + 1);
+	__throw_exception_again;
+      }
+  }
+}
+
+template 
+void deque<_Tp,_Alloc>::_M_new_elements_at_front(size_type __new_elems)
+{
+  size_type __new_nodes
+      = (__new_elems + _S_buffer_size() - 1) / _S_buffer_size();
+  _M_reserve_map_at_front(__new_nodes);
+  size_type __i;
+  try {
+    for (__i = 1; __i <= __new_nodes; ++__i)
+      *(_M_start._M_node - __i) = _M_allocate_node();
+  }
+  catch(...) {
+    for (size_type __j = 1; __j < __i; ++__j)
+      _M_deallocate_node(*(_M_start._M_node - __j));      
+    __throw_exception_again;
+  }
+}
+
+template 
+void deque<_Tp,_Alloc>::_M_new_elements_at_back(size_type __new_elems)
+{
+  size_type __new_nodes
+      = (__new_elems + _S_buffer_size() - 1) / _S_buffer_size();
+  _M_reserve_map_at_back(__new_nodes);
+  size_type __i;
+  try {
+    for (__i = 1; __i <= __new_nodes; ++__i)
+      *(_M_finish._M_node + __i) = _M_allocate_node();
+  }
+  catch(...) {
+    for (size_type __j = 1; __j < __i; ++__j)
+      _M_deallocate_node(*(_M_finish._M_node + __j));      
+    __throw_exception_again;
+  }
+}
+
+template 
+void deque<_Tp,_Alloc>::_M_reallocate_map(size_type __nodes_to_add,
+                                          bool __add_at_front)
+{
+  size_type __old_num_nodes = _M_finish._M_node - _M_start._M_node + 1;
+  size_type __new_num_nodes = __old_num_nodes + __nodes_to_add;
+
+  _Map_pointer __new_nstart;
+  if (_M_map_size > 2 * __new_num_nodes) {
+    __new_nstart = _M_map + (_M_map_size - __new_num_nodes) / 2 
+                     + (__add_at_front ? __nodes_to_add : 0);
+    if (__new_nstart < _M_start._M_node)
+      copy(_M_start._M_node, _M_finish._M_node + 1, __new_nstart);
+    else
+      copy_backward(_M_start._M_node, _M_finish._M_node + 1, 
+                    __new_nstart + __old_num_nodes);
+  }
+  else {
+    size_type __new_map_size = 
+      _M_map_size + max(_M_map_size, __nodes_to_add) + 2;
+
+    _Map_pointer __new_map = _M_allocate_map(__new_map_size);
+    __new_nstart = __new_map + (__new_map_size - __new_num_nodes) / 2
+                         + (__add_at_front ? __nodes_to_add : 0);
+    copy(_M_start._M_node, _M_finish._M_node + 1, __new_nstart);
+    _M_deallocate_map(_M_map, _M_map_size);
+
+    _M_map = __new_map;
+    _M_map_size = __new_map_size;
+  }
+
+  _M_start._M_set_node(__new_nstart);
+  _M_finish._M_set_node(__new_nstart + __old_num_nodes - 1);
+}
+
+
+// Nonmember functions.
+
+template 
+inline bool operator==(const deque<_Tp, _Alloc>& __x,
+                       const deque<_Tp, _Alloc>& __y) {
+  return __x.size() == __y.size() &&
+         equal(__x.begin(), __x.end(), __y.begin());
+}
+
+template 
+inline bool operator<(const deque<_Tp, _Alloc>& __x,
+                      const deque<_Tp, _Alloc>& __y) {
+  return lexicographical_compare(__x.begin(), __x.end(), 
+                                 __y.begin(), __y.end());
+}
+
+template 
+inline bool operator!=(const deque<_Tp, _Alloc>& __x,
+                       const deque<_Tp, _Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator>(const deque<_Tp, _Alloc>& __x,
+                      const deque<_Tp, _Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<=(const deque<_Tp, _Alloc>& __x,
+                       const deque<_Tp, _Alloc>& __y) {
+  return !(__y < __x);
+}
+template 
+inline bool operator>=(const deque<_Tp, _Alloc>& __x,
+                       const deque<_Tp, _Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline void swap(deque<_Tp,_Alloc>& __x, deque<_Tp,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+} // namespace std 
+  
+#endif /* __GLIBCPP_INTERNAL_DEQUE_H */
+
diff --git a/contrib/libstdc++/include/bits/stl_function.h b/contrib/libstdc++/include/bits/stl_function.h
new file mode 100644
index 0000000..9ea975d
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_function.h
@@ -0,0 +1,736 @@
+// Functor implementations -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_function.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_FUNCTION_H
+#define __GLIBCPP_INTERNAL_FUNCTION_H
+
+namespace std
+{
+// 20.3.1 base classes
+/** @defgroup s20_3_1_base Functor Base Classes
+ *  Function objects, or @e functors, are objects with an @c operator()
+ *  defined and accessible.  They can be passed as arguments to algorithm
+ *  templates and used in place of a function pointer.  Not only is the
+ *  resulting expressiveness of the library increased, but the generated
+ *  code can be more efficient than what you might write by hand.  When we
+ *  refer to "functors," then, generally we include function pointers in
+ *  the description as well.
+ *
+ *  Often, functors are only created as temporaries passed to algorithm
+ *  calls, rather than being created as named variables.
+ *
+ *  Two examples taken from the standard itself follow.  To perform a
+ *  by-element addition of two vectors @c a and @c b containing @c double,
+ *  and put the result in @c a, use
+ *  \code
+ *  transform (a.begin(), a.end(), b.begin(), a.begin(), plus());
+ *  \endcode
+ *  To negate every element in @c a, use
+ *  \code
+ *  transform(a.begin(), a.end(), a.begin(), negate());
+ *  \endcode
+ *  The addition and negation functions will be inlined directly.
+ *
+ *  The standard functiors are derived from structs named @c unary_function
+ *  and @c binary_function.  These two classes contain nothing but typedefs,
+ *  to aid in generic (template) programming.  If you write your own
+ *  functors, you might consider doing the same.
+ *
+ *  @{
+*/
+/**
+ *  This is one of the @link s20_3_1_base functor base classes@endlink.
+*/
+template 
+struct unary_function {
+  typedef _Arg argument_type;   ///< @c argument_type is the type of the argument (no surprises here)
+  typedef _Result result_type;  ///< @c result_type is the return type
+};
+
+/**
+ *  This is one of the @link s20_3_1_base functor base classes@endlink.
+*/
+template 
+struct binary_function {
+  typedef _Arg1 first_argument_type;   ///< the type of the first argument (no surprises here)
+  typedef _Arg2 second_argument_type;  ///< the type of the second argument
+  typedef _Result result_type;         ///< type of the return type
+};      
+/** @}  */
+
+// 20.3.2 arithmetic
+/** @defgroup s20_3_2_arithmetic Arithmetic Classes
+ *  Because basic math often needs to be done during an algorithm, the library
+ *  provides functors for those operations.  See the documentation for
+ *  @link s20_3_1_base the base classes@endlink for examples of their use.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_2_arithmetic math functors@endlink.
+template 
+struct plus : public binary_function<_Tp,_Tp,_Tp> {
+  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x + __y; }
+};
+
+/// One of the @link s20_3_2_arithmetic math functors@endlink.
+template 
+struct minus : public binary_function<_Tp,_Tp,_Tp> {
+  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x - __y; }
+};
+
+/// One of the @link s20_3_2_arithmetic math functors@endlink.
+template 
+struct multiplies : public binary_function<_Tp,_Tp,_Tp> {
+  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x * __y; }
+};
+
+/// One of the @link s20_3_2_arithmetic math functors@endlink.
+template 
+struct divides : public binary_function<_Tp,_Tp,_Tp> {
+  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x / __y; }
+};
+
+/// One of the @link s20_3_2_arithmetic math functors@endlink.
+template 
+struct modulus : public binary_function<_Tp,_Tp,_Tp> 
+{
+  _Tp operator()(const _Tp& __x, const _Tp& __y) const { return __x % __y; }
+};
+
+/// One of the @link s20_3_2_arithmetic math functors@endlink.
+template 
+struct negate : public unary_function<_Tp,_Tp> 
+{
+  _Tp operator()(const _Tp& __x) const { return -__x; }
+};
+/** @}  */
+
+// 20.3.3 comparisons
+/** @defgroup s20_3_3_comparisons Comparison Classes
+ *  The library provides six wrapper functors for all the basic comparisons
+ *  in C++, like @c <.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_3_comparisons comparison functors@endlink.
+template 
+struct equal_to : public binary_function<_Tp,_Tp,bool> 
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x == __y; }
+};
+
+/// One of the @link s20_3_3_comparisons comparison functors@endlink.
+template 
+struct not_equal_to : public binary_function<_Tp,_Tp,bool> 
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x != __y; }
+};
+
+/// One of the @link s20_3_3_comparisons comparison functors@endlink.
+template 
+struct greater : public binary_function<_Tp,_Tp,bool> 
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x > __y; }
+};
+
+/// One of the @link s20_3_3_comparisons comparison functors@endlink.
+template 
+struct less : public binary_function<_Tp,_Tp,bool> 
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x < __y; }
+};
+
+/// One of the @link s20_3_3_comparisons comparison functors@endlink.
+template 
+struct greater_equal : public binary_function<_Tp,_Tp,bool>
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x >= __y; }
+};
+
+/// One of the @link s20_3_3_comparisons comparison functors@endlink.
+template 
+struct less_equal : public binary_function<_Tp,_Tp,bool> 
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x <= __y; }
+};
+/** @}  */
+
+// 20.3.4 logical operations
+/** @defgroup s20_3_4_logical Boolean Operations Classes
+ *  Here are wrapper functors for Boolean operations:  @c &&, @c ||, and @c !.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
+template 
+struct logical_and : public binary_function<_Tp,_Tp,bool>
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x && __y; }
+};
+
+/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
+template 
+struct logical_or : public binary_function<_Tp,_Tp,bool>
+{
+  bool operator()(const _Tp& __x, const _Tp& __y) const { return __x || __y; }
+};
+
+/// One of the @link s20_3_4_logical Boolean operations functors@endlink.
+template 
+struct logical_not : public unary_function<_Tp,bool>
+{
+  bool operator()(const _Tp& __x) const { return !__x; }
+};
+/** @}  */
+
+// 20.3.5 negators
+/** @defgroup s20_3_5_negators Negators
+ *  The functions @c not1 and @c not2 each take a predicate functor
+ *  and return an instance of @c unary_negate or
+ *  @c binary_negate, respectively.  These classes are functors whose
+ *  @c operator() performs the stored predicate function and then returns
+ *  the negation of the result.
+ *
+ *  For example, given a vector of integers and a trivial predicate,
+ *  \code
+ *  struct IntGreaterThanThree
+ *    : public std::unary_function
+ *  {
+ *      bool operator() (int x) { return x > 3; }
+ *  };
+ *  
+ *  std::find_if (v.begin(), v.end(), not1(IntGreaterThanThree()));
+ *  \endcode
+ *  The call to @c find_if will locate the first index (i) of @c v for which
+ *  "!(v[i] > 3)" is true.
+ *
+ *  The not1/unary_negate combination works on predicates taking a single
+ *  argument.  The not2/binary_negate combination works on predicates which
+ *  take two arguments.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_5_negators negation functors@endlink.
+template 
+class unary_negate
+  : public unary_function {
+protected:
+  _Predicate _M_pred;
+public:
+  explicit unary_negate(const _Predicate& __x) : _M_pred(__x) {}
+  bool operator()(const typename _Predicate::argument_type& __x) const {
+    return !_M_pred(__x);
+  }
+};
+
+/// One of the @link s20_3_5_negators negation functors@endlink.
+template 
+inline unary_negate<_Predicate> 
+not1(const _Predicate& __pred)
+{
+  return unary_negate<_Predicate>(__pred);
+}
+
+/// One of the @link s20_3_5_negators negation functors@endlink.
+template  
+class binary_negate 
+  : public binary_function {
+protected:
+  _Predicate _M_pred;
+public:
+  explicit binary_negate(const _Predicate& __x) : _M_pred(__x) {}
+  bool operator()(const typename _Predicate::first_argument_type& __x, 
+                  const typename _Predicate::second_argument_type& __y) const
+  {
+    return !_M_pred(__x, __y); 
+  }
+};
+
+/// One of the @link s20_3_5_negators negation functors@endlink.
+template 
+inline binary_negate<_Predicate> 
+not2(const _Predicate& __pred)
+{
+  return binary_negate<_Predicate>(__pred);
+}
+/** @}  */
+
+// 20.3.6 binders
+/** @defgroup s20_3_6_binder Binder Classes
+ *  Binders turn functions/functors with two arguments into functors with
+ *  a single argument, storing an argument to be applied later.  For
+ *  example, an variable @c B of type @c binder1st is constructed from a functor
+ *  @c f and an argument @c x.  Later, B's @c operator() is called with a
+ *  single argument @c y.  The return value is the value of @c f(x,y).
+ *  @c B can be "called" with various arguments (y1, y2, ...) and will in
+ *  turn call @c f(x,y1), @c f(x,y2), ...
+ *
+ *  The function @c bind1st is provided to save some typing.  It takes the
+ *  function and an argument as parameters, and returns an instance of
+ *  @c binder1st.
+ *
+ *  The type @c binder2nd and its creator function @c bind2nd do the same
+ *  thing, but the stored argument is passed as the second parameter instead
+ *  of the first, e.g., @c bind2nd(std::minus,1.3) will create a
+ *  functor whose @c operator() accepts a floating-point number, subtracts
+ *  1.3 from it, and returns the result.  (If @c bind1st had been used,
+ *  the functor would perform "1.3 - x" instead.
+ *
+ *  Creator-wrapper functions like @c bind1st are intended to be used in
+ *  calling algorithms.  Their return values will be temporary objects.
+ *  (The goal is to not require you to type names like
+ *  @c std::binder1st> for declaring a variable to hold the
+ *  return value from @c bind1st(std::plus,5).
+ *
+ *  These become more useful when combined with the composition functions.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_6_binder binder functors@endlink.
+template  
+class binder1st
+  : public unary_function {
+protected:
+  _Operation op;
+  typename _Operation::first_argument_type value;
+public:
+  binder1st(const _Operation& __x,
+            const typename _Operation::first_argument_type& __y)
+      : op(__x), value(__y) {}
+  typename _Operation::result_type
+  operator()(const typename _Operation::second_argument_type& __x) const {
+    return op(value, __x); 
+  }
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+  //109.  Missing binders for non-const sequence elements
+  typename _Operation::result_type
+  operator()(typename _Operation::second_argument_type& __x) const {
+    return op(value, __x); 
+  }
+#endif
+};
+
+/// One of the @link s20_3_6_binder binder functors@endlink.
+template 
+inline binder1st<_Operation> 
+bind1st(const _Operation& __fn, const _Tp& __x) 
+{
+  typedef typename _Operation::first_argument_type _Arg1_type;
+  return binder1st<_Operation>(__fn, _Arg1_type(__x));
+}
+
+/// One of the @link s20_3_6_binder binder functors@endlink.
+template  
+class binder2nd
+  : public unary_function {
+protected:
+  _Operation op;
+  typename _Operation::second_argument_type value;
+public:
+  binder2nd(const _Operation& __x,
+            const typename _Operation::second_argument_type& __y) 
+      : op(__x), value(__y) {}
+  typename _Operation::result_type
+  operator()(const typename _Operation::first_argument_type& __x) const {
+    return op(__x, value); 
+  }
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+  //109.  Missing binders for non-const sequence elements
+  typename _Operation::result_type
+  operator()(typename _Operation::first_argument_type& __x) const {
+    return op(__x, value); 
+  }
+#endif
+};
+
+/// One of the @link s20_3_6_binder binder functors@endlink.
+template 
+inline binder2nd<_Operation> 
+bind2nd(const _Operation& __fn, const _Tp& __x) 
+{
+  typedef typename _Operation::second_argument_type _Arg2_type;
+  return binder2nd<_Operation>(__fn, _Arg2_type(__x));
+}
+/** @}  */
+
+// 20.3.7 adaptors pointers functions
+/** @defgroup s20_3_7_adaptors Adaptors for pointers to functions
+ *  The advantage of function objects over pointers to functions is that
+ *  the objects in the standard library declare nested typedefs describing
+ *  their argument and result types with uniform names (e.g., @c result_type
+ *  from the base classes @c unary_function and @c binary_function).
+ *  Sometimes those typedefs are required, not just optional.
+ *
+ *  Adaptors are provided to turn pointers to unary (single-argument) and
+ *  binary (double-argument) functions into function objects.  The long-winded
+ *  functor @c pointer_to_unary_function is constructed with a function
+ *  pointer @c f, and its @c operator() called with argument @c x returns
+ *  @c f(x).  The functor @c pointer_to_binary_function does the same thing,
+ *  but with a double-argument @c f and @c operator().
+ *
+ *  The function @c ptr_fun takes a pointer-to-function @c f and constructs
+ *  an instance of the appropriate functor.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+template 
+class pointer_to_unary_function : public unary_function<_Arg, _Result> {
+protected:
+  _Result (*_M_ptr)(_Arg);
+public:
+  pointer_to_unary_function() {}
+  explicit pointer_to_unary_function(_Result (*__x)(_Arg)) : _M_ptr(__x) {}
+  _Result operator()(_Arg __x) const { return _M_ptr(__x); }
+};
+
+/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+template 
+inline pointer_to_unary_function<_Arg, _Result> ptr_fun(_Result (*__x)(_Arg))
+{
+  return pointer_to_unary_function<_Arg, _Result>(__x);
+}
+
+/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+template 
+class pointer_to_binary_function : 
+  public binary_function<_Arg1,_Arg2,_Result> {
+protected:
+    _Result (*_M_ptr)(_Arg1, _Arg2);
+public:
+    pointer_to_binary_function() {}
+    explicit pointer_to_binary_function(_Result (*__x)(_Arg1, _Arg2)) 
+      : _M_ptr(__x) {}
+    _Result operator()(_Arg1 __x, _Arg2 __y) const {
+      return _M_ptr(__x, __y);
+    }
+};
+
+/// One of the @link s20_3_7_adaptors adaptors for function pointers@endlink.
+template 
+inline pointer_to_binary_function<_Arg1,_Arg2,_Result> 
+ptr_fun(_Result (*__x)(_Arg1, _Arg2)) {
+  return pointer_to_binary_function<_Arg1,_Arg2,_Result>(__x);
+}
+/** @}  */
+
+template 
+struct _Identity : public unary_function<_Tp,_Tp> {
+  _Tp& operator()(_Tp& __x) const { return __x; }
+  const _Tp& operator()(const _Tp& __x) const { return __x; }
+};
+
+template 
+struct _Select1st : public unary_function<_Pair, typename _Pair::first_type> {
+  typename _Pair::first_type& operator()(_Pair& __x) const {
+    return __x.first;
+  }
+  const typename _Pair::first_type& operator()(const _Pair& __x) const {
+    return __x.first;
+  }
+};
+
+template 
+struct _Select2nd : public unary_function<_Pair, typename _Pair::second_type>
+{
+  typename _Pair::second_type& operator()(_Pair& __x) const {
+    return __x.second;
+  }
+  const typename _Pair::second_type& operator()(const _Pair& __x) const {
+    return __x.second;
+  }
+};
+
+// 20.3.8 adaptors pointers members
+/** @defgroup s20_3_8_memadaptors Adaptors for pointers to members
+ *  There are a total of 16 = 2^4 function objects in this family.
+ *   (1) Member functions taking no arguments vs member functions taking
+ *        one argument.
+ *   (2) Call through pointer vs call through reference.
+ *   (3) Member function with void return type vs member function with
+ *       non-void return type.
+ *   (4) Const vs non-const member function.
+ *
+ *  Note that choice (3) is nothing more than a workaround: according
+ *   to the draft, compilers should handle void and non-void the same way.
+ *   This feature is not yet widely implemented, though.  You can only use
+ *   member functions returning void if your compiler supports partial
+ *   specialization.
+ *
+ *  All of this complexity is in the function objects themselves.  You can
+ *   ignore it by using the helper function mem_fun and mem_fun_ref,
+ *   which create whichever type of adaptor is appropriate.
+ *
+ *  @{
+*/
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun_t : public unary_function<_Tp*,_Ret> {
+public:
+  explicit mem_fun_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {}
+  _Ret operator()(_Tp* __p) const { return (__p->*_M_f)(); }
+private:
+  _Ret (_Tp::*_M_f)();
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun_t : public unary_function {
+public:
+  explicit const_mem_fun_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
+  _Ret operator()(const _Tp* __p) const { return (__p->*_M_f)(); }
+private:
+  _Ret (_Tp::*_M_f)() const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun_ref_t : public unary_function<_Tp,_Ret> {
+public:
+  explicit mem_fun_ref_t(_Ret (_Tp::*__pf)()) : _M_f(__pf) {}
+  _Ret operator()(_Tp& __r) const { return (__r.*_M_f)(); }
+private:
+  _Ret (_Tp::*_M_f)();
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun_ref_t : public unary_function<_Tp,_Ret> {
+public:
+  explicit const_mem_fun_ref_t(_Ret (_Tp::*__pf)() const) : _M_f(__pf) {}
+  _Ret operator()(const _Tp& __r) const { return (__r.*_M_f)(); }
+private:
+  _Ret (_Tp::*_M_f)() const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun1_t : public binary_function<_Tp*,_Arg,_Ret> {
+public:
+  explicit mem_fun1_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
+  _Ret operator()(_Tp* __p, _Arg __x) const { return (__p->*_M_f)(__x); }
+private:
+  _Ret (_Tp::*_M_f)(_Arg);
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun1_t : public binary_function {
+public:
+  explicit const_mem_fun1_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
+  _Ret operator()(const _Tp* __p, _Arg __x) const
+    { return (__p->*_M_f)(__x); }
+private:
+  _Ret (_Tp::*_M_f)(_Arg) const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
+public:
+  explicit mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
+  _Ret operator()(_Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
+private:
+  _Ret (_Tp::*_M_f)(_Arg);
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun1_ref_t : public binary_function<_Tp,_Arg,_Ret> {
+public:
+  explicit const_mem_fun1_ref_t(_Ret (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
+  _Ret operator()(const _Tp& __r, _Arg __x) const { return (__r.*_M_f)(__x); }
+private:
+  _Ret (_Tp::*_M_f)(_Arg) const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun_t : public unary_function<_Tp*,void> {
+public:
+  explicit mem_fun_t(void (_Tp::*__pf)()) : _M_f(__pf) {}
+  void operator()(_Tp* __p) const { (__p->*_M_f)(); }
+private:
+  void (_Tp::*_M_f)();
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun_t : public unary_function {
+public:
+  explicit const_mem_fun_t(void (_Tp::*__pf)() const) : _M_f(__pf) {}
+  void operator()(const _Tp* __p) const { (__p->*_M_f)(); }
+private:
+  void (_Tp::*_M_f)() const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun_ref_t : public unary_function<_Tp,void> {
+public:
+  explicit mem_fun_ref_t(void (_Tp::*__pf)()) : _M_f(__pf) {}
+  void operator()(_Tp& __r) const { (__r.*_M_f)(); }
+private:
+  void (_Tp::*_M_f)();
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun_ref_t : public unary_function<_Tp,void> {
+public:
+  explicit const_mem_fun_ref_t(void (_Tp::*__pf)() const) : _M_f(__pf) {}
+  void operator()(const _Tp& __r) const { (__r.*_M_f)(); }
+private:
+  void (_Tp::*_M_f)() const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun1_t : public binary_function<_Tp*,_Arg,void> {
+public:
+  explicit mem_fun1_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
+  void operator()(_Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
+private:
+  void (_Tp::*_M_f)(_Arg);
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun1_t 
+  : public binary_function {
+public:
+  explicit const_mem_fun1_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
+  void operator()(const _Tp* __p, _Arg __x) const { (__p->*_M_f)(__x); }
+private:
+  void (_Tp::*_M_f)(_Arg) const;
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class mem_fun1_ref_t
+  : public binary_function<_Tp,_Arg,void> {
+public:
+  explicit mem_fun1_ref_t(void (_Tp::*__pf)(_Arg)) : _M_f(__pf) {}
+  void operator()(_Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
+private:
+  void (_Tp::*_M_f)(_Arg);
+};
+
+/// One of the @link s20_3_8_memadaptors adaptors for member pointers@endlink.
+template 
+class const_mem_fun1_ref_t
+  : public binary_function<_Tp,_Arg,void> {
+public:
+  explicit const_mem_fun1_ref_t(void (_Tp::*__pf)(_Arg) const) : _M_f(__pf) {}
+  void operator()(const _Tp& __r, _Arg __x) const { (__r.*_M_f)(__x); }
+private:
+  void (_Tp::*_M_f)(_Arg) const;
+};
+
+
+// Mem_fun adaptor helper functions.  There are only two:
+// mem_fun and mem_fun_ref.
+
+template 
+inline mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)())
+  { return mem_fun_t<_Ret,_Tp>(__f); }
+
+template 
+inline const_mem_fun_t<_Ret,_Tp> mem_fun(_Ret (_Tp::*__f)() const)
+  { return const_mem_fun_t<_Ret,_Tp>(__f); }
+
+template 
+inline mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)()) 
+  { return mem_fun_ref_t<_Ret,_Tp>(__f); }
+
+template 
+inline const_mem_fun_ref_t<_Ret,_Tp> mem_fun_ref(_Ret (_Tp::*__f)() const)
+  { return const_mem_fun_ref_t<_Ret,_Tp>(__f); }
+
+template 
+inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg))
+  { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
+
+template 
+inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun(_Ret (_Tp::*__f)(_Arg) const)
+  { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
+
+template 
+inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun_ref(_Ret (_Tp::*__f)(_Arg))
+  { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
+
+template 
+inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
+mem_fun_ref(_Ret (_Tp::*__f)(_Arg) const)
+  { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
+
+/** @}  */
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_FUNCTION_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_heap.h b/contrib/libstdc++/include/bits/stl_heap.h
new file mode 100644
index 0000000..c19195a
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_heap.h
@@ -0,0 +1,308 @@
+// Heap implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_heap.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_HEAP_H
+#define _CPP_BITS_STL_HEAP_H 1
+
+namespace std
+{
+
+  // Heap-manipulation functions: push_heap, pop_heap, make_heap, sort_heap.
+
+  template
+    void 
+    __push_heap(_RandomAccessIterator __first,
+		_Distance __holeIndex, _Distance __topIndex, _Tp __value)
+    {
+      _Distance __parent = (__holeIndex - 1) / 2;
+      while (__holeIndex > __topIndex && *(__first + __parent) < __value) {
+	*(__first + __holeIndex) = *(__first + __parent);
+	__holeIndex = __parent;
+	__parent = (__holeIndex - 1) / 2;
+      }    
+      *(__first + __holeIndex) = __value;
+    }
+
+  template
+    inline void 
+    push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      __push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), 
+		  _ValueType(*(__last - 1)));
+    }
+
+  template
+    void
+    __push_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+		_Distance __topIndex, _Tp __value, _Compare __comp)
+    {
+      _Distance __parent = (__holeIndex - 1) / 2;
+      while (__holeIndex > __topIndex && __comp(*(__first + __parent), __value)) {
+	*(__first + __holeIndex) = *(__first + __parent);
+	__holeIndex = __parent;
+	__parent = (__holeIndex - 1) / 2;
+      }
+      *(__first + __holeIndex) = __value;
+    }
+
+  template
+    inline void 
+    push_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+
+      __push_heap(__first, _DistanceType((__last - __first) - 1), _DistanceType(0), 
+		  _ValueType(*(__last - 1)), __comp);
+    }
+
+  template
+    void 
+    __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+		  _Distance __len, _Tp __value)
+    {
+      _Distance __topIndex = __holeIndex;
+      _Distance __secondChild = 2 * __holeIndex + 2;
+      while (__secondChild < __len) {
+	if (*(__first + __secondChild) < *(__first + (__secondChild - 1)))
+	  __secondChild--;
+	*(__first + __holeIndex) = *(__first + __secondChild);
+	__holeIndex = __secondChild;
+	__secondChild = 2 * (__secondChild + 1);
+      }
+      if (__secondChild == __len) {
+	*(__first + __holeIndex) = *(__first + (__secondChild - 1));
+	__holeIndex = __secondChild - 1;
+      }
+      __push_heap(__first, __holeIndex, __topIndex, __value);
+    }
+
+  template
+    inline void 
+    __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	       _RandomAccessIterator __result, _Tp __value)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance;
+      *__result = *__first;
+      __adjust_heap(__first, _Distance(0), _Distance(__last - __first), __value);
+    }
+
+  template
+    inline void
+    pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      __pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)));
+    }
+
+  template
+    void
+    __adjust_heap(_RandomAccessIterator __first, _Distance __holeIndex,
+		  _Distance __len, _Tp __value, _Compare __comp)
+    {
+      _Distance __topIndex = __holeIndex;
+      _Distance __secondChild = 2 * __holeIndex + 2;
+      while (__secondChild < __len) {
+	if (__comp(*(__first + __secondChild), *(__first + (__secondChild - 1))))
+	  __secondChild--;
+	*(__first + __holeIndex) = *(__first + __secondChild);
+	__holeIndex = __secondChild;
+	__secondChild = 2 * (__secondChild + 1);
+      }
+      if (__secondChild == __len) {
+	*(__first + __holeIndex) = *(__first + (__secondChild - 1));
+	__holeIndex = __secondChild - 1;
+      }
+      __push_heap(__first, __holeIndex, __topIndex, __value, __comp);
+    }
+
+  template
+    inline void 
+    __pop_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	       _RandomAccessIterator __result, _Tp __value, _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type _Distance;
+      *__result = *__first;
+      __adjust_heap(__first, _Distance(0), _Distance(__last - __first), 
+		    __value, __comp);
+    }
+
+  template
+    inline void 
+    pop_heap(_RandomAccessIterator __first,
+	     _RandomAccessIterator __last, _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type _ValueType;
+      __pop_heap(__first, __last - 1, __last - 1, _ValueType(*(__last - 1)), __comp);
+    }
+
+  template
+    void 
+    make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcpp_function_requires(_LessThanComparableConcept<_ValueType>)
+
+      if (__last - __first < 2) return;
+      _DistanceType __len = __last - __first;
+      _DistanceType __parent = (__len - 2)/2;
+	
+      while (true) {
+	__adjust_heap(__first, __parent, __len, _ValueType(*(__first + __parent)));
+	if (__parent == 0) return;
+	__parent--;
+      }
+    }
+
+  template
+    inline void 
+    make_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    {
+      typedef typename iterator_traits<_RandomAccessIterator>::value_type
+	  _ValueType;
+      typedef typename iterator_traits<_RandomAccessIterator>::difference_type
+	  _DistanceType;
+
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+
+      if (__last - __first < 2) return;
+      _DistanceType __len = __last - __first;
+      _DistanceType __parent = (__len - 2)/2;
+	
+      while (true) {
+	__adjust_heap(__first, __parent, __len,
+	              _ValueType(*(__first + __parent)), __comp);
+	if (__parent == 0) return;
+	__parent--;
+      }
+    }
+
+  template
+    void
+    sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_RandomAccessIterator>::value_type>)
+
+      while (__last - __first > 1)
+	pop_heap(__first, __last--);
+    }
+
+  template
+    void 
+    sort_heap(_RandomAccessIterator __first, _RandomAccessIterator __last,
+	      _Compare __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIterator>)
+
+      while (__last - __first > 1)
+	pop_heap(__first, __last--, __comp);
+    }
+
+} // namespace std
+
+#endif /* _CPP_BITS_STL_HEAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_iterator.h b/contrib/libstdc++/include/bits/stl_iterator.h
new file mode 100644
index 0000000..d8a6d8c
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_iterator.h
@@ -0,0 +1,733 @@
+// Iterators -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_iterator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  This file implements reverse_iterator, back_insert_iterator,
+ *  front_insert_iterator, insert_iterator, __normal_iterator, and their
+ *  supporting functions and overloaded operators.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_ITERATOR_H
+#define __GLIBCPP_INTERNAL_ITERATOR_H
+
+namespace std
+{
+  // 24.4.1 Reverse iterators
+  /**
+   *  "Bidirectional and random access iterators have corresponding reverse
+   *  %iterator adaptors that iterate through the data structure in the
+   *  opposite direction.  They have the same signatures as the corresponding
+   *  iterators.  The fundamental relation between a reverse %iterator and its
+   *  corresponding %iterator @c i is established by the identity:
+   *  @code
+   *      &*(reverse_iterator(i)) == &*(i - 1)
+   *  @endcode
+   *
+   *  This mapping is dictated by the fact that while there is always a
+   *  pointer past the end of an array, there might not be a valid pointer
+   *  before the beginning of an array." [24.4.1]/1,2
+   *
+   *  Reverse iterators can be tricky and surprising at first.  Their
+   *  semantics make sense, however, and the trickiness is a side effect of
+   *  the requirement that the iterators must be safe.
+  */
+  template
+    class reverse_iterator 
+    : public iterator::iterator_category,
+		      typename iterator_traits<_Iterator>::value_type,
+		      typename iterator_traits<_Iterator>::difference_type,
+		      typename iterator_traits<_Iterator>::pointer,
+                      typename iterator_traits<_Iterator>::reference>
+    {
+    protected:
+      _Iterator current;
+
+    public:
+      typedef _Iterator 				       iterator_type;
+      typedef typename iterator_traits<_Iterator>::difference_type 	
+      							       difference_type;
+      typedef typename iterator_traits<_Iterator>::reference   reference;
+      typedef typename iterator_traits<_Iterator>::pointer     pointer;
+
+    public:
+      /**
+       *  The default constructor gives an undefined state to this %iterator.
+      */
+      reverse_iterator() { }
+
+      /**
+       *  This %iterator will move in the opposite direction that @p x does.
+      */
+      explicit 
+      reverse_iterator(iterator_type __x) : current(__x) { }
+
+      /**
+       *  The copy constructor is normal.
+      */
+      reverse_iterator(const reverse_iterator& __x) 
+      : current(__x.current) { }
+
+      /**
+       *  A reverse_iterator across other types can be copied in the normal
+       *  fashion.
+      */
+      template
+        reverse_iterator(const reverse_iterator<_Iter>& __x)
+	: current(__x.base()) { }
+    
+      /**
+       *  @return  @c current, the %iterator used for underlying work.
+      */
+      iterator_type 
+      base() const { return current; }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reference 
+      operator*() const 
+      {
+	_Iterator __tmp = current;
+	return *--__tmp;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      pointer 
+      operator->() const { return &(operator*()); }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator& 
+      operator++() 
+      {
+	--current;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator 
+      operator++(int) 
+      {
+	reverse_iterator __tmp = *this;
+	--current;
+	return __tmp;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator& 
+      operator--() 
+      {
+	++current;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator operator--(int) 
+      {
+	reverse_iterator __tmp = *this;
+	++current;
+	return __tmp;
+      }
+      
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator 
+      operator+(difference_type __n) const 
+      { return reverse_iterator(current - __n); }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator& 
+      operator+=(difference_type __n) 
+      {
+	current -= __n;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator 
+      operator-(difference_type __n) const 
+      { return reverse_iterator(current + __n); }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reverse_iterator& 
+      operator-=(difference_type __n) 
+      {
+	current += __n;
+	return *this;
+      }
+
+      /**
+       *  @return  TODO
+       *
+       *  @doctodo
+      */
+      reference 
+      operator[](difference_type __n) const { return *(*this + __n); }  
+    }; 
+ 
+  //@{
+  /**
+   *  @param  x  A %reverse_iterator.
+   *  @param  y  A %reverse_iterator.
+   *  @return  A simple bool.
+   *
+   *  Reverse iterators forward many operations to their underlying base()
+   *  iterators.  Others are implemented in terms of one another.
+   *
+  */
+  template
+    inline bool 
+    operator==(const reverse_iterator<_Iterator>& __x, 
+	       const reverse_iterator<_Iterator>& __y) 
+    { return __x.base() == __y.base(); }
+
+  template
+    inline bool 
+    operator<(const reverse_iterator<_Iterator>& __x, 
+	      const reverse_iterator<_Iterator>& __y) 
+    { return __y.base() < __x.base(); }
+
+  template
+    inline bool 
+    operator!=(const reverse_iterator<_Iterator>& __x, 
+	       const reverse_iterator<_Iterator>& __y) 
+    { return !(__x == __y); }
+
+  template
+    inline bool 
+    operator>(const reverse_iterator<_Iterator>& __x, 
+	      const reverse_iterator<_Iterator>& __y) 
+    { return __y < __x; }
+
+  template
+    inline bool 
+    operator<=(const reverse_iterator<_Iterator>& __x, 
+		const reverse_iterator<_Iterator>& __y) 
+    { return !(__y < __x); }
+
+  template
+    inline bool 
+    operator>=(const reverse_iterator<_Iterator>& __x, 
+	       const reverse_iterator<_Iterator>& __y) 
+    { return !(__x < __y); }
+
+  template
+    inline typename reverse_iterator<_Iterator>::difference_type
+    operator-(const reverse_iterator<_Iterator>& __x, 
+	      const reverse_iterator<_Iterator>& __y) 
+    { return __y.base() - __x.base(); }
+
+  template
+    inline reverse_iterator<_Iterator> 
+    operator+(typename reverse_iterator<_Iterator>::difference_type __n,
+	      const reverse_iterator<_Iterator>& __x) 
+    { return reverse_iterator<_Iterator>(__x.base() - __n); }
+  //@}
+
+  // 24.4.2.2.1 back_insert_iterator
+  /**
+   *  These are output iterators, constructed from a container-of-T.
+   *  Assigning a T to the iterator appends it to the container using
+   *  push_back.
+   *
+   *  Tip:  Using the back_inserter function to create these iterators can
+   *  save typing.
+  */
+  template
+    class back_insert_iterator 
+    : public iterator
+    {
+    protected:
+      _Container* container;
+
+    public:
+      /// A nested typedef for the type of whatever container you used.
+      typedef _Container          container_type;
+      
+      /// The only way to create this %iterator is with a container.
+      explicit 
+      back_insert_iterator(_Container& __x) : container(&__x) { }
+
+      /**
+       *  @param  value  An instance of whatever type
+       *                 container_type::const_reference is; presumably a
+       *                 reference-to-const T for container.
+       *  @return  This %iterator, for chained operations.
+       *
+       *  This kind of %iterator doesn't really have a "position" in the
+       *  container (you can think of the position as being permanently at
+       *  the end, if you like).  Assigning a value to the %iterator will
+       *  always append the value to the end of the container.
+      */
+      back_insert_iterator&
+      operator=(typename _Container::const_reference __value) 
+      { 
+	container->push_back(__value);
+	return *this;
+      }
+
+      /// Simply returns *this.
+      back_insert_iterator& 
+      operator*() { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not "move".)
+      back_insert_iterator& 
+      operator++() { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not "move".)
+      back_insert_iterator
+      operator++(int) { return *this; }
+    };
+
+  /**
+   *  @param  x  A container of arbitrary type.
+   *  @return  An instance of back_insert_iterator working on @p x.
+   *
+   *  This wrapper function helps in creating back_insert_iterator instances.
+   *  Typing the name of the %iterator requires knowing the precise full
+   *  type of the container, which can be tedious and impedes generic
+   *  programming.  Using this function lets you take advantage of automatic
+   *  template parameter deduction, making the compiler match the correct
+   *  types for you.
+  */
+  template
+    inline back_insert_iterator<_Container> 
+    back_inserter(_Container& __x) 
+    { return back_insert_iterator<_Container>(__x); }
+
+  /**
+   *  These are output iterators, constructed from a container-of-T.
+   *  Assigning a T to the iterator prepends it to the container using
+   *  push_front.
+   *
+   *  Tip:  Using the front_inserter function to create these iterators can
+   *  save typing.
+  */
+  template
+    class front_insert_iterator 
+    : public iterator
+    {
+    protected:
+      _Container* container;
+
+    public:
+      /// A nested typedef for the type of whatever container you used.
+      typedef _Container          container_type;
+
+      /// The only way to create this %iterator is with a container.
+      explicit front_insert_iterator(_Container& __x) : container(&__x) { }
+
+      /**
+       *  @param  value  An instance of whatever type
+       *                 container_type::const_reference is; presumably a
+       *                 reference-to-const T for container.
+       *  @return  This %iterator, for chained operations.
+       *
+       *  This kind of %iterator doesn't really have a "position" in the
+       *  container (you can think of the position as being permanently at
+       *  the front, if you like).  Assigning a value to the %iterator will
+       *  always prepend the value to the front of the container.
+      */
+      front_insert_iterator&
+      operator=(typename _Container::const_reference __value) 
+      { 
+	container->push_front(__value);
+	return *this;
+      }
+
+      /// Simply returns *this.
+      front_insert_iterator& 
+      operator*() { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not "move".)
+      front_insert_iterator& 
+      operator++() { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not "move".)
+      front_insert_iterator 
+      operator++(int) { return *this; }
+    };
+
+  /**
+   *  @param  x  A container of arbitrary type.
+   *  @return  An instance of front_insert_iterator working on @p x.
+   *
+   *  This wrapper function helps in creating front_insert_iterator instances.
+   *  Typing the name of the %iterator requires knowing the precise full
+   *  type of the container, which can be tedious and impedes generic
+   *  programming.  Using this function lets you take advantage of automatic
+   *  template parameter deduction, making the compiler match the correct
+   *  types for you.
+  */
+  template
+    inline front_insert_iterator<_Container> 
+    front_inserter(_Container& __x) 
+    { return front_insert_iterator<_Container>(__x); }
+
+  /**
+   *  These are output iterators, constructed from a container-of-T.
+   *  Assigning a T to the iterator inserts it in the container at the
+   *  %iterator's position, rather than overwriting the value at that
+   *  position.
+   *
+   *  (Sequences will actually insert a @e copy of the value before the
+   *  %iterator's position.)
+   *
+   *  Tip:  Using the inserter function to create these iterators can
+   *  save typing.
+  */
+  template
+    class insert_iterator 
+    : public iterator
+    {
+    protected:
+      _Container* container;
+      typename _Container::iterator iter;
+
+    public:
+      /// A nested typedef for the type of whatever container you used.
+      typedef _Container          container_type;
+      
+      /**
+       *  The only way to create this %iterator is with a container and an
+       *  initial position (a normal %iterator into the container).
+      */
+      insert_iterator(_Container& __x, typename _Container::iterator __i) 
+      : container(&__x), iter(__i) {}
+   
+      /**
+       *  @param  value  An instance of whatever type
+       *                 container_type::const_reference is; presumably a
+       *                 reference-to-const T for container.
+       *  @return  This %iterator, for chained operations.
+       *
+       *  This kind of %iterator maintains its own position in the
+       *  container.  Assigning a value to the %iterator will insert the
+       *  value into the container at the place before the %iterator.
+       *
+       *  The position is maintained such that subsequent assignments will
+       *  insert values immediately after one another.  For example,
+       *  @code
+       *     // vector v contains A and Z
+       *
+       *     insert_iterator i (v, ++v.begin());
+       *     i = 1;
+       *     i = 2;
+       *     i = 3;
+       *
+       *     // vector v contains A, 1, 2, 3, and Z
+       *  @endcode
+      */
+      insert_iterator&
+      operator=(const typename _Container::const_reference __value) 
+      { 
+	iter = container->insert(iter, __value);
+	++iter;
+	return *this;
+      }
+
+      /// Simply returns *this.
+      insert_iterator& 
+      operator*() { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not "move".)
+      insert_iterator& 
+      operator++() { return *this; }
+
+      /// Simply returns *this.  (This %iterator does not "move".)
+      insert_iterator& 
+      operator++(int) { return *this; }
+    };
+  
+  /**
+   *  @param  x  A container of arbitrary type.
+   *  @return  An instance of insert_iterator working on @p x.
+   *
+   *  This wrapper function helps in creating insert_iterator instances.
+   *  Typing the name of the %iterator requires knowing the precise full
+   *  type of the container, which can be tedious and impedes generic
+   *  programming.  Using this function lets you take advantage of automatic
+   *  template parameter deduction, making the compiler match the correct
+   *  types for you.
+  */
+  template
+    inline insert_iterator<_Container> 
+    inserter(_Container& __x, _Iterator __i)
+    {
+      return insert_iterator<_Container>(__x, 
+					 typename _Container::iterator(__i));
+    }
+} // namespace std
+
+namespace __gnu_cxx
+{  
+  // This iterator adapter is 'normal' in the sense that it does not
+  // change the semantics of any of the operators of its iterator
+  // parameter.  Its primary purpose is to convert an iterator that is
+  // not a class, e.g. a pointer, into an iterator that is a class.
+  // The _Container parameter exists solely so that different containers
+  // using this template can instantiate different types, even if the
+  // _Iterator parameter is the same.
+  using std::iterator_traits;
+  using std::iterator;
+  template
+    class __normal_iterator
+      : public iterator::iterator_category,
+                        typename iterator_traits<_Iterator>::value_type,
+                        typename iterator_traits<_Iterator>::difference_type,
+                        typename iterator_traits<_Iterator>::pointer,
+                        typename iterator_traits<_Iterator>::reference>
+    {
+    protected:
+      _Iterator _M_current;
+      
+    public:
+      typedef typename iterator_traits<_Iterator>::difference_type 	
+      							       difference_type;
+      typedef typename iterator_traits<_Iterator>::reference   reference;
+      typedef typename iterator_traits<_Iterator>::pointer     pointer;
+
+      __normal_iterator() : _M_current(_Iterator()) { }
+
+      explicit 
+      __normal_iterator(const _Iterator& __i) : _M_current(__i) { }
+
+      // Allow iterator to const_iterator conversion
+      template
+      inline __normal_iterator(const __normal_iterator<_Iter, _Container>& __i)
+	: _M_current(__i.base()) { }
+
+      // Forward iterator requirements
+      reference
+      operator*() const { return *_M_current; }
+      
+      pointer
+      operator->() const { return _M_current; }
+      
+      __normal_iterator&
+      operator++() { ++_M_current; return *this; }
+      
+      __normal_iterator
+      operator++(int) { return __normal_iterator(_M_current++); }
+      
+      // Bidirectional iterator requirements
+      __normal_iterator&
+      operator--() { --_M_current; return *this; }
+      
+      __normal_iterator
+      operator--(int) { return __normal_iterator(_M_current--); }
+      
+      // Random access iterator requirements
+      reference
+      operator[](const difference_type& __n) const
+      { return _M_current[__n]; }
+      
+      __normal_iterator&
+      operator+=(const difference_type& __n)
+      { _M_current += __n; return *this; }
+
+      __normal_iterator
+      operator+(const difference_type& __n) const
+      { return __normal_iterator(_M_current + __n); }
+      
+      __normal_iterator&
+      operator-=(const difference_type& __n)
+      { _M_current -= __n; return *this; }
+      
+      __normal_iterator
+      operator-(const difference_type& __n) const
+      { return __normal_iterator(_M_current - __n); }
+      
+      difference_type
+      operator-(const __normal_iterator& __i) const
+      { return _M_current - __i._M_current; }
+      
+      const _Iterator& 
+      base() const { return _M_current; }
+    };
+
+  // Note: In what follows, the left- and right-hand-side iterators are
+  // allowed to vary in types (conceptually in cv-qualification) so that
+  // comparaison between cv-qualified and non-cv-qualified iterators be
+  // valid.  However, the greedy and unfriendly operators in std::rel_ops
+  // will make overload resolution ambiguous (when in scope) if we don't
+  // provide overloads whose operands are of the same type.  Can someone
+  // remind me what generic programming is about? -- Gaby
+  
+  // Forward iterator requirements
+  template
+  inline bool
+  operator==(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	     const __normal_iterator<_IteratorR, _Container>& __rhs)
+  { return __lhs.base() == __rhs.base(); }
+
+  template
+  inline bool
+  operator==(const __normal_iterator<_Iterator, _Container>& __lhs,
+             const __normal_iterator<_Iterator, _Container>& __rhs)
+  { return __lhs.base() == __rhs.base(); }
+
+  template
+  inline bool
+  operator!=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	     const __normal_iterator<_IteratorR, _Container>& __rhs)
+  { return __lhs.base() != __rhs.base(); }
+
+  template
+  inline bool
+  operator!=(const __normal_iterator<_Iterator, _Container>& __lhs,
+             const __normal_iterator<_Iterator, _Container>& __rhs)
+  { return __lhs.base() != __rhs.base(); }
+
+  // Random access iterator requirements
+  template
+  inline bool 
+  operator<(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	    const __normal_iterator<_IteratorR, _Container>& __rhs)
+  { return __lhs.base() < __rhs.base(); }
+
+  template
+  inline bool
+  operator<(const __normal_iterator<_Iterator, _Container>& __lhs,
+             const __normal_iterator<_Iterator, _Container>& __rhs)
+  { return __lhs.base() < __rhs.base(); }
+
+  template
+  inline bool
+  operator>(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	    const __normal_iterator<_IteratorR, _Container>& __rhs)
+  { return __lhs.base() > __rhs.base(); }
+
+  template
+  inline bool
+  operator>(const __normal_iterator<_Iterator, _Container>& __lhs,
+	    const __normal_iterator<_Iterator, _Container>& __rhs)
+  { return __lhs.base() > __rhs.base(); }
+
+  template
+  inline bool
+  operator<=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	     const __normal_iterator<_IteratorR, _Container>& __rhs)
+  { return __lhs.base() <= __rhs.base(); }
+
+  template
+  inline bool
+  operator<=(const __normal_iterator<_Iterator, _Container>& __lhs,
+	     const __normal_iterator<_Iterator, _Container>& __rhs)
+  { return __lhs.base() <= __rhs.base(); }
+
+  template
+  inline bool
+  operator>=(const __normal_iterator<_IteratorL, _Container>& __lhs,
+	     const __normal_iterator<_IteratorR, _Container>& __rhs)
+  { return __lhs.base() >= __rhs.base(); }
+
+  template
+  inline bool
+  operator>=(const __normal_iterator<_Iterator, _Container>& __lhs,
+	     const __normal_iterator<_Iterator, _Container>& __rhs)
+  { return __lhs.base() >= __rhs.base(); }
+
+  template
+  inline __normal_iterator<_Iterator, _Container>
+  operator+(typename __normal_iterator<_Iterator, _Container>::difference_type __n,
+	    const __normal_iterator<_Iterator, _Container>& __i)
+  { return __normal_iterator<_Iterator, _Container>(__i.base() + __n); }
+} // namespace __gnu_cxx
+
+#endif 
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h b/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h
new file mode 100644
index 0000000..8389f5e
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_iterator_base_funcs.h
@@ -0,0 +1,179 @@
+// Functions used by iterators -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_iterator_base_funcs.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  This file contains all of the general iterator-related utility
+ *  functions, such as distance() and advance().
+ */
+
+#ifndef __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H
+#define __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H
+
+#pragma GCC system_header
+#include 
+
+// Since this entire file is within namespace std, there's no reason to
+// waste two spaces along the left column.  Thus the leading indentation is
+// slightly violated from here on.
+namespace std
+{
+template
+  inline typename iterator_traits<_InputIterator>::difference_type
+  __distance(_InputIterator __first, _InputIterator __last, input_iterator_tag)
+  {
+    // concept requirements
+    __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+
+    typename iterator_traits<_InputIterator>::difference_type __n = 0;
+    while (__first != __last) {
+      ++__first; ++__n;
+    }
+    return __n;
+  }
+
+template
+  inline typename iterator_traits<_RandomAccessIterator>::difference_type
+  __distance(_RandomAccessIterator __first, _RandomAccessIterator __last,
+             random_access_iterator_tag)
+  {
+    // concept requirements
+    __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+    return __last - __first;
+  }
+
+/**
+ *  @brief A generalization of pointer arithmetic.
+ *  @param  first  An input iterator.
+ *  @param  last  An input iterator.
+ *  @return  The distance between them.
+ *
+ *  Returns @c n such that first + n == last.  This requires that @p last
+ *  must be reachable from @p first.  Note that @c n may be negative.
+ *
+ *  For random access iterators, this uses their @c + and @c - operations
+ *  and are constant time.  For other %iterator classes they are linear time.
+*/
+template
+  inline typename iterator_traits<_InputIterator>::difference_type
+  distance(_InputIterator __first, _InputIterator __last)
+  {
+    // concept requirements -- taken care of in __distance
+    return __distance(__first, __last, __iterator_category(__first));
+  }
+
+template
+  inline void
+  __advance(_InputIter& __i, _Distance __n, input_iterator_tag)
+  {
+    // concept requirements
+    __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+    while (__n--) ++__i;
+  }
+
+template
+  inline void
+  __advance(_BidirectionalIterator& __i, _Distance __n,
+            bidirectional_iterator_tag)
+  {
+    // concept requirements
+    __glibcpp_function_requires(_BidirectionalIteratorConcept<_BidirectionalIterator>)
+
+    if (__n > 0)
+      while (__n--) ++__i;
+    else
+      while (__n++) --__i;
+  }
+
+template
+  inline void
+  __advance(_RandomAccessIterator& __i, _Distance __n,
+            random_access_iterator_tag)
+  {
+    // concept requirements
+    __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+    __i += __n;
+  }
+
+/**
+ *  @brief A generalization of pointer arithmetic.
+ *  @param  i  An input iterator.
+ *  @param  n  The "delta" by which to change @p i.
+ *  @return  Nothing.
+ *
+ *  This increments @p i by @p n.  For bidirectional and random access
+ *  iterators, @p n may be negative, in which case @p i is decremented.
+ *
+ *  For random access iterators, this uses their @c + and @c - operations
+ *  and are constant time.  For other %iterator classes they are linear time.
+*/
+template
+  inline void
+  advance(_InputIterator& __i, _Distance __n)
+  {
+    // concept requirements -- taken care of in __advance
+    __advance(__i, __n, __iterator_category(__i));
+  }
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_FUNCS_H */
+
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_iterator_base_types.h b/contrib/libstdc++/include/bits/stl_iterator_base_types.h
new file mode 100644
index 0000000..5dff8fc
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_iterator_base_types.h
@@ -0,0 +1,162 @@
+// Types used in iterator implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_iterator_base_types.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  This file contains all of the general iterator-related utility types,
+ *  such as iterator_traits and struct iterator.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H
+#define __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H
+
+#pragma GCC system_header
+
+namespace std
+{
+  /**
+   *  @defgroup iterator_tags Iterator Tags
+   *  These are empty types, used to distinguish different iterators.  The
+   *  distinction is not made by what they contain, but simply by what they
+   *  are.  Different underlying algorithms can then be used based on the
+   *  different operations supporetd by different iterator types.
+   *  @{
+  */
+  ///  Marking input iterators.
+  struct input_iterator_tag {};
+  ///  Marking output iterators.
+  struct output_iterator_tag {};
+  /// Forward iterators support a superset of input iterator operations.
+  struct forward_iterator_tag : public input_iterator_tag {};
+  /// Bidirectional iterators support a superset of forward iterator operations.
+  struct bidirectional_iterator_tag : public forward_iterator_tag {};
+  /// Random-access iterators support a superset of bidirectional iterator operations.
+  struct random_access_iterator_tag : public bidirectional_iterator_tag {};
+  //@}
+
+
+  /**
+   *  This class does nothing but define nested typedefs.  %Iterator classes
+   *  can inherit from this class to save some work.  The typedefs are then
+   *  used in specializations and overloading.
+   *
+   *  In particular, there are no default implementations of requirements
+   *  such as @c operator++ and the like.  (How could there be?)
+  */
+  template
+    struct iterator {
+      /// One of the @link iterator_tags tag types@endlink.
+      typedef _Category  iterator_category;
+      /// The type "pointed to" by the iterator.
+      typedef _Tp        value_type;
+      /// Distance between iterators is represented as this type.
+      typedef _Distance  difference_type;
+      /// This type represents a pointer-to-value_type.
+      typedef _Pointer   pointer;
+      /// This type represents a reference-to-value_type.
+      typedef _Reference reference;
+    };
+
+  /**
+   *  This class does nothing but define nested typedefs.  The general
+   *  version simply "forwards" the nested typedefs from the Iterator
+   *  argument.  Specialized versions for pointers and pointers-to-const
+   *  provide tighter, more correct semantics.
+  */
+  template
+    struct iterator_traits {
+      typedef typename _Iterator::iterator_category iterator_category;
+      typedef typename _Iterator::value_type        value_type;
+      typedef typename _Iterator::difference_type   difference_type;
+      typedef typename _Iterator::pointer           pointer;
+      typedef typename _Iterator::reference         reference;
+    };
+
+  template
+    struct iterator_traits<_Tp*> {
+      typedef random_access_iterator_tag iterator_category;
+      typedef _Tp                         value_type;
+      typedef ptrdiff_t                   difference_type;
+      typedef _Tp*                        pointer;
+      typedef _Tp&                        reference;
+    };
+
+  template
+    struct iterator_traits {
+      typedef random_access_iterator_tag iterator_category;
+      typedef _Tp                         value_type;
+      typedef ptrdiff_t                   difference_type;
+      typedef const _Tp*                  pointer;
+      typedef const _Tp&                  reference;
+    };
+
+  /**
+   *  @if maint
+   *  This function is not a part of the C++ standard but is syntactic
+   *  sugar for internal library use only.
+   *  @endif
+  */
+  template
+    inline typename iterator_traits<_Iter>::iterator_category
+    __iterator_category(const _Iter&)
+    { return typename iterator_traits<_Iter>::iterator_category(); }
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_ITERATOR_BASE_TYPES_H */
+
diff --git a/contrib/libstdc++/include/bits/stl_list.h b/contrib/libstdc++/include/bits/stl_list.h
new file mode 100644
index 0000000..3d470b1
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_list.h
@@ -0,0 +1,989 @@
+// List implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_list.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_LIST_H
+#define __GLIBCPP_INTERNAL_LIST_H
+
+#include 
+
+namespace std
+{
+
+  struct _List_node_base
+  {
+    _List_node_base* _M_next;
+    _List_node_base* _M_prev;
+  };
+
+  template
+    struct _List_node : public _List_node_base
+    {
+      _Tp _M_data;
+    };
+
+  struct _List_iterator_base
+  {
+    typedef size_t                     size_type;
+    typedef ptrdiff_t                  difference_type;
+    typedef bidirectional_iterator_tag iterator_category;
+
+    _List_node_base* _M_node;
+
+    _List_iterator_base(_List_node_base* __x)
+    : _M_node(__x)
+    { }
+
+    _List_iterator_base()
+    { }
+
+    void
+    _M_incr()
+    { _M_node = _M_node->_M_next; }
+
+    void
+    _M_decr()
+    { _M_node = _M_node->_M_prev; }
+
+    bool
+    operator==(const _List_iterator_base& __x) const
+    { return _M_node == __x._M_node; }
+
+    bool
+    operator!=(const _List_iterator_base& __x) const
+    { return _M_node != __x._M_node; }
+  };  
+
+  template
+    struct _List_iterator : public _List_iterator_base
+    {
+      typedef _List_iterator<_Tp,_Tp&,_Tp*>             iterator;
+      typedef _List_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
+      typedef _List_iterator<_Tp,_Ref,_Ptr>             _Self;
+
+      typedef _Tp value_type;
+      typedef _Ptr pointer;
+      typedef _Ref reference;
+      typedef _List_node<_Tp> _Node;
+
+      _List_iterator(_Node* __x)
+      : _List_iterator_base(__x)
+      { }
+
+      _List_iterator()
+      { }
+
+      _List_iterator(const iterator& __x)
+      : _List_iterator_base(__x._M_node)
+      { }
+
+      reference
+      operator*() const
+      { return ((_Node*) _M_node)->_M_data; }
+
+      pointer
+      operator->() const
+      { return &(operator*()); }
+
+      _Self&
+      operator++()
+      { 
+        this->_M_incr();
+        return *this;
+      }
+
+      _Self
+      operator++(int)
+      { 
+        _Self __tmp = *this;
+        this->_M_incr();
+        return __tmp;
+      }
+
+      _Self&
+      operator--()
+      { 
+        this->_M_decr();
+        return *this;
+      }
+
+      _Self
+      operator--(int)
+      { 
+        _Self __tmp = *this;
+        this->_M_decr();
+        return __tmp;
+      }
+    };
+
+
+  // Base class that encapsulates details of allocators.  Three cases:
+  // an ordinary standard-conforming allocator, a standard-conforming
+  // allocator with no non-static data, and an SGI-style allocator.
+  // This complexity is necessary only because we're worrying about backward
+  // compatibility and because we want to avoid wasting storage on an 
+  // allocator instance if it isn't necessary.
+
+
+  // Base for general standard-conforming allocators.
+  template
+    class _List_alloc_base
+    {
+    public:
+      typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
+              allocator_type;
+
+      allocator_type
+      get_allocator() const
+      { return _Node_allocator; }
+
+      _List_alloc_base(const allocator_type& __a)
+      : _Node_allocator(__a)
+      { }
+
+    protected:
+      _List_node<_Tp>*
+      _M_get_node()
+      { return _Node_allocator.allocate(1); }
+
+      void
+      _M_put_node(_List_node<_Tp>* __p)
+      { _Node_allocator.deallocate(__p, 1); }
+
+    protected:
+      typename _Alloc_traits<_List_node<_Tp>, _Allocator>::allocator_type
+               _Node_allocator;
+
+      _List_node<_Tp>* _M_node;
+    };
+
+  // Specialization for instanceless allocators.
+
+  template
+    class _List_alloc_base<_Tp, _Allocator, true>
+    {
+    public:
+      typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
+              allocator_type;
+
+      allocator_type
+      get_allocator() const
+      { return allocator_type(); }
+
+      _List_alloc_base(const allocator_type&)
+      { }
+
+    protected:
+      typedef typename _Alloc_traits<_List_node<_Tp>, _Allocator>::_Alloc_type
+              _Alloc_type;
+
+      _List_node<_Tp>*
+      _M_get_node()
+      { return _Alloc_type::allocate(1); }
+
+      void
+      _M_put_node(_List_node<_Tp>* __p)
+      { _Alloc_type::deallocate(__p, 1); }
+
+    protected:
+      _List_node<_Tp>* _M_node;
+    };
+
+  template
+    class _List_base 
+      : public _List_alloc_base<_Tp, _Alloc,
+                                _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+    {
+    public:
+      typedef _List_alloc_base<_Tp, _Alloc,
+                               _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+              _Base; 
+      typedef typename _Base::allocator_type allocator_type;
+
+      _List_base(const allocator_type& __a)
+      : _Base(__a)
+      {
+        _M_node = _M_get_node();
+        _M_node->_M_next = _M_node;
+        _M_node->_M_prev = _M_node;
+      }
+
+      ~_List_base()
+      {
+        clear();
+        _M_put_node(_M_node);
+      }
+
+      void clear();
+    };
+
+  /**
+   *  @ingroup Containers
+   *  @ingroup Sequences
+   *
+   *  Meets the requirements of a container, a
+   *  reversible container, and a
+   *  sequence, including the
+   *  optional sequence requirements with the
+   *  %exception of @c at and @c operator[].
+   *
+   *  @doctodo
+   *
+  */
+  template >
+    class list : protected _List_base<_Tp, _Alloc>
+    {
+      // concept requirements
+      __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+
+      typedef _List_base<_Tp, _Alloc> _Base;
+    protected:
+      typedef void* _Void_pointer;
+
+    public:      
+      typedef _Tp value_type;
+      typedef value_type* pointer;
+      typedef const value_type* const_pointer;
+      typedef value_type& reference;
+      typedef const value_type& const_reference;
+      typedef _List_node<_Tp> _Node;
+      typedef size_t size_type;
+      typedef ptrdiff_t difference_type;
+
+      typedef typename _Base::allocator_type allocator_type;
+
+      typedef _List_iterator<_Tp,_Tp&,_Tp*>             iterator;
+      typedef _List_iterator<_Tp,const _Tp&,const _Tp*> const_iterator;
+
+      typedef reverse_iterator const_reverse_iterator;
+      typedef reverse_iterator       reverse_iterator;
+
+    protected:
+      using _Base::_M_node;
+      using _Base::_M_put_node;
+      using _Base::_M_get_node;
+
+    protected:
+      _Node*
+      _M_create_node(const _Tp& __x)
+      {
+        _Node* __p = _M_get_node();
+        try {
+          _Construct(&__p->_M_data, __x);
+        }
+        catch(...)
+        { 
+          _M_put_node(__p);
+          __throw_exception_again; 
+        }
+        return __p;
+      }
+
+      _Node*
+      _M_create_node()
+      {
+        _Node* __p = _M_get_node();
+        try {
+          _Construct(&__p->_M_data);
+        }
+        catch(...)
+        { 
+          _M_put_node(__p);
+          __throw_exception_again; 
+        }
+        return __p;
+      }
+
+    public:
+      allocator_type
+      get_allocator() const
+      { return _Base::get_allocator(); }
+
+      explicit
+      list(const allocator_type& __a = allocator_type())
+      : _Base(__a)
+      { }
+
+      iterator
+      begin()
+      { return static_cast<_Node*>(_M_node->_M_next); }
+
+      const_iterator
+      begin() const
+      { return static_cast<_Node*>(_M_node->_M_next); }
+
+      iterator
+      end()
+      { return _M_node; }
+
+      const_iterator
+      end() const
+      { return _M_node; }
+
+      reverse_iterator
+      rbegin() 
+      { return reverse_iterator(end()); }
+
+      const_reverse_iterator
+      rbegin() const 
+      { return const_reverse_iterator(end()); }
+
+      reverse_iterator
+      rend()
+      { return reverse_iterator(begin()); }
+
+      const_reverse_iterator
+      rend() const
+      { return const_reverse_iterator(begin()); }
+
+      bool
+      empty() const
+      { return _M_node->_M_next == _M_node; }
+
+      size_type
+      size() const
+      { return distance(begin(), end()); }
+
+      size_type
+      max_size() const
+      { return size_type(-1); }
+
+      reference
+      front()
+      { return *begin(); }
+
+      const_reference
+      front() const
+      { return *begin(); }
+
+      reference
+      back()
+      { return *(--end()); }
+
+      const_reference
+      back() const
+      { return *(--end()); }
+
+      void
+      swap(list<_Tp, _Alloc>& __x)
+      { std::swap(_M_node, __x._M_node); }
+
+      iterator
+      insert(iterator __position, const _Tp& __x)
+      {
+        _Node* __tmp = _M_create_node(__x);
+        __tmp->_M_next = __position._M_node;
+        __tmp->_M_prev = __position._M_node->_M_prev;
+        __position._M_node->_M_prev->_M_next = __tmp;
+        __position._M_node->_M_prev = __tmp;
+        return __tmp;
+      }
+
+      iterator
+      insert(iterator __position)
+      { return insert(__position, _Tp()); }
+
+      // Check whether it's an integral type.  If so, it's not an iterator.
+      template
+        void
+        _M_insert_dispatch(iterator __pos, _Integer __n, _Integer __x, __true_type)
+        { _M_fill_insert(__pos, (size_type) __n, (_Tp) __x); }
+
+      template
+        void
+        _M_insert_dispatch(iterator __pos,
+                           _InputIterator __first, _InputIterator __last,
+                           __false_type);
+
+      template
+        void
+        insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+        {
+          typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+          _M_insert_dispatch(__pos, __first, __last, _Integral());
+        }
+
+      void
+      insert(iterator __pos, size_type __n, const _Tp& __x)
+      { _M_fill_insert(__pos, __n, __x); }
+
+      void
+      _M_fill_insert(iterator __pos, size_type __n, const _Tp& __x); 
+
+      void
+      push_front(const _Tp& __x)
+      { insert(begin(), __x); }
+
+      void
+      push_front()
+      { insert(begin()); }
+
+      void
+      push_back(const _Tp& __x)
+      { insert(end(), __x); }
+
+      void
+      push_back()
+      { insert(end()); }
+
+      iterator
+      erase(iterator __position)
+      {
+        _List_node_base* __next_node = __position._M_node->_M_next;
+        _List_node_base* __prev_node = __position._M_node->_M_prev;
+        _Node* __n = static_cast<_Node*>(__position._M_node);
+        __prev_node->_M_next = __next_node;
+        __next_node->_M_prev = __prev_node;
+        _Destroy(&__n->_M_data);
+        _M_put_node(__n);
+        return iterator(static_cast<_Node*>(__next_node));
+      }
+
+      iterator
+      erase(iterator __first, iterator __last);
+
+      void
+      clear()
+      { _Base::clear(); }
+
+      void
+      resize(size_type __new_size, const _Tp& __x);
+      
+      void
+      resize(size_type __new_size)
+      { this->resize(__new_size, _Tp()); }
+
+      void
+      pop_front()
+      { erase(begin()); }
+
+      void
+      pop_back()
+      { 
+        iterator __tmp = end();
+        erase(--__tmp);
+      }
+
+      list(size_type __n, const _Tp& __value,
+           const allocator_type& __a = allocator_type())
+      : _Base(__a)
+      { insert(begin(), __n, __value); }
+
+      explicit
+      list(size_type __n)
+      : _Base(allocator_type())
+      { insert(begin(), __n, _Tp()); }
+
+      // We don't need any dispatching tricks here, because insert does all of
+      // that anyway.  
+      template
+      list(_InputIterator __first, _InputIterator __last,
+           const allocator_type& __a = allocator_type())
+      : _Base(__a)
+      { insert(begin(), __first, __last); }
+
+      list(const list<_Tp, _Alloc>& __x)
+      : _Base(__x.get_allocator())
+      { insert(begin(), __x.begin(), __x.end()); }
+
+      ~list()
+      { }
+
+      list<_Tp, _Alloc>&
+      operator=(const list<_Tp, _Alloc>& __x);
+
+    public:
+      // assign(), a generalized assignment member function.  Two
+      // versions: one that takes a count, and one that takes a range.
+      // The range version is a member template, so we dispatch on whether
+      // or not the type is an integer.
+
+      void
+      assign(size_type __n, const _Tp& __val)
+      { _M_fill_assign(__n, __val); }
+
+      void
+      _M_fill_assign(size_type __n, const _Tp& __val);
+
+      template
+        void
+        assign(_InputIterator __first, _InputIterator __last)
+        {
+          typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+          _M_assign_dispatch(__first, __last, _Integral());
+        }
+
+      template
+        void
+        _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+        { _M_fill_assign((size_type) __n, (_Tp) __val); }
+
+      template
+        void
+        _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+                           __false_type);
+
+    protected:
+      void
+      _M_transfer(iterator __position, iterator __first, iterator __last)
+      {
+        if (__position != __last) {
+          // Remove [first, last) from its old position.
+          __last._M_node->_M_prev->_M_next     = __position._M_node;
+          __first._M_node->_M_prev->_M_next    = __last._M_node;
+          __position._M_node->_M_prev->_M_next = __first._M_node; 
+
+          // Splice [first, last) into its new position.
+          _List_node_base* __tmp      = __position._M_node->_M_prev;
+          __position._M_node->_M_prev = __last._M_node->_M_prev;
+          __last._M_node->_M_prev     = __first._M_node->_M_prev; 
+          __first._M_node->_M_prev    = __tmp;
+        }
+      }
+
+    public:
+      void
+      splice(iterator __position, list& __x)
+      {
+        if (!__x.empty()) 
+          this->_M_transfer(__position, __x.begin(), __x.end());
+      }
+
+      void
+      splice(iterator __position, list&, iterator __i)
+      {
+        iterator __j = __i;
+        ++__j;
+        if (__position == __i || __position == __j) return;
+        this->_M_transfer(__position, __i, __j);
+      }
+
+      void
+      splice(iterator __position, list&, iterator __first, iterator __last)
+      {
+        if (__first != __last) 
+          this->_M_transfer(__position, __first, __last);
+      }
+
+      void
+      remove(const _Tp& __value);
+
+      void
+      unique();
+
+      void
+      merge(list& __x);
+
+      void
+      reverse();
+
+      void
+      sort();
+
+      template
+        void
+        remove_if(_Predicate);
+
+      template
+        void
+        unique(_BinaryPredicate);
+
+      template
+        void
+        merge(list&, _StrictWeakOrdering);
+
+      template
+        void
+        sort(_StrictWeakOrdering);
+    };
+
+  template
+    inline bool 
+    operator==(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
+    {
+      typedef typename list<_Tp,_Alloc>::const_iterator const_iterator;
+      const_iterator __end1 = __x.end();
+      const_iterator __end2 = __y.end();
+
+      const_iterator __i1 = __x.begin();
+      const_iterator __i2 = __y.begin();
+      while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
+        ++__i1;
+        ++__i2;
+      }
+      return __i1 == __end1 && __i2 == __end2;
+    }
+
+  template
+    inline bool
+    operator<(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
+    {
+      return lexicographical_compare(__x.begin(), __x.end(),
+                                     __y.begin(), __y.end());
+    }
+
+  template
+    inline bool
+    operator!=(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
+    { return !(__x == __y); }
+
+  template
+    inline bool
+    operator>(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
+    { return __y < __x; }
+
+  template
+    inline bool
+    operator<=(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
+    { return !(__y < __x); }
+
+  template
+    inline bool
+    operator>=(const list<_Tp,_Alloc>& __x, const list<_Tp,_Alloc>& __y)
+    { return !(__x < __y); }
+
+  template
+    inline void 
+    swap(list<_Tp, _Alloc>& __x, list<_Tp, _Alloc>& __y)
+    { __x.swap(__y); }
+
+  // move these to stl_list.tcc
+
+  template
+    void _List_base<_Tp,_Alloc>::
+    clear() 
+    {
+      _List_node<_Tp>* __cur = static_cast<_List_node<_Tp>*>(_M_node->_M_next);
+      while (__cur != _M_node) {
+        _List_node<_Tp>* __tmp = __cur;
+        __cur = static_cast<_List_node<_Tp>*>(__cur->_M_next);
+        _Destroy(&__tmp->_M_data);
+        _M_put_node(__tmp);
+      }
+      _M_node->_M_next = _M_node;
+      _M_node->_M_prev = _M_node;
+    }
+
+  template
+    template 
+      void list<_Tp, _Alloc>::
+      _M_insert_dispatch(iterator __position, _InputIter __first, _InputIter __last,
+                                            __false_type)
+      {
+        for ( ; __first != __last; ++__first)
+          insert(__position, *__first);
+      
+      }
+
+  template
+    void list<_Tp, _Alloc>::
+    _M_fill_insert(iterator __position, size_type __n, const _Tp& __x)
+    {
+      for ( ; __n > 0; --__n)
+        insert(__position, __x);
+    }
+
+  template
+    typename list<_Tp,_Alloc>::iterator list<_Tp, _Alloc>::
+    erase(iterator __first, iterator __last)
+    {
+      while (__first != __last)
+        erase(__first++);
+      return __last;
+    }
+
+  template
+    void list<_Tp, _Alloc>::
+    resize(size_type __new_size, const _Tp& __x)
+    {
+      iterator __i = begin();
+      size_type __len = 0;
+      for ( ; __i != end() && __len < __new_size; ++__i, ++__len)
+        ;
+      if (__len == __new_size)
+        erase(__i, end());
+      else                          // __i == end()
+        insert(end(), __new_size - __len, __x);
+    }
+
+  template
+    list<_Tp, _Alloc>& list<_Tp, _Alloc>::
+    operator=(const list<_Tp, _Alloc>& __x)
+    {
+      if (this != &__x) {
+        iterator __first1 = begin();
+        iterator __last1 = end();
+        const_iterator __first2 = __x.begin();
+        const_iterator __last2 = __x.end();
+        while (__first1 != __last1 && __first2 != __last2) 
+          *__first1++ = *__first2++;
+        if (__first2 == __last2)
+          erase(__first1, __last1);
+        else
+          insert(__last1, __first2, __last2);
+      }
+      return *this;
+    }
+
+  template
+    void list<_Tp, _Alloc>::
+    _M_fill_assign(size_type __n, const _Tp& __val) {
+      iterator __i = begin();
+      for ( ; __i != end() && __n > 0; ++__i, --__n)
+        *__i = __val;
+      if (__n > 0)
+        insert(end(), __n, __val);
+      else
+        erase(__i, end());
+    }
+
+  template
+    template 
+      void list<_Tp, _Alloc>::
+      _M_assign_dispatch(_InputIter __first2, _InputIter __last2, __false_type)
+      {
+        iterator __first1 = begin();
+        iterator __last1 = end();
+        for ( ; __first1 != __last1 && __first2 != __last2; ++__first1, ++__first2)
+          *__first1 = *__first2;
+        if (__first2 == __last2)
+          erase(__first1, __last1);
+        else
+          insert(__last1, __first2, __last2);
+      }
+
+  template
+    void list<_Tp, _Alloc>::
+    remove(const _Tp& __value)
+    {
+      iterator __first = begin();
+      iterator __last = end();
+      while (__first != __last) {
+        iterator __next = __first;
+        ++__next;
+        if (*__first == __value) erase(__first);
+        __first = __next;
+      }
+    }
+
+  template
+    void list<_Tp, _Alloc>::
+    unique()
+    {
+      iterator __first = begin();
+      iterator __last = end();
+      if (__first == __last) return;
+      iterator __next = __first;
+      while (++__next != __last) {
+        if (*__first == *__next)
+          erase(__next);
+        else
+          __first = __next;
+        __next = __first;
+      }
+    }
+
+  template
+    void list<_Tp, _Alloc>::
+    merge(list<_Tp, _Alloc>& __x)
+    {
+      iterator __first1 = begin();
+      iterator __last1 = end();
+      iterator __first2 = __x.begin();
+      iterator __last2 = __x.end();
+      while (__first1 != __last1 && __first2 != __last2)
+        if (*__first2 < *__first1) {
+          iterator __next = __first2;
+          _M_transfer(__first1, __first2, ++__next);
+          __first2 = __next;
+        }
+        else
+          ++__first1;
+      if (__first2 != __last2) _M_transfer(__last1, __first2, __last2);
+    }
+
+  inline void
+  __List_base_reverse(_List_node_base* __p)
+  {
+    _List_node_base* __tmp = __p;
+    do {
+      std::swap(__tmp->_M_next, __tmp->_M_prev);
+      __tmp = __tmp->_M_prev;     // Old next node is now prev.
+    } while (__tmp != __p);
+  }
+
+  template
+  inline void list<_Tp, _Alloc>::
+  reverse() 
+  { __List_base_reverse(this->_M_node); }    
+
+  template
+    void list<_Tp, _Alloc>::
+    sort()
+    {
+      // Do nothing if the list has length 0 or 1.
+      if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node) {
+        list<_Tp, _Alloc> __carry;
+        list<_Tp, _Alloc> __counter[64];
+        int __fill = 0;
+        while (!empty()) {
+          __carry.splice(__carry.begin(), *this, begin());
+          int __i = 0;
+          while(__i < __fill && !__counter[__i].empty()) {
+            __counter[__i].merge(__carry);
+            __carry.swap(__counter[__i++]);
+          }
+          __carry.swap(__counter[__i]);         
+          if (__i == __fill) ++__fill;
+        } 
+
+        for (int __i = 1; __i < __fill; ++__i)
+          __counter[__i].merge(__counter[__i-1]);
+        swap(__counter[__fill-1]);
+      }
+    }
+
+  template
+    template 
+      void list<_Tp, _Alloc>::
+      remove_if(_Predicate __pred)
+      {
+        iterator __first = begin();
+        iterator __last = end();
+        while (__first != __last) {
+          iterator __next = __first;
+          ++__next;
+          if (__pred(*__first)) erase(__first);
+          __first = __next;
+        }
+      }
+
+  template
+    template 
+      void list<_Tp, _Alloc>::
+      unique(_BinaryPredicate __binary_pred)
+      {
+        iterator __first = begin();
+        iterator __last = end();
+        if (__first == __last) return;
+        iterator __next = __first;
+        while (++__next != __last) {
+          if (__binary_pred(*__first, *__next))
+            erase(__next);
+          else
+            __first = __next;
+          __next = __first;
+        }
+      }
+
+  template
+    template 
+      void list<_Tp, _Alloc>::
+      merge(list<_Tp, _Alloc>& __x, _StrictWeakOrdering __comp)
+      {
+        iterator __first1 = begin();
+        iterator __last1 = end();
+        iterator __first2 = __x.begin();
+        iterator __last2 = __x.end();
+        while (__first1 != __last1 && __first2 != __last2)
+          if (__comp(*__first2, *__first1)) {
+            iterator __next = __first2;
+            _M_transfer(__first1, __first2, ++__next);
+            __first2 = __next;
+          }
+          else
+            ++__first1;
+        if (__first2 != __last2) _M_transfer(__last1, __first2, __last2);
+      }
+
+  template
+    template 
+    void list<_Tp, _Alloc>::
+    sort(_StrictWeakOrdering __comp)
+    {
+      // Do nothing if the list has length 0 or 1.
+      if (_M_node->_M_next != _M_node && _M_node->_M_next->_M_next != _M_node) {
+        list<_Tp, _Alloc> __carry;
+        list<_Tp, _Alloc> __counter[64];
+        int __fill = 0;
+        while (!empty()) {
+          __carry.splice(__carry.begin(), *this, begin());
+          int __i = 0;
+          while(__i < __fill && !__counter[__i].empty()) {
+            __counter[__i].merge(__carry, __comp);
+            __carry.swap(__counter[__i++]);
+          }
+          __carry.swap(__counter[__i]);         
+          if (__i == __fill) ++__fill;
+        } 
+
+        for (int __i = 1; __i < __fill; ++__i) 
+          __counter[__i].merge(__counter[__i-1], __comp);
+        swap(__counter[__fill-1]);
+      }
+    }
+
+} // namespace std 
+
+#endif /* __GLIBCPP_INTERNAL_LIST_H */
+
+// vi:set ts=2 sw=2:
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_map.h b/contrib/libstdc++/include/bits/stl_map.h
new file mode 100644
index 0000000..07c62e4
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_map.h
@@ -0,0 +1,503 @@
+// Map implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_map.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_MAP_H
+#define _CPP_BITS_STL_MAP_H 1
+
+#include 
+
+namespace std
+{
+
+/**
+ *  @brief A standard container made up of pairs (see std::pair in )
+ *         which can be retrieved based on a key.
+ *
+ *  This is an associative container.  Values contained within it can be
+ *  quickly retrieved through a key element.  Example:  MyMap["First"] would
+ *  return the data associated with the key "First".
+*/
+template ,
+          class _Alloc = allocator > >
+class map
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+  __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
+
+public:
+  // typedefs:
+  typedef _Key                 key_type;
+  typedef _Tp                   data_type;
+  typedef _Tp                   mapped_type;
+  typedef pair value_type;
+  typedef _Compare             key_compare;
+
+  class value_compare
+    : public binary_function {
+  friend class map<_Key,_Tp,_Compare,_Alloc>;
+  protected :
+    _Compare comp;
+    value_compare(_Compare __c) : comp(__c) {}
+  public:
+    bool operator()(const value_type& __x, const value_type& __y) const {
+      return comp(__x.first, __y.first);
+    }
+  };
+
+private:
+  typedef _Rb_tree, key_compare, _Alloc> _Rep_type;
+  _Rep_type _M_t;  // red-black tree representing map
+public:
+  typedef typename _Rep_type::pointer pointer;
+  typedef typename _Rep_type::const_pointer const_pointer;
+  typedef typename _Rep_type::reference reference;
+  typedef typename _Rep_type::const_reference const_reference;
+  typedef typename _Rep_type::iterator iterator;
+  typedef typename _Rep_type::const_iterator const_iterator;
+  typedef typename _Rep_type::reverse_iterator reverse_iterator;
+  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+  typedef typename _Rep_type::size_type size_type;
+  typedef typename _Rep_type::difference_type difference_type;
+  typedef typename _Rep_type::allocator_type allocator_type;
+
+  // allocation/deallocation
+
+  map() : _M_t(_Compare(), allocator_type()) {}
+  explicit map(const _Compare& __comp,
+               const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) {}
+
+  template 
+  map(_InputIterator __first, _InputIterator __last)
+    : _M_t(_Compare(), allocator_type())
+    { _M_t.insert_unique(__first, __last); }
+
+  template 
+  map(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
+      const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+  map(const map<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
+
+  map<_Key,_Tp,_Compare,_Alloc>&
+  operator=(const map<_Key, _Tp, _Compare, _Alloc>& __x)
+  {
+    _M_t = __x._M_t;
+    return *this;
+  }
+
+  // accessors:
+
+  key_compare key_comp() const { return _M_t.key_comp(); }
+  value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
+  allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+  /**
+   *  Returns a read/write iterator that points to the first pair in the map.
+   *  Iteration is done in ascending order according to the keys.
+  */
+  iterator begin() { return _M_t.begin(); }
+
+  /**
+   *  Returns a read-only (constant) iterator that points to the first pair
+   *  in the map.  Iteration is done in ascending order according to the keys.
+  */
+  const_iterator begin() const { return _M_t.begin(); }
+
+  /**
+   *  Returns a read/write iterator that points one past the last pair in the
+   *  map.  Iteration is done in ascending order according to the keys.
+  */
+  iterator end() { return _M_t.end(); }
+
+  /**
+   *  Returns a read-only (constant) iterator that points one past the last
+   *  pair in the map.  Iteration is done in ascending order according to the
+   *  keys.
+  */
+  const_iterator end() const { return _M_t.end(); }
+
+  /**
+   *  Returns a read/write reverse iterator that points to the last pair in
+   *  the map.  Iteration is done in descending order according to the keys.
+  */
+  reverse_iterator rbegin() { return _M_t.rbegin(); }
+
+  /**
+   *  Returns a read-only (constant) reverse iterator that points to the last
+   *  pair in the map.  Iteration is done in descending order according to
+   *  the keys.
+  */
+  const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
+
+  /**
+   *  Returns a read/write reverse iterator that points to one before the
+   *  first pair in the map.  Iteration is done in descending order according
+   *  to the keys.
+  */
+  reverse_iterator rend() { return _M_t.rend(); }
+
+  /**
+   *  Returns a read-only (constant) reverse iterator that points to one
+   *  before the first pair in the map.  Iteration is done in descending order
+   *  according to the keys.
+  */
+  const_reverse_iterator rend() const { return _M_t.rend(); }
+
+  /** Returns true if the map is empty.  (Thus begin() would equal end().)  */
+  bool empty() const { return _M_t.empty(); }
+  /** Returns the size of the map.  */
+  size_type size() const { return _M_t.size(); }
+  /** Returns the maximum size of the map.  */
+  size_type max_size() const { return _M_t.max_size(); }
+
+  /**
+   *  @brief Subscript ( [] ) access to map data.
+   *  @param  k  The key for which data should be retrieved.
+   * 
+   *  Allows for easy lookup with the subscript ( [] ) operator.  Returns the
+   *  data associated with the key specified in subscript.  If the key does
+   *  not exist a pair with that key is created with a default value, which
+   *  is then returned.
+  */
+  _Tp& operator[](const key_type& __k) {
+    iterator __i = lower_bound(__k);
+    // __i->first is greater than or equivalent to __k.
+    if (__i == end() || key_comp()(__k, (*__i).first))
+      __i = insert(__i, value_type(__k, _Tp()));
+    return (*__i).second;
+  }
+
+  void swap(map<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
+
+  // insert/erase
+  /**
+   *  @brief Attempts to insert a std::pair into the map.
+   *  @param  x  Pair to be inserted (see std::make_pair for easy creation of
+   *             pairs).
+   *  @return  A pair of which the first element is an iterator that points
+   *           to the possibly inserted pair, a second element of type bool
+   *           to show if the pair was actually inserted.
+   *
+   *  This function attempts to insert a (key, value) pair into the map.  A
+   *  map relies on unique keys and thus a pair is only inserted if its first
+   *  element (the key) is not already present in the map.
+  */
+  pair insert(const value_type& __x)
+    { return _M_t.insert_unique(__x); }
+
+  /**
+   *  @brief Attempts to insert a std::pair into the map.
+   *  @param  position  An iterator that serves as a hint as to where the
+   *                    pair should be inserted.
+   *  @param  x  Pair to be inserted (see std::make_pair for easy creation of
+   *             pairs).
+   *  @return  An iterator that points to the inserted (key,value) pair.
+   *
+   *  This function is not concerned about whether the insertion took place
+   *  or not and thus does not return a boolean like the single-argument
+   *  insert() does.  Note that the first parameter is only a hint and can
+   *  potentially improve the performance of the insertion process.  A bad
+   *  hint would cause no gains in efficiency.
+  */
+  iterator insert(iterator position, const value_type& __x)
+    { return _M_t.insert_unique(position, __x); }
+
+  /**
+   *  @brief A template function that attemps to insert elements from
+   *         another range (possibly another map).
+   *  @param  first  Iterator pointing to the start of the range to be inserted.
+   *  @param  last  Iterator pointing to the end of the range.
+  */
+  template 
+  void insert(_InputIterator __first, _InputIterator __last) {
+    _M_t.insert_unique(__first, __last);
+  }
+
+  /**
+   *  @brief Erases an element from a map.
+   *  @param  position  An iterator pointing to the element to be erased.
+   *
+   *  This function erases an element, pointed to by the given iterator, from
+   *  a map.  Note that this function only erases the element, and that if
+   *  the element is itself a pointer, the pointed-to memory is not touched
+   *  in any way.  Managing the pointer is the user's responsibilty.
+  */
+  void erase(iterator __position) { _M_t.erase(__position); }
+
+  /**
+   *  @brief Erases an element according to the provided key.
+   *  @param  x  Key of element to be erased.
+   *  @return  Doc me! (Number of elements that match key? Only makes sense
+   *           with multimap)
+   *
+   *  This function erases an element, located by the given key, from a map.
+   *  Note that this function only erases the element, and that if
+   *  the element is itself a pointer, the pointed-to memory is not touched
+   *  in any way.  Managing the pointer is the user's responsibilty.
+  */
+  size_type erase(const key_type& __x) { return _M_t.erase(__x); }
+
+  /**
+   *  @brief Erases a [first,last) range of elements from a map.
+   *  @param  first  Iterator pointing to the start of the range to be erased.
+   *  @param  last  Iterator pointing to the end of the range to be erased.
+   *
+   *  This function erases a sequence of elements from a map.
+   *  Note that this function only erases the element, and that if
+   *  the element is itself a pointer, the pointed-to memory is not touched
+   *  in any way.  Managing the pointer is the user's responsibilty.
+  */
+  void erase(iterator __first, iterator __last)
+    { _M_t.erase(__first, __last); }
+
+  /** Erases all elements in a map.  Note that this function only erases
+   *  the elements, and that if the elements themselves are pointers, the
+   *  pointed-to memory is not touched in any way.  Managing the pointer is
+   *  the user's responsibilty.
+  */
+  void clear() { _M_t.clear(); }
+
+  // map operations:
+
+  /**
+   *  @brief Tries to locate an element in a map.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Iterator pointing to sought-after element, or end() if not
+   *           found.
+   *
+   *  This function takes a key and tries to locate the element with which
+   *  the key matches.  If successful the function returns an iterator
+   *  pointing to the sought after pair. If unsuccessful it returns the
+   *  one past the end ( end() ) iterator.
+  */
+  iterator find(const key_type& __x) { return _M_t.find(__x); }
+
+  /**
+   *  @brief Tries to locate an element in a map.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Read-only (constant) iterator pointing to sought-after
+   *           element, or end() if not found.
+   *
+   *  This function takes a key and tries to locate the element with which
+   *  the key matches.  If successful the function returns a constant iterator
+   *  pointing to the sought after pair. If unsuccessful it returns the
+   *  one past the end ( end() ) iterator.
+  */
+  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
+
+  /**
+   *  @brief Finds the number of elements with given key.
+   *  @param  x  Key of (key, value) pairs to be located.
+   *  @return Number of elements with specified key.
+   *
+   *  This function only makes sense for multimaps.
+  */
+  size_type count(const key_type& __x) const {
+    return _M_t.find(__x) == _M_t.end() ? 0 : 1;
+  }
+
+  /**
+   *  @brief Finds the beginning of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Iterator pointing to first element matching given key, or
+   *           end() if not found.
+   *
+   *  This function is useful only with std::multimap.  It returns the first
+   *  element of a subsequence of elements that matches the given key.  If
+   *  unsuccessful it returns an iterator pointing to the first element that
+   *  has a greater value than given key or end() if no such element exists.
+  */
+  iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); }
+
+  /**
+   *  @brief Finds the beginning of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Read-only (constant) iterator pointing to first element
+   *           matching given key, or end() if not found.
+   *
+   *  This function is useful only with std::multimap.  It returns the first
+   *  element of a subsequence of elements that matches the given key.  If
+   *  unsuccessful the iterator will point to the next greatest element or,
+   *  if no such greater element exists, to end().
+  */
+  const_iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+
+  /**
+   *  @brief Finds the end of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return Iterator pointing to last element matching given key.
+   *
+   *  This function only makes sense with multimaps.
+  */
+  iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); }
+
+  /**
+   *  @brief Finds the end of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Read-only (constant) iterator pointing to last element matching
+   *           given key.
+   *
+   *  This function only makes sense with multimaps.
+  */
+  const_iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x);
+  }
+
+  /**
+   *  @brief Finds a subsequence matching given key.
+   *  @param  x  Key of (key, value) pairs to be located.
+   *  @return  Pair of iterators that possibly points to the subsequence
+   *           matching given key.
+   *
+   *  This function improves on lower_bound() and upper_bound() by giving a more
+   *  elegant and efficient solution.  It returns a pair of which the first
+   *  element possibly points to the first element matching the given key
+   *  and the second element possibly points to the last element matching the
+   *  given key.  If unsuccessful the first element of the returned pair will
+   *  contain an iterator pointing to the next greatest element or, if no such
+   *  greater element exists, to end().
+   *
+   *  This function only makes sense for multimaps.
+  */
+  pair equal_range(const key_type& __x) {
+    return _M_t.equal_range(__x);
+  }
+
+  /**
+   *  @brief Finds a subsequence matching given key.
+   *  @param  x  Key of (key, value) pairs to be located.
+   *  @return  Pair of read-only (constant) iterators that possibly points to
+   *           the subsequence matching given key.
+   *
+   *  This function improves on lower_bound() and upper_bound() by giving a more
+   *  elegant and efficient solution.  It returns a pair of which the first
+   *  element possibly points to the first element matching the given key
+   *  and the second element possibly points to the last element matching the
+   *  given key.  If unsuccessful the first element of the returned pair will
+   *  contain an iterator pointing to the next greatest element or, if no such
+   *  a greater element exists, to end().
+   *
+   *  This function only makes sense for multimaps.
+  */
+  pair equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+
+  template 
+  friend bool operator== (const map<_K1, _T1, _C1, _A1>&,
+                          const map<_K1, _T1, _C1, _A1>&);
+  template 
+  friend bool operator< (const map<_K1, _T1, _C1, _A1>&,
+                         const map<_K1, _T1, _C1, _A1>&);
+};
+
+template 
+inline bool operator==(const map<_Key,_Tp,_Compare,_Alloc>& __x,
+                       const map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return __x._M_t == __y._M_t;
+}
+
+template 
+inline bool operator<(const map<_Key,_Tp,_Compare,_Alloc>& __x,
+                      const map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return __x._M_t < __y._M_t;
+}
+
+template 
+inline bool operator!=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
+                       const map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator>(const map<_Key,_Tp,_Compare,_Alloc>& __x,
+                      const map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
+                       const map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool operator>=(const map<_Key,_Tp,_Compare,_Alloc>& __x,
+                       const map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline void swap(map<_Key,_Tp,_Compare,_Alloc>& __x,
+                 map<_Key,_Tp,_Compare,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+} // namespace std
+
+#endif /* _CPP_BITS_STL_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_multimap.h b/contrib/libstdc++/include/bits/stl_multimap.h
new file mode 100644
index 0000000..5947d75
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_multimap.h
@@ -0,0 +1,491 @@
+// Multimap implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_multimap.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_MULTIMAP_H
+#define __GLIBCPP_INTERNAL_MULTIMAP_H
+
+#include 
+
+namespace std
+{
+// Forward declaration of operators < and ==, needed for friend declaration.
+template ,
+          class _Alloc = allocator > >
+class multimap;
+
+template 
+inline bool operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
+                       const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
+
+template 
+inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
+                      const multimap<_Key,_Tp,_Compare,_Alloc>& __y);
+
+/**
+ *  @brief A standard container made up of pairs (see std::pair in )
+ *         which can be retrieved based on a key.
+ *
+ *  This is an associative container.  Values contained within it can be
+ *  quickly retrieved through a key element. In contrast with a map a
+ *  multimap can have multiple duplicate keys.
+*/
+template 
+class multimap
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+  __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
+
+public:
+
+// typedefs:
+
+  typedef _Key                  key_type;
+  typedef _Tp                   data_type;
+  typedef _Tp                   mapped_type;
+  typedef pair value_type;
+  typedef _Compare              key_compare;
+
+  class value_compare : public binary_function {
+  friend class multimap<_Key,_Tp,_Compare,_Alloc>;
+  protected:
+    _Compare comp;
+    value_compare(_Compare __c) : comp(__c) {}
+  public:
+    bool operator()(const value_type& __x, const value_type& __y) const {
+      return comp(__x.first, __y.first);
+    }
+  };
+
+private:
+  typedef _Rb_tree, key_compare, _Alloc> _Rep_type;
+  _Rep_type _M_t;  // red-black tree representing multimap
+public:
+  typedef typename _Rep_type::pointer pointer;
+  typedef typename _Rep_type::const_pointer const_pointer;
+  typedef typename _Rep_type::reference reference;
+  typedef typename _Rep_type::const_reference const_reference;
+  typedef typename _Rep_type::iterator iterator;
+  typedef typename _Rep_type::const_iterator const_iterator; 
+  typedef typename _Rep_type::reverse_iterator reverse_iterator;
+  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+  typedef typename _Rep_type::size_type size_type;
+  typedef typename _Rep_type::difference_type difference_type;
+  typedef typename _Rep_type::allocator_type allocator_type;
+
+// allocation/deallocation
+
+  multimap() : _M_t(_Compare(), allocator_type()) { }
+  explicit multimap(const _Compare& __comp,
+                    const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) { }
+
+  template 
+  multimap(_InputIterator __first, _InputIterator __last)
+    : _M_t(_Compare(), allocator_type())
+    { _M_t.insert_equal(__first, __last); }
+
+  template 
+  multimap(_InputIterator __first, _InputIterator __last,
+           const _Compare& __comp,
+           const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+  multimap(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) : _M_t(__x._M_t) { }
+
+  multimap<_Key,_Tp,_Compare,_Alloc>&
+  operator=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x) {
+    _M_t = __x._M_t;
+    return *this; 
+  }
+
+  // accessors:
+
+  key_compare key_comp() const { return _M_t.key_comp(); }
+  value_compare value_comp() const { return value_compare(_M_t.key_comp()); }
+  allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+  /**
+   *  Returns a read/write iterator that points to the first pair in the
+   *  multimap.  Iteration is done in ascending order according to the keys.
+  */
+  iterator begin() { return _M_t.begin(); }
+
+  /**
+   *  Returns a read-only (constant) iterator that points to the first pair
+   *  in the multimap.  Iteration is done in ascending order according to the
+   *  keys.
+  */
+  const_iterator begin() const { return _M_t.begin(); }
+
+  /**
+   *  Returns a read/write iterator that points one past the last pair in the
+   *  multimap.  Iteration is done in ascending order according to the keys.
+  */
+  iterator end() { return _M_t.end(); }
+
+  /**
+   *  Returns a read-only (constant) iterator that points one past the last
+   *  pair in the multimap.  Iteration is done in ascending order according
+   *  to the keys.
+  */
+  const_iterator end() const { return _M_t.end(); }
+
+  /**
+   *  Returns a read/write reverse iterator that points to the last pair in
+   *  the multimap.  Iteration is done in descending order according to the
+   *  keys.
+  */
+  reverse_iterator rbegin() { return _M_t.rbegin(); }
+
+  /**
+   *  Returns a read-only (constant) reverse iterator that points to the last
+   *  pair in the multimap.  Iteration is done in descending order according
+   *  to the keys.
+  */
+  const_reverse_iterator rbegin() const { return _M_t.rbegin(); }
+
+  /**
+   *  Returns a read/write reverse iterator that points to one before the
+   *  first pair in the multimap.  Iteration is done in descending order
+   *  according to the keys.
+  */
+  reverse_iterator rend() { return _M_t.rend(); }
+
+  /**
+   *  Returns a read-only (constant) reverse iterator that points to one
+   *  before the first pair in the multimap.  Iteration is done in descending
+   *  order according to the keys.
+  */
+  const_reverse_iterator rend() const { return _M_t.rend(); }
+
+  /** Returns true if the map is empty.  (Thus begin() would equal end().)  */
+  bool empty() const { return _M_t.empty(); }
+
+  /** Returns the size of the map.  */
+  size_type size() const { return _M_t.size(); }
+
+  /** Returns the maximum size of the map.  */
+  size_type max_size() const { return _M_t.max_size(); }
+
+  void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
+
+  // insert/erase
+  /**
+   *  @brief Inserts a std::pair into the multimap.
+   *  @param  x  Pair to be inserted (see std::make_pair for easy creation of
+   *             pairs).
+   *  @return An iterator that points to the inserted (key,value) pair.
+   *
+   *  This function inserts a (key, value) pair into the multimap.  Contrary
+   *  to a std::map the multimap does not rely on unique keys and thus a
+   *  multiple pairs with the same key can be inserted.
+  */
+  iterator insert(const value_type& __x) { return _M_t.insert_equal(__x); }
+
+  /**
+   *  @brief Inserts a std::pair into the multimap.
+   *  @param  position  An iterator that serves as a hint as to where the
+   *                    pair should be inserted.
+   *  @param  x  Pair to be inserted (see std::make_pair for easy creation of
+   *             pairs).
+   *  @return An iterator that points to the inserted (key,value) pair.
+   *
+   *  This function inserts a (key, value) pair into the multimap.  Contrary
+   *  to a std::map the multimap does not rely on unique keys and thus a
+   *  multiple pairs with the same key can be inserted.
+   *  Note that the first parameter is only a hint and can potentially
+   *  improve the performance of the insertion process.  A bad hint would
+   *  cause no gains in efficiency.
+  */
+  iterator insert(iterator __position, const value_type& __x) {
+    return _M_t.insert_equal(__position, __x);
+  }
+
+  /**
+   *  @brief A template function that attemps to insert elements from
+   *         another range (possibly another multimap or standard container).
+   *  @param  first  Iterator pointing to the start of the range to be
+   *                 inserted.
+   *  @param  last  Iterator pointing to the end of the range to be inserted.
+  */
+  template 
+  void insert(_InputIterator __first, _InputIterator __last) {
+    _M_t.insert_equal(__first, __last);
+  }
+
+  /**
+   *  @brief Erases an element from a multimap.
+   *  @param  position  An iterator pointing to the element to be erased.
+   *
+   *  This function erases an element, pointed to by the given iterator, from
+   *  a mutlimap.  Note that this function only erases the element, and that
+   *  if the element is itself a pointer, the pointed-to memory is not
+   *  touched in any way.  Managing the pointer is the user's responsibilty.
+  */
+  void erase(iterator __position) { _M_t.erase(__position); }
+
+  /**
+   *  @brief Erases an element according to the provided key.
+   *  @param  x  Key of element to be erased.
+   *  @return  Doc me! (Number of elements erased?)
+   *
+   *  This function erases all elements, located by the given key, from a
+   *  multimap.
+   *  Note that this function only erases the element, and that if
+   *  the element is itself a pointer, the pointed-to memory is not touched
+   *  in any way.  Managing the pointer is the user's responsibilty.
+  */
+  size_type erase(const key_type& __x) { return _M_t.erase(__x); }
+
+  /**
+   *  @brief Erases a [first,last) range of elements from a multimap.
+   *  @param  first  Iterator pointing to the start of the range to be erased.
+   *  @param  last  Iterator pointing to the end of the range to be erased.
+   *
+   *  This function erases a sequence of elements from a multimap.
+   *  Note that this function only erases the elements, and that if
+   *  the elements themselves are pointers, the pointed-to memory is not
+   *  touched in any way.  Managing the pointer is the user's responsibilty.
+  */
+  void erase(iterator __first, iterator __last)
+    { _M_t.erase(__first, __last); }
+
+  /** Erases all elements in a multimap.  Note that this function only erases
+   *  the elements, and that if the elements themselves are pointers, the
+   *  pointed-to memory is not touched in any way.  Managing the pointer is
+   *  the user's responsibilty.
+  */
+  void clear() { _M_t.clear(); }
+
+  // multimap operations:
+
+  /**
+   *  @brief Tries to locate an element in a multimap.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Iterator pointing to sought-after (first matching?) element,
+   *           or end() if not found.
+   *
+   *  This function takes a key and tries to locate the element with which
+   *  the key matches.  If successful the function returns an iterator
+   *  pointing to the sought after pair. If unsuccessful it returns the
+   *  one past the end ( end() ) iterator.
+  */
+  iterator find(const key_type& __x) { return _M_t.find(__x); }
+
+  /**
+   *  @brief Tries to locate an element in a multimap.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Read-only (constant) iterator pointing to sought-after (first
+   *           matching?) element, or end() if not found.
+   *
+   *  This function takes a key and tries to locate the element with which
+   *  the key matches.  If successful the function returns a constant iterator
+   *  pointing to the sought after pair. If unsuccessful it returns the
+   *  one past the end ( end() ) iterator.
+  */
+  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
+
+  /**
+   *  @brief Finds the number of elements with given key.
+   *  @param  x  Key of (key, value) pairs to be located.
+   *  @return Number of elements with specified key.
+  */
+  size_type count(const key_type& __x) const { return _M_t.count(__x); }
+
+  /**
+   *  @brief Finds the beginning of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Iterator pointing to first element matching given key, or
+   *           end() if not found.
+   *
+   *  This function returns the first element of a subsequence of elements
+   *  that matches the given key.  If unsuccessful it returns an iterator
+   *  pointing to the first element that has a greater value than given key
+   *  or end() if no such element exists.
+  */
+  iterator lower_bound(const key_type& __x) {return _M_t.lower_bound(__x); }
+
+  /**
+   *  @brief Finds the beginning of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Read-only (constant) iterator pointing to first element
+   *           matching given key, or end() if not found.
+   *
+   *  This function returns the first element of a subsequence of elements
+   *  that matches the given key.  If unsuccessful the iterator will point
+   *  to the next greatest element or, if no such greater element exists, to
+   *  end().
+  */
+  const_iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+
+  /**
+   *  @brief Finds the end of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return Iterator pointing to last element matching given key.
+  */
+  iterator upper_bound(const key_type& __x) {return _M_t.upper_bound(__x); }
+
+  /**
+   *  @brief Finds the end of a subsequence matching given key.
+   *  @param  x  Key of (key, value) pair to be located.
+   *  @return  Read-only (constant) iterator pointing to last element matching
+   *           given key.
+  */
+  const_iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x);
+  }
+
+  /**
+   *  @brief Finds a subsequence matching given key.
+   *  @param  x  Key of (key, value) pairs to be located.
+   *  @return  Pair of iterators that possibly points to the subsequence
+   *           matching given key.
+   *
+   *  This function improves on lower_bound() and upper_bound() by giving a more
+   *  elegant and efficient solution.  It returns a pair of which the first
+   *  element possibly points to the first element matching the given key
+   *  and the second element possibly points to the last element matching the
+   *  given key.  If unsuccessful the first element of the returned pair will
+   *  contain an iterator pointing to the next greatest element or, if no such
+   *  greater element exists, to end().
+  */
+  pair equal_range(const key_type& __x) {
+    return _M_t.equal_range(__x);
+  }
+
+  /**
+   *  @brief Finds a subsequence matching given key.
+   *  @param  x  Key of (key, value) pairs to be located.
+   *  @return  Pair of read-only (constant) iterators that possibly points to
+   *           the subsequence matching given key.
+   *
+   *  This function improves on lower_bound() and upper_bound() by giving a more
+   *  elegant and efficient solution.  It returns a pair of which the first
+   *  element possibly points to the first element matching the given key
+   *  and the second element possibly points to the last element matching the
+   *  given key.  If unsuccessful the first element of the returned pair will
+   *  contain an iterator pointing to the next greatest element or, if no such
+   *  a greater element exists, to end().
+  */
+  pair equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+
+  template 
+  friend bool operator== (const multimap<_K1, _T1, _C1, _A1>&,
+                          const multimap<_K1, _T1, _C1, _A1>&);
+  template 
+  friend bool operator< (const multimap<_K1, _T1, _C1, _A1>&,
+                         const multimap<_K1, _T1, _C1, _A1>&);
+};
+
+template 
+inline bool operator==(const multimap<_Key,_Tp,_Compare,_Alloc>& __x,
+                       const multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return __x._M_t == __y._M_t;
+}
+
+template 
+inline bool operator<(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, 
+                      const multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return __x._M_t < __y._M_t;
+}
+
+template 
+inline bool operator!=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, 
+                       const multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator>(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, 
+                      const multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, 
+                       const multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool operator>=(const multimap<_Key,_Tp,_Compare,_Alloc>& __x, 
+                       const multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline void swap(multimap<_Key,_Tp,_Compare,_Alloc>& __x, 
+                 multimap<_Key,_Tp,_Compare,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_MULTIMAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_multiset.h b/contrib/libstdc++/include/bits/stl_multiset.h
new file mode 100644
index 0000000..2bfc8f1
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_multiset.h
@@ -0,0 +1,277 @@
+// Multiset implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_multiset.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_MULTISET_H
+#define __GLIBCPP_INTERNAL_MULTISET_H
+
+#include 
+
+namespace std
+{
+
+// Forward declaration of operators < and ==, needed for friend declaration.
+
+template ,
+          class _Alloc = allocator<_Key> >
+class multiset;
+
+template 
+inline bool operator==(const multiset<_Key,_Compare,_Alloc>& __x, 
+                       const multiset<_Key,_Compare,_Alloc>& __y);
+
+template 
+inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x, 
+                      const multiset<_Key,_Compare,_Alloc>& __y);
+
+template 
+class multiset
+{
+  // concept requirements
+  __glibcpp_class_requires(_Key, _SGIAssignableConcept)
+  __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
+
+public:
+
+  // typedefs:
+
+  typedef _Key     key_type;
+  typedef _Key     value_type;
+  typedef _Compare key_compare;
+  typedef _Compare value_compare;
+private:
+  typedef _Rb_tree, key_compare, _Alloc> _Rep_type;
+  _Rep_type _M_t;  // red-black tree representing multiset
+public:
+  typedef typename _Rep_type::const_pointer pointer;
+  typedef typename _Rep_type::const_pointer const_pointer;
+  typedef typename _Rep_type::const_reference reference;
+  typedef typename _Rep_type::const_reference const_reference;
+  typedef typename _Rep_type::const_iterator iterator;
+  typedef typename _Rep_type::const_iterator const_iterator;
+  typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
+  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+  typedef typename _Rep_type::size_type size_type;
+  typedef typename _Rep_type::difference_type difference_type;
+  typedef typename _Rep_type::allocator_type allocator_type;
+
+  // allocation/deallocation
+
+  multiset() : _M_t(_Compare(), allocator_type()) {}
+  explicit multiset(const _Compare& __comp,
+                    const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) {}
+
+  template 
+  multiset(_InputIterator __first, _InputIterator __last)
+    : _M_t(_Compare(), allocator_type())
+    { _M_t.insert_equal(__first, __last); }
+
+  template 
+  multiset(_InputIterator __first, _InputIterator __last,
+           const _Compare& __comp,
+           const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) { _M_t.insert_equal(__first, __last); }
+
+  multiset(const multiset<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
+
+  multiset<_Key,_Compare,_Alloc>&
+  operator=(const multiset<_Key,_Compare,_Alloc>& __x) {
+    _M_t = __x._M_t; 
+    return *this;
+  }
+
+  // accessors:
+
+  key_compare key_comp() const { return _M_t.key_comp(); }
+  value_compare value_comp() const { return _M_t.key_comp(); }
+  allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+  iterator begin() const { return _M_t.begin(); }
+  iterator end() const { return _M_t.end(); }
+  reverse_iterator rbegin() const { return _M_t.rbegin(); } 
+  reverse_iterator rend() const { return _M_t.rend(); }
+  bool empty() const { return _M_t.empty(); }
+  size_type size() const { return _M_t.size(); }
+  size_type max_size() const { return _M_t.max_size(); }
+  void swap(multiset<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
+
+  // insert/erase
+  iterator insert(const value_type& __x) { 
+    return _M_t.insert_equal(__x);
+  }
+  iterator insert(iterator __position, const value_type& __x) {
+    typedef typename _Rep_type::iterator _Rep_iterator;
+    return _M_t.insert_equal((_Rep_iterator&)__position, __x);
+  }
+
+  template 
+  void insert(_InputIterator __first, _InputIterator __last) {
+    _M_t.insert_equal(__first, __last);
+  }
+  void erase(iterator __position) { 
+    typedef typename _Rep_type::iterator _Rep_iterator;
+    _M_t.erase((_Rep_iterator&)__position); 
+  }
+  size_type erase(const key_type& __x) { 
+    return _M_t.erase(__x); 
+  }
+  void erase(iterator __first, iterator __last) { 
+    typedef typename _Rep_type::iterator _Rep_iterator;
+    _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last); 
+  }
+  void clear() { _M_t.clear(); }
+
+  // multiset operations:
+
+  size_type count(const key_type& __x) const { return _M_t.count(__x); }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//214.  set::find() missing const overload
+  iterator find(const key_type& __x) { return _M_t.find(__x); }
+  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
+  iterator lower_bound(const key_type& __x) {
+    return _M_t.lower_bound(__x);
+  }
+  const_iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+  iterator upper_bound(const key_type& __x) {
+    return _M_t.upper_bound(__x);
+  }
+  const_iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x);
+  }
+  pair equal_range(const key_type& __x) {
+    return _M_t.equal_range(__x);
+  }
+  pair equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+#else
+  iterator find(const key_type& __x) const { return _M_t.find(__x); }
+  iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+  iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x); 
+  }
+  pair equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+#endif
+
+  template 
+  friend bool operator== (const multiset<_K1,_C1,_A1>&,
+                          const multiset<_K1,_C1,_A1>&);
+  template 
+  friend bool operator< (const multiset<_K1,_C1,_A1>&,
+                         const multiset<_K1,_C1,_A1>&);
+};
+
+template 
+inline bool operator==(const multiset<_Key,_Compare,_Alloc>& __x, 
+                       const multiset<_Key,_Compare,_Alloc>& __y) {
+  return __x._M_t == __y._M_t;
+}
+
+template 
+inline bool operator<(const multiset<_Key,_Compare,_Alloc>& __x, 
+                      const multiset<_Key,_Compare,_Alloc>& __y) {
+  return __x._M_t < __y._M_t;
+}
+
+template 
+inline bool operator!=(const multiset<_Key,_Compare,_Alloc>& __x, 
+                       const multiset<_Key,_Compare,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator>(const multiset<_Key,_Compare,_Alloc>& __x, 
+                      const multiset<_Key,_Compare,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<=(const multiset<_Key,_Compare,_Alloc>& __x, 
+                       const multiset<_Key,_Compare,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool operator>=(const multiset<_Key,_Compare,_Alloc>& __x, 
+                       const multiset<_Key,_Compare,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline void swap(multiset<_Key,_Compare,_Alloc>& __x, 
+                 multiset<_Key,_Compare,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_MULTISET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_numeric.h b/contrib/libstdc++/include/bits/stl_numeric.h
new file mode 100644
index 0000000..23f2bcc
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_numeric.h
@@ -0,0 +1,215 @@
+// Numeric functions implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_numeric.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_NUMERIC_H
+#define _CPP_BITS_STL_NUMERIC_H 1
+
+namespace std
+{
+
+  template
+    _Tp
+    accumulate(_InputIterator __first, _InputIterator __last, _Tp __init)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+
+      for ( ; __first != __last; ++__first)
+	__init = __init + *__first;
+      return __init;
+    }
+
+  template
+    _Tp
+    accumulate(_InputIterator __first, _InputIterator __last, _Tp __init,
+	       _BinaryOperation __binary_op)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+
+      for ( ; __first != __last; ++__first)
+	__init = __binary_op(__init, *__first);
+      return __init;
+    }
+
+  template
+    _Tp
+    inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+		  _InputIterator2 __first2, _Tp __init)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
+
+      for ( ; __first1 != __last1; ++__first1, ++__first2)
+	__init = __init + (*__first1 * *__first2);
+      return __init;
+    }
+
+  template
+    _Tp
+    inner_product(_InputIterator1 __first1, _InputIterator1 __last1,
+		  _InputIterator2 __first2, _Tp __init, 
+		  _BinaryOperation1 __binary_op1,
+		  _BinaryOperation2 __binary_op2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator2>)
+
+      for ( ; __first1 != __last1; ++__first1, ++__first2)
+	__init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
+      return __init;
+    }
+
+  template
+    _OutputIterator 
+    partial_sum(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+
+      if (__first == __last) return __result;
+      *__result = *__first;
+      _ValueType __value = *__first;
+      while (++__first != __last) {
+	__value = __value + *__first;
+	*++__result = __value;
+      }
+      return ++__result;
+    }
+
+  template
+    _OutputIterator 
+    partial_sum(_InputIterator __first, _InputIterator __last,
+		_OutputIterator __result, _BinaryOperation __binary_op)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+
+      if (__first == __last) return __result;
+      *__result = *__first;
+      _ValueType __value = *__first;
+      while (++__first != __last) {
+	__value = __binary_op(__value, *__first);
+	*++__result = __value;
+      }
+      return ++__result;
+    }
+
+  template
+    _OutputIterator
+    adjacent_difference(_InputIterator __first,
+			_InputIterator __last, _OutputIterator __result)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+
+      if (__first == __last) return __result;
+      *__result = *__first;
+      _ValueType __value = *__first;
+      while (++__first != __last) {
+	_ValueType __tmp = *__first;
+	*++__result = __tmp - __value;
+	__value = __tmp;
+      }
+      return ++__result;
+    }
+
+  template
+    _OutputIterator 
+    adjacent_difference(_InputIterator __first, _InputIterator __last,
+			_OutputIterator __result, _BinaryOperation __binary_op)
+    {
+      typedef typename iterator_traits<_InputIterator>::value_type _ValueType;
+
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIterator, _ValueType>)
+
+      if (__first == __last) return __result;
+      *__result = *__first;
+      _ValueType __value = *__first;
+      while (++__first != __last) {
+	_ValueType __tmp = *__first;
+	*++__result = __binary_op(__tmp, __value);
+	__value = __tmp;
+      }
+      return ++__result;
+    }
+
+} // namespace std
+
+#endif /* _CPP_BITS_STL_NUMERIC_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_pair.h b/contrib/libstdc++/include/bits/stl_pair.h
new file mode 100644
index 0000000..d689ccc
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_pair.h
@@ -0,0 +1,157 @@
+// Pair implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_pair.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_PAIR_H
+#define __GLIBCPP_INTERNAL_PAIR_H
+
+namespace std
+{
+
+/// pair holds two objects of arbitrary type.
+template 
+struct pair {
+  typedef _T1 first_type;    ///<  @c first_type is the first bound type
+  typedef _T2 second_type;   ///<  @c second_type is the second bound type
+
+  _T1 first;                 ///< @c first is a copy of the first object
+  _T2 second;                ///< @c second is a copy of the second object
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//265.  std::pair::pair() effects overly restrictive
+  /** The default constructor creates @c first and @c second using their
+   *  respective default constructors.  */
+  pair() : first(), second() {}
+#else
+  pair() : first(_T1()), second(_T2()) {}
+#endif
+  /** Two objects may be passed to a @c pair constructor to be copied.  */
+  pair(const _T1& __a, const _T2& __b) : first(__a), second(__b) {}
+
+  /** There is also a templated copy ctor for the @c pair class itself.  */
+  template 
+  pair(const pair<_U1, _U2>& __p) : first(__p.first), second(__p.second) {}
+};
+
+/// Two pairs of the same type are equal iff their members are equal.
+template 
+inline bool operator==(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ 
+  return __x.first == __y.first && __x.second == __y.second; 
+}
+
+/// http://gcc.gnu.org/onlinedocs/libstdc++/20_util/howto.html#pairlt
+template 
+inline bool operator<(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y)
+{ 
+  return __x.first < __y.first || 
+         (!(__y.first < __x.first) && __x.second < __y.second); 
+}
+
+/// Uses @c operator== to find the result.
+template 
+inline bool operator!=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+  return !(__x == __y);
+}
+
+/// Uses @c operator< to find the result.
+template 
+inline bool operator>(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+  return __y < __x;
+}
+
+/// Uses @c operator< to find the result.
+template 
+inline bool operator<=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+  return !(__y < __x);
+}
+
+/// Uses @c operator< to find the result.
+template 
+inline bool operator>=(const pair<_T1, _T2>& __x, const pair<_T1, _T2>& __y) {
+  return !(__x < __y);
+}
+
+/**
+ *  @brief A convenience wrapper for creating a pair from two objects.
+ *  @param  x  The first object.
+ *  @param  y  The second object.
+ *  @return   A newly-constructed pair<> object of the appropriate type.
+ *
+ *  The standard requires that the objects be passed by reference-to-const,
+ *  but LWG issue #181 says they should be passed by const value.  We follow
+ *  the LWG by default.
+*/
+template 
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//181.  make_pair() unintended behavior
+inline pair<_T1, _T2> make_pair(_T1 __x, _T2 __y)
+#else
+inline pair<_T1, _T2> make_pair(const _T1& __x, const _T2& __y)
+#endif
+{
+  return pair<_T1, _T2>(__x, __y);
+}
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_PAIR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_pthread_alloc.h b/contrib/libstdc++/include/bits/stl_pthread_alloc.h
new file mode 100644
index 0000000..09b7d72
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_pthread_alloc.h
@@ -0,0 +1,60 @@
+// Wrapper of pthread allocation header -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1996-1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_pthread_alloc.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_PTHREAD_ALLOC_H
+#define _CPP_BITS_STL_PTHREAD_ALLOC_H 1
+
+#include 
+
+using std::_Pthread_alloc_template;
+using std::pthread_alloc;
+
+#endif /* _CPP_BITS_STL_PTHREAD_ALLOC_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_queue.h b/contrib/libstdc++/include/bits/stl_queue.h
new file mode 100644
index 0000000..5503640
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_queue.h
@@ -0,0 +1,244 @@
+// Queue implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_queue.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_QUEUE_H
+#define __GLIBCPP_INTERNAL_QUEUE_H
+
+#include 
+
+namespace std
+{
+
+// Forward declarations of operators < and ==, needed for friend declaration.
+
+template  >
+class queue;
+
+template 
+inline bool operator==(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
+
+template 
+inline bool operator<(const queue<_Tp, _Seq>&, const queue<_Tp, _Seq>&);
+
+
+template 
+class queue
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+  __glibcpp_class_requires(_Sequence, _FrontInsertionSequenceConcept)
+  __glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept)
+  typedef typename _Sequence::value_type _Sequence_value_type;
+  __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept);
+
+  template 
+  friend bool operator== (const queue<_Tp1, _Seq1>&,
+                          const queue<_Tp1, _Seq1>&);
+  template 
+  friend bool operator< (const queue<_Tp1, _Seq1>&,
+                         const queue<_Tp1, _Seq1>&);
+public:
+  typedef typename _Sequence::value_type      value_type;
+  typedef typename _Sequence::size_type       size_type;
+  typedef          _Sequence                  container_type;
+
+  typedef typename _Sequence::reference       reference;
+  typedef typename _Sequence::const_reference const_reference;
+protected:
+  _Sequence c;
+public:
+  explicit queue(const _Sequence& __c = _Sequence()) : c(__c) {}
+
+  bool empty() const { return c.empty(); }
+  size_type size() const { return c.size(); }
+  reference front() { return c.front(); }
+  const_reference front() const { return c.front(); }
+  reference back() { return c.back(); }
+  const_reference back() const { return c.back(); }
+  void push(const value_type& __x) { c.push_back(__x); }
+  void pop() { c.pop_front(); }
+};
+
+template 
+bool 
+operator==(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
+{
+  return __x.c == __y.c;
+}
+
+template 
+bool
+operator<(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
+{
+  return __x.c < __y.c;
+}
+
+template 
+bool
+operator!=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
+{
+  return !(__x == __y);
+}
+
+template 
+bool 
+operator>(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
+{
+  return __y < __x;
+}
+
+template 
+bool 
+operator<=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
+{
+  return !(__y < __x);
+}
+
+template 
+bool 
+operator>=(const queue<_Tp, _Sequence>& __x, const queue<_Tp, _Sequence>& __y)
+{
+  return !(__x < __y);
+}
+
+template ,
+          class _Compare  = less >
+class priority_queue
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+  __glibcpp_class_requires(_Sequence, _SequenceConcept)
+  __glibcpp_class_requires(_Sequence, _RandomAccessContainerConcept)
+  typedef typename _Sequence::value_type _Sequence_value_type;
+  __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept);
+  __glibcpp_class_requires4(_Compare, bool, _Tp, _Tp, _BinaryFunctionConcept);
+
+public:
+  typedef typename _Sequence::value_type      value_type;
+  typedef typename _Sequence::size_type       size_type;
+  typedef          _Sequence                  container_type;
+
+  typedef typename _Sequence::reference       reference;
+  typedef typename _Sequence::const_reference const_reference;
+protected:
+  _Sequence c;
+  _Compare comp;
+public:
+  explicit priority_queue(const _Compare& __x = _Compare(),
+			  const _Sequence& __s = _Sequence()) 
+    : c(__s), comp(__x) 
+    { make_heap(c.begin(), c.end(), comp); }
+
+  template 
+  priority_queue(_InputIterator __first, _InputIterator __last,
+                 const _Compare& __x = _Compare(),
+		 const _Sequence& __s = _Sequence())
+  : c(__s), comp(__x)
+  { 
+    c.insert(c.end(), __first, __last);
+    make_heap(c.begin(), c.end(), comp);
+  }
+
+  bool empty() const { return c.empty(); }
+  size_type size() const { return c.size(); }
+  const_reference top() const { return c.front(); }
+
+  void 
+  push(const value_type& __x) 
+  {
+    try 
+      {
+	c.push_back(__x); 
+	push_heap(c.begin(), c.end(), comp);
+      }
+    catch(...)
+      {
+	c.clear();
+	__throw_exception_again; 
+      }
+  }
+
+  void 
+  pop() 
+  {
+    try 
+      {
+	pop_heap(c.begin(), c.end(), comp);
+	c.pop_back();
+      }
+    catch(...)
+      {
+	c.clear();
+	__throw_exception_again; 
+      }
+  }
+};
+
+// no equality is provided
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_QUEUE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_raw_storage_iter.h b/contrib/libstdc++/include/bits/stl_raw_storage_iter.h
new file mode 100644
index 0000000..59aa004
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_raw_storage_iter.h
@@ -0,0 +1,112 @@
+// -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_raw_storage_iter.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H
+#define _CPP_BITS_STL_RAW_STORAGE_ITERATOR_H 1
+
+namespace std
+{
+  /**
+   *  This iterator class lets algorithms store their results into
+   *  uninitialized memory.
+  */
+  template 
+  class raw_storage_iterator 
+    : public iterator
+    {
+    protected:
+      _ForwardIterator _M_iter;
+
+    public:
+      explicit 
+      raw_storage_iterator(_ForwardIterator __x) : _M_iter(__x) {}
+
+      raw_storage_iterator& 
+      operator*() { return *this; }
+
+      raw_storage_iterator& 
+      operator=(const _Tp& __element) 
+      {
+	_Construct(&*_M_iter, __element);
+	return *this;
+      }        
+
+      raw_storage_iterator<_ForwardIterator, _Tp>& 
+      operator++() 
+      {
+	++_M_iter;
+	return *this;
+      }
+
+      raw_storage_iterator<_ForwardIterator, _Tp> 
+      operator++(int) 
+      {
+	raw_storage_iterator<_ForwardIterator, _Tp> __tmp = *this;
+	++_M_iter;
+	return __tmp;
+      }
+    };
+} // namespace std
+
+#endif
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_relops.h b/contrib/libstdc++/include/bits/stl_relops.h
new file mode 100644
index 0000000..ce3dc0b
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_relops.h
@@ -0,0 +1,141 @@
+// std::rel_ops implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file stl_relops.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ *
+ *  @if maint
+ *  Inclusion of this file has been removed from
+ *  all of the other STL headers for safety reasons, except std_utility.h.
+ *  For more information, see the thread of about twenty messages starting
+ *  with http://gcc.gnu.org/ml/libstdc++/2001-01/msg00223.html , or the
+ *  FAQ at http://gcc.gnu.org/onlinedocs/libstdc++/faq/index.html#4_4 .
+ *
+ *  Short summary:  the rel_ops operators should be avoided for the present.
+ *  @endif
+ */
+
+#ifndef _CPP_BITS_STL_RELOPS_H
+#define _CPP_BITS_STL_RELOPS_H 1
+
+namespace std
+{
+  namespace rel_ops
+  {
+      /** @namespace std::rel_ops
+       *  @brief  The generated relational operators are sequestered here.
+       */
+
+/**
+ *  @brief Defines @c != for arbitrary types, in terms of @c ==.
+ *  @param  x  A thing.
+ *  @param  y  Another thing.
+ *  @return   x != y
+ *
+ *  This function uses @c == to determine its result.
+*/
+template 
+inline bool operator!=(const _Tp& __x, const _Tp& __y) {
+  return !(__x == __y);
+}
+
+/**
+ *  @brief Defines @c > for arbitrary types, in terms of @c <.
+ *  @param  x  A thing.
+ *  @param  y  Another thing.
+ *  @return   x > y
+ *
+ *  This function uses @c < to determine its result.
+*/
+template 
+inline bool operator>(const _Tp& __x, const _Tp& __y) {
+  return __y < __x;
+}
+
+/**
+ *  @brief Defines @c <= for arbitrary types, in terms of @c <.
+ *  @param  x  A thing.
+ *  @param  y  Another thing.
+ *  @return   x <= y
+ *
+ *  This function uses @c < to determine its result.
+*/
+template 
+inline bool operator<=(const _Tp& __x, const _Tp& __y) {
+  return !(__y < __x);
+}
+
+/**
+ *  @brief Defines @c >= for arbitrary types, in terms of @c <.
+ *  @param  x  A thing.
+ *  @param  y  Another thing.
+ *  @return   x >= y
+ *
+ *  This function uses @c < to determine its result.
+*/
+template 
+inline bool operator>=(const _Tp& __x, const _Tp& __y) {
+  return !(__x < __y);
+}
+
+  } // namespace rel_ops
+} // namespace std
+
+#endif /* _CPP_BITS_STL_RELOPS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_set.h b/contrib/libstdc++/include/bits/stl_set.h
new file mode 100644
index 0000000..ee708c2
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_set.h
@@ -0,0 +1,274 @@
+// Set implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_set.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_SET_H
+#define __GLIBCPP_INTERNAL_SET_H
+
+#include 
+
+namespace std
+{
+
+// Forward declarations of operators < and ==, needed for friend declaration.
+
+template ,
+          class _Alloc = allocator<_Key> >
+class set;
+
+template 
+inline bool operator==(const set<_Key,_Compare,_Alloc>& __x, 
+                       const set<_Key,_Compare,_Alloc>& __y);
+
+template 
+inline bool operator<(const set<_Key,_Compare,_Alloc>& __x, 
+                      const set<_Key,_Compare,_Alloc>& __y);
+
+
+template 
+class set
+{
+  // concept requirements
+  __glibcpp_class_requires(_Key, _SGIAssignableConcept)
+  __glibcpp_class_requires4(_Compare, bool, _Key, _Key, _BinaryFunctionConcept);
+
+public:
+  // typedefs:
+  typedef _Key     key_type;
+  typedef _Key     value_type;
+  typedef _Compare key_compare;
+  typedef _Compare value_compare;
+private:
+  typedef _Rb_tree, key_compare, _Alloc> _Rep_type;
+  _Rep_type _M_t;  // red-black tree representing set
+public:
+  typedef typename _Rep_type::const_pointer pointer;
+  typedef typename _Rep_type::const_pointer const_pointer;
+  typedef typename _Rep_type::const_reference reference;
+  typedef typename _Rep_type::const_reference const_reference;
+  typedef typename _Rep_type::const_iterator iterator;
+  typedef typename _Rep_type::const_iterator const_iterator;
+  typedef typename _Rep_type::const_reverse_iterator reverse_iterator;
+  typedef typename _Rep_type::const_reverse_iterator const_reverse_iterator;
+  typedef typename _Rep_type::size_type size_type;
+  typedef typename _Rep_type::difference_type difference_type;
+  typedef typename _Rep_type::allocator_type allocator_type;
+
+  // allocation/deallocation
+
+  set() : _M_t(_Compare(), allocator_type()) {}
+  explicit set(const _Compare& __comp,
+               const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) {}
+
+  template 
+  set(_InputIterator __first, _InputIterator __last)
+    : _M_t(_Compare(), allocator_type())
+    { _M_t.insert_unique(__first, __last); }
+
+  template 
+  set(_InputIterator __first, _InputIterator __last, const _Compare& __comp,
+      const allocator_type& __a = allocator_type())
+    : _M_t(__comp, __a) { _M_t.insert_unique(__first, __last); }
+
+  set(const set<_Key,_Compare,_Alloc>& __x) : _M_t(__x._M_t) {}
+  set<_Key,_Compare,_Alloc>& operator=(const set<_Key, _Compare, _Alloc>& __x)
+  { 
+    _M_t = __x._M_t; 
+    return *this;
+  }
+
+  // accessors:
+
+  key_compare key_comp() const { return _M_t.key_comp(); }
+  value_compare value_comp() const { return _M_t.key_comp(); }
+  allocator_type get_allocator() const { return _M_t.get_allocator(); }
+
+  iterator begin() const { return _M_t.begin(); }
+  iterator end() const { return _M_t.end(); }
+  reverse_iterator rbegin() const { return _M_t.rbegin(); } 
+  reverse_iterator rend() const { return _M_t.rend(); }
+  bool empty() const { return _M_t.empty(); }
+  size_type size() const { return _M_t.size(); }
+  size_type max_size() const { return _M_t.max_size(); }
+  void swap(set<_Key,_Compare,_Alloc>& __x) { _M_t.swap(__x._M_t); }
+
+  // insert/erase
+  pair insert(const value_type& __x) { 
+    pair __p = _M_t.insert_unique(__x); 
+    return pair(__p.first, __p.second);
+  }
+  iterator insert(iterator __position, const value_type& __x) {
+    typedef typename _Rep_type::iterator _Rep_iterator;
+    return _M_t.insert_unique((_Rep_iterator&)__position, __x);
+  }
+  template 
+  void insert(_InputIterator __first, _InputIterator __last) {
+    _M_t.insert_unique(__first, __last);
+  }
+  void erase(iterator __position) { 
+    typedef typename _Rep_type::iterator _Rep_iterator;
+    _M_t.erase((_Rep_iterator&)__position); 
+  }
+  size_type erase(const key_type& __x) { 
+    return _M_t.erase(__x); 
+  }
+  void erase(iterator __first, iterator __last) { 
+    typedef typename _Rep_type::iterator _Rep_iterator;
+    _M_t.erase((_Rep_iterator&)__first, (_Rep_iterator&)__last); 
+  }
+  void clear() { _M_t.clear(); }
+
+  // set operations:
+
+  size_type count(const key_type& __x) const {
+    return _M_t.find(__x) == _M_t.end() ? 0 : 1;
+  }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+//214.  set::find() missing const overload
+  iterator find(const key_type& __x) { return _M_t.find(__x); }
+  const_iterator find(const key_type& __x) const { return _M_t.find(__x); }
+  iterator lower_bound(const key_type& __x) {
+    return _M_t.lower_bound(__x);
+  }
+  const_iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+  iterator upper_bound(const key_type& __x) {
+    return _M_t.upper_bound(__x); 
+  }
+  const_iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x); 
+  }
+  pair equal_range(const key_type& __x) {
+    return _M_t.equal_range(__x);
+  }
+  pair equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+#else
+  iterator find(const key_type& __x) const { return _M_t.find(__x); }
+  iterator lower_bound(const key_type& __x) const {
+    return _M_t.lower_bound(__x);
+  }
+  iterator upper_bound(const key_type& __x) const {
+    return _M_t.upper_bound(__x); 
+  }
+  pair equal_range(const key_type& __x) const {
+    return _M_t.equal_range(__x);
+  }
+#endif
+
+  template 
+  friend bool operator== (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
+  template 
+  friend bool operator< (const set<_K1,_C1,_A1>&, const set<_K1,_C1,_A1>&);
+};
+
+template 
+inline bool operator==(const set<_Key,_Compare,_Alloc>& __x, 
+                       const set<_Key,_Compare,_Alloc>& __y) {
+  return __x._M_t == __y._M_t;
+}
+
+template 
+inline bool operator<(const set<_Key,_Compare,_Alloc>& __x, 
+                      const set<_Key,_Compare,_Alloc>& __y) {
+  return __x._M_t < __y._M_t;
+}
+
+template 
+inline bool operator!=(const set<_Key,_Compare,_Alloc>& __x, 
+                       const set<_Key,_Compare,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator>(const set<_Key,_Compare,_Alloc>& __x, 
+                      const set<_Key,_Compare,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<=(const set<_Key,_Compare,_Alloc>& __x, 
+                       const set<_Key,_Compare,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool operator>=(const set<_Key,_Compare,_Alloc>& __x, 
+                       const set<_Key,_Compare,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline void swap(set<_Key,_Compare,_Alloc>& __x, 
+                 set<_Key,_Compare,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_stack.h b/contrib/libstdc++/include/bits/stl_stack.h
new file mode 100644
index 0000000..0a80b10
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_stack.h
@@ -0,0 +1,160 @@
+// Stack implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_stack.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_STACK_H
+#define __GLIBCPP_INTERNAL_STACK_H
+
+#include 
+
+namespace std
+{
+
+// Forward declarations of operators == and <, needed for friend declaration.
+
+template  >
+class stack;
+
+template 
+bool operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
+
+template 
+bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y);
+
+
+template 
+class stack
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+  __glibcpp_class_requires(_Sequence, _BackInsertionSequenceConcept)
+  typedef typename _Sequence::value_type _Sequence_value_type;
+  __glibcpp_class_requires2(_Tp, _Sequence_value_type, _SameTypeConcept);
+
+  template 
+  friend bool operator== (const stack<_Tp1, _Seq1>&,
+                          const stack<_Tp1, _Seq1>&);
+  template 
+  friend bool operator< (const stack<_Tp1, _Seq1>&,
+                         const stack<_Tp1, _Seq1>&);
+public:
+  typedef typename _Sequence::value_type      value_type;
+  typedef typename _Sequence::size_type       size_type;
+  typedef          _Sequence                  container_type;
+
+  typedef typename _Sequence::reference       reference;
+  typedef typename _Sequence::const_reference const_reference;
+protected:
+  _Sequence c;
+public:
+  stack() : c() {}
+  explicit stack(const _Sequence& __s) : c(__s) {}
+
+  bool empty() const { return c.empty(); }
+  size_type size() const { return c.size(); }
+  reference top() { return c.back(); }
+  const_reference top() const { return c.back(); }
+  void push(const value_type& __x) { c.push_back(__x); }
+  void pop() { c.pop_back(); }
+};
+
+template 
+bool operator==(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+{
+  return __x.c == __y.c;
+}
+
+template 
+bool operator<(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+{
+  return __x.c < __y.c;
+}
+
+template 
+bool operator!=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+{
+  return !(__x == __y);
+}
+
+template 
+bool operator>(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+{
+  return __y < __x;
+}
+
+template 
+bool operator<=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+{
+  return !(__y < __x);
+}
+
+template 
+bool operator>=(const stack<_Tp,_Seq>& __x, const stack<_Tp,_Seq>& __y)
+{
+  return !(__x < __y);
+}
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_STACK_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_tempbuf.h b/contrib/libstdc++/include/bits/stl_tempbuf.h
new file mode 100644
index 0000000..7b88f93
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_tempbuf.h
@@ -0,0 +1,149 @@
+// Temporary buffer implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_tempbuf.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_TEMPBUF_H
+#define __GLIBCPP_INTERNAL_TEMPBUF_H
+
+namespace std
+{
+
+/**
+ *  @if maint
+ *  This class is used in two places:  stl_algo.h and ext/memory, where it
+ *  is wrapped as the temporary_buffer class.  See temporary_buffer docs for
+ *  more notes.
+ *  @endif
+*/
+template 
+  class _Temporary_buffer
+{
+  // concept requirements
+  __glibcpp_class_requires(_ForwardIterator, _ForwardIteratorConcept)
+
+  ptrdiff_t  _M_original_len;
+  ptrdiff_t  _M_len;
+  _Tp*       _M_buffer;
+
+  // this is basically get_temporary_buffer() all over again
+  void _M_allocate_buffer() {
+    _M_original_len = _M_len;
+    _M_buffer = 0;
+
+    if (_M_len > (ptrdiff_t)(INT_MAX / sizeof(_Tp)))
+      _M_len = INT_MAX / sizeof(_Tp);
+
+    while (_M_len > 0) {
+      _M_buffer = (_Tp*) malloc(_M_len * sizeof(_Tp));
+      if (_M_buffer)
+        break;
+      _M_len /= 2;
+    }
+  }
+
+  void _M_initialize_buffer(const _Tp&, __true_type) {}
+  void _M_initialize_buffer(const _Tp& val, __false_type) {
+    uninitialized_fill_n(_M_buffer, _M_len, val);
+  }
+
+public:
+  /// As per Table mumble.
+  ptrdiff_t size() const { return _M_len; }
+  /// Returns the size requested by the constructor; may be >size().
+  ptrdiff_t requested_size() const { return _M_original_len; }
+  /// As per Table mumble.
+  _Tp* begin() { return _M_buffer; }
+  /// As per Table mumble.
+  _Tp* end() { return _M_buffer + _M_len; }
+
+  _Temporary_buffer(_ForwardIterator __first, _ForwardIterator __last) {
+    // Workaround for a __type_traits bug in the pre-7.3 compiler.
+    typedef typename __type_traits<_Tp>::has_trivial_default_constructor
+            _Trivial;
+
+    try {
+      _M_len = distance(__first, __last);
+      _M_allocate_buffer();
+      if (_M_len > 0)
+        _M_initialize_buffer(*__first, _Trivial());
+    }
+    catch(...)
+      { 
+	free(_M_buffer); 
+	_M_buffer = 0; 
+	_M_len = 0;
+	__throw_exception_again; 
+      }
+  }
+ 
+  ~_Temporary_buffer() {  
+    _Destroy(_M_buffer, _M_buffer + _M_len);
+    free(_M_buffer);
+  }
+
+private:
+  // Disable copy constructor and assignment operator.
+  _Temporary_buffer(const _Temporary_buffer&) {}
+  void operator=(const _Temporary_buffer&) {}
+};
+    
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_TEMPBUF_H */
+
diff --git a/contrib/libstdc++/include/bits/stl_threads.h b/contrib/libstdc++/include/bits/stl_threads.h
new file mode 100644
index 0000000..0150cd5
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_threads.h
@@ -0,0 +1,236 @@
+// Threading support -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_threads.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __SGI_STL_INTERNAL_THREADS_H
+#define __SGI_STL_INTERNAL_THREADS_H
+
+// The only supported threading model is GCC's own gthr.h abstraction layer.
+#include "bits/gthr.h"
+
+namespace std
+{
+  // Class _Refcount_Base provides a type, _RC_t, a data member,
+  // _M_ref_count, and member functions _M_incr and _M_decr, which perform
+  // atomic preincrement/predecrement.  The constructor initializes 
+  // _M_ref_count.
+  struct _Refcount_Base
+  {
+    // The type _RC_t
+    typedef size_t _RC_t;
+    
+    // The data member _M_ref_count
+    volatile _RC_t _M_ref_count;
+    
+    // Constructor
+    __gthread_mutex_t _M_ref_count_lock;
+
+    _Refcount_Base(_RC_t __n) : _M_ref_count(__n)
+    {
+#ifdef __GTHREAD_MUTEX_INIT
+      __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
+      _M_ref_count_lock = __tmp;
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+      __GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
+#else
+#error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to libstdc++@gcc.gnu.org.
+#endif
+    }
+
+    void 
+    _M_incr() 
+    {
+      __gthread_mutex_lock(&_M_ref_count_lock);
+      ++_M_ref_count;
+      __gthread_mutex_unlock(&_M_ref_count_lock);
+    }
+
+    _RC_t 
+    _M_decr() 
+    {
+      __gthread_mutex_lock(&_M_ref_count_lock);
+      volatile _RC_t __tmp = --_M_ref_count;
+      __gthread_mutex_unlock(&_M_ref_count_lock);
+      return __tmp;
+    }
+  };
+
+  // Atomic swap on unsigned long
+  // This is guaranteed to behave as though it were atomic only if all
+  // possibly concurrent updates use _Atomic_swap.
+  // In some cases the operation is emulated with a lock.
+#if defined (__GTHREAD_MUTEX_INIT)
+  // This could be optimized to use the atomicity.h abstraction layer.
+  // vyzo: simple _Atomic_swap implementation following the guidelines above
+  // We use a template here only to get a unique initialized instance.
+  template
+    struct _Swap_lock_struct 
+    { static __gthread_mutex_t _S_swap_lock; };
+
+  template
+    __gthread_mutex_t
+    _Swap_lock_struct<__dummy>::_S_swap_lock = __GTHREAD_MUTEX_INIT;
+
+  // This should be portable, but performance is expected to be quite
+  // awful.  This really needs platform specific code.
+  inline unsigned long 
+  _Atomic_swap(unsigned long * __p, unsigned long __q) 
+  {
+    __gthread_mutex_lock(&_Swap_lock_struct<0>::_S_swap_lock);
+    unsigned long __result = *__p;
+    *__p = __q;
+    __gthread_mutex_unlock(&_Swap_lock_struct<0>::_S_swap_lock);
+    return __result;
+  }
+#endif
+
+  // Locking class.  Note that this class *does not have a
+  // constructor*.  It must be initialized either statically, with
+  // __STL_MUTEX_INITIALIZER, or dynamically, by explicitly calling
+  // the _M_initialize member function.  (This is similar to the ways
+  // that a pthreads mutex can be initialized.)  There are explicit
+  // member functions for acquiring and releasing the lock.
+
+  // There is no constructor because static initialization is
+  // essential for some uses, and only a class aggregate (see section
+  // 8.5.1 of the C++ standard) can be initialized that way.  That
+  // means we must have no constructors, no base classes, no virtual
+  // functions, and no private or protected members.
+
+#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+  extern __gthread_mutex_t _GLIBCPP_mutex;
+  extern __gthread_mutex_t *_GLIBCPP_mutex_address;
+  extern __gthread_once_t _GLIBCPP_once;
+  extern void _GLIBCPP_mutex_init (void);
+  extern void _GLIBCPP_mutex_address_init (void);
+#endif
+
+  struct _STL_mutex_lock
+  {
+    // The class must be statically initialized with __STL_MUTEX_INITIALIZER.
+#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+    volatile int _M_init_flag;
+    __gthread_once_t _M_once;
+#endif
+    __gthread_mutex_t _M_lock;
+
+    void 
+    _M_initialize() 
+    {
+#ifdef __GTHREAD_MUTEX_INIT
+      // There should be no code in this path given the usage rules above.
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+      if (_M_init_flag) return;
+      if (__gthread_once (&_GLIBCPP_once, _GLIBCPP_mutex_init) != 0
+	  && __gthread_active_p ())
+	abort ();
+      __gthread_mutex_lock (&_GLIBCPP_mutex);
+      if (!_M_init_flag) 
+	{
+	  // Even though we have a global lock, we use __gthread_once to be
+	  // absolutely certain the _M_lock mutex is only initialized once on
+	  // multiprocessor systems.
+	  _GLIBCPP_mutex_address = &_M_lock;
+	  if (__gthread_once (&_M_once, _GLIBCPP_mutex_address_init) != 0
+	    && __gthread_active_p ())
+	    abort ();
+	  _M_init_flag = 1;
+	}
+      __gthread_mutex_unlock (&_GLIBCPP_mutex);
+#endif
+    }
+
+    void 
+    _M_acquire_lock() 
+    {
+#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+      if (!_M_init_flag) _M_initialize();
+#endif
+      __gthread_mutex_lock(&_M_lock);
+    }
+
+    void 
+    _M_release_lock() 
+    {
+#if !defined(__GTHREAD_MUTEX_INIT) && defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+      if (!_M_init_flag) _M_initialize();
+#endif
+      __gthread_mutex_unlock(&_M_lock);
+    }
+  };
+  
+#ifdef __GTHREAD_MUTEX_INIT
+#define __STL_MUTEX_INITIALIZER = { __GTHREAD_MUTEX_INIT }
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+#ifdef __GTHREAD_MUTEX_INIT_DEFAULT
+#define __STL_MUTEX_INITIALIZER \
+  = { 0, __GTHREAD_ONCE_INIT, __GTHREAD_MUTEX_INIT_DEFAULT }
+#else
+#define __STL_MUTEX_INITIALIZER = { 0, __GTHREAD_ONCE_INIT }
+#endif
+#endif
+
+  // A locking class that uses _STL_mutex_lock.  The constructor takes a
+  // reference to an _STL_mutex_lock, and acquires a lock.  The
+  // destructor releases the lock.  It's not clear that this is exactly
+  // the right functionality.  It will probably change in the future.
+  struct _STL_auto_lock
+  {
+    _STL_mutex_lock& _M_lock;
+    
+    _STL_auto_lock(_STL_mutex_lock& __lock) : _M_lock(__lock)
+    { _M_lock._M_acquire_lock(); }
+
+    ~_STL_auto_lock() { _M_lock._M_release_lock(); }
+
+  private:
+    void operator=(const _STL_auto_lock&);
+    _STL_auto_lock(const _STL_auto_lock&);
+  };
+  
+} // namespace std
+
+#endif 
diff --git a/contrib/libstdc++/include/bits/stl_tree.h b/contrib/libstdc++/include/bits/stl_tree.h
new file mode 100644
index 0000000..d2ae142
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_tree.h
@@ -0,0 +1,1462 @@
+// RB tree implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ */
+
+/** @file stl_tree.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_TREE_H
+#define __GLIBCPP_INTERNAL_TREE_H
+
+/*
+
+Red-black tree class, designed for use in implementing STL
+associative containers (set, multiset, map, and multimap). The
+insertion and deletion algorithms are based on those in Cormen,
+Leiserson, and Rivest, Introduction to Algorithms (MIT Press, 1990),
+except that
+
+(1) the header cell is maintained with links not only to the root
+but also to the leftmost node of the tree, to enable constant time
+begin(), and to the rightmost node of the tree, to enable linear time
+performance when used with the generic set algorithms (set_union,
+etc.);
+
+(2) when a node being deleted has two children its successor node is
+relinked into its place, rather than copied, so that the only
+iterators invalidated are those referring to the deleted node.
+
+*/
+
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{ 
+  enum _Rb_tree_color { _M_red = false, _M_black = true };
+
+  struct _Rb_tree_node_base
+  {
+    typedef _Rb_tree_node_base* _Base_ptr;
+    
+    _Rb_tree_color 	_M_color; 
+    _Base_ptr 		_M_parent;
+    _Base_ptr 		_M_left;
+    _Base_ptr 		_M_right;
+    
+    static _Base_ptr 
+    _S_minimum(_Base_ptr __x)
+    {
+      while (__x->_M_left != 0) __x = __x->_M_left;
+      return __x;
+    }
+
+    static _Base_ptr 
+    _S_maximum(_Base_ptr __x)
+    {
+      while (__x->_M_right != 0) __x = __x->_M_right;
+      return __x;
+    }
+  };
+
+  template
+    struct _Rb_tree_node : public _Rb_tree_node_base
+    {
+      typedef _Rb_tree_node<_Val>* _Link_type;
+      _Val _M_value_field;
+    };
+  
+  struct _Rb_tree_base_iterator
+  {
+    typedef _Rb_tree_node_base::_Base_ptr 	_Base_ptr;
+    typedef bidirectional_iterator_tag 		iterator_category;
+    typedef ptrdiff_t 				difference_type;
+
+    _Base_ptr _M_node;
+
+    void 
+    _M_increment()
+    {
+      if (_M_node->_M_right != 0) 
+	{
+	  _M_node = _M_node->_M_right;
+	  while (_M_node->_M_left != 0)
+	    _M_node = _M_node->_M_left;
+	}
+      else 
+	{
+	  _Base_ptr __y = _M_node->_M_parent;
+	  while (_M_node == __y->_M_right) 
+	    {
+	      _M_node = __y;
+	      __y = __y->_M_parent;
+	    }
+	  if (_M_node->_M_right != __y)
+	    _M_node = __y;
+	}
+    }
+
+    void 
+    _M_decrement()
+    {
+      if (_M_node->_M_color == _M_red 
+	  && _M_node->_M_parent->_M_parent == _M_node)
+	_M_node = _M_node->_M_right;
+      else if (_M_node->_M_left != 0) 
+	{
+	  _Base_ptr __y = _M_node->_M_left;
+	  while (__y->_M_right != 0)
+	    __y = __y->_M_right;
+	  _M_node = __y;
+	}
+      else 
+	{
+	  _Base_ptr __y = _M_node->_M_parent;
+	  while (_M_node == __y->_M_left) 
+	    {
+	      _M_node = __y;
+	      __y = __y->_M_parent;
+	    }
+	  _M_node = __y;
+	}
+    }
+  };
+
+  template
+    struct _Rb_tree_iterator : public _Rb_tree_base_iterator
+    {
+      typedef _Val value_type;
+      typedef _Ref reference;
+      typedef _Ptr pointer;
+      typedef _Rb_tree_iterator<_Val, _Val&, _Val*> iterator;
+      typedef _Rb_tree_iterator<_Val, const _Val&, const _Val*> 
+      const_iterator;
+      typedef _Rb_tree_iterator<_Val, _Ref, _Ptr> _Self;
+      typedef _Rb_tree_node<_Val>* _Link_type;
+      
+      _Rb_tree_iterator() {}
+      _Rb_tree_iterator(_Link_type __x) { _M_node = __x; }
+      _Rb_tree_iterator(const iterator& __it) { _M_node = __it._M_node; }
+
+      reference 
+      operator*() const { return _Link_type(_M_node)->_M_value_field; }
+
+      pointer 
+      operator->() const { return &(operator*()); }
+
+      _Self& 
+      operator++() 
+      { 
+	_M_increment(); 
+	return *this; 
+      }
+
+      _Self 
+      operator++(int) 
+      {
+	_Self __tmp = *this;
+	_M_increment();
+	return __tmp;
+      }
+    
+      _Self& 
+      operator--() { _M_decrement(); return *this; }
+
+      _Self 
+      operator--(int) 
+      {
+	_Self __tmp = *this;
+	_M_decrement();
+	return __tmp;
+      }
+  };
+
+  template
+    inline bool 
+    operator==(const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __x,
+	       const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __y) 
+    { return __x._M_node == __y._M_node; }
+
+  template
+    inline bool 
+    operator==(const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __x,
+	       const _Rb_tree_iterator<_Val, _Val&, _Val*>& __y) 
+    { return __x._M_node == __y._M_node; }
+
+  template
+    inline bool 
+    operator==(const _Rb_tree_iterator<_Val, _Val&, _Val*>& __x,
+	       const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __y) 
+    { return __x._M_node == __y._M_node; }
+
+  template
+    inline bool 
+    operator!=(const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __x,
+	       const _Rb_tree_iterator<_Val, _Ref, _Ptr>& __y) 
+    { return __x._M_node != __y._M_node; }
+
+  template
+    inline bool 
+    operator!=(const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __x,
+	       const _Rb_tree_iterator<_Val, _Val&, _Val*>& __y) 
+    { return __x._M_node != __y._M_node; }
+
+  template
+    inline bool 
+    operator!=(const _Rb_tree_iterator<_Val, _Val&, _Val*>& __x,
+	       const _Rb_tree_iterator<_Val, const _Val&, const _Val*>& __y) 
+    { return __x._M_node != __y._M_node; }
+
+  inline void 
+  _Rb_tree_rotate_left(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
+  {
+    _Rb_tree_node_base* __y = __x->_M_right;
+    __x->_M_right = __y->_M_left;
+    if (__y->_M_left !=0)
+      __y->_M_left->_M_parent = __x;
+    __y->_M_parent = __x->_M_parent;
+    
+    if (__x == __root)
+      __root = __y;
+    else if (__x == __x->_M_parent->_M_left)
+      __x->_M_parent->_M_left = __y;
+    else
+      __x->_M_parent->_M_right = __y;
+    __y->_M_left = __x;
+    __x->_M_parent = __y;
+  }
+
+  inline void 
+  _Rb_tree_rotate_right(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
+  {
+    _Rb_tree_node_base* __y = __x->_M_left;
+    __x->_M_left = __y->_M_right;
+    if (__y->_M_right != 0)
+      __y->_M_right->_M_parent = __x;
+    __y->_M_parent = __x->_M_parent;
+
+    if (__x == __root)
+      __root = __y;
+    else if (__x == __x->_M_parent->_M_right)
+      __x->_M_parent->_M_right = __y;
+    else
+      __x->_M_parent->_M_left = __y;
+    __y->_M_right = __x;
+    __x->_M_parent = __y;
+  }
+
+  inline void 
+  _Rb_tree_rebalance(_Rb_tree_node_base* __x, _Rb_tree_node_base*& __root)
+  {
+    __x->_M_color = _M_red;
+    while (__x != __root 
+	   && __x->_M_parent->_M_color == _M_red) 
+      {
+	if (__x->_M_parent == __x->_M_parent->_M_parent->_M_left) 
+	  {
+	    _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_right;
+	    if (__y && __y->_M_color == _M_red) 
+	      {
+		__x->_M_parent->_M_color = _M_black;
+		__y->_M_color = _M_black;
+		__x->_M_parent->_M_parent->_M_color = _M_red;
+		__x = __x->_M_parent->_M_parent;
+	      }
+	    else 
+	      {
+		if (__x == __x->_M_parent->_M_right) 
+		  {
+		    __x = __x->_M_parent;
+		    _Rb_tree_rotate_left(__x, __root);
+		  }
+		__x->_M_parent->_M_color = _M_black;
+		__x->_M_parent->_M_parent->_M_color = _M_red;
+		_Rb_tree_rotate_right(__x->_M_parent->_M_parent, __root);
+	      }
+	  }
+	else 
+	  {
+	    _Rb_tree_node_base* __y = __x->_M_parent->_M_parent->_M_left;
+	    if (__y && __y->_M_color == _M_red) 
+	      {
+		__x->_M_parent->_M_color = _M_black;
+		__y->_M_color = _M_black;
+		__x->_M_parent->_M_parent->_M_color = _M_red;
+		__x = __x->_M_parent->_M_parent;
+	      }
+	    else 
+	      {
+		if (__x == __x->_M_parent->_M_left) 
+		  {
+		    __x = __x->_M_parent;
+		    _Rb_tree_rotate_right(__x, __root);
+		  }
+		__x->_M_parent->_M_color = _M_black;
+		__x->_M_parent->_M_parent->_M_color = _M_red;
+		_Rb_tree_rotate_left(__x->_M_parent->_M_parent, __root);
+	      }
+	  }
+      }
+    __root->_M_color = _M_black;
+  }
+
+  inline _Rb_tree_node_base*
+  _Rb_tree_rebalance_for_erase(_Rb_tree_node_base* __z, 
+			       _Rb_tree_node_base*& __root,
+			       _Rb_tree_node_base*& __leftmost,
+			       _Rb_tree_node_base*& __rightmost)
+  {
+    _Rb_tree_node_base* __y = __z;
+    _Rb_tree_node_base* __x = 0;
+    _Rb_tree_node_base* __x_parent = 0;
+    if (__y->_M_left == 0)     // __z has at most one non-null child. y == z.
+      __x = __y->_M_right;     // __x might be null.
+    else
+      if (__y->_M_right == 0)  // __z has exactly one non-null child. y == z.
+	__x = __y->_M_left;    // __x is not null.
+      else 
+	{
+	  // __z has two non-null children.  Set __y to
+	  __y = __y->_M_right;   //   __z's successor.  __x might be null.
+	  while (__y->_M_left != 0)
+	    __y = __y->_M_left;
+	  __x = __y->_M_right;
+	}
+    if (__y != __z) 
+      {
+	// relink y in place of z.  y is z's successor
+	__z->_M_left->_M_parent = __y; 
+	__y->_M_left = __z->_M_left;
+	if (__y != __z->_M_right) 
+	  {
+	    __x_parent = __y->_M_parent;
+	    if (__x) __x->_M_parent = __y->_M_parent;
+	    __y->_M_parent->_M_left = __x;   // __y must be a child of _M_left
+	    __y->_M_right = __z->_M_right;
+	    __z->_M_right->_M_parent = __y;
+	  }
+	else
+	  __x_parent = __y;  
+	if (__root == __z)
+	  __root = __y;
+	else if (__z->_M_parent->_M_left == __z)
+	  __z->_M_parent->_M_left = __y;
+	else 
+	  __z->_M_parent->_M_right = __y;
+	__y->_M_parent = __z->_M_parent;
+	std::swap(__y->_M_color, __z->_M_color);
+	__y = __z;
+	// __y now points to node to be actually deleted
+      }
+    else 
+      {                        // __y == __z
+	__x_parent = __y->_M_parent;
+	if (__x) 
+	  __x->_M_parent = __y->_M_parent;   
+	if (__root == __z)
+	  __root = __x;
+	else 
+	  if (__z->_M_parent->_M_left == __z)
+	    __z->_M_parent->_M_left = __x;
+	  else
+	    __z->_M_parent->_M_right = __x;
+	if (__leftmost == __z) 
+	  if (__z->_M_right == 0)        // __z->_M_left must be null also
+	    __leftmost = __z->_M_parent;
+	// makes __leftmost == _M_header if __z == __root
+	  else
+	    __leftmost = _Rb_tree_node_base::_S_minimum(__x);
+	if (__rightmost == __z)  
+	  if (__z->_M_left == 0)         // __z->_M_right must be null also
+	    __rightmost = __z->_M_parent;  
+	// makes __rightmost == _M_header if __z == __root
+	  else                      // __x == __z->_M_left
+	    __rightmost = _Rb_tree_node_base::_S_maximum(__x);
+      }
+    if (__y->_M_color != _M_red) 
+      { 
+	while (__x != __root && (__x == 0 || __x->_M_color == _M_black))
+	  if (__x == __x_parent->_M_left) 
+	    {
+	      _Rb_tree_node_base* __w = __x_parent->_M_right;
+	      if (__w->_M_color == _M_red) 
+		{
+		  __w->_M_color = _M_black;
+		  __x_parent->_M_color = _M_red;
+		  _Rb_tree_rotate_left(__x_parent, __root);
+		  __w = __x_parent->_M_right;
+		}
+	      if ((__w->_M_left == 0 || 
+		   __w->_M_left->_M_color == _M_black) &&
+		  (__w->_M_right == 0 || 
+		   __w->_M_right->_M_color == _M_black)) 
+		{
+		  __w->_M_color = _M_red;
+		  __x = __x_parent;
+		  __x_parent = __x_parent->_M_parent;
+		} 
+	      else 
+		{
+		  if (__w->_M_right == 0 
+		      || __w->_M_right->_M_color == _M_black) 
+		    {
+		      if (__w->_M_left) __w->_M_left->_M_color = _M_black;
+		      __w->_M_color = _M_red;
+		      _Rb_tree_rotate_right(__w, __root);
+		      __w = __x_parent->_M_right;
+		    }
+		  __w->_M_color = __x_parent->_M_color;
+		  __x_parent->_M_color = _M_black;
+		  if (__w->_M_right) 
+		    __w->_M_right->_M_color = _M_black;
+		  _Rb_tree_rotate_left(__x_parent, __root);
+		  break;
+		}
+	    } 
+	  else 
+	    {   
+	      // same as above, with _M_right <-> _M_left.
+	      _Rb_tree_node_base* __w = __x_parent->_M_left;
+	      if (__w->_M_color == _M_red) 
+		{
+		  __w->_M_color = _M_black;
+		  __x_parent->_M_color = _M_red;
+		  _Rb_tree_rotate_right(__x_parent, __root);
+		  __w = __x_parent->_M_left;
+		}
+	      if ((__w->_M_right == 0 || 
+		   __w->_M_right->_M_color == _M_black) &&
+		  (__w->_M_left == 0 || 
+		   __w->_M_left->_M_color == _M_black)) 
+		{
+		  __w->_M_color = _M_red;
+		  __x = __x_parent;
+		  __x_parent = __x_parent->_M_parent;
+		} 
+	      else 
+		{
+		  if (__w->_M_left == 0 || __w->_M_left->_M_color == _M_black) 
+		    {
+		      if (__w->_M_right) __w->_M_right->_M_color = _M_black;
+		      __w->_M_color = _M_red;
+		      _Rb_tree_rotate_left(__w, __root);
+		      __w = __x_parent->_M_left;
+		    }
+		  __w->_M_color = __x_parent->_M_color;
+		  __x_parent->_M_color = _M_black;
+		  if (__w->_M_left) 
+		    __w->_M_left->_M_color = _M_black;
+		  _Rb_tree_rotate_right(__x_parent, __root);
+		  break;
+		}
+	    }
+	if (__x) __x->_M_color = _M_black;
+      }
+    return __y;
+  }
+
+  // Base class to encapsulate the differences between old SGI-style
+  // allocators and standard-conforming allocators.  In order to avoid
+  // having an empty base class, we arbitrarily move one of rb_tree's
+  // data members into the base class.
+
+  // _Base for general standard-conforming allocators.
+  template
+    class _Rb_tree_alloc_base 
+    {
+    public:
+    typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
+
+      allocator_type 
+      get_allocator() const { return _M_node_allocator; }
+
+      _Rb_tree_alloc_base(const allocator_type& __a)
+      : _M_node_allocator(__a), _M_header(0) {}
+
+    protected:
+      typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::allocator_type
+      _M_node_allocator;
+
+      _Rb_tree_node<_Tp>* _M_header;
+      
+      _Rb_tree_node<_Tp>* 
+      _M_get_node()  { return _M_node_allocator.allocate(1); }
+
+      void 
+      _M_put_node(_Rb_tree_node<_Tp>* __p) 
+      { _M_node_allocator.deallocate(__p, 1); }
+    };
+
+  // Specialization for instanceless allocators.
+  template
+    class _Rb_tree_alloc_base<_Tp, _Alloc, true> 
+    {
+    public:
+    typedef typename _Alloc_traits<_Tp, _Alloc>::allocator_type allocator_type;
+      allocator_type get_allocator() const { return allocator_type(); }
+
+      _Rb_tree_alloc_base(const allocator_type&) : _M_header(0) {}
+
+    protected:
+      _Rb_tree_node<_Tp>* _M_header;
+      
+      typedef typename _Alloc_traits<_Rb_tree_node<_Tp>, _Alloc>::_Alloc_type
+      _Alloc_type;
+      
+      _Rb_tree_node<_Tp>* 
+      _M_get_node() { return _Alloc_type::allocate(1); }
+
+      void 
+      _M_put_node(_Rb_tree_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); }
+    };
+  
+  template
+    struct _Rb_tree_base : public _Rb_tree_alloc_base<_Tp, _Alloc, 
+                                  _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+    {
+      typedef _Rb_tree_alloc_base<_Tp, 
+	_Alloc, _Alloc_traits<_Tp, _Alloc>::_S_instanceless> _Base;
+      typedef typename _Base::allocator_type allocator_type;
+
+      _Rb_tree_base(const allocator_type& __a) 
+      : _Base(__a) { _M_header = _M_get_node(); }
+      ~_Rb_tree_base() { _M_put_node(_M_header); }
+    };
+
+
+  template >
+    class _Rb_tree : protected _Rb_tree_base<_Val, _Alloc> 
+    {
+      typedef _Rb_tree_base<_Val, _Alloc> _Base;
+      
+    protected:
+      typedef _Rb_tree_node_base* _Base_ptr;
+      typedef _Rb_tree_node<_Val> _Rb_tree_node;
+      
+    public:
+      typedef _Key key_type;
+      typedef _Val value_type;
+      typedef value_type* pointer;
+      typedef const value_type* const_pointer;
+      typedef value_type& reference;
+      typedef const value_type& const_reference;
+      typedef _Rb_tree_node* _Link_type;
+      typedef size_t size_type;
+      typedef ptrdiff_t difference_type;
+      
+      typedef typename _Base::allocator_type allocator_type;
+      allocator_type get_allocator() const { return _Base::get_allocator(); }
+      
+    protected:
+      using _Base::_M_get_node;
+      using _Base::_M_put_node;
+      using _Base::_M_header;
+      
+      _Link_type
+      _M_create_node(const value_type& __x)
+      {
+	_Link_type __tmp = _M_get_node();
+	try 
+	  { _Construct(&__tmp->_M_value_field, __x); }
+	catch(...)
+	  {
+	  _M_put_node(__tmp);
+	  __throw_exception_again; 
+	  }
+	return __tmp;
+      }
+      
+      _Link_type 
+      _M_clone_node(_Link_type __x)
+      {
+	_Link_type __tmp = _M_create_node(__x->_M_value_field);
+	__tmp->_M_color = __x->_M_color;
+	__tmp->_M_left = 0;
+	__tmp->_M_right = 0;
+	return __tmp;
+      }
+
+      void
+      destroy_node(_Link_type __p)
+      {
+	_Destroy(&__p->_M_value_field);
+	_M_put_node(__p);
+      }
+
+      size_type _M_node_count; // keeps track of size of tree
+      _Compare _M_key_compare;
+
+      _Link_type& 
+      _M_root() const { return (_Link_type&) _M_header->_M_parent; }
+
+      _Link_type& 
+      _M_leftmost() const { return (_Link_type&) _M_header->_M_left; }
+
+      _Link_type& 
+      _M_rightmost() const { return (_Link_type&) _M_header->_M_right; }
+
+      static _Link_type& 
+      _S_left(_Link_type __x) { return (_Link_type&)(__x->_M_left); }
+
+      static _Link_type& 
+      _S_right(_Link_type __x) { return (_Link_type&)(__x->_M_right); }
+
+      static _Link_type& 
+      _S_parent(_Link_type __x) { return (_Link_type&)(__x->_M_parent); }
+
+      static reference 
+      _S_value(_Link_type __x) { return __x->_M_value_field; }
+
+      static const _Key& 
+      _S_key(_Link_type __x) { return _KeyOfValue()(_S_value(__x)); }
+
+      static _Rb_tree_color& 
+      _S_color(_Link_type __x) { return __x->_M_color; }
+
+      static _Link_type& 
+      _S_left(_Base_ptr __x) { return (_Link_type&)(__x->_M_left); }
+
+      static _Link_type& 
+      _S_right(_Base_ptr __x) { return (_Link_type&)(__x->_M_right); }
+
+      static _Link_type& 
+      _S_parent(_Base_ptr __x) { return (_Link_type&)(__x->_M_parent); }
+
+      static reference 
+      _S_value(_Base_ptr __x) { return ((_Link_type)__x)->_M_value_field; }
+
+      static const _Key& 
+      _S_key(_Base_ptr __x) { return _KeyOfValue()(_S_value(_Link_type(__x)));} 
+
+      static _Rb_tree_color&
+      _S_color(_Base_ptr __x) { return (_Link_type(__x)->_M_color); }
+
+      static _Link_type 
+      _S_minimum(_Link_type __x) 
+      { return (_Link_type)  _Rb_tree_node_base::_S_minimum(__x); }
+
+      static _Link_type 
+      _S_maximum(_Link_type __x)
+      { return (_Link_type) _Rb_tree_node_base::_S_maximum(__x); }
+
+    public:
+      typedef _Rb_tree_iterator iterator;
+      typedef _Rb_tree_iterator 
+      const_iterator;
+
+      typedef reverse_iterator const_reverse_iterator;
+      typedef reverse_iterator reverse_iterator;
+
+    private:
+      iterator 
+      _M_insert(_Base_ptr __x, _Base_ptr __y, const value_type& __v);
+
+      _Link_type 
+      _M_copy(_Link_type __x, _Link_type __p);
+
+      void 
+      _M_erase(_Link_type __x);
+
+    public:
+      // allocation/deallocation
+      _Rb_tree()
+	: _Base(allocator_type()), _M_node_count(0), _M_key_compare()
+      { _M_empty_initialize(); }
+
+      _Rb_tree(const _Compare& __comp)
+	: _Base(allocator_type()), _M_node_count(0), _M_key_compare(__comp) 
+      { _M_empty_initialize(); }
+
+      _Rb_tree(const _Compare& __comp, const allocator_type& __a)
+	: _Base(__a), _M_node_count(0), _M_key_compare(__comp) 
+      { _M_empty_initialize(); }
+
+      _Rb_tree(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x) 
+	: _Base(__x.get_allocator()), _M_node_count(0), 
+		 _M_key_compare(__x._M_key_compare)
+      { 
+	if (__x._M_root() == 0)
+	  _M_empty_initialize();
+	else 
+	  {
+	    _S_color(_M_header) = _M_red;
+	    _M_root() = _M_copy(__x._M_root(), _M_header);
+	    _M_leftmost() = _S_minimum(_M_root());
+	    _M_rightmost() = _S_maximum(_M_root());
+	  }
+	_M_node_count = __x._M_node_count;
+      }
+
+      ~_Rb_tree() { clear(); }
+
+      _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& 
+      operator=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x);
+
+    private:
+      void _M_empty_initialize() 
+      {
+	_S_color(_M_header) = _M_red; // used to distinguish header from 
+	// __root, in iterator.operator++
+	_M_root() = 0;
+	_M_leftmost() = _M_header;
+	_M_rightmost() = _M_header;
+      }
+
+    public:    
+      // Accessors.
+      _Compare 
+      key_comp() const { return _M_key_compare; }
+
+      iterator 
+      begin() { return _M_leftmost(); }
+
+      const_iterator 
+      begin() const { return _M_leftmost(); }
+
+      iterator 
+      end() { return _M_header; }
+
+      const_iterator 
+      end() const { return _M_header; }
+
+      reverse_iterator 
+      rbegin() { return reverse_iterator(end()); }
+
+      const_reverse_iterator 
+      rbegin() const { return const_reverse_iterator(end()); }
+
+      reverse_iterator 
+      rend() { return reverse_iterator(begin()); }
+
+      const_reverse_iterator 
+      rend() const { return const_reverse_iterator(begin()); }
+ 
+      bool 
+      empty() const { return _M_node_count == 0; }
+
+      size_type 
+      size() const { return _M_node_count; }
+
+      size_type 
+      max_size() const { return size_type(-1); }
+
+      void 
+      swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __t) 
+      {
+	std::swap(_M_header, __t._M_header);
+	std::swap(_M_node_count, __t._M_node_count);
+	std::swap(_M_key_compare, __t._M_key_compare);
+      }
+    
+      // Insert/erase.
+      pair 
+      insert_unique(const value_type& __x);
+
+      iterator 
+      insert_equal(const value_type& __x);
+
+      iterator 
+      insert_unique(iterator __position, const value_type& __x);
+
+      iterator 
+      insert_equal(iterator __position, const value_type& __x);
+
+      template
+      void 
+      insert_unique(_InputIterator __first, _InputIterator __last);
+
+      template
+      void 
+      insert_equal(_InputIterator __first, _InputIterator __last);
+
+      void 
+      erase(iterator __position);
+
+      size_type 
+      erase(const key_type& __x);
+
+      void 
+      erase(iterator __first, iterator __last);
+
+      void 
+      erase(const key_type* __first, const key_type* __last);
+
+      void 
+      clear() 
+      {
+	if (_M_node_count != 0) 
+	  {
+	    _M_erase(_M_root());
+	    _M_leftmost() = _M_header;
+	    _M_root() = 0;
+	    _M_rightmost() = _M_header;
+	    _M_node_count = 0;
+	  }
+      }      
+
+      // Set operations.
+      iterator 
+      find(const key_type& __x);
+
+      const_iterator 
+      find(const key_type& __x) const;
+
+      size_type 
+      count(const key_type& __x) const;
+
+      iterator 
+      lower_bound(const key_type& __x);
+
+      const_iterator 
+      lower_bound(const key_type& __x) const;
+
+      iterator 
+      upper_bound(const key_type& __x);
+
+      const_iterator 
+      upper_bound(const key_type& __x) const;
+
+      pair 
+      equal_range(const key_type& __x);
+
+      pair 
+      equal_range(const key_type& __x) const;
+
+      // Debugging.
+      bool 
+      __rb_verify() const;
+    };
+
+  template
+    inline bool 
+    operator==(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	       const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+    {
+      return __x.size() == __y.size() && 
+	equal(__x.begin(), __x.end(), __y.begin());
+    }
+
+  template
+    inline bool 
+    operator<(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	      const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+    {
+      return lexicographical_compare(__x.begin(), __x.end(),
+				     __y.begin(), __y.end());
+    }
+
+  template
+    inline bool 
+    operator!=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	       const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y) 
+    { return !(__x == __y); }
+
+  template
+    inline bool 
+    operator>(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	      const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y) 
+    { return __y < __x; }
+
+  template
+    inline bool 
+    operator<=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	       const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y) 
+  { return !(__y < __x); }
+
+  template
+    inline bool 
+    operator>=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	       const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y) 
+  { return !(__x < __y); }
+
+  template
+    inline void 
+    swap(_Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x, 
+	 _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __y)
+    { __x.swap(__y); }
+
+  template
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    operator=(const _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>& __x)
+    {
+      if (this != &__x) 
+	{
+	  // Note that _Key may be a constant type.
+	  clear();
+	  _M_node_count = 0;
+	  _M_key_compare = __x._M_key_compare;        
+	  if (__x._M_root() == 0) 
+	    {
+	      _M_root() = 0;
+	      _M_leftmost() = _M_header;
+	      _M_rightmost() = _M_header;
+	    }
+	  else 
+	    {
+	      _M_root() = _M_copy(__x._M_root(), _M_header);
+	      _M_leftmost() = _S_minimum(_M_root());
+	      _M_rightmost() = _S_maximum(_M_root());
+	      _M_node_count = __x._M_node_count;
+	    }
+	}
+      return *this;
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    _M_insert(_Base_ptr __x_, _Base_ptr __y_, const _Val& __v)
+    {
+      _Link_type __x = (_Link_type) __x_;
+      _Link_type __y = (_Link_type) __y_;
+      _Link_type __z;
+      
+      if (__y == _M_header || __x != 0 || 
+	  _M_key_compare(_KeyOfValue()(__v), _S_key(__y))) 
+	{
+	  __z = _M_create_node(__v);
+	  _S_left(__y) = __z;               // also makes _M_leftmost() = __z 
+	  //    when __y == _M_header
+	  if (__y == _M_header) 
+	    {
+	      _M_root() = __z;
+	      _M_rightmost() = __z;
+	    }
+	  else if (__y == _M_leftmost())
+	    _M_leftmost() = __z; // maintain _M_leftmost() pointing to min node
+	}
+      else 
+	{
+	  __z = _M_create_node(__v);
+	  _S_right(__y) = __z;
+	  // Maintain _M_rightmost() pointing to max node.
+	  if (__y == _M_rightmost())
+	    _M_rightmost() = __z; 
+	}
+      _S_parent(__z) = __y;
+      _S_left(__z) = 0;
+      _S_right(__z) = 0;
+      _Rb_tree_rebalance(__z, _M_header->_M_parent);
+      ++_M_node_count;
+      return iterator(__z);
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    insert_equal(const _Val& __v)
+    {
+      _Link_type __y = _M_header;
+      _Link_type __x = _M_root();
+      while (__x != 0) 
+	{
+	  __y = __x;
+	  __x = _M_key_compare(_KeyOfValue()(__v), _S_key(__x)) ? 
+	    _S_left(__x) : _S_right(__x);
+	}
+      return _M_insert(__x, __y, __v);
+    }
+
+  template
+    pair::iterator, 
+    bool>
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    insert_unique(const _Val& __v)
+    {
+      _Link_type __y = _M_header;
+      _Link_type __x = _M_root();
+      bool __comp = true;
+      while (__x != 0) 
+	{
+	  __y = __x;
+	  __comp = _M_key_compare(_KeyOfValue()(__v), _S_key(__x));
+	  __x = __comp ? _S_left(__x) : _S_right(__x);
+	}
+      iterator __j = iterator(__y);   
+      if (__comp)
+	if (__j == begin())     
+	  return pair(_M_insert(__x, __y, __v), true);
+	else
+	  --__j;
+      if (_M_key_compare(_S_key(__j._M_node), _KeyOfValue()(__v)))
+	return pair(_M_insert(__x, __y, __v), true);
+      return pair(__j, false);
+    }
+  
+
+  template
+    typename _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::iterator 
+    _Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::
+    insert_unique(iterator __position, const _Val& __v)
+    {
+      if (__position._M_node == _M_header->_M_left) 
+	{ 
+	  // begin()
+	  if (size() > 0 && 
+	      _M_key_compare(_KeyOfValue()(__v), _S_key(__position._M_node)))
+	    return _M_insert(__position._M_node, __position._M_node, __v);
+	  // first argument just needs to be non-null 
+	  else
+	    return insert_unique(__v).first;
+	} 
+      else if (__position._M_node == _M_header) 
+	{ 
+	  // end()
+	  if (_M_key_compare(_S_key(_M_rightmost()), _KeyOfValue()(__v)))
+	    return _M_insert(0, _M_rightmost(), __v);
+	  else
+	    return insert_unique(__v).first;
+	} 
+      else 
+	{
+	  iterator __before = __position;
+	  --__before;
+	  if (_M_key_compare(_S_key(__before._M_node), _KeyOfValue()(__v)) 
+	      && _M_key_compare(_KeyOfValue()(__v),_S_key(__position._M_node)))
+	    {
+	      if (_S_right(__before._M_node) == 0)
+		return _M_insert(0, __before._M_node, __v); 
+	      else
+		return _M_insert(__position._M_node, __position._M_node, __v);
+	      // first argument just needs to be non-null 
+	    } 
+	  else
+	    return insert_unique(__v).first;
+	}
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    insert_equal(iterator __position, const _Val& __v)
+    {
+      if (__position._M_node == _M_header->_M_left) 
+	{ 
+	  // begin()
+	  if (size() > 0 && 
+	      !_M_key_compare(_S_key(__position._M_node), _KeyOfValue()(__v)))
+	    return _M_insert(__position._M_node, __position._M_node, __v);
+	  // first argument just needs to be non-null 
+	  else
+	    return insert_equal(__v);
+	} 
+      else if (__position._M_node == _M_header) 
+	{
+	  // end()
+	  if (!_M_key_compare(_KeyOfValue()(__v), _S_key(_M_rightmost())))
+	    return _M_insert(0, _M_rightmost(), __v);
+	  else
+	    return insert_equal(__v);
+	} 
+      else 
+	{
+	  iterator __before = __position;
+	  --__before;
+	  if (!_M_key_compare(_KeyOfValue()(__v), _S_key(__before._M_node))
+	      && !_M_key_compare(_S_key(__position._M_node),
+				 _KeyOfValue()(__v))) 
+	    {
+	      if (_S_right(__before._M_node) == 0)
+		return _M_insert(0, __before._M_node, __v); 
+	      else
+		return _M_insert(__position._M_node, __position._M_node, __v);
+	      // first argument just needs to be non-null 
+	    } 
+	  else
+	    return insert_equal(__v);
+	}
+    }
+
+  template
+    template
+      void 
+      _Rb_tree<_Key,_Val,_KoV,_Cmp,_Alloc>::
+      insert_equal(_II __first, _II __last)
+      {
+	for ( ; __first != __last; ++__first)
+	  insert_equal(*__first);
+      }
+
+  template 
+    template
+    void 
+    _Rb_tree<_Key,_Val,_KoV,_Cmp,_Alloc>::
+    insert_unique(_II __first, _II __last) 
+    {
+      for ( ; __first != __last; ++__first)
+	insert_unique(*__first);
+    }
+
+  template
+    inline void 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(iterator __position)
+    {
+      _Link_type __y = 
+	(_Link_type) _Rb_tree_rebalance_for_erase(__position._M_node,
+						  _M_header->_M_parent,
+						  _M_header->_M_left,
+						  _M_header->_M_right);
+      destroy_node(__y);
+      --_M_node_count;
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::erase(const _Key& __x)
+    {
+      pair __p = equal_range(__x);
+      size_type __n = distance(__p.first, __p.second);
+      erase(__p.first, __p.second);
+      return __n;
+    }
+
+  template
+    typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::_Link_type 
+    _Rb_tree<_Key,_Val,_KoV,_Compare,_Alloc>::
+    _M_copy(_Link_type __x, _Link_type __p)
+    {
+      // Structural copy.  __x and __p must be non-null.
+      _Link_type __top = _M_clone_node(__x);
+      __top->_M_parent = __p;
+      
+      try 
+	{
+	  if (__x->_M_right)
+	    __top->_M_right = _M_copy(_S_right(__x), __top);
+	  __p = __top;
+	  __x = _S_left(__x);
+	  
+	  while (__x != 0) 
+	    {
+	      _Link_type __y = _M_clone_node(__x);
+	      __p->_M_left = __y;
+	      __y->_M_parent = __p;
+	      if (__x->_M_right)
+		__y->_M_right = _M_copy(_S_right(__x), __y);
+	      __p = __y;
+	      __x = _S_left(__x);
+	    }
+	}
+      catch(...)
+	{
+	  _M_erase(__top);
+	  __throw_exception_again; 
+	}
+      return __top;
+    }
+
+  template
+    void 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::_M_erase(_Link_type __x)
+    {
+      // Erase without rebalancing.
+      while (__x != 0) 
+	{
+	  _M_erase(_S_right(__x));
+	  _Link_type __y = _S_left(__x);
+	  destroy_node(__x);
+	  __x = __y;
+	}
+    }
+
+  template
+    void 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    erase(iterator __first, iterator __last)
+    {
+      if (__first == begin() && __last == end())
+	clear();
+      else
+	while (__first != __last) erase(__first++);
+    }
+
+  template
+    void 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    erase(const _Key* __first, const _Key* __last) 
+    { 
+      while (__first != __last) 
+	erase(*__first++); 
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::find(const _Key& __k)
+    {
+      _Link_type __y = _M_header;  // Last node which is not less than __k. 
+      _Link_type __x = _M_root();  // Current node. 
+      
+      while (__x != 0) 
+	if (!_M_key_compare(_S_key(__x), __k))
+	  __y = __x, __x = _S_left(__x);
+	else
+	  __x = _S_right(__x);
+      
+      iterator __j = iterator(__y);   
+      return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ? 
+	end() : __j;
+    }
+  
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    find(const _Key& __k) const
+    {
+      _Link_type __y = _M_header; // Last node which is not less than __k. 
+      _Link_type __x = _M_root(); // Current node. 
+ 
+     while (__x != 0) 
+       {
+	 if (!_M_key_compare(_S_key(__x), __k))
+	   __y = __x, __x = _S_left(__x);
+	 else
+	   __x = _S_right(__x);
+       } 
+     const_iterator __j = const_iterator(__y);   
+     return (__j == end() || _M_key_compare(__k, _S_key(__j._M_node))) ?
+       end() : __j;
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::size_type 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    count(const _Key& __k) const
+    {
+      pair __p = equal_range(__k);
+      size_type __n = distance(__p.first, __p.second);
+      return __n;
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    lower_bound(const _Key& __k)
+    {
+      _Link_type __y = _M_header; /* Last node which is not less than __k. */
+      _Link_type __x = _M_root(); /* Current node. */
+      
+      while (__x != 0) 
+	if (!_M_key_compare(_S_key(__x), __k))
+	  __y = __x, __x = _S_left(__x);
+	else
+	  __x = _S_right(__x);
+      
+      return iterator(__y);
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    lower_bound(const _Key& __k) const
+    {
+      _Link_type __y = _M_header; /* Last node which is not less than __k. */
+      _Link_type __x = _M_root(); /* Current node. */
+      
+      while (__x != 0) 
+	if (!_M_key_compare(_S_key(__x), __k))
+	  __y = __x, __x = _S_left(__x);
+	else
+	  __x = _S_right(__x);
+      
+      return const_iterator(__y);
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    upper_bound(const _Key& __k)
+    {
+      _Link_type __y = _M_header; /* Last node which is greater than __k. */
+      _Link_type __x = _M_root(); /* Current node. */
+      
+      while (__x != 0) 
+	if (_M_key_compare(__k, _S_key(__x)))
+	  __y = __x, __x = _S_left(__x);
+	else
+	  __x = _S_right(__x);
+      
+      return iterator(__y);
+    }
+
+  template
+    typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::const_iterator 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    upper_bound(const _Key& __k) const
+    {
+      _Link_type __y = _M_header; /* Last node which is greater than __k. */
+      _Link_type __x = _M_root(); /* Current node. */
+      
+      while (__x != 0) 
+	if (_M_key_compare(__k, _S_key(__x)))
+	  __y = __x, __x = _S_left(__x);
+	else
+	  __x = _S_right(__x);
+      
+      return const_iterator(__y);
+    }
+
+  template
+    inline 
+    pair::iterator,
+								   typename _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::iterator>
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::
+    equal_range(const _Key& __k)
+    { return pair(lower_bound(__k), upper_bound(__k)); }
+
+  template
+  inline 
+  pair::const_iterator,
+								typename _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>::const_iterator>
+  _Rb_tree<_Key, _Val, _KoV, _Compare, _Alloc>
+  ::equal_range(const _Key& __k) const
+  {
+    return pair(lower_bound(__k),
+					       upper_bound(__k));
+  }
+
+  inline int
+  __black_count(_Rb_tree_node_base* __node, _Rb_tree_node_base* __root)
+  {
+    if (__node == 0)
+      return 0;
+    int __sum = 0;
+    do 
+      {
+	if (__node->_M_color == _M_black) 
+	  ++__sum;
+	if (__node == __root) 
+	  break;
+	__node = __node->_M_parent;
+      } 
+    while (1);
+    return __sum;
+  }
+
+  template
+    bool 
+    _Rb_tree<_Key,_Val,_KeyOfValue,_Compare,_Alloc>::__rb_verify() const
+    {
+    if (_M_node_count == 0 || begin() == end())
+      return _M_node_count == 0 && begin() == end() &&
+	_M_header->_M_left == _M_header && _M_header->_M_right == _M_header;
+  
+    int __len = __black_count(_M_leftmost(), _M_root());
+    for (const_iterator __it = begin(); __it != end(); ++__it) 
+      {
+	_Link_type __x = (_Link_type) __it._M_node;
+	_Link_type __L = _S_left(__x);
+	_Link_type __R = _S_right(__x);
+	
+	if (__x->_M_color == _M_red)
+	  if ((__L && __L->_M_color == _M_red) 
+	      || (__R && __R->_M_color == _M_red))
+	    return false;
+	
+	if (__L && _M_key_compare(_S_key(__x), _S_key(__L)))
+	  return false;
+	if (__R && _M_key_compare(_S_key(__R), _S_key(__x)))
+	  return false;
+
+	if (!__L && !__R && __black_count(__x, _M_root()) != __len)
+	  return false;
+      }
+    
+    if (_M_leftmost() != _Rb_tree_node_base::_S_minimum(_M_root()))
+      return false;
+    if (_M_rightmost() != _Rb_tree_node_base::_S_maximum(_M_root()))
+      return false;
+    return true;
+    }
+} // namespace std 
+
+#endif 
diff --git a/contrib/libstdc++/include/bits/stl_uninitialized.h b/contrib/libstdc++/include/bits/stl_uninitialized.h
new file mode 100644
index 0000000..b5f7b8c
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_uninitialized.h
@@ -0,0 +1,290 @@
+// Raw memory manipulators -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_uninitialized.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STL_UNINITIALIZED_H
+#define _CPP_BITS_STL_UNINITIALIZED_H 1
+
+#include 
+
+namespace std
+{
+
+  // uninitialized_copy
+
+  template
+    inline _ForwardIter 
+    __uninitialized_copy_aux(_InputIter __first, _InputIter __last,
+			     _ForwardIter __result,
+			     __true_type)
+    { return copy(__first, __last, __result); }
+
+  template
+    _ForwardIter 
+    __uninitialized_copy_aux(_InputIter __first, _InputIter __last,
+			     _ForwardIter __result,
+			     __false_type)
+    {
+      _ForwardIter __cur = __result;
+      try {
+	for ( ; __first != __last; ++__first, ++__cur)
+	  _Construct(&*__cur, *__first);
+	return __cur;
+      }
+      catch(...)
+	{
+	  _Destroy(__result, __cur);
+	  __throw_exception_again; 
+	}
+    }
+
+  /**
+   *  @brief Copies the range [first,last) into result.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  result An output iterator.
+   *  @return   result + (first - last)
+   *
+   *  Like copy(), but does not require an initialized output range.
+  */
+  template
+    inline _ForwardIter
+    uninitialized_copy(_InputIter __first, _InputIter __last, _ForwardIter __result)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
+      return __uninitialized_copy_aux(__first, __last, __result, _Is_POD());
+    }
+
+  inline char*
+  uninitialized_copy(const char* __first, const char* __last, char* __result)
+  {
+    memmove(__result, __first, __last - __first);
+    return __result + (__last - __first);
+  }
+
+  inline wchar_t* 
+  uninitialized_copy(const wchar_t* __first, const wchar_t* __last,
+		     wchar_t* __result)
+  {
+    memmove(__result, __first, sizeof(wchar_t) * (__last - __first));
+    return __result + (__last - __first);
+  }
+
+  // Valid if copy construction is equivalent to assignment, and if the
+  // destructor is trivial.
+  template
+    inline void
+    __uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, 
+			     const _Tp& __x, __true_type)
+    { fill(__first, __last, __x); }
+
+  template
+    void
+    __uninitialized_fill_aux(_ForwardIter __first, _ForwardIter __last, 
+			     const _Tp& __x, __false_type)
+    {
+      _ForwardIter __cur = __first;
+      try {
+	for ( ; __cur != __last; ++__cur)
+	  _Construct(&*__cur, __x);
+      }
+      catch(...)
+	{
+	  _Destroy(__first, __cur);
+	  __throw_exception_again; 
+	}
+    }
+
+  /**
+   *  @brief Copies the value x into the range [first,last).
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  x      The source value.
+   *  @return   Nothing.
+   *
+   *  Like fill(), but does not require an initialized output range.
+  */
+  template
+    inline void
+    uninitialized_fill(_ForwardIter __first, _ForwardIter __last, const _Tp& __x)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
+      __uninitialized_fill_aux(__first, __last, __x, _Is_POD());
+    }
+
+  // Valid if copy construction is equivalent to assignment, and if the
+  //  destructor is trivial.
+  template
+    inline _ForwardIter
+    __uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
+			       const _Tp& __x, __true_type)
+    {
+      return fill_n(__first, __n, __x);
+    }
+
+  template
+    _ForwardIter
+    __uninitialized_fill_n_aux(_ForwardIter __first, _Size __n,
+			       const _Tp& __x, __false_type)
+    {
+      _ForwardIter __cur = __first;
+      try {
+	for ( ; __n > 0; --__n, ++__cur)
+	  _Construct(&*__cur, __x);
+	return __cur;
+      }
+      catch(...)
+	{ 
+	  _Destroy(__first, __cur);
+	  __throw_exception_again; 
+	}
+    }
+
+  /**
+   *  @brief Copies the value x into the range [first,first+n).
+   *  @param  first  An input iterator.
+   *  @param  n      The number of copies to make.
+   *  @param  x      The source value.
+   *  @return   first+n
+   *
+   *  Like fill_n(), but does not require an initialized output range.
+  */
+  template
+    inline _ForwardIter 
+    uninitialized_fill_n(_ForwardIter __first, _Size __n, const _Tp& __x)
+    {
+      typedef typename iterator_traits<_ForwardIter>::value_type _ValueType;
+      typedef typename __type_traits<_ValueType>::is_POD_type _Is_POD;
+      return __uninitialized_fill_n_aux(__first, __n, __x, _Is_POD());
+    }
+
+  // Extensions: __uninitialized_copy_copy, __uninitialized_copy_fill, 
+  // __uninitialized_fill_copy.
+
+  // __uninitialized_copy_copy
+  // Copies [first1, last1) into [result, result + (last1 - first1)), and
+  //  copies [first2, last2) into
+  //  [result, result + (last1 - first1) + (last2 - first2)).
+
+  template
+    inline _ForwardIter
+    __uninitialized_copy_copy(_InputIter1 __first1, _InputIter1 __last1,
+			      _InputIter2 __first2, _InputIter2 __last2,
+			      _ForwardIter __result)
+    {
+      _ForwardIter __mid = uninitialized_copy(__first1, __last1, __result);
+      try {
+	return uninitialized_copy(__first2, __last2, __mid);
+      }
+      catch(...)
+	{ 
+	  _Destroy(__result, __mid);
+	  __throw_exception_again; 
+	}
+    }
+
+  // __uninitialized_fill_copy
+  // Fills [result, mid) with x, and copies [first, last) into
+  //  [mid, mid + (last - first)).
+  template
+    inline _ForwardIter 
+    __uninitialized_fill_copy(_ForwardIter __result, _ForwardIter __mid,
+			      const _Tp& __x,
+			      _InputIter __first, _InputIter __last)
+    {
+      uninitialized_fill(__result, __mid, __x);
+      try {
+	return uninitialized_copy(__first, __last, __mid);
+      }
+      catch(...)
+	{
+	  _Destroy(__result, __mid);
+	  __throw_exception_again; 
+	}
+    }
+
+  // __uninitialized_copy_fill
+  // Copies [first1, last1) into [first2, first2 + (last1 - first1)), and
+  //  fills [first2 + (last1 - first1), last2) with x.
+  template
+    inline void
+    __uninitialized_copy_fill(_InputIter __first1, _InputIter __last1,
+			      _ForwardIter __first2, _ForwardIter __last2,
+			      const _Tp& __x)
+    {
+      _ForwardIter __mid2 = uninitialized_copy(__first1, __last1, __first2);
+      try {
+	uninitialized_fill(__mid2, __last2, __x);
+      }
+      catch(...)
+	{
+	  _Destroy(__first2, __mid2);
+	  __throw_exception_again; 
+	}
+    }
+
+} // namespace std
+
+#endif /* _CPP_BITS_STL_UNINITIALIZED_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stl_vector.h b/contrib/libstdc++/include/bits/stl_vector.h
new file mode 100644
index 0000000..5e2ea54
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stl_vector.h
@@ -0,0 +1,1083 @@
+// Vector implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this  software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stl_vector.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef __GLIBCPP_INTERNAL_VECTOR_H
+#define __GLIBCPP_INTERNAL_VECTOR_H
+
+#include 
+#include 
+#include 
+
+namespace std
+{
+
+// The vector base class serves two purposes.  First, its constructor
+// and destructor allocate (but don't initialize) storage.  This makes
+// exception safety easier.  Second, the base class encapsulates all of
+// the differences between SGI-style allocators and standard-conforming
+// allocators.
+
+// Base class for ordinary allocators.
+template 
+class _Vector_alloc_base {
+public:
+  typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return _M_data_allocator; }
+
+  _Vector_alloc_base(const allocator_type& __a)
+    : _M_data_allocator(__a), _M_start(0), _M_finish(0), _M_end_of_storage(0)
+  {}
+
+protected:
+  allocator_type _M_data_allocator;
+  _Tp* _M_start;
+  _Tp* _M_finish;
+  _Tp* _M_end_of_storage;
+
+  _Tp* _M_allocate(size_t __n)
+    { return _M_data_allocator.allocate(__n); }
+  void _M_deallocate(_Tp* __p, size_t __n)
+    { if (__p) _M_data_allocator.deallocate(__p, __n); }
+};
+
+// Specialization for allocators that have the property that we don't
+// actually have to store an allocator object.
+template 
+class _Vector_alloc_base<_Tp, _Allocator, true> {
+public:
+  typedef typename _Alloc_traits<_Tp, _Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return allocator_type(); }
+
+  _Vector_alloc_base(const allocator_type&)
+    : _M_start(0), _M_finish(0), _M_end_of_storage(0)
+  {}
+
+protected:
+  _Tp* _M_start;
+  _Tp* _M_finish;
+  _Tp* _M_end_of_storage;
+
+  typedef typename _Alloc_traits<_Tp, _Allocator>::_Alloc_type _Alloc_type;
+  _Tp* _M_allocate(size_t __n)
+    { return _Alloc_type::allocate(__n); }
+  void _M_deallocate(_Tp* __p, size_t __n)
+    { _Alloc_type::deallocate(__p, __n);}
+};
+
+template 
+struct _Vector_base
+  : public _Vector_alloc_base<_Tp, _Alloc,
+                              _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+{
+  typedef _Vector_alloc_base<_Tp, _Alloc,
+                             _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+          _Base;
+  typedef typename _Base::allocator_type allocator_type;
+
+  _Vector_base(const allocator_type& __a) : _Base(__a) {}
+  _Vector_base(size_t __n, const allocator_type& __a) : _Base(__a) {
+    _M_start = _M_allocate(__n);
+    _M_finish = _M_start;
+    _M_end_of_storage = _M_start + __n;
+  }
+
+  ~_Vector_base() { _M_deallocate(_M_start, _M_end_of_storage - _M_start); }
+};
+
+
+/**
+ *  @brief  A standard container which offers fixed time access to individual
+ *  elements in any order.
+ *
+ *  @ingroup Containers
+ *  @ingroup Sequences
+ *
+ *  Meets the requirements of a container, a
+ *  reversible container, and a
+ *  sequence, including the
+ *  optional sequence requirements with the
+ *  %exception of @c push_front and @c pop_front.
+ *
+ *  In some terminology a vector can be described as a dynamic C-style array,
+ *  it offers fast and efficient access to individual elements in any order
+ *  and saves the user from worrying about memory and size allocation.
+ *  Subscripting ( [] ) access is also provided as with C-style arrays.
+*/
+template  >
+class vector : protected _Vector_base<_Tp, _Alloc>
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+
+private:
+  typedef _Vector_base<_Tp, _Alloc> _Base;
+  typedef vector<_Tp, _Alloc> vector_type;
+public:
+  typedef _Tp 						value_type;
+  typedef value_type* 					pointer;
+  typedef const value_type* 				const_pointer;
+  typedef __gnu_cxx::__normal_iterator 	iterator;
+  typedef __gnu_cxx::__normal_iterator
+                                                        const_iterator;
+  typedef value_type& 					reference;
+  typedef const value_type& 				const_reference;
+  typedef size_t 					size_type;
+  typedef ptrdiff_t 					difference_type;
+
+  typedef typename _Base::allocator_type allocator_type;
+  allocator_type get_allocator() const { return _Base::get_allocator(); }
+
+  typedef reverse_iterator const_reverse_iterator;
+  typedef reverse_iterator reverse_iterator;
+
+protected:
+  using _Base::_M_allocate;
+  using _Base::_M_deallocate;
+  using _Base::_M_start;
+  using _Base::_M_finish;
+  using _Base::_M_end_of_storage;
+
+protected:
+  void _M_insert_aux(iterator __position, const _Tp& __x);
+  void _M_insert_aux(iterator __position);
+
+public:
+  /**
+   *  Returns a read/write iterator that points to the first element in the
+   *  vector.  Iteration is done in ordinary element order.
+  */
+  iterator begin() { return iterator (_M_start); }
+
+  /**
+   *  Returns a read-only (constant) iterator that points to the first element
+   *  in the vector.  Iteration is done in ordinary element order.
+  */
+  const_iterator begin() const
+    { return const_iterator (_M_start); }
+
+  /**
+   *  Returns a read/write iterator that points one past the last element in
+   *  the vector.  Iteration is done in ordinary element order.
+  */
+  iterator end() { return iterator (_M_finish); }
+
+  /**
+   *  Returns a read-only (constant) iterator that points one past the last
+   *  element in the vector.  Iteration is done in ordinary element order.
+  */
+  const_iterator end() const { return const_iterator (_M_finish); }
+
+  /**
+   *  Returns a read/write reverse iterator that points to the last element in
+   *  the vector.  Iteration is done in reverse element order.
+  */
+  reverse_iterator rbegin()
+    { return reverse_iterator(end()); }
+
+  /**
+   *  Returns a read-only (constant) reverse iterator that points to the last
+   *  element in the vector.  Iteration is done in reverse element order.
+  */
+  const_reverse_iterator rbegin() const
+    { return const_reverse_iterator(end()); }
+
+  /**
+   *  Returns a read/write reverse iterator that points to one before the
+   *  first element in the vector.  Iteration is done in reverse element
+   *  order.
+  */
+  reverse_iterator rend()
+    { return reverse_iterator(begin()); }
+
+  /**
+   *  Returns a read-only (constant) reverse iterator that points to one
+   *  before the first element in the vector.  Iteration is done in reverse
+   *  element order.
+  */
+  const_reverse_iterator rend() const
+    { return const_reverse_iterator(begin()); }
+
+  /**  Returns the number of elements in the vector.  */
+  size_type size() const
+    { return size_type(end() - begin()); }
+
+  /**  Returns the size of the largest possible vector.  */
+  size_type max_size() const
+    { return size_type(-1) / sizeof(_Tp); }
+
+  /**
+   *  Returns the amount of memory that has been alocated for the current
+   *  elements (?).
+  */
+  size_type capacity() const
+    { return size_type(const_iterator(_M_end_of_storage) - begin()); }
+
+  /**
+   *  Returns true if the vector is empty.  (Thus begin() would equal end().)
+  */
+  bool empty() const
+    { return begin() == end(); }
+
+  /**
+   *  @brief  Subscript access to the data contained in the vector.
+   *  @param  n  The element for which data should be accessed.
+   *  @return  Read/write reference to data.
+   *
+   *  This operator allows for easy, array-style, data access.
+   *  Note that data access with this operator is unchecked and out_of_range
+   *  lookups are not defined. (For checked lookups see at().)
+  */
+  reference operator[](size_type __n) { return *(begin() + __n); }
+
+  /**
+   *  @brief  Subscript access to the data contained in the vector.
+   *  @param  n  The element for which data should be accessed.
+   *  @return  Read-only (constant) reference to data.
+   *
+   *  This operator allows for easy, array-style, data access.
+   *  Note that data access with this operator is unchecked and out_of_range
+   *  lookups are not defined. (For checked lookups see at().)
+  */
+  const_reference operator[](size_type __n) const { return *(begin() + __n); }
+
+  void _M_range_check(size_type __n) const {
+    if (__n >= this->size())
+      __throw_out_of_range("vector");
+  }
+
+  /**
+   *  @brief  Provides access to the data contained in the vector.
+   *  @param  n  The element for which data should be accessed.
+   *  @return  Read/write reference to data.
+   *
+   *  This function provides for safer data access.  The parameter is first
+   *  checked that it is in the range of the vector.  The function throws
+   *  out_of_range if the check fails.
+  */
+  reference at(size_type __n)
+    { _M_range_check(__n); return (*this)[__n]; }
+
+  /**
+   *  @brief  Provides access to the data contained in the vector.
+   *  @param  n  The element for which data should be accessed.
+   *  @return  Read-only (constant) reference to data.
+   *
+   *  This function provides for safer data access.  The parameter is first
+   *  checked that it is in the range of the vector.  The function throws
+   *  out_of_range if the check fails.
+  */
+  const_reference at(size_type __n) const
+    { _M_range_check(__n); return (*this)[__n]; }
+
+
+  explicit vector(const allocator_type& __a = allocator_type())
+    : _Base(__a) {}
+
+  vector(size_type __n, const _Tp& __value,
+         const allocator_type& __a = allocator_type())
+    : _Base(__n, __a)
+    { _M_finish = uninitialized_fill_n(_M_start, __n, __value); }
+
+  explicit vector(size_type __n)
+    : _Base(__n, allocator_type())
+    { _M_finish = uninitialized_fill_n(_M_start, __n, _Tp()); }
+
+  vector(const vector<_Tp, _Alloc>& __x)
+    : _Base(__x.size(), __x.get_allocator())
+    { _M_finish = uninitialized_copy(__x.begin(), __x.end(), _M_start); }
+
+  // Check whether it's an integral type.  If so, it's not an iterator.
+  template 
+    vector(_InputIterator __first, _InputIterator __last,
+           const allocator_type& __a = allocator_type())
+	: _Base(__a)
+	{
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_initialize_aux(__first, __last, _Integral());
+    }
+
+  template 
+    void _M_initialize_aux(_Integer __n, _Integer __value, __true_type)
+	{
+      _M_start = _M_allocate(__n);
+      _M_end_of_storage = _M_start + __n;
+      _M_finish = uninitialized_fill_n(_M_start, __n, __value);
+    }
+
+  template
+    void
+	_M_initialize_aux(_InputIterator __first, _InputIterator __last, __false_type)
+	{
+	  typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
+	  _M_range_initialize(__first, __last, _IterCategory());
+	}
+
+  ~vector()
+  { _Destroy(_M_start, _M_finish); }
+
+  vector<_Tp, _Alloc>& operator=(const vector<_Tp, _Alloc>& __x);
+
+  /**
+   *  @brief  Attempt to preallocate enough memory for specified number of
+   *          elements.
+   *  @param  n  Number of elements required
+   *
+   *  This function attempts to reserve enough memory for the vector to hold
+   *  the specified number of elements.  If the number requested is more than
+   *  max_size() length_error is thrown.
+   *
+   *  The advantage of this function is that if optimal code is a necessity
+   *  and the user can determine the number of elements that will be required
+   *  the user can reserve the memory and thus prevent a possible
+   *  reallocation of memory and copy of vector data.
+  */
+  void reserve(size_type __n) {
+    if (capacity() < __n) {
+      const size_type __old_size = size();
+      pointer __tmp = _M_allocate_and_copy(__n, _M_start, _M_finish);
+      _Destroy(_M_start, _M_finish);
+      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+      _M_start = __tmp;
+      _M_finish = __tmp + __old_size;
+      _M_end_of_storage = _M_start + __n;
+    }
+  }
+
+  // assign(), a generalized assignment member function.  Two
+  // versions: one that takes a count, and one that takes a range.
+  // The range version is a member template, so we dispatch on whether
+  // or not the type is an integer.
+
+  /**
+   *  @brief  Assigns a given value or range to a vector.
+   *  @param  n  Number of elements to be assigned.
+   *  @param  val  Value to be assigned.
+   *
+   *  This function can be used to assign a range to a vector or fill it
+   *  with a specified number of copies of the given value.
+   *  Note that the assignment completely changes the vector and that the
+   *  resulting vector's size is the same as the number of elements assigned.
+   *  Old data may be lost.
+  */
+  void assign(size_type __n, const _Tp& __val) { _M_fill_assign(__n, __val); }
+  void _M_fill_assign(size_type __n, const _Tp& __val);
+
+  template
+    void
+    assign(_InputIterator __first, _InputIterator __last)
+    {
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_assign_dispatch(__first, __last, _Integral());
+    }
+
+  template
+    void
+     _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+     { _M_fill_assign((size_type) __n, (_Tp) __val); }
+
+  template
+    void
+    _M_assign_dispatch(_InputIter __first, _InputIter __last, __false_type)
+    {
+      typedef typename iterator_traits<_InputIter>::iterator_category _IterCategory;
+      _M_assign_aux(__first, __last, _IterCategory());
+    }
+
+  template 
+    void 
+    _M_assign_aux(_InputIterator __first, _InputIterator __last,
+		  input_iterator_tag);
+
+  template 
+    void 
+    _M_assign_aux(_ForwardIterator __first, _ForwardIterator __last,
+		  forward_iterator_tag);
+
+  /**
+   *  Returns a read/write reference to the data at the first element of the
+   *  vector.
+  */
+  reference front() { return *begin(); }
+
+  /**
+   *  Returns a read-only (constant) reference to the data at the first
+   *  element of the vector.
+  */
+  const_reference front() const { return *begin(); }
+
+  /**
+   *  Returns a read/write reference to the data at the last element of the
+   *  vector.
+  */
+  reference back() { return *(end() - 1); }
+
+  /**
+   *  Returns a read-only (constant) reference to the data at the first
+   *  element of the vector.
+  */
+  const_reference back() const { return *(end() - 1); }
+
+  /**
+   *  @brief  Add data to the end of the vector.
+   *  @param  x  Data to be added.
+   *
+   *  This is a typical stack operation.  The function creates an element at
+   *  the end of the vector and assigns the given data to it.
+   *  Due to the nature of a vector this operation can be done in constant
+   *  time if the vector has preallocated space available.
+  */
+  void
+  push_back(const _Tp& __x)
+  {
+    if (_M_finish != _M_end_of_storage) {
+      _Construct(_M_finish, __x);
+      ++_M_finish;
+    }
+    else
+      _M_insert_aux(end(), __x);
+  }
+
+#ifdef _GLIBCPP_DEPRECATED
+  /**
+   *  Add an element to the end of the vector.  The element is
+   *  default-constructed.
+   *
+   *  @note You must define _GLIBCPP_DEPRECATED to make this visible; see
+   *        c++config.h.
+  */
+  void
+  push_back()
+  {
+    if (_M_finish != _M_end_of_storage) {
+      _Construct(_M_finish);
+      ++_M_finish;
+    }
+    else
+      _M_insert_aux(end());
+  }
+#endif
+
+  void
+  swap(vector<_Tp, _Alloc>& __x)
+  {
+    std::swap(_M_start, __x._M_start);
+    std::swap(_M_finish, __x._M_finish);
+    std::swap(_M_end_of_storage, __x._M_end_of_storage);
+  }
+
+  /**
+   *  @brief  Inserts given value into vector at specified element.
+   *  @param  position  An iterator that points to the element where data
+   *                    should be inserted.
+   *  @param  x  Data to be inserted.
+   *  @return  An iterator that points to the inserted data.
+   *
+   *  This function will insert the given value into the specified location.
+   *  Note that this kind of operation could be expensive for a vector and if
+   *  it is frequently used the user should consider using std::list.
+  */
+  iterator
+  insert(iterator __position, const _Tp& __x)
+  {
+    size_type __n = __position - begin();
+    if (_M_finish != _M_end_of_storage && __position == end()) {
+      _Construct(_M_finish, __x);
+      ++_M_finish;
+    }
+    else
+      _M_insert_aux(iterator(__position), __x);
+    return begin() + __n;
+  }
+
+  /**
+   *  @brief  Inserts an empty element into the vector.
+   *  @param  position  An iterator that points to the element where empty
+   *                    element should be inserted.
+   *  @param  x  Data to be inserted.
+   *  @return  An iterator that points to the inserted element.
+   *
+   *  This function will insert an empty element into the specified location.
+   *  Note that this kind of operation could be expensive for a vector and if
+   *  it is frequently used the user should consider using std::list.
+  */
+  iterator
+  insert(iterator __position)
+  {
+    size_type __n = __position - begin();
+    if (_M_finish != _M_end_of_storage && __position == end()) {
+      _Construct(_M_finish);
+      ++_M_finish;
+    }
+    else
+      _M_insert_aux(iterator(__position));
+    return begin() + __n;
+  }
+
+  // Check whether it's an integral type.  If so, it's not an iterator.
+  template
+    void
+	insert(iterator __pos, _InputIterator __first, _InputIterator __last)
+	{
+      typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+      _M_insert_dispatch(__pos, __first, __last, _Integral());
+    }
+
+  template 
+    void
+	_M_insert_dispatch(iterator __pos, _Integer __n, _Integer __val, __true_type)
+    { _M_fill_insert(__pos, static_cast(__n), static_cast<_Tp>(__val)); }
+
+  template
+    void
+	_M_insert_dispatch(iterator __pos,
+                       _InputIterator __first, _InputIterator __last,
+                       __false_type)
+	{
+	  typedef typename iterator_traits<_InputIterator>::iterator_category _IterCategory;
+      _M_range_insert(__pos, __first, __last, _IterCategory());
+    }
+
+  /**
+   *  @brief  Inserts a number of copies of given data into the vector.
+   *  @param  position  An iterator that points to the element where data
+   *                    should be inserted.
+   *  @param  n  Amount of elements to be inserted.
+   *  @param  x  Data to be inserted.
+   *
+   *  This function will insert a specified number of copies of the given data
+   *  into the specified location.
+   *
+   *  Note that this kind of operation could be expensive for a vector and if
+   *  it is frequently used the user should consider using std::list.
+  */
+  void insert (iterator __pos, size_type __n, const _Tp& __x)
+    { _M_fill_insert(__pos, __n, __x); }
+
+  void _M_fill_insert (iterator __pos, size_type __n, const _Tp& __x);
+
+  /**
+   *  @brief  Removes last element from vector.
+   *
+   *  This is a typical stack operation. It allows us to shrink the vector by
+   *  one.
+   *
+   *  Note that no data is returned and if last element's data is needed it
+   *  should be retrieved before pop_back() is called.
+  */
+  void pop_back() {
+    --_M_finish;
+    _Destroy(_M_finish);
+  }
+
+  /**
+   *  @brief  Remove element at given position
+   *  @param  position  Iterator pointing to element to be erased.
+   *  @return  Doc Me! (Iterator pointing to new element at old location?)
+   *
+   *  This function will erase the element at the given position and thus
+   *  shorten the vector by one.
+   *
+   *  Note This operation could be expensive and if it is frequently used the
+   *  user should consider using std::list.  The user is also cautioned that
+   *  this function only erases the element, and that if the element is itself
+   *  a pointer, the pointed-to memory is not touched in any way.  Managing
+   *  the pointer is the user's responsibilty.
+  */
+  iterator erase(iterator __position) {
+    if (__position + 1 != end())
+      copy(__position + 1, end(), __position);
+    --_M_finish;
+    _Destroy(_M_finish);
+    return __position;
+  }
+
+  /**
+   *  @brief  Remove a range of elements from a vector.
+   *  @param  first  Iterator pointing to the first element to be erased.
+   *  @param  last  Iterator pointing to the last element to be erased.
+   *  @return  Doc Me! (Iterator pointing to new element at old location?)
+   *
+   *  This function will erase the elements in the given range and shorten the
+   *  vector accordingly.
+   *
+   *  Note This operation could be expensive and if it is frequently used the
+   *  user should consider using std::list.  The user is also cautioned that
+   *  this function only erases the elements, and that if the elements
+   *  themselves are pointers, the pointed-to memory is not touched in any
+   *  way.  Managing the pointer is the user's responsibilty.
+  */
+  iterator erase(iterator __first, iterator __last) {
+    iterator __i(copy(__last, end(), __first));
+    _Destroy(__i, end());
+    _M_finish = _M_finish - (__last - __first);
+    return __first;
+  }
+
+  /**
+   *  @brief  Resizes the vector to the specified number of elements.
+   *  @param  new_size  Number of elements the vector should contain.
+   *  @param  x  Data with which new elements should be populated.
+   *
+   *  This function will resize the vector to the specified number of
+   *  elements.  If the number is smaller than the vector's current size the
+   *  vector is truncated, otherwise the vector is extended and new elements
+   *  are populated with given data.
+  */
+  void resize(size_type __new_size, const _Tp& __x) {
+    if (__new_size < size())
+      erase(begin() + __new_size, end());
+    else
+      insert(end(), __new_size - size(), __x);
+  }
+
+  /**
+   *  @brief  Resizes the vector to the specified number of elements.
+   *  @param  new_size  Number of elements the vector should contain.
+   *
+   *  This function will resize the vector to the specified number of
+   *  elements.  If the number is smaller than the vector's current size the
+   *  vector is truncated, otherwise the vector is extended and new elements
+   *  are left uninitialized.
+  */
+  void resize(size_type __new_size) { resize(__new_size, _Tp()); }
+
+  /**
+   *  Erases all elements in vector.  Note that this function only erases the
+   *  elements, and that if the elements themselves are pointers, the
+   *  pointed-to memory is not touched in any way.  Managing the pointer is
+   *  the user's responsibilty.
+  */
+  void clear() { erase(begin(), end()); }
+
+protected:
+
+  template 
+  pointer _M_allocate_and_copy(size_type __n, _ForwardIterator __first,
+                                               _ForwardIterator __last)
+  {
+    pointer __result = _M_allocate(__n);
+    try {
+      uninitialized_copy(__first, __last, __result);
+      return __result;
+    }
+    catch(...)
+      {
+	_M_deallocate(__result, __n);
+	__throw_exception_again;
+      }
+  }
+
+  template 
+  void _M_range_initialize(_InputIterator __first,
+                           _InputIterator __last, input_iterator_tag)
+  {
+    for ( ; __first != __last; ++__first)
+      push_back(*__first);
+  }
+
+  // This function is only called by the constructor.
+  template 
+  void _M_range_initialize(_ForwardIterator __first,
+                           _ForwardIterator __last, forward_iterator_tag)
+  {
+    size_type __n = distance(__first, __last);
+    _M_start = _M_allocate(__n);
+    _M_end_of_storage = _M_start + __n;
+    _M_finish = uninitialized_copy(__first, __last, _M_start);
+  }
+
+  template 
+  void _M_range_insert(iterator __pos,
+                       _InputIterator __first, _InputIterator __last,
+                       input_iterator_tag);
+
+  template 
+  void _M_range_insert(iterator __pos,
+                       _ForwardIterator __first, _ForwardIterator __last,
+                       forward_iterator_tag);
+};
+
+template 
+inline bool
+operator==(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+{
+  return __x.size() == __y.size() &&
+         equal(__x.begin(), __x.end(), __y.begin());
+}
+
+template 
+inline bool
+operator<(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y)
+{
+  return lexicographical_compare(__x.begin(), __x.end(),
+                                 __y.begin(), __y.end());
+}
+
+template 
+inline void swap(vector<_Tp, _Alloc>& __x, vector<_Tp, _Alloc>& __y)
+{
+  __x.swap(__y);
+}
+
+template 
+inline bool
+operator!=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool
+operator>(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool
+operator<=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool
+operator>=(const vector<_Tp, _Alloc>& __x, const vector<_Tp, _Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+vector<_Tp,_Alloc>&
+vector<_Tp,_Alloc>::operator=(const vector<_Tp, _Alloc>& __x)
+{
+  if (&__x != this) {
+    const size_type __xlen = __x.size();
+    if (__xlen > capacity()) {
+      pointer __tmp = _M_allocate_and_copy(__xlen, __x.begin(), __x.end());
+      _Destroy(_M_start, _M_finish);
+      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+      _M_start = __tmp;
+      _M_end_of_storage = _M_start + __xlen;
+    }
+    else if (size() >= __xlen) {
+      iterator __i(copy(__x.begin(), __x.end(), begin()));
+      _Destroy(__i, end());
+    }
+    else {
+      copy(__x.begin(), __x.begin() + size(), _M_start);
+      uninitialized_copy(__x.begin() + size(), __x.end(), _M_finish);
+    }
+    _M_finish = _M_start + __xlen;
+  }
+  return *this;
+}
+
+template 
+void vector<_Tp, _Alloc>::_M_fill_assign(size_t __n, const value_type& __val)
+{
+  if (__n > capacity()) {
+    vector<_Tp, _Alloc> __tmp(__n, __val, get_allocator());
+    __tmp.swap(*this);
+  }
+  else if (__n > size()) {
+    fill(begin(), end(), __val);
+    _M_finish = uninitialized_fill_n(_M_finish, __n - size(), __val);
+  }
+  else
+    erase(fill_n(begin(), __n, __val), end());
+}
+
+template  template 
+void vector<_Tp, _Alloc>::_M_assign_aux(_InputIter __first, _InputIter __last,
+                                        input_iterator_tag) {
+  iterator __cur(begin());
+  for ( ; __first != __last && __cur != end(); ++__cur, ++__first)
+    *__cur = *__first;
+  if (__first == __last)
+    erase(__cur, end());
+  else
+    insert(end(), __first, __last);
+}
+
+template  template 
+void
+vector<_Tp, _Alloc>::_M_assign_aux(_ForwardIter __first, _ForwardIter __last,
+                                   forward_iterator_tag) {
+  size_type __len = distance(__first, __last);
+
+  if (__len > capacity()) {
+    pointer __tmp(_M_allocate_and_copy(__len, __first, __last));
+    _Destroy(_M_start, _M_finish);
+    _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+    _M_start = __tmp;
+    _M_end_of_storage = _M_finish = _M_start + __len;
+  }
+  else if (size() >= __len) {
+    iterator __new_finish(copy(__first, __last, _M_start));
+    _Destroy(__new_finish, end());
+    _M_finish = __new_finish.base();
+  }
+  else {
+    _ForwardIter __mid = __first;
+    advance(__mid, size());
+    copy(__first, __mid, _M_start);
+    _M_finish = uninitialized_copy(__mid, __last, _M_finish);
+  }
+}
+
+template 
+void
+vector<_Tp, _Alloc>::_M_insert_aux(iterator __position, const _Tp& __x)
+{
+  if (_M_finish != _M_end_of_storage) {
+    _Construct(_M_finish, *(_M_finish - 1));
+    ++_M_finish;
+    _Tp __x_copy = __x;
+    copy_backward(__position, iterator(_M_finish - 2), iterator(_M_finish- 1));
+    *__position = __x_copy;
+  }
+  else {
+    const size_type __old_size = size();
+    const size_type __len = __old_size != 0 ? 2 * __old_size : 1;
+    iterator __new_start(_M_allocate(__len));
+    iterator __new_finish(__new_start);
+    try {
+      __new_finish = uninitialized_copy(iterator(_M_start), __position,
+                                        __new_start);
+      _Construct(__new_finish.base(), __x);
+      ++__new_finish;
+      __new_finish = uninitialized_copy(__position, iterator(_M_finish),
+                                        __new_finish);
+    }
+    catch(...)
+      {
+	_Destroy(__new_start,__new_finish);
+	_M_deallocate(__new_start.base(),__len);
+	__throw_exception_again;
+      }
+    _Destroy(begin(), end());
+    _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+    _M_start = __new_start.base();
+    _M_finish = __new_finish.base();
+    _M_end_of_storage = __new_start.base() + __len;
+  }
+}
+
+template 
+void
+vector<_Tp, _Alloc>::_M_insert_aux(iterator __position)
+{
+  if (_M_finish != _M_end_of_storage) {
+    _Construct(_M_finish, *(_M_finish - 1));
+    ++_M_finish;
+    copy_backward(__position, iterator(_M_finish - 2),
+		  iterator(_M_finish - 1));
+    *__position = _Tp();
+  }
+  else {
+    const size_type __old_size = size();
+    const size_type __len = __old_size != 0 ? 2 * __old_size : 1;
+    pointer __new_start = _M_allocate(__len);
+    pointer __new_finish = __new_start;
+    try {
+      __new_finish = uninitialized_copy(iterator(_M_start), __position,
+					__new_start);
+      _Construct(__new_finish);
+      ++__new_finish;
+      __new_finish = uninitialized_copy(__position, iterator(_M_finish),
+					__new_finish);
+    }
+    catch(...)
+      {
+	_Destroy(__new_start,__new_finish);
+	_M_deallocate(__new_start,__len);
+	__throw_exception_again;
+      }
+    _Destroy(begin(), end());
+    _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+    _M_start = __new_start;
+    _M_finish = __new_finish;
+    _M_end_of_storage = __new_start + __len;
+  }
+}
+
+template 
+void vector<_Tp, _Alloc>::_M_fill_insert(iterator __position, size_type __n,
+                                         const _Tp& __x)
+{
+  if (__n != 0) {
+    if (size_type(_M_end_of_storage - _M_finish) >= __n) {
+      _Tp __x_copy = __x;
+      const size_type __elems_after = end() - __position;
+      iterator __old_finish(_M_finish);
+      if (__elems_after > __n) {
+        uninitialized_copy(_M_finish - __n, _M_finish, _M_finish);
+        _M_finish += __n;
+        copy_backward(__position, __old_finish - __n, __old_finish);
+        fill(__position, __position + __n, __x_copy);
+      }
+      else {
+        uninitialized_fill_n(_M_finish, __n - __elems_after, __x_copy);
+        _M_finish += __n - __elems_after;
+        uninitialized_copy(__position, __old_finish, _M_finish);
+        _M_finish += __elems_after;
+        fill(__position, __old_finish, __x_copy);
+      }
+    }
+    else {
+      const size_type __old_size = size();
+      const size_type __len = __old_size + max(__old_size, __n);
+      iterator __new_start(_M_allocate(__len));
+      iterator __new_finish(__new_start);
+      try {
+        __new_finish = uninitialized_copy(begin(), __position, __new_start);
+        __new_finish = uninitialized_fill_n(__new_finish, __n, __x);
+        __new_finish
+          = uninitialized_copy(__position, end(), __new_finish);
+      }
+      catch(...)
+	{
+	  _Destroy(__new_start,__new_finish);
+	  _M_deallocate(__new_start.base(),__len);
+	  __throw_exception_again;
+	}
+      _Destroy(_M_start, _M_finish);
+      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+      _M_start = __new_start.base();
+      _M_finish = __new_finish.base();
+      _M_end_of_storage = __new_start.base() + __len;
+    }
+  }
+}
+
+template  template 
+void
+vector<_Tp, _Alloc>::_M_range_insert(iterator __pos,
+                                     _InputIterator __first,
+                                     _InputIterator __last,
+                                     input_iterator_tag)
+{
+  for ( ; __first != __last; ++__first) {
+    __pos = insert(__pos, *__first);
+    ++__pos;
+  }
+}
+
+template  template 
+void
+vector<_Tp, _Alloc>::_M_range_insert(iterator __position,
+                                     _ForwardIterator __first,
+                                     _ForwardIterator __last,
+                                     forward_iterator_tag)
+{
+  if (__first != __last) {
+    size_type __n = distance(__first, __last);
+    if (size_type(_M_end_of_storage - _M_finish) >= __n) {
+      const size_type __elems_after = end() - __position;
+      iterator __old_finish(_M_finish);
+      if (__elems_after > __n) {
+        uninitialized_copy(_M_finish - __n, _M_finish, _M_finish);
+        _M_finish += __n;
+        copy_backward(__position, __old_finish - __n, __old_finish);
+        copy(__first, __last, __position);
+      }
+      else {
+        _ForwardIterator __mid = __first;
+        advance(__mid, __elems_after);
+        uninitialized_copy(__mid, __last, _M_finish);
+        _M_finish += __n - __elems_after;
+        uninitialized_copy(__position, __old_finish, _M_finish);
+        _M_finish += __elems_after;
+        copy(__first, __mid, __position);
+      }
+    }
+    else {
+      const size_type __old_size = size();
+      const size_type __len = __old_size + max(__old_size, __n);
+      iterator __new_start(_M_allocate(__len));
+      iterator __new_finish(__new_start);
+      try {
+        __new_finish = uninitialized_copy(iterator(_M_start),
+					  __position, __new_start);
+        __new_finish = uninitialized_copy(__first, __last, __new_finish);
+        __new_finish
+          = uninitialized_copy(__position, iterator(_M_finish), __new_finish);
+      }
+      catch(...)
+	{
+	  _Destroy(__new_start,__new_finish);
+	  _M_deallocate(__new_start.base(), __len);
+	  __throw_exception_again;
+	}
+      _Destroy(_M_start, _M_finish);
+      _M_deallocate(_M_start, _M_end_of_storage - _M_start);
+      _M_start = __new_start.base();
+      _M_finish = __new_finish.base();
+      _M_end_of_storage = __new_start.base() + __len;
+    }
+  }
+}
+
+} // namespace std
+
+#endif /* __GLIBCPP_INTERNAL_VECTOR_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/stream_iterator.h b/contrib/libstdc++/include/bits/stream_iterator.h
new file mode 100644
index 0000000..4897fc3
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stream_iterator.h
@@ -0,0 +1,156 @@
+// Stream iterators
+
+// Copyright (C) 2001 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.
+
+/** @file stream_iterator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STREAM_ITERATOR_H
+#define _CPP_BITS_STREAM_ITERATOR_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+  template, typename _Dist = ptrdiff_t> 
+    class istream_iterator 
+      : public iterator
+    {
+    public:
+      typedef _CharT                         char_type;
+      typedef _Traits                        traits_type;
+      typedef basic_istream<_CharT, _Traits> istream_type;
+
+    private:
+      istream_type* 	_M_stream;
+      _Tp 		_M_value;
+      bool 		_M_ok;
+
+    public:      
+      istream_iterator() : _M_stream(0), _M_ok(false) {}
+
+      istream_iterator(istream_type& __s) : _M_stream(&__s) { _M_read(); }
+
+      istream_iterator(const istream_iterator& __obj) 
+      : _M_stream(__obj._M_stream), _M_value(__obj._M_value), 
+        _M_ok(__obj._M_ok) 
+      { }
+
+      const _Tp&
+      operator*() const { return _M_value; }
+
+      const _Tp*
+      operator->() const { return &(operator*()); }
+
+      istream_iterator& 
+      operator++() 
+      { _M_read(); return *this; }
+
+      istream_iterator 
+      operator++(int)  
+      {
+	istream_iterator __tmp = *this;
+	_M_read();
+	return __tmp;
+      }
+
+      bool 
+      _M_equal(const istream_iterator& __x) const
+      { return (_M_ok == __x._M_ok) && (!_M_ok || _M_stream == __x._M_stream);}
+
+    private:      
+      void 
+      _M_read() 
+      {
+	_M_ok = (_M_stream && *_M_stream) ? true : false;
+	if (_M_ok) 
+	  {
+	    *_M_stream >> _M_value;
+	    _M_ok = *_M_stream ? true : false;
+	  }
+      }
+    };
+  
+  template
+    inline bool 
+    operator==(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
+	       const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) 
+    { return __x._M_equal(__y); }
+
+  template 
+    inline bool 
+    operator!=(const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __x,
+	       const istream_iterator<_Tp, _CharT, _Traits, _Dist>& __y) 
+    { return !__x._M_equal(__y); }
+
+
+  template >
+    class ostream_iterator 
+      : public iterator
+    {
+    public:
+      typedef _CharT                         char_type;
+      typedef _Traits                        traits_type;
+      typedef basic_ostream<_CharT, _Traits> ostream_type;
+
+    private:
+      ostream_type* 	_M_stream;
+      const _CharT* 	_M_string;
+
+    public:
+      ostream_iterator(ostream_type& __s) : _M_stream(&__s), _M_string(0) {}
+
+      ostream_iterator(ostream_type& __s, const _CharT* __c) 
+      : _M_stream(&__s), _M_string(__c)  { }
+
+      ostream_iterator(const ostream_iterator& __obj)
+      : _M_stream(__obj._M_stream), _M_string(__obj._M_string)  { }
+
+      ostream_iterator& 
+      operator=(const _Tp& __value) 
+      { 
+	*_M_stream << __value;
+	if (_M_string) *_M_stream << _M_string;
+	return *this;
+      }
+      
+      ostream_iterator& 
+      operator*() { return *this; }
+      
+      ostream_iterator& 
+      operator++() { return *this; } 
+      
+      ostream_iterator& 
+      operator++(int) { return *this; } 
+    };
+} // namespace std
+#endif
diff --git a/contrib/libstdc++/include/bits/streambuf.tcc b/contrib/libstdc++/include/bits/streambuf.tcc
new file mode 100644
index 0000000..292999c
--- /dev/null
+++ b/contrib/libstdc++/include/bits/streambuf.tcc
@@ -0,0 +1,250 @@
+// Stream buffer classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.5  Stream buffers
+//
+
+#ifndef _CPP_BITS_STREAMBUF_TCC
+#define _CPP_BITS_STREAMBUF_TCC 1
+
+#pragma GCC system_header
+
+namespace std 
+{
+  template
+    const typename basic_streambuf<_CharT, _Traits>::int_type
+    basic_streambuf<_CharT, _Traits>::_S_pback_size;
+
+  template
+    typename basic_streambuf<_CharT, _Traits>::int_type
+    basic_streambuf<_CharT, _Traits>::
+    sbumpc()
+    {
+      int_type __ret;
+      if (_M_in_cur && _M_in_cur < _M_in_end)
+	{
+	  char_type __c = *(this->gptr());
+	  _M_in_cur_move(1);
+	  __ret = traits_type::to_int_type(__c);
+	}
+      else 
+	__ret = this->uflow();
+      return __ret;
+    }
+
+  template
+    typename basic_streambuf<_CharT, _Traits>::int_type
+    basic_streambuf<_CharT, _Traits>::
+    sputbackc(char_type __c) 
+    {
+      int_type __ret;
+      bool __testpos = _M_in_cur && _M_in_beg < _M_in_cur;
+      bool __testne = _M_in_cur && !traits_type::eq(__c, this->gptr()[-1]);
+      if (!__testpos || __testne)
+	__ret = pbackfail(traits_type::to_int_type(__c));
+      else 
+	{
+	  _M_in_cur_move(-1);
+	  __ret = traits_type::to_int_type(*this->gptr());
+	}
+      return __ret;
+    }
+  
+  template
+    typename basic_streambuf<_CharT, _Traits>::int_type
+    basic_streambuf<_CharT, _Traits>::
+    sungetc()
+    {
+      int_type __ret;
+      if (_M_in_cur && _M_in_beg < _M_in_cur)
+	{
+	  _M_in_cur_move(-1);
+	  __ret = traits_type::to_int_type(*_M_in_cur);
+	}
+      else 
+	__ret = this->pbackfail();
+      return __ret;
+    }
+
+  // Don't test against _M_buf + _M_buf_size, because _M_buf reflects
+  // allocated space, and on certain (rare but entirely legal)
+  // situations, there will be no allocated space yet the internal
+  // buffers will still be valid. (This happens if setp is used to set
+  // the internal buffer to say some externally-allocated sequence.)
+  template
+    typename basic_streambuf<_CharT, _Traits>::int_type
+    basic_streambuf<_CharT, _Traits>::
+    sputc(char_type __c)
+    {
+      int_type __ret;
+      if (_M_out_buf_size())
+	{
+	  *_M_out_cur = __c;
+	  _M_out_cur_move(1);
+	  __ret = traits_type::to_int_type(__c);
+	}
+      else
+	__ret = this->overflow(traits_type::to_int_type(__c));
+      return __ret;
+    }
+
+  template
+    streamsize
+    basic_streambuf<_CharT, _Traits>::
+    xsgetn(char_type* __s, streamsize __n)
+    {
+      streamsize __ret = 0;
+      while (__ret < __n)
+	{
+	  size_t __buf_len = _M_in_end - _M_in_cur;
+	  if (__buf_len > 0)
+	    {
+	      size_t __remaining = __n - __ret;
+	      size_t __len = min(__buf_len, __remaining);
+	      traits_type::copy(__s, _M_in_cur, __len);
+	      __ret += __len;
+	      __s += __len;
+	      _M_in_cur_move(__len);
+	    }
+	  
+	  if (__ret < __n)
+	    {
+	      int_type __c = this->uflow();  
+	      if (__c != traits_type::eof())
+		{
+		  traits_type::assign(*__s++, traits_type::to_char_type(__c));
+		  ++__ret;
+		}
+	      else
+		break;
+	    }
+	}
+      return __ret;
+    }
+
+  // Don't test against _M_buf + _M_buf_size, because _M_buf reflects
+  // allocated space, and on certain (rare but entirely legal)
+  // situations, there will be no allocated space yet the internal
+  // buffers will still be valid. (This happens if setp is used to set
+  // the internal buffer to say some externally-allocated sequence.)
+  template
+    streamsize
+    basic_streambuf<_CharT, _Traits>::
+    xsputn(const char_type* __s, streamsize __n)
+    {
+      streamsize __ret = 0;
+      while (__ret < __n)
+	{
+	  off_type __buf_len = _M_out_buf_size();
+	  if (__buf_len > 0)
+	    {
+	      off_type __remaining = __n - __ret;
+	      off_type __len = min(__buf_len, __remaining);
+	      traits_type::copy(_M_out_cur, __s, __len);
+	      __ret += __len;
+	      __s += __len;
+	      _M_out_cur_move(__len);
+	    }
+
+	  if (__ret < __n)
+	    {
+	      int_type __c = this->overflow(traits_type::to_int_type(*__s));
+	      if (__c != traits_type::eof())
+		{
+		  ++__ret;
+		  ++__s;
+		}
+	      else
+		break;
+	    }
+	}
+      return __ret;
+    }
+
+  // Conceivably, this could be used to implement buffer-to-buffer
+  // copies, if this was ever desired in an un-ambiguous way by the
+  // standard. If so, then checks for __ios being zero would be
+  // necessary.
+  template
+    streamsize
+    __copy_streambufs(basic_ios<_CharT, _Traits>& __ios,
+		      basic_streambuf<_CharT, _Traits>* __sbin,
+		      basic_streambuf<_CharT, _Traits>* __sbout) 
+  {
+      typedef typename _Traits::int_type	int_type;
+
+      streamsize __ret = 0;
+      streamsize __bufsize = __sbin->in_avail();
+      streamsize __xtrct;
+      bool __testput = __sbout->_M_mode & ios_base::out;
+      try 
+	{
+	  while (__testput && __bufsize != -1)
+	    {
+	      __xtrct = __sbout->sputn(__sbin->gptr(), __bufsize);
+	      __ret += __xtrct;
+	      __sbin->_M_in_cur_move(__xtrct);
+	      if (__xtrct == __bufsize)
+		{
+		  if (__sbin->sgetc() == _Traits::eof())
+		    break;
+		  __bufsize = __sbin->in_avail();
+		}
+	      else
+		break;
+	    }
+	}
+      catch(exception& __fail) 
+	{
+	  __ios.setstate(ios_base::failbit);
+	  if ((__ios.exceptions() & ios_base::failbit) != 0)
+	    __throw_exception_again;
+	}
+      return __ret;
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template class basic_streambuf;
+  extern template
+    streamsize
+    __copy_streambufs(basic_ios&, basic_streambuf*,
+		      basic_streambuf*); 
+
+  extern template class basic_streambuf;
+  extern template
+    streamsize
+    __copy_streambufs(basic_ios&, basic_streambuf*,
+		      basic_streambuf*); 
+} // namespace std
+
+#endif 
diff --git a/contrib/libstdc++/include/bits/streambuf_iterator.h b/contrib/libstdc++/include/bits/streambuf_iterator.h
new file mode 100644
index 0000000..659caec
--- /dev/null
+++ b/contrib/libstdc++/include/bits/streambuf_iterator.h
@@ -0,0 +1,201 @@
+// Streambuf iterators
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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.
+
+// XXX Should specialize copy, find algorithms for streambuf iterators.
+
+/** @file streambuf_iterator.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STREAMBUF_ITERATOR_H
+#define _CPP_BITS_STREAMBUF_ITERATOR_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+  // 24.5.3 Template class istreambuf_iterator
+  template
+    class istreambuf_iterator
+    : public iterator
+    {
+    public:
+      // Types:
+      typedef _CharT                         		char_type;
+      typedef _Traits                        		traits_type;
+      typedef typename _Traits::int_type     		int_type;
+      typedef basic_streambuf<_CharT, _Traits> 		streambuf_type;
+      typedef basic_istream<_CharT, _Traits>         	istream_type;
+
+    private:
+      // 24.5.3 istreambuf_iterator 
+      // p 1 
+      // If the end of stream is reached (streambuf_type::sgetc()
+      // returns traits_type::eof()), the iterator becomes equal to
+      // the "end of stream" iterator value.
+      // NB: This implementation assumes the "end of stream" value
+      // is EOF, or -1.
+      mutable streambuf_type* 	_M_sbuf;  
+      int_type 			_M_c;
+
+    public:
+      istreambuf_iterator() throw() 
+      : _M_sbuf(0), _M_c(-2) { }
+      
+      istreambuf_iterator(istream_type& __s) throw()
+      : _M_sbuf(__s.rdbuf()), _M_c(-2) { }
+
+      istreambuf_iterator(streambuf_type* __s) throw()
+      : _M_sbuf(__s), _M_c(-2) { }
+       
+      // NB: The result of operator*() on an end of stream is undefined.
+      char_type 
+      operator*() const
+      { return traits_type::to_char_type(_M_get()); }
+	
+      istreambuf_iterator& 
+      operator++()
+      { 
+	if (_M_sbuf && _M_sbuf->sbumpc() == traits_type::eof())
+	  _M_sbuf = 0;
+	else
+	  _M_c = -2;
+	return *this; 
+      }
+
+      istreambuf_iterator
+      operator++(int)
+      {
+	istreambuf_iterator __old = *this;
+	if (_M_sbuf && (__old._M_c = _M_sbuf->sbumpc()) == traits_type::eof())
+	  _M_sbuf = 0;
+	else
+	  _M_c = -2;
+	return __old; 
+      }
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+      // 110 istreambuf_iterator::equal not const
+      // NB: there is also number 111 (NAD, Future) pending on this function.
+      bool 
+      equal(const istreambuf_iterator& __b) const
+      {
+	const int_type __eof = traits_type::eof();
+	bool __thiseof = _M_get() == __eof;
+	bool __beof = __b._M_get() == __eof;
+	return (__thiseof && __beof || (!__thiseof && !__beof));
+      }
+#endif
+
+    private:
+      int_type 
+      _M_get() const
+      { 
+	int_type __ret = traits_type::eof();
+	if (_M_sbuf)
+	  { 
+	    if (_M_c != static_cast(-2))
+	      __ret = _M_c;
+	    else 
+	      if ((__ret = _M_sbuf->sgetc()) == traits_type::eof())
+		_M_sbuf = 0;
+	  }
+	return __ret;
+      }
+    };
+
+  template
+    inline bool 
+    operator==(const istreambuf_iterator<_CharT, _Traits>& __a,
+	       const istreambuf_iterator<_CharT, _Traits>& __b)
+    { return __a.equal(__b); }
+
+  template
+    inline bool 
+    operator!=(const istreambuf_iterator<_CharT, _Traits>& __a,
+	       const istreambuf_iterator<_CharT, _Traits>& __b)
+    { return !__a.equal(__b); }
+
+  template
+    class ostreambuf_iterator
+    : public iterator
+    {
+    public:
+      // Types:
+      typedef _CharT                           char_type;
+      typedef _Traits                          traits_type;
+      typedef basic_streambuf<_CharT, _Traits> streambuf_type;
+      typedef basic_ostream<_CharT, _Traits>   ostream_type;
+
+    private:
+      streambuf_type* 	_M_sbuf;
+      bool 		_M_failed;
+
+    public:
+      inline 
+      ostreambuf_iterator(ostream_type& __s) throw ()
+      : _M_sbuf(__s.rdbuf()), _M_failed(!_M_sbuf) { }
+      
+      ostreambuf_iterator(streambuf_type* __s) throw ()
+      : _M_sbuf(__s), _M_failed(!_M_sbuf) { }
+
+      ostreambuf_iterator& 
+      operator=(_CharT __c);
+
+      ostreambuf_iterator& 
+      operator*() throw()
+      { return *this; }
+
+      ostreambuf_iterator& 
+      operator++(int) throw()
+      { return *this; }
+
+      ostreambuf_iterator& 
+      operator++() throw()
+      { return *this; }
+
+      bool 
+      failed() const throw()
+      { return _M_failed; }
+    };
+
+  template
+    inline ostreambuf_iterator<_CharT, _Traits>&
+    ostreambuf_iterator<_CharT, _Traits>::operator=(_CharT __c)
+    {
+      if (!_M_failed && 
+          _Traits::eq_int_type(_M_sbuf->sputc(__c), _Traits::eof()))
+	_M_failed = true;
+      return *this;
+    }
+} // namespace std
+#endif
diff --git a/contrib/libstdc++/include/bits/stringfwd.h b/contrib/libstdc++/include/bits/stringfwd.h
new file mode 100644
index 0000000..b7418a6
--- /dev/null
+++ b/contrib/libstdc++/include/bits/stringfwd.h
@@ -0,0 +1,67 @@
+// String support -*- C++ -*-
+
+// 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21 Strings library
+//
+
+/** @file stringfwd.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_STRINGFWD_H
+#define _CPP_BITS_STRINGFWD_H	1
+
+#pragma GCC system_header
+
+#include 
+
+namespace std
+{
+  template
+    struct char_traits;
+  
+  template<> struct char_traits;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> struct char_traits;
+#endif
+
+  template 
+    class allocator;
+
+  template, 
+           typename _Alloc = allocator<_CharT> >
+    class basic_string;
+
+  typedef basic_string    string;
+  typedef basic_string wstring;
+} // namespace std
+
+#endif	// _CPP_BITS_STRINGFWD_H
diff --git a/contrib/libstdc++/include/bits/type_traits.h b/contrib/libstdc++/include/bits/type_traits.h
new file mode 100644
index 0000000..61bc436
--- /dev/null
+++ b/contrib/libstdc++/include/bits/type_traits.h
@@ -0,0 +1,339 @@
+// Type traits implementation -*- C++ -*-
+
+// Copyright (C) 2001 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.
+
+/*
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file type_traits.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_TYPE_TRAITS_H
+#define _CPP_BITS_TYPE_TRAITS_H 1
+
+#pragma GCC system_header
+
+#include 
+
+/*
+This header file provides a framework for allowing compile time dispatch
+based on type attributes. This is useful when writing template code.
+For example, when making a copy of an array of an unknown type, it helps
+to know if the type has a trivial copy constructor or not, to help decide
+if a memcpy can be used.
+
+The class template __type_traits provides a series of typedefs each of
+which is either __true_type or __false_type. The argument to
+__type_traits can be any type. The typedefs within this template will
+attain their correct values by one of these means:
+    1. The general instantiation contain conservative values which work
+       for all types.
+    2. Specializations may be declared to make distinctions between types.
+    3. Some compilers (such as the Silicon Graphics N32 and N64 compilers)
+       will automatically provide the appropriate specializations for all
+       types.
+
+EXAMPLE:
+
+//Copy an array of elements which have non-trivial copy constructors
+template  void 
+  copy(_Tp* __source,_Tp* __destination,int __n,__false_type);
+//Copy an array of elements which have trivial copy constructors. Use memcpy.
+template  void 
+  copy(_Tp* __source,_Tp* __destination,int __n,__true_type);
+
+//Copy an array of any type by using the most efficient copy mechanism
+template  inline void copy(_Tp* __source,_Tp* __destination,int __n) {
+   copy(__source,__destination,__n,
+        typename __type_traits<_Tp>::has_trivial_copy_constructor());
+}
+*/
+
+struct __true_type {};
+struct __false_type {};
+
+template 
+struct __type_traits { 
+   typedef __true_type     this_dummy_member_must_be_first;
+                   /* Do not remove this member. It informs a compiler which
+                      automatically specializes __type_traits that this
+                      __type_traits template is special. It just makes sure that
+                      things work if an implementation is using a template
+                      called __type_traits for something unrelated. */
+
+   /* The following restrictions should be observed for the sake of
+      compilers which automatically produce type specific specializations 
+      of this class:
+          - You may reorder the members below if you wish
+          - You may remove any of the members below if you wish
+          - You must not rename members without making the corresponding
+            name change in the compiler
+          - Members you add will be treated like regular members unless
+            you add the appropriate support in the compiler. */
+ 
+
+   typedef __false_type    has_trivial_default_constructor;
+   typedef __false_type    has_trivial_copy_constructor;
+   typedef __false_type    has_trivial_assignment_operator;
+   typedef __false_type    has_trivial_destructor;
+   typedef __false_type    is_POD_type;
+};
+
+
+// Provide some specializations.
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template<> struct __type_traits {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+template 
+struct __type_traits<_Tp*> {
+   typedef __true_type    has_trivial_default_constructor;
+   typedef __true_type    has_trivial_copy_constructor;
+   typedef __true_type    has_trivial_assignment_operator;
+   typedef __true_type    has_trivial_destructor;
+   typedef __true_type    is_POD_type;
+};
+
+
+// The following could be written in terms of numeric_limits.  
+// We're doing it separately to reduce the number of dependencies.
+
+template  struct _Is_integer {
+  typedef __false_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template<> struct _Is_integer {
+  typedef __true_type _Integral;
+};
+
+template struct _Is_normal_iterator {
+   typedef __false_type _Normal;
+};
+
+// Forward declaration hack, should really include this from somewhere.
+namespace __gnu_cxx
+{
+  template class __normal_iterator;
+}
+
+template
+struct _Is_normal_iterator< __gnu_cxx::__normal_iterator<_Iterator, _Container> > {
+   typedef __true_type _Normal;
+};
+
+#endif /* _CPP_BITS_TYPE_TRAITS_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/bits/valarray_array.h b/contrib/libstdc++/include/bits/valarray_array.h
new file mode 100644
index 0000000..48dd2aa
--- /dev/null
+++ b/contrib/libstdc++/include/bits/valarray_array.h
@@ -0,0 +1,630 @@
+// The template and inlines for the -*- C++ -*- internal _Array helper class.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file valarray_array.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_BITS_ARRAY_H
+#define _CPP_BITS_ARRAY_H 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+  //
+  // Helper functions on raw pointers
+  //
+  
+  // We get memory by the old fashion way
+  inline void*
+  __valarray_get_memory(size_t __n)
+  { return operator new(__n); }
+  
+  template
+     inline _Tp*__restrict__
+     __valarray_get_storage(size_t __n)
+     {
+       return static_cast<_Tp*__restrict__>
+         (__valarray_get_memory(__n * sizeof(_Tp)));
+     }
+
+  // Return memory to the system
+  inline void
+  __valarray_release_memory(void* __p)
+  { operator delete(__p); }
+
+  // Turn a raw-memory into an array of _Tp filled with _Tp()
+  // This is required in 'valarray v(n);'
+  template
+     struct _Array_default_ctor
+     {
+       // Please note that this isn't exception safe.  But
+       // valarrays aren't required to be exception safe.
+       inline static void
+       _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+       { while (__b != __e) new(__b++) _Tp(); }
+     };
+
+  template
+     struct _Array_default_ctor<_Tp, true>
+     {
+       // For fundamental types, it suffices to say 'memset()'
+       inline static void
+       _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+       { memset(__b, 0, (__e - __b)*sizeof(_Tp)); }
+     };
+
+  template
+     inline void
+     __valarray_default_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+     {
+       _Array_default_ctor<_Tp, __is_fundamental<_Tp>::_M_type>::
+         _S_do_it(__b, __e);
+     }
+    
+  // Turn a raw-memory into an array of _Tp filled with __t
+  // This is the required in valarray v(n, t).  Also
+  // used in valarray<>::resize().
+  template
+     struct _Array_init_ctor
+     {
+       // Please note that this isn't exception safe.  But
+       // valarrays aren't required to be exception safe.
+       inline static void
+       _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e, const _Tp __t)
+       { while (__b != __e) new(__b++) _Tp(__t); }
+     };
+
+  template
+     struct _Array_init_ctor<_Tp, true>
+     {
+       inline static void
+       _S_do_it(_Tp* __restrict__ __b, _Tp* __restrict__ __e,  const _Tp __t)
+       { while (__b != __e) *__b++ = __t; }
+     };
+
+  template
+     inline void
+     __valarray_fill_construct(_Tp* __restrict__ __b, _Tp* __restrict__ __e,
+                               const _Tp __t)
+     {
+       _Array_init_ctor<_Tp, __is_fundamental<_Tp>::_M_type>::
+         _S_do_it(__b, __e, __t);
+     }
+
+  //
+  // copy-construct raw array [__o, *) from plain array [__b, __e)
+  // We can't just say 'memcpy()'
+  //
+  template
+     struct _Array_copy_ctor
+     {
+       // Please note that this isn't exception safe.  But
+       // valarrays aren't required to be exception safe.
+       inline static void
+       _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
+                _Tp* __restrict__ __o)
+       { while (__b != __e) new(__o++) _Tp(*__b++); }
+     };
+
+  template
+     struct _Array_copy_ctor<_Tp, true>
+     {
+       inline static void
+       _S_do_it(const _Tp* __restrict__ __b, const _Tp* __restrict__ __e,
+                _Tp* __restrict__ __o)
+       { memcpy(__o, __b, (__e - __b)*sizeof(_Tp)); }
+     };
+
+  template
+     inline void
+     __valarray_copy_construct(const _Tp* __restrict__ __b,
+                               const _Tp* __restrict__ __e,
+                               _Tp* __restrict__ __o)
+     {
+       _Array_copy_ctor<_Tp, __is_fundamental<_Tp>::_M_type>::
+         _S_do_it(__b, __e, __o);
+     }
+
+  // copy-construct raw array [__o, *) from strided array __a[<__n : __s>]
+  template
+     inline void
+     __valarray_copy_construct (const _Tp* __restrict__ __a, size_t __n,
+                                size_t __s, _Tp* __restrict__ __o)
+     {
+       if (__is_fundamental<_Tp>::_M_type)
+         while (__n--) { *__o++ = *__a; __a += __s; }
+       else
+         while (__n--) { new(__o++) _Tp(*__a);  __a += __s; }
+     }
+
+  // copy-construct raw array [__o, *) from indexed array __a[__i[<__n>]]
+  template
+     inline void
+     __valarray_copy_construct (const _Tp* __restrict__ __a,
+                                const size_t* __restrict__ __i,
+                                _Tp* __restrict__ __o, size_t __n)
+     {
+       if (__is_fundamental<_Tp>::_M_type)
+         while (__n--) *__o++ = __a[*__i++];
+       else
+         while (__n--) new (__o++) _Tp(__a[*__i++]);
+     }
+
+  // Do the necessary cleanup when we're done with arrays.
+  template
+     inline void
+     __valarray_destroy_elements(_Tp* __restrict__ __b, _Tp* __restrict__ __e)
+     {
+       if (!__is_fundamental<_Tp>::_M_type)
+         while (__b != __e) { __b->~_Tp(); ++__b; }
+     }
+    
+  // Fill a plain array __a[<__n>] with __t
+  template
+     inline void
+     __valarray_fill (_Tp* __restrict__ __a, size_t __n, const _Tp& __t)
+     { while (__n--) *__a++ = __t; }
+  
+  // fill strided array __a[<__n-1 : __s>] with __t
+  template
+     inline void
+     __valarray_fill (_Tp* __restrict__ __a, size_t __n,
+                      size_t __s, const _Tp& __t)
+     { for (size_t __i=0; __i<__n; ++__i, __a+=__s) *__a = __t; }
+
+  // fill indir   ect array __a[__i[<__n>]] with __i
+  template
+     inline void
+     __valarray_fill(_Tp* __restrict__ __a, const size_t* __restrict__ __i,
+                     size_t __n, const _Tp& __t)
+     { for (size_t __j=0; __j<__n; ++__j, ++__i) __a[*__i] = __t; }
+    
+  // copy plain array __a[<__n>] in __b[<__n>]
+  // For non-fundamental types, it is wrong to say 'memcpy()'
+  template
+     struct _Array_copier
+     {
+       inline static void
+       _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
+       { while (__n--) *__b++ = *__a++; }      
+     };
+
+  template
+     struct _Array_copier<_Tp, true>
+     {
+       inline static void
+       _S_do_it(const _Tp* __restrict__ __a, size_t __n, _Tp* __restrict__ __b)
+       { memcpy (__b, __a, __n * sizeof (_Tp)); }
+     };
+
+  // Copy a plain array __a[<__n>] into a play array __b[<>]
+  template
+     inline void
+     __valarray_copy(const _Tp* __restrict__ __a, size_t __n,
+                      _Tp* __restrict__ __b)
+     {
+       _Array_copier<_Tp, __is_fundamental<_Tp>::_M_type>::
+         _S_do_it(__a, __n, __b);
+     }
+
+  // Copy strided array __a[<__n : __s>] in plain __b[<__n>]
+  template
+     inline void
+     __valarray_copy(const _Tp* __restrict__ __a, size_t __n, size_t __s,
+                      _Tp* __restrict__ __b)
+     { for (size_t __i=0; __i<__n; ++__i, ++__b, __a += __s) *__b = *__a; }
+
+  // Copy a plain array  __a[<__n>] into a strided array __b[<__n : __s>]
+  template
+     inline void
+     __valarray_copy(const _Tp* __restrict__ __a, _Tp* __restrict__ __b,
+                      size_t __n, size_t __s)
+     { for (size_t __i=0; __i<__n; ++__i, ++__a, __b+=__s) *__b = *__a; }
+
+  // Copy strided array __src[<__n : __s1>] into another
+  // strided array __dst[< : __s2>].  Their sizes must match.
+  template
+     inline void
+     __valarray_copy(const _Tp* __restrict__ __src, size_t __n, size_t __s1,
+                     _Tp* __restrict__ __dst, size_t __s2)
+     {
+       for (size_t __i = 0; __i < __n; ++__i)
+         __dst[__i * __s2] = __src [ __i * __s1];
+     }
+
+  
+  // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
+  template
+     inline void
+     __valarray_copy (const _Tp* __restrict__ __a,
+                      const size_t* __restrict__ __i,
+                      _Tp* __restrict__ __b, size_t __n)
+     { for (size_t __j=0; __j<__n; ++__j, ++__b, ++__i) *__b = __a[*__i]; }
+
+  // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
+  template
+     inline void
+     __valarray_copy (const _Tp* __restrict__ __a, size_t __n,
+                      _Tp* __restrict__ __b, const size_t* __restrict__ __i)
+     { for (size_t __j=0; __j<__n; ++__j, ++__a, ++__i) __b[*__i] = *__a; }
+
+  // Copy the __n first elements of an indexed array __src[<__i>] into
+  // another indexed array __dst[<__j>].
+  template
+     inline void
+     __valarray_copy(const _Tp* __restrict__ __src, size_t __n,
+                     const size_t* __restrict__ __i,
+                     _Tp* __restrict__ __dst, const size_t* __restrict__ __j)
+     {
+       for (size_t __k = 0; __k < __n; ++__k)
+         __dst[*__j++] = __src[*__i++];
+     }
+
+  //
+  // Compute the sum of elements in range [__f, __l)
+  // This is a naive algorithm.  It suffers from cancelling.
+  // In the future try to specialize
+  // for _Tp = float, double, long double using a more accurate
+  // algorithm.
+  //
+  template
+     inline _Tp
+     __valarray_sum(const _Tp* __restrict__ __f, const _Tp* __restrict__ __l)
+     {
+       _Tp __r = _Tp();
+       while (__f != __l) __r += *__f++;
+       return __r;
+     }
+
+  // Compute the product of all elements in range [__f, __l)
+  template
+     inline _Tp
+     __valarray_product(const _Tp* __restrict__ __f,
+                        const _Tp* __restrict__ __l)
+     {
+       _Tp __r = _Tp(1);
+       while (__f != __l) __r = __r * *__f++;
+       return __r;
+     }
+
+  // Compute the min/max of an array-expression
+  template
+     inline typename _Ta::value_type
+     __valarray_min(const _Ta& __a)
+     {
+       size_t __s = __a.size();
+       typedef typename _Ta::value_type _Value_type;
+       _Value_type __r = __s == 0 ? _Value_type() : __a[0];
+       for (size_t __i = 1; __i < __s; ++__i)
+         {
+           _Value_type __t = __a[__i];
+           if (__t < __r)
+             __r = __t;
+         }
+       return __r;
+     }
+  
+  template
+     inline typename _Ta::value_type
+     __valarray_max(const _Ta& __a)
+     {
+       size_t __s = __a.size();
+       typedef typename _Ta::value_type _Value_type;
+       _Value_type __r = __s == 0 ? _Value_type() : __a[0];
+       for (size_t __i = 1; __i < __s; ++__i)
+         {
+           _Value_type __t = __a[__i];
+           if (__t > __r)
+             __r = __t;
+         }
+       return __r;
+     }
+  
+  //
+  // Helper class _Array, first layer of valarray abstraction.
+  // All operations on valarray should be forwarded to this class
+  // whenever possible. -- gdr
+  //
+    
+  template
+     struct _Array
+     {
+       explicit _Array (size_t);
+       explicit _Array (_Tp* const __restrict__);
+       explicit _Array (const valarray<_Tp>&);
+       _Array (const _Tp* __restrict__, size_t);
+
+       _Tp* begin () const;
+
+       _Tp* const __restrict__ _M_data;
+     };
+  
+  template
+     inline void
+     __valarray_fill (_Array<_Tp> __a, size_t __n, const _Tp& __t)
+     { __valarray_fill (__a._M_data, __n, __t); }
+  
+  template
+     inline void
+     __valarray_fill (_Array<_Tp> __a, size_t __n, size_t __s, const _Tp& __t)
+     { __valarray_fill (__a._M_data, __n, __s, __t); }
+  
+  template
+     inline void
+     __valarray_fill (_Array<_Tp> __a, _Array __i, 
+                      size_t __n, const _Tp& __t)
+     { __valarray_fill (__a._M_data, __i._M_data, __n, __t); }
+
+  // Copy a plain array __a[<__n>] into a play array __b[<>]
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b)
+     { __valarray_copy(__a._M_data, __n, __b._M_data); }
+  
+  // Copy strided array __a[<__n : __s>] in plain __b[<__n>]
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s, _Array<_Tp> __b)
+     { __valarray_copy(__a._M_data, __n, __s, __b._M_data); }
+
+  // Copy a plain array  __a[<__n>] into a strided array __b[<__n : __s>]
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __a, _Array<_Tp> __b, size_t __n, size_t __s)
+     { __valarray_copy(__a._M_data, __b._M_data, __n, __s); }
+
+  // Copy strided array __src[<__n : __s1>] into another
+  // strided array __dst[< : __s2>].  Their sizes must match.
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __a, size_t __n, size_t __s1,
+                     _Array<_Tp> __b, size_t __s2)
+     { __valarray_copy(__a._M_data, __n, __s1, __b._M_data, __s2); }
+
+  
+  // Copy an indexed array __a[__i[<__n>]] in plain array __b[<__n>]
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __a, _Array __i, 
+                      _Array<_Tp> __b, size_t __n)
+     { __valarray_copy(__a._M_data, __i._M_data, __b._M_data, __n); }
+  
+  // Copy a plain array __a[<__n>] in an indexed array __b[__i[<__n>]]
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, 
+                      _Array __i)
+     { __valarray_copy(__a._M_data, __n, __b._M_data, __i._M_data); }
+
+  // Copy the __n first elements of an indexed array __src[<__i>] into
+  // another indexed array __dst[<__j>].
+  template
+     inline void
+     __valarray_copy(_Array<_Tp> __src, size_t __n, _Array __i,
+                     _Array<_Tp> __dst, _Array __j)
+     {
+       __valarray_copy(__src._M_data, __n, __i._M_data,
+                       __dst._M_data, __j._M_data);
+     }
+
+  template
+     inline
+     _Array<_Tp>::_Array (size_t __n)
+       : _M_data(__valarray_get_storage<_Tp>(__n))
+     { __valarray_default_construct(_M_data, _M_data + __n); }
+
+  template
+     inline
+     _Array<_Tp>::_Array (_Tp* const __restrict__ __p) : _M_data (__p) {}
+  
+  template
+     inline _Array<_Tp>::_Array (const valarray<_Tp>& __v) 
+         : _M_data (__v._M_data) {}
+  
+  template
+     inline
+     _Array<_Tp>::_Array (const _Tp* __restrict__ __b, size_t __s) 
+       : _M_data(__valarray_get_storage<_Tp>(__s))
+     { __valarray_copy_construct(__b, __s, _M_data); }
+
+  template
+     inline _Tp*
+     _Array<_Tp>::begin () const
+     { return _M_data; }
+
+#define _DEFINE_ARRAY_FUNCTION(_Op, _Name)				\
+template							\
+inline void								\
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, const _Tp& __t)	\
+{									\
+  for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p)		\
+    *__p _Op##= __t;							\
+}									\
+									\
+template							\
+inline void								\
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b)	\
+{									\
+  _Tp* __p = __a._M_data;						\
+  for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__p, ++__q)		\
+    *__p _Op##= *__q;							\
+}									\
+									\
+template					\
+void									\
+_Array_augmented_##_Name (_Array<_Tp> __a, 				\
+                         const _Expr<_Dom,_Tp>& __e, size_t __n)	\
+{									\
+    _Tp* __p (__a._M_data);						\
+    for (size_t __i=0; __i<__n; ++__i, ++__p) *__p _Op##= __e[__i];	\
+}									\
+									\
+template							\
+inline void								\
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n, size_t __s, 	\
+			 _Array<_Tp> __b)				\
+{					       				\
+    _Tp* __q (__b._M_data);						\
+    for (_Tp* __p=__a._M_data; __p<__a._M_data+__s*__n; __p+=__s, ++__q) \
+      *__p _Op##= *__q;							\
+}									\
+									\
+template							\
+inline void								\
+_Array_augmented_##_Name (_Array<_Tp> __a, _Array<_Tp> __b, 		\
+			 size_t __n, size_t __s)			\
+{									\
+    _Tp* __q (__b._M_data);						\
+    for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, __q+=__s)	\
+      *__p _Op##= *__q;							\
+}									\
+									\
+template					\
+void									\
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __s,			\
+                          const _Expr<_Dom,_Tp>& __e, size_t __n)	\
+{									\
+    _Tp* __p (__a._M_data);						\
+    for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p _Op##= __e[__i];	\
+}									\
+									\
+template							\
+inline void								\
+_Array_augmented_##_Name (_Array<_Tp> __a, _Array __i,		\
+                          _Array<_Tp> __b, size_t __n)			\
+{									\
+    _Tp* __q (__b._M_data);						\
+    for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__q)	\
+        __a._M_data[*__j] _Op##= *__q;					\
+}									\
+									\
+template							\
+inline void								\
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n,			\
+                          _Array<_Tp> __b, _Array __i)		\
+{									\
+    _Tp* __p (__a._M_data);						\
+    for (size_t* __j=__i._M_data; __j<__i._M_data+__n; ++__j, ++__p)	\
+        *__p _Op##= __b._M_data[*__j];					\
+}									\
+									\
+template					\
+void									\
+_Array_augmented_##_Name (_Array<_Tp> __a, _Array __i,		\
+                          const _Expr<_Dom, _Tp>& __e, size_t __n)	\
+{									\
+    size_t* __j (__i._M_data);						\
+    for (size_t __k=0; __k<__n; ++__k, ++__j) 				\
+      __a._M_data[*__j] _Op##= __e[__k];				\
+}									\
+									\
+template							\
+void									\
+_Array_augmented_##_Name (_Array<_Tp> __a, _Array __m,		\
+                          _Array<_Tp> __b, size_t __n)			\
+{									\
+    bool* ok (__m._M_data);						\
+    _Tp* __p (__a._M_data);						\
+    for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++ok, ++__p) { \
+        while (! *ok) {							\
+            ++ok;							\
+            ++__p;							\
+        }								\
+        *__p _Op##= *__q;						\
+    }									\
+}									\
+									\
+template							\
+void									\
+_Array_augmented_##_Name (_Array<_Tp> __a, size_t __n,			\
+                         _Array<_Tp> __b, _Array __m)		\
+{									\
+    bool* ok (__m._M_data);						\
+    _Tp* __q (__b._M_data);						\
+    for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++ok, ++__q) { \
+        while (! *ok) {							\
+            ++ok;							\
+            ++__q;							\
+        }								\
+        *__p _Op##= *__q;						\
+    }									\
+}									\
+									\
+template					\
+void									\
+_Array_augmented_##_Name (_Array<_Tp> __a, _Array __m,		\
+                          const _Expr<_Dom, _Tp>& __e, size_t __n)	\
+{									\
+    bool* ok(__m._M_data);						\
+    _Tp* __p (__a._M_data);						\
+    for (size_t __i=0; __i<__n; ++__i, ++ok, ++__p) {			\
+        while (! *ok) {							\
+            ++ok;							\
+            ++__p;							\
+        }								\
+        *__p _Op##= __e[__i];						\
+    }									\
+}
+
+   _DEFINE_ARRAY_FUNCTION(+, plus)
+   _DEFINE_ARRAY_FUNCTION(-, minus)
+   _DEFINE_ARRAY_FUNCTION(*, multiplies)
+   _DEFINE_ARRAY_FUNCTION(/, divides)
+   _DEFINE_ARRAY_FUNCTION(%, modulus)
+   _DEFINE_ARRAY_FUNCTION(^, xor)
+   _DEFINE_ARRAY_FUNCTION(|, or)
+   _DEFINE_ARRAY_FUNCTION(&, and)    
+   _DEFINE_ARRAY_FUNCTION(<<, shift_left)
+   _DEFINE_ARRAY_FUNCTION(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_FUNCTION    
+
+} // std::
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export 
+# include     
+#endif
+           
+#endif /* _CPP_BITS_ARRAY_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/valarray_array.tcc b/contrib/libstdc++/include/bits/valarray_array.tcc
new file mode 100644
index 0000000..ba4b083
--- /dev/null
+++ b/contrib/libstdc++/include/bits/valarray_array.tcc
@@ -0,0 +1,161 @@
+// The template and inlines for the -*- C++ -*- internal _Array helper class.
+
+// Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// Written by Gabriel Dos Reis 
+
+#ifndef _CPP_BITS_VALARRAY_ARRAY_TCC 
+#define _CPP_BITS_VALARRAY_ARRAY_TCC 1
+
+namespace std
+{
+
+export template
+void
+__valarray_fill (_Array<_Tp> __a, size_t __n, _Array __m, const _Tp& __t)
+{
+    _Tp* __p = __a._M_data;
+    bool* __ok (__m._M_data);
+    for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) {
+        while (! *__ok) {
+            ++__ok;
+            ++__p;
+        }
+        *__p = __t;
+    }
+}
+
+export template
+void
+__valarray_copy (_Array<_Tp> __a, _Array __m, _Array<_Tp> __b, size_t __n)
+{
+    _Tp* __p (__a._M_data);
+    bool* __ok (__m._M_data);
+    for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) {
+        while (! *__ok) {
+            ++__ok;
+            ++__p;
+        }
+        *__q = *__p;
+    }
+}
+
+export template
+void
+__valarray_copy (_Array<_Tp> __a, size_t __n, _Array<_Tp> __b, _Array __m)
+{
+    _Tp* __q (__b._M_data);
+    bool* __ok (__m._M_data);
+    for (_Tp* __p=__a._M_data; __p<__a._M_data+__n; ++__p, ++__ok, ++__q) {
+        while (! *__ok) {
+            ++__ok;
+            ++__q;
+        }
+        *__q = *__p;
+    }
+}
+
+export template
+void
+__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, _Array<_Tp> __a)
+{
+    _Tp* __p (__a._M_data);
+    for (size_t __i=0; __i<__n; ++__i, ++__p) *__p = __e[__i];
+}
+
+export template
+void
+__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, 
+                 _Array<_Tp> __a, size_t __s)
+{
+    _Tp* __p (__a._M_data);
+    for (size_t __i=0; __i<__n; ++__i, __p+=__s) *__p = __e[__i];
+}
+
+export template
+void
+__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, 
+                 _Array<_Tp> __a, _Array __i)
+{
+    size_t* __j (__i._M_data);
+    for (size_t __k=0; __k<__n; ++__k, ++__j) __a._M_data[*__j] = __e[__k];
+}
+
+export template
+void
+__valarray_copy (const _Expr<_Dom, _Tp>& __e, size_t __n, 
+                 _Array<_Tp> __a, _Array __m)
+{
+    bool* __ok (__m._M_data);
+    _Tp* __p (__a._M_data);
+    for (size_t __i=0; __i<__n; ++__i, ++__ok, ++__p) {
+        while (! *__ok) {
+            ++__ok;
+            ++__p;
+        }
+        *__p = __e[__i];
+    }
+}
+
+
+export template
+void
+__valarray_copy_construct (const _Expr<_Dom, _Tp>& __e, size_t __n,
+                           _Array<_Tp> __a)
+{
+    _Tp* __p (__a._M_data);
+    for (size_t __i=0; __i<__n; ++__i, ++__p) new (__p) _Tp(__e[__i]);
+}
+
+
+export template
+void
+__valarray_copy_construct (_Array<_Tp> __a, _Array __m,
+                           _Array<_Tp> __b, size_t __n)
+{
+    _Tp* __p (__a._M_data);
+    bool* __ok (__m._M_data);
+    for (_Tp* __q=__b._M_data; __q<__b._M_data+__n; ++__q, ++__ok, ++__p) {
+        while (! *__ok) {
+            ++__ok;
+            ++__p;
+        }
+        new (__q) _Tp(*__p);
+    }
+}
+
+
+
+
+} // std::
+
+#endif /* _CPP_BITS_VALARRAY_ARRAY_TCC */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/bits/valarray_meta.h b/contrib/libstdc++/include/bits/valarray_meta.h
new file mode 100644
index 0000000..f2926c0
--- /dev/null
+++ b/contrib/libstdc++/include/bits/valarray_meta.h
@@ -0,0 +1,1075 @@
+// The template and inlines for the -*- C++ -*- internal _Meta class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file valarray_meta.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#ifndef _CPP_VALARRAY_META_H
+#define _CPP_VALARRAY_META_H 1
+
+#pragma GCC system_header
+
+namespace std
+{
+
+    //
+    // Implementing a loosened valarray return value is tricky.
+    // First we need to meet 26.3.1/3: we should not add more than
+    // two levels of template nesting. Therefore we resort to template
+    // template to "flatten" loosened return value types.
+    // At some point we use partial specialization to remove one level
+    // template nesting due to _Expr<>
+    //
+    
+
+    // This class is NOT defined. It doesn't need to.
+    template class _Constant;
+
+    //
+    // Unary function application closure.
+    //
+    template class _UnFunBase {
+    public:
+        typedef typename _Dom::value_type value_type;
+        typedef value_type _Vt;
+        
+        _UnFunBase (const _Dom& __e, _Vt __f(_Vt))
+                : _M_expr(__e), _M_func(__f) {}
+        
+        _Vt operator[] (size_t __i) const { return _M_func(_M_expr[__i]); }
+        size_t size () const { return _M_expr.size(); }
+        
+    private:
+        const _Dom& _M_expr;
+        _Vt (*_M_func)(_Vt);
+    };
+
+    template class _Meta, class _Dom>
+        class _UnFunClos;
+    
+    template
+    struct _UnFunClos<_Expr,_Dom> : _UnFunBase<_Dom> {
+        typedef _UnFunBase<_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+        
+        _UnFunClos (const _Dom& __e, value_type __f(value_type))
+                : _Base (__e, __f) {}
+    };
+    
+    template
+    struct _UnFunClos<_ValArray,_Tp> : _UnFunBase > {
+        typedef _UnFunBase > _Base;
+        typedef typename _Base::value_type value_type;
+        
+        _UnFunClos (const valarray<_Tp>& __v, _Tp __f(_Tp))
+                : _Base (__v, __f) {}
+    };
+
+    //
+    // Binary function application closure.
+    //
+    template class _Meta1,
+        template class Meta2,
+        class _Dom1, class _Dom2> class _BinFunClos;
+    
+    template class _BinFunBase {
+    public:
+        typedef typename _Dom1::value_type value_type;
+        typedef value_type _Vt;
+
+        _BinFunBase (const _Dom1& __e1, const _Dom2& __e2,
+                      _Vt __f (_Vt, _Vt))
+                : _M_expr1 (__e1), _M_expr2 (__e2), _M_func (__f) {}
+
+        value_type operator[] (size_t __i) const
+        { return _M_func (_M_expr1[__i], _M_expr2[__i]); }
+        size_t size () const { return _M_expr1.size (); }
+
+    private:
+        const _Dom1& _M_expr1;
+        const _Dom2& _M_expr2;
+        _Vt (*_M_func)(_Vt, _Vt);
+    };
+
+    template class _BinFunBase1 {
+    public:
+        typedef typename _Dom::value_type value_type ;
+        typedef value_type _Vt;
+
+        _BinFunBase1 (const _Vt& __c, const _Dom& __e, _Vt __f(_Vt, _Vt))
+                : _M_expr1 (__c), _M_expr2 (__e), _M_func (__f) {}
+
+        value_type operator[] (size_t __i) const
+        { return _M_func (_M_expr1, _M_expr2[__i]); }
+        size_t size () const { return _M_expr2.size (); }
+
+    private:
+        const _Vt& _M_expr1;
+        const _Dom& _M_expr2;
+        _Vt (*_M_func)(_Vt, _Vt);
+    };
+
+    template class _BinFunBase2 {
+    public:
+        typedef typename _Dom::value_type value_type;
+        typedef value_type _Vt;
+
+        _BinFunBase2 (const _Dom& __e, const _Vt& __c, _Vt __f(_Vt, _Vt))
+                : _M_expr1 (__e), _M_expr2 (__c), _M_func (__f) {}
+
+        value_type operator[] (size_t __i) const
+        { return _M_func (_M_expr1[__i], _M_expr2); }
+        size_t size () const { return _M_expr1.size (); }
+
+    private:
+        const _Dom& _M_expr1;
+        const _Vt& _M_expr2;
+        _Vt (*_M_func)(_Vt, _Vt);
+    };
+
+    template
+    struct _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> : _BinFunBase<_Dom1,_Dom2> {
+        typedef _BinFunBase<_Dom1,_Dom2> _Base;
+        typedef typename _Base::value_type value_type;
+        typedef value_type _Tp;
+
+        _BinFunClos (const _Dom1& __e1, const _Dom2& __e2,
+                     _Tp __f(_Tp, _Tp))
+                : _Base (__e1, __e2, __f) {}
+    };
+
+    template
+    struct _BinFunClos<_ValArray,_ValArray,_Tp,_Tp>
+        : _BinFunBase, valarray<_Tp> > {
+        typedef _BinFunBase, valarray<_Tp> > _Base;
+        typedef _Tp value_type;
+
+        _BinFunClos (const valarray<_Tp>& __v, const valarray<_Tp>& __w,
+                     _Tp __f(_Tp, _Tp))
+                : _Base (__v, __w, __f) {}
+    };
+    
+    template
+    struct _BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type>
+        : _BinFunBase<_Dom,valarray > {
+        typedef typename _Dom::value_type _Tp;
+        typedef _BinFunBase<_Dom,valarray<_Tp> > _Base;
+        typedef _Tp value_type;
+
+        _BinFunClos (const _Dom& __e, const valarray<_Tp>& __v,
+                     _Tp __f(_Tp, _Tp))
+                : _Base (__e, __v, __f) {}
+    };
+
+    template
+    struct _BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom>
+        : _BinFunBase,_Dom> {
+        typedef typename _Dom::value_type _Tp;
+        typedef _BinFunBase<_Dom,valarray<_Tp> > _Base;
+        typedef _Tp value_type;
+
+        _BinFunClos (const valarray<_Tp>& __v, const _Dom& __e,
+                     _Tp __f(_Tp, _Tp))
+                : _Base (__v, __e, __f) {}
+    };
+
+    template
+    struct _BinFunClos<_Expr,_Constant,_Dom,typename _Dom::value_type>
+        : _BinFunBase2<_Dom> {
+        typedef typename _Dom::value_type _Tp;
+        typedef _Tp value_type;
+        typedef _BinFunBase2<_Dom> _Base;
+
+        _BinFunClos (const _Dom& __e, const _Tp& __t, _Tp __f (_Tp, _Tp))
+                : _Base (__e, __t, __f) {}
+    };
+
+    template
+    struct _BinFunClos<_Constant,_Expr,_Dom,typename _Dom::value_type>
+        : _BinFunBase1<_Dom> {
+        typedef typename _Dom::value_type _Tp;
+        typedef _Tp value_type;
+        typedef _BinFunBase1<_Dom> _Base;
+
+        _BinFunClos (const _Tp& __t, const _Dom& __e, _Tp __f (_Tp, _Tp))
+                : _Base (__t, __e, __f) {}
+    };
+
+    template
+    struct _BinFunClos<_ValArray,_Constant,_Tp,_Tp>
+        : _BinFunBase2 > {
+        typedef _BinFunBase2 > _Base;
+        typedef _Tp value_type;
+
+        _BinFunClos (const valarray<_Tp>& __v, const _Tp& __t,
+                     _Tp __f(_Tp, _Tp))
+                : _Base (__v, __t, __f) {}
+    };
+
+    template
+    struct _BinFunClos<_Constant,_ValArray,_Tp,_Tp>
+        : _BinFunBase1 > {
+        typedef _BinFunBase1 > _Base;
+        typedef _Tp value_type;
+
+        _BinFunClos (const _Tp& __t, const valarray<_Tp>& __v,
+                     _Tp __f (_Tp, _Tp))
+                : _Base (__t, __v, __f) {}
+    };
+
+    //
+    // Apply function taking a value/const reference closure
+    //
+
+    template class _FunBase {
+    public:
+        typedef typename _Dom::value_type value_type;
+
+        _FunBase (const _Dom& __e, value_type __f(_Arg))
+                : _M_expr (__e), _M_func (__f) {}
+
+        value_type operator[] (size_t __i) const
+        { return _M_func (_M_expr[__i]); }
+        size_t size() const { return _M_expr.size ();}
+
+    private:
+        const _Dom& _M_expr;
+        value_type (*_M_func)(_Arg);
+    };
+
+    template
+    struct _ValFunClos<_Expr,_Dom>
+        : _FunBase<_Dom, typename _Dom::value_type> {
+        typedef _FunBase<_Dom, typename _Dom::value_type> _Base;
+        typedef typename _Base::value_type value_type;
+        typedef value_type _Tp;
+    
+        _ValFunClos (const _Dom& __e, _Tp __f (_Tp)) : _Base (__e, __f) {}
+    };
+
+    template
+    struct _ValFunClos<_ValArray,_Tp>
+        : _FunBase, _Tp> {
+        typedef _FunBase, _Tp> _Base;
+        typedef _Tp value_type;
+
+        _ValFunClos (const valarray<_Tp>& __v, _Tp __f(_Tp))
+                : _Base (__v, __f) {}
+    };
+
+    template
+    struct _RefFunClos<_Expr,_Dom> :
+        _FunBase<_Dom, const typename _Dom::value_type&> {
+        typedef _FunBase<_Dom, const typename _Dom::value_type&> _Base;
+        typedef typename _Base::value_type value_type;
+        typedef value_type _Tp;
+
+        _RefFunClos (const _Dom& __e, _Tp __f (const _Tp&))
+                : _Base (__e, __f) {}
+    };
+
+    template
+    struct _RefFunClos<_ValArray,_Tp>
+        : _FunBase, const _Tp&> {
+        typedef _FunBase, const _Tp&> _Base;
+        typedef _Tp value_type;
+        
+        _RefFunClos (const valarray<_Tp>& __v, _Tp __f(const _Tp&))
+                : _Base (__v, __f) {}
+    };
+    
+    //
+    // Unary expression closure.
+    //
+
+    template class _Oper, typename _Arg>
+    class _UnBase {
+    public:
+        typedef _Oper _Op;
+        typedef typename _Op::result_type value_type;
+
+        _UnBase (const _Arg& __e) : _M_expr(__e) {}
+        value_type operator[] (size_t) const;
+        size_t size () const { return _M_expr.size (); }
+
+    private:
+        const _Arg& _M_expr;
+    };
+
+    template class _Oper, typename _Arg>
+    inline typename _UnBase<_Oper, _Arg>::value_type
+    _UnBase<_Oper, _Arg>::operator[] (size_t __i) const
+    { return _Op() (_M_expr[__i]); }
+    
+    template class _Oper, class _Dom>
+    struct _UnClos<_Oper, _Expr, _Dom> :  _UnBase<_Oper, _Dom> {
+        typedef _Dom _Arg;
+        typedef _UnBase<_Oper, _Dom> _Base;
+        typedef typename _Base::value_type value_type;
+        
+        _UnClos (const _Arg& __e) : _Base(__e) {}
+    };
+
+    template class _Oper, typename _Tp>
+    struct _UnClos<_Oper, _ValArray, _Tp> : _UnBase<_Oper, valarray<_Tp> > {
+        typedef valarray<_Tp> _Arg;
+        typedef _UnBase<_Oper, valarray<_Tp> > _Base;
+        typedef typename _Base::value_type value_type;
+
+        _UnClos (const _Arg& __e) : _Base(__e) {}
+    };
+
+
+    //
+    // Binary expression closure.
+    //
+
+    template class _Oper,
+        typename _FirstArg, typename _SecondArg>
+    class _BinBase {
+    public:
+        typedef _Oper _Op;
+        typedef typename _Op::result_type value_type;
+
+        _BinBase (const _FirstArg& __e1, const _SecondArg& __e2)
+                : _M_expr1 (__e1), _M_expr2 (__e2) {}
+        value_type operator[] (size_t) const;
+        size_t size () const { return _M_expr1.size (); }
+        
+    private:
+        const _FirstArg& _M_expr1;
+        const _SecondArg& _M_expr2;
+    };
+
+    template class _Oper,
+        typename _FirstArg, typename _SecondArg>
+    inline typename _BinBase<_Oper,_FirstArg,_SecondArg>::value_type
+    _BinBase<_Oper,_FirstArg,_SecondArg>::operator[] (size_t __i) const
+    { return _Op() (_M_expr1[__i], _M_expr2[__i]); }
+
+
+    template class _Oper, class _Clos>
+    class _BinBase2 {
+    public:
+        typedef typename _Clos::value_type _Vt;
+        typedef _Oper<_Vt> _Op;
+        typedef typename _Op::result_type value_type;
+
+        _BinBase2 (const _Clos& __e, const _Vt& __t)
+                : _M_expr1 (__e), _M_expr2 (__t) {}
+        value_type operator[] (size_t) const;
+        size_t size () const { return _M_expr1.size (); }
+
+    private:
+        const _Clos& _M_expr1;
+        const _Vt& _M_expr2;
+    };
+
+    template class _Oper, class _Clos>
+    inline typename _BinBase2<_Oper,_Clos>::value_type
+    _BinBase2<_Oper,_Clos>::operator[] (size_t __i) const
+    { return _Op() (_M_expr1[__i], _M_expr2); }
+
+
+    template class _Oper, class _Clos>
+    class _BinBase1 {
+    public:
+        typedef typename _Clos::value_type _Vt;
+        typedef _Oper<_Vt> _Op;
+        typedef typename _Op::result_type value_type;
+
+        _BinBase1 (const _Vt& __t, const _Clos& __e)
+                : _M_expr1 (__t), _M_expr2 (__e) {}
+        value_type operator[] (size_t) const;
+        size_t size () const { return _M_expr2.size (); }
+
+    private:
+        const _Vt& _M_expr1;
+        const _Clos& _M_expr2;
+    };
+
+    template class _Oper, class _Clos>
+    inline typename
+    _BinBase1<_Oper,_Clos>::value_type
+    _BinBase1<_Oper,_Clos>:: operator[] (size_t __i) const
+    { return _Op() (_M_expr1, _M_expr2[__i]); }
+
+    
+    template class _Oper, class _Dom1, class _Dom2>
+    struct  _BinClos<_Oper, _Expr, _Expr, _Dom1, _Dom2>
+        : _BinBase<_Oper,_Dom1,_Dom2> {
+        typedef _BinBase<_Oper,_Dom1,_Dom2> _Base;
+        typedef typename _Base::value_type value_type;
+        
+        _BinClos(const _Dom1& __e1, const _Dom2& __e2) : _Base(__e1, __e2) {}
+    };
+
+    template class _Oper, typename _Tp>
+    struct _BinClos<_Oper,_ValArray,_ValArray,_Tp,_Tp>
+        : _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > {
+        typedef _BinBase<_Oper,valarray<_Tp>,valarray<_Tp> > _Base;
+        typedef _Tp value_type;
+
+        _BinClos (const valarray<_Tp>& __v, const valarray<_Tp>& __w)
+                : _Base (__v, __w) {}
+    };
+
+    template class _Oper, class _Dom>
+    struct  _BinClos<_Oper,_Expr,_ValArray,_Dom,typename _Dom::value_type>
+        : _BinBase<_Oper,_Dom,valarray > {
+        typedef typename _Dom::value_type _Tp;
+        typedef _BinBase<_Oper,_Dom,valarray<_Tp> > _Base;
+        typedef typename _Base::value_type value_type;
+
+        _BinClos(const _Dom& __e1, const valarray<_Tp>& __e2)
+                : _Base (__e1, __e2) {}
+    };
+
+    template class _Oper, class _Dom>
+    struct  _BinClos<_Oper,_ValArray,_Expr,typename _Dom::value_type,_Dom>
+        : _BinBase<_Oper,valarray,_Dom> {
+        typedef typename _Dom::value_type _Tp;
+        typedef _BinBase<_Oper,valarray<_Tp>,_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+
+        _BinClos (const valarray<_Tp>& __e1, const _Dom& __e2)
+                : _Base (__e1, __e2) {}
+    };
+
+    template class _Oper, class _Dom>
+    struct _BinClos<_Oper,_Expr,_Constant,_Dom,typename _Dom::value_type>
+        : _BinBase2<_Oper,_Dom> {
+        typedef typename _Dom::value_type _Tp;
+        typedef _BinBase2<_Oper,_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+
+        _BinClos (const _Dom& __e1, const _Tp& __e2) : _Base (__e1, __e2) {}
+    };
+
+    template class _Oper, class _Dom>
+    struct _BinClos<_Oper,_Constant,_Expr,typename _Dom::value_type,_Dom>
+        : _BinBase1<_Oper,_Dom> {
+        typedef typename _Dom::value_type _Tp;
+        typedef _BinBase1<_Oper,_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+
+        _BinClos (const _Tp& __e1, const _Dom& __e2) : _Base (__e1, __e2) {}
+    };
+    
+    template class _Oper, typename _Tp>
+    struct _BinClos<_Oper,_ValArray,_Constant,_Tp,_Tp>
+        : _BinBase2<_Oper,valarray<_Tp> > {
+        typedef _BinBase2<_Oper,valarray<_Tp> > _Base;
+        typedef typename _Base::value_type value_type;
+
+        _BinClos (const valarray<_Tp>& __v, const _Tp& __t)
+                : _Base (__v, __t) {}
+    };
+
+    template class _Oper, typename _Tp>
+    struct _BinClos<_Oper,_Constant,_ValArray,_Tp,_Tp>
+        : _BinBase1<_Oper,valarray<_Tp> > {
+        typedef _BinBase1<_Oper,valarray<_Tp> > _Base;
+        typedef typename _Base::value_type value_type;
+
+        _BinClos (const _Tp& __t, const valarray<_Tp>& __v)
+                : _Base (__t, __v) {}
+    };
+        
+
+    //
+    // slice_array closure.
+    //
+    template  class _SBase {
+    public:
+        typedef typename _Dom::value_type value_type;
+
+        _SBase (const _Dom& __e, const slice& __s)
+                : _M_expr (__e), _M_slice (__s) {}
+        value_type operator[] (size_t __i) const
+        { return _M_expr[_M_slice.start () + __i * _M_slice.stride ()]; }
+        size_t size() const { return _M_slice.size (); }
+
+    private:
+        const _Dom& _M_expr;
+        const slice& _M_slice;
+    };
+
+    template class _SBase<_Array<_Tp> > {
+    public:
+        typedef _Tp value_type;
+
+        _SBase (_Array<_Tp> __a, const slice& __s)
+                : _M_array (__a._M_data+__s.start()), _M_size (__s.size()),
+                  _M_stride (__s.stride()) {}
+        value_type operator[] (size_t __i) const
+        { return _M_array._M_data[__i * _M_stride]; }
+        size_t size() const { return _M_size; }
+
+    private:
+        const _Array<_Tp> _M_array;
+        const size_t _M_size;
+        const size_t _M_stride;
+    };
+
+    template struct  _SClos<_Expr,_Dom> : _SBase<_Dom> {
+        typedef _SBase<_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+        
+        _SClos (const _Dom& __e, const slice& __s) : _Base (__e, __s) {}
+    };
+
+    template
+    struct _SClos<_ValArray,_Tp> : _SBase<_Array<_Tp> > {
+        typedef  _SBase<_Array<_Tp> > _Base;
+        typedef _Tp value_type;
+
+        _SClos (_Array<_Tp> __a, const slice& __s) : _Base (__a, __s) {}
+    };
+
+    //
+    // gslice_array closure.
+    //
+    template class _GBase {
+    public:
+        typedef typename _Dom::value_type value_type;
+        
+        _GBase (const _Dom& __e, const valarray& __i)
+                : _M_expr (__e), _M_index(__i) {}
+        value_type operator[] (size_t __i) const
+        { return _M_expr[_M_index[__i]]; }
+        size_t size () const { return _M_index.size(); }
+        
+    private:
+        const _Dom&	 _M_expr;
+        const valarray& _M_index;
+    };
+    
+    template class _GBase<_Array<_Tp> > {
+    public:
+        typedef _Tp value_type;
+        
+        _GBase (_Array<_Tp> __a, const valarray& __i)
+                : _M_array (__a), _M_index(__i) {}
+        value_type operator[] (size_t __i) const
+        { return _M_array._M_data[_M_index[__i]]; }
+        size_t size () const { return _M_index.size(); }
+        
+    private:
+        const _Array<_Tp>     _M_array;
+        const valarray& _M_index;
+    };
+
+    template struct _GClos<_Expr,_Dom> : _GBase<_Dom> {
+        typedef _GBase<_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+
+        _GClos (const _Dom& __e, const valarray& __i)
+                : _Base (__e, __i) {}
+    };
+
+    template
+    struct _GClos<_ValArray,_Tp> : _GBase<_Array<_Tp> > {
+        typedef _GBase<_Array<_Tp> > _Base;
+        typedef typename _Base::value_type value_type;
+
+        _GClos (_Array<_Tp> __a, const valarray& __i)
+                : _Base (__a, __i) {}
+    };
+
+    //
+    // indirect_array closure
+    //
+
+    template class _IBase {
+    public:
+        typedef typename _Dom::value_type value_type;
+
+        _IBase (const _Dom& __e, const valarray& __i)
+                : _M_expr (__e), _M_index (__i) {}
+        value_type operator[] (size_t __i) const
+        { return _M_expr[_M_index[__i]]; }
+        size_t size() const { return _M_index.size(); }
+        
+    private:
+        const _Dom& 	    _M_expr;
+        const valarray& _M_index;
+    };
+
+    template struct _IClos<_Expr,_Dom> : _IBase<_Dom> {
+        typedef _IBase<_Dom> _Base;
+        typedef typename _Base::value_type value_type;
+
+        _IClos (const _Dom& __e, const valarray& __i)
+                : _Base (__e, __i) {}
+    };
+
+    template
+    struct _IClos<_ValArray,_Tp>  : _IBase > {
+        typedef _IBase > _Base;
+        typedef _Tp value_type;
+
+        _IClos (const valarray<_Tp>& __a, const valarray& __i)
+                : _Base (__a, __i) {}
+    };
+
+    //
+    // class _Expr
+    //      
+    template class _Expr {
+    public:
+        typedef _Tp value_type;
+        
+        _Expr (const _Clos&);
+        
+        const _Clos& operator() () const;
+        
+        value_type operator[] (size_t) const;
+        valarray operator[] (slice) const;
+        valarray operator[] (const gslice&) const;
+        valarray operator[] (const valarray&) const;
+        valarray operator[] (const valarray&) const;
+    
+        _Expr<_UnClos<_Unary_plus,std::_Expr,_Clos>, value_type>
+        operator+ () const;
+
+        _Expr<_UnClos, value_type>
+        operator- () const;
+
+        _Expr<_UnClos<_Bitwise_not,std::_Expr,_Clos>, value_type>
+        operator~ () const;
+
+        _Expr<_UnClos, bool>
+        operator! () const;
+
+        size_t size () const;
+        value_type sum () const;
+        
+        valarray shift (int) const;
+        valarray cshift (int) const;
+
+      value_type min() const;
+      value_type max() const;
+
+      valarray apply(value_type (*) (const value_type&)) const;
+      valarray apply(value_type (*) (value_type)) const;
+        
+    private:
+        const _Clos _M_closure;
+    };
+    
+    template
+    inline
+    _Expr<_Clos,_Tp>::_Expr (const _Clos& __c) : _M_closure(__c) {}
+    
+    template
+    inline const _Clos&
+    _Expr<_Clos,_Tp>::operator() () const
+    { return _M_closure; }
+
+    template
+    inline _Tp
+    _Expr<_Clos,_Tp>::operator[] (size_t __i) const
+    { return _M_closure[__i]; }
+
+    template
+    inline valarray<_Tp>
+    _Expr<_Clos,_Tp>::operator[] (slice __s) const
+    { return _M_closure[__s]; }
+    
+    template
+    inline valarray<_Tp>
+    _Expr<_Clos,_Tp>::operator[] (const gslice& __gs) const
+    { return _M_closure[__gs]; }
+    
+    template
+    inline valarray<_Tp>
+    _Expr<_Clos,_Tp>::operator[] (const valarray& __m) const
+    { return _M_closure[__m]; }
+    
+    template
+    inline valarray<_Tp>
+    _Expr<_Clos,_Tp>::operator[] (const valarray& __i) const
+    { return _M_closure[__i]; }
+    
+    template
+    inline size_t
+    _Expr<_Clos,_Tp>::size () const  { return _M_closure.size (); }
+
+  template
+  inline valarray<_Tp>
+  _Expr<_Clos, _Tp>::shift(int __n) const
+  { return valarray<_Tp>(_M_closure).shift(__n); }
+
+  template
+  inline valarray<_Tp>
+  _Expr<_Clos, _Tp>::cshift(int __n) const
+  { return valarray<_Tp>(_M_closure).cshift(__n); }
+
+  template
+  inline valarray<_Tp>
+  _Expr<_Clos, _Tp>::apply(_Tp __f(const _Tp&)) const
+  { return valarray<_Tp>(_M_closure).apply(__f); }
+    
+  template
+  inline valarray<_Tp>
+  _Expr<_Clos, _Tp>::apply(_Tp __f(_Tp)) const
+  { return valarray<_Tp>(_M_closure).apply(__f); }
+
+    // XXX: replace this with a more robust summation algorithm.
+    template
+    inline _Tp
+    _Expr<_Clos,_Tp>::sum () const
+    {
+        size_t __n = _M_closure.size();
+        if (__n == 0) return _Tp();
+        else {
+            _Tp __s = _M_closure[--__n];
+            while (__n != 0) __s += _M_closure[--__n];
+            return __s;
+        }
+    }
+
+  template
+  inline _Tp
+  _Expr<_Clos, _Tp>::min() const
+  { return __valarray_min(_M_closure); }
+
+  template
+  inline _Tp
+  _Expr<_Clos, _Tp>::max() const
+  { return __valarray_max(_M_closure); }
+    
+    template
+    inline _Expr<_UnClos, bool>
+    _Expr<_Dom,_Tp>::operator! () const
+    {
+        typedef _UnClos _Closure;
+        return _Expr<_Closure,_Tp> (_Closure(this->_M_closure));
+    }
+
+#define _DEFINE_EXPR_UNARY_OPERATOR(_Op, _Name)                         \
+template                                      \
+inline _Expr<_UnClos<_Name,std::_Expr,_Dom>,_Tp>                        \
+_Expr<_Dom,_Tp>::operator _Op () const                                 \
+{                                                                       \
+    typedef _UnClos<_Name,std::_Expr,_Dom> _Closure;                    \
+    return _Expr<_Closure,_Tp> (_Closure (this->_M_closure));           \
+}
+
+    _DEFINE_EXPR_UNARY_OPERATOR(+, _Unary_plus)
+    _DEFINE_EXPR_UNARY_OPERATOR(-, negate)
+    _DEFINE_EXPR_UNARY_OPERATOR(~, _Bitwise_not)
+
+#undef _DEFINE_EXPR_UNARY_OPERATOR
+
+
+#define _DEFINE_EXPR_BINARY_OPERATOR(_Op, _Name)                        \
+template					\
+inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>,                   \
+             typename _Name::result_type>   \
+operator _Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v,      \
+              const _Expr<_Dom2,typename _Dom2::value_type>& __w)       \
+{                                                                       \
+    typedef typename _Dom1::value_type _Arg;                            \
+    typedef typename _Name<_Arg>::result_type _Value;                   \
+    typedef _BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2> _Closure;           \
+    return _Expr<_Closure,_Value> (_Closure (__v (), __w ()));          \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>, \
+             typename _Name::result_type>    \
+operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __v,        \
+              const typename _Dom::value_type& __t)                     \
+{                                                                       \
+    typedef typename _Dom::value_type _Arg;                             \
+    typedef typename _Name<_Arg>::result_type _Value;                   \
+    typedef _BinClos<_Name,_Expr,_Constant,_Dom,_Arg> _Closure;         \
+    return _Expr<_Closure,_Value> (_Closure (__v (), __t));             \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>, \
+             typename _Name::result_type>    \
+operator _Op (const typename _Dom::value_type& __t,                    \
+               const _Expr<_Dom,typename _Dom::value_type>& __v)        \
+{                                                                       \
+    typedef typename _Dom::value_type _Arg;                             \
+    typedef typename _Name<_Arg>::result_type _Value;                   \
+    typedef _BinClos<_Name,_Constant,_Expr,_Arg,_Dom> _Closure;         \
+    return _Expr<_Closure,_Value> (_Closure (__t, __v ()));             \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>, \
+             typename _Name::result_type>    \
+operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __e,        \
+               const valarray& __v)          \
+{                                                                       \
+    typedef typename _Dom::value_type _Arg;                             \
+    typedef typename _Name<_Arg>::result_type _Value;                   \
+    typedef _BinClos<_Name,_Expr,_ValArray,_Dom,_Arg> _Closure;         \
+    return  _Expr<_Closure,_Value> (_Closure (__e (), __v));            \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>, \
+             typename _Name::result_type>    \
+operator _Op (const valarray& __v,          \
+               const _Expr<_Dom,typename _Dom::value_type>& __e)        \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef typename _Name<_Tp>::result_type _Value;                    \
+    typedef _BinClos<_Name,_ValArray,_Expr,_Tp,_Dom> _Closure;          \
+    return _Expr<_Closure,_Value> (_Closure (__v, __e ()));             \
+}
+
+    _DEFINE_EXPR_BINARY_OPERATOR(+, plus)
+    _DEFINE_EXPR_BINARY_OPERATOR(-, minus)
+    _DEFINE_EXPR_BINARY_OPERATOR(*, multiplies)
+    _DEFINE_EXPR_BINARY_OPERATOR(/, divides)
+    _DEFINE_EXPR_BINARY_OPERATOR(%, modulus)
+    _DEFINE_EXPR_BINARY_OPERATOR(^, _Bitwise_xor)
+    _DEFINE_EXPR_BINARY_OPERATOR(&, _Bitwise_and)
+    _DEFINE_EXPR_BINARY_OPERATOR(|, _Bitwise_or)
+    _DEFINE_EXPR_BINARY_OPERATOR(<<, _Shift_left)
+    _DEFINE_EXPR_BINARY_OPERATOR(>>, _Shift_right)
+
+#undef _DEFINE_EXPR_BINARY_OPERATOR
+    
+#define _DEFINE_EXPR_RELATIONAL_OPERATOR(_Op, _Name)                    \
+template					\
+inline _Expr<_BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2>, bool>             \
+operator _Op (const _Expr<_Dom1,typename _Dom1::value_type>& __v,      \
+              const _Expr<_Dom2,typename _Dom2::value_type>& __w)       \
+{                                                                       \
+    typedef typename _Dom1::value_type _Arg;                            \
+    typedef _BinClos<_Name,_Expr,_Expr,_Dom1,_Dom2> _Closure;           \
+    return _Expr<_Closure,bool> (_Closure (__v (), __w ()));            \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_Expr,_Constant,_Dom,typename _Dom::value_type>, \
+             bool>                                                      \
+operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __v,        \
+              const typename _Dom::value_type& __t)                     \
+{                                                                       \
+    typedef typename _Dom::value_type _Arg;                             \
+    typedef _BinClos<_Name,_Expr,_Constant,_Dom,_Arg> _Closure;         \
+    return _Expr<_Closure,bool> (_Closure (__v (), __t));               \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_Constant,_Expr,typename _Dom::value_type,_Dom>, \
+             bool>                                                      \
+operator _Op (const typename _Dom::value_type& __t,                    \
+               const _Expr<_Dom,typename _Dom::value_type>& __v)        \
+{                                                                       \
+    typedef typename _Dom::value_type _Arg;                             \
+    typedef _BinClos<_Name,_Constant,_Expr,_Arg,_Dom> _Closure;         \
+    return _Expr<_Closure,bool> (_Closure (__t, __v ()));               \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_Expr,_ValArray,_Dom,typename _Dom::value_type>, \
+             bool>                                                      \
+operator _Op (const _Expr<_Dom,typename _Dom::value_type>& __e,        \
+               const valarray& __v)          \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _BinClos<_Name,_Expr,_ValArray,_Dom,_Tp> _Closure;          \
+    return  _Expr<_Closure,bool> (_Closure (__e (), __v));              \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinClos<_Name,_ValArray,_Expr,typename _Dom::value_type,_Dom>, \
+             bool>                                                      \
+operator _Op (const valarray& __v,          \
+               const _Expr<_Dom,typename _Dom::value_type>& __e)        \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _BinClos<_Name,_ValArray,_Expr,_Tp,_Dom> _Closure;          \
+    return _Expr<_Closure,bool> (_Closure (__v, __e ()));               \
+}
+
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(&&, logical_and)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(||, logical_or)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(==, equal_to)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(!=, not_equal_to)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(<, less)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(>, greater)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(<=, less_equal)
+    _DEFINE_EXPR_RELATIONAL_OPERATOR(>=, greater_equal)
+
+#undef _DEFINE_EXPR_RELATIONAL_OPERATOR
+
+
+
+#define _DEFINE_EXPR_UNARY_FUNCTION(_Name)                              \
+template                                                    \
+inline _Expr<_UnFunClos<_Expr,_Dom>,typename _Dom::value_type>          \
+_Name(const _Expr<_Dom,typename _Dom::value_type>& __e)                 \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _UnFunClos<_Expr,_Dom> _Closure;                            \
+    return _Expr<_Closure,_Tp>(_Closure(__e(), (_Tp(*)(_Tp))(&_Name))); \
+}                                                                       \
+                                                                        \
+template                                                  \
+inline _Expr<_UnFunClos<_ValArray,_Tp>,_Tp>                             \
+_Name(const valarray<_Tp>& __v)                                         \
+{                                                                       \
+    typedef _UnFunClos<_ValArray,_Tp> _Closure;                         \
+    return _Expr<_Closure,_Tp> (_Closure (__v, (_Tp(*)(_Tp))(&_Name))); \
+}
+
+
+    _DEFINE_EXPR_UNARY_FUNCTION(abs)
+    _DEFINE_EXPR_UNARY_FUNCTION(cos)
+    _DEFINE_EXPR_UNARY_FUNCTION(acos)
+    _DEFINE_EXPR_UNARY_FUNCTION(cosh)    
+    _DEFINE_EXPR_UNARY_FUNCTION(sin)
+    _DEFINE_EXPR_UNARY_FUNCTION(asin)
+    _DEFINE_EXPR_UNARY_FUNCTION(sinh)    
+    _DEFINE_EXPR_UNARY_FUNCTION(tan)
+    _DEFINE_EXPR_UNARY_FUNCTION(tanh)
+    _DEFINE_EXPR_UNARY_FUNCTION(atan)
+    _DEFINE_EXPR_UNARY_FUNCTION(exp)    
+    _DEFINE_EXPR_UNARY_FUNCTION(log)
+    _DEFINE_EXPR_UNARY_FUNCTION(log10)
+    _DEFINE_EXPR_UNARY_FUNCTION(sqrt)
+
+#undef _DEFINE_EXPR_UNARY_FUNCTION
+
+
+#define _DEFINE_EXPR_BINARY_FUNCTION(_Name)                             \
+template                                      \
+inline _Expr<_BinFunClos<_Expr,_Expr,_Dom1,_Dom2>,typename _Dom1::value_type>\
+_Name (const _Expr<_Dom1,typename _Dom1::value_type>& __e1,             \
+       const _Expr<_Dom2,typename _Dom2::value_type>& __e2)             \
+{                                                                       \
+    typedef typename _Dom1::value_type _Tp;                             \
+    typedef _BinFunClos<_Expr,_Expr,_Dom1,_Dom2> _Closure;              \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__e1 (), __e2 (), (_Tp(*)(_Tp, _Tp))(&_Name)));      \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinFunClos<_Expr,_ValArray,_Dom,typename _Dom::value_type>, \
+             typename _Dom::value_type>                                 \
+_Name (const _Expr<_Dom,typename _Dom::value_type>& __e,                \
+       const valarray& __v)                  \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _BinFunClos<_Expr,_ValArray,_Dom,_Tp> _Closure;             \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__e (), __v, (_Tp(*)(_Tp, _Tp))(&_Name)));           \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinFunClos<_ValArray,_Expr,typename _Dom::value_type,_Dom>, \
+             typename _Dom::value_type>                                 \
+_Name (const valarray& __v,                    \
+       const _Expr<_Dom,typename _Dom::value_type>& __e)                \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _BinFunClos<_ValArray,_Expr,_Tp,_Dom> _Closure;             \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__v, __e (), (_Tp(*)(_Tp, _Tp))(&_Name)));           \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinFunClos<_Expr,_Constant,_Dom,typename _Dom::value_type>, \
+             typename _Dom::value_type>                                 \
+_Name (const _Expr<_Dom, typename _Dom::value_type>& __e,               \
+       const typename _Dom::value_type& __t)                            \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _BinFunClos<_Expr,_Constant,_Dom,_Tp> _Closure;             \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__e (), __t, (_Tp(*)(_Tp, _Tp))(&_Name)));           \
+}                                                                       \
+                                                                        \
+template                                                    \
+inline _Expr<_BinFunClos<_Constant,_Expr,typename _Dom::value_type,_Dom>, \
+             typename _Dom::value_type>                                 \
+_Name (const typename _Dom::value_type& __t,                            \
+       const _Expr<_Dom,typename _Dom::value_type>& __e)                \
+{                                                                       \
+    typedef typename _Dom::value_type _Tp;                              \
+    typedef _BinFunClos<_Constant,_Expr,_Tp,_Dom> _Closure;             \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__t, __e (), (_Tp(*)(_Tp, _Tp))(&_Name)));           \
+}                                                                       \
+                                                                        \
+template                                                  \
+inline _Expr<_BinFunClos<_ValArray,_ValArray,_Tp,_Tp>, _Tp>             \
+_Name (const valarray<_Tp>& __v, const valarray<_Tp>& __w)              \
+{                                                                       \
+    typedef _BinFunClos<_ValArray,_ValArray,_Tp,_Tp> _Closure;          \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__v, __w, (_Tp(*)(_Tp,_Tp))(&_Name)));               \
+}                                                                       \
+                                                                        \
+template                                                  \
+inline _Expr<_BinFunClos<_ValArray,_Constant,_Tp,_Tp>,_Tp>              \
+_Name (const valarray<_Tp>& __v, const _Tp& __t)                        \
+{                                                                       \
+    typedef _BinFunClos<_ValArray,_Constant,_Tp,_Tp> _Closure;          \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__v, __t, (_Tp(*)(_Tp,_Tp))(&_Name)));               \
+}                                                                       \
+                                                                        \
+template                                                  \
+inline _Expr<_BinFunClos<_Constant,_ValArray,_Tp,_Tp>,_Tp>              \
+_Name (const _Tp& __t, const valarray<_Tp>& __v)                        \
+{                                                                       \
+    typedef _BinFunClos<_Constant,_ValArray,_Tp,_Tp> _Closure;          \
+    return _Expr<_Closure,_Tp>                                          \
+        (_Closure (__t, __v, (_Tp(*)(_Tp,_Tp))(&_Name)));               \
+}
+
+_DEFINE_EXPR_BINARY_FUNCTION(atan2)
+_DEFINE_EXPR_BINARY_FUNCTION(pow)
+
+#undef _DEFINE_EXPR_BINARY_FUNCTION
+
+} // std::
+
+
+#endif /* _CPP_VALARRAY_META_H */
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/c/std_cassert.h b/contrib/libstdc++/include/c/std_cassert.h
new file mode 100644
index 0000000..9b2bb72
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cassert.h
@@ -0,0 +1,38 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.2  Assertions
+//
+
+// No include guards on this header...
+
+#pragma GCC system_header
+
+#include_next 
diff --git a/contrib/libstdc++/include/c/std_cctype.h b/contrib/libstdc++/include/c/std_cctype.h
new file mode 100644
index 0000000..9d84a3d
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cctype.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// 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: 
+//
+
+#ifndef _CPP_CCTYPE
+#define _CPP_CCTYPE 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif 
diff --git a/contrib/libstdc++/include/c/std_cerrno.h b/contrib/libstdc++/include/c/std_cerrno.h
new file mode 100644
index 0000000..93ba868
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cerrno.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.3  Error numbers
+//
+
+#ifndef _CPP_CERRNO
+#define _CPP_CERRNO 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cfloat.h b/contrib/libstdc++/include/c/std_cfloat.h
new file mode 100644
index 0000000..9c95760
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cfloat.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+#ifndef _CPP_CFLOAT
+#define _CPP_CFLOAT 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_ciso646.h b/contrib/libstdc++/include/c/std_ciso646.h
new file mode 100644
index 0000000..0993a0a
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_ciso646.h
@@ -0,0 +1,37 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 2001 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.
+
+/** @file ciso646
+ *  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 iso646.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
diff --git a/contrib/libstdc++/include/c/std_climits.h b/contrib/libstdc++/include/c/std_climits.h
new file mode 100644
index 0000000..9194cb9
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_climits.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+#ifndef _CPP_CLIMITS
+#define _CPP_CLIMITS	1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_clocale.h b/contrib/libstdc++/include/c/std_clocale.h
new file mode 100644
index 0000000..b6b3c22
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_clocale.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+#ifndef _CPP_CLOCALE
+#define _CPP_CLOCALE 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cmath.h b/contrib/libstdc++/include/c/std_cmath.h
new file mode 100644
index 0000000..33ac50b
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cmath.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5  C library
+//
+
+#ifndef _CPP_CMATH
+#define _CPP_CMATH 1
+ 
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_csetjmp.h b/contrib/libstdc++/include/c/std_csetjmp.h
new file mode 100644
index 0000000..011907b
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_csetjmp.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSETJMP
+#define _CPP_CSETJMP 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_csignal.h b/contrib/libstdc++/include/c/std_csignal.h
new file mode 100644
index 0000000..09614e7
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_csignal.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSIGNAL
+#define _CPP_CSIGNAL 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cstdarg.h b/contrib/libstdc++/include/c/std_cstdarg.h
new file mode 100644
index 0000000..d2cb544
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cstdarg.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSTDARG
+#define _CPP_CSTDARG 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cstddef.h b/contrib/libstdc++/include/c/std_cstddef.h
new file mode 100644
index 0000000..da41736
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cstddef.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.1  Types
+//
+
+#ifndef _CPP_CSTDDEF
+#define _CPP_CSTDDEF 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cstdio.h b/contrib/libstdc++/include/c/std_cstdio.h
new file mode 100644
index 0000000..542b924
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cstdio.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8.2  C Library files
+//
+
+#ifndef _CPP_CSTDIO
+#define _CPP_CSTDIO 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cstdlib.h b/contrib/libstdc++/include/c/std_cstdlib.h
new file mode 100644
index 0000000..57ade0d
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cstdlib.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSTDLIB
+#define _CPP_CSTDLIB 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif 
diff --git a/contrib/libstdc++/include/c/std_cstring.h b/contrib/libstdc++/include/c/std_cstring.h
new file mode 100644
index 0000000..656ff52
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cstring.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSTRING
+#define _CPP_CSTRING 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_ctime.h b/contrib/libstdc++/include/c/std_ctime.h
new file mode 100644
index 0000000..ba9103e
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_ctime.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5  Date and time
+//
+
+#ifndef _CPP_CTIME
+#define _CPP_CTIME 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif
diff --git a/contrib/libstdc++/include/c/std_cwchar.h b/contrib/libstdc++/include/c/std_cwchar.h
new file mode 100644
index 0000000..f9dfbadb
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cwchar.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21.4
+//
+
+#ifndef _CPP_CWCHAR
+#define _CPP_CWCHAR 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif 
diff --git a/contrib/libstdc++/include/c/std_cwctype.h b/contrib/libstdc++/include/c/std_cwctype.h
new file mode 100644
index 0000000..ef6b44b
--- /dev/null
+++ b/contrib/libstdc++/include/c/std_cwctype.h
@@ -0,0 +1,41 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 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
+// 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: 
+//
+
+#ifndef _CPP_CWCTYPE
+#define _CPP_CWCTYPE 1
+
+#pragma GCC system_header
+
+#include_next 
+
+#endif 
diff --git a/contrib/libstdc++/include/c_shadow/assert.h b/contrib/libstdc++/include/c_shadow/assert.h
new file mode 100644
index 0000000..57e28db
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/assert.h
@@ -0,0 +1,55 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+
+#ifndef  _INCLUDED_CPP_ASSERT_H_
+# define _INCLUDED_CPP_ASSERT_H_ 1
+
+#ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+# undef _IN_C_LEGACY_
+# define _ASSERT_NEED_C_LEGACY_
+#endif
+
+#include 
+ 
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+#ifdef _ASSERT_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+# define _IN_C_LEGACY_
+# undef _ASSERT_NEED_C_LEGACY_
+#endif /* _ASSERT_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_ASSERT_H_ */
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cassert.h b/contrib/libstdc++/include/c_shadow/bits/std_cassert.h
new file mode 100644
index 0000000..ada1ea1
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cassert.h
@@ -0,0 +1,61 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.2  Assertions
+//
+
+// NB: This is assumed to be a conforming implementation.
+
+// ISO/IEC 9899:1999 (E), section 7.2
+// assert.h
+// ..defines the assert macro...
+
+// ISO 14882
+// 17.4.1.2 Headers
+// ... declarations and definitions (except for macros) are within
+// namespace scope of the namepace std...
+
+
+//#ifndef _CPP_CASSERT
+//#define _CPP_CASSERT 1
+
+//namespace _C_legacy {
+  extern "C" {
+//#   define _IN_C_LEGACY_
+#   pragma GCC system_header
+#   include_next 
+  }
+//} // namespace _C_legacy
+
+//#undef _IN_C_LEGACY_
+
+//#endif
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cctype.h b/contrib/libstdc++/include/c_shadow/bits/std_cctype.h
new file mode 100644
index 0000000..d164d9c
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cctype.h
@@ -0,0 +1,145 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// ISO C++ 14882: 22
+//
+
+#ifndef _CPP_CCTYPE
+#define _CPP_CCTYPE 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+
+  inline int 
+  _CPP_isalnum_capture(int c) { return isalnum(c); }
+
+  inline int 
+  _CPP_isalpha_capture(int c) { return isalpha(c); }
+
+  inline int 
+  _CPP_iscntrl_capture(int c) { return iscntrl(c); }
+
+  inline int 
+  _CPP_isdigit_capture(int c) { return isdigit(c); }
+
+  inline int 
+  _CPP_isgraph_capture(int c) { return isgraph(c); }
+
+  inline int 
+  _CPP_islower_capture(int c) { return islower(c); }
+
+  inline int 
+  _CPP_isprint_capture(int c) { return isprint(c); }
+
+  inline int 
+  _CPP_ispunct_capture(int c) { return ispunct(c); }
+
+  inline int 
+  _CPP_isspace_capture(int c) { return isspace(c); }
+
+  inline int 
+  _CPP_isupper_capture(int c) { return isupper(c); }
+
+  inline int 
+  _CPP_isxdigit_capture(int c) { return isxdigit(c); }
+
+  inline int 
+  _CPP_tolower_capture(int c) { return tolower(c); }
+
+  inline int 
+  _CPP_toupper_capture(int c) { return toupper(c); }
+} // namespace _C_legacy
+
+# undef isalnum
+# undef isalpha
+# undef iscntrl
+# undef isdigit
+# undef isgraph
+# undef islower
+# undef isprint
+# undef ispunct
+# undef isspace
+# undef isupper
+# undef isxdigit
+
+# undef tolower
+# undef toupper
+
+namespace std {
+  inline int 
+  isalnum(int __c) { return _C_legacy::_CPP_isalnum_capture(__c); }
+
+  inline int 
+  isalpha(int __c) { return _C_legacy::_CPP_isalpha_capture(__c); }
+
+  inline int 
+  iscntrl(int __c) { return _C_legacy::_CPP_iscntrl_capture(__c); }
+
+  inline int 
+  isdigit(int __c) { return _C_legacy::_CPP_isdigit_capture(__c); }
+
+  inline int 
+  isgraph(int __c) { return _C_legacy::_CPP_isgraph_capture(__c); }
+
+  inline int 
+  islower(int __c) { return _C_legacy::_CPP_islower_capture(__c); }
+
+  inline int 
+  isprint(int __c) { return _C_legacy::_CPP_isprint_capture(__c); }
+
+  inline int 
+  ispunct(int __c) { return _C_legacy::_CPP_ispunct_capture(__c); }
+
+  inline int 
+  isspace(int __c) { return _C_legacy::_CPP_isspace_capture(__c); }
+
+  inline int 
+  isupper(int __c) { return _C_legacy::_CPP_isupper_capture(__c); }
+
+  inline int 
+  isxdigit(int __c) { return _C_legacy::_CPP_isxdigit_capture(__c); }
+
+  inline int 
+  tolower(int __c) { return _C_legacy::_CPP_tolower_capture(__c); }
+
+  inline int 
+  toupper(int __c) { return _C_legacy::_CPP_toupper_capture(__c); }
+} // namespace std
+  
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cerrno.h b/contrib/libstdc++/include/c_shadow/bits/std_cerrno.h
new file mode 100644
index 0000000..0f94a42
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cerrno.h
@@ -0,0 +1,48 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+// ISO C++ 14882: 19.3  Error numbers
+//
+
+#ifndef _CPP_CERRNO
+#define _CPP_CERRNO 1
+
+//namespace _C_legacy {
+  extern "C" {
+//#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+//} // namespace _C_legacy::
+
+//# undef _IN_C_LEGACY_
+
+#endif
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cfloat.h b/contrib/libstdc++/include/c_shadow/bits/std_cfloat.h
new file mode 100644
index 0000000..d8885e6
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cfloat.h
@@ -0,0 +1,54 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+#ifndef _CPP_CFLOAT
+#define _CPP_CFLOAT 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_climits.h b/contrib/libstdc++/include/c_shadow/bits/std_climits.h
new file mode 100644
index 0000000..13d3006
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_climits.h
@@ -0,0 +1,57 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+#ifndef _CPP_CLIMITS
+#define _CPP_CLIMITS 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_clocale.h b/contrib/libstdc++/include/c_shadow/bits/std_clocale.h
new file mode 100644
index 0000000..86d600e
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_clocale.h
@@ -0,0 +1,70 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+#ifndef _CPP_CLOCALE
+#define _CPP_CLOCALE     1
+
+# include  
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+
+  typedef lconv _CPP_lconv_capture;
+} // namespace _C_legacy
+
+#  undef lconv
+#  undef setlocale
+#  undef localeconv
+
+namespace std {
+  // Adopt C names into std::
+  struct lconv : _C_legacy::_CPP_lconv_capture  { };
+
+  using _C_legacy::setlocale;  
+
+  inline lconv* 
+  localeconv() { return reinterpret_cast(_C_legacy::localeconv()); }
+} // namespace std
+
+# undef _IN_C_LEGACY_
+
+#endif 
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cmath.h b/contrib/libstdc++/include/c_shadow/bits/std_cmath.h
new file mode 100644
index 0000000..7201067
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cmath.h
@@ -0,0 +1,749 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5  C library
+//
+
+#ifndef _CPP_CMATH
+#define _CPP_CMATH 1
+
+# include 
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+
+#if _GLIBCPP_HAVE_ACOSF
+  inline float 
+  _CPP_acos_capture(float __x) { return acosf(__x); }
+#else
+  inline float 
+  _CPP_acos_capture(float __x) { return acos(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ASINF
+  inline float 
+  _CPP_asin_capture(float __x) { return asinf(__x); }
+#else
+  inline float 
+  _CPP_asin_capture(float __x) { return asin(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATANF
+  inline float 
+  _CPP_atan_capture(float __x) { return atanf(__x); }
+#else
+  inline float 
+  _CPP_atan_capture(float __x) { return atan(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATAN2F
+  inline float 
+  _CPP_atan2_capture(float __y, float __x) { return atan2f(__y, __x); }
+#else
+  inline float 
+  _CPP_atan2_capture(float __y, float __x) 
+  { return atan2(static_cast(__y), static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_CEILF
+  inline float 
+  _CPP_ceil_capture(float __x) { return ceilf(__x); }
+#else
+  inline float 
+  _CPP_ceil_capture(float __x) { return ceil(static_cast(__x)); }
+#endif
+
+  inline float 
+  _CPP_cos_capture(float __x) { return __builtin_cosf(__x); }
+
+#if _GLIBCPP_HAVE_COSHF
+  inline float 
+  _CPP_cosh_capture(float __x) { return coshf(__x); }
+#else
+  inline float 
+  _CPP_cosh_capture(float __x) { return cosh(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_EXPF
+  inline float 
+  _CPP_exp_capture(float __x) { return expf(__x); }
+#else
+  inline float 
+  _CPP_exp_capture(float __x) { return exp(static_cast(__x)); }
+#endif
+
+  inline float 
+  _CPP_fabs_capture(float __x) { return __builtin_fabsf(__x); }
+
+#if _GLIBCPP_HAVE_FLOORF
+  inline float 
+  _CPP_floor_capture(float __x) { return floorf(__x); }
+#else
+  inline float 
+  _CPP_floor_capture(float __x) { return floor(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_FMODFF
+  inline float 
+  _CPP_fmod_capture(float __x, float __y) { return fmodf(__x, __y); }
+#else
+  inline float 
+  _CPP_fmod_capture(float __x, float __y) 
+  { return fmod(static_cast(__x), static_cast(__y)); }
+#endif
+
+#if _GLIBCPP_HAVE_FREXPF
+  inline float 
+  _CPP_frexp_capture(float __x, int* __exp) { return frexpf(__x, __exp); }
+#else
+  inline float 
+  _CPP_frexp_capture(float __x, int* __exp) { return frexp(__x, __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LDEXPF
+  inline float 
+  _CPP_ldexp_capture(float __x, int __exp) { return ldexpf(__x, __exp); }
+#else
+  inline float 
+  _CPP_ldexp_capture(float __x, int __exp) 
+  { return ldexp(static_cast(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LOGF
+  inline float 
+  _CPP_log_capture(float __x) { return logf(__x); }
+#else
+  inline float 
+  _CPP_log_capture(float __x) { return log(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_LOG10F
+  inline float 
+  _CPP_log10_capture(float __x) { return log10f(__x); }
+#else
+  inline float 
+  _CPP_log10_capture(float __x) { return log10(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_MODFF
+  inline float 
+  _CPP_modf_capture(float __x, float* __iptr) { return modff(__x, __iptr); }
+#else
+  inline float 
+  _CPP_modf_capture(float __x, float* __iptr)
+  {
+    double __tmp;
+    double __res = _C_legacy::modf(static_cast(__x), &__tmp);
+    *__iptr = static_cast (__tmp);
+    return __res;
+  }
+#endif
+  
+#if _GLIBCPP_HAVE_POWF
+  inline float 
+  _CPP_pow_capture(float __x, float __y) { return powf(__x, __y); }
+#else
+  inline float 
+  _CPP_pow_capture(float __x, float __y)
+  { return pow(static_cast(__x), static_cast(__y)); }
+#endif
+
+  float pow(float, int);
+
+  inline float 
+  _CPP_sin_capture(float __x) { return __builtin_sinf(__x); }
+
+#if _GLIBCPP_HAVE_SINHF
+  inline float 
+  _CPP_sinh_capture(float __x) { return sinhf(__x); }
+#else
+  inline float 
+  _CPP_sinh_capture(float __x) { return sinh(static_cast(__x)); }
+#endif
+
+  inline float 
+  _CPP_sqrt_capture(float __x) { return __builtin_sqrtf(__x); }
+
+#if _GLIBCPP_HAVE_TANF
+  inline float 
+  _CPP_tan_capture(float __x) { return tanf(__x); }
+#else
+  inline float 
+  _CPP_tan_capture(float __x) { return tan(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANHF
+  inline float 
+  _CPP_tanh_capture(float __x) { return tanhf(__x); }
+#else
+  inline float 
+  _CPP_tanh_capture(float __x) { return tanh(static_cast(__x)); }
+#endif
+
+
+  inline double 
+  _CPP_acos_capture(double __x) { return acos(__x); }
+
+  inline double 
+  _CPP_asin_capture(double __x) { return asin(__x); }
+
+  inline double 
+  _CPP_atan_capture(double __x) { return atan(__x); }
+
+  inline double 
+  _CPP_atan2_capture(double __y, double __x) { return atan2(__y, __x); }
+
+  inline double 
+  _CPP_ceil_capture(double __x) { return ceil(__x); }
+
+  inline double 
+  _CPP_cos_capture(double __x) { return __builtin_cos(__x); }
+
+  inline double 
+  _CPP_cosh_capture(double __x) { return cosh(__x); }
+
+  inline double 
+  _CPP_exp_capture(double __x) { return exp(__x); }
+
+  inline double 
+  _CPP_fabs_capture(double __x) { return __builtin_fabs(__x); }
+
+  inline double 
+  _CPP_floor_capture(double __x) { return floor(__x); }
+
+  inline double 
+  _CPP_fmod_capture(double __x, double __y) { return fmod(__x, __y); }
+
+  inline double 
+  _CPP_frexp_capture(double __x, int* __exp) { return frexp(__x, __exp); }
+
+  inline double 
+  _CPP_ldexp_capture(double __x, int __exp) { return ldexp(__x, __exp); }
+
+  inline double 
+  _CPP_log_capture(double __x) { return log(__x); }
+
+  inline double 
+  _CPP_log10_capture(double __x) { return log10(__x); }
+
+  inline double 
+  _CPP_modf_capture(double __x, double* __iptr) { return modf(__x, __iptr); }
+
+  inline double 
+  _CPP_pow_capture(double __x, double __y) { return pow(__x, __y); }
+
+  inline double 
+  _CPP_sin_capture(double __x) { return __builtin_sin(__x); }
+
+  inline double 
+  _CPP_sinh_capture(double __x) { return sinh(__x); }
+
+  inline double 
+  _CPP_sqrt_capture(double __x) { return __builtin_sqrt(__x); }
+
+  inline double 
+  _CPP_tan_capture(double __x) { return tan(__x); }
+
+  inline double 
+  _CPP_tanh_capture(double __x) { return tanh(__x); }
+
+#if _GLIBCPP_HAVE_ACOSL
+  inline long double 
+  _CPP_acos_capture(long double __x) { return acosl(__x); }
+#else
+  inline long double 
+  _CPP_acos_capture(long double __x) { return acos(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ASINL
+  inline long double 
+  _CPP_asin_capture(long double __x) { return asinl(__x); }
+#else
+  inline long double 
+  _CPP_asin_capture(long double __x) { return asin(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATANL
+  inline long double 
+  _CPP_atan_capture(long double __x) { return atanl(__x); }
+#else
+  inline long double 
+  _CPP_atan_capture(long double __x) { return atan(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATAN2L
+  inline long double 
+  _CPP_atan2_capture(long double __y, long double __x)
+  { return atan2l(__y, __x); }
+#else
+  inline long double 
+  _CPP_atan2_capture(long double __y, long double __x) 
+  { return atan2(static_cast(__y), static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_CEILL
+  inline long double 
+  _CPP_ceil_capture(long double __x) { return ceill(__x); }
+#else
+  inline long double 
+  _CPP_ceil_capture(long double __x) { return ceil(static_cast(__x)); }
+#endif
+
+  inline long double 
+  _CPP_cos_capture(long double __x) { return __builtin_cosl(__x); }
+
+#if _GLIBCPP_HAVE_COSHL
+  inline long double 
+  _CPP_cosh_capture(long double __x) { return coshl(__x); }
+#else
+  inline long double 
+  _CPP_cosh_capture(long double __x) { return cosh(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_EXPL
+  inline long double 
+  _CPP_exp_capture(long double __x) { return expl(__x); }
+#else
+  inline long double 
+  _CPP_exp_capture(long double __x) { return exp(static_cast(__x)); }
+#endif
+
+  inline long double 
+  _CPP_fabs_capture(long double __x) { return __builtin_fabsl(__x); }
+
+#if _GLIBCPP_HAVE_FLOORL
+  inline long double 
+  _CPP_floor_capture(long double __x) { return floorl(__x); }
+#else
+  inline long double 
+  _CPP_floor_capture(long double __x) 
+  { return floor(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_FMODL
+  inline long double 
+  _CPP_fmod_capture(long double __x, long double __y) 
+  { return fmodl(__x, __y); }
+#else
+  inline long double 
+  _CPP_fmod_capture(long double __x, long double __y)
+  { return fmod(static_cast(__x), static_cast(__y)); }
+#endif
+
+#if _GLIBCPP_HAVE_FREXPL
+  inline long double 
+  _CPP_frexp_capture(long double __x, int* __exp) 
+  { return frexpl(__x, __exp); }
+#else
+  inline long double 
+  _CPP_frexp_capture(long double __x, int* __exp)
+  { return frexp(static_cast(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LDEXPL
+  inline long double 
+  _CPP_ldexp_capture(long double __x, int __exp) { return ldexpl(__x, __exp); }
+#else
+  inline long double 
+  _CPP_ldexp_capture(long double __x, int __exp)
+  { return ldexp(static_cast(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LOGL
+  inline long double 
+  _CPP_log_capture(long double __x) { return logl(__x); }
+#else
+  inline long double 
+  _CPP_log_capture(long double __x) { return log(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_LOG10L
+  inline long double 
+  _CPP_log10_capture(long double __x) { return log10l(__x); }
+#else
+  inline long double 
+  _CPP_log10_capture(long double __x) 
+  { return log10(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_MODFL
+  inline long double 
+  _CPP_modf_capture(long double __x, long double* __iptr)
+  { return modfl(__x, __iptr); }
+#else
+  inline long double 
+  _CPP_modf_capture(long double __x, long double* __iptr)
+  {
+    double __tmp;
+    double __res = _C_legacy::modf(static_cast(__x), &__tmp);
+    *__iptr = static_cast (__tmp);
+    return __res;
+  }
+#endif
+
+#if _GLIBCPP_HAVE_POWL
+  inline long double 
+  _CPP_pow_capture(long double __x, long double __y) { return powl(__x, __y); }
+#else
+  inline long double 
+  _CPP_pow_capture(long double __x, long double __y)
+  { return pow(static_cast(__x), static_cast(__y)); }
+#endif
+
+  inline long double 
+  _CPP_sin_capture(long double __x) { return __builtin_sinl(__x); }
+
+#if _GLIBCPP_HAVE_SINHL
+  inline long double 
+  _CPP_sinh_capture(long double __x) { return sinhl(__x); }
+#else
+  inline long double 
+  _CPP_sinh_capture(long double __x) { return sinh(static_cast(__x)); }
+#endif
+
+  inline long double 
+  _CPP_sqrt_capture(long double __x) { return __builtin_sqrtl(__x); }
+
+#if _GLIBCPP_HAVE_TANL
+  inline long double 
+  _CPP_tan_capture(long double __x) { return tanl(__x); }
+#else
+  inline long double 
+  _CPP_tan_capture(long double __x) { return tan(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANHL
+  inline long double 
+  _CPP_tanh_capture(long double __x) { return tanhl(__x); }
+#else
+  inline long double 
+  _CPP_tanh_capture(long double __x) { return tanh(static_cast(__x)); }
+#endif
+} // namespace _C_legacy
+
+# undef abs
+# 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
+
+namespace std {
+  inline float 
+  abs(float __x) { return _C_legacy::_CPP_fabs_capture(__x); }
+
+  inline float 
+  acos(float __x) { return _C_legacy::_CPP_acos_capture(__x); }
+
+  inline float 
+  asin(float __x) { return _C_legacy::_CPP_asin_capture(__x); }
+
+  inline float 
+  atan(float __x) { return _C_legacy::_CPP_atan_capture(__x); }
+
+  inline float 
+  atan2(float __y, float __x) 
+  { return _C_legacy::_CPP_atan2_capture(__y, __x); }
+
+  inline float 
+  ceil(float __x) { return _C_legacy::_CPP_ceil_capture(__x); }
+
+  inline float 
+  cos(float __x) { return _C_legacy::_CPP_cos_capture(__x); }
+
+  inline float 
+  cosh(float __x) { return _C_legacy::_CPP_cosh_capture(__x); }
+
+  inline float 
+  exp(float __x) { return _C_legacy::_CPP_exp_capture(__x); }
+
+  inline float 
+  fabs(float __x) { return _C_legacy::_CPP_fabs_capture(__x); }
+
+  inline float 
+  floor(float __x) { return _C_legacy::_CPP_floor_capture(__x); }
+
+  inline float 
+  fmod(float __x, float __y) 
+  { return _C_legacy::_CPP_fmod_capture(__x, __y); }
+
+  inline float 
+  frexp(float __x, int* __exp) 
+  { return _C_legacy::_CPP_frexp_capture(__x, __exp); }
+
+  inline float 
+  ldexp(float __x, int __exp)
+  { return _C_legacy::_CPP_ldexp_capture(__x, __exp); }
+
+  inline float 
+  log(float __x) { return _C_legacy::_CPP_log_capture(__x); }
+
+  inline float 
+  log10(float __x) { return _C_legacy::_CPP_log10_capture(__x); }
+
+  inline float 
+  modf(float __x, float* __iptr) 
+  { return _C_legacy::_CPP_modf_capture(__x, __iptr); }
+
+  inline float 
+  pow(float __x, float __y) { return _C_legacy::_CPP_pow_capture(__x, __y); }
+
+  float 
+  pow(float, int);
+
+  inline float 
+  sin(float __x) { return _C_legacy::_CPP_sin_capture(__x); }
+
+  inline float 
+  sinh(float __x) { return _C_legacy::_CPP_sinh_capture(__x); }
+
+  inline float 
+  sqrt(float __x) { return _C_legacy::_CPP_sqrt_capture(__x); }
+
+  inline float 
+  tan(float __x) { return _C_legacy::_CPP_tan_capture(__x); }
+
+  inline float 
+  tanh(float __x) { return _C_legacy::_CPP_tanh_capture(__x); }
+
+  inline double 
+  abs(double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
+
+  inline double 
+  acos(double __x) { return _C_legacy::_CPP_acos_capture(__x); }
+
+  inline double 
+  asin(double __x) { return _C_legacy::_CPP_asin_capture(__x); }
+
+  inline double 
+  atan(double __x) { return _C_legacy::_CPP_atan_capture(__x); }
+
+  inline double 
+  atan2(double __y, double __x) 
+  { return _C_legacy::_CPP_atan2_capture(__y, __x); }
+
+  inline double 
+  ceil(double __x) { return _C_legacy::_CPP_ceil_capture(__x); }
+
+  inline double 
+  cos(double __x) { return _C_legacy::_CPP_cos_capture(__x); }
+
+  inline double 
+  cosh(double __x) { return _C_legacy::_CPP_cosh_capture(__x); }
+
+  inline double 
+  exp(double __x) { return _C_legacy::_CPP_exp_capture(__x); }
+
+  inline double 
+  fabs(double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
+
+  inline double 
+  floor(double __x) { return _C_legacy::_CPP_floor_capture(__x); }
+
+  inline double 
+  fmod(double __x, double __y) 
+  { return _C_legacy::_CPP_fmod_capture(__x, __y); }
+
+  inline double 
+  frexp(double __x, int* __exp) 
+  { return _C_legacy::_CPP_frexp_capture(__x, __exp); }
+
+  inline double 
+  ldexp(double __x, int __exp)
+  { return _C_legacy::_CPP_ldexp_capture(__x, __exp); }
+
+  inline double 
+  log(double __x) { return _C_legacy::_CPP_log_capture(__x); }
+
+  inline double 
+  log10(double __x) { return _C_legacy::_CPP_log10_capture(__x); }
+
+  inline double 
+  modf(double __x, double* __iptr) 
+  { return _C_legacy::_CPP_modf_capture(__x, __iptr); }
+
+  inline double 
+  pow(double __x, double __y) 
+  { return _C_legacy::_CPP_pow_capture(__x, __y); }
+
+  double 
+  pow(double, int);
+
+  inline double 
+  sin(double __x) { return _C_legacy::_CPP_sin_capture(__x); }
+
+  inline double 
+  sinh(double __x) { return _C_legacy::_CPP_sinh_capture(__x); }
+
+  inline double 
+  sqrt(double __x) { return _C_legacy::_CPP_sqrt_capture(__x); }
+
+  inline double 
+  tan(double __x) { return _C_legacy::_CPP_tan_capture(__x); }
+
+  inline double 
+  tanh(double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
+
+  inline long double 
+  abs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
+
+  inline long double 
+  acos(long double __x) { return _C_legacy::_CPP_acos_capture(__x); }
+
+  inline long double 
+  asin(long double __x) { return _C_legacy::_CPP_asin_capture(__x); }
+
+  inline long double 
+  atan(long double __x) { return _C_legacy::_CPP_atan_capture(__x); }
+
+  inline long double 
+  atan2(long double __y, long double __x) 
+  { return _C_legacy::_CPP_atan2_capture(__y, __x); }
+
+  inline long double 
+  ceil(long double __x) { return _C_legacy::_CPP_ceil_capture(__x); }
+
+  inline long double 
+  cos(long double __x) { return _C_legacy::_CPP_cos_capture(__x); }
+
+  inline long double 
+  cosh(long double __x) { return _C_legacy::_CPP_cosh_capture(__x); }
+
+  inline long double 
+  exp(long double __x) { return _C_legacy::_CPP_exp_capture(__x); }
+
+  inline long double 
+  fabs(long double __x) { return _C_legacy::_CPP_fabs_capture(__x); }
+
+  inline long double 
+  floor(long double __x) { return _C_legacy::_CPP_floor_capture(__x); }
+
+  inline long double 
+  fmod(long double __x, long double __y) 
+  { return _C_legacy::_CPP_fmod_capture(__x, __y); }
+
+  inline long double 
+  frexp(long double __x, int* __exp)
+  { return _C_legacy::_CPP_frexp_capture(__x, __exp); }
+
+  inline long double 
+  ldexp(long double __x, int __exp)
+  { return _C_legacy::_CPP_ldexp_capture(__x, __exp); }
+
+  inline long double 
+  log(long double __x) { return _C_legacy::_CPP_log_capture(__x); }
+
+  inline long double 
+  log10(long double __x) { return _C_legacy::_CPP_log10_capture(__x); }
+
+  inline long double 
+  modf(long double __x, long double* __iptr) 
+  { return _C_legacy::_CPP_modf_capture(__x, __iptr); }
+
+  inline long double 
+  pow(long double __x, long double __y)
+  { return _C_legacy::_CPP_pow_capture(__x, __y); }
+
+  long double 
+  pow(long double, int);
+
+  inline long double 
+  sin(long double __x) { return _C_legacy::_CPP_sin_capture(__x); }
+
+  inline long double 
+  sinh(long double __x) { return _C_legacy::_CPP_sinh_capture(__x); }
+
+  inline long double 
+  sqrt(long double __x) { return _C_legacy::_CPP_sqrt_capture(__x); }
+
+  inline long double 
+  tan(long double __x) { return _C_legacy::_CPP_tan_capture(__x); }
+
+  inline long double 
+  tanh(long double __x) { return _C_legacy::_CPP_tanh_capture(__x); }
+
+} // namespace std
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_csetjmp.h b/contrib/libstdc++/include/c_shadow/bits/std_csetjmp.h
new file mode 100644
index 0000000..c8f3700
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_csetjmp.h
@@ -0,0 +1,63 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSETJMP
+#define _CPP_CSETJMP 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+  inline int 
+  _CPP_setjmp_capture(jmp_buf __jb) { return setjmp(__jb); }
+} // namespace _C_legacy
+
+#  undef jmp_buf
+#  undef setjmp
+#  define setjmp(__jb) _C_legacy::_CPP_setjmp_capture(__jb)
+#  undef longjmp
+
+namespace std {
+  // Adopt C names into std::
+  using _C_legacy::jmp_buf;
+  using _C_legacy::longjmp;
+} // namespace std
+  
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_csignal.h b/contrib/libstdc++/include/c_shadow/bits/std_csignal.h
new file mode 100644
index 0000000..71f9126
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_csignal.h
@@ -0,0 +1,67 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSIGNAL
+#define _CPP_CSIGNAL 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+    // XXX
+#     undef __need_sig_atomic_t
+#     undef __need_sigset_t
+
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+#  undef sig_atomic_t
+#  undef raise
+#  undef signal
+
+namespace std {
+  // Adopt C names into std::
+  using _C_legacy::sig_atomic_t;
+  using _C_legacy::raise;
+  using _C_legacy::signal;
+} // namespace std
+  
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cstdarg.h b/contrib/libstdc++/include/c_shadow/bits/std_cstdarg.h
new file mode 100644
index 0000000..eb1b790
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cstdarg.h
@@ -0,0 +1,54 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSTDARG
+#define _CPP_CSTDARG 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+#  undef va_list
+
+namespace std {
+  using _C_legacy::va_list;
+} // namespace std
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cstddef.h b/contrib/libstdc++/include/c_shadow/bits/std_cstddef.h
new file mode 100644
index 0000000..5885664
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cstddef.h
@@ -0,0 +1,59 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.1  Types
+//
+
+#ifndef _CPP_CSTDDEF
+#define _CPP_CSTDDEF 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+// XXX
+#   define __need_size_t
+#   define __need_ptrdiff_t
+#   define __need_NULL
+#   include_next 
+  }
+} // namespace _C_legacy
+
+#  undef ptrdiff_t  
+#  undef size_t  
+
+namespace std {
+  using _C_legacy::ptrdiff_t;
+  using _C_legacy::size_t;
+} // namespace std
+  
+# undef _IN_C_LEGACY_
+
+#endif
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cstdio.h b/contrib/libstdc++/include/c_shadow/bits/std_cstdio.h
new file mode 100644
index 0000000..db27612
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cstdio.h
@@ -0,0 +1,283 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8.2  C Library files
+//
+
+#ifndef _CPP_CSTDIO
+#define _CPP_CSTDIO 1
+
+# include   
+# include   
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     undef __need_FILE
+#     pragma GCC system_header
+#     include_next 
+  }
+
+  typedef FILE _CPP_FILE_capture;
+  typedef fpos_t _CPP_fpos_t_capture;
+
+  inline FILE* 
+  _CPP_stderr_capture() { return stderr; }
+
+  inline FILE* 
+  _CPP_stdin_capture()  { return stdin; }
+
+  inline FILE* 
+  _CPP_stdout_capture() { return stdout; }
+
+  inline int 
+  _CPP_getc_capture(FILE* __f) { return getc(__f); }
+
+  inline int 
+  _CPP_getchar_capture() { return getchar(); }
+
+  inline int 
+  _CPP_putc_capture(int __c, FILE* __f) { return putc(__c, __f); }
+  
+  inline int 
+  _CPP_putchar_capture(int __c) { return putchar(__c); }
+ 
+  inline int 
+  _CPP_feof_capture(FILE* __f) { return feof(__f); }
+
+} // namespace _C_legacy
+
+# undef FILE 
+# undef fpos_t 
+
+# undef remove
+# undef rename
+# undef tmpfile
+# undef tmpnam
+# undef fclose
+# undef fflush
+# undef fopen
+# undef freopen
+# undef setbuf
+# undef setvbuf
+# undef fprintf
+# undef fscanf
+# undef printf
+# undef scanf
+# undef sprintf
+# undef sscanf
+# undef vfprintf
+# undef vprintf
+# undef vsprintf
+# undef fgetc
+# undef fgets
+# undef fputc
+# undef fputs
+# undef getc
+# undef getchar
+# undef gets
+# undef putc
+# undef putchar
+# undef puts
+# undef ungetc
+# undef fread
+# undef fwrite
+# undef fgetpos
+# undef fseek
+# undef fsetpos
+# undef ftell
+# undef rewind
+# undef clearerr
+# undef feof
+# undef ferror
+# undef perror
+  
+# undef stderr
+# define stderr std::_CPP_stderr()
+# undef stdin
+# define stdin  std::_CPP_stdin()
+# undef stdout
+# define stdout std::_CPP_stdout()
+
+namespace std {
+  struct FILE : _C_legacy::_CPP_FILE_capture { };
+  struct fpos_t { _C_legacy::_CPP_fpos_t_capture _M_dummy; };
+
+  using _C_legacy::remove;
+  using _C_legacy::rename;
+  using _C_legacy::tmpnam;
+  using _C_legacy::printf;
+  using _C_legacy::scanf;
+  using _C_legacy::sprintf;
+  using _C_legacy::sscanf;
+  using _C_legacy::gets;
+  using _C_legacy::perror;
+
+  inline FILE* 
+  _CPP_stderr()
+  { return reinterpret_cast(_C_legacy::_CPP_stderr_capture() ); }
+
+  inline FILE* 
+  _CPP_stdin()
+  { return reinterpret_cast(_C_legacy::_CPP_stdin_capture() ); }
+
+  inline FILE* 
+  _CPP_stdout()
+  { return reinterpret_cast(_C_legacy::_CPP_stdout_capture() ); }
+
+  inline FILE*
+  tmpfile() { return reinterpret_cast(_C_legacy::tmpfile()); }
+
+  inline int
+  fclose(FILE* __f) { return _C_legacy::fclose(__f); }
+
+  inline int
+  fflush(FILE* __f) { return _C_legacy::fflush(__f); }
+
+  inline FILE*
+  fopen(char const* __name, char const* __mode) 
+  { return reinterpret_cast(_C_legacy::fopen(__name,__mode)); }
+
+  inline FILE*
+  freopen(char const* __name, char const* __mode, FILE* __f) 
+  { return reinterpret_cast(_C_legacy::freopen(__name,__mode,__f)); }
+
+  inline void
+  setbuf(FILE* __f, char* __buf) 
+  { return _C_legacy::setbuf(__f, __buf); }
+
+  inline int
+  setvbuf(FILE* __f, char* __buf, int __mode, size_t __size) 
+  { return _C_legacy::setvbuf(__f, __buf, __mode, __size); }
+
+  inline int
+  fprintf(FILE* __f, char const* __fmt, ...)
+  { 
+    va_list __v; 
+    va_start(__v,__fmt); 
+    int __i = _C_legacy::vfprintf(__f, __fmt, __v); 
+    va_end(__v);
+    return __i; 
+  }
+
+  inline int
+  fscanf(FILE* __f, char const* __fmt, ...)
+  { 
+    va_list __v; 
+    va_start(__v,__fmt); 
+    int __i = _C_legacy::vfscanf(__f, __fmt, __v); 
+    va_end(__v);
+    return __i; 
+  }
+
+  inline int
+  vfprintf(FILE* __f, char const* __fmt, va_list __v)
+  { return _C_legacy::vfprintf(__f, __fmt, __v); }
+
+  inline int
+  vprintf(char const* __fmt, va_list __v)
+  { return _C_legacy::vprintf(__fmt, __v); }
+
+  inline int
+  vsprintf(char* __buf, char const* __fmt, va_list __v)
+  { return _C_legacy::vsprintf(__buf, __fmt, __v); }
+
+  inline int
+  fgetc(FILE* __f) { return _C_legacy::fgetc(__f); }
+
+  inline char*
+  fgets(char* __buf, int __n, FILE* __f) 
+  { return _C_legacy::fgets(__buf, __n, __f); }
+
+  inline int
+  fputc(int __c, FILE* __f) { return _C_legacy::fputc(__c, __f); }
+
+  inline int
+  fputs(char const* __s, FILE* __f) 
+  { return _C_legacy::fputs(__s, __f); }
+
+  inline int
+  getc(FILE* __f) { return _C_legacy::_CPP_getc_capture(__f); }
+
+  inline int
+  getchar() { return _C_legacy::_CPP_getchar_capture(); }
+
+  inline int
+  putc(int __c, FILE* __f) 
+  { return _C_legacy::_CPP_putc_capture(__c, __f); }
+
+  inline int
+  putchar(int __c) { return _C_legacy::_CPP_putchar_capture(__c); }
+
+  using _C_legacy::puts;
+
+  inline int
+  ungetc(int __c, FILE* __f) { return _C_legacy::ungetc(__c, __f); }
+
+  inline size_t
+  fread(void* __p, size_t __z, size_t __n, FILE* __f)
+  { return _C_legacy::fread(__p,__z,__n,__f); }
+
+  inline size_t
+  fwrite(void const* __p, size_t __z, size_t __n, FILE* __f)
+  { return _C_legacy::fwrite(__p,__z,__n,__f); }
+
+  inline int
+  fgetpos(FILE* __f, fpos_t* __pos)
+  { return _C_legacy::fgetpos(__f,&__pos->_M_dummy); }
+
+  inline int
+  fseek(FILE* __f, long __off, int __how)
+  { return _C_legacy::fseek(__f,__off,__how); }
+
+  inline int
+  fsetpos(FILE* __f, fpos_t const* __pos)
+  { return _C_legacy::fsetpos(__f,&__pos->_M_dummy); }
+
+  inline long
+  ftell(FILE* __f) { return _C_legacy::ftell(__f); }
+
+  inline void
+  rewind(FILE* __f) { return _C_legacy::rewind(__f); }
+
+  inline void
+  clearerr(FILE* __f) { return _C_legacy::clearerr(__f); }
+
+  inline int
+  feof(FILE* __f) { return _C_legacy::_CPP_feof_capture(__f); }
+
+  inline int
+  ferror(FILE* __f) { return _C_legacy::ferror(__f); }
+} // namespace std
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cstdlib.h b/contrib/libstdc++/include/c_shadow/bits/std_cstdlib.h
new file mode 100644
index 0000000..d219efd
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cstdlib.h
@@ -0,0 +1,197 @@
+// -*- C++ -*- header wrapper
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+// Function decls in this header are overloaded on the 
+// extern "C"-ness of arguments.  This is a rich ground
+// for compiler bugs.
+
+#ifndef _CPP_CSTDLIB
+#define _CPP_CSTDLIB 1
+
+# include 
+# include   
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+      typedef int (*_C_cmp_fun_ptr)(const void*, const void*);  // C fn ptr
+    }
+
+  typedef div_t   _CPP_div_t_capture;
+  typedef ldiv_t  _CPP_ldiv_t_capture;
+
+# if _GLIBCPP_HAVE_LLDIV_T
+  typedef lldiv_t  _CPP_lldiv_t_capture;
+# endif
+} // namespace _C_legacy
+
+#  undef wchar_t
+#  undef div_t
+#  undef ldiv_t
+
+#  undef atof
+#  undef atoi
+#  undef atol
+#  undef strtod
+#  undef strtol
+#  undef strtoul
+#ifdef _GLIBCPP_HAVE_STRTOLD
+#  undef strtold
+#endif
+#  undef rand
+#  undef srand
+#  undef calloc
+#  undef free
+#  undef malloc
+#  undef realloc
+#  undef abort
+#  undef atexit
+#  undef exit
+#  undef getenv
+#  undef system
+#  undef bsearch
+#  undef qsort
+#  undef abs
+#  undef div
+#  undef labs
+#  undef ldiv
+#ifdef _GLIBCPP_USE_C99
+#  undef llabs
+#  undef lldiv
+#endif
+#  undef mblen
+#  undef mbtowc
+#  undef wctomb
+#  undef mbstowcs
+#  undef wcstombs
+
+namespace std {
+  struct div_t : _C_legacy::_CPP_div_t_capture { };
+  struct ldiv_t : _C_legacy::_CPP_ldiv_t_capture { };
+
+#ifdef _GLIBCPP_USE_C99
+# ifdef _GLIBCPP_HAVE_LLDIV_T
+  struct lldiv_t : _C_legacy::_CPP_lldiv_t_capture { };
+# else
+  struct lldiv_t
+  {
+    long long quot;
+    long long rem;
+  };
+# endif
+#endif
+
+  using _C_legacy::atof;
+  using _C_legacy::atoi;
+  using _C_legacy::atol;
+  using _C_legacy::strtod;
+  using _C_legacy::strtol;
+  using _C_legacy::strtoul;
+  using _C_legacy::rand;
+  using _C_legacy::srand;
+  using _C_legacy::calloc;
+  using _C_legacy::free;
+  using _C_legacy::malloc;
+  using _C_legacy::realloc;
+
+  //  using _C_legacy::abort;
+  using _C_legacy::atexit;
+  //  using _C_legacy::exit;
+  using _C_legacy::bsearch;
+  using _C_legacy::qsort; 
+
+  using _C_legacy::getenv;
+  using _C_legacy::system;
+  using _C_legacy::mbtowc;
+  using _C_legacy::wctomb;
+  using _C_legacy::mbstowcs;
+  using _C_legacy::wcstombs;
+
+  using _C_legacy::strtof;
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  using _C_legacy::strtoll;
+  using _C_legacy::strtoull;
+#endif
+
+#ifdef _GLIBCPP_HAVE_STRTOLD
+  using _C_legacy::strtold;
+#endif
+
+  using _C_legacy::mblen;
+
+  inline int 
+  abs(int __x) { return __x >= 0 ? __x : -__x; }
+
+  inline div_t 
+  div(int __n, int __d)
+  { div_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  inline long 
+  labs(long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline long 
+  abs(long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline ldiv_t 
+  ldiv(long __n, long __d)
+  { ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  inline ldiv_t 
+  div(long __n, long __d)
+  { ldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+#ifdef _GLIBCPP_USE_C99
+  inline long long 
+  llabs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline long long 
+  abs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline lldiv_t 
+  lldiv(long long __n, long long __d)
+  { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  inline lldiv_t 
+  div(long long __n, long long __d)
+  { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+#endif
+} // namespace std
+  
+# undef _IN_C_LEGACY_
+
+#endif
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cstring.h b/contrib/libstdc++/include/c_shadow/bits/std_cstring.h
new file mode 100644
index 0000000..38b9e6b
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cstring.h
@@ -0,0 +1,279 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+#ifndef _CPP_CSTRING
+#define _CPP_CSTRING 1
+
+# if defined __GLIBC__ && __GLIBC__ >= 2
+// We must not see the optimized string functions GNU libc defines.
+#  define __NO_STRING_INLINES
+# endif
+
+# include   
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+
+  // We do inline captures of most of these in case they
+  // have been optimized with macros.  
+  inline void* 
+  _CPP_memcpy_capture(void* __s1, void const* __s2, size_t __n)
+  { return memcpy(__s1, __s2, __n); }
+
+  inline void* 
+  _CPP_memmove_capture(void* __s1, void const* __s2, size_t __n)
+  { return memmove(__s1, __s2, __n); }
+
+  inline void* 
+  _CPP_strcpy_capture(char* __s1, char const* __s2)
+  { return strcpy(__s1, __s2); }
+
+  inline char* 
+  _CPP_strncpy_capture(char* __s1, char const* __s2, size_t __n)
+  { return strncpy(__s1, __s2, __n); }
+
+  inline char* 
+  _CPP_strcat_capture(char* __s1, char const* __s2)
+  { return strcat(__s1, __s2); }
+
+  inline char* 
+  _CPP_strncat_capture(char* __s1, char const* __s2, size_t __n)
+  { return strncat(__s1, __s2, __n); }
+
+  inline int 
+  _CPP_memcmp_capture(void const* __s1, void const* __s2, size_t __n)
+  { return memcmp(__s1, __s2, __n); }
+
+  inline int 
+  _CPP_strcmp_capture(char const* __s1, char const* __s2)
+  { return strcmp(__s1, __s2); }
+
+  inline int 
+  _CPP_strcoll_capture(char const* __s1, char const* __s2)
+  { return strcoll(__s1, __s2); }
+
+  inline int 
+  _CPP_strncmp_capture(char const* __s1, char const* __s2, size_t __n)
+  { return strncmp(__s1, __s2, __n); }
+
+  inline size_t 
+  _CPP_strxfrm_capture(char* __b, char const* __s, size_t __n)
+  { return strxfrm(__b, __s, __n); }
+
+  inline void* 
+  _CPP_memchr_capture(void const* __s1, int __c, size_t __n)
+  { return memchr(__s1, __c, __n); }
+
+  inline char* 
+  _CPP_strchr_capture(char const* __s1, int __c)
+  { return strchr(__s1, __c); }
+
+  inline size_t 
+  _CPP_strcspn_capture(char const* __s1, char const* __s2)
+  { return strcspn(__s1, __s2); }
+
+  inline char* 
+  _CPP_strpbrk_capture(char const* __s1, char const* __s2)
+  { return strpbrk(__s1, __s2); }
+
+  inline char* 
+  _CPP_strrchr_capture(char const* __s1, int __c)
+  { return strrchr(__s1, __c); }
+
+  inline size_t 
+  _CPP_strspn_capture(char const* __s1, char const* __s2)
+  { return strspn(__s1, __s2); }
+
+  inline char* 
+  _CPP_strstr_capture(char const* __s1, char const* __s2)
+  { return strstr(__s1, __s2); }
+
+  inline char* 
+  _CPP_strtok_capture(char* __s1, char const* __s2)
+  { return strtok(__s1, __s2); }
+
+  inline void* 
+  _CPP_memset_capture(void* __s, int __c, size_t __n)
+  { return memset(__s, __c, __n); }
+
+  // inline char* 
+  // _CPP_strerror_capture(int __num)
+  // { return strerror(__num); }
+
+  inline size_t 
+  _CPP_strlen_capture(char const* __s)
+  { return strlen(__s); }
+} // namespace _C_legacy
+
+# undef memcpy
+# undef memmove
+# undef strcpy
+# undef strncpy
+# undef strcat
+# undef strncat
+# undef memcmp
+# undef strcmp
+# undef strcoll
+# undef strncmp
+# undef strxfrm
+# undef memchr
+# undef strchr
+# undef strcspn
+# undef strpbrk
+# undef strrchr
+# undef strspn
+# undef strstr
+# undef strtok
+# undef memset
+# undef strerror
+# undef strlen
+
+namespace std {
+  // Redefine most of these inline.  Note that the 
+  // C++ definition differs from C in some cases.
+  inline void* 
+  memcpy(void* __s1, void const* __s2, size_t __n)
+  { return _C_legacy::_CPP_memcpy_capture(__s1, __s2, __n); }
+
+  inline void* 
+  memmove(void* __s1, void const* __s2, size_t __n)
+  { return _C_legacy::_CPP_memmove_capture(__s1, __s2, __n); }
+
+  inline void* 
+  strcpy(char* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strcpy_capture(__s1, __s2); }
+
+  inline char* 
+  strncpy(char* __s1, char const* __s2, size_t __n)
+  { return _C_legacy::_CPP_strncpy_capture(__s1, __s2, __n); }
+
+  inline char* 
+  strcat(char* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strcat_capture(__s1, __s2); }
+
+  inline char* 
+  strncat(char* __s1, char const* __s2, size_t __n)
+  { return _C_legacy::_CPP_strncat_capture(__s1, __s2, __n); }
+
+  inline int 
+  memcmp(void const* __s1, void const* __s2, size_t __n)
+  { return _C_legacy::_CPP_memcmp_capture(__s1, __s2, __n); }
+
+  inline int 
+  strcmp(char const* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strcmp_capture(__s1, __s2); }
+
+  inline int 
+  strcoll(char const* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strcoll_capture(__s1, __s2); }
+
+  inline int 
+  strncmp(char const* __s1, char const* __s2, size_t __n)
+  { return _C_legacy::_CPP_strncmp_capture(__s1, __s2, __n); }
+
+  inline size_t 
+  strxfrm(char* __b, char const* __s, size_t __n)
+  { return _C_legacy::_CPP_strxfrm_capture(__b, __s, __n); }
+
+  inline void 
+  const* memchr(void const* __s1, int __c, size_t __n)
+  { return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); }
+
+  inline void* 
+  memchr(void* __s1, int __c, size_t __n)
+  { return _C_legacy::_CPP_memchr_capture(__s1, __c, __n); }
+
+  inline char const* 
+  strchr(char const* __s1, int __c)
+  { return _C_legacy::_CPP_strchr_capture(__s1, __c); }
+
+  inline char*
+  strchr(char* __s1, int __c)
+  { return _C_legacy::_CPP_strchr_capture(__s1, __c); }
+
+  inline size_t 
+  strcspn(char const* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strcspn_capture(__s1, __s2); }
+
+  inline char const* 
+  strpbrk(char const* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); }
+
+  inline char* 
+  strpbrk(char* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strpbrk_capture(__s1, __s2); }
+
+  inline char const* 
+  strrchr(char const* __s1, int __c)
+  { return _C_legacy::_CPP_strrchr_capture(__s1, __c); }
+
+  inline char* 
+  strrchr(char* __s1, int __c)
+  { return _C_legacy::_CPP_strrchr_capture(__s1, __c); }
+
+  inline size_t 
+  strspn(char const* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strspn_capture(__s1, __s2); }
+
+  inline char const* 
+  strstr(char const* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strstr_capture(__s1, __s2); }
+
+  inline char* 
+  strstr(char* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strstr_capture(__s1, __s2); }
+
+  inline char* 
+  strtok(char* __s1, char const* __s2)
+  { return _C_legacy::_CPP_strtok_capture(__s1, __s2); }
+
+  inline void* 
+  memset(void* __s, int __c, size_t __n)
+  { return _C_legacy::_CPP_memset_capture(__s, __c, __n); }
+
+  using _C_legacy::strerror;
+
+  inline size_t 
+  strlen(char const* __s)
+  { return _C_legacy::_CPP_strlen_capture(__s); }
+
+} // namespace std
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_ctime.h b/contrib/libstdc++/include/c_shadow/bits/std_ctime.h
new file mode 100644
index 0000000..44709f0
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_ctime.h
@@ -0,0 +1,107 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5  Date and time
+//
+
+#ifndef _CPP_CTIME
+#define _CPP_CTIME 1
+
+# include   
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+
+      // XXX
+      // glibc 2.1.x time.h is on crack
+#     undef __need_time_t
+#     undef __need_clock_t
+#     undef __need_timespec
+
+#     include_next 
+  }
+
+  typedef clock_t	_CPP_clock_t_capture;
+  typedef time_t    	_CPP_time_t_capture;
+  typedef tm 		_CPP_tm_capture;
+
+} // namespace _C_legacy
+
+#  undef clock_t
+#  undef time_t
+#  undef tm
+#  undef clock
+#  undef difftime
+#  undef mktime
+#  undef time
+#  undef asctime
+#  undef ctime
+#  undef gmtime
+#  undef localtime
+#  undef strftime
+
+namespace std {
+
+  // Adopt C names into std::
+  typedef _C_legacy::_CPP_clock_t_capture  clock_t;
+  typedef _C_legacy::_CPP_time_t_capture   time_t;
+  struct tm : _C_legacy::_CPP_tm_capture  { };
+
+  using _C_legacy::clock;
+  using _C_legacy::difftime;
+  using _C_legacy::mktime;
+  using _C_legacy::time;
+  using _C_legacy::ctime;
+
+  inline char* 
+  asctime(const tm* __t) 
+  { return _C_legacy::asctime(static_cast<_C_legacy::_CPP_tm_capture const*>(__t)); }
+
+  inline tm* 
+  gmtime(time_t const* __tp) 
+  { return reinterpret_cast(_C_legacy::gmtime(__tp)); }
+
+  inline tm* 
+  localtime(const time_t* __tp) 
+  { return reinterpret_cast(_C_legacy::localtime(__tp)); } 
+    
+  inline size_t 
+  strftime(char* __buf, size_t __maxsz, char const* __fmt, tm const* __tp) 
+  { return _C_legacy::strftime(__buf, __maxsz, __fmt,
+	       	       static_cast<_C_legacy::_CPP_tm_capture const*>(__tp)); }
+
+} // namespace std
+  
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cwchar.h b/contrib/libstdc++/include/c_shadow/bits/std_cwchar.h
new file mode 100644
index 0000000..db659f4
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cwchar.h
@@ -0,0 +1,275 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21
+
+#ifndef _CPP_CWCHAR
+# define _CPP_CWCHAR 1
+# include  
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+
+#if 0
+  // XXX
+  inline int 
+  fwprintf(FILE* __stream, const wchar_t* __format, ...); 
+
+  inline int 
+  fwscanf(FILE* __stream, const wchar_t* __format, ...); 
+
+  inline int 
+  vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); 
+
+  inline int 
+  vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg);
+
+  inline wint_t 
+  _CPP_fgetwc_capture(FILE* __stream)
+  { return fgetwc(__stream); }
+
+  inline wchar_t*
+  _CPP_fgetws_capture(wchar_t* __s, int __n, FILE* __stream)
+  { return fgetws(__s, __n, __stream); }
+
+  inline wint_t 
+  _CPP_fputwc_capture(wchar_t __c, FILE* __stream)
+  { return fputwc(__c, __stream); }
+
+  inline int 
+  _CPP_fputws_capture(const wchar_t* __s, FILE* __stream)
+  { return fputws(__s, __stream); }
+
+  inline int 
+  _CPP_fwide_capture(FILE* __stream, int __mode) 
+  { return fwide(__stream, __mode); }
+
+  inline wint_t 
+  _CPP_fgetwc_capture(FILE* __stream)
+  { return fgetwc(__stream); }
+
+  inline wint_t 
+  _CPP_putwc_capture(wchar_t __c, FILE* __stream)
+  { return putwc(__c, __stream); }
+  
+  inline wint_t 
+  _CPP_ungetwc_capture(wint_t __c, FILE* __stream)
+  { return ungetwc(__c, __stream); }
+#endif
+} // namespace _C_legacy
+
+# undef wchar_t
+# undef wint_t
+# undef mbstate_t
+
+# undef fwprintf
+# undef fwscanf
+# undef swprintf
+# undef swscanf
+# undef vfwprintf
+# undef vfwscanf
+# undef vswprintf
+# undef vswscanf
+# undef vwprintf
+# undef vwscanf
+# undef wprintf
+# undef wscanf
+# undef fgetwc
+# undef fgetws
+# undef fputwc
+# undef fputws
+# undef fwide
+# undef getwc
+# undef getwchar
+# undef putwc
+# undef putwchar
+# undef ungetwc
+# undef wcstod
+# undef wcstof
+# undef wcstold
+# undef wcstol
+# undef wcstoll
+# undef wcstoul
+# undef wcstoull
+# undef wcscpy
+# undef wcsncpy
+# undef wcscat
+# undef wcsncat
+# undef wcsmp
+# undef wcscoll
+# undef wcsncmp
+# undef wcsxfrm
+# undef wcschr
+# undef wcscspn
+# undef wcslen
+# undef wcspbrk
+# undef wcsrchr
+# undef wcsspn
+# undef wcsstr
+# undef wcstok
+# undef wmemchr
+# undef wmemcmp
+# undef wmemcpy
+# undef wmemmove
+# undef wmemset
+# undef wcsftime
+# undef btowc
+# undef wctob
+# undef mbsinit
+# undef mbrlen
+# undef mbrtowc
+# undef wcrtomb
+# undef mbsrtowcs
+# undef wcsrtombs
+
+namespace std {
+
+  using _C_legacy::wint_t; 
+  using _C_legacy::mbstate_t;
+
+#if 0
+  using _C_legacy::swprintf;
+  using _C_legacy::swscanf;
+  using _C_legacy::vswprintf;
+  using _C_legacy::vswscanf;
+  using _C_legacy::vwprintf;
+  using _C_legacy::vwscanf;
+  using _C_legacy::wprintf;
+  using _C_legacy::wscanf;
+  using _C_legacy::getwchar;
+  using _C_legacy::putwchar;
+#endif
+
+  using _C_legacy::wcstod;
+  using _C_legacy::wcstof;
+  using _C_legacy::wcstold;
+  using _C_legacy::wcstol;
+  using _C_legacy::wcstoll;
+  using _C_legacy::wcstoul;
+  using _C_legacy::wcstoull;
+  using _C_legacy::wcscpy;
+  using _C_legacy::wcsncpy;
+  using _C_legacy::wcscat;
+  using _C_legacy::wcsncat;
+
+#if 0
+  using _C_legacy::wcsmp;
+#endif
+
+  using _C_legacy::wcscoll;
+  using _C_legacy::wcsncmp;
+  using _C_legacy::wcsxfrm;
+  using _C_legacy::wcschr;
+  using _C_legacy::wcscspn;
+  using _C_legacy::wcslen;
+  using _C_legacy::wcspbrk;
+  using _C_legacy::wcsrchr;
+  using _C_legacy::wcsspn;
+  using _C_legacy::wcsstr;
+  using _C_legacy::wcstok;
+  using _C_legacy::wmemchr;
+  using _C_legacy::wmemcmp;
+  using _C_legacy::wmemcpy;
+  using _C_legacy::wmemmove;
+  using _C_legacy::wmemset;
+
+#if 0
+  using _C_legacy::wcsftime;
+#endif
+
+  using _C_legacy::btowc;
+  using _C_legacy::wctob;
+  using _C_legacy::mbsinit;
+  using _C_legacy::mbrlen;
+  using _C_legacy::mbrtowc;
+  using _C_legacy::wcrtomb;
+  using _C_legacy::mbsrtowcs;
+  using _C_legacy::wcsrtombs;
+
+#if 0
+  // XXX
+  inline int 
+  fwprintf(FILE* __stream, const wchar_t* __format, ...); 
+
+  inline int 
+  fwscanf(FILE* __stream, const wchar_t* __format, ...); 
+
+  inline int 
+  vfwprintf(FILE* __stream, const wchar_t* __format, va_list __arg); 
+
+  inline int 
+  vfwscanf(FILE* __stream, const wchar_t* __format, va_list __arg);
+
+  inline wint_t 
+  fgetwc(FILE* __stream)
+  { return _C_legacy::_CPP_fgetwc_capture(__stream); }
+
+  inline wchar_t*
+  fgetws(wchar_t* __s, int __n, FILE* __stream) 
+  { return _C_legacy::_CPP_fgetws_capture(__s, __n, __stream); }
+
+  inline wint_t 
+  fputwc(wchar_t __c, FILE* __stream)
+  { return _C_legacy::_CPP_fputwc_capture(__c, __stream); }
+
+  inline int 
+  fputws(const wchar_t* __s, FILE* __stream)
+  { return _C_legacy::_CPP_fputws_capture(__s, __stream); }
+
+  inline int 
+  fwide(FILE* __stream, int __mode)
+  { return _C_legacy::_CPP_fwide_capture(__stream, __mode); }
+
+  inline wint_t 
+  getwc(FILE* __stream)
+  { return _C_legacy::_CPP_getwc_capture(__stream); }
+
+  inline wint_t 
+  putwc(wchar_t __c, FILE* __stream)
+  { return _C_legacy::_CPP_putwc_capture(__c, __stream); }
+  
+  inline wint_t 
+  ungetwc(wint_t __c, FILE* __stream)
+  { return _C_legacy::_CPP_ungetwc_capture(__c, __stream); }
+#endif
+}
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/std_cwctype.h b/contrib/libstdc++/include/c_shadow/bits/std_cwctype.h
new file mode 100644
index 0000000..1a6a642
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/std_cwctype.h
@@ -0,0 +1,129 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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: 
+//
+
+#ifndef _CPP_CWCTYPE
+#define _CPP_CWCTYPE 1
+
+# include   
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+
+# undef wctype_t
+# undef wctrans_t
+# undef iswalpha
+# undef iswupper
+# undef iswlower
+# undef iswdigit
+# undef iswxdigit
+# undef iswalnum
+# undef iswspace
+# undef iswpunct
+# undef iswprint
+# undef iswgraph
+# undef iswcntrl
+# undef iswctype
+# undef towctrans
+# undef towlower
+# undef towupper
+# undef wctrans
+# undef wctype
+
+namespace std {
+  using _C_legacy::wctype_t;
+  using _C_legacy::wctrans_t;
+
+  inline int 
+  iswalpha(wint_t __wc) { return _C_legacy::iswalpha(__wc); }
+
+  inline int 
+  iswupper(wint_t __wc) { return _C_legacy::iswupper(__wc); }
+
+  inline int 
+  iswlower(wint_t __wc) { return _C_legacy::iswlower(__wc); }
+
+  inline int 
+  iswdigit(wint_t __wc) { return _C_legacy::iswdigit(__wc); }
+
+  inline int 
+  iswxdigit(wint_t __wc) { return _C_legacy::iswxdigit(__wc); }
+
+  inline int 
+  iswalnum(wint_t __wc) { return _C_legacy::iswalnum(__wc); }
+
+  inline int 
+  iswspace(wint_t __wc) { return _C_legacy::iswspace(__wc); }
+
+  inline int 
+  iswpunct(wint_t __wc) { return _C_legacy::iswpunct(__wc); }
+
+  inline int 
+  iswprint(wint_t __wc) { return _C_legacy::iswprint(__wc); }
+
+  inline int 
+  iswgraph(wint_t __wc) { return _C_legacy::iswgraph(__wc); }
+
+  inline int 
+  iswcntrl(wint_t __wc) { return _C_legacy::iswcntrl(__wc); }
+
+  inline int 
+  towlower(wint_t __wc) { return _C_legacy::towlower(__wc); }
+
+  inline int 
+  towupper(wint_t __wc) { return _C_legacy::towupper(__wc); }
+
+  inline int 
+  iswctype(wint_t __wc, wctype_t __desc) 
+  { return _C_legacy::iswctype(__wc, __desc); }
+
+  inline wint_t 
+  towctrans(wint_t __wc, wctrans_t __desc)
+  { return _C_legacy::towctrans (__wc, __desc); }
+  
+  inline wctrans_t 
+  wctrans(const char *__property) { return _C_legacy::wctrans(__property); }
+
+  inline wctype_t 
+  wctype(char const* __property) { return _C_legacy::wctype(__property); }
+} // namespace std
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_fcntl.h b/contrib/libstdc++/include/c_shadow/bits/wrap_fcntl.h
new file mode 100644
index 0000000..0bed4bf
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_fcntl.h
@@ -0,0 +1,92 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5  C library extensions
+//
+
+#ifndef _CPP_FCNTL
+#define _CPP_FCNTL 1
+
+# include 
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+    // XXX
+# undef SEEK_SET
+# undef SEEK_CUR
+# undef SEEK_END
+
+#     include_next 
+  }
+} // namespace _C_legacy
+
+# undef SEEK_SET
+# undef SEEK_CUR
+# undef SEEK_END
+
+// NB: Don't bring elements from this non-standard header into namespace std.
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_features.h b/contrib/libstdc++/include/c_shadow/bits/wrap_features.h
new file mode 100644
index 0000000..52402bf
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_features.h
@@ -0,0 +1,51 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Extensions  
+//
+
+#ifndef _CPP_WRAP_FEATURES_H
+#define _CPP_WRAP_FEATURES_H 1
+
+#include 
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+// NB: Don't bring elements from this non-standard header into namespace std.
+
+# undef _IN_C_LEGACY_
+
+#endif
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_iconv.h b/contrib/libstdc++/include/c_shadow/bits/wrap_iconv.h
new file mode 100644
index 0000000..3e72e2d
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_iconv.h
@@ -0,0 +1,51 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Extensions  
+//
+
+#ifndef _CPP_WRAP_ICONV_H
+#define _CPP_WRAP_ICONV_H 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+// NB: Don't bring elements from this non-standard header into namespace std.
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_iolibio.h b/contrib/libstdc++/include/c_shadow/bits/wrap_iolibio.h
new file mode 100644
index 0000000..ddbabd7
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_iolibio.h
@@ -0,0 +1,50 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Extensions  
+//
+
+#ifndef _CPP_WRAP_IOLIBIO_H
+#define _CPP_WRAP_IOLIBIO_H 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+// NB: Don't bring elements from this non-standard header into namespace std.
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_langinfo.h b/contrib/libstdc++/include/c_shadow/bits/wrap_langinfo.h
new file mode 100644
index 0000000..138faa1
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_langinfo.h
@@ -0,0 +1,49 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Extensions
+//
+
+#ifndef _CPP_WRAP_LANGINFO_H
+#define _CPP_WRAP_LANGINFO_H 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_libio.h b/contrib/libstdc++/include/c_shadow/bits/wrap_libio.h
new file mode 100644
index 0000000..e5da6e3
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_libio.h
@@ -0,0 +1,50 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Extensions  
+//
+
+#ifndef _CPP_WRAP_LIBIO_H
+#define _CPP_WRAP_LIBIO_H 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+// NB: Don't bring elements from this non-standard header into namespace std.
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_libioP.h b/contrib/libstdc++/include/c_shadow/bits/wrap_libioP.h
new file mode 100644
index 0000000..32f8c2e
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_libioP.h
@@ -0,0 +1,50 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5 Extensions  
+//
+
+#ifndef _CPP_WRAP_LIBIOP_H
+#define _CPP_WRAP_LIBIOP_H 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+// NB: Don't bring elements from this non-standard header into namespace std.
+
+# undef _IN_C_LEGACY_
+
+#endif
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_pthread.h b/contrib/libstdc++/include/c_shadow/bits/wrap_pthread.h
new file mode 100644
index 0000000..d04eeba
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_pthread.h
@@ -0,0 +1,81 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5  C library extensions
+//
+
+#ifndef _CPP_WRAP_PTHREAD_H
+#define _CPP_WRAP_PTHREAD_H 1
+
+# include 
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+# undef _IN_C_LEGACY_
+
+#endif
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/bits/wrap_unistd.h b/contrib/libstdc++/include/c_shadow/bits/wrap_unistd.h
new file mode 100644
index 0000000..8e28b69
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/bits/wrap_unistd.h
@@ -0,0 +1,47 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5  C library extensions
+//
+
+#ifndef _CPP_WRAP_UNISTD_H
+#define _CPP_WRAP_UNISTD_H 1
+
+namespace _C_legacy {
+  extern "C" {
+#     define _IN_C_LEGACY_
+#     pragma GCC system_header
+#     include_next 
+  }
+} // namespace _C_legacy
+
+# undef _IN_C_LEGACY_
+
+#endif
diff --git a/contrib/libstdc++/include/c_shadow/ctype.h b/contrib/libstdc++/include/c_shadow/ctype.h
new file mode 100644
index 0000000..199089c
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/ctype.h
@@ -0,0 +1,67 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_CTYPE_H_
+# define _INCLUDED_CPP_CTYPE_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _CTYPE_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  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;
+
+# ifdef _CTYPE_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _CTYPE_NEED_C_LEGACY_
+# endif /* _CTYPE_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_CTYPE_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/errno.h b/contrib/libstdc++/include/c_shadow/errno.h
new file mode 100644
index 0000000..4e2fc33
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/errno.h
@@ -0,0 +1,56 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_ERRNO_H_
+# define _INCLUDED_CPP_ERRNO_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _ERRNO_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  //  using std::errno;
+
+# ifdef _ERRNO_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _ERRNO_NEED_C_LEGACY_
+# endif /* _ERRNO_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_ERRNO_H_ */
+
diff --git a/contrib/libstdc++/include/c_shadow/fcntl.h b/contrib/libstdc++/include/c_shadow/fcntl.h
new file mode 100644
index 0000000..f19a154
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/fcntl.h
@@ -0,0 +1,63 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_FCNTL_H_
+# define _INCLUDED_CPP_FCNTL_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _FCNTL_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using _C_legacy::flock;
+
+  using _C_legacy::creat;
+  using _C_legacy::open;
+  using _C_legacy::fcntl;
+
+# ifdef _FCNTL_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _FCNTL_NEED_C_LEGACY_
+# endif /* _FCNTL_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_FCNTL_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/features.h b/contrib/libstdc++/include/c_shadow/features.h
new file mode 100644
index 0000000..eed4b0e
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/features.h
@@ -0,0 +1,58 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_FEATURES_H_
+# define _INCLUDED_CPP_FEATURES_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _FEATURES_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+# ifdef _FEATURES_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _FEATURES_NEED_C_LEGACY_
+# endif /* _FEATURES_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_FEATURES_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/float.h b/contrib/libstdc++/include/c_shadow/float.h
new file mode 100644
index 0000000..f52c5f5
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/float.h
@@ -0,0 +1,54 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_FLOAT_H_
+# define _INCLUDED_CPP_FLOAT_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _FLOAT_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+# ifdef _FLOAT_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _FLOAT_NEED_C_LEGACY_
+# endif /* _FLOAT_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_FLOAT_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/iconv.h b/contrib/libstdc++/include/c_shadow/iconv.h
new file mode 100644
index 0000000..1ea5038
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/iconv.h
@@ -0,0 +1,66 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_ICONV_H_
+# define _INCLUDED_CPP_ICONV_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _ICONV_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+  // NB: Cannot use typedefs here to inject the names as the "C" headers
+  // often include typedefs that include the keyword 'struct'
+  using _C_legacy::iconv_t;
+
+  using _C_legacy::iconv_open;
+  using _C_legacy::iconv;
+  using _C_legacy::iconv_close;
+
+# ifdef _ICONV_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _ICONV_NEED_C_LEGACY_
+# endif /* _ICONV_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_ICONV_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/iolibio.h b/contrib/libstdc++/include/c_shadow/iolibio.h
new file mode 100644
index 0000000..845f640
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/iolibio.h
@@ -0,0 +1,58 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_IOLIBIO_H_
+# define _INCLUDED_CPP_IOLIBIO_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _IOLIBIO_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+# ifdef _IOLIBIO_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _IOLIBIO_NEED_C_LEGACY_
+# endif /* _IOLIBIO_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_IOLIBIO_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/langinfo.h b/contrib/libstdc++/include/c_shadow/langinfo.h
new file mode 100644
index 0000000..3333ef1
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/langinfo.h
@@ -0,0 +1,55 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_LANGINFO_H_
+# define _INCLUDED_CPP_LANGINFO_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _LANGINFO_NEED_C_LEGACY_
+# endif
+
+# include 
+
+# ifdef _LANGINFO_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _LANGINFO_NEED_C_LEGACY_
+# endif /* _LANGINFO_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_LANGINFO_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/libio.h b/contrib/libstdc++/include/c_shadow/libio.h
new file mode 100644
index 0000000..2cafc7d
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/libio.h
@@ -0,0 +1,81 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_LIBIO_H_
+# define _INCLUDED_CPP_LIBIO_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _LIBIO_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+  // NB: Cannot use typedefs here to inject the names as the "C" headers
+  // often include typedefs that include the keyword 'struct'
+  using _C_legacy::_IO_pos_t;
+  using _C_legacy::_IO_fpos_t;
+  using _C_legacy::_IO_fpos64_t;
+  using _C_legacy::_IO_size_t;
+  using _C_legacy::_IO_ssize_t;
+  using _C_legacy::_IO_off_t;
+  using _C_legacy::_IO_off64_t;
+  using _C_legacy::_IO_pid_t;
+  using _C_legacy::_IO_uid_t;
+  using _C_legacy::_IO_iconv_t;
+  using _C_legacy::_IO_va_list;
+  using _C_legacy::_IO_wint_t;
+  using _C_legacy::_IO_lock_t;
+
+  using _C_legacy::_IO_marker;
+  using _C_legacy::_IO_codecvt;
+  using _C_legacy::_IO_wide_data;
+  using _C_legacy::_IO_FILE;
+  using _C_legacy::_IO_cookie_io_functions_t;
+  using _C_legacy::_IO_cookie_file;
+
+# ifdef _LIBIO_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _LIBIO_NEED_C_LEGACY_
+# endif /* _LIBIO_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_LIBIO_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/libioP.h b/contrib/libstdc++/include/c_shadow/libioP.h
new file mode 100644
index 0000000..da3e7167
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/libioP.h
@@ -0,0 +1,64 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_LIBIOP_H_
+# define _INCLUDED_CPP_LIBIOP_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _LIBIOP_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using _C_legacy::_IO_jump_t;
+  using _C_legacy::_IO_FILE_plus;
+  using _C_legacy::_IO_cookie_file;
+
+  using _C_legacy::_IO_file_jumps;
+  using _C_legacy::_IO_wfile_jumps;
+
+# ifdef _LIBIOP_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _LIBIOP_NEED_C_LEGACY_
+# endif /* _LIBIOP_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_LIBIOP_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/limits.h b/contrib/libstdc++/include/c_shadow/limits.h
new file mode 100644
index 0000000..26aa771
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/limits.h
@@ -0,0 +1,54 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_LIMITS_H_
+# define _INCLUDED_CPP_LIMITS_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _LIMITS_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+
+# ifdef _LIMITS_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _LIMITS_NEED_C_LEGACY_
+# endif /* _LIMITS_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_LIMITS_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/locale.h b/contrib/libstdc++/include/c_shadow/locale.h
new file mode 100644
index 0000000..1d5f529
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/locale.h
@@ -0,0 +1,57 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_LOCALE_H_
+# define _INCLUDED_CPP_LOCALE_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _LOCALE_NEED_C_LEGACY_
+#endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::lconv;
+  using std::setlocale;
+  using std::localeconv;
+
+# ifdef _LOCALE_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _LOCALE_NEED_C_LEGACY_
+# endif /* _LOCALE_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_LOCALE_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/math.h b/contrib/libstdc++/include/c_shadow/math.h
new file mode 100644
index 0000000..f2ec04a
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/math.h
@@ -0,0 +1,131 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_MATH_H_
+# define _INCLUDED_CPP_MATH_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _MATH_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  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;
+
+  // From ISO/IEC 9899:1999
+  using std::absf;
+  using std::acosf;
+  using std::asinf;
+  using std::atanf;
+  using std::atan2f;
+  using std::cosf;
+  using std::sinf;
+  using std::tanf;
+  using std::coshf;
+  using std::sinhf;
+  using std::tanhf;
+  using std::expf;
+  using std::frexpf;
+  using std::ldexpf;
+  using std::logf;
+  using std::log10f;
+  using std::modff;
+  using std::powf;
+  using std::sqrtf;
+  using std::ceilf;
+  using std::fabsf;
+  using std::floorf;
+  using std::fmodf;
+
+  // From ISO/IEC 9899:1999
+  using std::absl;
+  using std::acosl;
+  using std::asinl;
+  using std::atanl;
+  using std::atan2l;
+  using std::cosl;
+  using std::sinl;
+  using std::tanl;
+  using std::coshl;
+  using std::sinhl;
+  using std::tanhl;
+  using std::expl;
+  using std::frexpl;
+  using std::ldexpl;
+  using std::logl;
+  using std::log10l;
+  using std::modfl;
+  using std::powl;
+  using std::sqrtl;
+  using std::ceill;
+  using std::fabsl;
+  using std::floorl;
+  using std::fmodl;
+
+# ifdef _MATH_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _MATH_NEED_C_LEGACY_
+# endif /* _MATH_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_MATH_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/pthread.h b/contrib/libstdc++/include/c_shadow/pthread.h
new file mode 100644
index 0000000..8692d3e
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/pthread.h
@@ -0,0 +1,86 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_PTHREAD_H_
+# define _INCLUDED_CPP_PTHREAD_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _PTHREAD_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using _C_legacy::__sched_param;
+
+  using _C_legacy::pthread_attr_t;
+  using _C_legacy::pthread_cond_t;
+  using _C_legacy::pthread_condattr_t;
+  using _C_legacy::pthread_key_t;
+  using _C_legacy::pthread_mutex_t;
+  using _C_legacy::pthread_mutexattr_t;
+  using _C_legacy::pthread_once_t;
+  using _C_legacy::pthread_rwlock_t;
+  using _C_legacy::pthread_rwlockattr_t;
+  using _C_legacy::pthread_t;
+
+  using _C_legacy::pthread_mutex_init;
+  using _C_legacy::pthread_mutex_destroy;
+  using _C_legacy::pthread_mutex_lock;
+  using _C_legacy::pthread_mutex_trylock;
+  using _C_legacy::pthread_mutex_unlock;
+  using _C_legacy::pthread_mutexattr_init;
+  using _C_legacy::pthread_mutexattr_destroy;
+  using _C_legacy::pthread_mutexattr_settype;
+  using _C_legacy::pthread_mutexattr_gettype;
+  using _C_legacy::pthread_key_create;
+  using _C_legacy::pthread_key_delete;
+  using _C_legacy::pthread_setspecific;
+  using _C_legacy::pthread_getspecific;
+  using _C_legacy::pthread_once;
+  using _C_legacy::pthread_atfork;
+
+# ifdef _PTHREAD_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _PTHREAD_NEED_C_LEGACY_
+# endif /* _PTHREAD_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_PTHREAD_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/setjmp.h b/contrib/libstdc++/include/c_shadow/setjmp.h
new file mode 100644
index 0000000..c4061e8
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/setjmp.h
@@ -0,0 +1,56 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_SETJMP_H_
+# define _INCLUDED_CPP_SETJMP_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _SETJMP_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::jmp_buf;
+  using std::longjmp;
+
+# ifdef _SETJMP_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _SETJMP_NEED_C_LEGACY_
+# endif /* _SETJMP_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_SETJMP_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/signal.h b/contrib/libstdc++/include/c_shadow/signal.h
new file mode 100644
index 0000000..819ddf2
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/signal.h
@@ -0,0 +1,58 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_SIGNAL_H_
+# define _INCLUDED_CPP_SIGNAL_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _SIGNAL_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::sig_atomic_t;
+
+  using std::raise;
+  using std::signal;
+
+# ifdef _SIGNAL_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _SIGNAL_NEED_C_LEGACY_
+#  endif /* _SIGNAL_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_SIGNAL_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/stdarg.h b/contrib/libstdc++/include/c_shadow/stdarg.h
new file mode 100644
index 0000000..cb32fec
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/stdarg.h
@@ -0,0 +1,55 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_STDARG_H_
+# define _INCLUDED_CPP_STDARG_H_ 1
+
+#ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _STDARG_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::va_list;
+
+# ifdef _STDARG_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _STDARG_NEED_C_LEGACY_
+# endif /* _STDARG_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_STDARG_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/stddef.h b/contrib/libstdc++/include/c_shadow/stddef.h
new file mode 100644
index 0000000..03d5896
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/stddef.h
@@ -0,0 +1,60 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_STDDEF_H_
+# define _INCLUDED_CPP_STDDEF_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _STDDEF_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::ptrdiff_t;
+  using std::size_t;
+
+# ifdef _STDDEF_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _STDDEF_NEED_C_LEGACY_
+# endif /* _STDDEF_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_STDDEF_H_ */
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/stdio.h b/contrib/libstdc++/include/c_shadow/stdio.h
new file mode 100644
index 0000000..c3a43b7
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/stdio.h
@@ -0,0 +1,97 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_STDIO_H_
+# define _INCLUDED_CPP_STDIO_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _STDIO_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::FILE;
+  using std::fpos_t; 
+
+  using std::remove;
+  using std::rename;
+  using std::tmpfile;
+  using std::tmpnam;
+  using std::fclose;
+  using std::fflush;
+  using std::fopen;
+  using std::freopen;
+  using std::setbuf;
+  using std::setvbuf;
+  using std::fprintf;
+  using std::fscanf;
+  using std::printf;
+  using std::scanf;
+  using std::sprintf;
+  using std::sscanf;
+  using std::vfprintf;
+  using std::vprintf;
+  using std::vsprintf;
+  using std::fgetc;
+  using std::fgets;
+  using std::fputc;
+  using std::fputs;
+  using std::getc;
+  using std::getchar;
+  using std::gets;
+  using std::putc;
+  using std::putchar;
+  using std::puts;
+  using std::ungetc;
+  using std::fread;
+  using std::fwrite;
+  using std::fgetpos;
+  using std::fseek;
+  using std::fsetpos;
+  using std::ftell;
+  using std::rewind;
+  using std::clearerr;
+  using std::feof;
+  using std::ferror;
+  using std::perror;
+
+# ifdef _STDIO_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _STDIO_NEED_C_LEGACY_
+# endif /* _STDIO_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_STDIO_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/stdlib.h b/contrib/libstdc++/include/c_shadow/stdlib.h
new file mode 100644
index 0000000..9740b57
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/stdlib.h
@@ -0,0 +1,101 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_STDLIB_H_
+# define _INCLUDED_CPP_STDLIB_H_ 1
+
+# include 
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _STDLIB_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::div_t;
+  using std::ldiv_t;
+#ifdef _GLIBCPP_USE_C99
+  using std::lldiv_t;
+#endif
+
+//  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;
+
+  using std::strtof;
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  using std::strtoll;
+  using std::strtoull;
+#endif
+
+#ifdef _GLIBCPP_HAVE_STRTOLD
+  using std::strtold;
+#endif
+
+# ifdef _STDLIB_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _STDLIB_NEED_C_LEGACY_
+# endif /* _STDLIB_NEED_C__LEGACY_ */
+#endif /* _INCLUDED_CPP_STDLIB_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/string.h b/contrib/libstdc++/include/c_shadow/string.h
new file mode 100644
index 0000000..6f9e6cc
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/string.h
@@ -0,0 +1,76 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_STRING_H_
+# define _INCLUDED_CPP_STRING_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _STRING_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  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;
+
+# ifdef _STRING_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _STRING_NEED_C_LEGACY_
+# endif /* _STRING_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_STRING_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/sys/cdefs.h b/contrib/libstdc++/include/c_shadow/sys/cdefs.h
new file mode 100644
index 0000000..da377fa
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/sys/cdefs.h
@@ -0,0 +1,49 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+
+#ifndef _CPP_SYS_CDEFS_H
+# define _CPP_SYS_CDEFS_H 1
+
+# pragma GCC system_header
+# include_next 
+
+// glibc-2 hackery.  Other systems likely require other hacks.
+#undef	__BEGIN_DECLS
+#define	__BEGIN_DECLS
+#undef	__END_DECLS
+#define	__END_DECLS
+
+#endif /* _CPP_SYS_CDEFS_H_ */
+
+
+
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/time.h b/contrib/libstdc++/include/c_shadow/time.h
new file mode 100644
index 0000000..31064aa
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/time.h
@@ -0,0 +1,67 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_TIME_H_
+# define _INCLUDED_CPP_TIME_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _TIME_NEED_C_LEGACY_
+# endif
+
+# include 
+ 
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  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;
+
+# ifdef _TIME_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _TIME_NEED_C_LEGACY_
+# endif /* _TIME_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_TIME_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/unistd.h b/contrib/libstdc++/include/c_shadow/unistd.h
new file mode 100644
index 0000000..e05efe7
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/unistd.h
@@ -0,0 +1,101 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_UNISTD_H_
+# define _INCLUDED_CPP_UNISTD_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _TIME_NEED_C_LEGACY_
+# endif
+
+# include 
+ 
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+#ifdef __gid_t_defined
+  using _C_legacy::gid_t;
+#endif
+#ifdef __uid_t_defined
+  using _C_legacy::uid_t;
+#endif
+#ifdef __off_t_defined
+  using _C_legacy::off_t;
+#endif
+#ifdef __off64_t_defined
+  using _C_legacy::off64_t;
+#endif
+#ifdef __useconds_t_defined
+  using _C_legacy::useconds_t;
+#endif
+#ifdef __pid_t_defined
+  using _C_legacy::pid_t;
+#endif
+  using _C_legacy::intptr_t;
+#ifdef __socklen_t_defined
+  using _C_legacy::socklen_t;
+#endif
+
+  using _C_legacy::access;
+  using _C_legacy::euidaccess;
+  using _C_legacy::lseek;
+  using _C_legacy::close;
+  using _C_legacy::read;
+  using _C_legacy::write;
+  using _C_legacy::pread;
+  using _C_legacy::pwrite;
+  using _C_legacy::pipe;
+  using _C_legacy::alarm;
+  using _C_legacy::sleep;
+  using _C_legacy::ualarm;
+  using _C_legacy::usleep;
+  using _C_legacy::pause;
+  using _C_legacy::chown;
+  using _C_legacy::fchown;
+  using _C_legacy::lchown;
+  using _C_legacy::chdir;
+  using _C_legacy::fchdir;
+  using _C_legacy::getcwd;
+  using _C_legacy::get_current_dir_name;
+  using _C_legacy::getwd;
+  using _C_legacy::dup;
+  using _C_legacy::dup2;
+
+# ifdef _TIME_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _TIME_NEED_C_LEGACY_
+# endif /* _TIME_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_UNISTD_H_ */
diff --git a/contrib/libstdc++/include/c_shadow/wchar.h b/contrib/libstdc++/include/c_shadow/wchar.h
new file mode 100644
index 0000000..efabb15
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/wchar.h
@@ -0,0 +1,131 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_WCHAR_H_
+# define _INCLUDED_CPP_WCHAR_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_  /* sub-included by a C header */
+#  define _WCHAR_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::wchar_t;
+  using std::wint_t;
+  using std::mbstate_t;
+
+#if 0
+  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::fgetwc;
+  using std::fgetws;
+  using std::fputwc;
+  using std::fputws;
+  using std::fwide;
+  using std::getwc;
+  using std::getwchar;
+  using std::putwc;
+  using std::putwchar;
+  using std::ungetwc;
+#endif
+
+  using std::wcstod;
+  using std::wcstof;
+  using std::wcstold;
+  using std::wcstol;
+  using std::wcstoll;
+  using std::wcstoul;
+  using std::wcstoull;
+  using std::wcscpy;
+  using std::wcsncpy;
+  using std::wcscat;
+  using std::wcsncat;
+
+#if 0
+  using std::wcsmp;
+#endif
+
+  using std::wcscoll;
+  using std::wcsncmp;
+  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;
+
+#if 0
+  using std::wcsftime;
+#endif
+
+  using std::btowc;
+  using std::wctob;
+  using std::mbsinit;
+  using std::mbrlen;
+  using std::mbrtowc;
+  using std::wcrtomb;
+  using std::mbsrtowcs;
+  using std::wcsrtombs;
+
+# ifdef _WCHAR_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _WCHAR_NEED_C_LEGACY_
+# endif /* _WCHAR_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_WCHAR_H_ */
+
+
+
diff --git a/contrib/libstdc++/include/c_shadow/wctype.h b/contrib/libstdc++/include/c_shadow/wctype.h
new file mode 100644
index 0000000..cae1aff
--- /dev/null
+++ b/contrib/libstdc++/include/c_shadow/wctype.h
@@ -0,0 +1,74 @@
+// -*- C++ -*- header wrapper.
+
+// Copyright (C) 1997-1999, 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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  _INCLUDED_CPP_CWCTYPE_H_
+# define _INCLUDED_CPP_CWCTYPE_H_ 1
+
+# ifdef _IN_C_LEGACY_  /* sub-included by a C header */
+      // get out of the "legacy"
+    } // close extern "C"
+  }   // close namespace _C_legacy::
+#  undef _IN_C_LEGACY_
+#  define _CWCHAR_NEED_C_LEGACY_
+# endif
+
+# include 
+
+  // Expose global C names, including non-standard ones, but shadow
+  // some names and types with the std:: C++ version.
+  using std::wint_t;
+  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;
+
+# ifdef _CWCHAR_NEED_C_LEGACY_
+  // dive back into the "swamp"
+  namespace _C_legacy {
+    extern "C" {
+#  define _IN_C_LEGACY_
+#  undef _CWCHAR_NEED_C_LEGACY_
+# endif /* _CWCHAR_NEED_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_CWCTYPE_H_ */
diff --git a/contrib/libstdc++/include/c_std/cmath.tcc b/contrib/libstdc++/include/c_std/cmath.tcc
new file mode 100644
index 0000000..9b86bbb
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/cmath.tcc
@@ -0,0 +1,54 @@
+// -*- C++ -*- C math library.
+
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// 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.
+
+// This file was written by Gabriel Dos Reis 
+
+#ifndef _CPP_BITS_CMATH_TCC
+#define _CPP_BITS_CMATH_TCC 1
+
+namespace std 
+{
+  export template
+    _Tp
+    __cmath_power(_Tp __x, unsigned int __n)
+    {
+      _Tp __y = __n % 2 ? __x : 1;
+
+      while (__n >>= 1)
+        {
+          __x = __x * __x;
+          if (__n % 2)
+            __y = __y * __x;
+        }
+
+      return __y;
+    }
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cassert.h b/contrib/libstdc++/include/c_std/std_cassert.h
new file mode 100644
index 0000000..06a0577
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cassert.h
@@ -0,0 +1,48 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.2  Assertions
+//
+
+/** @file cassert
+ *  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 assert.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+// No include guards on this header...
+
+#pragma GCC system_header
+
+#include 
diff --git a/contrib/libstdc++/include/c_std/std_cctype.h b/contrib/libstdc++/include/c_std/std_cctype.h
new file mode 100644
index 0000000..4700809
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cctype.h
@@ -0,0 +1,83 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 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: 
+//
+
+/** @file cctype
+ *  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 ctype.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CCTYPE
+#define _CPP_CCTYPE 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef isalnum
+#undef isalpha
+#undef iscntrl
+#undef isdigit
+#undef isgraph
+#undef islower
+#undef isprint
+#undef ispunct
+#undef isspace
+#undef isupper
+#undef isxdigit
+#undef tolower
+#undef toupper
+
+namespace std
+{
+  using ::isalnum;
+  using ::isalpha;
+  using ::iscntrl;
+  using ::isdigit;
+  using ::isgraph;
+  using ::islower;
+  using ::isprint;
+  using ::ispunct;
+  using ::isspace;
+  using ::isupper;
+  using ::isxdigit;
+  using ::tolower;
+  using ::toupper;
+}
+
+#endif 
diff --git a/contrib/libstdc++/include/c_std/std_cerrno.h b/contrib/libstdc++/include/c_std/std_cerrno.h
new file mode 100644
index 0000000..7fcecd4
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cerrno.h
@@ -0,0 +1,55 @@
+// The -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.3  Error numbers
+//
+
+/** @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
+
+#pragma GCC system_header
+
+#include 
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef errno
+#define errno errno
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cfloat.h b/contrib/libstdc++/include/c_std/std_cfloat.h
new file mode 100644
index 0000000..3cc8d72
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cfloat.h
@@ -0,0 +1,50 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+/** @file cfloat
+ *  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 float.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CFLOAT
+#define _CPP_CFLOAT 1
+
+#pragma GCC system_header
+
+#include 
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_ciso646.h b/contrib/libstdc++/include/c_std/std_ciso646.h
new file mode 100644
index 0000000..0993a0a
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_ciso646.h
@@ -0,0 +1,37 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 2001 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.
+
+/** @file ciso646
+ *  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 iso646.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
diff --git a/contrib/libstdc++/include/c_std/std_climits.h b/contrib/libstdc++/include/c_std/std_climits.h
new file mode 100644
index 0000000..242913e
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_climits.h
@@ -0,0 +1,51 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+/** @file climits
+ *  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 limits.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CLIMITS
+#define _CPP_CLIMITS	1
+
+#pragma GCC system_header
+
+#include 
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_clocale.h b/contrib/libstdc++/include/c_std/std_clocale.h
new file mode 100644
index 0000000..66747d9
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_clocale.h
@@ -0,0 +1,62 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.2.2  Implementation properties: C library
+//
+
+/** @file clocale
+ *  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 locale.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CLOCALE
+#define _CPP_CLOCALE 1
+
+#pragma GCC system_header
+
+#include 
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef setlocale
+#undef localeconv
+
+namespace std
+{
+  using ::lconv;
+  using ::setlocale;
+  using ::localeconv;
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cmath.h b/contrib/libstdc++/include/c_std/std_cmath.h
new file mode 100644
index 0000000..9e05900
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cmath.h
@@ -0,0 +1,664 @@
+// -*- C++ -*- C forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.5  C library
+//
+
+/** @file cmath
+ *  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 math.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CMATH
+#define _CPP_CMATH 1
+
+#pragma GCC system_header
+
+#include 
+
+#include 
+
+// Get rid of those macros defined in  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
+
+namespace std 
+{
+  // Forward declaration of a helper function.  This really should be
+  // an `exported' forward declaration.
+  template _Tp __cmath_power(_Tp, unsigned int);
+
+  template
+  inline _Tp
+    __cmath_abs(_Tp __x)
+    {
+      return __x < _Tp() ? -__x : __x;
+    }
+
+  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_ACOSF
+  inline float 
+  acos(float __x) { return ::acosf(__x); }
+#else
+  inline float 
+  acos(float __x) { return ::acos(static_cast(__x)); }
+#endif
+
+  using ::acos;
+  
+#if _GLIBCPP_HAVE_ACOSL
+  inline long double 
+  acos(long double __x) { return ::acosl(__x); }
+#else
+  inline long double 
+  acos(long double __x) { return ::acos(static_cast(__x)); }
+#endif
+
+  using ::asin;
+
+#if _GLIBCPP_HAVE_ASINF
+  inline float 
+  asin(float __x) { return ::asinf(__x); }
+#else
+  inline float 
+  asin(float __x) { return ::asin(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ASINL
+  inline long double 
+  asin(long double __x) { return ::asinl(__x); }
+#else
+  inline long double 
+  asin(long double __x) { return ::asin(static_cast(__x)); }
+#endif
+
+  using ::atan;
+
+#if _GLIBCPP_HAVE_ATANF
+  inline float 
+  atan(float __x) { return ::atanf(__x); }
+#else
+  inline float 
+  atan(float __x) { return ::atan(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATANL
+  inline long double 
+  atan(long double __x) { return ::atanl(__x); }
+#else
+  inline long double 
+  atan(long double __x) { return ::atan(static_cast(__x)); }
+#endif
+
+  using ::atan2;
+
+#if _GLIBCPP_HAVE_ATAN2F
+  inline float 
+  atan2(float __y, float __x) { return ::atan2f(__y, __x); }
+#else
+  inline float 
+  atan2(float __y, float __x)
+  { return ::atan2(static_cast(__y), static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_ATAN2L
+  inline long double 
+  atan2(long double __y, long double __x) { return ::atan2l(__y, __x); }
+#else
+  inline long double 
+  atan2(long double __y, long double __x) 
+  { return ::atan2(static_cast(__y), static_cast(__x)); }
+#endif
+
+  using ::ceil;
+
+#if _GLIBCPP_HAVE_CEILF
+  inline float 
+  ceil(float __x) { return ::ceilf(__x); }
+#else
+  inline float 
+  ceil(float __x) { return ::ceil(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_CEILL
+  inline long double 
+  ceil(long double __x) { return ::ceill(__x); }
+#else
+  inline long double 
+  ceil(long double __x) { return ::ceil(static_cast(__x)); }
+#endif
+
+  using ::cos;
+
+  inline float
+  cos(float __x)
+  { return __builtin_cosf(__x); }
+
+  inline long double
+  cos(long double __x)
+  { return __builtin_cosl(__x); }
+
+  using ::cosh;
+
+#if _GLIBCPP_HAVE_COSHF
+  inline float 
+  cosh(float __x) { return ::coshf(__x); }
+#else
+  inline float 
+  cosh(float __x) { return ::cosh(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_COSHL
+  inline long double 
+  cosh(long double __x) { return ::coshl(__x); }
+#else
+  inline long double 
+  cosh(long double __x) { return ::cosh(static_cast(__x)); }
+#endif
+
+  using ::exp;
+
+#if _GLIBCPP_HAVE_EXPF
+  inline float 
+  exp(float __x) { return ::expf(__x); }
+#else
+  inline float 
+  exp(float __x) { return ::exp(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_EXPL
+  inline long double 
+  exp(long double __x) { return ::expl(__x); }
+#else
+  inline long double 
+  exp(long double __x) { return ::exp(static_cast(__x)); }
+#endif
+
+  using ::fabs;
+
+  inline float
+  fabs(float __x)
+  { return __builtin_fabsf(__x); }
+
+  inline long double
+  fabs(long double __x)
+  { return __builtin_fabsl(__x); }
+
+  using ::floor;
+
+#if _GLIBCPP_HAVE_FLOORF
+  inline float 
+  floor(float __x) { return ::floorf(__x); }
+#else
+  inline float 
+  floor(float __x) { return ::floor(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_FLOORL
+  inline long double 
+  floor(long double __x) { return ::floorl(__x); }
+#else
+  inline long double 
+  floor(long double __x) { return ::floor(static_cast(__x)); }
+#endif
+
+  using ::fmod;
+
+#if _GLIBCPP_HAVE_FMODF
+  inline float 
+  fmod(float __x, float __y) { return ::fmodf(__x, __y); }
+#else
+  inline float 
+  fmod(float __x, float __y)
+  { return ::fmod(static_cast(__x), static_cast(__y)); }
+#endif
+
+#if _GLIBCPP_HAVE_FMODL
+  inline long double 
+  fmod(long double __x, long double __y) { return ::fmodl(__x, __y); }
+#else
+  inline long double 
+  fmod(long double __x, long double __y) 
+  { return ::fmod(static_cast(__x), static_cast(__y)); }
+#endif
+
+  using ::frexp;
+
+#if _GLIBCPP_HAVE_FREXPF
+  inline float 
+  frexp(float __x, int* __exp) { return ::frexpf(__x, __exp); }
+#else
+  inline float 
+  frexp(float __x, int* __exp) { return ::frexp(__x, __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_FREXPL
+  inline long double 
+  frexp(long double __x, int* __exp) { return ::frexpl(__x, __exp); }
+#else
+  inline long double 
+  frexp(long double __x, int* __exp) 
+  { return ::frexp(static_cast(__x), __exp); }
+#endif
+
+  using ::ldexp;
+
+#if _GLIBCPP_HAVE_LDEXPF
+  inline float 
+  ldexp(float __x, int __exp) { return ::ldexpf(__x, __exp); }
+#else
+  inline float 
+  ldexp(float __x, int __exp)
+  { return ::ldexp(static_cast(__x), __exp); }
+#endif
+
+#if _GLIBCPP_HAVE_LDEXPL
+  inline long double 
+  ldexp(long double __x, int __exp) { return ::ldexpl(__x, __exp); }
+#else
+  inline long double 
+  ldexp(long double __x, int __exp) 
+  { return ::ldexp(static_cast(__x), __exp); }
+#endif
+
+  using ::log;
+
+#if _GLIBCPP_HAVE_LOGF
+  inline float 
+  log(float __x) { return ::logf(__x); }
+#else
+  inline float log(float __x)
+  { return ::log(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_LOGL
+  inline long double 
+  log(long double __x) { return ::logl(__x); }
+#else
+  inline long double 
+  log(long double __x) { return ::log(static_cast(__x)); }
+#endif
+
+  using ::log10;
+
+#if _GLIBCPP_HAVE_LOG10F
+  inline float 
+  log10(float __x) { return ::log10f(__x); }
+#else
+  inline float 
+  log10(float __x) { return ::log10(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_LOG10L
+  inline long double 
+  log10(long double __x) { return ::log10l(__x); }
+#else
+  inline long double 
+  log10(long double __x) { return ::log10(static_cast(__x)); }
+#endif
+
+  using ::modf;
+
+#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(__x), &__tmp);
+    *__iptr = static_cast(__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(__x), &__tmp);
+    * __iptr = static_cast(__tmp);
+    return __res;
+  }
+#endif
+
+  template
+    inline _Tp
+    __pow_helper(_Tp __x, int __n)
+    {
+      return __n < 0
+        ? _Tp(1)/__cmath_power(__x, -__n)
+        : __cmath_power(__x, __n);
+    }
+
+  using ::pow;
+
+#if _GLIBCPP_HAVE_POWF
+  inline float 
+  pow(float __x, float __y) { return ::powf(__x, __y); }
+#else
+  inline float 
+  pow(float __x, float __y)
+  { return ::pow(static_cast(__x), static_cast(__y)); }
+#endif
+
+#if _GLIBCPP_HAVE_POWL
+  inline long double 
+  pow(long double __x, long double __y) { return ::powl(__x, __y); }
+#else
+  inline long double 
+  pow(long double __x, long double __y) 
+  { return ::pow(static_cast(__x), static_cast(__y)); }
+#endif
+
+  inline double 
+  pow(double __x, int __i)
+  { return __pow_helper(__x, __i); }
+
+  inline float 
+  pow(float __x, int __n)
+  { return __pow_helper(__x, __n); }
+
+  inline long double 
+  pow(long double __x, int __n)
+  { return __pow_helper(__x, __n); }
+
+  using ::sin;
+
+  inline float
+  sin(float __x)
+  { return __builtin_sinf(__x); }
+
+  inline long double
+  sin(long double __x)
+  { return __builtin_sinl(__x); }
+
+  using ::sinh;
+
+#if _GLIBCPP_HAVE_SINHF
+  inline float 
+  sinh(float __x) { return ::sinhf(__x); }
+#else
+  inline float 
+  sinh(float __x) { return ::sinh(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_SINHL
+  inline long double 
+  sinh(long double __x) { return ::sinhl(__x); }
+#else
+  inline long double 
+  sinh(long double __x) { return ::sinh(static_cast(__x)); }
+#endif
+
+  using ::sqrt;
+
+  inline float
+  sqrt(float __x)
+  { return __builtin_sqrtf(__x); }
+
+  inline long double
+  sqrt(long double __x)
+  { return __builtin_sqrtl(__x); }
+
+  using ::tan;
+
+#if _GLIBCPP_HAVE_TANF
+  inline float 
+  tan(float __x) { return ::tanf(__x); }
+#else
+  inline float 
+  tan(float __x) { return ::tan(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANL
+  inline long double 
+  tan(long double __x) { return ::tanl(__x); }
+#else
+  inline long double 
+  tan(long double __x) { return ::tan(static_cast(__x)); }
+#endif
+
+  using ::tanh;
+
+#if _GLIBCPP_HAVE_TANHF
+  inline float 
+  tanh(float __x) { return ::tanhf(__x); }
+#else
+  inline float 
+  tanh(float __x) { return ::tanh(static_cast(__x)); }
+#endif
+
+#if _GLIBCPP_HAVE_TANHL
+  inline long double 
+  tanh(long double __x) { return ::tanhl(__x); }
+#else
+  inline long double 
+  tanh(long double __x) { return ::tanh(static_cast(__x)); }
+#endif
+} 
+
+
+#if _GLIBCPP_USE_C99
+// These are possible macros imported from C99-land. For strict
+// conformance, remove possible C99-injected names from the global
+// namespace, and sequester them in the __gnu_cxx extension namespace. 
+namespace __gnu_cxx
+{
+  template
+    int 
+    __capture_fpclassify(_Tp __f) { return fpclassify(__f); }
+
+  template
+    int 
+    __capture_isfinite(_Tp __f) { return isfinite(__f); }
+
+  template
+    int 
+    __capture_isinf(_Tp __f) { return isinf(__f); }
+
+  template
+    int 
+    __capture_isnan(_Tp __f) { return isnan(__f); }
+
+  template
+    int 
+    __capture_isnormal(_Tp __f) { return isnormal(__f); }
+
+  template
+    int 
+    __capture_signbit(_Tp __f) { return signbit(__f); }
+
+  template
+    int 
+    __capture_isgreater(_Tp __f1, _Tp __f2)
+    { return isgreater(__f1, __f2); }
+
+  template
+     int 
+     __capture_isgreaterequal(_Tp __f1, _Tp __f2) 
+     { return isgreaterequal(__f1, __f2); }
+
+  template
+     int 
+     __capture_isless(_Tp __f1, _Tp __f2) { return isless(__f1, __f2); }
+
+  template
+     int 
+     __capture_islessequal(_Tp __f1, _Tp __f2) 
+     { return islessequal(__f1, __f2); }
+
+  template
+     int 
+     __capture_islessgreater(_Tp __f1, _Tp __f2) 
+     { return islessgreater(__f1, __f2); }
+
+  template
+     int 
+     __capture_isunordered(_Tp __f1, _Tp __f2) 
+     { return isunordered(__f1, __f2); }
+} 
+#endif
+
+#undef fpclassify
+#undef isfinite
+#undef isinf
+#undef isnan
+#undef isnormal
+#undef signbit
+#undef isgreater
+#undef isgreaterequal
+#undef isless
+#undef islessequal
+#undef islessgreater
+#undef isunordered
+
+#if _GLIBCPP_USE_C99
+namespace __gnu_cxx
+{
+  template
+    int
+    fpclassify(_Tp __f) { return __capture_fpclassify(__f); }
+
+  template
+    int
+    isfinite(_Tp __f) { return __capture_isfinite(__f); }
+
+  template
+    int 
+    isinf(_Tp __f) { return __capture_isinf(__f); }
+
+  template
+    int 
+    isnan(_Tp __f) { return __capture_isnan(__f); }
+
+  template
+    int 
+    isnormal(_Tp __f) { return __capture_isnormal(__f); }
+
+  template
+    int 
+    signbit(_Tp __f) { return __capture_signbit(__f); }
+
+  template
+    int 
+    isgreater(_Tp __f1, _Tp __f2) { return __capture_isgreater(__f1, __f2); }
+
+  template
+    int 
+    isgreaterequal(_Tp __f1, _Tp __f2) 
+    { return __capture_isgreaterequal(__f1, __f2); }
+
+  template
+    int 
+    isless(_Tp __f1, _Tp __f2) { return __capture_isless(__f1, __f2); }
+
+  template
+    int 
+    islessequal(_Tp __f1, _Tp __f2) 
+    { return __capture_islessequal(__f1, __f2); }
+
+  template
+    int 
+    islessgreater(_Tp __f1, _Tp __f2) 
+    { return __capture_islessgreater(__f1, __f2); }
+
+  template
+    int 
+    isunordered(_Tp __f1, _Tp __f2) 
+    { return __capture_isunordered(__f1, __f2); }
+}
+
+namespace std
+{
+  using __gnu_cxx::fpclassify;
+  using __gnu_cxx::isfinite;
+  using __gnu_cxx::isinf;
+  using __gnu_cxx::isnan;
+  using __gnu_cxx::isnormal;
+  using __gnu_cxx::signbit;
+  using __gnu_cxx::isgreater;
+  using __gnu_cxx::isgreaterequal;
+  using __gnu_cxx::isless;
+  using __gnu_cxx::islessequal;
+  using __gnu_cxx::islessgreater;
+  using __gnu_cxx::isunordered;
+}
+#endif
+  
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+#  define export
+#  include 
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_csetjmp.h b/contrib/libstdc++/include/c_std/std_csetjmp.h
new file mode 100644
index 0000000..f6df581
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_csetjmp.h
@@ -0,0 +1,65 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+/** @file csetjmp
+ *  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 setjmp.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSETJMP
+#define _CPP_CSETJMP 1
+
+#pragma GCC system_header
+
+#include 
+
+// Get rid of those macros defined in  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) setjmp (env)
+#endif
+
+namespace std
+{
+  using ::jmp_buf;
+  using ::longjmp;
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_csignal.h b/contrib/libstdc++/include/c_std/std_csignal.h
new file mode 100644
index 0000000..1017161
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_csignal.h
@@ -0,0 +1,61 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+/** @file csignal
+ *  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 signal.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSIGNAL
+#define _CPP_CSIGNAL 1
+
+#pragma GCC system_header
+
+#include 
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef raise
+
+namespace std
+{
+  using ::sig_atomic_t;
+  using ::signal;
+  using ::raise;
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cstdarg.h b/contrib/libstdc++/include/c_std/std_cstdarg.h
new file mode 100644
index 0000000..9383ade
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cstdarg.h
@@ -0,0 +1,60 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+/** @file cstdarg
+ *  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 stdarg.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSTDARG
+#define _CPP_CSTDARG 1
+
+#pragma GCC system_header
+
+#include 
+
+// Adhere to section 17.4.1.2 clause 5 of ISO 14882:1998
+#ifndef va_end
+#define va_end(ap) va_end (ap)
+#endif
+
+namespace std
+{
+  using ::va_list;
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cstddef.h b/contrib/libstdc++/include/c_std/std_cstddef.h
new file mode 100644
index 0000000..7a740af
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cstddef.h
@@ -0,0 +1,56 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 18.1  Types
+//
+
+/** @file cstddef
+ *  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 stddef.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSTDDEF
+#define _CPP_CSTDDEF 1
+
+#pragma GCC system_header
+
+#include 
+
+namespace std 
+{
+  using ::ptrdiff_t;
+  using ::size_t;
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cstdio.h b/contrib/libstdc++/include/c_std/std_cstdio.h
new file mode 100644
index 0000000..6fb8c79
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cstdio.h
@@ -0,0 +1,172 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8.2  C Library files
+//
+
+/** @file cstdio
+ *  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 stdio.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSTDIO
+#define _CPP_CSTDIO 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+#include 
+
+// Get rid of those macros defined in  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
+
+namespace std 
+{
+  using ::FILE;
+  using ::fpos_t;
+
+  using ::clearerr;
+  using ::fclose;
+  using ::feof;
+  using ::ferror;
+  using ::fflush;
+  using ::fgetc;
+  using ::fgetpos;
+  using ::fgets;
+  using ::fopen;
+  using ::fprintf;
+  using ::fputc;
+  using ::fputs;
+  using ::fread;
+  using ::freopen;
+  using ::fscanf;
+  using ::fseek;
+  using ::fsetpos;
+  using ::ftell;
+  using ::fwrite;
+  using ::getc;
+  using ::getchar;
+  using ::gets;
+  using ::perror;
+  using ::printf;
+  using ::putc;
+  using ::putchar;
+  using ::puts;
+  using ::remove;
+  using ::rename;
+  using ::rewind;
+  using ::scanf;
+  using ::setbuf;
+  using ::setvbuf;
+  using ::sprintf;
+  using ::sscanf;
+  using ::tmpfile;
+  using ::tmpnam;
+  using ::ungetc;
+  using ::vfprintf;
+  using ::vprintf;
+  using ::vsprintf;
+}
+
+#if _GLIBCPP_USE_C99
+
+#undef snprintf
+#undef vfscanf
+#undef vscanf
+#undef vsnprintf
+#undef vsscanf
+
+namespace __gnu_cxx
+{
+  using ::snprintf;
+  using ::vfscanf;
+  using ::vscanf;
+  using ::vsnprintf;
+  using ::vsscanf;
+}
+
+namespace std
+{
+  using __gnu_cxx::snprintf;
+  using __gnu_cxx::vfscanf;
+  using __gnu_cxx::vscanf;
+  using __gnu_cxx::vsnprintf;
+  using __gnu_cxx::vsscanf;
+}
+#endif 
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cstdlib.h b/contrib/libstdc++/include/c_std/std_cstdlib.h
new file mode 100644
index 0000000..70fc8d3
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cstdlib.h
@@ -0,0 +1,178 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+/** @file cstdlib
+ *  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 stdlib.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSTDLIB
+#define _CPP_CSTDLIB 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+#include 
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef abort
+#undef abs
+#undef atexit
+#undef atof
+#undef atoi
+#undef atol
+#undef bsearch
+#undef calloc
+#undef div
+#undef exit
+#undef free
+#undef getenv
+#undef labs
+#undef ldiv
+#undef malloc
+#undef mblen
+#undef mbstowcs
+#undef mbtowc
+#undef qsort
+#undef rand
+#undef realloc
+#undef srand
+#undef strtod
+#undef strtol
+#undef strtoul
+#undef system
+#undef wcstombs
+#undef wctomb
+
+namespace std 
+{
+  using ::div_t;
+  using ::ldiv_t;
+
+  using ::abort;
+  using ::abs;
+  using ::atexit;
+  using ::atof;
+  using ::atoi;
+  using ::atol;
+  using ::bsearch;
+  using ::calloc;
+  using ::div;
+  using ::exit;
+  using ::free;
+  using ::getenv;
+  using ::labs;
+  using ::ldiv;
+  using ::malloc;
+  using ::mblen;
+  using ::mbstowcs;
+  using ::mbtowc;
+  using ::qsort;
+  using ::rand;
+  using ::realloc;
+  using ::srand;
+  using ::strtod;
+  using ::strtol;
+  using ::strtoul;
+  using ::system;
+  using ::wcstombs;
+  using ::wctomb;
+
+  inline long 
+  abs(long __i) { return labs(__i); }
+
+  inline ldiv_t
+  div(long __i, long __j) { return ldiv(__i, __j); }
+} 
+
+#if _GLIBCPP_USE_C99
+
+#undef _Exit
+#undef llabs
+#undef lldiv
+#undef atoll
+#undef strtoll
+#undef strtoull
+#undef strtof
+#undef strtold
+
+namespace __gnu_cxx
+{
+  using ::lldiv_t;
+  using ::_Exit;
+
+  inline long long 
+  abs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline long long 
+  llabs(long long __x) { return __x >= 0 ? __x : -__x; }
+
+  inline lldiv_t 
+  div(long long __n, long long __d)
+  { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  inline lldiv_t 
+  lldiv(long long __n, long long __d)
+  { lldiv_t __q; __q.quot = __n / __d; __q.rem = __n % __d; return __q; }
+
+  using ::atoll;
+  using ::strtof;
+  using ::strtoll;
+  using ::strtoull;
+  using ::strtold; 
+} 
+
+namespace std
+{
+  using __gnu_cxx::lldiv_t;
+  using __gnu_cxx::_Exit;
+  using __gnu_cxx::abs;
+  using __gnu_cxx::llabs; 
+  using __gnu_cxx::div;
+  using __gnu_cxx::lldiv;
+  using __gnu_cxx::atoll;
+  using __gnu_cxx::strtof;
+  using __gnu_cxx::strtoll;
+  using __gnu_cxx::strtoull;
+  using __gnu_cxx::strtold;
+}
+#endif
+
+#endif 
diff --git a/contrib/libstdc++/include/c_std/std_cstring.h b/contrib/libstdc++/include/c_std/std_cstring.h
new file mode 100644
index 0000000..066342a
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cstring.h
@@ -0,0 +1,128 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.4.6  C library
+//
+
+/** @file cstring
+ *  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 string.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CSTRING
+#define _CPP_CSTRING 1
+
+#pragma GCC system_header
+
+#include 
+
+#include 
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef memcpy
+#undef memmove
+#undef strcpy
+#undef strncpy
+#undef strcat
+#undef strncat
+#undef memcmp
+#undef strcmp
+#undef strcoll
+#undef strncmp
+#undef strxfrm
+#undef memchr
+#undef strchr
+#undef strcspn
+#undef strpbrk
+#undef strrchr
+#undef strspn
+#undef strstr
+#undef strtok
+#undef memset
+#undef strerror
+#undef strlen
+
+namespace std 
+{
+  using ::memcpy;
+  using ::memmove;
+  using ::strcpy;
+  using ::strncpy;
+  using ::strcat;
+  using ::strncat;
+  using ::memcmp;
+  using ::strcmp;
+  using ::strcoll;
+  using ::strncmp;
+  using ::strxfrm;
+  using ::strcspn;
+  using ::strspn;
+  using ::strtok;
+  using ::memset;
+  using ::strerror;
+  using ::strlen;
+
+  using ::memchr;
+
+  inline void*
+  memchr(void* __p, int __c, size_t __n)
+  { return memchr(const_cast(__p), __c, __n); }
+
+  using ::strchr;
+
+  inline char*
+  strchr(char* __s1, int __n)
+  { return __builtin_strchr(const_cast(__s1), __n); }
+
+  using ::strpbrk;
+
+  inline char*
+  strpbrk(char* __s1, const char* __s2)
+  { return __builtin_strpbrk(const_cast(__s1), __s2); }
+
+  using ::strrchr;
+
+  inline char*
+  strrchr(char* __s1, int __n)
+  { return __builtin_strrchr(const_cast(__s1), __n); }
+
+  using ::strstr;
+
+  inline char*
+  strstr(char* __s1, const char* __s2)
+  { return __builtin_strstr(const_cast(__s1), __s2); }
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_ctime.h b/contrib/libstdc++/include/c_std/std_ctime.h
new file mode 100644
index 0000000..1b4c09b
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_ctime.h
@@ -0,0 +1,81 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 20.5  Date and time
+//
+
+/** @file ctime
+ *  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 time.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CTIME
+#define _CPP_CTIME 1
+
+#pragma GCC system_header
+
+#include 
+
+#include 
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef clock
+#undef difftime
+#undef mktime
+#undef time
+#undef asctime
+#undef ctime
+#undef gmtime
+#undef localtime
+#undef strftime
+
+namespace std
+{
+  using ::clock_t;
+  using ::time_t;
+  using ::tm;
+
+  using ::clock;
+  using ::difftime;
+  using ::mktime;
+  using ::time;
+  using ::asctime;
+  using ::ctime;
+  using ::gmtime;
+  using ::localtime;
+  using ::strftime;
+}
+
+#endif
diff --git a/contrib/libstdc++/include/c_std/std_cwchar.h b/contrib/libstdc++/include/c_std/std_cwchar.h
new file mode 100644
index 0000000..f67f006
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cwchar.h
@@ -0,0 +1,243 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21.4
+//
+
+/** @file cwchar
+ *  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 wchar.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CWCHAR
+#define _CPP_CWCHAR 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+#if _GLIBCPP_HAVE_WCHAR_H
+#include 
+#endif
+
+// Need to do a bit of trickery here with mbstate_t as char_traits
+// assumes it is in wchar.h, regardless of wchar_t specializations.
+#ifndef _GLIBCPP_HAVE_MBSTATE_T
+extern "C" 
+{
+  typedef struct 
+  {
+    int __fill[6];
+  } mbstate_t;
+}
+#endif
+
+namespace std 
+{
+  using ::mbstate_t;
+}
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef btowc
+#undef fgetwc
+#undef fgetws
+#undef fputwc
+#undef fputws
+#undef fwide
+#undef fwprintf
+#undef fwscanf
+#undef getwc
+#undef getwchar
+#undef mbrlen
+#undef mbrtowc
+#undef mbsinit
+#undef mbsrtowcs
+#undef putwc
+#undef putwchar
+#undef swprintf
+#undef swscanf
+#undef ungetwc
+#undef vfwprintf
+#undef vfwscanf
+#undef vswprintf
+#undef vswscanf
+#undef vwprintf
+#undef vwscanf
+#undef wcrtomb
+#undef wcscat
+#undef wcschr
+#undef wcscmp
+#undef wcscoll
+#undef wcscpy
+#undef wcscspn
+#undef wcsftime
+#undef wcslen
+#undef wcsncat
+#undef wcsncmp
+#undef wcsncpy
+#undef wcspbrk
+#undef wcsrchr
+#undef wcsrtombs
+#undef wcsspn
+#undef wcsstr
+#undef wcstod
+#undef wcstof
+#undef wcstok
+#undef wcstol
+#undef wcstoul
+#undef wcsxfrm
+#undef wctob
+#undef wmemchr
+#undef wmemcmp
+#undef wmemcpy
+#undef wmemmove
+#undef wmemset
+#undef wprintf
+#undef wscanf
+
+#if _GLIBCPP_USE_WCHAR_T
+namespace std
+{
+  using ::wint_t;
+
+  using ::btowc;
+  using ::fgetwc;
+  using ::fgetws;
+  using ::fputwc;
+  using ::fputws;
+  using ::fwide;
+  using ::fwprintf;
+  using ::fwscanf;
+  using ::getwc;
+  using ::getwchar;
+  using ::mbrlen;
+  using ::mbrtowc;
+  using ::mbsinit;
+  using ::mbsrtowcs;
+  using ::putwc;
+  using ::putwchar;
+  using ::swprintf;
+  using ::swscanf;
+  using ::ungetwc;
+  using ::vfwprintf;
+  using ::vfwscanf;
+  using ::vswprintf;
+  using ::vswscanf;
+  using ::vwprintf;
+  using ::vwscanf;
+  using ::wcrtomb;
+  using ::wcscat;
+  using ::wcscmp;
+  using ::wcscoll;
+  using ::wcscpy;
+  using ::wcscspn;
+  using ::wcsftime;
+  using ::wcslen;
+  using ::wcsncat;
+  using ::wcsncmp;
+  using ::wcsncpy;
+  using ::wcsrtombs;
+  using ::wcsspn;
+  using ::wcstod;
+  using ::wcstof;
+  using ::wcstok;
+  using ::wcstol;
+  using ::wcstoul;
+  using ::wcsxfrm;
+  using ::wctob;
+  using ::wmemcmp;
+  using ::wmemcpy;
+  using ::wmemmove;
+  using ::wmemset;
+  using ::wprintf;
+  using ::wscanf;
+
+  using ::wcschr;
+
+  inline wchar_t*
+  wcschr(wchar_t* __p, wchar_t __c)
+  { return wcschr(const_cast(__p), __c); }
+
+  using ::wcspbrk;
+
+  inline wchar_t*
+  wcspbrk(wchar_t* __s1, wchar_t* __s2)
+  { return wcspbrk(const_cast(__s1), __s2); }
+
+  using ::wcsrchr;
+
+  inline wchar_t*
+  wcsrchr(wchar_t* __p, wchar_t __c)
+  { return wcsrchr(const_cast(__p), __c); }
+
+  using ::wcsstr;
+
+  inline wchar_t*
+  wcsstr(wchar_t* __s1, wchar_t* __s2)
+  { return wcsstr(const_cast(__s1), __s2); }
+
+  using ::wmemchr;
+
+  inline wchar_t*
+  wmemchr(wchar_t* __p, wchar_t __c, size_t __n)
+  { return wmemchr(const_cast(__p), __c, __n); }
+}
+
+#if _GLIBCPP_USE_C99
+
+#undef wcstold
+#undef wcstoll
+#undef wcstoull
+
+namespace __gnu_cxx
+{
+  using ::wcstold;
+  using ::wcstoll;
+  using ::wcstoull;
+}
+
+namespace std
+{
+  using __gnu_cxx::wcstold;
+  using __gnu_cxx::wcstoll;
+  using __gnu_cxx::wcstoull;
+}
+#endif
+
+#endif //_GLIBCPP_USE_WCHAR_T
+
+#endif 
diff --git a/contrib/libstdc++/include/c_std/std_cwctype.h b/contrib/libstdc++/include/c_std/std_cwctype.h
new file mode 100644
index 0000000..e469194
--- /dev/null
+++ b/contrib/libstdc++/include/c_std/std_cwctype.h
@@ -0,0 +1,106 @@
+// -*- C++ -*- forwarding header.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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: 
+//
+
+/** @file cwctype
+ *  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 wctype.h,
+ *  and its contents are (mostly) the same as that header, but are all
+ *  contained in the namespace @c std.
+ */
+
+#ifndef _CPP_CWCTYPE
+#define _CPP_CWCTYPE 1
+
+#pragma GCC system_header
+
+#include 
+
+#if _GLIBCPP_HAVE_WCTYPE_H
+#include 
+#endif
+
+// Get rid of those macros defined in  in lieu of real functions.
+#undef iswalnum
+#undef iswalpha
+#undef iswblank
+#undef iswcntrl
+#undef iswdigit
+#undef iswgraph
+#undef iswlower
+#undef iswprint
+#undef iswprint
+#undef iswpunct
+#undef iswspace
+#undef iswupper
+#undef iswxdigit
+#undef iswctype  
+#undef towlower
+#undef towupper
+#undef towctrans
+#undef wctrans
+#undef wctype
+
+#if _GLIBCPP_USE_WCHAR_T
+namespace std
+{
+  using ::wint_t; 	  // cwchar
+
+  using ::wctype_t;
+  using ::wctrans_t;
+
+  using ::iswalnum;
+  using ::iswalpha;
+  using ::iswblank;
+  using ::iswcntrl;
+  using ::iswdigit;
+  using ::iswgraph;
+  using ::iswlower;
+  using ::iswprint;
+  using ::iswprint;
+  using ::iswpunct;
+  using ::iswspace;
+  using ::iswupper;
+  using ::iswxdigit;
+  using ::iswctype;
+  using ::towlower;
+  using ::towupper;
+  using ::towctrans;
+  using ::wctrans;
+  using ::wctype;
+}
+#endif //_GLIBCPP_USE_WCHAR_T
+
+#endif 
diff --git a/contrib/libstdc++/include/ext/algorithm b/contrib/libstdc++/include/ext/algorithm
new file mode 100644
index 0000000..bf72765
--- /dev/null
+++ b/contrib/libstdc++/include/ext/algorithm
@@ -0,0 +1,496 @@
+// Algorithm extensions -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/algorithm
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _EXT_ALGORITHM
+#define _EXT_ALGORITHM
+
+#pragma GCC system_header
+#include 
+
+namespace __gnu_cxx
+{
+  using std::ptrdiff_t;
+  using std::min;
+  using std::pair;
+  using std::input_iterator_tag;
+  using std::random_access_iterator_tag;
+  using std::iterator_traits;
+
+  //--------------------------------------------------
+  // copy_n (not part of the C++ standard)
+
+  template
+    pair<_InputIter, _OutputIter>
+    __copy_n(_InputIter __first, _Size __count,
+	     _OutputIter __result,
+	     input_iterator_tag)
+    {
+      for ( ; __count > 0; --__count) {
+	*__result = *__first;
+	++__first;
+	++__result;
+      }
+      return pair<_InputIter, _OutputIter>(__first, __result);
+    }
+
+  template
+    inline pair<_RAIter, _OutputIter>
+    __copy_n(_RAIter __first, _Size __count,
+	     _OutputIter __result,
+	     random_access_iterator_tag)
+    {
+      _RAIter __last = __first + __count;
+      return pair<_RAIter, _OutputIter>(__last,
+					std::copy(__first, __last, __result));
+    }
+
+  /**
+   *  @brief Copies the range [first,first+count) into [result,result+count).
+   *  @param  first  An input iterator.
+   *  @param  count  The number of elements to copy.
+   *  @param  result An output iterator.
+   *  @return   A std::pair composed of first+count and result+count.
+   *
+   *  This is an SGI extension.
+   *  This inline function will boil down to a call to @c memmove whenever
+   *  possible.  Failing that, if random access iterators are passed, then the
+   *  loop count will be known (and therefore a candidate for compiler
+   *  optimizations such as unrolling).
+   *  @ingroup SGIextensions
+  */
+  template
+    inline pair<_InputIter, _OutputIter>
+    copy_n(_InputIter __first, _Size __count, _OutputIter __result)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+	    typename iterator_traits<_InputIter>::value_type>)
+
+      return __copy_n(__first, __count, __result,
+		      std::__iterator_category(__first));
+    }
+
+  template
+    int
+    __lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
+				   _InputIter2 __first2, _InputIter2 __last2)
+    {
+      while (__first1 != __last1 && __first2 != __last2) {
+	if (*__first1 < *__first2)
+	  return -1;
+	if (*__first2 < *__first1)
+	  return 1;
+	++__first1;
+	++__first2;
+      }
+      if (__first2 == __last2) {
+	return !(__first1 == __last1);
+      }
+      else {
+	return -1;
+      }
+    }
+
+  inline int
+  __lexicographical_compare_3way(const unsigned char* __first1,
+				 const unsigned char* __last1,
+				 const unsigned char* __first2,
+				 const unsigned char* __last2)
+  {
+    const ptrdiff_t __len1 = __last1 - __first1;
+    const ptrdiff_t __len2 = __last2 - __first2;
+    const int __result = std::memcmp(__first1, __first2, min(__len1, __len2));
+    return __result != 0 ? __result 
+			 : (__len1 == __len2 ? 0 : (__len1 < __len2 ? -1 : 1));
+  }
+
+  inline int 
+  __lexicographical_compare_3way(const char* __first1, const char* __last1,
+				 const char* __first2, const char* __last2)
+  {
+#if CHAR_MAX == SCHAR_MAX
+    return __lexicographical_compare_3way(
+				  (const signed char*) __first1,
+				  (const signed char*) __last1,
+				  (const signed char*) __first2,
+				  (const signed char*) __last2);
+#else
+    return __lexicographical_compare_3way((const unsigned char*) __first1,
+					  (const unsigned char*) __last1,
+					  (const unsigned char*) __first2,
+					  (const unsigned char*) __last2);
+#endif
+  }
+
+  /**
+   *  @brief @c memcmp on steroids.
+   *  @param  first1  An input iterator.
+   *  @param  last1   An input iterator.
+   *  @param  first2  An input iterator.
+   *  @param  last2   An input iterator.
+   *  @return   An int, as with @c memcmp.
+   *
+   *  The return value will be less than zero if the first range is
+   *  "lexigraphically less than" the second, greater than zero if the second
+   *  range is "lexigraphically less than" the first, and zero otherwise.
+   *  This is an SGI extension.
+   *  @ingroup SGIextensions
+  */
+  template
+    int
+    lexicographical_compare_3way(_InputIter1 __first1, _InputIter1 __last1,
+				 _InputIter2 __first2, _InputIter2 __last2)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter1>)
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter2>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter1>::value_type>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_InputIter2>::value_type>)
+
+      return __lexicographical_compare_3way(__first1, __last1, __first2, __last2);
+    }
+
+  // count and count_if: this version, whose return type is void, was present
+  // in the HP STL, and is retained as an extension for backward compatibility.
+
+  template
+    void
+    count(_InputIter __first, _InputIter __last,
+	  const _Tp& __value,
+	  _Size& __n)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_EqualityComparableConcept<
+	    typename iterator_traits<_InputIter>::value_type >)
+      __glibcpp_function_requires(_EqualityComparableConcept<_Tp>)
+      for ( ; __first != __last; ++__first)
+	if (*__first == __value)
+	  ++__n;
+    }
+
+  template
+    void
+    count_if(_InputIter __first, _InputIter __last,
+	     _Predicate __pred,
+	     _Size& __n)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_UnaryPredicateConcept<_Predicate,
+	    typename iterator_traits<_InputIter>::value_type>)
+      for ( ; __first != __last; ++__first)
+	if (__pred(*__first))
+	  ++__n;
+    }
+
+  // random_sample and random_sample_n (extensions, not part of the standard).
+
+  template
+    _OutputIter
+    random_sample_n(_ForwardIter __first, _ForwardIter __last,
+                    _OutputIter __out, const _Distance __n)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+		typename iterator_traits<_ForwardIter>::value_type>)
+
+      _Distance __remaining = std::distance(__first, __last);
+      _Distance __m = min(__n, __remaining);
+
+      while (__m > 0) {
+	if (std::__random_number(__remaining) < __m) {
+	      *__out = *__first;
+	      ++__out;
+	      --__m;
+	}
+
+	--__remaining;
+	++__first;
+      }
+      return __out;
+    }
+
+  template
+    _OutputIter
+    random_sample_n(_ForwardIter __first, _ForwardIter __last,
+                   _OutputIter __out, const _Distance __n, 
+		   _RandomNumberGenerator& __rand)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_OutputIteratorConcept<_OutputIter,
+		typename iterator_traits<_ForwardIter>::value_type>)
+      __glibcpp_function_requires(_UnaryFunctionConcept<
+		_RandomNumberGenerator, _Distance, _Distance>)
+
+      _Distance __remaining = std::distance(__first, __last);
+      _Distance __m = min(__n, __remaining);
+
+      while (__m > 0) {
+	if (__rand(__remaining) < __m) {
+	      *__out = *__first;
+	      ++__out;
+	      --__m;
+	}
+
+	--__remaining;
+	++__first;
+      }
+      return __out;
+    }
+
+  template
+    _RandomAccessIter
+    __random_sample(_InputIter __first, _InputIter __last,
+		    _RandomAccessIter __out,
+		    const _Distance __n)
+    {
+      _Distance __m = 0;
+      _Distance __t = __n;
+      for ( ; __first != __last && __m < __n; ++__m, ++__first) 
+	__out[__m] = *__first;
+
+      while (__first != __last) {
+	++__t;
+	_Distance __M = std::__random_number(__t);
+	if (__M < __n)
+	  __out[__M] = *__first;
+	++__first;
+      }
+
+      return __out + __m;
+    }
+
+  template
+    _RandomAccessIter
+    __random_sample(_InputIter __first, _InputIter __last,
+		    _RandomAccessIter __out,
+		    _RandomNumberGenerator& __rand,
+		    const _Distance __n)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_UnaryFunctionConcept<
+	    _RandomNumberGenerator, _Distance, _Distance>)
+
+      _Distance __m = 0;
+      _Distance __t = __n;
+      for ( ; __first != __last && __m < __n; ++__m, ++__first)
+	__out[__m] = *__first;
+
+      while (__first != __last) {
+	++__t;
+	_Distance __M = __rand(__t);
+	if (__M < __n)
+	  __out[__M] = *__first;
+	++__first;
+      }
+
+      return __out + __m;
+    }
+
+  template
+    inline _RandomAccessIter
+    random_sample(_InputIter __first, _InputIter __last,
+		  _RandomAccessIter __out_first, _RandomAccessIter __out_last) 
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+
+      return __random_sample(__first, __last,
+			     __out_first, __out_last - __out_first);
+    }
+
+  template
+    inline _RandomAccessIter
+    random_sample(_InputIter __first, _InputIter __last,
+		  _RandomAccessIter __out_first, _RandomAccessIter __out_last,
+		  _RandomNumberGenerator& __rand) 
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIter>)
+      __glibcpp_function_requires(_Mutable_RandomAccessIteratorConcept<
+	    _RandomAccessIter>)
+
+      return __random_sample(__first, __last,
+			     __out_first, __rand,
+			     __out_last - __out_first);
+    }
+  
+  // is_heap, a predicate testing whether or not a range is
+  // a heap.  This function is an extension, not part of the C++
+  // standard.
+
+  template
+    bool
+    __is_heap(_RandomAccessIter __first, _Distance __n)
+    {
+      _Distance __parent = 0;
+      for (_Distance __child = 1; __child < __n; ++__child) {
+	if (__first[__parent] < __first[__child]) 
+	  return false;
+	if ((__child & 1) == 0)
+	  ++__parent;
+      }
+      return true;
+    }
+
+  template
+    bool
+    __is_heap(_RandomAccessIter __first, _StrictWeakOrdering __comp,
+	      _Distance __n)
+    {
+      _Distance __parent = 0;
+      for (_Distance __child = 1; __child < __n; ++__child) {
+	if (__comp(__first[__parent], __first[__child]))
+	  return false;
+	if ((__child & 1) == 0)
+	  ++__parent;
+      }
+      return true;
+    }
+
+  template
+    inline bool
+    is_heap(_RandomAccessIter __first, _RandomAccessIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_RandomAccessIter>::value_type>)
+
+      return __is_heap(__first, __last - __first);
+    }
+
+  template
+    inline bool
+    is_heap(_RandomAccessIter __first, _RandomAccessIter __last,
+	    _StrictWeakOrdering __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
+	    typename iterator_traits<_RandomAccessIter>::value_type, 
+	    typename iterator_traits<_RandomAccessIter>::value_type>)
+
+      return __is_heap(__first, __comp, __last - __first);
+    }
+
+  // is_sorted, a predicated testing whether a range is sorted in
+  // nondescending order.  This is an extension, not part of the C++
+  // standard.
+
+  template
+    bool
+    is_sorted(_ForwardIter __first, _ForwardIter __last)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_LessThanComparableConcept<
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last)
+	return true;
+
+      _ForwardIter __next = __first;
+      for (++__next; __next != __last; __first = __next, ++__next) {
+	if (*__next < *__first)
+	  return false;
+      }
+
+      return true;
+    }
+
+  template
+    bool
+    is_sorted(_ForwardIter __first, _ForwardIter __last, _StrictWeakOrdering __comp)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_BinaryPredicateConcept<_StrictWeakOrdering,
+	    typename iterator_traits<_ForwardIter>::value_type, 
+	    typename iterator_traits<_ForwardIter>::value_type>)
+
+      if (__first == __last)
+	return true;
+
+      _ForwardIter __next = __first;
+      for (++__next; __next != __last; __first = __next, ++__next) {
+	if (__comp(*__next, *__first))
+	  return false;
+      }
+
+      return true;
+    }
+
+} // namespace __gnu_cxx
+
+#endif /* _EXT_ALGORITHM */
diff --git a/contrib/libstdc++/include/ext/enc_filebuf.h b/contrib/libstdc++/include/ext/enc_filebuf.h
new file mode 100644
index 0000000..e1152bd
--- /dev/null
+++ b/contrib/libstdc++/include/ext/enc_filebuf.h
@@ -0,0 +1,61 @@
+// __enc_traits layer for filebuf -*- C++ -*-
+
+// 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 
+#include 
+
+namespace __gnu_cxx
+{
+  // Custom traits type with __enc_traits for state type, all other bits
+  // equivalent to the required char_traits instantiations.
+  template
+    struct enc_char_traits: public std::char_traits<_CharT>
+    {
+      typedef std::__enc_traits	state_type;
+    };
+
+  template
+    class enc_filebuf
+    : public std::basic_filebuf<_CharT, enc_char_traits<_CharT> >
+    {
+    public:
+      typedef typename enc_char_traits<_CharT>::state_type state_type;
+      
+      enc_filebuf(state_type& __state)
+      : std::basic_filebuf<_CharT, enc_char_traits<_CharT> >()
+      { 
+	// Set state type to something useful.
+	// Something more than copyconstructible is needed here, so
+	// require copyconstructible + assignment operator.
+	__glibcpp_class_requires(state_type, _SGIAssignableConcept);
+	_M_state_cur = __state;
+	_M_state_cur._M_init();
+      };
+    };
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/include/ext/functional b/contrib/libstdc++/include/ext/functional
new file mode 100644
index 0000000..c482aa1
--- /dev/null
+++ b/contrib/libstdc++/include/ext/functional
@@ -0,0 +1,395 @@
+// Functional extensions -*- C++ -*-
+
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/functional
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _EXT_FUNCTIONAL
+#define _EXT_FUNCTIONAL
+
+#pragma GCC system_header
+#include 
+
+namespace __gnu_cxx
+{
+using std::unary_function;
+using std::binary_function;
+using std::mem_fun1_t;
+using std::const_mem_fun1_t;
+using std::mem_fun1_ref_t;
+using std::const_mem_fun1_ref_t;
+
+/** The @c identity_element functions are not part of the C++ standard; SGI
+ *  provided them as an extension.  Its argument is an operation, and its
+ *  return value is the identity element for that operation.  It is overloaded
+ *  for addition and multiplication, and you can overload it for your own
+ *  nefarious operations.
+ *
+ *  @addtogroup SGIextensions
+ *  @{
+*/
+/// An \link SGIextensions SGI extension \endlink.
+template  inline _Tp identity_element(std::plus<_Tp>) {
+  return _Tp(0);
+}
+/// An \link SGIextensions SGI extension \endlink.
+template  inline _Tp identity_element(std::multiplies<_Tp>) {
+  return _Tp(1);
+}
+/** @}  */
+
+/** As an extension to the binders, SGI provided composition functors and
+ *  wrapper functions to aid in their creation.  The @c unary_compose
+ *  functor is constructed from two functions/functors, @c f and @c g.
+ *  Calling @c operator() with a single argument @c x returns @c f(g(x)).
+ *  The function @c compose1 takes the two functions and constructs a
+ *  @c unary_compose variable for you.
+ *  
+ *  @c binary_compose is constructed from three functors, @c f, @c g1,
+ *  and @c g2.  Its @c operator() returns @c f(g1(x),g2(x)).  The function
+ *  @compose2 takes f, g1, and g2, and constructs the @c binary_compose
+ *  instance for you.  For example, if @c f returns an int, then
+ *  \code
+ *  int answer = (compose2(f,g1,g2))(x);
+ *  \endcode
+ *  is equivalent to
+ *  \code
+ *  int temp1 = g1(x);
+ *  int temp2 = g2(x);
+ *  int answer = f(temp1,temp2);
+ *  \endcode
+ *  But the first form is more compact, and can be passed around as a
+ *  functor to other algorithms.
+ *
+ *  @addtogroup SGIextensions
+ *  @{
+*/
+/// An \link SGIextensions SGI extension \endlink.
+template 
+class unary_compose
+  : public unary_function 
+{
+protected:
+  _Operation1 _M_fn1;
+  _Operation2 _M_fn2;
+public:
+  unary_compose(const _Operation1& __x, const _Operation2& __y) 
+    : _M_fn1(__x), _M_fn2(__y) {}
+  typename _Operation1::result_type
+  operator()(const typename _Operation2::argument_type& __x) const {
+    return _M_fn1(_M_fn2(__x));
+  }
+};
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+inline unary_compose<_Operation1,_Operation2> 
+compose1(const _Operation1& __fn1, const _Operation2& __fn2)
+{
+  return unary_compose<_Operation1,_Operation2>(__fn1, __fn2);
+}
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+class binary_compose
+  : public unary_function {
+protected:
+  _Operation1 _M_fn1;
+  _Operation2 _M_fn2;
+  _Operation3 _M_fn3;
+public:
+  binary_compose(const _Operation1& __x, const _Operation2& __y, 
+                 const _Operation3& __z) 
+    : _M_fn1(__x), _M_fn2(__y), _M_fn3(__z) { }
+  typename _Operation1::result_type
+  operator()(const typename _Operation2::argument_type& __x) const {
+    return _M_fn1(_M_fn2(__x), _M_fn3(__x));
+  }
+};
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+inline binary_compose<_Operation1, _Operation2, _Operation3> 
+compose2(const _Operation1& __fn1, const _Operation2& __fn2, 
+         const _Operation3& __fn3)
+{
+  return binary_compose<_Operation1,_Operation2,_Operation3>
+    (__fn1, __fn2, __fn3);
+}
+/** @}  */
+
+/** As an extension, SGI provided a functor called @c identity.  When a
+ *  functor is required but no operations are desired, this can be used as a
+ *  pass-through.  Its @c operator() returns its argument unchanged.
+ *
+ *  @addtogroup SGIextensions
+*/
+template  struct identity : public std::_Identity<_Tp> {};
+
+/** @c select1st and @c select2nd are extensions provided by SGI.  Their
+ *  @c operator()s
+ *  take a @c std::pair as an argument, and return either the first member
+ *  or the second member, respectively.  They can be used (especially with
+ *  the composition functors) to "strip" data from a sequence before
+ *  performing the remainder of an algorithm.
+ *
+ *  @addtogroup SGIextensions
+ *  @{
+*/
+/// An \link SGIextensions SGI extension \endlink.
+template  struct select1st : public std::_Select1st<_Pair> {};
+/// An \link SGIextensions SGI extension \endlink.
+template  struct select2nd : public std::_Select2nd<_Pair> {};
+/** @}  */
+
+// extension documented next
+template 
+struct _Project1st : public binary_function<_Arg1, _Arg2, _Arg1> {
+  _Arg1 operator()(const _Arg1& __x, const _Arg2&) const { return __x; }
+};
+
+template 
+struct _Project2nd : public binary_function<_Arg1, _Arg2, _Arg2> {
+  _Arg2 operator()(const _Arg1&, const _Arg2& __y) const { return __y; }
+};
+
+/** The @c operator() of the @c project1st functor takes two arbitrary
+ *  arguments and returns the first one, while @c project2nd returns the
+ *  second one.  They are extensions provided by SGI.
+ *
+ *  @addtogroup SGIextensions
+ *  @{
+*/
+
+/// An \link SGIextensions SGI extension \endlink.
+template  
+struct project1st : public _Project1st<_Arg1, _Arg2> {};
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+struct project2nd : public _Project2nd<_Arg1, _Arg2> {};
+/** @}  */
+
+// extension documented next
+template 
+struct _Constant_void_fun {
+  typedef _Result result_type;
+  result_type _M_val;
+
+  _Constant_void_fun(const result_type& __v) : _M_val(__v) {}
+  const result_type& operator()() const { return _M_val; }
+};  
+
+template 
+struct _Constant_unary_fun {
+  typedef _Argument argument_type;
+  typedef  _Result  result_type;
+  result_type _M_val;
+
+  _Constant_unary_fun(const result_type& __v) : _M_val(__v) {}
+  const result_type& operator()(const _Argument&) const { return _M_val; }
+};
+
+template 
+struct _Constant_binary_fun {
+  typedef  _Arg1   first_argument_type;
+  typedef  _Arg2   second_argument_type;
+  typedef  _Result result_type;
+  _Result _M_val;
+
+  _Constant_binary_fun(const _Result& __v) : _M_val(__v) {}
+  const result_type& operator()(const _Arg1&, const _Arg2&) const {
+    return _M_val;
+  }
+};
+
+/** These three functors are each constructed from a single arbitrary
+ *  variable/value.  Later, their @c operator()s completely ignore any
+ *  arguments passed, and return the stored value.
+ *  - @c constant_void_fun's @c operator() takes no arguments
+ *  - @c constant_unary_fun's @c operator() takes one argument (ignored)
+ *  - @c constant_binary_fun's @c operator() takes two arguments (ignored)
+ *
+ *  The helper creator functions @c constant0, @c constant1, and
+ *  @c constant2 each take a "result" argument and construct variables of
+ *  the appropriate functor type.
+ *
+ *  @addtogroup SGIextensions
+ *  @{
+*/
+/// An \link SGIextensions SGI extension \endlink.
+template 
+struct constant_void_fun : public _Constant_void_fun<_Result> {
+  constant_void_fun(const _Result& __v) : _Constant_void_fun<_Result>(__v) {}
+};  
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+struct constant_unary_fun : public _Constant_unary_fun<_Result, _Argument>
+{
+  constant_unary_fun(const _Result& __v)
+    : _Constant_unary_fun<_Result, _Argument>(__v) {}
+};
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+struct constant_binary_fun
+  : public _Constant_binary_fun<_Result, _Arg1, _Arg2>
+{
+  constant_binary_fun(const _Result& __v)
+    : _Constant_binary_fun<_Result, _Arg1, _Arg2>(__v) {}
+};
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+inline constant_void_fun<_Result> constant0(const _Result& __val)
+{
+  return constant_void_fun<_Result>(__val);
+}
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+inline constant_unary_fun<_Result,_Result> constant1(const _Result& __val)
+{
+  return constant_unary_fun<_Result,_Result>(__val);
+}
+
+/// An \link SGIextensions SGI extension \endlink.
+template 
+inline constant_binary_fun<_Result,_Result,_Result> 
+constant2(const _Result& __val)
+{
+  return constant_binary_fun<_Result,_Result,_Result>(__val);
+}
+/** @}  */
+
+/** The @c subtractive_rng class is documented on
+ *  SGI's site.
+ *  Note that this code assumes that @c int is 32 bits.
+ *
+ *  @ingroup SGIextensions
+*/
+class subtractive_rng : public unary_function {
+private:
+  unsigned int _M_table[55];
+  size_t _M_index1;
+  size_t _M_index2;
+public:
+  /// Returns a number less than the argument.
+  unsigned int operator()(unsigned int __limit) {
+    _M_index1 = (_M_index1 + 1) % 55;
+    _M_index2 = (_M_index2 + 1) % 55;
+    _M_table[_M_index1] = _M_table[_M_index1] - _M_table[_M_index2];
+    return _M_table[_M_index1] % __limit;
+  }
+
+  void _M_initialize(unsigned int __seed)
+  {
+    unsigned int __k = 1;
+    _M_table[54] = __seed;
+    size_t __i;
+    for (__i = 0; __i < 54; __i++) {
+        size_t __ii = (21 * (__i + 1) % 55) - 1;
+        _M_table[__ii] = __k;
+        __k = __seed - __k;
+        __seed = _M_table[__ii];
+    }
+    for (int __loop = 0; __loop < 4; __loop++) {
+        for (__i = 0; __i < 55; __i++)
+            _M_table[__i] = _M_table[__i] - _M_table[(1 + __i + 30) % 55];
+    }
+    _M_index1 = 0;
+    _M_index2 = 31;
+  }
+
+  /// Ctor allowing you to initialize the seed.
+  subtractive_rng(unsigned int __seed) { _M_initialize(__seed); }
+  /// Default ctor; initializes its state with some number you don't see.
+  subtractive_rng() { _M_initialize(161803398u); }
+};
+
+// Mem_fun adaptor helper functions mem_fun1 and mem_fun1_ref, 
+// provided for backward compatibility, they are no longer part of
+// the C++ standard.
+
+template 
+inline mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg))
+  { return mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
+
+template 
+inline const_mem_fun1_t<_Ret,_Tp,_Arg> mem_fun1(_Ret (_Tp::*__f)(_Arg) const)
+  { return const_mem_fun1_t<_Ret,_Tp,_Arg>(__f); }
+
+template 
+inline mem_fun1_ref_t<_Ret,_Tp,_Arg> mem_fun1_ref(_Ret (_Tp::*__f)(_Arg))
+  { return mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
+
+template 
+inline const_mem_fun1_ref_t<_Ret,_Tp,_Arg>
+mem_fun1_ref(_Ret (_Tp::*__f)(_Arg) const)
+  { return const_mem_fun1_ref_t<_Ret,_Tp,_Arg>(__f); }
+
+} // namespace __gnu_cxx
+
+#endif /* _EXT_FUNCTIONAL */
+
diff --git a/contrib/libstdc++/include/ext/hash_map b/contrib/libstdc++/include/ext/hash_map
new file mode 100644
index 0000000..08ed87b
--- /dev/null
+++ b/contrib/libstdc++/include/ext/hash_map
@@ -0,0 +1,445 @@
+// Hashing map implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/hash_map
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef __SGI_STL_INTERNAL_HASH_MAP_H
+#define __SGI_STL_INTERNAL_HASH_MAP_H
+
+#include 
+#include 
+
+namespace __gnu_cxx
+{
+using std::equal_to;
+using std::allocator;
+using std::pair;
+using std::_Select1st;
+
+// Forward declaration of equality operator; needed for friend declaration.
+
+template ,
+          class _EqualKey = equal_to<_Key>,
+          class _Alloc =  allocator<_Tp> >
+class hash_map;
+
+template 
+inline bool operator==(const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&,
+                       const hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc>&);
+
+template 
+class hash_map
+{
+private:
+  typedef hashtable,_Key,_HashFcn,
+                    _Select1st >,_EqualKey,_Alloc> _Ht;
+  _Ht _M_ht;
+
+public:
+  typedef typename _Ht::key_type key_type;
+  typedef _Tp data_type;
+  typedef _Tp mapped_type;
+  typedef typename _Ht::value_type value_type;
+  typedef typename _Ht::hasher hasher;
+  typedef typename _Ht::key_equal key_equal;
+  
+  typedef typename _Ht::size_type size_type;
+  typedef typename _Ht::difference_type difference_type;
+  typedef typename _Ht::pointer pointer;
+  typedef typename _Ht::const_pointer const_pointer;
+  typedef typename _Ht::reference reference;
+  typedef typename _Ht::const_reference const_reference;
+
+  typedef typename _Ht::iterator iterator;
+  typedef typename _Ht::const_iterator const_iterator;
+
+  typedef typename _Ht::allocator_type allocator_type;
+
+  hasher hash_funct() const { return _M_ht.hash_funct(); }
+  key_equal key_eq() const { return _M_ht.key_eq(); }
+  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+public:
+  hash_map() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+  explicit hash_map(size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+  hash_map(size_type __n, const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+  hash_map(size_type __n, const hasher& __hf, const key_equal& __eql,
+           const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a) {}
+
+  template 
+  hash_map(_InputIterator __f, _InputIterator __l)
+    : _M_ht(100, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_unique(__f, __l); }
+  template 
+  hash_map(_InputIterator __f, _InputIterator __l, size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_unique(__f, __l); }
+  template 
+  hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+           const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type())
+    { _M_ht.insert_unique(__f, __l); }
+  template 
+  hash_map(_InputIterator __f, _InputIterator __l, size_type __n,
+           const hasher& __hf, const key_equal& __eql,
+           const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a)
+    { _M_ht.insert_unique(__f, __l); }
+
+public:
+  size_type size() const { return _M_ht.size(); }
+  size_type max_size() const { return _M_ht.max_size(); }
+  bool empty() const { return _M_ht.empty(); }
+  void swap(hash_map& __hs) { _M_ht.swap(__hs._M_ht); }
+
+  template 
+  friend bool operator== (const hash_map<_K1, _T1, _HF, _EqK, _Al>&,
+                          const hash_map<_K1, _T1, _HF, _EqK, _Al>&);
+
+  iterator begin() { return _M_ht.begin(); }
+  iterator end() { return _M_ht.end(); }
+  const_iterator begin() const { return _M_ht.begin(); }
+  const_iterator end() const { return _M_ht.end(); }
+
+public:
+  pair insert(const value_type& __obj)
+    { return _M_ht.insert_unique(__obj); }
+  template 
+  void insert(_InputIterator __f, _InputIterator __l)
+    { _M_ht.insert_unique(__f,__l); }
+  pair insert_noresize(const value_type& __obj)
+    { return _M_ht.insert_unique_noresize(__obj); }    
+
+  iterator find(const key_type& __key) { return _M_ht.find(__key); }
+  const_iterator find(const key_type& __key) const 
+    { return _M_ht.find(__key); }
+
+  _Tp& operator[](const key_type& __key) {
+    return _M_ht.find_or_insert(value_type(__key, _Tp())).second;
+  }
+
+  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
+  
+  pair equal_range(const key_type& __key)
+    { return _M_ht.equal_range(__key); }
+  pair
+  equal_range(const key_type& __key) const
+    { return _M_ht.equal_range(__key); }
+
+  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+  void erase(iterator __it) { _M_ht.erase(__it); }
+  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+  void clear() { _M_ht.clear(); }
+
+  void resize(size_type __hint) { _M_ht.resize(__hint); }
+  size_type bucket_count() const { return _M_ht.bucket_count(); }
+  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+  size_type elems_in_bucket(size_type __n) const
+    { return _M_ht.elems_in_bucket(__n); }
+};
+
+template 
+inline bool 
+operator==(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
+           const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2)
+{
+  return __hm1._M_ht == __hm2._M_ht;
+}
+
+template 
+inline bool 
+operator!=(const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
+           const hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2) {
+  return !(__hm1 == __hm2);
+}
+
+template 
+inline void 
+swap(hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
+     hash_map<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2)
+{
+  __hm1.swap(__hm2);
+}
+
+// Forward declaration of equality operator; needed for friend declaration.
+
+template ,
+          class _EqualKey = equal_to<_Key>,
+          class _Alloc =  allocator<_Tp> >
+class hash_multimap;
+
+template 
+inline bool 
+operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
+           const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2);
+
+template 
+class hash_multimap
+{
+  // concept requirements
+  __glibcpp_class_requires(_Key, _SGIAssignableConcept)
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+  __glibcpp_class_requires3(_HashFcn, size_t, _Key, _UnaryFunctionConcept);
+  __glibcpp_class_requires3(_EqualKey, _Key, _Key, _BinaryPredicateConcept);
+
+private:
+  typedef hashtable, _Key, _HashFcn,
+                    _Select1st >, _EqualKey, _Alloc> 
+          _Ht;
+  _Ht _M_ht;
+
+public:
+  typedef typename _Ht::key_type key_type;
+  typedef _Tp data_type;
+  typedef _Tp mapped_type;
+  typedef typename _Ht::value_type value_type;
+  typedef typename _Ht::hasher hasher;
+  typedef typename _Ht::key_equal key_equal;
+
+  typedef typename _Ht::size_type size_type;
+  typedef typename _Ht::difference_type difference_type;
+  typedef typename _Ht::pointer pointer;
+  typedef typename _Ht::const_pointer const_pointer;
+  typedef typename _Ht::reference reference;
+  typedef typename _Ht::const_reference const_reference;
+
+  typedef typename _Ht::iterator iterator;
+  typedef typename _Ht::const_iterator const_iterator;
+
+  typedef typename _Ht::allocator_type allocator_type;
+
+  hasher hash_funct() const { return _M_ht.hash_funct(); }
+  key_equal key_eq() const { return _M_ht.key_eq(); }
+  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+public:
+  hash_multimap() : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+  explicit hash_multimap(size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+  hash_multimap(size_type __n, const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+  hash_multimap(size_type __n, const hasher& __hf, const key_equal& __eql,
+                const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a) {}
+
+  template 
+  hash_multimap(_InputIterator __f, _InputIterator __l)
+    : _M_ht(100, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_equal(__f, __l); }
+  template 
+  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_equal(__f, __l); }
+  template 
+  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+                const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type())
+    { _M_ht.insert_equal(__f, __l); }
+  template 
+  hash_multimap(_InputIterator __f, _InputIterator __l, size_type __n,
+                const hasher& __hf, const key_equal& __eql,
+                const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a)
+    { _M_ht.insert_equal(__f, __l); }
+
+public:
+  size_type size() const { return _M_ht.size(); }
+  size_type max_size() const { return _M_ht.max_size(); }
+  bool empty() const { return _M_ht.empty(); }
+  void swap(hash_multimap& __hs) { _M_ht.swap(__hs._M_ht); }
+
+  template 
+  friend bool operator== (const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&,
+                          const hash_multimap<_K1, _T1, _HF, _EqK, _Al>&);
+
+  iterator begin() { return _M_ht.begin(); }
+  iterator end() { return _M_ht.end(); }
+  const_iterator begin() const { return _M_ht.begin(); }
+  const_iterator end() const { return _M_ht.end(); }
+
+public:
+  iterator insert(const value_type& __obj) 
+    { return _M_ht.insert_equal(__obj); }
+  template 
+  void insert(_InputIterator __f, _InputIterator __l) 
+    { _M_ht.insert_equal(__f,__l); }
+  iterator insert_noresize(const value_type& __obj)
+    { return _M_ht.insert_equal_noresize(__obj); }    
+
+  iterator find(const key_type& __key) { return _M_ht.find(__key); }
+  const_iterator find(const key_type& __key) const 
+    { return _M_ht.find(__key); }
+
+  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
+  
+  pair equal_range(const key_type& __key)
+    { return _M_ht.equal_range(__key); }
+  pair
+  equal_range(const key_type& __key) const
+    { return _M_ht.equal_range(__key); }
+
+  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+  void erase(iterator __it) { _M_ht.erase(__it); }
+  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+  void clear() { _M_ht.clear(); }
+
+public:
+  void resize(size_type __hint) { _M_ht.resize(__hint); }
+  size_type bucket_count() const { return _M_ht.bucket_count(); }
+  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+  size_type elems_in_bucket(size_type __n) const
+    { return _M_ht.elems_in_bucket(__n); }
+};
+
+template 
+inline bool 
+operator==(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
+           const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2)
+{
+  return __hm1._M_ht == __hm2._M_ht;
+}
+
+template 
+inline bool 
+operator!=(const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm1,
+           const hash_multimap<_Key,_Tp,_HF,_EqKey,_Alloc>& __hm2) {
+  return !(__hm1 == __hm2);
+}
+
+template 
+inline void 
+swap(hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm1,
+     hash_multimap<_Key,_Tp,_HashFcn,_EqlKey,_Alloc>& __hm2)
+{
+  __hm1.swap(__hm2);
+}
+
+} // namespace __gnu_cxx
+
+namespace std
+{
+// Specialization of insert_iterator so that it will work for hash_map
+// and hash_multimap.
+
+template 
+class insert_iterator<__gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
+protected:
+  typedef __gnu_cxx::hash_map<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
+  _Container* container;
+public:
+  typedef _Container          container_type;
+  typedef output_iterator_tag iterator_category;
+  typedef void                value_type;
+  typedef void                difference_type;
+  typedef void                pointer;
+  typedef void                reference;
+
+  insert_iterator(_Container& __x) : container(&__x) {}
+  insert_iterator(_Container& __x, typename _Container::iterator)
+    : container(&__x) {}
+  insert_iterator<_Container>&
+  operator=(const typename _Container::value_type& __value) { 
+    container->insert(__value);
+    return *this;
+  }
+  insert_iterator<_Container>& operator*() { return *this; }
+  insert_iterator<_Container>& operator++() { return *this; }
+  insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+template 
+class insert_iterator<__gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> > {
+protected:
+  typedef __gnu_cxx::hash_multimap<_Key, _Tp, _HashFn, _EqKey, _Alloc> _Container;
+  _Container* container;
+  typename _Container::iterator iter;
+public:
+  typedef _Container          container_type;
+  typedef output_iterator_tag iterator_category;
+  typedef void                value_type;
+  typedef void                difference_type;
+  typedef void                pointer;
+  typedef void                reference;
+
+  insert_iterator(_Container& __x) : container(&__x) {}
+  insert_iterator(_Container& __x, typename _Container::iterator)
+    : container(&__x) {}
+  insert_iterator<_Container>&
+  operator=(const typename _Container::value_type& __value) { 
+    container->insert(__value);
+    return *this;
+  }
+  insert_iterator<_Container>& operator*() { return *this; }
+  insert_iterator<_Container>& operator++() { return *this; }
+  insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+} // namespace std
+
+#endif /* __SGI_STL_INTERNAL_HASH_MAP_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/hash_set b/contrib/libstdc++/include/ext/hash_set
new file mode 100644
index 0000000..eaeed7c
--- /dev/null
+++ b/contrib/libstdc++/include/ext/hash_set
@@ -0,0 +1,435 @@
+// Hashing set implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/hash_set
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef __SGI_STL_INTERNAL_HASH_SET_H
+#define __SGI_STL_INTERNAL_HASH_SET_H
+
+#include 
+#include 
+
+namespace __gnu_cxx
+{
+using std::equal_to;
+using std::allocator;
+using std::pair;
+using std::_Identity;
+
+// Forward declaration of equality operator; needed for friend declaration.
+
+template ,
+          class _EqualKey = equal_to<_Value>,
+          class _Alloc =  allocator<_Value> >
+class hash_set;
+
+template 
+inline bool 
+operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
+           const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2);
+
+template 
+class hash_set
+{
+  // concept requirements
+  __glibcpp_class_requires(_Value, _SGIAssignableConcept)
+  __glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept);
+  __glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept);
+
+private:
+  typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, 
+                    _EqualKey, _Alloc> _Ht;
+  _Ht _M_ht;
+
+public:
+  typedef typename _Ht::key_type key_type;
+  typedef typename _Ht::value_type value_type;
+  typedef typename _Ht::hasher hasher;
+  typedef typename _Ht::key_equal key_equal;
+
+  typedef typename _Ht::size_type size_type;
+  typedef typename _Ht::difference_type difference_type;
+  typedef typename _Ht::const_pointer pointer;
+  typedef typename _Ht::const_pointer const_pointer;
+  typedef typename _Ht::const_reference reference;
+  typedef typename _Ht::const_reference const_reference;
+
+  typedef typename _Ht::const_iterator iterator;
+  typedef typename _Ht::const_iterator const_iterator;
+
+  typedef typename _Ht::allocator_type allocator_type;
+
+  hasher hash_funct() const { return _M_ht.hash_funct(); }
+  key_equal key_eq() const { return _M_ht.key_eq(); }
+  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+public:
+  hash_set()
+    : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+  explicit hash_set(size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+  hash_set(size_type __n, const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+  hash_set(size_type __n, const hasher& __hf, const key_equal& __eql,
+           const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a) {}
+
+  template 
+  hash_set(_InputIterator __f, _InputIterator __l)
+    : _M_ht(100, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_unique(__f, __l); }
+  template 
+  hash_set(_InputIterator __f, _InputIterator __l, size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_unique(__f, __l); }
+  template 
+  hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+           const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type())
+    { _M_ht.insert_unique(__f, __l); }
+  template 
+  hash_set(_InputIterator __f, _InputIterator __l, size_type __n,
+           const hasher& __hf, const key_equal& __eql,
+           const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a)
+    { _M_ht.insert_unique(__f, __l); }
+
+public:
+  size_type size() const { return _M_ht.size(); }
+  size_type max_size() const { return _M_ht.max_size(); }
+  bool empty() const { return _M_ht.empty(); }
+  void swap(hash_set& __hs) { _M_ht.swap(__hs._M_ht); }
+
+  template   
+  friend bool operator== (const hash_set<_Val, _HF, _EqK, _Al>&,
+                          const hash_set<_Val, _HF, _EqK, _Al>&);
+
+  iterator begin() const { return _M_ht.begin(); }
+  iterator end() const { return _M_ht.end(); }
+
+public:
+  pair insert(const value_type& __obj)
+    {
+      pair __p = _M_ht.insert_unique(__obj);
+      return pair(__p.first, __p.second);
+    }
+  template 
+  void insert(_InputIterator __f, _InputIterator __l) 
+    { _M_ht.insert_unique(__f,__l); }
+  pair insert_noresize(const value_type& __obj)
+  {
+    pair __p = 
+      _M_ht.insert_unique_noresize(__obj);
+    return pair(__p.first, __p.second);
+  }
+
+  iterator find(const key_type& __key) const { return _M_ht.find(__key); }
+
+  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
+  
+  pair equal_range(const key_type& __key) const
+    { return _M_ht.equal_range(__key); }
+
+  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+  void erase(iterator __it) { _M_ht.erase(__it); }
+  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+  void clear() { _M_ht.clear(); }
+
+public:
+  void resize(size_type __hint) { _M_ht.resize(__hint); }
+  size_type bucket_count() const { return _M_ht.bucket_count(); }
+  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+  size_type elems_in_bucket(size_type __n) const
+    { return _M_ht.elems_in_bucket(__n); }
+};
+
+template 
+inline bool 
+operator==(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
+           const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2)
+{
+  return __hs1._M_ht == __hs2._M_ht;
+}
+
+template 
+inline bool 
+operator!=(const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs1,
+           const hash_set<_Value,_HashFcn,_EqualKey,_Alloc>& __hs2) {
+  return !(__hs1 == __hs2);
+}
+
+template 
+inline void 
+swap(hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
+     hash_set<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2)
+{
+  __hs1.swap(__hs2);
+}
+
+
+template ,
+          class _EqualKey = equal_to<_Value>,
+          class _Alloc =  allocator<_Value> >
+class hash_multiset;
+
+template 
+inline bool 
+operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
+           const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2);
+
+
+template 
+class hash_multiset
+{
+  // concept requirements
+  __glibcpp_class_requires(_Value, _SGIAssignableConcept)
+  __glibcpp_class_requires3(_HashFcn, size_t, _Value, _UnaryFunctionConcept);
+  __glibcpp_class_requires3(_EqualKey, _Value, _Value, _BinaryPredicateConcept);
+
+private:
+  typedef hashtable<_Value, _Value, _HashFcn, _Identity<_Value>, 
+                    _EqualKey, _Alloc> _Ht;
+  _Ht _M_ht;
+
+public:
+  typedef typename _Ht::key_type key_type;
+  typedef typename _Ht::value_type value_type;
+  typedef typename _Ht::hasher hasher;
+  typedef typename _Ht::key_equal key_equal;
+
+  typedef typename _Ht::size_type size_type;
+  typedef typename _Ht::difference_type difference_type;
+  typedef typename _Ht::const_pointer pointer;
+  typedef typename _Ht::const_pointer const_pointer;
+  typedef typename _Ht::const_reference reference;
+  typedef typename _Ht::const_reference const_reference;
+
+  typedef typename _Ht::const_iterator iterator;
+  typedef typename _Ht::const_iterator const_iterator;
+
+  typedef typename _Ht::allocator_type allocator_type;
+
+  hasher hash_funct() const { return _M_ht.hash_funct(); }
+  key_equal key_eq() const { return _M_ht.key_eq(); }
+  allocator_type get_allocator() const { return _M_ht.get_allocator(); }
+
+public:
+  hash_multiset()
+    : _M_ht(100, hasher(), key_equal(), allocator_type()) {}
+  explicit hash_multiset(size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type()) {}
+  hash_multiset(size_type __n, const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type()) {}
+  hash_multiset(size_type __n, const hasher& __hf, const key_equal& __eql,
+                const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a) {}
+
+  template 
+  hash_multiset(_InputIterator __f, _InputIterator __l)
+    : _M_ht(100, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_equal(__f, __l); }
+  template 
+  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n)
+    : _M_ht(__n, hasher(), key_equal(), allocator_type())
+    { _M_ht.insert_equal(__f, __l); }
+  template 
+  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+                const hasher& __hf)
+    : _M_ht(__n, __hf, key_equal(), allocator_type())
+    { _M_ht.insert_equal(__f, __l); }
+  template 
+  hash_multiset(_InputIterator __f, _InputIterator __l, size_type __n,
+                const hasher& __hf, const key_equal& __eql,
+                const allocator_type& __a = allocator_type())
+    : _M_ht(__n, __hf, __eql, __a)
+    { _M_ht.insert_equal(__f, __l); }
+
+public:
+  size_type size() const { return _M_ht.size(); }
+  size_type max_size() const { return _M_ht.max_size(); }
+  bool empty() const { return _M_ht.empty(); }
+  void swap(hash_multiset& hs) { _M_ht.swap(hs._M_ht); }
+
+  template   
+  friend bool operator== (const hash_multiset<_Val, _HF, _EqK, _Al>&,
+                          const hash_multiset<_Val, _HF, _EqK, _Al>&);
+
+  iterator begin() const { return _M_ht.begin(); }
+  iterator end() const { return _M_ht.end(); }
+
+public:
+  iterator insert(const value_type& __obj)
+    { return _M_ht.insert_equal(__obj); }
+  template 
+  void insert(_InputIterator __f, _InputIterator __l) 
+    { _M_ht.insert_equal(__f,__l); }
+  iterator insert_noresize(const value_type& __obj)
+    { return _M_ht.insert_equal_noresize(__obj); }    
+
+  iterator find(const key_type& __key) const { return _M_ht.find(__key); }
+
+  size_type count(const key_type& __key) const { return _M_ht.count(__key); }
+  
+  pair equal_range(const key_type& __key) const
+    { return _M_ht.equal_range(__key); }
+
+  size_type erase(const key_type& __key) {return _M_ht.erase(__key); }
+  void erase(iterator __it) { _M_ht.erase(__it); }
+  void erase(iterator __f, iterator __l) { _M_ht.erase(__f, __l); }
+  void clear() { _M_ht.clear(); }
+
+public:
+  void resize(size_type __hint) { _M_ht.resize(__hint); }
+  size_type bucket_count() const { return _M_ht.bucket_count(); }
+  size_type max_bucket_count() const { return _M_ht.max_bucket_count(); }
+  size_type elems_in_bucket(size_type __n) const
+    { return _M_ht.elems_in_bucket(__n); }
+};
+
+template 
+inline bool 
+operator==(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
+           const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2)
+{
+  return __hs1._M_ht == __hs2._M_ht;
+}
+
+template 
+inline bool 
+operator!=(const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
+           const hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) {
+  return !(__hs1 == __hs2);
+}
+
+template 
+inline void 
+swap(hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs1,
+     hash_multiset<_Val,_HashFcn,_EqualKey,_Alloc>& __hs2) {
+  __hs1.swap(__hs2);
+}
+
+} // namespace __gnu_cxx
+
+namespace std
+{
+// Specialization of insert_iterator so that it will work for hash_set
+// and hash_multiset.
+
+template 
+class insert_iterator<__gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> > {
+protected:
+  typedef __gnu_cxx::hash_set<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
+  _Container* container;
+public:
+  typedef _Container          container_type;
+  typedef output_iterator_tag iterator_category;
+  typedef void                value_type;
+  typedef void                difference_type;
+  typedef void                pointer;
+  typedef void                reference;
+
+  insert_iterator(_Container& __x) : container(&__x) {}
+  insert_iterator(_Container& __x, typename _Container::iterator)
+    : container(&__x) {}
+  insert_iterator<_Container>&
+  operator=(const typename _Container::value_type& __value) { 
+    container->insert(__value);
+    return *this;
+  }
+  insert_iterator<_Container>& operator*() { return *this; }
+  insert_iterator<_Container>& operator++() { return *this; }
+  insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+template 
+class insert_iterator<__gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> > {
+protected:
+  typedef __gnu_cxx::hash_multiset<_Value, _HashFcn, _EqualKey, _Alloc> _Container;
+  _Container* container;
+  typename _Container::iterator iter;
+public:
+  typedef _Container          container_type;
+  typedef output_iterator_tag iterator_category;
+  typedef void                value_type;
+  typedef void                difference_type;
+  typedef void                pointer;
+  typedef void                reference;
+
+  insert_iterator(_Container& __x) : container(&__x) {}
+  insert_iterator(_Container& __x, typename _Container::iterator)
+    : container(&__x) {}
+  insert_iterator<_Container>&
+  operator=(const typename _Container::value_type& __value) { 
+    container->insert(__value);
+    return *this;
+  }
+  insert_iterator<_Container>& operator*() { return *this; }
+  insert_iterator<_Container>& operator++() { return *this; }
+  insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+} // namespace std
+
+#endif /* __SGI_STL_INTERNAL_HASH_SET_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/iterator b/contrib/libstdc++/include/ext/iterator
new file mode 100644
index 0000000..3892eb6
--- /dev/null
+++ b/contrib/libstdc++/include/ext/iterator
@@ -0,0 +1,108 @@
+// HP/SGI iterator extensions -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/iterator
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _EXT_ITERATOR
+#define _EXT_ITERATOR
+
+#pragma GCC system_header
+#include 
+#include 
+
+namespace __gnu_cxx
+{
+
+  // There are two signatures for distance.  In addition to the one taking
+  // two iterators and returning a result, there is another taking two
+  // iterators and a reference-to-result variable, and returning nothing.
+  // The latter seems to be an SGI extension.   -- pedwards
+  template
+    inline void
+    __distance(_InputIterator __first, _InputIterator __last,
+	       _Distance& __n, std::input_iterator_tag)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_InputIteratorConcept<_InputIterator>)
+      while (__first != __last) { ++__first; ++__n; }
+    }
+
+  template
+    inline void
+    __distance(_RandomAccessIterator __first, _RandomAccessIterator __last, 
+	       _Distance& __n, std::random_access_iterator_tag)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_RandomAccessIteratorConcept<_RandomAccessIterator>)
+      __n += __last - __first;
+    }
+
+  template
+    inline void
+    distance(_InputIterator __first, _InputIterator __last,
+             _Distance& __n)
+    {
+      // concept requirements -- taken care of in __distance
+      __distance(__first, __last, __n, std::__iterator_category(__first));
+    }
+
+} // namespace __gnu_cxx
+
+#endif /* _EXT_ITERATOR */
+
diff --git a/contrib/libstdc++/include/ext/memory b/contrib/libstdc++/include/ext/memory
new file mode 100644
index 0000000..5626b70
--- /dev/null
+++ b/contrib/libstdc++/include/ext/memory
@@ -0,0 +1,170 @@
+// Memory extensions -*- C++ -*-
+
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/memory
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _EXT_MEMORY
+#define _EXT_MEMORY
+
+#pragma GCC system_header
+#include 
+#include 
+
+namespace __gnu_cxx
+{
+  using std::ptrdiff_t;
+  using std::pair;
+  using std::__iterator_category;
+  using std::_Temporary_buffer;
+  
+
+  template
+    pair<_InputIter, _ForwardIter>
+    __uninitialized_copy_n(_InputIter __first, _Size __count,
+			   _ForwardIter __result,
+			   std::input_iterator_tag)
+    {
+      _ForwardIter __cur = __result;
+      try {
+	for ( ; __count > 0 ; --__count, ++__first, ++__cur) 
+	  std::_Construct(&*__cur, *__first);
+	return pair<_InputIter, _ForwardIter>(__first, __cur);
+      }
+      catch(...)
+	{
+	  std::_Destroy(__result, __cur);
+	  __throw_exception_again; 
+	}
+    }
+
+  template
+    inline pair<_RandomAccessIter, _ForwardIter>
+    __uninitialized_copy_n(_RandomAccessIter __first, _Size __count,
+			   _ForwardIter __result,
+			   std::random_access_iterator_tag)
+    {
+      _RandomAccessIter __last = __first + __count;
+      return pair<_RandomAccessIter, _ForwardIter>(
+		     __last,
+		     std::uninitialized_copy(__first, __last, __result));
+    }
+
+  template
+    inline pair<_InputIter, _ForwardIter>
+    __uninitialized_copy_n(_InputIter __first, _Size __count,
+			 _ForwardIter __result) {
+      return __uninitialized_copy_n(__first, __count, __result,
+				    __iterator_category(__first));
+    }
+
+  /**
+   *  @brief Copies the range [first,last) into result.
+   *  @param  first  An input iterator.
+   *  @param  last   An input iterator.
+   *  @param  result An output iterator.
+   *  @return   result + (first - last)
+   *  @ingroup SGIextensions
+   *
+   *  Like copy(), but does not require an initialized output range.
+  */
+  template
+    inline pair<_InputIter, _ForwardIter>
+    uninitialized_copy_n(_InputIter __first, _Size __count,
+			 _ForwardIter __result) {
+      return __uninitialized_copy_n(__first, __count, __result,
+				    __iterator_category(__first));
+    }
+
+
+  /**
+   *  This class provides similar behavior and semantics of the standard
+   *  functions get_temporary_buffer() and return_temporary_buffer(), but
+   *  encapsulated in a type vaguely resembling a standard container.
+   *
+   *  By default, a temporary_buffer stores space for objects of
+   *  whatever type the Iter iterator points to.  It is constructed from a
+   *  typical [first,last) range, and provides the begin(), end(), size()
+   *  functions, as well as requested_size().  For non-trivial types, copies
+   *  of *first will be used to initialize the storage.
+   *
+   *  @c malloc is used to obtain underlying storage.
+   *
+   *  Like get_temporary_buffer(), not all the requested memory may be
+   *  available.  Ideally, the created buffer will be large enough to hold a
+   *  copy of [first,last), but if size() is less than requested_size(),
+   *  then this didn't happen.
+   *
+   *  @ingroup SGIextensions
+  */
+  template ::value_type >
+  struct temporary_buffer : public _Temporary_buffer<_ForwardIterator, _Tp>
+  {
+    /// Requests storage large enough to hold a copy of [first,last).
+    temporary_buffer(_ForwardIterator __first, _ForwardIterator __last)
+      : _Temporary_buffer<_ForwardIterator, _Tp>(__first, __last) {}
+    /// Destroys objects and frees storage.
+    ~temporary_buffer() {}
+  };
+
+} // namespace __gnu_cxx
+
+#endif /* _EXT_MEMORY */
+
diff --git a/contrib/libstdc++/include/ext/numeric b/contrib/libstdc++/include/ext/numeric
new file mode 100644
index 0000000..601cb82
--- /dev/null
+++ b/contrib/libstdc++/include/ext/numeric
@@ -0,0 +1,136 @@
+// Numeric extensions -*- C++ -*-
+
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/numeric
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _EXT_NUMERIC
+#define _EXT_NUMERIC
+
+#pragma GCC system_header
+#include 
+#include 
+
+#include  // For identity_element
+
+namespace __gnu_cxx
+{
+  // Returns __x ** __n, where __n >= 0.  _Note that "multiplication"
+  // is required to be associative, but not necessarily commutative.
+   
+  template
+    _Tp
+    __power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
+    {
+      if (__n == 0)
+	return identity_element(__monoid_op);
+      else {
+	while ((__n & 1) == 0) {
+	  __n >>= 1;
+	  __x = __monoid_op(__x, __x);
+	}
+
+	_Tp __result = __x;
+	__n >>= 1;
+	while (__n != 0) {
+	  __x = __monoid_op(__x, __x);
+	  if ((__n & 1) != 0)
+	    __result = __monoid_op(__result, __x);
+	  __n >>= 1;
+	}
+	return __result;
+      }
+    }
+
+  template
+    inline _Tp
+    __power(_Tp __x, _Integer __n)
+    { return __power(__x, __n, std::multiplies<_Tp>()); }
+
+  // Alias for the internal name __power.  Note that power is an extension,
+  // not part of the C++ standard.
+
+  template
+    inline _Tp
+    power(_Tp __x, _Integer __n, _MonoidOperation __monoid_op)
+    { return __power(__x, __n, __monoid_op); }
+
+  template
+    inline _Tp
+    power(_Tp __x, _Integer __n)
+    { return __power(__x, __n); }
+
+  // iota is not part of the C++ standard.  It is an extension.
+
+  template
+    void 
+    iota(_ForwardIter __first, _ForwardIter __last, _Tp __value)
+    {
+      // concept requirements
+      __glibcpp_function_requires(_Mutable_ForwardIteratorConcept<_ForwardIter>)
+      __glibcpp_function_requires(_ConvertibleConcept<_Tp,
+	    typename std::iterator_traits<_ForwardIter>::value_type>)
+
+      while (__first != __last)
+	*__first++ = __value++;
+    }
+
+} // namespace __gnu_cxx
+
+#endif /* _EXT_NUMERIC */
+
diff --git a/contrib/libstdc++/include/ext/rb_tree b/contrib/libstdc++/include/ext/rb_tree
new file mode 100644
index 0000000..f4b24b6
--- /dev/null
+++ b/contrib/libstdc++/include/ext/rb_tree
@@ -0,0 +1,92 @@
+// rb_tree extension -*- C++ -*-
+
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/rb_tree
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _EXT_RB_TREE
+#define _EXT_RB_TREE
+
+#pragma GCC system_header
+#include 
+
+namespace __gnu_cxx
+{
+using std::_Rb_tree;
+using std::allocator;
+
+// Class rb_tree is not part of the C++ standard.  It is provided for
+// compatibility with the HP STL.
+
+template  >
+struct rb_tree : public _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc>
+{
+  typedef _Rb_tree<_Key, _Value, _KeyOfValue, _Compare, _Alloc> _Base;
+  typedef typename _Base::allocator_type allocator_type;
+
+  rb_tree(const _Compare& __comp = _Compare(),
+          const allocator_type& __a = allocator_type())
+    : _Base(__comp, __a) {}
+  
+  ~rb_tree() {}
+};
+
+} // namespace __gnu_cxx
+
+#endif /* _EXT_RB_TREE */
diff --git a/contrib/libstdc++/include/ext/rope b/contrib/libstdc++/include/ext/rope
new file mode 100644
index 0000000..1441df1
--- /dev/null
+++ b/contrib/libstdc++/include/ext/rope
@@ -0,0 +1,66 @@
+// SGI's rope class -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/rope
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef __SGI_STL_ROPE
+#define __SGI_STL_ROPE
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* __SGI_STL_ROPE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/ropeimpl.h b/contrib/libstdc++/include/ext/ropeimpl.h
new file mode 100644
index 0000000..f3f09f5
--- /dev/null
+++ b/contrib/libstdc++/include/ext/ropeimpl.h
@@ -0,0 +1,1548 @@
+// SGI's rope class implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ropeimpl.h
+ *  This is an internal header file, included by other library headers.
+ *  You should not attempt to use it directly.
+ */
+
+#include      
+#include 
+#include 
+
+#include  // For copy_n and lexicographical_compare_3way
+#include  // For uninitialized_copy_n
+#include  // For power
+
+namespace __gnu_cxx
+{
+using std::size_t;
+using std::printf;
+using std::basic_ostream;  
+using std::__throw_length_error;
+using std::__alloc;
+using std::_Destroy;
+using std::uninitialized_fill_n;
+
+// Set buf_start, buf_end, and buf_ptr appropriately, filling tmp_buf
+// if necessary.  Assumes _M_path_end[leaf_index] and leaf_pos are correct.
+// Results in a valid buf_ptr if the iterator can be legitimately
+// dereferenced.
+template 
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setbuf( 
+  _Rope_iterator_base<_CharT,_Alloc>& __x)
+{
+    const _RopeRep* __leaf = __x._M_path_end[__x._M_leaf_index];
+    size_t __leaf_pos = __x._M_leaf_pos;
+    size_t __pos = __x._M_current_pos;
+
+    switch(__leaf->_M_tag) {
+	case _RopeRep::_S_leaf:
+	    __x._M_buf_start = 
+	      ((_Rope_RopeLeaf<_CharT,_Alloc>*)__leaf)->_M_data;
+	    __x._M_buf_ptr = __x._M_buf_start + (__pos - __leaf_pos);
+	    __x._M_buf_end = __x._M_buf_start + __leaf->_M_size;
+	    break;
+	case _RopeRep::_S_function:
+	case _RopeRep::_S_substringfn:
+	    {
+		size_t __len = _S_iterator_buf_len;
+		size_t __buf_start_pos = __leaf_pos;
+		size_t __leaf_end = __leaf_pos + __leaf->_M_size;
+		char_producer<_CharT>* __fn =
+			((_Rope_RopeFunction<_CharT,_Alloc>*)__leaf)->_M_fn;
+
+		if (__buf_start_pos + __len <= __pos) {
+		    __buf_start_pos = __pos - __len/4;
+		    if (__buf_start_pos + __len > __leaf_end) {
+			__buf_start_pos = __leaf_end - __len;
+		    }
+		}
+		if (__buf_start_pos + __len > __leaf_end) {
+		    __len = __leaf_end - __buf_start_pos;
+		}
+		(*__fn)(__buf_start_pos - __leaf_pos, __len, __x._M_tmp_buf);
+		__x._M_buf_ptr = __x._M_tmp_buf + (__pos - __buf_start_pos);
+		__x._M_buf_start = __x._M_tmp_buf;
+		__x._M_buf_end = __x._M_tmp_buf + __len;
+	    }
+	    break;
+	default:
+	  break;
+    }
+}
+
+// Set path and buffer inside a rope iterator.  We assume that 
+// pos and root are already set.
+template 
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache
+(_Rope_iterator_base<_CharT,_Alloc>& __x)
+{
+    const _RopeRep* __path[_RopeRep::_S_max_rope_depth+1];
+    const _RopeRep* __curr_rope;
+    int __curr_depth = -1;  /* index into path    */
+    size_t __curr_start_pos = 0;
+    size_t __pos = __x._M_current_pos;
+    unsigned char __dirns = 0; // Bit vector marking right turns in the path
+
+    if (__pos >= __x._M_root->_M_size) {
+	__x._M_buf_ptr = 0;
+	return;
+    }
+    __curr_rope = __x._M_root;
+    if (0 != __curr_rope->_M_c_string) {
+	/* Treat the root as a leaf. */
+	__x._M_buf_start = __curr_rope->_M_c_string;
+	__x._M_buf_end = __curr_rope->_M_c_string + __curr_rope->_M_size;
+	__x._M_buf_ptr = __curr_rope->_M_c_string + __pos;
+	__x._M_path_end[0] = __curr_rope;
+	__x._M_leaf_index = 0;
+	__x._M_leaf_pos = 0;
+	return;
+    }
+    for(;;) {
+	++__curr_depth;
+	__path[__curr_depth] = __curr_rope;
+	switch(__curr_rope->_M_tag) {
+	  case _RopeRep::_S_leaf:
+	  case _RopeRep::_S_function:
+	  case _RopeRep::_S_substringfn:
+	    __x._M_leaf_pos = __curr_start_pos;
+	    goto done;
+	  case _RopeRep::_S_concat:
+	    {
+		_Rope_RopeConcatenation<_CharT,_Alloc>* __c =
+			(_Rope_RopeConcatenation<_CharT,_Alloc>*)__curr_rope;
+		_RopeRep* __left = __c->_M_left;
+		size_t __left_len = __left->_M_size;
+		
+		__dirns <<= 1;
+		if (__pos >= __curr_start_pos + __left_len) {
+		    __dirns |= 1;
+		    __curr_rope = __c->_M_right;
+		    __curr_start_pos += __left_len;
+		} else {
+		    __curr_rope = __left;
+		}
+	    }
+	    break;
+	}
+    }
+  done:
+    // Copy last section of path into _M_path_end.
+      {
+	int __i = -1;
+	int __j = __curr_depth + 1 - _S_path_cache_len;
+
+	if (__j < 0) __j = 0;
+	while (__j <= __curr_depth) {
+	    __x._M_path_end[++__i] = __path[__j++];
+	}
+	__x._M_leaf_index = __i;
+      }
+      __x._M_path_directions = __dirns;
+      _S_setbuf(__x);
+}
+
+// Specialized version of the above.  Assumes that
+// the path cache is valid for the previous position.
+template 
+void _Rope_iterator_base<_CharT,_Alloc>::_S_setcache_for_incr
+(_Rope_iterator_base<_CharT,_Alloc>& __x)
+{
+    int __current_index = __x._M_leaf_index;
+    const _RopeRep* __current_node = __x._M_path_end[__current_index];
+    size_t __len = __current_node->_M_size;
+    size_t __node_start_pos = __x._M_leaf_pos;
+    unsigned char __dirns = __x._M_path_directions;
+    _Rope_RopeConcatenation<_CharT,_Alloc>* __c;
+
+    if (__x._M_current_pos - __node_start_pos < __len) {
+	/* More stuff in this leaf, we just didn't cache it. */
+	_S_setbuf(__x);
+	return;
+    }
+    //  node_start_pos is starting position of last_node.
+    while (--__current_index >= 0) {
+	if (!(__dirns & 1) /* Path turned left */) 
+	  break;
+	__current_node = __x._M_path_end[__current_index];
+	__c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node;
+	// Otherwise we were in the right child.  Thus we should pop
+	// the concatenation node.
+	__node_start_pos -= __c->_M_left->_M_size;
+	__dirns >>= 1;
+    }
+    if (__current_index < 0) {
+	// We underflowed the cache. Punt.
+	_S_setcache(__x);
+	return;
+    }
+    __current_node = __x._M_path_end[__current_index];
+    __c = (_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node;
+    // current_node is a concatenation node.  We are positioned on the first
+    // character in its right child.
+    // node_start_pos is starting position of current_node.
+    __node_start_pos += __c->_M_left->_M_size;
+    __current_node = __c->_M_right;
+    __x._M_path_end[++__current_index] = __current_node;
+    __dirns |= 1;
+    while (_RopeRep::_S_concat == __current_node->_M_tag) {
+	++__current_index;
+	if (_S_path_cache_len == __current_index) {
+	    int __i;
+	    for (__i = 0; __i < _S_path_cache_len-1; __i++) {
+		__x._M_path_end[__i] = __x._M_path_end[__i+1];
+	    }
+	    --__current_index;
+	}
+	__current_node =
+	    ((_Rope_RopeConcatenation<_CharT,_Alloc>*)__current_node)->_M_left;
+	__x._M_path_end[__current_index] = __current_node;
+	__dirns <<= 1;
+	// node_start_pos is unchanged.
+    }
+    __x._M_leaf_index = __current_index;
+    __x._M_leaf_pos = __node_start_pos;
+    __x._M_path_directions = __dirns;
+    _S_setbuf(__x);
+}
+
+template 
+void _Rope_iterator_base<_CharT,_Alloc>::_M_incr(size_t __n) {
+    _M_current_pos += __n;
+    if (0 != _M_buf_ptr) {
+        size_t __chars_left = _M_buf_end - _M_buf_ptr;
+        if (__chars_left > __n) {
+            _M_buf_ptr += __n;
+        } else if (__chars_left == __n) {
+            _M_buf_ptr += __n;
+            _S_setcache_for_incr(*this);
+        } else {
+            _M_buf_ptr = 0;
+        }
+    }
+}
+
+template 
+void _Rope_iterator_base<_CharT,_Alloc>::_M_decr(size_t __n) {
+    if (0 != _M_buf_ptr) {
+        size_t __chars_left = _M_buf_ptr - _M_buf_start;
+        if (__chars_left >= __n) {
+            _M_buf_ptr -= __n;
+        } else {
+            _M_buf_ptr = 0;
+        }
+    }
+    _M_current_pos -= __n;
+}
+
+template 
+void _Rope_iterator<_CharT,_Alloc>::_M_check() {
+    if (_M_root_rope->_M_tree_ptr != _M_root) {
+        // _Rope was modified.  Get things fixed up.
+        _RopeRep::_S_unref(_M_root);
+        _M_root = _M_root_rope->_M_tree_ptr;
+        _RopeRep::_S_ref(_M_root);
+        _M_buf_ptr = 0;
+    }
+}
+
+template 
+inline 
+_Rope_const_iterator<_CharT, _Alloc>::_Rope_const_iterator(
+  const _Rope_iterator<_CharT,_Alloc>& __x)
+: _Rope_iterator_base<_CharT,_Alloc>(__x) 
+{ }
+
+template 
+inline _Rope_iterator<_CharT,_Alloc>::_Rope_iterator(
+  rope<_CharT,_Alloc>& __r, size_t __pos)
+: _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos), 
+  _M_root_rope(&__r)
+{
+    _RopeRep::_S_ref(_M_root);
+}
+
+template 
+inline size_t 
+rope<_CharT,_Alloc>::_S_char_ptr_len(const _CharT* __s)
+{
+    const _CharT* __p = __s;
+
+    while (!_S_is0(*__p)) { ++__p; }
+    return (__p - __s);
+}
+
+
+#ifndef __GC
+
+template 
+inline void _Rope_RopeRep<_CharT,_Alloc>::_M_free_c_string()
+{
+    _CharT* __cstr = _M_c_string;
+    if (0 != __cstr) {
+	size_t __size = _M_size + 1;
+	_Destroy(__cstr, __cstr + __size);
+	_Data_deallocate(__cstr, __size);
+    }
+}
+
+
+template 
+  inline void _Rope_RopeRep<_CharT,_Alloc>::_S_free_string(_CharT* __s,
+							   size_t __n,
+						           allocator_type __a)
+{
+    if (!_S_is_basic_char_type((_CharT*)0)) {
+	_Destroy(__s, __s + __n);
+    }
+//  This has to be a static member, so this gets a bit messy
+        __a.deallocate(
+	    __s, _Rope_RopeLeaf<_CharT,_Alloc>::_S_rounded_up_size(__n));
+}
+
+
+//  There are several reasons for not doing this with virtual destructors
+//  and a class specific delete operator:
+//  - A class specific delete operator can't easily get access to
+//    allocator instances if we need them.
+//  - Any virtual function would need a 4 or byte vtable pointer;
+//    this only requires a one byte tag per object.
+template 
+void _Rope_RopeRep<_CharT,_Alloc>::_M_free_tree()
+{
+    switch(_M_tag) {
+	case _S_leaf:
+	    {
+	        _Rope_RopeLeaf<_CharT,_Alloc>* __l
+			= (_Rope_RopeLeaf<_CharT,_Alloc>*)this;
+	        __l->_Rope_RopeLeaf<_CharT,_Alloc>::~_Rope_RopeLeaf();
+	        _L_deallocate(__l, 1);
+	        break;
+	    }
+	case _S_concat:
+	    {
+	        _Rope_RopeConcatenation<_CharT,_Alloc>* __c
+		    = (_Rope_RopeConcatenation<_CharT,_Alloc>*)this;
+	        __c->_Rope_RopeConcatenation<_CharT,_Alloc>::
+		       ~_Rope_RopeConcatenation();
+	        _C_deallocate(__c, 1);
+	        break;
+	    }
+	case _S_function:
+	    {
+	        _Rope_RopeFunction<_CharT,_Alloc>* __f
+		    = (_Rope_RopeFunction<_CharT,_Alloc>*)this;
+	        __f->_Rope_RopeFunction<_CharT,_Alloc>::~_Rope_RopeFunction();
+	        _F_deallocate(__f, 1);
+	        break;
+	    }
+	case _S_substringfn:
+	    {
+	        _Rope_RopeSubstring<_CharT,_Alloc>* __ss =
+			(_Rope_RopeSubstring<_CharT,_Alloc>*)this;
+		__ss->_Rope_RopeSubstring<_CharT,_Alloc>::
+		        ~_Rope_RopeSubstring();
+		_S_deallocate(__ss, 1);
+		break;
+	    }
+    }
+}
+#else
+
+template 
+  inline void _Rope_RopeRep<_CharT,_Alloc>::_S_free_string
+		(const _CharT*, size_t, allocator_type)
+{}
+
+#endif
+
+
+// Concatenate a C string onto a leaf rope by copying the rope data.
+// Used for short ropes.
+template 
+typename rope<_CharT,_Alloc>::_RopeLeaf*
+rope<_CharT,_Alloc>::_S_leaf_concat_char_iter
+		(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
+{
+    size_t __old_len = __r->_M_size;
+    _CharT* __new_data = (_CharT*)
+	_Data_allocate(_S_rounded_up_size(__old_len + __len));
+    _RopeLeaf* __result;
+    
+    uninitialized_copy_n(__r->_M_data, __old_len, __new_data);
+    uninitialized_copy_n(__iter, __len, __new_data + __old_len);
+    _S_cond_store_eos(__new_data[__old_len + __len]);
+    try {
+	__result = _S_new_RopeLeaf(__new_data, __old_len + __len,
+				   __r->get_allocator());
+    }
+    catch(...)
+      {
+	_RopeRep::__STL_FREE_STRING(__new_data, __old_len + __len,
+				    __r->get_allocator());
+	__throw_exception_again;
+      }
+    return __result;
+}
+
+#ifndef __GC
+// As above, but it's OK to clobber original if refcount is 1
+template 
+typename rope<_CharT,_Alloc>::_RopeLeaf*
+rope<_CharT,_Alloc>::_S_destr_leaf_concat_char_iter
+		(_RopeLeaf* __r, const _CharT* __iter, size_t __len)
+{
+    if (__r->_M_ref_count > 1)
+      return _S_leaf_concat_char_iter(__r, __iter, __len);
+    size_t __old_len = __r->_M_size;
+    if (_S_allocated_capacity(__old_len) >= __old_len + __len) {
+	// The space has been partially initialized for the standard
+	// character types.  But that doesn't matter for those types.
+	uninitialized_copy_n(__iter, __len, __r->_M_data + __old_len);
+	if (_S_is_basic_char_type((_CharT*)0)) {
+	    _S_cond_store_eos(__r->_M_data[__old_len + __len]);
+	} else if (__r->_M_c_string != __r->_M_data && 0 != __r->_M_c_string) {
+	    __r->_M_free_c_string();
+	    __r->_M_c_string = 0;
+	}
+	__r->_M_size = __old_len + __len;
+	__r->_M_ref_count = 2;
+	return __r;
+    } else {
+	_RopeLeaf* __result = _S_leaf_concat_char_iter(__r, __iter, __len);
+	return __result;
+    }
+}
+#endif
+
+// Assumes left and right are not 0.
+// Does not increment (nor decrement on exception) child reference counts.
+// Result has ref count 1.
+template 
+typename rope<_CharT,_Alloc>::_RopeRep*
+rope<_CharT,_Alloc>::_S_tree_concat (_RopeRep* __left, _RopeRep* __right)
+{
+  _RopeConcatenation* __result = _S_new_RopeConcatenation(__left, __right, 
+						      __left->get_allocator());
+  size_t __depth = __result->_M_depth;
+    
+  if (__depth > 20 && (__result->_M_size < 1000 ||
+		       __depth > _RopeRep::_S_max_rope_depth)) 
+    {
+      _RopeRep* __balanced;
+      
+      try 
+	{
+	  __balanced = _S_balance(__result);
+	  __result->_M_unref_nonnil();
+        }
+      catch(...)
+	{ 
+	  _C_deallocate(__result,1);
+	  __throw_exception_again;
+	}
+      // In case of exception, we need to deallocate
+      // otherwise dangling result node.  But caller
+      // still owns its children.  Thus unref is
+      // inappropriate.
+      return __balanced;
+    } 
+  else 
+    return __result;
+}
+
+template 
+typename
+rope<_CharT,_Alloc>::_RopeRep* rope<_CharT,_Alloc>::_S_concat_char_iter
+		(_RopeRep* __r, const _CharT*__s, size_t __slen)
+{
+    _RopeRep* __result;
+    if (0 == __slen) {
+	_S_ref(__r);
+	return __r;
+    }
+    if (0 == __r)
+      return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
+					      __r->get_allocator());
+    if (_RopeRep::_S_leaf == __r->_M_tag && 
+          __r->_M_size + __slen <= _S_copy_max) {
+	__result = _S_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
+	return __result;
+    }
+    if (_RopeRep::_S_concat == __r->_M_tag
+	&& _RopeRep::_S_leaf == ((_RopeConcatenation*)__r)->_M_right->_M_tag) {
+	_RopeLeaf* __right = 
+	  (_RopeLeaf* )(((_RopeConcatenation* )__r)->_M_right);
+	if (__right->_M_size + __slen <= _S_copy_max) {
+	  _RopeRep* __left = ((_RopeConcatenation*)__r)->_M_left;
+	  _RopeRep* __nright = 
+	    _S_leaf_concat_char_iter((_RopeLeaf*)__right, __s, __slen);
+	  __left->_M_ref_nonnil();
+	  try {
+	    __result = _S_tree_concat(__left, __nright);
+          }
+	  catch(...)
+	    {
+	      _S_unref(__left); 
+	      _S_unref(__nright);
+	      __throw_exception_again;
+	    }
+	  return __result;
+	}
+    }
+    _RopeRep* __nright =
+      __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator());
+    try {
+      __r->_M_ref_nonnil();
+      __result = _S_tree_concat(__r, __nright);
+    }
+    catch(...)
+      {
+	_S_unref(__r); 
+	_S_unref(__nright);
+	__throw_exception_again;
+      }
+    return __result;
+}
+
+#ifndef __GC
+template 
+typename rope<_CharT,_Alloc>::_RopeRep* 
+rope<_CharT,_Alloc>::_S_destr_concat_char_iter(
+  _RopeRep* __r, const _CharT* __s, size_t __slen)
+{
+    _RopeRep* __result;
+    if (0 == __r)
+      return __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen,
+					      __r->get_allocator());
+    size_t __count = __r->_M_ref_count;
+    size_t __orig_size = __r->_M_size;
+    if (__count > 1) return _S_concat_char_iter(__r, __s, __slen);
+    if (0 == __slen) {
+	__r->_M_ref_count = 2;      // One more than before
+	return __r;
+    }
+    if (__orig_size + __slen <= _S_copy_max && 
+          _RopeRep::_S_leaf == __r->_M_tag) {
+	__result = _S_destr_leaf_concat_char_iter((_RopeLeaf*)__r, __s, __slen);
+	return __result;
+    }
+    if (_RopeRep::_S_concat == __r->_M_tag) {
+	_RopeLeaf* __right = (_RopeLeaf*)(((_RopeConcatenation*)__r)->_M_right);
+	if (_RopeRep::_S_leaf == __right->_M_tag
+	    && __right->_M_size + __slen <= _S_copy_max) {
+	  _RopeRep* __new_right = 
+	    _S_destr_leaf_concat_char_iter(__right, __s, __slen);
+	  if (__right == __new_right) 
+	    __new_right->_M_ref_count = 1;
+	  else 
+	    __right->_M_unref_nonnil();
+	  __r->_M_ref_count = 2;    // One more than before.
+	  ((_RopeConcatenation*)__r)->_M_right = __new_right;
+	  __r->_M_size = __orig_size + __slen;
+	  if (0 != __r->_M_c_string) {
+	      __r->_M_free_c_string();
+	      __r->_M_c_string = 0;
+	  }
+	  return __r;
+	}
+    }
+    _RopeRep* __right =
+      __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __slen, __r->get_allocator());
+    __r->_M_ref_nonnil();
+    try {
+      __result = _S_tree_concat(__r, __right);
+    }
+    catch(...)
+      {
+	_S_unref(__r); 
+	_S_unref(__right);
+	__throw_exception_again;
+      }
+    return __result;
+}
+#endif /* !__GC */
+
+template 
+typename rope<_CharT,_Alloc>::_RopeRep*
+rope<_CharT,_Alloc>::_S_concat(_RopeRep* __left, _RopeRep* __right)
+{
+    if (0 == __left) {
+	_S_ref(__right);
+	return __right;
+    }
+    if (0 == __right) {
+	__left->_M_ref_nonnil();
+	return __left;
+    }
+    if (_RopeRep::_S_leaf == __right->_M_tag) {
+	if (_RopeRep::_S_leaf == __left->_M_tag) {
+	  if (__right->_M_size + __left->_M_size <= _S_copy_max) {
+	    return _S_leaf_concat_char_iter((_RopeLeaf*)__left,
+					 ((_RopeLeaf*)__right)->_M_data,
+					 __right->_M_size);
+	  }
+	} else if (_RopeRep::_S_concat == __left->_M_tag
+		   && _RopeRep::_S_leaf ==
+		      ((_RopeConcatenation*)__left)->_M_right->_M_tag) {
+	  _RopeLeaf* __leftright =
+		    (_RopeLeaf*)(((_RopeConcatenation*)__left)->_M_right); 
+	  if (__leftright->_M_size + __right->_M_size <= _S_copy_max) {
+	    _RopeRep* __leftleft = ((_RopeConcatenation*)__left)->_M_left;
+	    _RopeRep* __rest = _S_leaf_concat_char_iter(__leftright,
+					   ((_RopeLeaf*)__right)->_M_data,
+					   __right->_M_size);
+	    __leftleft->_M_ref_nonnil();
+	    try {
+	      return(_S_tree_concat(__leftleft, __rest));
+            }
+	    catch(...)
+	      {
+		_S_unref(__leftleft); 
+		_S_unref(__rest);
+		__throw_exception_again;
+	      }
+	  }
+	}
+    }
+    __left->_M_ref_nonnil();
+    __right->_M_ref_nonnil();
+    try {
+      return(_S_tree_concat(__left, __right));
+    }
+    catch(...)
+      {
+	_S_unref(__left); 
+	_S_unref(__right);
+	__throw_exception_again;
+      }	
+}
+
+template 
+typename rope<_CharT,_Alloc>::_RopeRep*
+rope<_CharT,_Alloc>::_S_substring(_RopeRep* __base, 
+                               size_t __start, size_t __endp1)
+{
+    if (0 == __base) return 0;
+    size_t __len = __base->_M_size;
+    size_t __adj_endp1;
+    const size_t __lazy_threshold = 128;
+    
+    if (__endp1 >= __len) {
+	if (0 == __start) {
+	    __base->_M_ref_nonnil();
+	    return __base;
+	} else {
+	    __adj_endp1 = __len;
+	}
+    } else {
+	__adj_endp1 = __endp1;
+    }
+    switch(__base->_M_tag) {
+	case _RopeRep::_S_concat:
+	    {
+		_RopeConcatenation* __c = (_RopeConcatenation*)__base;
+		_RopeRep* __left = __c->_M_left;
+		_RopeRep* __right = __c->_M_right;
+		size_t __left_len = __left->_M_size;
+		_RopeRep* __result;
+
+		if (__adj_endp1 <= __left_len) {
+		    return _S_substring(__left, __start, __endp1);
+		} else if (__start >= __left_len) {
+		    return _S_substring(__right, __start - __left_len,
+				  __adj_endp1 - __left_len);
+		}
+		_Self_destruct_ptr __left_result(
+		  _S_substring(__left, __start, __left_len));
+		_Self_destruct_ptr __right_result(
+		  _S_substring(__right, 0, __endp1 - __left_len));
+		__result = _S_concat(__left_result, __right_result);
+		return __result;
+	    }
+	case _RopeRep::_S_leaf:
+	    {
+		_RopeLeaf* __l = (_RopeLeaf*)__base;
+		_RopeLeaf* __result;
+		size_t __result_len;
+		if (__start >= __adj_endp1) return 0;
+		__result_len = __adj_endp1 - __start;
+		if (__result_len > __lazy_threshold) goto lazy;
+#               ifdef __GC
+		    const _CharT* __section = __l->_M_data + __start;
+		    __result = _S_new_RopeLeaf(__section, __result_len,
+					  __base->get_allocator());
+		    __result->_M_c_string = 0;  // Not eos terminated.
+#               else
+		    // We should sometimes create substring node instead.
+		    __result = __STL_ROPE_FROM_UNOWNED_CHAR_PTR(
+					__l->_M_data + __start, __result_len,
+					__base->get_allocator());
+#               endif
+		return __result;
+	    }
+	case _RopeRep::_S_substringfn:
+	    // Avoid introducing multiple layers of substring nodes.
+	    {
+		_RopeSubstring* __old = (_RopeSubstring*)__base;
+		size_t __result_len;
+		if (__start >= __adj_endp1) return 0;
+		__result_len = __adj_endp1 - __start;
+		if (__result_len > __lazy_threshold) {
+		    _RopeSubstring* __result =
+			_S_new_RopeSubstring(__old->_M_base,
+					  __start + __old->_M_start,
+					  __adj_endp1 - __start,
+					  __base->get_allocator());
+		    return __result;
+
+		} // *** else fall through: ***
+	    }
+	case _RopeRep::_S_function:
+	    {
+		_RopeFunction* __f = (_RopeFunction*)__base;
+		_CharT* __section;
+		size_t __result_len;
+		if (__start >= __adj_endp1) return 0;
+		__result_len = __adj_endp1 - __start;
+
+		if (__result_len > __lazy_threshold) goto lazy;
+		__section = (_CharT*)
+			_Data_allocate(_S_rounded_up_size(__result_len));
+		try {
+		  (*(__f->_M_fn))(__start, __result_len, __section);
+                }
+		catch(...)
+		  {
+		    _RopeRep::__STL_FREE_STRING(
+	               __section, __result_len, __base->get_allocator());
+		    __throw_exception_again;
+		  }
+		_S_cond_store_eos(__section[__result_len]);
+		return _S_new_RopeLeaf(__section, __result_len,
+				       __base->get_allocator());
+	    }
+    }
+  lazy:
+    {
+	// Create substring node.
+	return _S_new_RopeSubstring(__base, __start, __adj_endp1 - __start,
+			       __base->get_allocator());
+    }
+}
+
+template
+class _Rope_flatten_char_consumer : public _Rope_char_consumer<_CharT> {
+    private:
+	_CharT* _M_buf_ptr;
+    public:
+
+	_Rope_flatten_char_consumer(_CharT* __buffer) {
+	    _M_buf_ptr = __buffer;
+	};
+	~_Rope_flatten_char_consumer() {}
+	bool operator() (const _CharT* __leaf, size_t __n) {
+	    uninitialized_copy_n(__leaf, __n, _M_buf_ptr);
+	    _M_buf_ptr += __n;
+	    return true;
+	}
+};
+	    
+template
+class _Rope_find_char_char_consumer : public _Rope_char_consumer<_CharT> {
+    private:
+	_CharT _M_pattern;
+    public:
+	size_t _M_count;  // Number of nonmatching characters
+	_Rope_find_char_char_consumer(_CharT __p) 
+	  : _M_pattern(__p), _M_count(0) {}
+	~_Rope_find_char_char_consumer() {}
+	bool operator() (const _CharT* __leaf, size_t __n) {
+	    size_t __i;
+	    for (__i = 0; __i < __n; __i++) {
+		if (__leaf[__i] == _M_pattern) {
+		    _M_count += __i; return false;
+		}
+	    }
+	    _M_count += __n; return true;
+	}
+};
+	    
+  template
+  // Here _CharT is both the stream and rope character type.
+class _Rope_insert_char_consumer : public _Rope_char_consumer<_CharT> {
+    private:
+	  typedef basic_ostream<_CharT,_Traits> _Insert_ostream;
+	_Insert_ostream& _M_o;
+    public:
+	_Rope_insert_char_consumer(_Insert_ostream& __writer) 
+	  : _M_o(__writer) {};
+	~_Rope_insert_char_consumer() { };
+		// Caller is presumed to own the ostream
+	bool operator() (const _CharT* __leaf, size_t __n);
+		// Returns true to continue traversal.
+};
+	    
+template
+bool _Rope_insert_char_consumer<_CharT, _Traits>::operator()
+                                      (const _CharT* __leaf, size_t __n)
+{
+  size_t __i;
+  //  We assume that formatting is set up correctly for each element.
+  for (__i = 0; __i < __n; __i++) _M_o.put(__leaf[__i]);
+  return true;
+}
+
+template 
+bool rope<_CharT, _Alloc>::_S_apply_to_pieces(
+				_Rope_char_consumer<_CharT>& __c,
+				const _RopeRep* __r,
+				size_t __begin, size_t __end)
+{
+    if (0 == __r) return true;
+    switch(__r->_M_tag) {
+	case _RopeRep::_S_concat:
+	    {
+		_RopeConcatenation* __conc = (_RopeConcatenation*)__r;
+		_RopeRep* __left =  __conc->_M_left;
+		size_t __left_len = __left->_M_size;
+		if (__begin < __left_len) {
+		    size_t __left_end = std::min(__left_len, __end);
+		    if (!_S_apply_to_pieces(__c, __left, __begin, __left_end))
+			return false;
+		}
+		if (__end > __left_len) {
+		    _RopeRep* __right =  __conc->_M_right;
+		    size_t __right_start = std::max(__left_len, __begin);
+		    if (!_S_apply_to_pieces(__c, __right,
+					 __right_start - __left_len,
+					 __end - __left_len)) {
+			return false;
+		    }
+		}
+	    }
+	    return true;
+	case _RopeRep::_S_leaf:
+	    {
+		_RopeLeaf* __l = (_RopeLeaf*)__r;
+		return __c(__l->_M_data + __begin, __end - __begin);
+	    }
+	case _RopeRep::_S_function:
+	case _RopeRep::_S_substringfn:
+	    {
+		_RopeFunction* __f = (_RopeFunction*)__r;
+		size_t __len = __end - __begin;
+		bool __result;
+		_CharT* __buffer =
+		  (_CharT*)__alloc::allocate(__len * sizeof(_CharT));
+		try {
+		  (*(__f->_M_fn))(__begin, __len, __buffer);
+		  __result = __c(__buffer, __len);
+                  __alloc::deallocate(__buffer, __len * sizeof(_CharT));
+                }
+		catch(...)
+		  {
+		    __alloc::deallocate(__buffer, __len * sizeof(_CharT));
+		    __throw_exception_again;
+		  }
+		return __result;
+	    }
+	default:
+	  return false;
+    }
+}
+
+  template
+  inline void _Rope_fill(basic_ostream<_CharT, _Traits>& __o, size_t __n)
+{
+    char __f = __o.fill();
+    size_t __i;
+
+    for (__i = 0; __i < __n; __i++) __o.put(__f);
+}
+    
+
+template  inline bool _Rope_is_simple(_CharT*) { return false; }
+inline bool _Rope_is_simple(char*) { return true; }
+inline bool _Rope_is_simple(wchar_t*) { return true; }
+
+template
+basic_ostream<_CharT, _Traits>& operator<< (basic_ostream<_CharT, _Traits>& __o,
+                                            const rope<_CharT, _Alloc>& __r)
+{
+    size_t __w = __o.width();
+    bool __left = bool(__o.flags() & std::ios::left);
+    size_t __pad_len;
+    size_t __rope_len = __r.size();
+      _Rope_insert_char_consumer<_CharT, _Traits> __c(__o);
+    bool __is_simple = _Rope_is_simple((_CharT*)0);
+    
+    if (__rope_len < __w) {
+	__pad_len = __w - __rope_len;
+    } else {
+	__pad_len = 0;
+    }
+    if (!__is_simple) __o.width(__w/__rope_len);
+    try {
+      if (__is_simple && !__left && __pad_len > 0) {
+	_Rope_fill(__o, __pad_len);
+      }
+      __r.apply_to_pieces(0, __r.size(), __c);
+      if (__is_simple && __left && __pad_len > 0) {
+	_Rope_fill(__o, __pad_len);
+      }
+      if (!__is_simple)
+        __o.width(__w);
+    }
+    catch(...)
+      {
+	if (!__is_simple) 
+	  __o.width(__w);
+	__throw_exception_again;
+      }
+    return __o;
+}
+
+template 
+_CharT*
+rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r,
+				 size_t __start, size_t __len,
+				 _CharT* __buffer)
+{
+    _Rope_flatten_char_consumer<_CharT> __c(__buffer);
+    _S_apply_to_pieces(__c, __r, __start, __start + __len);
+    return(__buffer + __len);
+}
+
+template 
+size_t
+rope<_CharT,_Alloc>::find(_CharT __pattern, size_t __start) const
+{
+    _Rope_find_char_char_consumer<_CharT> __c(__pattern);
+    _S_apply_to_pieces(__c, _M_tree_ptr, __start, size());
+    size_type __result_pos = __start + __c._M_count;
+#   ifndef __STL_OLD_ROPE_SEMANTICS
+	if (__result_pos == size()) __result_pos = npos;
+#   endif
+    return __result_pos;
+}
+
+template 
+_CharT*
+rope<_CharT,_Alloc>::_S_flatten(_RopeRep* __r, _CharT* __buffer)
+{
+    if (0 == __r) return __buffer;
+    switch(__r->_M_tag) {
+	case _RopeRep::_S_concat:
+	    {
+		_RopeConcatenation* __c = (_RopeConcatenation*)__r;
+		_RopeRep* __left = __c->_M_left;
+		_RopeRep* __right = __c->_M_right;
+		_CharT* __rest = _S_flatten(__left, __buffer);
+		return _S_flatten(__right, __rest);
+	    }
+	case _RopeRep::_S_leaf:
+	    {
+		_RopeLeaf* __l = (_RopeLeaf*)__r;
+		return copy_n(__l->_M_data, __l->_M_size, __buffer).second;
+	    }
+	case _RopeRep::_S_function:
+	case _RopeRep::_S_substringfn:
+	    // We don't yet do anything with substring nodes.
+	    // This needs to be fixed before ropefiles will work well.
+	    {
+		_RopeFunction* __f = (_RopeFunction*)__r;
+		(*(__f->_M_fn))(0, __f->_M_size, __buffer);
+		return __buffer + __f->_M_size;
+	    }
+	default:
+	    return 0;
+    }
+}
+
+
+// This needs work for _CharT != char
+template 
+void
+rope<_CharT,_Alloc>::_S_dump(_RopeRep* __r, int __indent)
+{
+    for (int __i = 0; __i < __indent; __i++) putchar(' ');
+    if (0 == __r) {
+	printf("NULL\n"); return;
+    }
+    if (_RopeRep::_S_concat == __r->_M_tag) {
+	_RopeConcatenation* __c = (_RopeConcatenation*)__r;
+	_RopeRep* __left = __c->_M_left;
+	_RopeRep* __right = __c->_M_right;
+
+#       ifdef __GC
+	  printf("Concatenation %p (depth = %d, len = %ld, %s balanced)\n",
+	    __r, __r->_M_depth, __r->_M_size, __r->_M_is_balanced? "" : "not");
+#       else
+	  printf("Concatenation %p (rc = %ld, depth = %d, "
+	           "len = %ld, %s balanced)\n",
+		 __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size,
+		 __r->_M_is_balanced? "" : "not");
+#       endif
+	_S_dump(__left, __indent + 2);
+	_S_dump(__right, __indent + 2);
+	return;
+    } else {
+	char* __kind;
+
+	switch (__r->_M_tag) {
+	    case _RopeRep::_S_leaf:
+		__kind = "Leaf";
+		break;
+	    case _RopeRep::_S_function:
+		__kind = "Function";
+		break;
+	    case _RopeRep::_S_substringfn:
+		__kind = "Function representing substring";
+		break;
+	    default:
+		__kind = "(corrupted kind field!)";
+	}
+#       ifdef __GC
+	  printf("%s %p (depth = %d, len = %ld) ",
+		 __kind, __r, __r->_M_depth, __r->_M_size);
+#       else
+	  printf("%s %p (rc = %ld, depth = %d, len = %ld) ",
+		 __kind, __r, __r->_M_ref_count, __r->_M_depth, __r->_M_size);
+#       endif
+	if (_S_is_one_byte_char_type((_CharT*)0)) {
+	    const int __max_len = 40;
+	    _Self_destruct_ptr __prefix(_S_substring(__r, 0, __max_len));
+	    _CharT __buffer[__max_len + 1];
+	    bool __too_big = __r->_M_size > __prefix->_M_size;
+
+	    _S_flatten(__prefix, __buffer);
+	    __buffer[__prefix->_M_size] = _S_eos((_CharT*)0); 
+	    printf("%s%s\n", 
+	           (char*)__buffer, __too_big? "...\n" : "\n");
+	} else {
+	    printf("\n");
+	}
+    }
+}
+
+template 
+const unsigned long
+rope<_CharT,_Alloc>::_S_min_len[
+  _Rope_RopeRep<_CharT,_Alloc>::_S_max_rope_depth + 1] = {
+/* 0 */1, /* 1 */2, /* 2 */3, /* 3 */5, /* 4 */8, /* 5 */13, /* 6 */21,
+/* 7 */34, /* 8 */55, /* 9 */89, /* 10 */144, /* 11 */233, /* 12 */377,
+/* 13 */610, /* 14 */987, /* 15 */1597, /* 16 */2584, /* 17 */4181,
+/* 18 */6765, /* 19 */10946, /* 20 */17711, /* 21 */28657, /* 22 */46368,
+/* 23 */75025, /* 24 */121393, /* 25 */196418, /* 26 */317811,
+/* 27 */514229, /* 28 */832040, /* 29 */1346269, /* 30 */2178309,
+/* 31 */3524578, /* 32 */5702887, /* 33 */9227465, /* 34 */14930352,
+/* 35 */24157817, /* 36 */39088169, /* 37 */63245986, /* 38 */102334155,
+/* 39 */165580141, /* 40 */267914296, /* 41 */433494437,
+/* 42 */701408733, /* 43 */1134903170, /* 44 */1836311903,
+/* 45 */2971215073u };
+// These are Fibonacci numbers < 2**32.
+
+template 
+typename rope<_CharT,_Alloc>::_RopeRep*
+rope<_CharT,_Alloc>::_S_balance(_RopeRep* __r)
+{
+    _RopeRep* __forest[_RopeRep::_S_max_rope_depth + 1];
+    _RopeRep* __result = 0;
+    int __i;
+    // Invariant:
+    // The concatenation of forest in descending order is equal to __r.
+    // __forest[__i]._M_size >= _S_min_len[__i]
+    // __forest[__i]._M_depth = __i
+    // References from forest are included in refcount.
+
+    for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) 
+      __forest[__i] = 0;
+    try {
+      _S_add_to_forest(__r, __forest);
+      for (__i = 0; __i <= _RopeRep::_S_max_rope_depth; ++__i) 
+        if (0 != __forest[__i]) {
+#	ifndef __GC
+	  _Self_destruct_ptr __old(__result);
+#	endif
+	  __result = _S_concat(__forest[__i], __result);
+	__forest[__i]->_M_unref_nonnil();
+#	if !defined(__GC) && defined(__EXCEPTIONS)
+	  __forest[__i] = 0;
+#	endif
+      }
+    }
+    catch(...)
+      {
+	for(__i = 0; __i <= _RopeRep::_S_max_rope_depth; __i++)
+	  _S_unref(__forest[__i]);
+	__throw_exception_again;
+      }
+
+    if (__result->_M_depth > _RopeRep::_S_max_rope_depth)
+      __throw_length_error("rope too long");
+    return(__result);
+}
+
+
+template 
+void
+rope<_CharT,_Alloc>::_S_add_to_forest(_RopeRep* __r, _RopeRep** __forest)
+{
+    if (__r->_M_is_balanced) {
+	_S_add_leaf_to_forest(__r, __forest);
+	return;
+    }
+
+    {
+	_RopeConcatenation* __c = (_RopeConcatenation*)__r;
+
+	_S_add_to_forest(__c->_M_left, __forest);
+	_S_add_to_forest(__c->_M_right, __forest);
+    }
+}
+
+
+template 
+void
+rope<_CharT,_Alloc>::_S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest)
+{
+    _RopeRep* __insertee;   		// included in refcount
+    _RopeRep* __too_tiny = 0;    	// included in refcount
+    int __i;  				// forest[0..__i-1] is empty
+    size_t __s = __r->_M_size;
+
+    for (__i = 0; __s >= _S_min_len[__i+1]/* not this bucket */; ++__i) {
+	if (0 != __forest[__i]) {
+#	    ifndef __GC
+	      _Self_destruct_ptr __old(__too_tiny);
+#	    endif
+	    __too_tiny = _S_concat_and_set_balanced(__forest[__i], __too_tiny);
+	    __forest[__i]->_M_unref_nonnil();
+	    __forest[__i] = 0;
+	}
+    }
+    {
+#	ifndef __GC
+	  _Self_destruct_ptr __old(__too_tiny);
+#	endif
+	__insertee = _S_concat_and_set_balanced(__too_tiny, __r);
+    }
+    // Too_tiny dead, and no longer included in refcount.
+    // Insertee is live and included.
+    for (;; ++__i) {
+	if (0 != __forest[__i]) {
+#	    ifndef __GC
+	      _Self_destruct_ptr __old(__insertee);
+#	    endif
+	    __insertee = _S_concat_and_set_balanced(__forest[__i], __insertee);
+	    __forest[__i]->_M_unref_nonnil();
+	    __forest[__i] = 0;
+	}
+	if (__i == _RopeRep::_S_max_rope_depth || 
+	      __insertee->_M_size < _S_min_len[__i+1]) {
+	    __forest[__i] = __insertee;
+	    // refcount is OK since __insertee is now dead.
+	    return;
+	}
+    }
+}
+
+template 
+_CharT
+rope<_CharT,_Alloc>::_S_fetch(_RopeRep* __r, size_type __i)
+{
+    __GC_CONST _CharT* __cstr = __r->_M_c_string;
+
+    if (0 != __cstr) return __cstr[__i]; 
+    for(;;) {
+      switch(__r->_M_tag) {
+	case _RopeRep::_S_concat:
+	    {
+		_RopeConcatenation* __c = (_RopeConcatenation*)__r;
+		_RopeRep* __left = __c->_M_left;
+		size_t __left_len = __left->_M_size;
+
+		if (__i >= __left_len) {
+		    __i -= __left_len;
+		    __r = __c->_M_right;
+		} else {
+		    __r = __left;
+		}
+	    }
+	    break;
+	case _RopeRep::_S_leaf:
+	    {
+		_RopeLeaf* __l = (_RopeLeaf*)__r;
+		return __l->_M_data[__i];
+	    }
+	case _RopeRep::_S_function:
+	case _RopeRep::_S_substringfn:
+	    {
+		_RopeFunction* __f = (_RopeFunction*)__r;
+		_CharT __result;
+
+		(*(__f->_M_fn))(__i, 1, &__result);
+		return __result;
+	    }
+      }
+    }
+}
+
+# ifndef __GC
+// Return a uniquely referenced character slot for the given
+// position, or 0 if that's not possible.
+template 
+_CharT*
+rope<_CharT,_Alloc>::_S_fetch_ptr(_RopeRep* __r, size_type __i)
+{
+    _RopeRep* __clrstack[_RopeRep::_S_max_rope_depth];
+    size_t __csptr = 0;
+
+    for(;;) {
+      if (__r->_M_ref_count > 1) return 0;
+      switch(__r->_M_tag) {
+	case _RopeRep::_S_concat:
+	    {
+		_RopeConcatenation* __c = (_RopeConcatenation*)__r;
+		_RopeRep* __left = __c->_M_left;
+		size_t __left_len = __left->_M_size;
+
+		if (__c->_M_c_string != 0) __clrstack[__csptr++] = __c;
+		if (__i >= __left_len) {
+		    __i -= __left_len;
+		    __r = __c->_M_right;
+		} else {
+		    __r = __left;
+		}
+	    }
+	    break;
+	case _RopeRep::_S_leaf:
+	    {
+		_RopeLeaf* __l = (_RopeLeaf*)__r;
+		if (__l->_M_c_string != __l->_M_data && __l->_M_c_string != 0)
+		    __clrstack[__csptr++] = __l;
+		while (__csptr > 0) {
+		    -- __csptr;
+		    _RopeRep* __d = __clrstack[__csptr];
+		    __d->_M_free_c_string();
+		    __d->_M_c_string = 0;
+		}
+		return __l->_M_data + __i;
+	    }
+	case _RopeRep::_S_function:
+	case _RopeRep::_S_substringfn:
+	    return 0;
+      }
+    }
+}
+# endif /* __GC */
+
+// The following could be implemented trivially using
+// lexicographical_compare_3way.
+// We do a little more work to avoid dealing with rope iterators for
+// flat strings.
+template 
+int
+rope<_CharT,_Alloc>::_S_compare (const _RopeRep* __left, 
+                                 const _RopeRep* __right)
+{
+    size_t __left_len;
+    size_t __right_len;
+
+    if (0 == __right) return 0 != __left;
+    if (0 == __left) return -1;
+    __left_len = __left->_M_size;
+    __right_len = __right->_M_size;
+    if (_RopeRep::_S_leaf == __left->_M_tag) {
+	_RopeLeaf* __l = (_RopeLeaf*) __left;
+	if (_RopeRep::_S_leaf == __right->_M_tag) {
+	    _RopeLeaf* __r = (_RopeLeaf*) __right;
+	    return lexicographical_compare_3way(
+			__l->_M_data, __l->_M_data + __left_len,
+			__r->_M_data, __r->_M_data + __right_len);
+	} else {
+	    const_iterator __rstart(__right, 0);
+	    const_iterator __rend(__right, __right_len);
+	    return lexicographical_compare_3way(
+			__l->_M_data, __l->_M_data + __left_len,
+			__rstart, __rend);
+	}
+    } else {
+	const_iterator __lstart(__left, 0);
+	const_iterator __lend(__left, __left_len);
+	if (_RopeRep::_S_leaf == __right->_M_tag) {
+	    _RopeLeaf* __r = (_RopeLeaf*) __right;
+	    return lexicographical_compare_3way(
+				   __lstart, __lend,
+				   __r->_M_data, __r->_M_data + __right_len);
+	} else {
+	    const_iterator __rstart(__right, 0);
+	    const_iterator __rend(__right, __right_len);
+	    return lexicographical_compare_3way(
+				   __lstart, __lend,
+				   __rstart, __rend);
+	}
+    }
+}
+
+// Assignment to reference proxies.
+template 
+_Rope_char_ref_proxy<_CharT, _Alloc>&
+_Rope_char_ref_proxy<_CharT, _Alloc>::operator= (_CharT __c) {
+    _RopeRep* __old = _M_root->_M_tree_ptr;
+#   ifndef __GC
+	// First check for the case in which everything is uniquely
+	// referenced.  In that case we can do this destructively.
+	_CharT* __ptr = _My_rope::_S_fetch_ptr(__old, _M_pos);
+	if (0 != __ptr) {
+	    *__ptr = __c;
+	    return *this;
+	}
+#   endif
+    _Self_destruct_ptr __left(
+      _My_rope::_S_substring(__old, 0, _M_pos));
+    _Self_destruct_ptr __right(
+      _My_rope::_S_substring(__old, _M_pos+1, __old->_M_size));
+    _Self_destruct_ptr __result_left(
+      _My_rope::_S_destr_concat_char_iter(__left, &__c, 1));
+
+    _RopeRep* __result =
+		_My_rope::_S_concat(__result_left, __right);
+#   ifndef __GC
+      _RopeRep::_S_unref(__old);
+#   endif
+    _M_root->_M_tree_ptr = __result;
+    return *this;
+}
+
+template 
+inline _Rope_char_ref_proxy<_CharT, _Alloc>::operator _CharT () const
+{
+    if (_M_current_valid) {
+	return _M_current;
+    } else {
+        return _My_rope::_S_fetch(_M_root->_M_tree_ptr, _M_pos);
+    }
+}
+template 
+_Rope_char_ptr_proxy<_CharT, _Alloc>
+_Rope_char_ref_proxy<_CharT, _Alloc>::operator& () const {
+    return _Rope_char_ptr_proxy<_CharT, _Alloc>(*this);
+}
+
+template 
+rope<_CharT, _Alloc>::rope(size_t __n, _CharT __c,
+			   const allocator_type& __a)
+: _Base(__a)
+{
+    rope<_CharT,_Alloc> __result;
+    const size_t __exponentiate_threshold = 32;
+    size_t __exponent;
+    size_t __rest;
+    _CharT* __rest_buffer;
+    _RopeRep* __remainder;
+    rope<_CharT,_Alloc> __remainder_rope;
+
+    if (0 == __n)
+      return;
+    
+    __exponent = __n / __exponentiate_threshold;
+    __rest = __n % __exponentiate_threshold;
+    if (0 == __rest) {
+	__remainder = 0;
+    } else {
+	__rest_buffer = _Data_allocate(_S_rounded_up_size(__rest));
+	uninitialized_fill_n(__rest_buffer, __rest, __c);
+	_S_cond_store_eos(__rest_buffer[__rest]);
+	try {
+	    __remainder = _S_new_RopeLeaf(__rest_buffer, __rest, __a);
+        }
+	catch(...)
+	  {
+	    _RopeRep::__STL_FREE_STRING(__rest_buffer, __rest, __a);
+	    __throw_exception_again;
+	  }
+    }
+    __remainder_rope._M_tree_ptr = __remainder;
+    if (__exponent != 0) {
+	_CharT* __base_buffer =
+	  _Data_allocate(_S_rounded_up_size(__exponentiate_threshold));
+	_RopeLeaf* __base_leaf;
+	rope __base_rope;
+	uninitialized_fill_n(__base_buffer, __exponentiate_threshold, __c);
+	_S_cond_store_eos(__base_buffer[__exponentiate_threshold]);
+	try {
+          __base_leaf = _S_new_RopeLeaf(__base_buffer,
+                                        __exponentiate_threshold, __a);
+        }
+	catch(...)
+	  {
+	    _RopeRep::__STL_FREE_STRING(__base_buffer, 
+					__exponentiate_threshold, __a);
+	    __throw_exception_again;
+	  }
+	__base_rope._M_tree_ptr = __base_leaf;
+ 	if (1 == __exponent) {
+	  __result = __base_rope;
+	} else {
+	  __result = power(__base_rope, __exponent,
+			   _Rope_Concat_fn<_CharT,_Alloc>());
+	}
+	if (0 != __remainder) {
+	  __result += __remainder_rope;
+	}
+    } else {
+	__result = __remainder_rope;
+    }
+    _M_tree_ptr = __result._M_tree_ptr;
+    _M_tree_ptr->_M_ref_nonnil();
+}
+
+template
+  _CharT rope<_CharT,_Alloc>::_S_empty_c_str[1];
+
+template
+const _CharT* rope<_CharT,_Alloc>::c_str() const {
+    if (0 == _M_tree_ptr) {
+        _S_empty_c_str[0] = _S_eos((_CharT*)0);  // Possibly redundant,
+					     // but probably fast.
+        return _S_empty_c_str;
+    }
+    __GC_CONST _CharT* __old_c_string = _M_tree_ptr->_M_c_string;
+    if (0 != __old_c_string) return(__old_c_string);
+    size_t __s = size();
+    _CharT* __result = _Data_allocate(__s + 1);
+    _S_flatten(_M_tree_ptr, __result);
+    __result[__s] = _S_eos((_CharT*)0);
+#   ifdef __GC
+	_M_tree_ptr->_M_c_string = __result;
+#   else
+      if ((__old_c_string = (__GC_CONST _CharT*)
+             std::_Atomic_swap((unsigned long *)(&(_M_tree_ptr->_M_c_string)),
+			  (unsigned long)__result)) != 0) {
+	// It must have been added in the interim.  Hence it had to have been
+	// separately allocated.  Deallocate the old copy, since we just
+	// replaced it.
+	_Destroy(__old_c_string, __old_c_string + __s + 1);
+	_Data_deallocate(__old_c_string, __s + 1);
+      }
+#   endif
+    return(__result);
+}
+
+template
+const _CharT* rope<_CharT,_Alloc>::replace_with_c_str() {
+    if (0 == _M_tree_ptr) {
+        _S_empty_c_str[0] = _S_eos((_CharT*)0);
+        return _S_empty_c_str;
+    }
+    __GC_CONST _CharT* __old_c_string = _M_tree_ptr->_M_c_string;
+    if (_RopeRep::_S_leaf == _M_tree_ptr->_M_tag && 0 != __old_c_string) {
+	return(__old_c_string);
+    }
+    size_t __s = size();
+    _CharT* __result = _Data_allocate(_S_rounded_up_size(__s));
+    _S_flatten(_M_tree_ptr, __result);
+    __result[__s] = _S_eos((_CharT*)0);
+    _M_tree_ptr->_M_unref_nonnil();
+    _M_tree_ptr = _S_new_RopeLeaf(__result, __s, get_allocator());
+    return(__result);
+}
+
+// Algorithm specializations.  More should be added.
+
+template  // was templated on CharT and Alloc
+void				// VC++ workaround
+_Rope_rotate(_Rope_iterator __first,
+             _Rope_iterator __middle,
+             _Rope_iterator __last)
+{
+  typedef typename _Rope_iterator::value_type _CharT;
+  typedef typename _Rope_iterator::_allocator_type _Alloc;
+  
+  rope<_CharT,_Alloc>& __r(__first.container());
+  rope<_CharT,_Alloc> __prefix = __r.substr(0, __first.index());
+  rope<_CharT,_Alloc> __suffix = 
+    __r.substr(__last.index(), __r.size() - __last.index());
+  rope<_CharT,_Alloc> __part1 = 
+    __r.substr(__middle.index(), __last.index() - __middle.index());
+  rope<_CharT,_Alloc> __part2 = 
+    __r.substr(__first.index(), __middle.index() - __first.index());
+  __r = __prefix;
+  __r += __part1;
+  __r += __part2;
+  __r += __suffix;
+}
+
+#if !defined(__GNUC__)
+// Appears to confuse g++
+inline void rotate(_Rope_iterator __first,
+                   _Rope_iterator __middle,
+                   _Rope_iterator __last) {
+    _Rope_rotate(__first, __middle, __last);
+}
+#endif
+
+# if 0
+// Probably not useful for several reasons:
+// - for SGIs 7.1 compiler and probably some others,
+//   this forces lots of rope instantiations, creating a
+//   code bloat and compile time problem.  (Fixed in 7.2.)
+// - wchar_t is 4 bytes wide on most UNIX platforms, making it unattractive
+//   for unicode strings.  Unsigned short may be a better character
+//   type.
+inline void rotate(
+		_Rope_iterator __first,
+                _Rope_iterator __middle,
+                _Rope_iterator __last) {
+    _Rope_rotate(__first, __middle, __last);
+}
+# endif
+
+} // namespace __gnu_cxx
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/slist b/contrib/libstdc++/include/ext/slist
new file mode 100644
index 0000000..df2e97b
--- /dev/null
+++ b/contrib/libstdc++/include/ext/slist
@@ -0,0 +1,952 @@
+// Singly-linked list implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/slist
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef __SGI_STL_INTERNAL_SLIST_H
+#define __SGI_STL_INTERNAL_SLIST_H
+
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace __gnu_cxx
+{ 
+using std::size_t;
+using std::ptrdiff_t;
+using std::_Alloc_traits;
+using std::_Construct;
+using std::_Destroy;
+using std::allocator;
+
+struct _Slist_node_base
+{
+  _Slist_node_base* _M_next;
+};
+
+inline _Slist_node_base*
+__slist_make_link(_Slist_node_base* __prev_node,
+                  _Slist_node_base* __new_node)
+{
+  __new_node->_M_next = __prev_node->_M_next;
+  __prev_node->_M_next = __new_node;
+  return __new_node;
+}
+
+inline _Slist_node_base* 
+__slist_previous(_Slist_node_base* __head,
+                 const _Slist_node_base* __node)
+{
+  while (__head && __head->_M_next != __node)
+    __head = __head->_M_next;
+  return __head;
+}
+
+inline const _Slist_node_base* 
+__slist_previous(const _Slist_node_base* __head,
+                 const _Slist_node_base* __node)
+{
+  while (__head && __head->_M_next != __node)
+    __head = __head->_M_next;
+  return __head;
+}
+
+inline void __slist_splice_after(_Slist_node_base* __pos,
+                                 _Slist_node_base* __before_first,
+                                 _Slist_node_base* __before_last)
+{
+  if (__pos != __before_first && __pos != __before_last) {
+    _Slist_node_base* __first = __before_first->_M_next;
+    _Slist_node_base* __after = __pos->_M_next;
+    __before_first->_M_next = __before_last->_M_next;
+    __pos->_M_next = __first;
+    __before_last->_M_next = __after;
+  }
+}
+
+inline void
+__slist_splice_after(_Slist_node_base* __pos, _Slist_node_base* __head)
+{
+  _Slist_node_base* __before_last = __slist_previous(__head, 0);
+  if (__before_last != __head) {
+    _Slist_node_base* __after = __pos->_M_next;
+    __pos->_M_next = __head->_M_next;
+    __head->_M_next = 0;
+    __before_last->_M_next = __after;
+  }
+}
+
+inline _Slist_node_base* __slist_reverse(_Slist_node_base* __node)
+{
+  _Slist_node_base* __result = __node;
+  __node = __node->_M_next;
+  __result->_M_next = 0;
+  while(__node) {
+    _Slist_node_base* __next = __node->_M_next;
+    __node->_M_next = __result;
+    __result = __node;
+    __node = __next;
+  }
+  return __result;
+}
+
+inline size_t __slist_size(_Slist_node_base* __node)
+{
+  size_t __result = 0;
+  for ( ; __node != 0; __node = __node->_M_next)
+    ++__result;
+  return __result;
+}
+
+template 
+struct _Slist_node : public _Slist_node_base
+{
+  _Tp _M_data;
+};
+
+struct _Slist_iterator_base
+{
+  typedef size_t                    size_type;
+  typedef ptrdiff_t                 difference_type;
+  typedef std::forward_iterator_tag iterator_category;
+
+  _Slist_node_base* _M_node;
+
+  _Slist_iterator_base(_Slist_node_base* __x) : _M_node(__x) {}
+  void _M_incr() { _M_node = _M_node->_M_next; }
+
+  bool operator==(const _Slist_iterator_base& __x) const {
+    return _M_node == __x._M_node;
+  }
+  bool operator!=(const _Slist_iterator_base& __x) const {
+    return _M_node != __x._M_node;
+  }
+};
+
+template 
+struct _Slist_iterator : public _Slist_iterator_base
+{
+  typedef _Slist_iterator<_Tp, _Tp&, _Tp*>             iterator;
+  typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+  typedef _Slist_iterator<_Tp, _Ref, _Ptr>             _Self;
+
+  typedef _Tp              value_type;
+  typedef _Ptr             pointer;
+  typedef _Ref             reference;
+  typedef _Slist_node<_Tp> _Node;
+
+  _Slist_iterator(_Node* __x) : _Slist_iterator_base(__x) {}
+  _Slist_iterator() : _Slist_iterator_base(0) {}
+  _Slist_iterator(const iterator& __x) : _Slist_iterator_base(__x._M_node) {}
+
+  reference operator*() const { return ((_Node*) _M_node)->_M_data; }
+  pointer operator->() const { return &(operator*()); }
+
+  _Self& operator++()
+  {
+    _M_incr();
+    return *this;
+  }
+  _Self operator++(int)
+  {
+    _Self __tmp = *this;
+    _M_incr();
+    return __tmp;
+  }
+};
+
+
+// Base class that encapsulates details of allocators.  Three cases:
+// an ordinary standard-conforming allocator, a standard-conforming
+// allocator with no non-static data, and an SGI-style allocator.
+// This complexity is necessary only because we're worrying about backward
+// compatibility and because we want to avoid wasting storage on an 
+// allocator instance if it isn't necessary.
+
+// Base for general standard-conforming allocators.
+template 
+class _Slist_alloc_base {
+public:
+  typedef typename _Alloc_traits<_Tp,_Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return _M_node_allocator; }
+
+  _Slist_alloc_base(const allocator_type& __a) : _M_node_allocator(__a) {}
+
+protected:
+  _Slist_node<_Tp>* _M_get_node() 
+    { return _M_node_allocator.allocate(1); }
+  void _M_put_node(_Slist_node<_Tp>* __p) 
+    { _M_node_allocator.deallocate(__p, 1); }
+
+protected:
+  typename _Alloc_traits<_Slist_node<_Tp>,_Allocator>::allocator_type
+           _M_node_allocator;
+  _Slist_node_base _M_head;
+};
+
+// Specialization for instanceless allocators.
+template 
+class _Slist_alloc_base<_Tp,_Allocator, true> {
+public:
+  typedef typename _Alloc_traits<_Tp,_Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return allocator_type(); }
+
+  _Slist_alloc_base(const allocator_type&) {}
+
+protected:
+  typedef typename _Alloc_traits<_Slist_node<_Tp>, _Allocator>::_Alloc_type
+          _Alloc_type;
+  _Slist_node<_Tp>* _M_get_node() { return _Alloc_type::allocate(1); }
+  void _M_put_node(_Slist_node<_Tp>* __p) { _Alloc_type::deallocate(__p, 1); }
+
+protected:
+  _Slist_node_base _M_head;
+};
+
+
+template 
+struct _Slist_base
+  : public _Slist_alloc_base<_Tp, _Alloc,
+                             _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+{
+  typedef _Slist_alloc_base<_Tp, _Alloc,
+                            _Alloc_traits<_Tp, _Alloc>::_S_instanceless>
+          _Base;
+  typedef typename _Base::allocator_type allocator_type;
+
+  _Slist_base(const allocator_type& __a)
+    : _Base(__a) { this->_M_head._M_next = 0; }
+  ~_Slist_base() { _M_erase_after(&this->_M_head, 0); }
+
+protected:
+
+  _Slist_node_base* _M_erase_after(_Slist_node_base* __pos)
+  {
+    _Slist_node<_Tp>* __next = (_Slist_node<_Tp>*) (__pos->_M_next);
+    _Slist_node_base* __next_next = __next->_M_next;
+    __pos->_M_next = __next_next;
+    _Destroy(&__next->_M_data);
+    _M_put_node(__next);
+    return __next_next;
+  }
+  _Slist_node_base* _M_erase_after(_Slist_node_base*, _Slist_node_base*);
+};
+
+template  
+_Slist_node_base*
+_Slist_base<_Tp,_Alloc>::_M_erase_after(_Slist_node_base* __before_first,
+                                        _Slist_node_base* __last_node) {
+  _Slist_node<_Tp>* __cur = (_Slist_node<_Tp>*) (__before_first->_M_next);
+  while (__cur != __last_node) {
+    _Slist_node<_Tp>* __tmp = __cur;
+    __cur = (_Slist_node<_Tp>*) __cur->_M_next;
+    _Destroy(&__tmp->_M_data);
+    _M_put_node(__tmp);
+  }
+  __before_first->_M_next = __last_node;
+  return __last_node;
+}
+
+template  >
+class slist : private _Slist_base<_Tp,_Alloc>
+{
+  // concept requirements
+  __glibcpp_class_requires(_Tp, _SGIAssignableConcept)
+
+private:
+  typedef _Slist_base<_Tp,_Alloc> _Base;
+public:
+  typedef _Tp               value_type;
+  typedef value_type*       pointer;
+  typedef const value_type* const_pointer;
+  typedef value_type&       reference;
+  typedef const value_type& const_reference;
+  typedef size_t            size_type;
+  typedef ptrdiff_t         difference_type;
+
+  typedef _Slist_iterator<_Tp, _Tp&, _Tp*>             iterator;
+  typedef _Slist_iterator<_Tp, const _Tp&, const _Tp*> const_iterator;
+
+  typedef typename _Base::allocator_type allocator_type;
+  allocator_type get_allocator() const { return _Base::get_allocator(); }
+
+private:
+  typedef _Slist_node<_Tp>      _Node;
+  typedef _Slist_node_base      _Node_base;
+  typedef _Slist_iterator_base  _Iterator_base;
+
+  _Node* _M_create_node(const value_type& __x) {
+    _Node* __node = this->_M_get_node();
+    try {
+      _Construct(&__node->_M_data, __x);
+      __node->_M_next = 0;
+    }
+    catch(...)
+      {
+	this->_M_put_node(__node);
+	__throw_exception_again;
+      }
+    return __node;
+  }
+  
+  _Node* _M_create_node() {
+    _Node* __node = this->_M_get_node();
+    try {
+      _Construct(&__node->_M_data);
+      __node->_M_next = 0;
+    }
+    catch(...)
+      {
+	this->_M_put_node(__node);
+	__throw_exception_again;
+      }
+    return __node;
+  }
+
+public:
+  explicit slist(const allocator_type& __a = allocator_type()) : _Base(__a) {}
+
+  slist(size_type __n, const value_type& __x,
+        const allocator_type& __a =  allocator_type()) : _Base(__a)
+    { _M_insert_after_fill(&this->_M_head, __n, __x); }
+
+  explicit slist(size_type __n) : _Base(allocator_type())
+    { _M_insert_after_fill(&this->_M_head, __n, value_type()); }
+
+  // We don't need any dispatching tricks here, because _M_insert_after_range
+  // already does them.
+  template 
+  slist(_InputIterator __first, _InputIterator __last,
+        const allocator_type& __a =  allocator_type()) : _Base(__a)
+    { _M_insert_after_range(&this->_M_head, __first, __last); }
+
+  slist(const slist& __x) : _Base(__x.get_allocator())
+    { _M_insert_after_range(&this->_M_head, __x.begin(), __x.end()); }
+
+  slist& operator= (const slist& __x);
+
+  ~slist() {}
+
+public:
+  // assign(), a generalized assignment member function.  Two
+  // versions: one that takes a count, and one that takes a range.
+  // The range version is a member template, so we dispatch on whether
+  // or not the type is an integer.
+
+  void assign(size_type __n, const _Tp& __val)
+    { _M_fill_assign(__n, __val); }
+
+  void _M_fill_assign(size_type __n, const _Tp& __val);
+
+  template 
+  void assign(_InputIterator __first, _InputIterator __last) {
+    typedef typename _Is_integer<_InputIterator>::_Integral _Integral;
+    _M_assign_dispatch(__first, __last, _Integral());
+  }
+
+  template 
+  void _M_assign_dispatch(_Integer __n, _Integer __val, __true_type)
+    { _M_fill_assign((size_type) __n, (_Tp) __val); }
+
+  template 
+  void _M_assign_dispatch(_InputIterator __first, _InputIterator __last,
+                          __false_type);
+
+public:
+
+  iterator begin() { return iterator((_Node*)this->_M_head._M_next); }
+  const_iterator begin() const 
+    { return const_iterator((_Node*)this->_M_head._M_next);}
+
+  iterator end() { return iterator(0); }
+  const_iterator end() const { return const_iterator(0); }
+
+  // Experimental new feature: before_begin() returns a
+  // non-dereferenceable iterator that, when incremented, yields
+  // begin().  This iterator may be used as the argument to
+  // insert_after, erase_after, etc.  Note that even for an empty 
+  // slist, before_begin() is not the same iterator as end().  It 
+  // is always necessary to increment before_begin() at least once to
+  // obtain end().
+  iterator before_begin() { return iterator((_Node*) &this->_M_head); }
+  const_iterator before_begin() const
+    { return const_iterator((_Node*) &this->_M_head); }
+
+  size_type size() const { return __slist_size(this->_M_head._M_next); }
+  
+  size_type max_size() const { return size_type(-1); }
+
+  bool empty() const { return this->_M_head._M_next == 0; }
+
+  void swap(slist& __x)
+    { std::swap(this->_M_head._M_next, __x._M_head._M_next); }
+
+public:
+
+  reference front() { return ((_Node*) this->_M_head._M_next)->_M_data; }
+  const_reference front() const 
+    { return ((_Node*) this->_M_head._M_next)->_M_data; }
+  void push_front(const value_type& __x)   {
+    __slist_make_link(&this->_M_head, _M_create_node(__x));
+  }
+  void push_front() { __slist_make_link(&this->_M_head, _M_create_node()); }
+  void pop_front() {
+    _Node* __node = (_Node*) this->_M_head._M_next;
+    this->_M_head._M_next = __node->_M_next;
+    _Destroy(&__node->_M_data);
+    this->_M_put_node(__node);
+  }
+
+  iterator previous(const_iterator __pos) {
+    return iterator((_Node*) __slist_previous(&this->_M_head, __pos._M_node));
+  }
+  const_iterator previous(const_iterator __pos) const {
+    return const_iterator((_Node*) __slist_previous(&this->_M_head,
+                                                    __pos._M_node));
+  }
+
+private:
+  _Node* _M_insert_after(_Node_base* __pos, const value_type& __x) {
+    return (_Node*) (__slist_make_link(__pos, _M_create_node(__x)));
+  }
+
+  _Node* _M_insert_after(_Node_base* __pos) {
+    return (_Node*) (__slist_make_link(__pos, _M_create_node()));
+  }
+
+  void _M_insert_after_fill(_Node_base* __pos,
+                            size_type __n, const value_type& __x) {
+    for (size_type __i = 0; __i < __n; ++__i)
+      __pos = __slist_make_link(__pos, _M_create_node(__x));
+  }
+
+  // Check whether it's an integral type.  If so, it's not an iterator.
+  template 
+  void _M_insert_after_range(_Node_base* __pos, 
+                             _InIter __first, _InIter __last) {
+    typedef typename _Is_integer<_InIter>::_Integral _Integral;
+    _M_insert_after_range(__pos, __first, __last, _Integral());
+  }
+
+  template 
+  void _M_insert_after_range(_Node_base* __pos, _Integer __n, _Integer __x,
+                             __true_type) {
+    _M_insert_after_fill(__pos, __n, __x);
+  }
+
+  template 
+  void _M_insert_after_range(_Node_base* __pos,
+                             _InIter __first, _InIter __last,
+                             __false_type) {
+    while (__first != __last) {
+      __pos = __slist_make_link(__pos, _M_create_node(*__first));
+      ++__first;
+    }
+  }
+
+public:
+
+  iterator insert_after(iterator __pos, const value_type& __x) {
+    return iterator(_M_insert_after(__pos._M_node, __x));
+  }
+
+  iterator insert_after(iterator __pos) {
+    return insert_after(__pos, value_type());
+  }
+
+  void insert_after(iterator __pos, size_type __n, const value_type& __x) {
+    _M_insert_after_fill(__pos._M_node, __n, __x);
+  }
+
+  // We don't need any dispatching tricks here, because _M_insert_after_range
+  // already does them.
+  template 
+  void insert_after(iterator __pos, _InIter __first, _InIter __last) {
+    _M_insert_after_range(__pos._M_node, __first, __last);
+  }
+
+  iterator insert(iterator __pos, const value_type& __x) {
+    return iterator(_M_insert_after(__slist_previous(&this->_M_head,
+                                                     __pos._M_node),
+                    __x));
+  }
+
+  iterator insert(iterator __pos) {
+    return iterator(_M_insert_after(__slist_previous(&this->_M_head,
+                                                     __pos._M_node),
+                                    value_type()));
+  }
+
+  void insert(iterator __pos, size_type __n, const value_type& __x) {
+    _M_insert_after_fill(__slist_previous(&this->_M_head, __pos._M_node),
+                         __n, __x);
+  } 
+    
+  // We don't need any dispatching tricks here, because _M_insert_after_range
+  // already does them.
+  template 
+  void insert(iterator __pos, _InIter __first, _InIter __last) {
+    _M_insert_after_range(__slist_previous(&this->_M_head, __pos._M_node), 
+                          __first, __last);
+  }
+
+public:
+  iterator erase_after(iterator __pos) {
+    return iterator((_Node*) this->_M_erase_after(__pos._M_node));
+  }
+  iterator erase_after(iterator __before_first, iterator __last) {
+    return iterator((_Node*) this->_M_erase_after(__before_first._M_node, 
+                                                  __last._M_node));
+  } 
+
+  iterator erase(iterator __pos) {
+    return (_Node*) this->_M_erase_after(__slist_previous(&this->_M_head, 
+                                                          __pos._M_node));
+  }
+  iterator erase(iterator __first, iterator __last) {
+    return (_Node*) this->_M_erase_after(
+      __slist_previous(&this->_M_head, __first._M_node), __last._M_node);
+  }
+
+  void resize(size_type new_size, const _Tp& __x);
+  void resize(size_type new_size) { resize(new_size, _Tp()); }
+  void clear() { this->_M_erase_after(&this->_M_head, 0); }
+
+public:
+  // Moves the range [__before_first + 1, __before_last + 1) to *this,
+  //  inserting it immediately after __pos.  This is constant time.
+  void splice_after(iterator __pos, 
+                    iterator __before_first, iterator __before_last)
+  {
+    if (__before_first != __before_last) 
+      __slist_splice_after(__pos._M_node, __before_first._M_node, 
+                           __before_last._M_node);
+  }
+
+  // Moves the element that follows __prev to *this, inserting it immediately
+  //  after __pos.  This is constant time.
+  void splice_after(iterator __pos, iterator __prev)
+  {
+    __slist_splice_after(__pos._M_node,
+                         __prev._M_node, __prev._M_node->_M_next);
+  }
+
+
+  // Removes all of the elements from the list __x to *this, inserting
+  // them immediately after __pos.  __x must not be *this.  Complexity:
+  // linear in __x.size().
+  void splice_after(iterator __pos, slist& __x)
+  {
+    __slist_splice_after(__pos._M_node, &__x._M_head);
+  }
+
+  // Linear in distance(begin(), __pos), and linear in __x.size().
+  void splice(iterator __pos, slist& __x) {
+    if (__x._M_head._M_next)
+      __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
+                           &__x._M_head, __slist_previous(&__x._M_head, 0));
+  }
+
+  // Linear in distance(begin(), __pos), and in distance(__x.begin(), __i).
+  void splice(iterator __pos, slist& __x, iterator __i) {
+    __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
+                         __slist_previous(&__x._M_head, __i._M_node),
+                         __i._M_node);
+  }
+
+  // Linear in distance(begin(), __pos), in distance(__x.begin(), __first),
+  // and in distance(__first, __last).
+  void splice(iterator __pos, slist& __x, iterator __first, iterator __last)
+  {
+    if (__first != __last)
+      __slist_splice_after(__slist_previous(&this->_M_head, __pos._M_node),
+                           __slist_previous(&__x._M_head, __first._M_node),
+                           __slist_previous(__first._M_node, __last._M_node));
+  }
+
+public:
+  void reverse() { 
+    if (this->_M_head._M_next)
+      this->_M_head._M_next = __slist_reverse(this->_M_head._M_next);
+  }
+
+  void remove(const _Tp& __val); 
+  void unique(); 
+  void merge(slist& __x);
+  void sort();     
+
+  template  
+  void remove_if(_Predicate __pred);
+
+  template  
+  void unique(_BinaryPredicate __pred); 
+
+  template  
+  void merge(slist&, _StrictWeakOrdering);
+
+  template  
+  void sort(_StrictWeakOrdering __comp); 
+};
+
+template 
+slist<_Tp,_Alloc>& slist<_Tp,_Alloc>::operator=(const slist<_Tp,_Alloc>& __x)
+{
+  if (&__x != this) {
+    _Node_base* __p1 = &this->_M_head;
+    _Node* __n1 = (_Node*) this->_M_head._M_next;
+    const _Node* __n2 = (const _Node*) __x._M_head._M_next;
+    while (__n1 && __n2) {
+      __n1->_M_data = __n2->_M_data;
+      __p1 = __n1;
+      __n1 = (_Node*) __n1->_M_next;
+      __n2 = (const _Node*) __n2->_M_next;
+    }
+    if (__n2 == 0)
+      this->_M_erase_after(__p1, 0);
+    else
+      _M_insert_after_range(__p1, const_iterator((_Node*)__n2), 
+                                  const_iterator(0));
+  }
+  return *this;
+}
+
+template 
+void slist<_Tp, _Alloc>::_M_fill_assign(size_type __n, const _Tp& __val) {
+  _Node_base* __prev = &this->_M_head;
+  _Node* __node = (_Node*) this->_M_head._M_next;
+  for ( ; __node != 0 && __n > 0 ; --__n) {
+    __node->_M_data = __val;
+    __prev = __node;
+    __node = (_Node*) __node->_M_next;
+  }
+  if (__n > 0)
+    _M_insert_after_fill(__prev, __n, __val);
+  else
+    this->_M_erase_after(__prev, 0);
+}
+
+template  template 
+void
+slist<_Tp, _Alloc>::_M_assign_dispatch(_InputIter __first, _InputIter __last,
+                                       __false_type)
+{
+  _Node_base* __prev = &this->_M_head;
+  _Node* __node = (_Node*) this->_M_head._M_next;
+  while (__node != 0 && __first != __last) {
+    __node->_M_data = *__first;
+    __prev = __node;
+    __node = (_Node*) __node->_M_next;
+    ++__first;
+  }
+  if (__first != __last)
+    _M_insert_after_range(__prev, __first, __last);
+  else
+    this->_M_erase_after(__prev, 0);
+}
+
+template 
+inline bool 
+operator==(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2)
+{
+  typedef typename slist<_Tp,_Alloc>::const_iterator const_iterator;
+  const_iterator __end1 = _SL1.end();
+  const_iterator __end2 = _SL2.end();
+
+  const_iterator __i1 = _SL1.begin();
+  const_iterator __i2 = _SL2.begin();
+  while (__i1 != __end1 && __i2 != __end2 && *__i1 == *__i2) {
+    ++__i1;
+    ++__i2;
+  }
+  return __i1 == __end1 && __i2 == __end2;
+}
+
+
+template 
+inline bool
+operator<(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2)
+{
+  return std::lexicographical_compare(_SL1.begin(), _SL1.end(), 
+				      _SL2.begin(), _SL2.end());
+}
+
+template 
+inline bool 
+operator!=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
+  return !(_SL1 == _SL2);
+}
+
+template 
+inline bool 
+operator>(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
+  return _SL2 < _SL1;
+}
+
+template 
+inline bool 
+operator<=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
+  return !(_SL2 < _SL1);
+}
+
+template 
+inline bool 
+operator>=(const slist<_Tp,_Alloc>& _SL1, const slist<_Tp,_Alloc>& _SL2) {
+  return !(_SL1 < _SL2);
+}
+
+template 
+inline void swap(slist<_Tp,_Alloc>& __x, slist<_Tp,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+
+template 
+void slist<_Tp,_Alloc>::resize(size_type __len, const _Tp& __x)
+{
+  _Node_base* __cur = &this->_M_head;
+  while (__cur->_M_next != 0 && __len > 0) {
+    --__len;
+    __cur = __cur->_M_next;
+  }
+  if (__cur->_M_next) 
+    this->_M_erase_after(__cur, 0);
+  else
+    _M_insert_after_fill(__cur, __len, __x);
+}
+
+template 
+void slist<_Tp,_Alloc>::remove(const _Tp& __val)
+{
+  _Node_base* __cur = &this->_M_head;
+  while (__cur && __cur->_M_next) {
+    if (((_Node*) __cur->_M_next)->_M_data == __val)
+      this->_M_erase_after(__cur);
+    else
+      __cur = __cur->_M_next;
+  }
+}
+
+template  
+void slist<_Tp,_Alloc>::unique()
+{
+  _Node_base* __cur = this->_M_head._M_next;
+  if (__cur) {
+    while (__cur->_M_next) {
+      if (((_Node*)__cur)->_M_data == 
+          ((_Node*)(__cur->_M_next))->_M_data)
+        this->_M_erase_after(__cur);
+      else
+        __cur = __cur->_M_next;
+    }
+  }
+}
+
+template 
+void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x)
+{
+  _Node_base* __n1 = &this->_M_head;
+  while (__n1->_M_next && __x._M_head._M_next) {
+    if (((_Node*) __x._M_head._M_next)->_M_data < 
+        ((_Node*)       __n1->_M_next)->_M_data) 
+      __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
+    __n1 = __n1->_M_next;
+  }
+  if (__x._M_head._M_next) {
+    __n1->_M_next = __x._M_head._M_next;
+    __x._M_head._M_next = 0;
+  }
+}
+
+template 
+void slist<_Tp,_Alloc>::sort()
+{
+  if (this->_M_head._M_next && this->_M_head._M_next->_M_next) {
+    slist __carry;
+    slist __counter[64];
+    int __fill = 0;
+    while (!empty()) {
+      __slist_splice_after(&__carry._M_head,
+                           &this->_M_head, this->_M_head._M_next);
+      int __i = 0;
+      while (__i < __fill && !__counter[__i].empty()) {
+        __counter[__i].merge(__carry);
+        __carry.swap(__counter[__i]);
+        ++__i;
+      }
+      __carry.swap(__counter[__i]);
+      if (__i == __fill)
+        ++__fill;
+    }
+
+    for (int __i = 1; __i < __fill; ++__i)
+      __counter[__i].merge(__counter[__i-1]);
+    this->swap(__counter[__fill-1]);
+  }
+}
+
+template  
+template 
+void slist<_Tp,_Alloc>::remove_if(_Predicate __pred)
+{
+  _Node_base* __cur = &this->_M_head;
+  while (__cur->_M_next) {
+    if (__pred(((_Node*) __cur->_M_next)->_M_data))
+      this->_M_erase_after(__cur);
+    else
+      __cur = __cur->_M_next;
+  }
+}
+
+template  template  
+void slist<_Tp,_Alloc>::unique(_BinaryPredicate __pred)
+{
+  _Node* __cur = (_Node*) this->_M_head._M_next;
+  if (__cur) {
+    while (__cur->_M_next) {
+      if (__pred(((_Node*)__cur)->_M_data, 
+                 ((_Node*)(__cur->_M_next))->_M_data))
+        this->_M_erase_after(__cur);
+      else
+        __cur = (_Node*) __cur->_M_next;
+    }
+  }
+}
+
+template  template 
+void slist<_Tp,_Alloc>::merge(slist<_Tp,_Alloc>& __x,
+                              _StrictWeakOrdering __comp)
+{
+  _Node_base* __n1 = &this->_M_head;
+  while (__n1->_M_next && __x._M_head._M_next) {
+    if (__comp(((_Node*) __x._M_head._M_next)->_M_data,
+               ((_Node*)       __n1->_M_next)->_M_data))
+      __slist_splice_after(__n1, &__x._M_head, __x._M_head._M_next);
+    __n1 = __n1->_M_next;
+  }
+  if (__x._M_head._M_next) {
+    __n1->_M_next = __x._M_head._M_next;
+    __x._M_head._M_next = 0;
+  }
+}
+
+template  template  
+void slist<_Tp,_Alloc>::sort(_StrictWeakOrdering __comp)
+{
+  if (this->_M_head._M_next && this->_M_head._M_next->_M_next) {
+    slist __carry;
+    slist __counter[64];
+    int __fill = 0;
+    while (!empty()) {
+      __slist_splice_after(&__carry._M_head,
+                           &this->_M_head, this->_M_head._M_next);
+      int __i = 0;
+      while (__i < __fill && !__counter[__i].empty()) {
+        __counter[__i].merge(__carry, __comp);
+        __carry.swap(__counter[__i]);
+        ++__i;
+      }
+      __carry.swap(__counter[__i]);
+      if (__i == __fill)
+        ++__fill;
+    }
+
+    for (int __i = 1; __i < __fill; ++__i)
+      __counter[__i].merge(__counter[__i-1], __comp);
+    this->swap(__counter[__fill-1]);
+  }
+}
+
+} // namespace __gnu_cxx
+
+namespace std
+{
+// Specialization of insert_iterator so that insertions will be constant
+// time rather than linear time.
+
+template 
+class insert_iterator<__gnu_cxx::slist<_Tp, _Alloc> > {
+protected:
+  typedef __gnu_cxx::slist<_Tp, _Alloc> _Container;
+  _Container* container;
+  typename _Container::iterator iter;
+public:
+  typedef _Container          container_type;
+  typedef output_iterator_tag iterator_category;
+  typedef void                value_type;
+  typedef void                difference_type;
+  typedef void                pointer;
+  typedef void                reference;
+
+  insert_iterator(_Container& __x, typename _Container::iterator __i) 
+    : container(&__x) {
+    if (__i == __x.begin())
+      iter = __x.before_begin();
+    else
+      iter = __x.previous(__i);
+  }
+
+  insert_iterator<_Container>&
+  operator=(const typename _Container::value_type& __value) { 
+    iter = container->insert_after(iter, __value);
+    return *this;
+  }
+  insert_iterator<_Container>& operator*() { return *this; }
+  insert_iterator<_Container>& operator++() { return *this; }
+  insert_iterator<_Container>& operator++(int) { return *this; }
+};
+
+} // namespace std
+
+#endif /* __SGI_STL_INTERNAL_SLIST_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/stdio_filebuf.h b/contrib/libstdc++/include/ext/stdio_filebuf.h
new file mode 100644
index 0000000..1b0d5ae
--- /dev/null
+++ b/contrib/libstdc++/include/ext/stdio_filebuf.h
@@ -0,0 +1,113 @@
+// File descriptor layer for filebuf -*- C++ -*-
+
+// 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 
+
+namespace __gnu_cxx
+{
+  template >
+    class stdio_filebuf : public std::basic_filebuf<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                     	        char_type;
+      typedef _Traits                    	        traits_type;
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+      
+    protected:
+      // Stack-based buffer for unbuffered input.
+      char_type			_M_unbuf[4];
+      
+    public:
+      stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del, 
+		    int_type __size);
+
+      stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode, 
+		    int_type __size = static_cast(BUFSIZ));
+
+      virtual
+      ~stdio_filebuf();
+
+      int
+      fd()
+      { return _M_file.fd(); }
+    };
+
+  template
+    stdio_filebuf<_CharT, _Traits>::~stdio_filebuf()
+    { }
+
+  template
+    stdio_filebuf<_CharT, _Traits>::
+    stdio_filebuf(int __fd, std::ios_base::openmode __mode, bool __del, 
+		  int_type __size)
+    {
+      _M_file.sys_open(__fd, __mode, __del);
+      if (this->is_open())
+	{
+	  _M_mode = __mode;
+	  _M_buf_size_opt = __size;
+	  
+	  if (__size > 0 && __size < 4)
+	    {
+	      _M_buf = _M_unbuf;
+	      _M_buf_size = __size;
+	    }
+	  else
+	    _M_allocate_internal_buffer();
+	  
+	  _M_set_indeterminate();
+	}
+    }
+
+  template
+    stdio_filebuf<_CharT, _Traits>::
+    stdio_filebuf(std::__c_file* __f, std::ios_base::openmode __mode, 
+		  int_type __size)
+    {
+      _M_file.sys_open(__f, __mode);
+      if (this->is_open())
+	{
+	  _M_mode = __mode;
+	  _M_buf_size_opt = __size;
+	  
+	  if (__size > 0 && __size < 4)
+	    {
+	      _M_buf = _M_unbuf;
+	      _M_buf_size = __size;
+	    }
+	  else
+	    _M_allocate_internal_buffer();
+	  
+	  _M_set_indeterminate();
+	}
+    }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/include/ext/stl_hash_fun.h b/contrib/libstdc++/include/ext/stl_hash_fun.h
new file mode 100644
index 0000000..562fe7a
--- /dev/null
+++ b/contrib/libstdc++/include/ext/stl_hash_fun.h
@@ -0,0 +1,126 @@
+// 'struct hash' from SGI -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1996-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/stl_hash_fun.h
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef _CPP_BITS_STL_HASH_FUN_H
+#define _CPP_BITS_STL_HASH_FUN_H 1
+
+#include 
+
+namespace __gnu_cxx
+{
+using std::size_t;
+
+template  struct hash { };
+
+inline size_t __stl_hash_string(const char* __s)
+{
+  unsigned long __h = 0; 
+  for ( ; *__s; ++__s)
+    __h = 5*__h + *__s;
+  
+  return size_t(__h);
+}
+
+template<> struct hash
+{
+  size_t operator()(const char* __s) const { return __stl_hash_string(__s); }
+};
+
+template<> struct hash
+{
+  size_t operator()(const char* __s) const { return __stl_hash_string(__s); }
+};
+
+template<> struct hash {
+  size_t operator()(char __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(unsigned char __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(unsigned char __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(short __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(unsigned short __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(int __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(unsigned int __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(long __x) const { return __x; }
+};
+template<> struct hash {
+  size_t operator()(unsigned long __x) const { return __x; }
+};
+
+} // namespace __gnu_cxx
+
+#endif /* _CPP_BITS_STL_HASH_FUN_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/stl_hashtable.h b/contrib/libstdc++/include/ext/stl_hashtable.h
new file mode 100644
index 0000000..5ee49d8
--- /dev/null
+++ b/contrib/libstdc++/include/ext/stl_hashtable.h
@@ -0,0 +1,982 @@
+// Hashtable implementation used by containers -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file ext/stl_hashtable.h
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+#ifndef __SGI_STL_INTERNAL_HASHTABLE_H
+#define __SGI_STL_INTERNAL_HASHTABLE_H
+
+// Hashtable class, used to implement the hashed associative containers
+// hash_set, hash_map, hash_multiset, and hash_multimap.
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace __gnu_cxx
+{
+using std::size_t;
+using std::ptrdiff_t;
+using std::forward_iterator_tag;
+using std::input_iterator_tag;
+using std::_Alloc_traits;
+using std::_Construct;
+using std::_Destroy;
+using std::distance;
+using std::vector;
+using std::pair;
+using std::__iterator_category;
+
+template 
+struct _Hashtable_node
+{
+  _Hashtable_node* _M_next;
+  _Val _M_val;
+};  
+
+template 
+class hashtable;
+
+template 
+struct _Hashtable_iterator;
+
+template 
+struct _Hashtable_const_iterator;
+
+template 
+struct _Hashtable_iterator {
+  typedef hashtable<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>
+          _Hashtable;
+  typedef _Hashtable_iterator<_Val, _Key, _HashFcn, 
+                              _ExtractKey, _EqualKey, _Alloc>
+          iterator;
+  typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, 
+                                    _ExtractKey, _EqualKey, _Alloc>
+          const_iterator;
+  typedef _Hashtable_node<_Val> _Node;
+
+  typedef forward_iterator_tag iterator_category;
+  typedef _Val value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef _Val& reference;
+  typedef _Val* pointer;
+
+  _Node* _M_cur;
+  _Hashtable* _M_ht;
+
+  _Hashtable_iterator(_Node* __n, _Hashtable* __tab) 
+    : _M_cur(__n), _M_ht(__tab) {}
+  _Hashtable_iterator() {}
+  reference operator*() const { return _M_cur->_M_val; }
+  pointer operator->() const { return &(operator*()); }
+  iterator& operator++();
+  iterator operator++(int);
+  bool operator==(const iterator& __it) const
+    { return _M_cur == __it._M_cur; }
+  bool operator!=(const iterator& __it) const
+    { return _M_cur != __it._M_cur; }
+};
+
+
+template 
+struct _Hashtable_const_iterator {
+  typedef hashtable<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>
+          _Hashtable;
+  typedef _Hashtable_iterator<_Val,_Key,_HashFcn, 
+                              _ExtractKey,_EqualKey,_Alloc>
+          iterator;
+  typedef _Hashtable_const_iterator<_Val, _Key, _HashFcn, 
+                                    _ExtractKey, _EqualKey, _Alloc>
+          const_iterator;
+  typedef _Hashtable_node<_Val> _Node;
+
+  typedef forward_iterator_tag iterator_category;
+  typedef _Val value_type;
+  typedef ptrdiff_t difference_type;
+  typedef size_t size_type;
+  typedef const _Val& reference;
+  typedef const _Val* pointer;
+
+  const _Node* _M_cur;
+  const _Hashtable* _M_ht;
+
+  _Hashtable_const_iterator(const _Node* __n, const _Hashtable* __tab)
+    : _M_cur(__n), _M_ht(__tab) {}
+  _Hashtable_const_iterator() {}
+  _Hashtable_const_iterator(const iterator& __it) 
+    : _M_cur(__it._M_cur), _M_ht(__it._M_ht) {}
+  reference operator*() const { return _M_cur->_M_val; }
+  pointer operator->() const { return &(operator*()); }
+  const_iterator& operator++();
+  const_iterator operator++(int);
+  bool operator==(const const_iterator& __it) const 
+    { return _M_cur == __it._M_cur; }
+  bool operator!=(const const_iterator& __it) const 
+    { return _M_cur != __it._M_cur; }
+};
+
+// Note: assumes long is at least 32 bits.
+enum { __stl_num_primes = 28 };
+
+static const unsigned long __stl_prime_list[__stl_num_primes] =
+{
+  53ul,         97ul,         193ul,       389ul,       769ul,
+  1543ul,       3079ul,       6151ul,      12289ul,     24593ul,
+  49157ul,      98317ul,      196613ul,    393241ul,    786433ul,
+  1572869ul,    3145739ul,    6291469ul,   12582917ul,  25165843ul,
+  50331653ul,   100663319ul,  201326611ul, 402653189ul, 805306457ul, 
+  1610612741ul, 3221225473ul, 4294967291ul
+};
+
+inline unsigned long __stl_next_prime(unsigned long __n)
+{
+  const unsigned long* __first = __stl_prime_list;
+  const unsigned long* __last = __stl_prime_list + (int)__stl_num_primes;
+  const unsigned long* pos = std::lower_bound(__first, __last, __n);
+  return pos == __last ? *(__last - 1) : *pos;
+}
+
+// Forward declaration of operator==.
+
+template 
+class hashtable;
+
+template 
+bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
+                const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2);
+
+
+// Hashtables handle allocators a bit differently than other containers
+//  do.  If we're using standard-conforming allocators, then a hashtable
+//  unconditionally has a member variable to hold its allocator, even if
+//  it so happens that all instances of the allocator type are identical.
+// This is because, for hashtables, this extra storage is negligible.  
+//  Additionally, a base class wouldn't serve any other purposes; it 
+//  wouldn't, for example, simplify the exception-handling code.
+
+template 
+class hashtable {
+public:
+  typedef _Key key_type;
+  typedef _Val value_type;
+  typedef _HashFcn hasher;
+  typedef _EqualKey key_equal;
+
+  typedef size_t            size_type;
+  typedef ptrdiff_t         difference_type;
+  typedef value_type*       pointer;
+  typedef const value_type* const_pointer;
+  typedef value_type&       reference;
+  typedef const value_type& const_reference;
+
+  hasher hash_funct() const { return _M_hash; }
+  key_equal key_eq() const { return _M_equals; }
+
+private:
+  typedef _Hashtable_node<_Val> _Node;
+
+public:
+  typedef typename _Alloc_traits<_Val,_Alloc>::allocator_type allocator_type;
+  allocator_type get_allocator() const { return _M_node_allocator; }
+private:
+  typename _Alloc_traits<_Node, _Alloc>::allocator_type _M_node_allocator;
+  _Node* _M_get_node() { return _M_node_allocator.allocate(1); }
+  void _M_put_node(_Node* __p) { _M_node_allocator.deallocate(__p, 1); }
+
+private:
+  hasher                _M_hash;
+  key_equal             _M_equals;
+  _ExtractKey           _M_get_key;
+  vector<_Node*,_Alloc> _M_buckets;
+  size_type             _M_num_elements;
+
+public:
+  typedef _Hashtable_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>
+          iterator;
+  typedef _Hashtable_const_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,
+                                    _Alloc>
+          const_iterator;
+
+  friend struct
+  _Hashtable_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>;
+  friend struct
+  _Hashtable_const_iterator<_Val,_Key,_HashFcn,_ExtractKey,_EqualKey,_Alloc>;
+
+public:
+  hashtable(size_type __n,
+            const _HashFcn&    __hf,
+            const _EqualKey&   __eql,
+            const _ExtractKey& __ext,
+            const allocator_type& __a = allocator_type())
+    : _M_node_allocator(__a),
+      _M_hash(__hf),
+      _M_equals(__eql),
+      _M_get_key(__ext),
+      _M_buckets(__a),
+      _M_num_elements(0)
+  {
+    _M_initialize_buckets(__n);
+  }
+
+  hashtable(size_type __n,
+            const _HashFcn&    __hf,
+            const _EqualKey&   __eql,
+            const allocator_type& __a = allocator_type())
+    : _M_node_allocator(__a),
+      _M_hash(__hf),
+      _M_equals(__eql),
+      _M_get_key(_ExtractKey()),
+      _M_buckets(__a),
+      _M_num_elements(0)
+  {
+    _M_initialize_buckets(__n);
+  }
+
+  hashtable(const hashtable& __ht)
+    : _M_node_allocator(__ht.get_allocator()),
+      _M_hash(__ht._M_hash),
+      _M_equals(__ht._M_equals),
+      _M_get_key(__ht._M_get_key),
+      _M_buckets(__ht.get_allocator()),
+      _M_num_elements(0)
+  {
+    _M_copy_from(__ht);
+  }
+
+  hashtable& operator= (const hashtable& __ht)
+  {
+    if (&__ht != this) {
+      clear();
+      _M_hash = __ht._M_hash;
+      _M_equals = __ht._M_equals;
+      _M_get_key = __ht._M_get_key;
+      _M_copy_from(__ht);
+    }
+    return *this;
+  }
+
+  ~hashtable() { clear(); }
+
+  size_type size() const { return _M_num_elements; }
+  size_type max_size() const { return size_type(-1); }
+  bool empty() const { return size() == 0; }
+
+  void swap(hashtable& __ht)
+  {
+    std::swap(_M_hash, __ht._M_hash);
+    std::swap(_M_equals, __ht._M_equals);
+    std::swap(_M_get_key, __ht._M_get_key);
+    _M_buckets.swap(__ht._M_buckets);
+    std::swap(_M_num_elements, __ht._M_num_elements);
+  }
+
+  iterator begin()
+  { 
+    for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+      if (_M_buckets[__n])
+        return iterator(_M_buckets[__n], this);
+    return end();
+  }
+
+  iterator end() { return iterator(0, this); }
+
+  const_iterator begin() const
+  {
+    for (size_type __n = 0; __n < _M_buckets.size(); ++__n)
+      if (_M_buckets[__n])
+        return const_iterator(_M_buckets[__n], this);
+    return end();
+  }
+
+  const_iterator end() const { return const_iterator(0, this); }
+
+  template 
+  friend bool operator== (const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&,
+                          const hashtable<_Vl, _Ky, _HF, _Ex, _Eq, _Al>&);
+public:
+
+  size_type bucket_count() const { return _M_buckets.size(); }
+
+  size_type max_bucket_count() const
+    { return __stl_prime_list[(int)__stl_num_primes - 1]; } 
+
+  size_type elems_in_bucket(size_type __bucket) const
+  {
+    size_type __result = 0;
+    for (_Node* __cur = _M_buckets[__bucket]; __cur; __cur = __cur->_M_next)
+      __result += 1;
+    return __result;
+  }
+
+  pair insert_unique(const value_type& __obj)
+  {
+    resize(_M_num_elements + 1);
+    return insert_unique_noresize(__obj);
+  }
+
+  iterator insert_equal(const value_type& __obj)
+  {
+    resize(_M_num_elements + 1);
+    return insert_equal_noresize(__obj);
+  }
+
+  pair insert_unique_noresize(const value_type& __obj);
+  iterator insert_equal_noresize(const value_type& __obj);
+ 
+  template 
+  void insert_unique(_InputIterator __f, _InputIterator __l)
+  {
+    insert_unique(__f, __l, __iterator_category(__f));
+  }
+
+  template 
+  void insert_equal(_InputIterator __f, _InputIterator __l)
+  {
+    insert_equal(__f, __l, __iterator_category(__f));
+  }
+
+  template 
+  void insert_unique(_InputIterator __f, _InputIterator __l,
+                     input_iterator_tag)
+  {
+    for ( ; __f != __l; ++__f)
+      insert_unique(*__f);
+  }
+
+  template 
+  void insert_equal(_InputIterator __f, _InputIterator __l,
+                    input_iterator_tag)
+  {
+    for ( ; __f != __l; ++__f)
+      insert_equal(*__f);
+  }
+
+  template 
+  void insert_unique(_ForwardIterator __f, _ForwardIterator __l,
+                     forward_iterator_tag)
+  {
+    size_type __n = distance(__f, __l);
+    resize(_M_num_elements + __n);
+    for ( ; __n > 0; --__n, ++__f)
+      insert_unique_noresize(*__f);
+  }
+
+  template 
+  void insert_equal(_ForwardIterator __f, _ForwardIterator __l,
+                    forward_iterator_tag)
+  {
+    size_type __n = distance(__f, __l);
+    resize(_M_num_elements + __n);
+    for ( ; __n > 0; --__n, ++__f)
+      insert_equal_noresize(*__f);
+  }
+
+  reference find_or_insert(const value_type& __obj);
+
+  iterator find(const key_type& __key) 
+  {
+    size_type __n = _M_bkt_num_key(__key);
+    _Node* __first;
+    for ( __first = _M_buckets[__n];
+          __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+          __first = __first->_M_next)
+      {}
+    return iterator(__first, this);
+  } 
+
+  const_iterator find(const key_type& __key) const
+  {
+    size_type __n = _M_bkt_num_key(__key);
+    const _Node* __first;
+    for ( __first = _M_buckets[__n];
+          __first && !_M_equals(_M_get_key(__first->_M_val), __key);
+          __first = __first->_M_next)
+      {}
+    return const_iterator(__first, this);
+  } 
+
+  size_type count(const key_type& __key) const
+  {
+    const size_type __n = _M_bkt_num_key(__key);
+    size_type __result = 0;
+
+    for (const _Node* __cur = _M_buckets[__n]; __cur; __cur = __cur->_M_next)
+      if (_M_equals(_M_get_key(__cur->_M_val), __key))
+        ++__result;
+    return __result;
+  }
+
+  pair 
+  equal_range(const key_type& __key);
+
+  pair 
+  equal_range(const key_type& __key) const;
+
+  size_type erase(const key_type& __key);
+  void erase(const iterator& __it);
+  void erase(iterator __first, iterator __last);
+
+  void erase(const const_iterator& __it);
+  void erase(const_iterator __first, const_iterator __last);
+
+  void resize(size_type __num_elements_hint);
+  void clear();
+
+private:
+  size_type _M_next_size(size_type __n) const
+    { return __stl_next_prime(__n); }
+
+  void _M_initialize_buckets(size_type __n)
+  {
+    const size_type __n_buckets = _M_next_size(__n);
+    _M_buckets.reserve(__n_buckets);
+    _M_buckets.insert(_M_buckets.end(), __n_buckets, (_Node*) 0);
+    _M_num_elements = 0;
+  }
+
+  size_type _M_bkt_num_key(const key_type& __key) const
+  {
+    return _M_bkt_num_key(__key, _M_buckets.size());
+  }
+
+  size_type _M_bkt_num(const value_type& __obj) const
+  {
+    return _M_bkt_num_key(_M_get_key(__obj));
+  }
+
+  size_type _M_bkt_num_key(const key_type& __key, size_t __n) const
+  {
+    return _M_hash(__key) % __n;
+  }
+
+  size_type _M_bkt_num(const value_type& __obj, size_t __n) const
+  {
+    return _M_bkt_num_key(_M_get_key(__obj), __n);
+  }
+
+  _Node* _M_new_node(const value_type& __obj)
+  {
+    _Node* __n = _M_get_node();
+    __n->_M_next = 0;
+    try {
+      _Construct(&__n->_M_val, __obj);
+      return __n;
+    }
+    catch(...)
+      {
+	_M_put_node(__n);
+	__throw_exception_again;
+      }
+  }
+  
+  void _M_delete_node(_Node* __n)
+  {
+    _Destroy(&__n->_M_val);
+    _M_put_node(__n);
+  }
+
+  void _M_erase_bucket(const size_type __n, _Node* __first, _Node* __last);
+  void _M_erase_bucket(const size_type __n, _Node* __last);
+
+  void _M_copy_from(const hashtable& __ht);
+
+};
+
+template 
+_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>&
+_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++()
+{
+  const _Node* __old = _M_cur;
+  _M_cur = _M_cur->_M_next;
+  if (!_M_cur) {
+    size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+    while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+      _M_cur = _M_ht->_M_buckets[__bucket];
+  }
+  return *this;
+}
+
+template 
+inline _Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>
+_Hashtable_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++(int)
+{
+  iterator __tmp = *this;
+  ++*this;
+  return __tmp;
+}
+
+template 
+_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>&
+_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++()
+{
+  const _Node* __old = _M_cur;
+  _M_cur = _M_cur->_M_next;
+  if (!_M_cur) {
+    size_type __bucket = _M_ht->_M_bkt_num(__old->_M_val);
+    while (!_M_cur && ++__bucket < _M_ht->_M_buckets.size())
+      _M_cur = _M_ht->_M_buckets[__bucket];
+  }
+  return *this;
+}
+
+template 
+inline _Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>
+_Hashtable_const_iterator<_Val,_Key,_HF,_ExK,_EqK,_All>::operator++(int)
+{
+  const_iterator __tmp = *this;
+  ++*this;
+  return __tmp;
+}
+
+template 
+bool operator==(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
+                const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2)
+{
+  typedef typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::_Node _Node;
+  if (__ht1._M_buckets.size() != __ht2._M_buckets.size())
+    return false;
+  for (size_t __n = 0; __n < __ht1._M_buckets.size(); ++__n) {
+    _Node* __cur1 = __ht1._M_buckets[__n];
+    _Node* __cur2 = __ht2._M_buckets[__n];
+    for ( ; __cur1 && __cur2 && __cur1->_M_val == __cur2->_M_val;
+          __cur1 = __cur1->_M_next, __cur2 = __cur2->_M_next)
+      {}
+    if (__cur1 || __cur2)
+      return false;
+  }
+  return true;
+}  
+
+template 
+inline bool operator!=(const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht1,
+                       const hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>& __ht2) {
+  return !(__ht1 == __ht2);
+}
+
+template 
+inline void swap(hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht1,
+                 hashtable<_Val, _Key, _HF, _Extract, _EqKey, _All>& __ht2) {
+  __ht1.swap(__ht2);
+}
+
+
+template 
+pair::iterator, bool> 
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::insert_unique_noresize(const value_type& __obj)
+{
+  const size_type __n = _M_bkt_num(__obj);
+  _Node* __first = _M_buckets[__n];
+
+  for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) 
+    if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+      return pair(iterator(__cur, this), false);
+
+  _Node* __tmp = _M_new_node(__obj);
+  __tmp->_M_next = __first;
+  _M_buckets[__n] = __tmp;
+  ++_M_num_elements;
+  return pair(iterator(__tmp, this), true);
+}
+
+template 
+typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator 
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::insert_equal_noresize(const value_type& __obj)
+{
+  const size_type __n = _M_bkt_num(__obj);
+  _Node* __first = _M_buckets[__n];
+
+  for (_Node* __cur = __first; __cur; __cur = __cur->_M_next) 
+    if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj))) {
+      _Node* __tmp = _M_new_node(__obj);
+      __tmp->_M_next = __cur->_M_next;
+      __cur->_M_next = __tmp;
+      ++_M_num_elements;
+      return iterator(__tmp, this);
+    }
+
+  _Node* __tmp = _M_new_node(__obj);
+  __tmp->_M_next = __first;
+  _M_buckets[__n] = __tmp;
+  ++_M_num_elements;
+  return iterator(__tmp, this);
+}
+
+template 
+typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::reference 
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::find_or_insert(const value_type& __obj)
+{
+  resize(_M_num_elements + 1);
+
+  size_type __n = _M_bkt_num(__obj);
+  _Node* __first = _M_buckets[__n];
+
+  for (_Node* __cur = __first; __cur; __cur = __cur->_M_next)
+    if (_M_equals(_M_get_key(__cur->_M_val), _M_get_key(__obj)))
+      return __cur->_M_val;
+
+  _Node* __tmp = _M_new_node(__obj);
+  __tmp->_M_next = __first;
+  _M_buckets[__n] = __tmp;
+  ++_M_num_elements;
+  return __tmp->_M_val;
+}
+
+template 
+pair::iterator,
+     typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::iterator> 
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::equal_range(const key_type& __key)
+{
+  typedef pair _Pii;
+  const size_type __n = _M_bkt_num_key(__key);
+
+  for (_Node* __first = _M_buckets[__n]; __first; __first = __first->_M_next)
+    if (_M_equals(_M_get_key(__first->_M_val), __key)) {
+      for (_Node* __cur = __first->_M_next; __cur; __cur = __cur->_M_next)
+        if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+          return _Pii(iterator(__first, this), iterator(__cur, this));
+      for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+        if (_M_buckets[__m])
+          return _Pii(iterator(__first, this),
+                     iterator(_M_buckets[__m], this));
+      return _Pii(iterator(__first, this), end());
+    }
+  return _Pii(end(), end());
+}
+
+template 
+pair::const_iterator, 
+     typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::const_iterator> 
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::equal_range(const key_type& __key) const
+{
+  typedef pair _Pii;
+  const size_type __n = _M_bkt_num_key(__key);
+
+  for (const _Node* __first = _M_buckets[__n] ;
+       __first; 
+       __first = __first->_M_next) {
+    if (_M_equals(_M_get_key(__first->_M_val), __key)) {
+      for (const _Node* __cur = __first->_M_next;
+           __cur;
+           __cur = __cur->_M_next)
+        if (!_M_equals(_M_get_key(__cur->_M_val), __key))
+          return _Pii(const_iterator(__first, this),
+                      const_iterator(__cur, this));
+      for (size_type __m = __n + 1; __m < _M_buckets.size(); ++__m)
+        if (_M_buckets[__m])
+          return _Pii(const_iterator(__first, this),
+                      const_iterator(_M_buckets[__m], this));
+      return _Pii(const_iterator(__first, this), end());
+    }
+  }
+  return _Pii(end(), end());
+}
+
+template 
+typename hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::size_type 
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const key_type& __key)
+{
+  const size_type __n = _M_bkt_num_key(__key);
+  _Node* __first = _M_buckets[__n];
+  size_type __erased = 0;
+
+  if (__first) {
+    _Node* __cur = __first;
+    _Node* __next = __cur->_M_next;
+    while (__next) {
+      if (_M_equals(_M_get_key(__next->_M_val), __key)) {
+        __cur->_M_next = __next->_M_next;
+        _M_delete_node(__next);
+        __next = __cur->_M_next;
+        ++__erased;
+        --_M_num_elements;
+      }
+      else {
+        __cur = __next;
+        __next = __cur->_M_next;
+      }
+    }
+    if (_M_equals(_M_get_key(__first->_M_val), __key)) {
+      _M_buckets[__n] = __first->_M_next;
+      _M_delete_node(__first);
+      ++__erased;
+      --_M_num_elements;
+    }
+  }
+  return __erased;
+}
+
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const iterator& __it)
+{
+  _Node* __p = __it._M_cur;
+  if (__p) {
+    const size_type __n = _M_bkt_num(__p->_M_val);
+    _Node* __cur = _M_buckets[__n];
+
+    if (__cur == __p) {
+      _M_buckets[__n] = __cur->_M_next;
+      _M_delete_node(__cur);
+      --_M_num_elements;
+    }
+    else {
+      _Node* __next = __cur->_M_next;
+      while (__next) {
+        if (__next == __p) {
+          __cur->_M_next = __next->_M_next;
+          _M_delete_node(__next);
+          --_M_num_elements;
+          break;
+        }
+        else {
+          __cur = __next;
+          __next = __cur->_M_next;
+        }
+      }
+    }
+  }
+}
+
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::erase(iterator __first, iterator __last)
+{
+  size_type __f_bucket = __first._M_cur ? 
+    _M_bkt_num(__first._M_cur->_M_val) : _M_buckets.size();
+  size_type __l_bucket = __last._M_cur ? 
+    _M_bkt_num(__last._M_cur->_M_val) : _M_buckets.size();
+
+  if (__first._M_cur == __last._M_cur)
+    return;
+  else if (__f_bucket == __l_bucket)
+    _M_erase_bucket(__f_bucket, __first._M_cur, __last._M_cur);
+  else {
+    _M_erase_bucket(__f_bucket, __first._M_cur, 0);
+    for (size_type __n = __f_bucket + 1; __n < __l_bucket; ++__n)
+      _M_erase_bucket(__n, 0);
+    if (__l_bucket != _M_buckets.size())
+      _M_erase_bucket(__l_bucket, __last._M_cur);
+  }
+}
+
+template 
+inline void
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const_iterator __first,
+                                             const_iterator __last)
+{
+  erase(iterator(const_cast<_Node*>(__first._M_cur),
+                 const_cast(__first._M_ht)),
+        iterator(const_cast<_Node*>(__last._M_cur),
+                 const_cast(__last._M_ht)));
+}
+
+template 
+inline void
+hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::erase(const const_iterator& __it)
+{
+  erase(iterator(const_cast<_Node*>(__it._M_cur),
+                 const_cast(__it._M_ht)));
+}
+
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::resize(size_type __num_elements_hint)
+{
+  const size_type __old_n = _M_buckets.size();
+  if (__num_elements_hint > __old_n) {
+    const size_type __n = _M_next_size(__num_elements_hint);
+    if (__n > __old_n) {
+      vector<_Node*, _All> __tmp(__n, (_Node*)(0),
+                                 _M_buckets.get_allocator());
+      try {
+        for (size_type __bucket = 0; __bucket < __old_n; ++__bucket) {
+          _Node* __first = _M_buckets[__bucket];
+          while (__first) {
+            size_type __new_bucket = _M_bkt_num(__first->_M_val, __n);
+            _M_buckets[__bucket] = __first->_M_next;
+            __first->_M_next = __tmp[__new_bucket];
+            __tmp[__new_bucket] = __first;
+            __first = _M_buckets[__bucket];          
+          }
+        }
+        _M_buckets.swap(__tmp);
+      }
+      catch(...) {
+        for (size_type __bucket = 0; __bucket < __tmp.size(); ++__bucket) {
+          while (__tmp[__bucket]) {
+            _Node* __next = __tmp[__bucket]->_M_next;
+            _M_delete_node(__tmp[__bucket]);
+            __tmp[__bucket] = __next;
+          }
+        }
+        __throw_exception_again;
+      }
+    }
+  }
+}
+
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::_M_erase_bucket(const size_type __n, _Node* __first, _Node* __last)
+{
+  _Node* __cur = _M_buckets[__n];
+  if (__cur == __first)
+    _M_erase_bucket(__n, __last);
+  else {
+    _Node* __next;
+    for (__next = __cur->_M_next; 
+         __next != __first; 
+         __cur = __next, __next = __cur->_M_next)
+      ;
+    while (__next != __last) {
+      __cur->_M_next = __next->_M_next;
+      _M_delete_node(__next);
+      __next = __cur->_M_next;
+      --_M_num_elements;
+    }
+  }
+}
+
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::_M_erase_bucket(const size_type __n, _Node* __last)
+{
+  _Node* __cur = _M_buckets[__n];
+  while (__cur != __last) {
+    _Node* __next = __cur->_M_next;
+    _M_delete_node(__cur);
+    __cur = __next;
+    _M_buckets[__n] = __cur;
+    --_M_num_elements;
+  }
+}
+
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>::clear()
+{
+  for (size_type __i = 0; __i < _M_buckets.size(); ++__i) {
+    _Node* __cur = _M_buckets[__i];
+    while (__cur != 0) {
+      _Node* __next = __cur->_M_next;
+      _M_delete_node(__cur);
+      __cur = __next;
+    }
+    _M_buckets[__i] = 0;
+  }
+  _M_num_elements = 0;
+}
+
+    
+template 
+void hashtable<_Val,_Key,_HF,_Ex,_Eq,_All>
+  ::_M_copy_from(const hashtable& __ht)
+{
+  _M_buckets.clear();
+  _M_buckets.reserve(__ht._M_buckets.size());
+  _M_buckets.insert(_M_buckets.end(), __ht._M_buckets.size(), (_Node*) 0);
+  try {
+    for (size_type __i = 0; __i < __ht._M_buckets.size(); ++__i) {
+      const _Node* __cur = __ht._M_buckets[__i];
+      if (__cur) {
+        _Node* __local_copy = _M_new_node(__cur->_M_val);
+        _M_buckets[__i] = __local_copy;
+
+        for (_Node* __next = __cur->_M_next; 
+             __next; 
+             __cur = __next, __next = __cur->_M_next) {
+          __local_copy->_M_next = _M_new_node(__next->_M_val);
+          __local_copy = __local_copy->_M_next;
+        }
+      }
+    }
+    _M_num_elements = __ht._M_num_elements;
+  }
+  catch(...)
+    {
+      clear();
+      __throw_exception_again;
+    }
+}
+
+} // namespace __gnu_cxx
+
+#endif /* __SGI_STL_INTERNAL_HASHTABLE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/ext/stl_rope.h b/contrib/libstdc++/include/ext/stl_rope.h
new file mode 100644
index 0000000..188fc40
--- /dev/null
+++ b/contrib/libstdc++/include/ext/stl_rope.h
@@ -0,0 +1,2498 @@
+// SGI's rope implementation -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1997-1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file ext/stl_rope.h
+ *  This file is a GNU extension to the Standard C++ Library (possibly
+ *  containing extensions from the HP/SGI STL subset).  You should only
+ *  include this header if you are using GCC 3 or later.
+ */
+
+// rope<_CharT,_Alloc> is a sequence of _CharT.
+// Ropes appear to be mutable, but update operations
+// really copy enough of the data structure to leave the original
+// valid.  Thus ropes can be logically copied by just copying
+// a pointer value.
+
+#ifndef __SGI_STL_INTERNAL_ROPE_H
+# define __SGI_STL_INTERNAL_ROPE_H
+
+# ifdef __GC
+#   define __GC_CONST const
+# else
+#   include 
+#   define __GC_CONST   // constant except for deallocation
+# endif
+
+#include  // For uninitialized_copy_n
+
+namespace __gnu_cxx
+{
+using std::size_t;
+using std::ptrdiff_t;
+using std::allocator;
+using std::iterator;
+using std::reverse_iterator;
+using std::_Alloc_traits;
+using std::_Destroy;
+using std::_Refcount_Base;
+
+// The _S_eos function is used for those functions that
+// convert to/from C-like strings to detect the end of the string.
+
+// The end-of-C-string character.
+// This is what the draft standard says it should be.
+template 
+inline _CharT _S_eos(_CharT*) { return _CharT(); }
+
+// Test for basic character types.
+// For basic character types leaves having a trailing eos.
+template 
+inline bool _S_is_basic_char_type(_CharT*) { return false; }
+template 
+inline bool _S_is_one_byte_char_type(_CharT*) { return false; }
+
+inline bool _S_is_basic_char_type(char*) { return true; }
+inline bool _S_is_one_byte_char_type(char*) { return true; }
+inline bool _S_is_basic_char_type(wchar_t*) { return true; }
+
+// Store an eos iff _CharT is a basic character type.
+// Do not reference _S_eos if it isn't.
+template 
+inline void _S_cond_store_eos(_CharT&) {}
+
+inline void _S_cond_store_eos(char& __c) { __c = 0; }
+inline void _S_cond_store_eos(wchar_t& __c) { __c = 0; }
+
+// char_producers are logically functions that generate a section of
+// a string.  These can be convereted to ropes.  The resulting rope
+// invokes the char_producer on demand.  This allows, for example,
+// files to be viewed as ropes without reading the entire file.
+template 
+class char_producer {
+    public:
+        virtual ~char_producer() {};
+        virtual void operator()(size_t __start_pos, size_t __len, 
+                                _CharT* __buffer) = 0;
+        // Buffer should really be an arbitrary output iterator.
+        // That way we could flatten directly into an ostream, etc.
+        // This is thoroughly impossible, since iterator types don't
+        // have runtime descriptions.
+};
+
+// Sequence buffers:
+//
+// Sequence must provide an append operation that appends an
+// array to the sequence.  Sequence buffers are useful only if
+// appending an entire array is cheaper than appending element by element.
+// This is true for many string representations.
+// This should  perhaps inherit from ostream
+// and be implemented correspondingly, so that they can be used
+// for formatted.  For the sake of portability, we don't do this yet.
+//
+// For now, sequence buffers behave as output iterators.  But they also
+// behave a little like basic_ostringstream and a
+// little like containers.
+
+template
+class sequence_buffer : public iterator
+{
+    public:
+        typedef typename _Sequence::value_type value_type;
+    protected:
+        _Sequence* _M_prefix;
+        value_type _M_buffer[_Buf_sz];
+        size_t     _M_buf_count;
+    public:
+        void flush() {
+            _M_prefix->append(_M_buffer, _M_buffer + _M_buf_count);
+            _M_buf_count = 0;
+        }
+        ~sequence_buffer() { flush(); }
+        sequence_buffer() : _M_prefix(0), _M_buf_count(0) {}
+        sequence_buffer(const sequence_buffer& __x) {
+            _M_prefix = __x._M_prefix;
+            _M_buf_count = __x._M_buf_count;
+            copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+        }
+        sequence_buffer(sequence_buffer& __x) {
+            __x.flush();
+            _M_prefix = __x._M_prefix;
+            _M_buf_count = 0;
+        }
+        sequence_buffer(_Sequence& __s) : _M_prefix(&__s), _M_buf_count(0) {}
+        sequence_buffer& operator= (sequence_buffer& __x) {
+            __x.flush();
+            _M_prefix = __x._M_prefix;
+            _M_buf_count = 0;
+            return *this;
+        }
+        sequence_buffer& operator= (const sequence_buffer& __x) {
+            _M_prefix = __x._M_prefix;
+            _M_buf_count = __x._M_buf_count;
+            copy(__x._M_buffer, __x._M_buffer + __x._M_buf_count, _M_buffer);
+            return *this;
+        }
+        void push_back(value_type __x)
+        {
+            if (_M_buf_count < _Buf_sz) {
+                _M_buffer[_M_buf_count] = __x;
+                ++_M_buf_count;
+            } else {
+                flush();
+                _M_buffer[0] = __x;
+                _M_buf_count = 1;
+            }
+        }
+        void append(value_type* __s, size_t __len)
+        {
+            if (__len + _M_buf_count <= _Buf_sz) {
+                size_t __i = _M_buf_count;
+                size_t __j = 0;
+                for (; __j < __len; __i++, __j++) {
+                    _M_buffer[__i] = __s[__j];
+                }
+                _M_buf_count += __len;
+            } else if (0 == _M_buf_count) {
+                _M_prefix->append(__s, __s + __len);
+            } else {
+                flush();
+                append(__s, __len);
+            }
+        }
+        sequence_buffer& write(value_type* __s, size_t __len)
+        {
+            append(__s, __len);
+            return *this;
+        }
+        sequence_buffer& put(value_type __x)
+        {
+            push_back(__x);
+            return *this;
+        }
+        sequence_buffer& operator=(const value_type& __rhs)
+        {
+            push_back(__rhs);
+            return *this;
+        }
+        sequence_buffer& operator*() { return *this; }
+        sequence_buffer& operator++() { return *this; }
+        sequence_buffer& operator++(int) { return *this; }
+};
+
+// The following should be treated as private, at least for now.
+template
+class _Rope_char_consumer {
+    public:
+        // If we had member templates, these should not be virtual.
+        // For now we need to use run-time parametrization where
+        // compile-time would do.  Hence this should all be private
+        // for now.
+        // The symmetry with char_producer is accidental and temporary.
+        virtual ~_Rope_char_consumer() {};
+        virtual bool operator()(const _CharT* __buffer, size_t __len) = 0;
+};
+
+// First a lot of forward declarations.  The standard seems to require
+// much stricter "declaration before use" than many of the implementations
+// that preceded it.
+template > class rope;
+template struct _Rope_RopeConcatenation;
+template struct _Rope_RopeLeaf;
+template struct _Rope_RopeFunction;
+template struct _Rope_RopeSubstring;
+template class _Rope_iterator;
+template class _Rope_const_iterator;
+template class _Rope_char_ref_proxy;
+template class _Rope_char_ptr_proxy;
+
+template
+bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+                 const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y);
+
+template
+_Rope_const_iterator<_CharT,_Alloc> operator-
+        (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+         ptrdiff_t __n);
+
+template
+_Rope_const_iterator<_CharT,_Alloc> operator+
+        (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+         ptrdiff_t __n);
+
+template
+_Rope_const_iterator<_CharT,_Alloc> operator+
+        (ptrdiff_t __n,
+         const _Rope_const_iterator<_CharT,_Alloc>& __x);
+
+template
+bool operator== 
+        (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+         const _Rope_const_iterator<_CharT,_Alloc>& __y);
+
+template
+bool operator< 
+        (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+         const _Rope_const_iterator<_CharT,_Alloc>& __y);
+
+template
+ptrdiff_t operator- 
+        (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+         const _Rope_const_iterator<_CharT,_Alloc>& __y);
+
+template
+_Rope_iterator<_CharT,_Alloc> operator-
+        (const _Rope_iterator<_CharT,_Alloc>& __x,
+         ptrdiff_t __n);
+
+template
+_Rope_iterator<_CharT,_Alloc> operator+
+        (const _Rope_iterator<_CharT,_Alloc>& __x,
+         ptrdiff_t __n);
+
+template
+_Rope_iterator<_CharT,_Alloc> operator+
+        (ptrdiff_t __n,
+         const _Rope_iterator<_CharT,_Alloc>& __x);
+
+template
+bool operator== 
+        (const _Rope_iterator<_CharT,_Alloc>& __x,
+         const _Rope_iterator<_CharT,_Alloc>& __y);
+
+template
+bool operator< 
+        (const _Rope_iterator<_CharT,_Alloc>& __x,
+         const _Rope_iterator<_CharT,_Alloc>& __y);
+
+template
+ptrdiff_t operator- 
+        (const _Rope_iterator<_CharT,_Alloc>& __x,
+         const _Rope_iterator<_CharT,_Alloc>& __y);
+
+template
+rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left,
+                               const rope<_CharT,_Alloc>& __right);
+        
+template
+rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left,
+                               const _CharT* __right);
+        
+template
+rope<_CharT,_Alloc> operator+ (const rope<_CharT,_Alloc>& __left,
+                               _CharT __right);
+        
+// Some helpers, so we can use power on ropes.
+// See below for why this isn't local to the implementation.
+
+// This uses a nonstandard refcount convention.
+// The result has refcount 0.
+template
+struct _Rope_Concat_fn
+       : public std::binary_function, rope<_CharT,_Alloc>,
+                                     rope<_CharT,_Alloc> > {
+        rope<_CharT,_Alloc> operator() (const rope<_CharT,_Alloc>& __x,
+                                const rope<_CharT,_Alloc>& __y) {
+                    return __x + __y;
+        }
+};
+
+template 
+inline
+rope<_CharT,_Alloc>
+identity_element(_Rope_Concat_fn<_CharT, _Alloc>)
+{
+    return rope<_CharT,_Alloc>();
+}
+
+
+//
+// What follows should really be local to rope.  Unfortunately,
+// that doesn't work, since it makes it impossible to define generic
+// equality on rope iterators.  According to the draft standard, the
+// template parameters for such an equality operator cannot be inferred
+// from the occurrence of a member class as a parameter.
+// (SGI compilers in fact allow this, but the __result wouldn't be
+// portable.)
+// Similarly, some of the static member functions are member functions
+// only to avoid polluting the global namespace, and to circumvent
+// restrictions on type inference for template functions.
+//
+
+//
+// The internal data structure for representing a rope.  This is
+// private to the implementation.  A rope is really just a pointer
+// to one of these.
+//
+// A few basic functions for manipulating this data structure
+// are members of _RopeRep.  Most of the more complex algorithms
+// are implemented as rope members.
+//
+// Some of the static member functions of _RopeRep have identically
+// named functions in rope that simply invoke the _RopeRep versions.
+//
+// A macro to introduce various allocation and deallocation functions
+// These need to be defined differently depending on whether or not
+// we are using standard conforming allocators, and whether the allocator
+// instances have real state.  Thus this macro is invoked repeatedly
+// with different definitions of __ROPE_DEFINE_ALLOC.
+// __ROPE_DEFINE_ALLOC(type,name) defines 
+//   type * name_allocate(size_t) and
+//   void name_deallocate(tipe *, size_t)
+// Both functions may or may not be static.
+
+#define __ROPE_DEFINE_ALLOCS(__a) \
+        __ROPE_DEFINE_ALLOC(_CharT,_Data) /* character data */ \
+        typedef _Rope_RopeConcatenation<_CharT,__a> __C; \
+        __ROPE_DEFINE_ALLOC(__C,_C) \
+        typedef _Rope_RopeLeaf<_CharT,__a> __L; \
+        __ROPE_DEFINE_ALLOC(__L,_L) \
+        typedef _Rope_RopeFunction<_CharT,__a> __F; \
+        __ROPE_DEFINE_ALLOC(__F,_F) \
+        typedef _Rope_RopeSubstring<_CharT,__a> __S; \
+        __ROPE_DEFINE_ALLOC(__S,_S)
+
+//  Internal rope nodes potentially store a copy of the allocator
+//  instance used to allocate them.  This is mostly redundant.
+//  But the alternative would be to pass allocator instances around
+//  in some form to nearly all internal functions, since any pointer
+//  assignment may result in a zero reference count and thus require
+//  deallocation.
+//  The _Rope_rep_base class encapsulates
+//  the differences between SGI-style allocators and standard-conforming
+//  allocators.
+
+#define __STATIC_IF_SGI_ALLOC  /* not static */
+
+// Base class for ordinary allocators.
+template 
+class _Rope_rep_alloc_base {
+public:
+  typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return _M_data_allocator; }
+  _Rope_rep_alloc_base(size_t __size, const allocator_type& __a)
+        : _M_size(__size), _M_data_allocator(__a) {}
+  size_t _M_size;       // This is here only to avoid wasting space
+                // for an otherwise empty base class.
+
+  
+protected:
+    allocator_type _M_data_allocator;
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+        typedef typename \
+          _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \
+        /*static*/ _Tp * __name##_allocate(size_t __n) \
+          { return __name##Allocator(_M_data_allocator).allocate(__n); } \
+        void __name##_deallocate(_Tp* __p, size_t __n) \
+          { __name##Allocator(_M_data_allocator).deallocate(__p, __n); }
+  __ROPE_DEFINE_ALLOCS(_Allocator);
+# undef __ROPE_DEFINE_ALLOC
+};
+
+// Specialization for allocators that have the property that we don't
+//  actually have to store an allocator object.  
+template 
+class _Rope_rep_alloc_base<_CharT,_Allocator,true> {
+public:
+  typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return allocator_type(); }
+  _Rope_rep_alloc_base(size_t __size, const allocator_type&)
+                : _M_size(__size) {}
+  size_t _M_size;
+  
+protected:
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+        typedef typename \
+          _Alloc_traits<_Tp,_Allocator>::_Alloc_type __name##Alloc; \
+        typedef typename \
+          _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \
+        static _Tp* __name##_allocate(size_t __n) \
+                { return __name##Alloc::allocate(__n); } \
+        void __name##_deallocate(_Tp *__p, size_t __n) \
+                { __name##Alloc::deallocate(__p, __n); }
+  __ROPE_DEFINE_ALLOCS(_Allocator);
+# undef __ROPE_DEFINE_ALLOC
+};
+
+template 
+struct _Rope_rep_base
+  : public _Rope_rep_alloc_base<_CharT,_Alloc,
+                                _Alloc_traits<_CharT,_Alloc>::_S_instanceless>
+{
+  typedef _Rope_rep_alloc_base<_CharT,_Alloc,
+                               _Alloc_traits<_CharT,_Alloc>::_S_instanceless>
+          _Base;
+  typedef typename _Base::allocator_type allocator_type;
+  _Rope_rep_base(size_t __size, const allocator_type& __a)
+    : _Base(__size, __a) {}
+};    
+
+
+template
+struct _Rope_RopeRep : public _Rope_rep_base<_CharT,_Alloc>
+# ifndef __GC
+    , _Refcount_Base
+# endif
+{
+    public:
+    enum { _S_max_rope_depth = 45 };
+    enum _Tag {_S_leaf, _S_concat, _S_substringfn, _S_function};
+    _Tag _M_tag:8;
+    bool _M_is_balanced:8;
+    unsigned char _M_depth;
+    __GC_CONST _CharT* _M_c_string;
+                        /* Flattened version of string, if needed.  */
+                        /* typically 0.                             */
+                        /* If it's not 0, then the memory is owned  */
+                        /* by this node.                            */
+                        /* In the case of a leaf, this may point to */
+                        /* the same memory as the data field.       */
+    typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+                        allocator_type;
+    _Rope_RopeRep(_Tag __t, int __d, bool __b, size_t __size,
+                  allocator_type __a)
+        : _Rope_rep_base<_CharT,_Alloc>(__size, __a),
+#         ifndef __GC
+          _Refcount_Base(1),
+#         endif
+          _M_tag(__t), _M_is_balanced(__b), _M_depth(__d), _M_c_string(0)
+    { }
+#   ifdef __GC
+        void _M_incr () {}
+#   endif
+        static void _S_free_string(__GC_CONST _CharT*, size_t __len,
+                                   allocator_type __a);
+#       define __STL_FREE_STRING(__s, __l, __a) _S_free_string(__s, __l, __a);
+                        // Deallocate data section of a leaf.
+                        // This shouldn't be a member function.
+                        // But its hard to do anything else at the
+                        // moment, because it's templatized w.r.t.
+                        // an allocator.
+                        // Does nothing if __GC is defined.
+#   ifndef __GC
+          void _M_free_c_string();
+          void _M_free_tree();
+                        // Deallocate t. Assumes t is not 0.
+          void _M_unref_nonnil()
+          {
+              if (0 == _M_decr()) _M_free_tree();
+          }
+          void _M_ref_nonnil()
+          {
+              _M_incr();
+          }
+          static void _S_unref(_Rope_RopeRep* __t)
+          {
+              if (0 != __t) {
+                  __t->_M_unref_nonnil();
+              }
+          }
+          static void _S_ref(_Rope_RopeRep* __t)
+          {
+              if (0 != __t) __t->_M_incr();
+          }
+          static void _S_free_if_unref(_Rope_RopeRep* __t)
+          {
+              if (0 != __t && 0 == __t->_M_ref_count) __t->_M_free_tree();
+          }
+#   else /* __GC */
+          void _M_unref_nonnil() {}
+          void _M_ref_nonnil() {}
+          static void _S_unref(_Rope_RopeRep*) {}
+          static void _S_ref(_Rope_RopeRep*) {}
+          static void _S_free_if_unref(_Rope_RopeRep*) {}
+#   endif
+
+};
+
+template
+struct _Rope_RopeLeaf : public _Rope_RopeRep<_CharT,_Alloc> {
+  public:
+    // Apparently needed by VC++
+    // The data fields of leaves are allocated with some
+    // extra space, to accommodate future growth and for basic
+    // character types, to hold a trailing eos character.
+    enum { _S_alloc_granularity = 8 };
+    static size_t _S_rounded_up_size(size_t __n) {
+        size_t __size_with_eos;
+             
+        if (_S_is_basic_char_type((_CharT*)0)) {
+            __size_with_eos = __n + 1;
+        } else {
+            __size_with_eos = __n;
+        }
+#       ifdef __GC
+           return __size_with_eos;
+#       else
+           // Allow slop for in-place expansion.
+           return (__size_with_eos + _S_alloc_granularity-1)
+                        &~ (_S_alloc_granularity-1);
+#       endif
+    }
+    __GC_CONST _CharT* _M_data; /* Not necessarily 0 terminated. */
+                                /* The allocated size is         */
+                                /* _S_rounded_up_size(size), except */
+                                /* in the GC case, in which it   */
+                                /* doesn't matter.               */
+    typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+                        allocator_type;
+    _Rope_RopeLeaf(__GC_CONST _CharT* __d, size_t __size, allocator_type __a)
+        : _Rope_RopeRep<_CharT,_Alloc>(_S_leaf, 0, true, __size, __a),
+          _M_data(__d)
+        {
+        if (_S_is_basic_char_type((_CharT *)0)) {
+            // already eos terminated.
+            _M_c_string = __d;
+        }
+    }
+        // The constructor assumes that d has been allocated with
+        // the proper allocator and the properly padded size.
+        // In contrast, the destructor deallocates the data:
+# ifndef __GC
+    ~_Rope_RopeLeaf() {
+        if (_M_data != _M_c_string) {
+            _M_free_c_string();
+        }
+        __STL_FREE_STRING(_M_data, _M_size, get_allocator());
+    }
+# endif
+};
+
+template
+struct _Rope_RopeConcatenation : public _Rope_RopeRep<_CharT,_Alloc> {
+  public:
+    _Rope_RopeRep<_CharT,_Alloc>* _M_left;
+    _Rope_RopeRep<_CharT,_Alloc>* _M_right;
+    typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+                        allocator_type;
+    _Rope_RopeConcatenation(_Rope_RopeRep<_CharT,_Alloc>* __l,
+                             _Rope_RopeRep<_CharT,_Alloc>* __r,
+                             allocator_type __a)
+
+      : _Rope_RopeRep<_CharT,_Alloc>(_S_concat,
+                                     std::max(__l->_M_depth, __r->_M_depth) + 1,
+                                     false,
+                                     __l->_M_size + __r->_M_size, __a),
+        _M_left(__l), _M_right(__r)
+      {}
+# ifndef __GC
+    ~_Rope_RopeConcatenation() {
+        _M_free_c_string();
+        _M_left->_M_unref_nonnil();
+        _M_right->_M_unref_nonnil();
+    }
+# endif
+};
+
+template
+struct _Rope_RopeFunction : public _Rope_RopeRep<_CharT,_Alloc> {
+  public:
+    char_producer<_CharT>* _M_fn;
+#   ifndef __GC
+      bool _M_delete_when_done; // Char_producer is owned by the
+                                // rope and should be explicitly
+                                // deleted when the rope becomes
+                                // inaccessible.
+#   else
+      // In the GC case, we either register the rope for
+      // finalization, or not.  Thus the field is unnecessary;
+      // the information is stored in the collector data structures.
+      // We do need a finalization procedure to be invoked by the
+      // collector.
+      static void _S_fn_finalization_proc(void * __tree, void *) {
+        delete ((_Rope_RopeFunction *)__tree) -> _M_fn;
+      }
+#   endif
+    typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+                                        allocator_type;
+    _Rope_RopeFunction(char_producer<_CharT>* __f, size_t __size,
+                        bool __d, allocator_type __a)
+      : _Rope_RopeRep<_CharT,_Alloc>(_S_function, 0, true, __size, __a)
+      , _M_fn(__f)
+#       ifndef __GC
+      , _M_delete_when_done(__d)
+#       endif
+    {
+#       ifdef __GC
+            if (__d) {
+                GC_REGISTER_FINALIZER(
+                  this, _Rope_RopeFunction::_S_fn_finalization_proc, 0, 0, 0);
+            }
+#       endif
+    }
+# ifndef __GC
+    ~_Rope_RopeFunction() {
+          _M_free_c_string();
+          if (_M_delete_when_done) {
+              delete _M_fn;
+          }
+    }
+# endif
+};
+// Substring results are usually represented using just
+// concatenation nodes.  But in the case of very long flat ropes
+// or ropes with a functional representation that isn't practical.
+// In that case, we represent the __result as a special case of
+// RopeFunction, whose char_producer points back to the rope itself.
+// In all cases except repeated substring operations and
+// deallocation, we treat the __result as a RopeFunction.
+template
+struct _Rope_RopeSubstring : public _Rope_RopeFunction<_CharT,_Alloc>,
+                             public char_producer<_CharT> {
+  public:
+    // XXX this whole class should be rewritten.
+    _Rope_RopeRep<_CharT,_Alloc>* _M_base;      // not 0
+    size_t _M_start;
+    virtual void operator()(size_t __start_pos, size_t __req_len,
+                            _CharT* __buffer) {
+        switch(_M_base->_M_tag) {
+            case _S_function:
+            case _S_substringfn:
+              {
+                char_producer<_CharT>* __fn =
+                        ((_Rope_RopeFunction<_CharT,_Alloc>*)_M_base)->_M_fn;
+                (*__fn)(__start_pos + _M_start, __req_len, __buffer);
+              }
+              break;
+            case _S_leaf:
+              {
+                __GC_CONST _CharT* __s =
+                        ((_Rope_RopeLeaf<_CharT,_Alloc>*)_M_base)->_M_data;
+                uninitialized_copy_n(__s + __start_pos + _M_start, __req_len,
+                                     __buffer);
+              }
+              break;
+            default:
+	      break;
+        }
+    }
+    typedef typename _Rope_rep_base<_CharT,_Alloc>::allocator_type
+        allocator_type;
+    _Rope_RopeSubstring(_Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
+                          size_t __l, allocator_type __a)
+      : _Rope_RopeFunction<_CharT,_Alloc>(this, __l, false, __a),
+        char_producer<_CharT>(),
+        _M_base(__b),
+        _M_start(__s)
+    {
+#       ifndef __GC
+            _M_base->_M_ref_nonnil();
+#       endif
+        _M_tag = _S_substringfn;
+    }
+    virtual ~_Rope_RopeSubstring()
+      { 
+#       ifndef __GC
+          _M_base->_M_unref_nonnil();
+          // _M_free_c_string();  -- done by parent class
+#       endif
+      }
+};
+
+
+// Self-destructing pointers to Rope_rep.
+// These are not conventional smart pointers.  Their
+// only purpose in life is to ensure that unref is called
+// on the pointer either at normal exit or if an exception
+// is raised.  It is the caller's responsibility to
+// adjust reference counts when these pointers are initialized
+// or assigned to.  (This convention significantly reduces
+// the number of potentially expensive reference count
+// updates.)
+#ifndef __GC
+  template
+  struct _Rope_self_destruct_ptr {
+    _Rope_RopeRep<_CharT,_Alloc>* _M_ptr;
+    ~_Rope_self_destruct_ptr() 
+      { _Rope_RopeRep<_CharT,_Alloc>::_S_unref(_M_ptr); }
+#ifdef __EXCEPTIONS
+        _Rope_self_destruct_ptr() : _M_ptr(0) {};
+#else
+        _Rope_self_destruct_ptr() {};
+#endif
+    _Rope_self_destruct_ptr(_Rope_RopeRep<_CharT,_Alloc>* __p) : _M_ptr(__p) {}
+    _Rope_RopeRep<_CharT,_Alloc>& operator*() { return *_M_ptr; }
+    _Rope_RopeRep<_CharT,_Alloc>* operator->() { return _M_ptr; }
+    operator _Rope_RopeRep<_CharT,_Alloc>*() { return _M_ptr; }
+    _Rope_self_destruct_ptr& operator= (_Rope_RopeRep<_CharT,_Alloc>* __x)
+        { _M_ptr = __x; return *this; }
+  };
+#endif
+
+// Dereferencing a nonconst iterator has to return something
+// that behaves almost like a reference.  It's not possible to
+// return an actual reference since assignment requires extra
+// work.  And we would get into the same problems as with the
+// CD2 version of basic_string.
+template
+class _Rope_char_ref_proxy {
+    friend class rope<_CharT,_Alloc>;
+    friend class _Rope_iterator<_CharT,_Alloc>;
+    friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
+#   ifdef __GC
+        typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
+#   else
+        typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
+#   endif
+    typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+    typedef rope<_CharT,_Alloc> _My_rope;
+    size_t _M_pos;
+    _CharT _M_current;
+    bool _M_current_valid;
+    _My_rope* _M_root;     // The whole rope.
+  public:
+    _Rope_char_ref_proxy(_My_rope* __r, size_t __p)
+      :  _M_pos(__p), _M_current_valid(false), _M_root(__r) {}
+    _Rope_char_ref_proxy(const _Rope_char_ref_proxy& __x)
+      : _M_pos(__x._M_pos), _M_current_valid(false), _M_root(__x._M_root) {}
+        // Don't preserve cache if the reference can outlive the
+        // expression.  We claim that's not possible without calling
+        // a copy constructor or generating reference to a proxy
+        // reference.  We declare the latter to have undefined semantics.
+    _Rope_char_ref_proxy(_My_rope* __r, size_t __p, _CharT __c)
+      : _M_pos(__p), _M_current(__c), _M_current_valid(true), _M_root(__r) {}
+    inline operator _CharT () const;
+    _Rope_char_ref_proxy& operator= (_CharT __c);
+    _Rope_char_ptr_proxy<_CharT,_Alloc> operator& () const;
+    _Rope_char_ref_proxy& operator= (const _Rope_char_ref_proxy& __c) {
+        return operator=((_CharT)__c); 
+    }
+};
+
+template
+inline void swap(_Rope_char_ref_proxy <_CharT, __Alloc > __a,
+                 _Rope_char_ref_proxy <_CharT, __Alloc > __b) {
+    _CharT __tmp = __a;
+    __a = __b;
+    __b = __tmp;
+}
+
+template
+class _Rope_char_ptr_proxy {
+    // XXX this class should be rewritten.
+    friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
+    size_t _M_pos;
+    rope<_CharT,_Alloc>* _M_root;     // The whole rope.
+  public:
+    _Rope_char_ptr_proxy(const _Rope_char_ref_proxy<_CharT,_Alloc>& __x) 
+      : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
+    _Rope_char_ptr_proxy(const _Rope_char_ptr_proxy& __x)
+      : _M_pos(__x._M_pos), _M_root(__x._M_root) {}
+    _Rope_char_ptr_proxy() {}
+    _Rope_char_ptr_proxy(_CharT* __x) : _M_root(0), _M_pos(0) {
+    }
+    _Rope_char_ptr_proxy& 
+    operator= (const _Rope_char_ptr_proxy& __x) {
+        _M_pos = __x._M_pos;
+        _M_root = __x._M_root;
+        return *this;
+    }
+    template
+    friend bool operator== (const _Rope_char_ptr_proxy<_CharT2,_Alloc2>& __x,
+                            const _Rope_char_ptr_proxy<_CharT2,_Alloc2>& __y);
+    _Rope_char_ref_proxy<_CharT,_Alloc> operator*() const {
+        return _Rope_char_ref_proxy<_CharT,_Alloc>(_M_root, _M_pos);
+    }
+};
+
+
+// Rope iterators:
+// Unlike in the C version, we cache only part of the stack
+// for rope iterators, since they must be efficiently copyable.
+// When we run out of cache, we have to reconstruct the iterator
+// value.
+// Pointers from iterators are not included in reference counts.
+// Iterators are assumed to be thread private.  Ropes can
+// be shared.
+
+template
+class _Rope_iterator_base
+  : public iterator
+{
+    friend class rope<_CharT,_Alloc>;
+  public:
+    typedef _Alloc _allocator_type; // used in _Rope_rotate, VC++ workaround
+    typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+        // Borland doesn't want this to be protected.
+  protected:
+    enum { _S_path_cache_len = 4 }; // Must be <= 9.
+    enum { _S_iterator_buf_len = 15 };
+    size_t _M_current_pos;
+    _RopeRep* _M_root;     // The whole rope.
+    size_t _M_leaf_pos;    // Starting position for current leaf
+    __GC_CONST _CharT* _M_buf_start;
+                        // Buffer possibly
+                        // containing current char.
+    __GC_CONST _CharT* _M_buf_ptr;
+                        // Pointer to current char in buffer.
+                        // != 0 ==> buffer valid.
+    __GC_CONST _CharT* _M_buf_end;
+                        // One past __last valid char in buffer.
+    // What follows is the path cache.  We go out of our
+    // way to make this compact.
+    // Path_end contains the bottom section of the path from
+    // the root to the current leaf.
+    const _RopeRep* _M_path_end[_S_path_cache_len];
+    int _M_leaf_index;     // Last valid __pos in path_end;
+                        // _M_path_end[0] ... _M_path_end[leaf_index-1]
+                        // point to concatenation nodes.
+    unsigned char _M_path_directions;
+                          // (path_directions >> __i) & 1 is 1
+                          // iff we got from _M_path_end[leaf_index - __i - 1]
+                          // to _M_path_end[leaf_index - __i] by going to the
+                          // __right. Assumes path_cache_len <= 9.
+    _CharT _M_tmp_buf[_S_iterator_buf_len];
+                        // Short buffer for surrounding chars.
+                        // This is useful primarily for 
+                        // RopeFunctions.  We put the buffer
+                        // here to avoid locking in the
+                        // multithreaded case.
+    // The cached path is generally assumed to be valid
+    // only if the buffer is valid.
+    static void _S_setbuf(_Rope_iterator_base& __x);
+                                        // Set buffer contents given
+                                        // path cache.
+    static void _S_setcache(_Rope_iterator_base& __x);
+                                        // Set buffer contents and
+                                        // path cache.
+    static void _S_setcache_for_incr(_Rope_iterator_base& __x);
+                                        // As above, but assumes path
+                                        // cache is valid for previous posn.
+    _Rope_iterator_base() {}
+    _Rope_iterator_base(_RopeRep* __root, size_t __pos)
+      : _M_current_pos(__pos), _M_root(__root), _M_buf_ptr(0) {}
+    void _M_incr(size_t __n);
+    void _M_decr(size_t __n);
+  public:
+    size_t index() const { return _M_current_pos; }
+    _Rope_iterator_base(const _Rope_iterator_base& __x) {
+        if (0 != __x._M_buf_ptr) {
+            *this = __x;
+        } else {
+            _M_current_pos = __x._M_current_pos;
+            _M_root = __x._M_root;
+            _M_buf_ptr = 0;
+        }
+    }
+};
+
+template class _Rope_iterator;
+
+template
+class _Rope_const_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
+    friend class rope<_CharT,_Alloc>;
+  protected:
+      typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+      // The one from the base class may not be directly visible.
+    _Rope_const_iterator(const _RopeRep* __root, size_t __pos):
+                   _Rope_iterator_base<_CharT,_Alloc>(
+                     const_cast<_RopeRep*>(__root), __pos)
+                   // Only nonconst iterators modify root ref count
+    {}
+  public:
+    typedef _CharT reference;   // Really a value.  Returning a reference
+                                // Would be a mess, since it would have
+                                // to be included in refcount.
+    typedef const _CharT* pointer;
+
+  public:
+    _Rope_const_iterator() {};
+    _Rope_const_iterator(const _Rope_const_iterator& __x) :
+                                _Rope_iterator_base<_CharT,_Alloc>(__x) { }
+    _Rope_const_iterator(const _Rope_iterator<_CharT,_Alloc>& __x);
+    _Rope_const_iterator(const rope<_CharT,_Alloc>& __r, size_t __pos) :
+        _Rope_iterator_base<_CharT,_Alloc>(__r._M_tree_ptr, __pos) {}
+    _Rope_const_iterator& operator= (const _Rope_const_iterator& __x) {
+        if (0 != __x._M_buf_ptr) {
+            *(static_cast<_Rope_iterator_base<_CharT,_Alloc>*>(this)) = __x;
+        } else {
+            _M_current_pos = __x._M_current_pos;
+            _M_root = __x._M_root;
+            _M_buf_ptr = 0;
+        }
+        return(*this);
+    }
+    reference operator*() {
+        if (0 == _M_buf_ptr) _S_setcache(*this);
+        return *_M_buf_ptr;
+    }
+    _Rope_const_iterator& operator++() {
+        __GC_CONST _CharT* __next;
+        if (0 != _M_buf_ptr && (__next = _M_buf_ptr + 1) < _M_buf_end) {
+            _M_buf_ptr = __next;
+            ++_M_current_pos;
+        } else {
+            _M_incr(1);
+        }
+        return *this;
+    }
+    _Rope_const_iterator& operator+=(ptrdiff_t __n) {
+        if (__n >= 0) {
+            _M_incr(__n);
+        } else {
+            _M_decr(-__n);
+        }
+        return *this;
+    }
+    _Rope_const_iterator& operator--() {
+        _M_decr(1);
+        return *this;
+    }
+    _Rope_const_iterator& operator-=(ptrdiff_t __n) {
+        if (__n >= 0) {
+            _M_decr(__n);
+        } else {
+            _M_incr(-__n);
+        }
+        return *this;
+    }
+    _Rope_const_iterator operator++(int) {
+        size_t __old_pos = _M_current_pos;
+        _M_incr(1);
+        return _Rope_const_iterator<_CharT,_Alloc>(_M_root, __old_pos);
+        // This makes a subsequent dereference expensive.
+        // Perhaps we should instead copy the iterator
+        // if it has a valid cache?
+    }
+    _Rope_const_iterator operator--(int) {
+        size_t __old_pos = _M_current_pos;
+        _M_decr(1);
+        return _Rope_const_iterator<_CharT,_Alloc>(_M_root, __old_pos);
+    }
+    template
+    friend _Rope_const_iterator<_CharT2,_Alloc2> operator-
+        (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+         ptrdiff_t __n);
+    template
+    friend _Rope_const_iterator<_CharT2,_Alloc2> operator+
+        (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+         ptrdiff_t __n);
+    template
+    friend _Rope_const_iterator<_CharT2,_Alloc2> operator+
+        (ptrdiff_t __n,
+         const _Rope_const_iterator<_CharT2,_Alloc2>& __x);
+    reference operator[](size_t __n) {
+        return rope<_CharT,_Alloc>::_S_fetch(_M_root, _M_current_pos + __n);
+    }
+
+    template
+    friend bool operator==
+        (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+         const _Rope_const_iterator<_CharT2,_Alloc2>& __y);
+    template
+    friend bool operator< 
+        (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+         const _Rope_const_iterator<_CharT2,_Alloc2>& __y);
+    template
+    friend ptrdiff_t operator-
+        (const _Rope_const_iterator<_CharT2,_Alloc2>& __x,
+         const _Rope_const_iterator<_CharT2,_Alloc2>& __y);
+};
+
+template
+class _Rope_iterator : public _Rope_iterator_base<_CharT,_Alloc> {
+    friend class rope<_CharT,_Alloc>;
+  protected:
+    typedef typename _Rope_iterator_base<_CharT,_Alloc>::_RopeRep _RopeRep;
+    rope<_CharT,_Alloc>* _M_root_rope;
+        // root is treated as a cached version of this,
+        // and is used to detect changes to the underlying
+        // rope.
+        // Root is included in the reference count.
+        // This is necessary so that we can detect changes reliably.
+        // Unfortunately, it requires careful bookkeeping for the
+        // nonGC case.
+    _Rope_iterator(rope<_CharT,_Alloc>* __r, size_t __pos)
+      : _Rope_iterator_base<_CharT,_Alloc>(__r->_M_tree_ptr, __pos),
+        _M_root_rope(__r) 
+       { _RopeRep::_S_ref(_M_root); if (!(__r -> empty()))_S_setcache(*this); }
+
+    void _M_check();
+  public:
+    typedef _Rope_char_ref_proxy<_CharT,_Alloc>  reference;
+    typedef _Rope_char_ref_proxy<_CharT,_Alloc>* pointer;
+
+  public:
+    rope<_CharT,_Alloc>& container() { return *_M_root_rope; }
+    _Rope_iterator() {
+        _M_root = 0;  // Needed for reference counting.
+    };
+    _Rope_iterator(const _Rope_iterator& __x) :
+        _Rope_iterator_base<_CharT,_Alloc>(__x) {
+        _M_root_rope = __x._M_root_rope;
+        _RopeRep::_S_ref(_M_root);
+    }
+    _Rope_iterator(rope<_CharT,_Alloc>& __r, size_t __pos);
+    ~_Rope_iterator() {
+        _RopeRep::_S_unref(_M_root);
+    }
+    _Rope_iterator& operator= (const _Rope_iterator& __x) {
+        _RopeRep* __old = _M_root;
+
+        _RopeRep::_S_ref(__x._M_root);
+        if (0 != __x._M_buf_ptr) {
+            _M_root_rope = __x._M_root_rope;
+            *(static_cast<_Rope_iterator_base<_CharT,_Alloc>*>(this)) = __x;
+        } else {
+            _M_current_pos = __x._M_current_pos;
+            _M_root = __x._M_root;
+            _M_root_rope = __x._M_root_rope;
+            _M_buf_ptr = 0;
+        }
+        _RopeRep::_S_unref(__old);
+        return(*this);
+    }
+    reference operator*() {
+        _M_check();
+        if (0 == _M_buf_ptr) {
+            return _Rope_char_ref_proxy<_CharT,_Alloc>(
+               _M_root_rope, _M_current_pos);
+        } else {
+            return _Rope_char_ref_proxy<_CharT,_Alloc>(
+               _M_root_rope, _M_current_pos, *_M_buf_ptr);
+        }
+    }
+    _Rope_iterator& operator++() {
+        _M_incr(1);
+        return *this;
+    }
+    _Rope_iterator& operator+=(ptrdiff_t __n) {
+        if (__n >= 0) {
+            _M_incr(__n);
+        } else {
+            _M_decr(-__n);
+        }
+        return *this;
+    }
+    _Rope_iterator& operator--() {
+        _M_decr(1);
+        return *this;
+    }
+    _Rope_iterator& operator-=(ptrdiff_t __n) {
+        if (__n >= 0) {
+            _M_decr(__n);
+        } else {
+            _M_incr(-__n);
+        }
+        return *this;
+    }
+    _Rope_iterator operator++(int) {
+        size_t __old_pos = _M_current_pos;
+        _M_incr(1);
+        return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
+    }
+    _Rope_iterator operator--(int) {
+        size_t __old_pos = _M_current_pos;
+        _M_decr(1);
+        return _Rope_iterator<_CharT,_Alloc>(_M_root_rope, __old_pos);
+    }
+    reference operator[](ptrdiff_t __n) {
+        return _Rope_char_ref_proxy<_CharT,_Alloc>(
+          _M_root_rope, _M_current_pos + __n);
+    }
+
+    template
+    friend bool operator==
+        (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+         const _Rope_iterator<_CharT2,_Alloc2>& __y);
+    template
+    friend bool operator<
+        (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+         const _Rope_iterator<_CharT2,_Alloc2>& __y);
+    template
+    friend ptrdiff_t operator-
+        (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+         const _Rope_iterator<_CharT2,_Alloc2>& __y);
+    template
+    friend _Rope_iterator<_CharT2,_Alloc2> operator-
+        (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+         ptrdiff_t __n);
+    template
+    friend _Rope_iterator<_CharT2,_Alloc2> operator+
+        (const _Rope_iterator<_CharT2,_Alloc2>& __x,
+         ptrdiff_t __n);
+    template
+    friend _Rope_iterator<_CharT2,_Alloc2> operator+
+        (ptrdiff_t __n,
+         const _Rope_iterator<_CharT2,_Alloc2>& __x);
+};
+
+//  The rope base class encapsulates
+//  the differences between SGI-style allocators and standard-conforming
+//  allocators.
+
+// Base class for ordinary allocators.
+template 
+class _Rope_alloc_base {
+public:
+  typedef _Rope_RopeRep<_CharT,_Allocator> _RopeRep;
+  typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return _M_data_allocator; }
+  _Rope_alloc_base(_RopeRep *__t, const allocator_type& __a)
+        : _M_tree_ptr(__t), _M_data_allocator(__a) {}
+  _Rope_alloc_base(const allocator_type& __a)
+        : _M_data_allocator(__a) {}
+  
+protected:
+  // The only data members of a rope:
+    allocator_type _M_data_allocator;
+    _RopeRep* _M_tree_ptr;
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+        typedef typename \
+          _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \
+        _Tp* __name##_allocate(size_t __n) const \
+          { return __name##Allocator(_M_data_allocator).allocate(__n); } \
+        void __name##_deallocate(_Tp *__p, size_t __n) const \
+                { __name##Allocator(_M_data_allocator).deallocate(__p, __n); }
+  __ROPE_DEFINE_ALLOCS(_Allocator)
+# undef __ROPE_DEFINE_ALLOC
+};
+
+// Specialization for allocators that have the property that we don't
+//  actually have to store an allocator object.  
+template 
+class _Rope_alloc_base<_CharT,_Allocator,true> {
+public:
+  typedef _Rope_RopeRep<_CharT,_Allocator> _RopeRep;
+  typedef typename _Alloc_traits<_CharT,_Allocator>::allocator_type
+          allocator_type;
+  allocator_type get_allocator() const { return allocator_type(); }
+  _Rope_alloc_base(_RopeRep *__t, const allocator_type&)
+                : _M_tree_ptr(__t) {}
+  _Rope_alloc_base(const allocator_type&) {}
+  
+protected:
+  // The only data member of a rope:
+    _RopeRep *_M_tree_ptr;
+
+# define __ROPE_DEFINE_ALLOC(_Tp, __name) \
+        typedef typename \
+          _Alloc_traits<_Tp,_Allocator>::_Alloc_type __name##Alloc; \
+        typedef typename \
+          _Alloc_traits<_Tp,_Allocator>::allocator_type __name##Allocator; \
+        static _Tp* __name##_allocate(size_t __n) \
+          { return __name##Alloc::allocate(__n); } \
+        static void __name##_deallocate(_Tp *__p, size_t __n) \
+          { __name##Alloc::deallocate(__p, __n); }
+  __ROPE_DEFINE_ALLOCS(_Allocator)
+# undef __ROPE_DEFINE_ALLOC
+};
+
+template 
+struct _Rope_base 
+  : public _Rope_alloc_base<_CharT,_Alloc,
+                            _Alloc_traits<_CharT,_Alloc>::_S_instanceless>
+{
+  typedef _Rope_alloc_base<_CharT,_Alloc,
+                            _Alloc_traits<_CharT,_Alloc>::_S_instanceless>
+          _Base;
+  typedef typename _Base::allocator_type allocator_type;
+  typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+        // The one in _Base may not be visible due to template rules.
+  _Rope_base(_RopeRep* __t, const allocator_type& __a) : _Base(__t, __a) {}
+  _Rope_base(const allocator_type& __a) : _Base(__a) {}
+};    
+
+
+template 
+class rope : public _Rope_base<_CharT,_Alloc> {
+    public:
+        typedef _CharT value_type;
+        typedef ptrdiff_t difference_type;
+        typedef size_t size_type;
+        typedef _CharT const_reference;
+        typedef const _CharT* const_pointer;
+        typedef _Rope_iterator<_CharT,_Alloc> iterator;
+        typedef _Rope_const_iterator<_CharT,_Alloc> const_iterator;
+        typedef _Rope_char_ref_proxy<_CharT,_Alloc> reference;
+        typedef _Rope_char_ptr_proxy<_CharT,_Alloc> pointer;
+
+        friend class _Rope_iterator<_CharT,_Alloc>;
+        friend class _Rope_const_iterator<_CharT,_Alloc>;
+        friend struct _Rope_RopeRep<_CharT,_Alloc>;
+        friend class _Rope_iterator_base<_CharT,_Alloc>;
+        friend class _Rope_char_ptr_proxy<_CharT,_Alloc>;
+        friend class _Rope_char_ref_proxy<_CharT,_Alloc>;
+        friend struct _Rope_RopeSubstring<_CharT,_Alloc>;
+
+    protected:
+        typedef _Rope_base<_CharT,_Alloc> _Base;
+        typedef typename _Base::allocator_type allocator_type;
+        using _Base::_M_tree_ptr;
+        typedef __GC_CONST _CharT* _Cstrptr;
+
+        static _CharT _S_empty_c_str[1];
+
+        static bool _S_is0(_CharT __c) { return __c == _S_eos((_CharT*)0); }
+        enum { _S_copy_max = 23 };
+                // For strings shorter than _S_copy_max, we copy to
+                // concatenate.
+
+        typedef _Rope_RopeRep<_CharT,_Alloc> _RopeRep;
+        typedef _Rope_RopeConcatenation<_CharT,_Alloc> _RopeConcatenation;
+        typedef _Rope_RopeLeaf<_CharT,_Alloc> _RopeLeaf;
+        typedef _Rope_RopeFunction<_CharT,_Alloc> _RopeFunction;
+        typedef _Rope_RopeSubstring<_CharT,_Alloc> _RopeSubstring;
+
+        // Retrieve a character at the indicated position.
+        static _CharT _S_fetch(_RopeRep* __r, size_type __pos);
+
+#       ifndef __GC
+            // Obtain a pointer to the character at the indicated position.
+            // The pointer can be used to change the character.
+            // If such a pointer cannot be produced, as is frequently the
+            // case, 0 is returned instead.
+            // (Returns nonzero only if all nodes in the path have a refcount
+            // of 1.)
+            static _CharT* _S_fetch_ptr(_RopeRep* __r, size_type __pos);
+#       endif
+
+        static bool _S_apply_to_pieces(
+                                // should be template parameter
+                                _Rope_char_consumer<_CharT>& __c,
+                                const _RopeRep* __r,
+                                size_t __begin, size_t __end);
+                                // begin and end are assumed to be in range.
+
+#       ifndef __GC
+          static void _S_unref(_RopeRep* __t)
+          {
+              _RopeRep::_S_unref(__t);
+          }
+          static void _S_ref(_RopeRep* __t)
+          {
+              _RopeRep::_S_ref(__t);
+          }
+#       else /* __GC */
+          static void _S_unref(_RopeRep*) {}
+          static void _S_ref(_RopeRep*) {}
+#       endif
+
+
+#       ifdef __GC
+            typedef _Rope_RopeRep<_CharT,_Alloc>* _Self_destruct_ptr;
+#       else
+            typedef _Rope_self_destruct_ptr<_CharT,_Alloc> _Self_destruct_ptr;
+#       endif
+
+        // _Result is counted in refcount.
+        static _RopeRep* _S_substring(_RopeRep* __base,
+                                    size_t __start, size_t __endp1);
+
+        static _RopeRep* _S_concat_char_iter(_RopeRep* __r,
+                                          const _CharT* __iter, size_t __slen);
+                // Concatenate rope and char ptr, copying __s.
+                // Should really take an arbitrary iterator.
+                // Result is counted in refcount.
+        static _RopeRep* _S_destr_concat_char_iter(_RopeRep* __r,
+                                          const _CharT* __iter, size_t __slen)
+                // As above, but one reference to __r is about to be
+                // destroyed.  Thus the pieces may be recycled if all
+                // relevant reference counts are 1.
+#           ifdef __GC
+                // We can't really do anything since refcounts are unavailable.
+                { return _S_concat_char_iter(__r, __iter, __slen); }
+#           else
+                ;
+#           endif
+
+        static _RopeRep* _S_concat(_RopeRep* __left, _RopeRep* __right);
+                // General concatenation on _RopeRep.  _Result
+                // has refcount of 1.  Adjusts argument refcounts.
+
+   public:
+        void apply_to_pieces( size_t __begin, size_t __end,
+                              _Rope_char_consumer<_CharT>& __c) const {
+            _S_apply_to_pieces(__c, _M_tree_ptr, __begin, __end);
+        }
+
+
+   protected:
+
+        static size_t _S_rounded_up_size(size_t __n) {
+            return _RopeLeaf::_S_rounded_up_size(__n);
+        }
+
+        static size_t _S_allocated_capacity(size_t __n) {
+            if (_S_is_basic_char_type((_CharT*)0)) {
+                return _S_rounded_up_size(__n) - 1;
+            } else {
+                return _S_rounded_up_size(__n);
+            }
+        }
+                
+        // Allocate and construct a RopeLeaf using the supplied allocator
+        // Takes ownership of s instead of copying.
+        static _RopeLeaf* _S_new_RopeLeaf(__GC_CONST _CharT *__s,
+                                          size_t __size, allocator_type __a)
+        {
+            _RopeLeaf* __space = _LAllocator(__a).allocate(1);
+            return new(__space) _RopeLeaf(__s, __size, __a);
+        }
+
+        static _RopeConcatenation* _S_new_RopeConcatenation(
+                        _RopeRep* __left, _RopeRep* __right,
+                        allocator_type __a)
+        {
+            _RopeConcatenation* __space = _CAllocator(__a).allocate(1);
+            return new(__space) _RopeConcatenation(__left, __right, __a);
+        }
+
+        static _RopeFunction* _S_new_RopeFunction(char_producer<_CharT>* __f,
+                size_t __size, bool __d, allocator_type __a)
+        {
+            _RopeFunction* __space = _FAllocator(__a).allocate(1);
+            return new(__space) _RopeFunction(__f, __size, __d, __a);
+        }
+
+        static _RopeSubstring* _S_new_RopeSubstring(
+                _Rope_RopeRep<_CharT,_Alloc>* __b, size_t __s,
+                size_t __l, allocator_type __a)
+        {
+            _RopeSubstring* __space = _SAllocator(__a).allocate(1);
+            return new(__space) _RopeSubstring(__b, __s, __l, __a);
+        }
+
+          static
+          _RopeLeaf* _S_RopeLeaf_from_unowned_char_ptr(const _CharT *__s,
+                       size_t __size, allocator_type __a)
+#         define __STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __size, __a) \
+                _S_RopeLeaf_from_unowned_char_ptr(__s, __size, __a)     
+        {
+            if (0 == __size) return 0;
+            _CharT* __buf = __a.allocate(_S_rounded_up_size(__size));
+
+            uninitialized_copy_n(__s, __size, __buf);
+            _S_cond_store_eos(__buf[__size]);
+            try {
+              return _S_new_RopeLeaf(__buf, __size, __a);
+            }
+            catch(...)
+	      {
+		_RopeRep::__STL_FREE_STRING(__buf, __size, __a);
+		__throw_exception_again;
+	      }
+        }
+            
+
+        // Concatenation of nonempty strings.
+        // Always builds a concatenation node.
+        // Rebalances if the result is too deep.
+        // Result has refcount 1.
+        // Does not increment left and right ref counts even though
+        // they are referenced.
+        static _RopeRep*
+        _S_tree_concat(_RopeRep* __left, _RopeRep* __right);
+
+        // Concatenation helper functions
+        static _RopeLeaf*
+        _S_leaf_concat_char_iter(_RopeLeaf* __r,
+                                 const _CharT* __iter, size_t __slen);
+                // Concatenate by copying leaf.
+                // should take an arbitrary iterator
+                // result has refcount 1.
+#       ifndef __GC
+          static _RopeLeaf* _S_destr_leaf_concat_char_iter
+                        (_RopeLeaf* __r, const _CharT* __iter, size_t __slen);
+          // A version that potentially clobbers __r if __r->_M_ref_count == 1.
+#       endif
+
+        private:
+
+        static size_t _S_char_ptr_len(const _CharT* __s);
+                        // slightly generalized strlen
+
+        rope(_RopeRep* __t, const allocator_type& __a = allocator_type())
+          : _Base(__t,__a) { }
+
+
+        // Copy __r to the _CharT buffer.
+        // Returns __buffer + __r->_M_size.
+        // Assumes that buffer is uninitialized.
+        static _CharT* _S_flatten(_RopeRep* __r, _CharT* __buffer);
+
+        // Again, with explicit starting position and length.
+        // Assumes that buffer is uninitialized.
+        static _CharT* _S_flatten(_RopeRep* __r,
+                                  size_t __start, size_t __len,
+                                  _CharT* __buffer);
+
+        static const unsigned long 
+          _S_min_len[_RopeRep::_S_max_rope_depth + 1];
+
+        static bool _S_is_balanced(_RopeRep* __r)
+                { return (__r->_M_size >= _S_min_len[__r->_M_depth]); }
+
+        static bool _S_is_almost_balanced(_RopeRep* __r)
+                { return (__r->_M_depth == 0 ||
+                          __r->_M_size >= _S_min_len[__r->_M_depth - 1]); }
+
+        static bool _S_is_roughly_balanced(_RopeRep* __r)
+                { return (__r->_M_depth <= 1 ||
+                          __r->_M_size >= _S_min_len[__r->_M_depth - 2]); }
+
+        // Assumes the result is not empty.
+        static _RopeRep* _S_concat_and_set_balanced(_RopeRep* __left,
+                                                     _RopeRep* __right)
+        {
+            _RopeRep* __result = _S_concat(__left, __right);
+            if (_S_is_balanced(__result)) __result->_M_is_balanced = true;
+            return __result;
+        }
+
+        // The basic rebalancing operation.  Logically copies the
+        // rope.  The result has refcount of 1.  The client will
+        // usually decrement the reference count of __r.
+        // The result is within height 2 of balanced by the above
+        // definition.
+        static _RopeRep* _S_balance(_RopeRep* __r);
+
+        // Add all unbalanced subtrees to the forest of balanceed trees.
+        // Used only by balance.
+        static void _S_add_to_forest(_RopeRep*__r, _RopeRep** __forest);
+        
+        // Add __r to forest, assuming __r is already balanced.
+        static void _S_add_leaf_to_forest(_RopeRep* __r, _RopeRep** __forest);
+
+        // Print to stdout, exposing structure
+        static void _S_dump(_RopeRep* __r, int __indent = 0);
+
+        // Return -1, 0, or 1 if __x < __y, __x == __y, or __x > __y resp.
+        static int _S_compare(const _RopeRep* __x, const _RopeRep* __y);
+
+   public:
+        bool empty() const { return 0 == _M_tree_ptr; }
+
+        // Comparison member function.  This is public only for those
+        // clients that need a ternary comparison.  Others
+        // should use the comparison operators below.
+        int compare(const rope& __y) const {
+            return _S_compare(_M_tree_ptr, __y._M_tree_ptr);
+        }
+
+        rope(const _CharT* __s, const allocator_type& __a = allocator_type())
+        : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, _S_char_ptr_len(__s),
+                                                 __a),__a)
+        { }
+
+        rope(const _CharT* __s, size_t __len,
+             const allocator_type& __a = allocator_type())
+        : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __len, __a), __a)
+        { }
+
+        // Should perhaps be templatized with respect to the iterator type
+        // and use Sequence_buffer.  (It should perhaps use sequence_buffer
+        // even now.)
+        rope(const _CharT *__s, const _CharT *__e,
+             const allocator_type& __a = allocator_type())
+        : _Base(__STL_ROPE_FROM_UNOWNED_CHAR_PTR(__s, __e - __s, __a), __a)
+        { }
+
+        rope(const const_iterator& __s, const const_iterator& __e,
+             const allocator_type& __a = allocator_type())
+        : _Base(_S_substring(__s._M_root, __s._M_current_pos,
+                             __e._M_current_pos), __a)
+        { }
+
+        rope(const iterator& __s, const iterator& __e,
+             const allocator_type& __a = allocator_type())
+        : _Base(_S_substring(__s._M_root, __s._M_current_pos,
+                             __e._M_current_pos), __a)
+        { }
+
+        rope(_CharT __c, const allocator_type& __a = allocator_type())
+        : _Base(__a)
+        {
+            _CharT* __buf = _Data_allocate(_S_rounded_up_size(1));
+
+            std::_Construct(__buf, __c);
+            try {
+                _M_tree_ptr = _S_new_RopeLeaf(__buf, 1, __a);
+            }
+            catch(...)
+	      {
+		_RopeRep::__STL_FREE_STRING(__buf, 1, __a);
+		__throw_exception_again;
+	      }
+        }
+
+        rope(size_t __n, _CharT __c,
+             const allocator_type& __a = allocator_type());
+
+        rope(const allocator_type& __a = allocator_type())
+        : _Base(0, __a) {}
+
+        // Construct a rope from a function that can compute its members
+        rope(char_producer<_CharT> *__fn, size_t __len, bool __delete_fn,
+             const allocator_type& __a = allocator_type())
+            : _Base(__a)
+        {
+            _M_tree_ptr = (0 == __len) ?
+               0 : _S_new_RopeFunction(__fn, __len, __delete_fn, __a);
+        }
+
+        rope(const rope& __x, const allocator_type& __a = allocator_type())
+        : _Base(__x._M_tree_ptr, __a)
+        {
+            _S_ref(_M_tree_ptr);
+        }
+
+        ~rope()
+        {
+            _S_unref(_M_tree_ptr);
+        }
+
+        rope& operator=(const rope& __x)
+        {
+            _RopeRep* __old = _M_tree_ptr;
+            _M_tree_ptr = __x._M_tree_ptr;
+            _S_ref(_M_tree_ptr);
+            _S_unref(__old);
+            return(*this);
+        }
+
+        void clear()
+        {
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = 0;
+        }
+
+        void push_back(_CharT __x)
+        {
+            _RopeRep* __old = _M_tree_ptr;
+            _M_tree_ptr = _S_destr_concat_char_iter(_M_tree_ptr, &__x, 1);
+            _S_unref(__old);
+        }
+
+        void pop_back()
+        {
+            _RopeRep* __old = _M_tree_ptr;
+            _M_tree_ptr = 
+              _S_substring(_M_tree_ptr, 0, _M_tree_ptr->_M_size - 1);
+            _S_unref(__old);
+        }
+
+        _CharT back() const
+        {
+            return _S_fetch(_M_tree_ptr, _M_tree_ptr->_M_size - 1);
+        }
+
+        void push_front(_CharT __x)
+        {
+            _RopeRep* __old = _M_tree_ptr;
+            _RopeRep* __left =
+              __STL_ROPE_FROM_UNOWNED_CHAR_PTR(&__x, 1, get_allocator());
+            try {
+              _M_tree_ptr = _S_concat(__left, _M_tree_ptr);
+              _S_unref(__old);
+              _S_unref(__left);
+            }
+            catch(...)
+	      {
+		_S_unref(__left);
+		__throw_exception_again;
+	      }
+        }
+
+        void pop_front()
+        {
+            _RopeRep* __old = _M_tree_ptr;
+            _M_tree_ptr = _S_substring(_M_tree_ptr, 1, _M_tree_ptr->_M_size);
+            _S_unref(__old);
+        }
+
+        _CharT front() const
+        {
+            return _S_fetch(_M_tree_ptr, 0);
+        }
+
+        void balance()
+        {
+            _RopeRep* __old = _M_tree_ptr;
+            _M_tree_ptr = _S_balance(_M_tree_ptr);
+            _S_unref(__old);
+        }
+
+        void copy(_CharT* __buffer) const {
+            _Destroy(__buffer, __buffer + size());
+            _S_flatten(_M_tree_ptr, __buffer);
+        }
+
+        // This is the copy function from the standard, but
+        // with the arguments reordered to make it consistent with the
+        // rest of the interface.
+        // Note that this guaranteed not to compile if the draft standard
+        // order is assumed.
+        size_type copy(size_type __pos, size_type __n, _CharT* __buffer) const 
+        {
+            size_t __size = size();
+            size_t __len = (__pos + __n > __size? __size - __pos : __n);
+
+            _Destroy(__buffer, __buffer + __len);
+            _S_flatten(_M_tree_ptr, __pos, __len, __buffer);
+            return __len;
+        }
+
+        // Print to stdout, exposing structure.  May be useful for
+        // performance debugging.
+        void dump() {
+            _S_dump(_M_tree_ptr);
+        }
+
+        // Convert to 0 terminated string in new allocated memory.
+        // Embedded 0s in the input do not terminate the copy.
+        const _CharT* c_str() const;
+
+        // As above, but lso use the flattened representation as the
+        // the new rope representation.
+        const _CharT* replace_with_c_str();
+
+        // Reclaim memory for the c_str generated flattened string.
+        // Intentionally undocumented, since it's hard to say when this
+        // is safe for multiple threads.
+        void delete_c_str () {
+            if (0 == _M_tree_ptr) return;
+            if (_RopeRep::_S_leaf == _M_tree_ptr->_M_tag && 
+                ((_RopeLeaf*)_M_tree_ptr)->_M_data == 
+                      _M_tree_ptr->_M_c_string) {
+                // Representation shared
+                return;
+            }
+#           ifndef __GC
+              _M_tree_ptr->_M_free_c_string();
+#           endif
+            _M_tree_ptr->_M_c_string = 0;
+        }
+
+        _CharT operator[] (size_type __pos) const {
+            return _S_fetch(_M_tree_ptr, __pos);
+        }
+
+        _CharT at(size_type __pos) const {
+           // if (__pos >= size()) throw out_of_range;  // XXX
+           return (*this)[__pos];
+        }
+
+        const_iterator begin() const {
+            return(const_iterator(_M_tree_ptr, 0));
+        }
+
+        // An easy way to get a const iterator from a non-const container.
+        const_iterator const_begin() const {
+            return(const_iterator(_M_tree_ptr, 0));
+        }
+
+        const_iterator end() const {
+            return(const_iterator(_M_tree_ptr, size()));
+        }
+
+        const_iterator const_end() const {
+            return(const_iterator(_M_tree_ptr, size()));
+        }
+
+        size_type size() const { 
+            return(0 == _M_tree_ptr? 0 : _M_tree_ptr->_M_size);
+        }
+
+        size_type length() const {
+            return size();
+        }
+
+        size_type max_size() const {
+            return _S_min_len[_RopeRep::_S_max_rope_depth-1] - 1;
+            //  Guarantees that the result can be sufficirntly
+            //  balanced.  Longer ropes will probably still work,
+            //  but it's harder to make guarantees.
+        }
+
+        typedef reverse_iterator const_reverse_iterator;
+
+        const_reverse_iterator rbegin() const {
+            return const_reverse_iterator(end());
+        }
+
+        const_reverse_iterator const_rbegin() const {
+            return const_reverse_iterator(end());
+        }
+
+        const_reverse_iterator rend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        const_reverse_iterator const_rend() const {
+            return const_reverse_iterator(begin());
+        }
+
+        template
+        friend rope<_CharT2,_Alloc2>
+        operator+ (const rope<_CharT2,_Alloc2>& __left,
+                   const rope<_CharT2,_Alloc2>& __right);
+        
+        template
+        friend rope<_CharT2,_Alloc2>
+        operator+ (const rope<_CharT2,_Alloc2>& __left,
+                   const _CharT2* __right);
+        
+        template
+        friend rope<_CharT2,_Alloc2>
+        operator+ (const rope<_CharT2,_Alloc2>& __left, _CharT2 __right);
+        // The symmetric cases are intentionally omitted, since they're presumed
+        // to be less common, and we don't handle them as well.
+
+        // The following should really be templatized.
+        // The first argument should be an input iterator or
+        // forward iterator with value_type _CharT.
+        rope& append(const _CharT* __iter, size_t __n) {
+            _RopeRep* __result = 
+              _S_destr_concat_char_iter(_M_tree_ptr, __iter, __n);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+            return *this;
+        }
+
+        rope& append(const _CharT* __c_string) {
+            size_t __len = _S_char_ptr_len(__c_string);
+            append(__c_string, __len);
+            return(*this);
+        }
+
+        rope& append(const _CharT* __s, const _CharT* __e) {
+            _RopeRep* __result =
+                _S_destr_concat_char_iter(_M_tree_ptr, __s, __e - __s);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+            return *this;
+        }
+
+        rope& append(const_iterator __s, const_iterator __e) {
+            _Self_destruct_ptr __appendee(_S_substring(
+              __s._M_root, __s._M_current_pos, __e._M_current_pos));
+            _RopeRep* __result = 
+              _S_concat(_M_tree_ptr, (_RopeRep*)__appendee);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+            return *this;
+        }
+
+        rope& append(_CharT __c) {
+            _RopeRep* __result = 
+              _S_destr_concat_char_iter(_M_tree_ptr, &__c, 1);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+            return *this;
+        }
+
+        rope& append() { return append(_CharT()); }  // XXX why?
+
+        rope& append(const rope& __y) {
+            _RopeRep* __result = _S_concat(_M_tree_ptr, __y._M_tree_ptr);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+            return *this;
+        }
+
+        rope& append(size_t __n, _CharT __c) {
+            rope<_CharT,_Alloc> __last(__n, __c);
+            return append(__last);
+        }
+
+        void swap(rope& __b) {
+            _RopeRep* __tmp = _M_tree_ptr;
+            _M_tree_ptr = __b._M_tree_ptr;
+            __b._M_tree_ptr = __tmp;
+        }
+
+
+    protected:
+        // Result is included in refcount.
+        static _RopeRep* replace(_RopeRep* __old, size_t __pos1,
+                                  size_t __pos2, _RopeRep* __r) {
+            if (0 == __old) { _S_ref(__r); return __r; }
+            _Self_destruct_ptr __left(
+              _S_substring(__old, 0, __pos1));
+            _Self_destruct_ptr __right(
+              _S_substring(__old, __pos2, __old->_M_size));
+            _RopeRep* __result;
+
+            if (0 == __r) {
+                __result = _S_concat(__left, __right);
+            } else {
+                _Self_destruct_ptr __left_result(_S_concat(__left, __r));
+                __result = _S_concat(__left_result, __right);
+            }
+            return __result;
+        }
+
+    public:
+        void insert(size_t __p, const rope& __r) {
+            _RopeRep* __result = 
+              replace(_M_tree_ptr, __p, __p, __r._M_tree_ptr);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+        }
+
+        void insert(size_t __p, size_t __n, _CharT __c) {
+            rope<_CharT,_Alloc> __r(__n,__c);
+            insert(__p, __r);
+        }
+
+        void insert(size_t __p, const _CharT* __i, size_t __n) {
+            _Self_destruct_ptr __left(_S_substring(_M_tree_ptr, 0, __p));
+            _Self_destruct_ptr __right(_S_substring(_M_tree_ptr, __p, size()));
+            _Self_destruct_ptr __left_result(
+              _S_concat_char_iter(__left, __i, __n));
+                // _S_ destr_concat_char_iter should be safe here.
+                // But as it stands it's probably not a win, since __left
+                // is likely to have additional references.
+            _RopeRep* __result = _S_concat(__left_result, __right);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+        }
+
+        void insert(size_t __p, const _CharT* __c_string) {
+            insert(__p, __c_string, _S_char_ptr_len(__c_string));
+        }
+
+        void insert(size_t __p, _CharT __c) {
+            insert(__p, &__c, 1);
+        }
+
+        void insert(size_t __p) {
+            _CharT __c = _CharT();
+            insert(__p, &__c, 1);
+        }
+
+        void insert(size_t __p, const _CharT* __i, const _CharT* __j) {
+            rope __r(__i, __j);
+            insert(__p, __r);
+        }
+
+        void insert(size_t __p, const const_iterator& __i,
+                              const const_iterator& __j) {
+            rope __r(__i, __j);
+            insert(__p, __r);
+        }
+
+        void insert(size_t __p, const iterator& __i,
+                              const iterator& __j) {
+            rope __r(__i, __j);
+            insert(__p, __r);
+        }
+
+        // (position, length) versions of replace operations:
+
+        void replace(size_t __p, size_t __n, const rope& __r) {
+            _RopeRep* __result = 
+              replace(_M_tree_ptr, __p, __p + __n, __r._M_tree_ptr);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+        }
+
+        void replace(size_t __p, size_t __n, 
+                     const _CharT* __i, size_t __i_len) {
+            rope __r(__i, __i_len);
+            replace(__p, __n, __r);
+        }
+
+        void replace(size_t __p, size_t __n, _CharT __c) {
+            rope __r(__c);
+            replace(__p, __n, __r);
+        }
+
+        void replace(size_t __p, size_t __n, const _CharT* __c_string) {
+            rope __r(__c_string);
+            replace(__p, __n, __r);
+        }
+
+        void replace(size_t __p, size_t __n, 
+                     const _CharT* __i, const _CharT* __j) {
+            rope __r(__i, __j);
+            replace(__p, __n, __r);
+        }
+
+        void replace(size_t __p, size_t __n,
+                     const const_iterator& __i, const const_iterator& __j) {
+            rope __r(__i, __j);
+            replace(__p, __n, __r);
+        }
+
+        void replace(size_t __p, size_t __n,
+                     const iterator& __i, const iterator& __j) {
+            rope __r(__i, __j);
+            replace(__p, __n, __r);
+        }
+
+        // Single character variants:
+        void replace(size_t __p, _CharT __c) {
+            iterator __i(this, __p);
+            *__i = __c;
+        }
+
+        void replace(size_t __p, const rope& __r) {
+            replace(__p, 1, __r);
+        }
+
+        void replace(size_t __p, const _CharT* __i, size_t __i_len) {
+            replace(__p, 1, __i, __i_len);
+        }
+
+        void replace(size_t __p, const _CharT* __c_string) {
+            replace(__p, 1, __c_string);
+        }
+
+        void replace(size_t __p, const _CharT* __i, const _CharT* __j) {
+            replace(__p, 1, __i, __j);
+        }
+
+        void replace(size_t __p, const const_iterator& __i,
+                               const const_iterator& __j) {
+            replace(__p, 1, __i, __j);
+        }
+
+        void replace(size_t __p, const iterator& __i,
+                               const iterator& __j) {
+            replace(__p, 1, __i, __j);
+        }
+
+        // Erase, (position, size) variant.
+        void erase(size_t __p, size_t __n) {
+            _RopeRep* __result = replace(_M_tree_ptr, __p, __p + __n, 0);
+            _S_unref(_M_tree_ptr);
+            _M_tree_ptr = __result;
+        }
+
+        // Erase, single character
+        void erase(size_t __p) {
+            erase(__p, __p + 1);
+        }
+
+        // Insert, iterator variants.  
+        iterator insert(const iterator& __p, const rope& __r)
+                { insert(__p.index(), __r); return __p; }
+        iterator insert(const iterator& __p, size_t __n, _CharT __c)
+                { insert(__p.index(), __n, __c); return __p; }
+        iterator insert(const iterator& __p, _CharT __c) 
+                { insert(__p.index(), __c); return __p; }
+        iterator insert(const iterator& __p ) 
+                { insert(__p.index()); return __p; }
+        iterator insert(const iterator& __p, const _CharT* c_string) 
+                { insert(__p.index(), c_string); return __p; }
+        iterator insert(const iterator& __p, const _CharT* __i, size_t __n)
+                { insert(__p.index(), __i, __n); return __p; }
+        iterator insert(const iterator& __p, const _CharT* __i, 
+                        const _CharT* __j)
+                { insert(__p.index(), __i, __j);  return __p; }
+        iterator insert(const iterator& __p,
+                        const const_iterator& __i, const const_iterator& __j)
+                { insert(__p.index(), __i, __j); return __p; }
+        iterator insert(const iterator& __p,
+                        const iterator& __i, const iterator& __j)
+                { insert(__p.index(), __i, __j); return __p; }
+
+        // Replace, range variants.
+        void replace(const iterator& __p, const iterator& __q,
+                     const rope& __r)
+                { replace(__p.index(), __q.index() - __p.index(), __r); }
+        void replace(const iterator& __p, const iterator& __q, _CharT __c)
+                { replace(__p.index(), __q.index() - __p.index(), __c); }
+        void replace(const iterator& __p, const iterator& __q,
+                     const _CharT* __c_string)
+                { replace(__p.index(), __q.index() - __p.index(), __c_string); }
+        void replace(const iterator& __p, const iterator& __q,
+                     const _CharT* __i, size_t __n)
+                { replace(__p.index(), __q.index() - __p.index(), __i, __n); }
+        void replace(const iterator& __p, const iterator& __q,
+                     const _CharT* __i, const _CharT* __j)
+                { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+        void replace(const iterator& __p, const iterator& __q,
+                     const const_iterator& __i, const const_iterator& __j)
+                { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+        void replace(const iterator& __p, const iterator& __q,
+                     const iterator& __i, const iterator& __j)
+                { replace(__p.index(), __q.index() - __p.index(), __i, __j); }
+
+        // Replace, iterator variants.
+        void replace(const iterator& __p, const rope& __r)
+                { replace(__p.index(), __r); }
+        void replace(const iterator& __p, _CharT __c)
+                { replace(__p.index(), __c); }
+        void replace(const iterator& __p, const _CharT* __c_string)
+                { replace(__p.index(), __c_string); }
+        void replace(const iterator& __p, const _CharT* __i, size_t __n)
+                { replace(__p.index(), __i, __n); }
+        void replace(const iterator& __p, const _CharT* __i, const _CharT* __j)
+                { replace(__p.index(), __i, __j); }
+        void replace(const iterator& __p, const_iterator __i, 
+                     const_iterator __j)
+                { replace(__p.index(), __i, __j); }
+        void replace(const iterator& __p, iterator __i, iterator __j)
+                { replace(__p.index(), __i, __j); }
+
+        // Iterator and range variants of erase
+        iterator erase(const iterator& __p, const iterator& __q) {
+            size_t __p_index = __p.index();
+            erase(__p_index, __q.index() - __p_index);
+            return iterator(this, __p_index);
+        }
+        iterator erase(const iterator& __p) {
+            size_t __p_index = __p.index();
+            erase(__p_index, 1);
+            return iterator(this, __p_index);
+        }
+
+        rope substr(size_t __start, size_t __len = 1) const {
+            return rope<_CharT,_Alloc>(
+                        _S_substring(_M_tree_ptr, __start, __start + __len));
+        }
+
+        rope substr(iterator __start, iterator __end) const {
+            return rope<_CharT,_Alloc>(
+                _S_substring(_M_tree_ptr, __start.index(), __end.index()));
+        }
+        
+        rope substr(iterator __start) const {
+            size_t __pos = __start.index();
+            return rope<_CharT,_Alloc>(
+                        _S_substring(_M_tree_ptr, __pos, __pos + 1));
+        }
+        
+        rope substr(const_iterator __start, const_iterator __end) const {
+            // This might eventually take advantage of the cache in the
+            // iterator.
+            return rope<_CharT,_Alloc>(
+              _S_substring(_M_tree_ptr, __start.index(), __end.index()));
+        }
+
+        rope<_CharT,_Alloc> substr(const_iterator __start) {
+            size_t __pos = __start.index();
+            return rope<_CharT,_Alloc>(
+              _S_substring(_M_tree_ptr, __pos, __pos + 1));
+        }
+
+        static const size_type npos;
+
+        size_type find(_CharT __c, size_type __pos = 0) const;
+        size_type find(const _CharT* __s, size_type __pos = 0) const {
+            size_type __result_pos;
+            const_iterator __result =
+	      std::search(const_begin() + __pos, const_end(),
+			  __s, __s + _S_char_ptr_len(__s));
+            __result_pos = __result.index();
+#           ifndef __STL_OLD_ROPE_SEMANTICS
+                if (__result_pos == size()) __result_pos = npos;
+#           endif
+            return __result_pos;
+        }
+
+        iterator mutable_begin() {
+            return(iterator(this, 0));
+        }
+
+        iterator mutable_end() {
+            return(iterator(this, size()));
+        }
+
+        typedef reverse_iterator reverse_iterator;
+
+        reverse_iterator mutable_rbegin() {
+            return reverse_iterator(mutable_end());
+        }
+
+        reverse_iterator mutable_rend() {
+            return reverse_iterator(mutable_begin());
+        }
+
+        reference mutable_reference_at(size_type __pos) {
+            return reference(this, __pos);
+        }
+
+#       ifdef __STD_STUFF
+            reference operator[] (size_type __pos) {
+                return _char_ref_proxy(this, __pos);
+            }
+
+            reference at(size_type __pos) {
+                // if (__pos >= size()) throw out_of_range;  // XXX
+                return (*this)[__pos];
+            }
+
+            void resize(size_type __n, _CharT __c) {}
+            void resize(size_type __n) {}
+            void reserve(size_type __res_arg = 0) {}
+            size_type capacity() const {
+                return max_size();
+            }
+
+          // Stuff below this line is dangerous because it's error prone.
+          // I would really like to get rid of it.
+            // copy function with funny arg ordering.
+              size_type copy(_CharT* __buffer, size_type __n, 
+                             size_type __pos = 0) const {
+                return copy(__pos, __n, __buffer);
+              }
+
+            iterator end() { return mutable_end(); }
+
+            iterator begin() { return mutable_begin(); }
+
+            reverse_iterator rend() { return mutable_rend(); }
+
+            reverse_iterator rbegin() { return mutable_rbegin(); }
+
+#       else
+
+            const_iterator end() { return const_end(); }
+
+            const_iterator begin() { return const_begin(); }
+
+            const_reverse_iterator rend() { return const_rend(); }
+  
+            const_reverse_iterator rbegin() { return const_rbegin(); }
+
+#       endif
+        
+};
+
+template 
+const typename rope<_CharT, _Alloc>::size_type rope<_CharT, _Alloc>::npos =
+                        (size_type)(-1);
+
+template 
+inline bool operator== (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return (__x._M_current_pos == __y._M_current_pos && 
+          __x._M_root == __y._M_root);
+}
+
+template 
+inline bool operator< (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                       const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return (__x._M_current_pos < __y._M_current_pos);
+}
+
+template 
+inline bool operator!= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator> (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                       const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool operator>= (const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline ptrdiff_t operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x,
+                           const _Rope_const_iterator<_CharT,_Alloc>& __y) {
+  return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos;
+}
+
+template 
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator-(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) {
+  return _Rope_const_iterator<_CharT,_Alloc>(
+            __x._M_root, __x._M_current_pos - __n);
+}
+
+template 
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator+(const _Rope_const_iterator<_CharT,_Alloc>& __x, ptrdiff_t __n) {
+  return _Rope_const_iterator<_CharT,_Alloc>(
+           __x._M_root, __x._M_current_pos + __n);
+}
+
+template 
+inline _Rope_const_iterator<_CharT,_Alloc>
+operator+(ptrdiff_t __n, const _Rope_const_iterator<_CharT,_Alloc>& __x) {
+  return _Rope_const_iterator<_CharT,_Alloc>(
+           __x._M_root, __x._M_current_pos + __n);
+}
+
+template 
+inline bool operator== (const _Rope_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return (__x._M_current_pos == __y._M_current_pos && 
+          __x._M_root_rope == __y._M_root_rope);
+}
+
+template 
+inline bool operator< (const _Rope_iterator<_CharT,_Alloc>& __x,
+                       const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return (__x._M_current_pos < __y._M_current_pos);
+}
+
+template 
+inline bool operator!= (const _Rope_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool operator> (const _Rope_iterator<_CharT,_Alloc>& __x,
+                       const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool operator<= (const _Rope_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool operator>= (const _Rope_iterator<_CharT,_Alloc>& __x,
+                        const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline ptrdiff_t operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
+                           const _Rope_iterator<_CharT,_Alloc>& __y) {
+  return (ptrdiff_t)__x._M_current_pos - (ptrdiff_t)__y._M_current_pos;
+}
+
+template 
+inline _Rope_iterator<_CharT,_Alloc>
+operator-(const _Rope_iterator<_CharT,_Alloc>& __x,
+          ptrdiff_t __n) {
+  return _Rope_iterator<_CharT,_Alloc>(
+    __x._M_root_rope, __x._M_current_pos - __n);
+}
+
+template 
+inline _Rope_iterator<_CharT,_Alloc>
+operator+(const _Rope_iterator<_CharT,_Alloc>& __x,
+          ptrdiff_t __n) {
+  return _Rope_iterator<_CharT,_Alloc>(
+    __x._M_root_rope, __x._M_current_pos + __n);
+}
+
+template 
+inline _Rope_iterator<_CharT,_Alloc>
+operator+(ptrdiff_t __n, const _Rope_iterator<_CharT,_Alloc>& __x) {
+  return _Rope_iterator<_CharT,_Alloc>(
+    __x._M_root_rope, __x._M_current_pos + __n);
+}
+
+template 
+inline
+rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left,
+           const rope<_CharT,_Alloc>& __right)
+{
+    return rope<_CharT,_Alloc>(
+      rope<_CharT,_Alloc>::_S_concat(__left._M_tree_ptr, __right._M_tree_ptr));
+    // Inlining this should make it possible to keep __left and
+    // __right in registers.
+}
+
+template 
+inline
+rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left, 
+      const rope<_CharT,_Alloc>& __right)
+{
+    __left.append(__right);
+    return __left;
+}
+
+template 
+inline
+rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left,
+           const _CharT* __right) {
+    size_t __rlen = rope<_CharT,_Alloc>::_S_char_ptr_len(__right);
+    return rope<_CharT,_Alloc>(
+      rope<_CharT,_Alloc>::_S_concat_char_iter(
+        __left._M_tree_ptr, __right, __rlen)); 
+}
+
+template 
+inline
+rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left,
+            const _CharT* __right) {
+    __left.append(__right);
+    return __left;
+}
+
+template 
+inline
+rope<_CharT,_Alloc>
+operator+ (const rope<_CharT,_Alloc>& __left, _CharT __right) {
+    return rope<_CharT,_Alloc>(
+      rope<_CharT,_Alloc>::_S_concat_char_iter(
+        __left._M_tree_ptr, &__right, 1));
+}
+
+template 
+inline
+rope<_CharT,_Alloc>&
+operator+= (rope<_CharT,_Alloc>& __left, _CharT __right) {
+    __left.append(__right);
+    return __left;
+}
+
+template 
+bool
+operator< (const rope<_CharT,_Alloc>& __left, 
+           const rope<_CharT,_Alloc>& __right) {
+    return __left.compare(__right) < 0;
+}
+        
+template 
+bool
+operator== (const rope<_CharT,_Alloc>& __left, 
+            const rope<_CharT,_Alloc>& __right) {
+    return __left.compare(__right) == 0;
+}
+
+template 
+inline bool operator== (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+                        const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
+        return (__x._M_pos == __y._M_pos && __x._M_root == __y._M_root);
+}
+
+template 
+inline bool
+operator!= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template 
+inline bool
+operator> (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+  return __y < __x;
+}
+
+template 
+inline bool
+operator<= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+  return !(__y < __x);
+}
+
+template 
+inline bool
+operator>= (const rope<_CharT,_Alloc>& __x, const rope<_CharT,_Alloc>& __y) {
+  return !(__x < __y);
+}
+
+template 
+inline bool operator!= (const _Rope_char_ptr_proxy<_CharT,_Alloc>& __x,
+                        const _Rope_char_ptr_proxy<_CharT,_Alloc>& __y) {
+  return !(__x == __y);
+}
+
+template
+std::basic_ostream<_CharT, _Traits>& operator<<
+                                        (std::basic_ostream<_CharT, _Traits>& __o,
+                                         const rope<_CharT, _Alloc>& __r);
+
+typedef rope crope;
+typedef rope wrope;
+
+inline crope::reference __mutable_reference_at(crope& __c, size_t __i)
+{
+    return __c.mutable_reference_at(__i);
+}
+
+inline wrope::reference __mutable_reference_at(wrope& __c, size_t __i)
+{
+    return __c.mutable_reference_at(__i);
+}
+
+template 
+inline void swap(rope<_CharT,_Alloc>& __x, rope<_CharT,_Alloc>& __y) {
+  __x.swap(__y);
+}
+
+// Hash functions should probably be revisited later:
+template<> struct hash
+{
+  size_t operator()(const crope& __str) const
+  {
+    size_t __size = __str.size();
+
+    if (0 == __size) return 0;
+    return 13*__str[0] + 5*__str[__size - 1] + __size;
+  }
+};
+
+
+template<> struct hash
+{
+  size_t operator()(const wrope& __str) const
+  {
+    size_t __size = __str.size();
+
+    if (0 == __size) return 0;
+    return 13*__str[0] + 5*__str[__size - 1] + __size;
+  }
+};
+
+} // namespace __gnu_cxx
+
+# include 
+
+# endif /* __SGI_STL_INTERNAL_ROPE_H */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_algorithm.h b/contrib/libstdc++/include/std/std_algorithm.h
new file mode 100644
index 0000000..bcc0c8a
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_algorithm.h
@@ -0,0 +1,75 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file algorithm
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_ALGORITHM
+#define _CPP_ALGORITHM 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_ALGORITHM */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_bitset.h b/contrib/libstdc++/include/std/std_bitset.h
new file mode 100644
index 0000000..0945c90
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_bitset.h
@@ -0,0 +1,1140 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file bitset
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _GLIBCPP_BITSET_H
+#define _GLIBCPP_BITSET_H
+
+#pragma GCC system_header
+
+#include      // for size_t
+#include      // for memset
+#include 
+#include    // for invalid_argument, out_of_range,
+                                // overflow_error
+#include      // for ostream (operator<<)
+#include      // for istream (operator>>)
+
+
+#define _GLIBCPP_BITSET_BITS_PER_WORD (CHAR_BIT*sizeof(unsigned long))
+#define _GLIBCPP_BITSET_WORDS(__n) \
+ ((__n) < 1 ? 1 : ((__n) + _GLIBCPP_BITSET_BITS_PER_WORD - 1)/_GLIBCPP_BITSET_BITS_PER_WORD)
+
+namespace std
+{
+  extern unsigned char 	_S_bit_count[256];
+  extern unsigned char 	_S_first_one[256];
+
+  /**
+   *  @if maint
+   *  Base class, general case.  It is a class inveriant that _Nw will be
+   *  nonnegative.
+   *
+   *  See documentation for bitset.
+   *  @endif
+  */
+  template
+    struct _Base_bitset
+    {
+      typedef unsigned long _WordT;
+
+      /// 0 is the least significant word.
+      _WordT 		_M_w[_Nw];
+
+      _Base_bitset() { _M_do_reset(); }
+      _Base_bitset(unsigned long __val)
+      {
+	_M_do_reset();
+	_M_w[0] = __val;
+      }
+
+      static size_t
+      _S_whichword(size_t __pos )
+      { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+
+      static size_t
+      _S_whichbyte(size_t __pos )
+      { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+
+      static size_t
+      _S_whichbit(size_t __pos )
+      { return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+
+      static _WordT
+      _S_maskbit(size_t __pos )
+      { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+      _WordT&
+      _M_getword(size_t __pos)
+      { return _M_w[_S_whichword(__pos)]; }
+
+      _WordT
+      _M_getword(size_t __pos) const
+      { return _M_w[_S_whichword(__pos)]; }
+
+      _WordT&
+      _M_hiword() { return _M_w[_Nw - 1]; }
+
+      _WordT
+      _M_hiword() const { return _M_w[_Nw - 1]; }
+
+      void
+      _M_do_and(const _Base_bitset<_Nw>& __x)
+      {
+	for (size_t __i = 0; __i < _Nw; __i++)
+	  _M_w[__i] &= __x._M_w[__i];
+      }
+
+      void
+      _M_do_or(const _Base_bitset<_Nw>& __x)
+      {
+	for (size_t __i = 0; __i < _Nw; __i++)
+	  _M_w[__i] |= __x._M_w[__i];
+      }
+
+      void
+      _M_do_xor(const _Base_bitset<_Nw>& __x)
+      {
+	for (size_t __i = 0; __i < _Nw; __i++)
+	  _M_w[__i] ^= __x._M_w[__i];
+      }
+
+      void
+      _M_do_left_shift(size_t __shift);
+
+      void
+      _M_do_right_shift(size_t __shift);
+
+      void
+      _M_do_flip()
+      {
+	for (size_t __i = 0; __i < _Nw; __i++)
+	  _M_w[__i] = ~_M_w[__i];
+      }
+
+      void
+      _M_do_set()
+      {
+	for (size_t __i = 0; __i < _Nw; __i++)
+	  _M_w[__i] = ~static_cast<_WordT>(0);
+      }
+
+      void
+      _M_do_reset() { memset(_M_w, 0, _Nw * sizeof(_WordT)); }
+
+      bool
+      _M_is_equal(const _Base_bitset<_Nw>& __x) const
+      {
+	for (size_t __i = 0; __i < _Nw; ++__i)
+	  {
+	    if (_M_w[__i] != __x._M_w[__i])
+	      return false;
+	  }
+	return true;
+      }
+
+      bool
+      _M_is_any() const
+      {
+	for (size_t __i = 0; __i < _Nw; __i++)
+	  {
+	    if (_M_w[__i] != static_cast<_WordT>(0))
+	      return true;
+	  }
+	return false;
+      }
+
+      size_t
+      _M_do_count() const
+      {
+	size_t __result = 0;
+	const unsigned char* __byte_ptr = (const unsigned char*)_M_w;
+	const unsigned char* __end_ptr = (const unsigned char*)(_M_w + _Nw);
+
+	while ( __byte_ptr < __end_ptr )
+	  {
+	    __result += _S_bit_count[*__byte_ptr];
+	    __byte_ptr++;
+	  }
+	return __result;
+      }
+
+      unsigned long
+      _M_do_to_ulong() const;
+
+      // find first "on" bit
+      size_t
+      _M_do_find_first(size_t __not_found) const;
+
+      // find the next "on" bit that follows "prev"
+      size_t
+      _M_do_find_next(size_t __prev, size_t __not_found) const;
+    };
+
+  // Definitions of non-inline functions from _Base_bitset.
+  template
+    void
+    _Base_bitset<_Nw>::_M_do_left_shift(size_t __shift)
+    {
+      if (__shift != 0)
+	{
+	  const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
+	  const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
+
+	  if (__offset == 0)
+	    for (size_t __n = _Nw - 1; __n >= __wshift; --__n)
+	      _M_w[__n] = _M_w[__n - __wshift];
+	  else
+	    {
+	      const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
+	      for (size_t __n = _Nw - 1; __n > __wshift; --__n)
+		_M_w[__n] = (_M_w[__n - __wshift] << __offset) |
+		  (_M_w[__n - __wshift - 1] >> __sub_offset);
+	      _M_w[__wshift] = _M_w[0] << __offset;
+	    }
+
+	  fill(_M_w + 0, _M_w + __wshift, static_cast<_WordT>(0));
+	}
+    }
+
+  template
+    void
+    _Base_bitset<_Nw>::_M_do_right_shift(size_t __shift)
+    {
+      if (__shift != 0)
+	{
+	  const size_t __wshift = __shift / _GLIBCPP_BITSET_BITS_PER_WORD;
+	  const size_t __offset = __shift % _GLIBCPP_BITSET_BITS_PER_WORD;
+	  const size_t __limit = _Nw - __wshift - 1;
+
+	  if (__offset == 0)
+	    for (size_t __n = 0; __n <= __limit; ++__n)
+	      _M_w[__n] = _M_w[__n + __wshift];
+	  else
+	    {
+	      const size_t __sub_offset = _GLIBCPP_BITSET_BITS_PER_WORD - __offset;
+	      for (size_t __n = 0; __n < __limit; ++__n)
+		_M_w[__n] = (_M_w[__n + __wshift] >> __offset) |
+		  (_M_w[__n + __wshift + 1] << __sub_offset);
+	      _M_w[__limit] = _M_w[_Nw-1] >> __offset;
+	    }
+
+	  fill(_M_w + __limit + 1, _M_w + _Nw, static_cast<_WordT>(0));
+	}
+    }
+
+  template
+    unsigned long
+    _Base_bitset<_Nw>::_M_do_to_ulong() const
+    {
+      for (size_t __i = 1; __i < _Nw; ++__i)
+	if (_M_w[__i])
+	  __throw_overflow_error("bitset -- too large to fit in unsigned long");
+      return _M_w[0];
+    }
+
+  template
+    size_t
+    _Base_bitset<_Nw>::_M_do_find_first(size_t __not_found) const
+    {
+      for (size_t __i = 0; __i < _Nw; __i++ )
+	{
+	  _WordT __thisword = _M_w[__i];
+	  if ( __thisword != static_cast<_WordT>(0) )
+	    {
+	      // find byte within word
+	      for (size_t __j = 0; __j < sizeof(_WordT); __j++ )
+		{
+		  unsigned char __this_byte
+		    = static_cast(__thisword & (~(unsigned char)0));
+		  if (__this_byte)
+		    return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
+		      _S_first_one[__this_byte];
+
+		  __thisword >>= CHAR_BIT;
+		}
+	    }
+	}
+      // not found, so return an indication of failure.
+      return __not_found;
+    }
+
+  template
+    size_t
+    _Base_bitset<_Nw>::_M_do_find_next(size_t __prev, size_t __not_found) const
+    {
+      // make bound inclusive
+      ++__prev;
+
+      // check out of bounds
+      if ( __prev >= _Nw * _GLIBCPP_BITSET_BITS_PER_WORD )
+	return __not_found;
+
+      // search first word
+      size_t __i = _S_whichword(__prev);
+      _WordT __thisword = _M_w[__i];
+
+      // mask off bits below bound
+      __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
+
+      if ( __thisword != static_cast<_WordT>(0) )
+	{
+	  // find byte within word
+	  // get first byte into place
+	  __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
+	  for (size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++)
+	    {
+	      unsigned char __this_byte
+		= static_cast(__thisword & (~(unsigned char)0));
+	      if ( __this_byte )
+		return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
+		  _S_first_one[__this_byte];
+
+	      __thisword >>= CHAR_BIT;
+	    }
+	}
+
+      // check subsequent words
+      __i++;
+      for ( ; __i < _Nw; __i++ )
+	{
+	  __thisword = _M_w[__i];
+	  if ( __thisword != static_cast<_WordT>(0) )
+	    {
+	      // find byte within word
+	      for (size_t __j = 0; __j < sizeof(_WordT); __j++ )
+		{
+		  unsigned char __this_byte
+		    = static_cast(__thisword & (~(unsigned char)0));
+		  if ( __this_byte )
+		    return __i*_GLIBCPP_BITSET_BITS_PER_WORD + __j*CHAR_BIT +
+		      _S_first_one[__this_byte];
+
+		  __thisword >>= CHAR_BIT;
+		}
+	    }
+	}
+      // not found, so return an indication of failure.
+      return __not_found;
+    } // end _M_do_find_next
+
+
+  /**
+   *  @if maint
+   *  Base class, specialization for a single word.
+   *
+   *  See documentation for bitset.
+   *  @endif
+  */
+  template<>
+    struct _Base_bitset<1>
+    {
+      typedef unsigned long _WordT;
+      _WordT _M_w;
+
+      _Base_bitset( void ) : _M_w(0) {}
+      _Base_bitset(unsigned long __val) : _M_w(__val) {}
+
+      static size_t
+      _S_whichword(size_t __pos )
+      { return __pos / _GLIBCPP_BITSET_BITS_PER_WORD; }
+
+      static size_t
+      _S_whichbyte(size_t __pos )
+      { return (__pos % _GLIBCPP_BITSET_BITS_PER_WORD) / CHAR_BIT; }
+
+      static size_t
+      _S_whichbit(size_t __pos )
+      {  return __pos % _GLIBCPP_BITSET_BITS_PER_WORD; }
+
+      static _WordT
+      _S_maskbit(size_t __pos )
+      { return (static_cast<_WordT>(1)) << _S_whichbit(__pos); }
+
+      _WordT&
+      _M_getword(size_t) { return _M_w; }
+
+      _WordT
+      _M_getword(size_t) const { return _M_w; }
+
+      _WordT&
+      _M_hiword() { return _M_w; }
+
+      _WordT
+      _M_hiword() const { return _M_w; }
+
+      void
+      _M_do_and(const _Base_bitset<1>& __x) { _M_w &= __x._M_w; }
+
+      void
+      _M_do_or(const _Base_bitset<1>& __x)  { _M_w |= __x._M_w; }
+
+      void
+      _M_do_xor(const _Base_bitset<1>& __x) { _M_w ^= __x._M_w; }
+
+      void
+      _M_do_left_shift(size_t __shift) { _M_w <<= __shift; }
+
+      void
+      _M_do_right_shift(size_t __shift) { _M_w >>= __shift; }
+
+      void
+      _M_do_flip() { _M_w = ~_M_w; }
+
+      void
+      _M_do_set() { _M_w = ~static_cast<_WordT>(0); }
+
+      void
+      _M_do_reset() { _M_w = 0; }
+
+      bool
+      _M_is_equal(const _Base_bitset<1>& __x) const
+      { return _M_w == __x._M_w; }
+
+      bool
+      _M_is_any() const { return _M_w != 0; }
+
+      size_t
+      _M_do_count() const
+      {
+	size_t __result = 0;
+	const unsigned char* __byte_ptr = (const unsigned char*)&_M_w;
+	const unsigned char* __end_ptr
+	  = ((const unsigned char*)&_M_w)+sizeof(_M_w);
+	while ( __byte_ptr < __end_ptr )
+	  {
+	    __result += _S_bit_count[*__byte_ptr];
+	    __byte_ptr++;
+	  }
+	return __result;
+      }
+
+      unsigned long
+      _M_do_to_ulong() const { return _M_w; }
+
+      size_t
+      _M_do_find_first(size_t __not_found) const;
+
+      // find the next "on" bit that follows "prev"
+      size_t
+      _M_do_find_next(size_t __prev, size_t __not_found) const;
+    };
+
+  // Helper class to zero out the unused high-order bits in the highest word.
+  template
+    struct _Sanitize
+    {
+      static void _S_do_sanitize(unsigned long& __val)
+      { __val &= ~((~static_cast(0)) << _Extrabits); }
+    };
+
+  template<>
+    struct _Sanitize<0>
+    { static void _S_do_sanitize(unsigned long) { } };
+
+  /**
+   *  @brief  The %bitset class represents a @e fixed-size sequence of bits.
+   *
+   *  @ingroup Containers
+   *
+   *  (Note that %bitset does @e not meet the formal requirements of a
+   *  container.  Mainly, it lacks iterators.)
+   *
+   *  The template argument, @a _Nb, may be any nonzero number of type
+   *  size_t.
+   *
+   *  A %bitset of size N has N % (sizeof(unsigned long) * CHAR_BIT) unused
+   *  bits.  (They are the high-order bits in the highest word.)  It is
+   *  a class invariant that those unused bits are always zero.
+   *
+   *  If you think of %bitset as "a simple array of bits," be aware that
+   *  your mental picture is reversed:  a %bitset behaves the same way as
+   *  bits in integers do, with the bit at index 0 in the "least significant
+   *  / right-hand" position, and the bit at index N-1 in the "most
+   *  significant / left-hand" position.  Thus, unlike other containers, a
+   *  %bitset's index "counts from right to left," to put it very loosely.
+   *
+   *  This behavior is preserved when translating to and from strings.  For
+   *  example, the first line of the following program probably prints
+   *  "b('a') is 0001100001" on a modern ASCII system.
+   *
+   *  @code
+   *     #include 
+   *     #include 
+   *     #include 
+   *
+   *     using namespace std;
+   *
+   *     int main()
+   *     {
+   *         long         a = 'a';
+   *         bitset<10>   b(a);
+   *
+   *         cout << "b('a') is " << b << endl;
+   *
+   *         ostringstream s;
+   *         s << b;
+   *         string  str = s.str();
+   *         cout << "index 3 in the string is " << str[3] << " but\n"
+   *              << "index 3 in the bitset is " << b[3] << endl;
+   *     }
+   *  @endcode
+   *
+   *  Also see http://gcc.gnu.org/onlinedocs/libstdc++/ext/sgiexts.html#ch23
+   *
+   *  @if maint
+   *  Most of the actual code isn't contained in %bitset<> itself, but in the
+   *  base class _Base_bitset.  The base class works with whole words, not with
+   *  individual bits.  This allows us to specialize _Base_bitset for the
+   *  important special case where the %bitset is only a single word.
+   *
+   *  Extra confusion can result due to the fact that the storage for
+   *  _Base_bitset @e is a regular array, and is indexed as such.  This is
+   *  carefully encapsulated.
+   *  @endif
+  */
+  template
+    class bitset : private _Base_bitset<_GLIBCPP_BITSET_WORDS(_Nb)>
+  {
+  private:
+    typedef _Base_bitset<_GLIBCPP_BITSET_WORDS(_Nb)> _Base;
+    typedef unsigned long _WordT;
+
+    void
+    _M_do_sanitize()
+    {
+      _Sanitize<_Nb%_GLIBCPP_BITSET_BITS_PER_WORD>::
+          _S_do_sanitize(this->_M_hiword());
+    }
+
+  public:
+    /**
+     *  This encapsulates the concept of a single bit.  An instance of this
+     *  class is a proxy for an actual bit; this way the individual bit
+     *  operations are done as faster word-size bitwise instructions.
+     *
+     *  Most users will never need to use this class directly; conversions
+     *  to and from bool are automatic and should be transparent.  Overloaded
+     *  operators help to preserve the illusion.
+     *
+     *  (On a typical system, this "bit %reference" is 64 times the size of
+     *  an actual bit.  Ha.)
+    */
+    class reference
+    {
+      friend class bitset;
+
+      _WordT *_M_wp;
+      size_t _M_bpos;
+
+      // left undefined
+      reference();
+
+    public:
+      reference(bitset& __b, size_t __pos)
+      {
+	_M_wp = &__b._M_getword(__pos);
+	_M_bpos = _Base::_S_whichbit(__pos);
+      }
+
+      ~reference() { }
+
+      // for b[i] = __x;
+      reference&
+      operator=(bool __x)
+      {
+	if ( __x )
+	  *_M_wp |= _Base::_S_maskbit(_M_bpos);
+	else
+	  *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+	return *this;
+      }
+
+      // for b[i] = b[__j];
+      reference&
+      operator=(const reference& __j)
+      {
+	if ( (*(__j._M_wp) & _Base::_S_maskbit(__j._M_bpos)) )
+	  *_M_wp |= _Base::_S_maskbit(_M_bpos);
+	else
+	  *_M_wp &= ~_Base::_S_maskbit(_M_bpos);
+	return *this;
+      }
+
+      // flips the bit
+      bool
+      operator~() const
+      { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) == 0; }
+
+      // for __x = b[i];
+      operator bool() const
+      { return (*(_M_wp) & _Base::_S_maskbit(_M_bpos)) != 0; }
+
+      // for b[i].flip();
+      reference&
+      flip()
+      {
+	*_M_wp ^= _Base::_S_maskbit(_M_bpos);
+	return *this;
+      }
+    };
+    friend class reference;
+
+    // 23.3.5.1 constructors:
+    /// All bits set to zero.
+    bitset() { }
+
+    /// Initial bits bitwise-copied from a single word (others set to zero).
+    bitset(unsigned long __val) : _Base(__val)
+    { _M_do_sanitize(); }
+
+    /**
+     *  @brief  Use a subset of a string.
+     *  @param  s  A string of '0' and '1' characters.
+     *  @param  pos  Index of the first character in @a s to use; defaults
+     *               to zero.
+     *  @throw  std::out_of_range  If @a pos is bigger the size of @a s.
+     *  @throw  std::invalid_argument  If a character appears in the string
+     *                                 which is neither '0' nor '1'.
+    */
+    template
+      explicit bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+		      size_t __pos = 0) : _Base()
+      {
+	if (__pos > __s.size())
+	  __throw_out_of_range("bitset -- initial position is larger than "
+	                       "the string itself");
+	_M_copy_from_string(__s, __pos,
+			    basic_string<_CharT, _Traits, _Alloc>::npos);
+      }
+
+    /**
+     *  @brief  Use a subset of a string.
+     *  @param  s  A string of '0' and '1' characters.
+     *  @param  pos  Index of the first character in @a s to use.
+     *  @param  n    The number of characters to copy.
+     *  @throw  std::out_of_range  If @a pos is bigger the size of @a s.
+     *  @throw  std::invalid_argument  If a character appears in the string
+     *                                 which is neither '0' nor '1'.
+    */
+    template
+      bitset(const basic_string<_CharT, _Traits, _Alloc>& __s,
+	     size_t __pos, size_t __n) : _Base()
+      {
+	if (__pos > __s.size())
+	  __throw_out_of_range("bitset -- initial position is larger than "
+	                       "the string itself");
+	_M_copy_from_string(__s, __pos, __n);
+      }
+
+    // 23.3.5.2 bitset operations:
+    //@{
+    /**
+     *  @brief  Operations on bitsets.
+     *  @param  rhs  A same-sized bitset.
+     *
+     *  These should be self-explanatory.
+    */
+    bitset<_Nb>&
+    operator&=(const bitset<_Nb>& __rhs)
+    {
+      this->_M_do_and(__rhs);
+      return *this;
+    }
+
+    bitset<_Nb>&
+    operator|=(const bitset<_Nb>& __rhs)
+    {
+      this->_M_do_or(__rhs);
+      return *this;
+    }
+
+    bitset<_Nb>&
+    operator^=(const bitset<_Nb>& __rhs)
+    {
+      this->_M_do_xor(__rhs);
+      return *this;
+    }
+    //@}
+
+    //@{
+    /**
+     *  @brief  Operations on bitsets.
+     *  @param  pos  The number of places to shift.
+     *
+     *  These should be self-explanatory.
+    */
+    bitset<_Nb>&
+    operator<<=(size_t __pos)
+    {
+      this->_M_do_left_shift(__pos);
+      this->_M_do_sanitize();
+      return *this;
+    }
+
+    bitset<_Nb>&
+    operator>>=(size_t __pos)
+    {
+      this->_M_do_right_shift(__pos);
+      this->_M_do_sanitize();
+      return *this;
+    }
+    //@}
+
+    //@{
+    /**
+     *  These versions of single-bit set, reset, flip, and test are
+     *  extensions from the SGI version.  They do no range checking.
+     *  @ingroup SGIextensions
+    */
+    bitset<_Nb>&
+    _Unchecked_set(size_t __pos)
+    {
+      this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+      return *this;
+    }
+
+    bitset<_Nb>&
+    _Unchecked_set(size_t __pos, int __val)
+    {
+      if (__val)
+	this->_M_getword(__pos) |= _Base::_S_maskbit(__pos);
+      else
+	this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+      return *this;
+    }
+
+    bitset<_Nb>&
+    _Unchecked_reset(size_t __pos)
+    {
+      this->_M_getword(__pos) &= ~_Base::_S_maskbit(__pos);
+      return *this;
+    }
+
+    bitset<_Nb>&
+    _Unchecked_flip(size_t __pos)
+    {
+      this->_M_getword(__pos) ^= _Base::_S_maskbit(__pos);
+      return *this;
+    }
+
+    bool
+    _Unchecked_test(size_t __pos) const
+    {
+      return (this->_M_getword(__pos) & _Base::_S_maskbit(__pos))
+	!= static_cast<_WordT>(0);
+    }
+    //@}
+
+    // Set, reset, and flip.
+    /**
+     *  @brief Sets every bit to true.
+    */
+    bitset<_Nb>&
+    set()
+    {
+      this->_M_do_set();
+      this->_M_do_sanitize();
+      return *this;
+    }
+
+    /**
+     *  @brief Sets a given bit to a particular value.
+     *  @param  pos  The index of the bit.
+     *  @param  val  Either true or false, defaults to true.
+     *  @throw  std::out_of_range  If @a pos is bigger the size of the %set.
+    */
+    bitset<_Nb>&
+    set(size_t __pos, bool __val = true)
+    {
+      if (__pos >= _Nb)
+	__throw_out_of_range("bitset -- set() argument too large");
+      return _Unchecked_set(__pos, __val);
+    }
+
+    /**
+     *  @brief Sets every bit to false.
+    */
+    bitset<_Nb>&
+    reset()
+    {
+      this->_M_do_reset();
+      return *this;
+    }
+
+    /**
+     *  @brief Sets a given bit to false.
+     *  @param  pos  The index of the bit.
+     *  @throw  std::out_of_range  If @a pos is bigger the size of the %set.
+     *
+     *  Same as writing @c set(pos,false).
+    */
+    bitset<_Nb>&
+    reset(size_t __pos)
+    {
+      if (__pos >= _Nb)
+	__throw_out_of_range("bitset -- reset() argument too large");
+      return _Unchecked_reset(__pos);
+    }
+
+    /**
+     *  @brief Toggles every bit to its opposite value.
+    */
+    bitset<_Nb>&
+    flip()
+    {
+      this->_M_do_flip();
+      this->_M_do_sanitize();
+      return *this;
+    }
+
+    /**
+     *  @brief Toggles a given bit to its opposite value.
+     *  @param  pos  The index of the bit.
+     *  @throw  std::out_of_range  If @a pos is bigger the size of the %set.
+    */
+    bitset<_Nb>&
+    flip(size_t __pos)
+    {
+      if (__pos >= _Nb)
+	__throw_out_of_range("bitset -- flip() argument too large");
+      return _Unchecked_flip(__pos);
+    }
+
+    /// See the no-argument flip().
+    bitset<_Nb>
+    operator~() const { return bitset<_Nb>(*this).flip(); }
+
+    //@{
+    /**
+     *  @brief  Array-indexing support.
+     *  @param  pos  Index into the %bitset.
+     *  @return  A bool for a 'const %bitset'.  For non-const bitsets, an
+     *           instance of the reference proxy class.
+     *  @note  These operators do no range checking and throw no exceptions,
+     *         as required by DR 11 to the standard.
+     *
+     *  @if maint
+     *  _GLIBCPP_RESOLVE_LIB_DEFECTS Note that this implementation already
+     *  resolves DR 11 (items 1 and 2), but does not do the range-checking
+     *  required by that DR's resolution.  -pme
+     *  The DR has since been changed:  range-checking is a precondition
+     *  (users' responsibility), and these functions must not throw.  -pme
+     *  @endif
+    */
+    reference
+    operator[](size_t __pos) { return reference(*this,__pos); }
+
+    bool
+    operator[](size_t __pos) const { return _Unchecked_test(__pos); }
+    //@}
+
+    /**
+     *  @brief Retuns a numerical interpretation of the %bitset.
+     *  @return  The integral equivalent of the bits.
+     *  @throw  std::overflow_error  If there are too many bits to be
+     *                               represented in an @c unsigned @c long.
+    */
+    unsigned long
+    to_ulong() const { return this->_M_do_to_ulong(); }
+
+    /**
+     *  @brief Retuns a character interpretation of the %bitset.
+     *  @return  The string equivalent of the bits.
+     *
+     *  Note the ordering of the bits:  decreasing character positions
+     *  correspond to increasing bit positions (see the main class notes for
+     *  an example).
+     *
+     *  Also note that you must specify the string's template parameters
+     *  explicitly.  Given a bitset @c bs and a string @s:
+     *  @code
+     *     s = bs.to_string,allocator >();
+     *  @endcode
+    */
+    template
+      basic_string<_CharT, _Traits, _Alloc>
+      to_string() const
+      {
+	basic_string<_CharT, _Traits, _Alloc> __result;
+	_M_copy_to_string(__result);
+	return __result;
+      }
+
+    // Helper functions for string operations.
+    template
+      void
+      _M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s,
+                          size_t, size_t);
+
+    template
+      void
+      _M_copy_to_string(basic_string<_CharT,_Traits,_Alloc>&) const;
+
+    /// Returns the number of bits which are set.
+    size_t
+    count() const { return this->_M_do_count(); }
+
+    /// Returns the total number of bits.
+    size_t
+    size() const { return _Nb; }
+
+    //@{
+    /// These comparisons for equality/inequality are, well, @e bitwise.
+    bool
+    operator==(const bitset<_Nb>& __rhs) const
+    { return this->_M_is_equal(__rhs); }
+
+    bool
+    operator!=(const bitset<_Nb>& __rhs) const
+    { return !this->_M_is_equal(__rhs); }
+    //@}
+
+    /**
+     *  @brief Tests the value of a bit.
+     *  @param  pos  The index of a bit.
+     *  @return  The value at @a pos.
+     *  @throw  std::out_of_range  If @a pos is bigger the size of the %set.
+    */
+    bool
+    test(size_t __pos) const
+    {
+      if (__pos >= _Nb)
+	__throw_out_of_range("bitset -- test() argument too large");
+      return _Unchecked_test(__pos);
+    }
+
+    /**
+     *  @brief Tests whether any of the bits are on.
+     *  @return  True if at least one bit is set.
+    */
+    bool
+    any() const { return this->_M_is_any(); }
+
+    /**
+     *  @brief Tests whether any of the bits are on.
+     *  @return  True if none of the bits are set.
+    */
+    bool
+    none() const { return !this->_M_is_any(); }
+
+    //@{
+    /// Self-explanatory.
+    bitset<_Nb>
+    operator<<(size_t __pos) const
+    { return bitset<_Nb>(*this) <<= __pos; }
+
+    bitset<_Nb>
+    operator>>(size_t __pos) const
+    { return bitset<_Nb>(*this) >>= __pos; }
+    //@}
+
+    /**
+     *  @brief  Finds the index of the first "on" bit.
+     *  @return  The index of the first bit set, or size() if not found.
+     *  @ingroup SGIextensions
+     *  @sa  _Find_next
+    */
+    size_t
+    _Find_first() const
+    { return this->_M_do_find_first(_Nb); }
+
+    /**
+     *  @brief  Finds the index of the next "on" bit after prev.
+     *  @return  The index of the next bit set, or size() if not found.
+     *  @param  prev  Where to start searching.
+     *  @ingroup SGIextensions
+     *  @sa  _Find_first
+    */
+    size_t
+    _Find_next(size_t __prev ) const
+    { return this->_M_do_find_next(__prev, _Nb); }
+  };
+
+  // Definitions of non-inline member functions.
+  template
+    template
+    void
+    bitset<_Nb>::_M_copy_from_string(const basic_string<_CharT,_Traits,_Alloc>& __s, size_t __pos, size_t __n)
+    {
+      reset();
+      const size_t __nbits = min(_Nb, min(__n, __s.size() - __pos));
+      for (size_t __i = 0; __i < __nbits; ++__i)
+	{
+	  switch(__s[__pos + __nbits - __i - 1])
+	    {
+	    case '0':
+	      break;
+	    case '1':
+	      set(__i);
+	      break;
+	    default:
+	      __throw_invalid_argument("bitset -- string contains characters "
+	                               "which are neither 0 nor 1");
+	    }
+	}
+    }
+
+  template
+    template
+    void
+    bitset<_Nb>::_M_copy_to_string(basic_string<_CharT, _Traits, _Alloc>& __s) const
+    {
+      __s.assign(_Nb, '0');
+      for (size_t __i = 0; __i < _Nb; ++__i)
+	if (_Unchecked_test(__i))
+	  __s[_Nb - 1 - __i] = '1';
+    }
+
+  // 23.3.5.3 bitset operations:
+  //@{
+  /**
+   *  @brief  Global bitwise operations on bitsets.
+   *  @param  x  A bitset.
+   *  @param  y  A bitset of the same size as @a x.
+   *  @return  A new bitset.
+   *
+   *  These should be self-explanatory.
+  */
+  template
+    inline bitset<_Nb>
+    operator&(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+    {
+      bitset<_Nb> __result(__x);
+      __result &= __y;
+      return __result;
+    }
+
+  template
+    inline bitset<_Nb>
+    operator|(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+    {
+      bitset<_Nb> __result(__x);
+      __result |= __y;
+      return __result;
+    }
+
+  template 
+    inline bitset<_Nb>
+    operator^(const bitset<_Nb>& __x, const bitset<_Nb>& __y)
+    {
+      bitset<_Nb> __result(__x);
+      __result ^= __y;
+      return __result;
+    }
+  //@}
+
+  //@{
+  /**
+   *  @brief Global I/O operators for bitsets.
+   *
+   *  Direct I/O between streams and bitsets is supported.  Output is
+   *  straightforward.  Input will skip whitespace, only accept '0' and '1'
+   *  characters, and will only extract as many digits as the %bitset will
+   *  hold.
+  */
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __is, bitset<_Nb>& __x)
+    {
+      typedef typename _Traits::char_type char_type;
+      basic_string<_CharT, _Traits> __tmp;
+      __tmp.reserve(_Nb);
+
+      // Skip whitespace
+      typename basic_istream<_CharT, _Traits>::sentry __sentry(__is);
+      if (__sentry)
+	{
+	  basic_streambuf<_CharT, _Traits>* __buf = __is.rdbuf();
+	  for (size_t __i = 0; __i < _Nb; ++__i)
+	    {
+	      static typename _Traits::int_type __eof = _Traits::eof();
+
+	      typename _Traits::int_type __c1 = __buf->sbumpc();
+	      if (_Traits::eq_int_type(__c1, __eof))
+		{
+		  __is.setstate(ios_base::eofbit);
+		  break;
+		}
+	      else
+		{
+		  char_type __c2 = _Traits::to_char_type(__c1);
+		  char_type __c  = __is.narrow(__c2, '*');
+
+		  if (__c == '0' || __c == '1')
+		    __tmp.push_back(__c);
+		  else if (_Traits::eq_int_type(__buf->sputbackc(__c2),
+						__eof))
+		    {
+		      __is.setstate(ios_base::failbit);
+		      break;
+		    }
+		}
+	    }
+
+	  if (__tmp.empty())
+	    __is.setstate(ios_base::failbit);
+	  else
+	    __x._M_copy_from_string(__tmp, static_cast(0), _Nb);
+	}
+
+      return __is;
+    }
+
+  template 
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __os, const bitset<_Nb>& __x)
+    {
+      basic_string<_CharT, _Traits> __tmp;
+      __x._M_copy_to_string(__tmp);
+      return __os << __tmp;
+    }
+  //@}
+} // namespace std
+
+#undef _GLIBCPP_BITSET_WORDS
+
+#endif /* _GLIBCPP_BITSET_H */
diff --git a/contrib/libstdc++/include/std/std_complex.h b/contrib/libstdc++/include/std/std_complex.h
new file mode 100644
index 0000000..bcfcedd
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_complex.h
@@ -0,0 +1,1059 @@
+// The template and inlines for the -*- C++ -*- complex number classes.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 26.2  Complex Numbers
+// Note: this is not a conforming implementation.
+// Initially implemented by Ulrich Drepper 
+// Improved by Gabriel Dos Reis 
+//
+
+/** @file complex
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_COMPLEX
+#define _CPP_COMPLEX	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+  // Forward declarations
+  template class complex;
+  template<> class complex;
+  template<> class complex;
+  template<> class complex;
+
+  template _Tp abs(const complex<_Tp>&);
+  template _Tp arg(const complex<_Tp>&);
+  template _Tp norm(const complex<_Tp>&);
+
+  template complex<_Tp> conj(const complex<_Tp>&);
+  template complex<_Tp> polar(const _Tp&, const _Tp& = 0);
+
+  // Transcendentals:
+  template complex<_Tp> cos(const complex<_Tp>&);
+  template complex<_Tp> cosh(const complex<_Tp>&);
+  template complex<_Tp> exp(const complex<_Tp>&);
+  template complex<_Tp> log(const complex<_Tp>&);
+  template complex<_Tp> log10(const complex<_Tp>&);
+  template complex<_Tp> pow(const complex<_Tp>&, int);
+  template complex<_Tp> pow(const complex<_Tp>&, const _Tp&);
+  template complex<_Tp> pow(const complex<_Tp>&, 
+					   const complex<_Tp>&);
+  template complex<_Tp> pow(const _Tp&, const complex<_Tp>&);
+  template complex<_Tp> sin(const complex<_Tp>&);
+  template complex<_Tp> sinh(const complex<_Tp>&);
+  template complex<_Tp> sqrt(const complex<_Tp>&);
+  template complex<_Tp> tan(const complex<_Tp>&);
+  template complex<_Tp> tanh(const complex<_Tp>&);
+    
+    
+  // 26.2.2  Primary template class complex
+  template
+    class complex
+    {
+    public:
+      typedef _Tp value_type;
+      
+      complex(const _Tp& = _Tp(), const _Tp & = _Tp());
+
+      // Let's the compiler synthetize the copy constructor   
+      // complex (const complex<_Tp>&);
+      template
+        complex(const complex<_Up>&);
+        
+      _Tp real() const;
+      _Tp imag() const;
+
+      complex<_Tp>& operator=(const _Tp&);
+      complex<_Tp>& operator+=(const _Tp&);
+      complex<_Tp>& operator-=(const _Tp&);
+      complex<_Tp>& operator*=(const _Tp&);
+      complex<_Tp>& operator/=(const _Tp&);
+
+      // Let's the compiler synthetize the
+      // copy and assignment operator
+      // complex<_Tp>& operator= (const complex<_Tp>&);
+      template
+        complex<_Tp>& operator=(const complex<_Up>&);
+      template
+        complex<_Tp>& operator+=(const complex<_Up>&);
+      template
+        complex<_Tp>& operator-=(const complex<_Up>&);
+      template
+        complex<_Tp>& operator*=(const complex<_Up>&);
+      template
+        complex<_Tp>& operator/=(const complex<_Up>&);
+
+    private:
+      _Tp _M_real, _M_imag;
+    };
+
+  template
+    inline _Tp
+    complex<_Tp>::real() const { return _M_real; }
+
+  template
+    inline _Tp
+    complex<_Tp>::imag() const { return _M_imag; }
+
+  template
+    inline 
+    complex<_Tp>::complex(const _Tp& __r, const _Tp& __i)
+    : _M_real(__r), _M_imag(__i) { }
+
+  template
+    template
+    inline 
+    complex<_Tp>::complex(const complex<_Up>& __z)
+    : _M_real(__z.real()), _M_imag(__z.imag()) { }
+        
+  template
+    complex<_Tp>&
+    complex<_Tp>::operator=(const _Tp& __t)
+    {
+     _M_real = __t;
+     _M_imag = _Tp();
+     return *this;
+    } 
+
+  // 26.2.5/1
+  template
+    inline complex<_Tp>&
+    complex<_Tp>::operator+=(const _Tp& __t)
+    {
+      _M_real += __t;
+      return *this;
+    }
+
+  // 26.2.5/3
+  template
+    inline complex<_Tp>&
+    complex<_Tp>::operator-=(const _Tp& __t)
+    {
+      _M_real -= __t;
+      return *this;
+    }
+
+  // 26.2.5/5
+  template
+    complex<_Tp>&
+    complex<_Tp>::operator*=(const _Tp& __t)
+    {
+      _M_real *= __t;
+      _M_imag *= __t;
+      return *this;
+    }
+
+  // 26.2.5/7
+  template
+    complex<_Tp>&
+    complex<_Tp>::operator/=(const _Tp& __t)
+    {
+      _M_real /= __t;
+      _M_imag /= __t;
+      return *this;
+    }
+
+  template
+    template
+    complex<_Tp>&
+    complex<_Tp>::operator=(const complex<_Up>& __z)
+    {
+      _M_real = __z.real();
+      _M_imag = __z.imag();
+      return *this;
+    }
+
+  // 26.2.5/9
+  template
+    template
+    complex<_Tp>&
+    complex<_Tp>::operator+=(const complex<_Up>& __z)
+    {
+      _M_real += __z.real();
+      _M_imag += __z.imag();
+      return *this;
+    }
+
+  // 26.2.5/11
+  template
+    template
+    complex<_Tp>&
+    complex<_Tp>::operator-=(const complex<_Up>& __z)
+    {
+      _M_real -= __z.real();
+      _M_imag -= __z.imag();
+      return *this;
+    }
+
+  // 26.2.5/13
+  // XXX: This is a grammar school implementation.
+  template
+    template
+    complex<_Tp>&
+    complex<_Tp>::operator*=(const complex<_Up>& __z)
+    {
+      const _Tp __r = _M_real * __z.real() - _M_imag * __z.imag();
+      _M_imag = _M_real * __z.imag() + _M_imag * __z.real();
+      _M_real = __r;
+      return *this;
+    }
+
+  // 26.2.5/15
+  // XXX: This is a grammar school implementation.
+  template
+    template
+    complex<_Tp>&
+    complex<_Tp>::operator/=(const complex<_Up>& __z)
+    {
+      const _Tp __r =  _M_real * __z.real() + _M_imag * __z.imag();
+      const _Tp __n = norm(__z);
+      _M_imag = (_M_imag * __z.real() - _M_real * __z.imag()) / __n;
+      _M_real = __r / __n;
+      return *this;
+    }
+    
+  // Operators:
+  template
+    inline complex<_Tp>
+    operator+(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) += __y; }
+
+  template
+    inline complex<_Tp>
+    operator+(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) += __y; }
+
+  template
+    inline complex<_Tp>
+    operator+(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__y) += __x; }
+
+  template
+    inline complex<_Tp>
+    operator-(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) -= __y; }
+    
+  template
+    inline complex<_Tp>
+    operator-(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) -= __y; }
+
+  template
+    inline complex<_Tp>
+    operator-(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) -= __y; }
+
+  template
+    inline complex<_Tp>
+    operator*(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) *= __y; }
+
+  template
+    inline complex<_Tp>
+    operator*(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) *= __y; }
+
+  template
+    inline complex<_Tp>
+    operator*(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__y) *= __x; }
+
+  template
+    inline complex<_Tp>
+    operator/(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) /= __y; }
+    
+  template
+    inline complex<_Tp>
+    operator/(const complex<_Tp>& __x, const _Tp& __y)
+    { return complex<_Tp> (__x) /= __y; }
+
+  template
+    inline complex<_Tp>
+    operator/(const _Tp& __x, const complex<_Tp>& __y)
+    { return complex<_Tp> (__x) /= __y; }
+
+  template
+    inline complex<_Tp>
+    operator+(const complex<_Tp>& __x)
+    { return __x; }
+
+  template
+    inline complex<_Tp>
+    operator-(const complex<_Tp>& __x)
+    {  return complex<_Tp>(-__x.real(), -__x.imag()); }
+
+  template
+    inline bool
+    operator==(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return __x.real() == __y.real() && __x.imag() == __y.imag(); }
+
+  template
+    inline bool
+    operator==(const complex<_Tp>& __x, const _Tp& __y)
+    { return __x.real() == __y && __x.imag() == _Tp(); }
+
+  template
+    inline bool
+    operator==(const _Tp& __x, const complex<_Tp>& __y)
+    { return __x == __y.real() && _Tp() == __y.imag(); }
+
+  template
+    inline bool
+    operator!=(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    { return __x.real() != __y.real() || __x.imag() != __y.imag(); }
+
+  template
+    inline bool
+    operator!=(const complex<_Tp>& __x, const _Tp& __y)
+    { return __x.real() != __y || __x.imag() != _Tp(); }
+
+  template
+    inline bool
+    operator!=(const _Tp& __x, const complex<_Tp>& __y)
+    { return __x != __y.real() || _Tp() != __y.imag(); }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __is, complex<_Tp>& __x)
+    {
+      _Tp __re_x, __im_x;
+      _CharT __ch;
+      __is >> __ch;
+      if (__ch == '(') 
+	{
+	  __is >> __re_x >> __ch;
+	  if (__ch == ',') 
+	    {
+	      __is >> __im_x >> __ch;
+	      if (__ch == ')') 
+		__x = complex<_Tp>(__re_x, __im_x);
+	      else
+		__is.setstate(ios_base::failbit);
+	    }
+	  else if (__ch == ')') 
+	    __x = complex<_Tp>(__re_x, _Tp(0));
+	  else
+	    __is.setstate(ios_base::failbit);
+	}
+      else 
+	{
+	  __is.putback(__ch);
+	  __is >> __re_x;
+	  __x = complex<_Tp>(__re_x, _Tp(0));
+	}
+      return __is;
+    }
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __os, const complex<_Tp>& __x)
+    {
+      basic_ostringstream<_CharT, _Traits> __s;
+      __s.flags(__os.flags());
+      __s.imbue(__os.getloc());
+      __s.precision(__os.precision());
+      __s << '(' << __x.real() << "," << __x.imag() << ')';
+      return __os << __s.str();
+    }
+
+  // Values
+  template
+    inline _Tp
+    real(const complex<_Tp>& __z)
+    { return __z.real(); }
+    
+  template
+    inline _Tp
+    imag(const complex<_Tp>& __z)
+    { return __z.imag(); }
+
+  template
+    inline _Tp
+    abs(const complex<_Tp>& __z)
+    {
+      _Tp __x = __z.real();
+      _Tp __y = __z.imag();
+      const _Tp __s = max(abs(__x), abs(__y));
+      if (__s == _Tp())  // well ...
+        return __s;
+      __x /= __s; 
+      __y /= __s;
+      return __s * sqrt(__x * __x + __y * __y);
+    }
+
+  template
+    inline _Tp
+    arg(const complex<_Tp>& __z)
+    { return atan2(__z.imag(), __z.real()); }
+
+  // 26.2.7/5: norm(__z) returns the squared magintude of __z.
+  //     As defined, norm() is -not- a norm is the common mathematical
+  //     sens used in numerics.  The helper class _Norm_helper<> tries to
+  //     distinguish between builtin floating point and the rest, so as
+  //     to deliver an answer as close as possible to the real value.
+  template
+    struct _Norm_helper
+    {
+      template
+        static inline _Tp _S_do_it(const complex<_Tp>& __z)
+        {
+          const _Tp __x = __z.real();
+          const _Tp __y = __z.imag();
+          return __x * __x + __y * __y;
+        }
+    };
+
+  template<>
+    struct _Norm_helper
+    {
+      template
+        static inline _Tp _S_do_it(const complex<_Tp>& __z)
+        {
+          _Tp __res = abs(__z);
+          return __res * __res;
+        }
+    };
+  
+  template
+    inline _Tp
+    norm(const complex<_Tp>& __z)
+    {
+      return _Norm_helper<__is_floating<_Tp>::_M_type>::_S_do_it(__z);
+    }
+
+  template
+    inline complex<_Tp>
+    polar(const _Tp& __rho, const _Tp& __theta)
+    { return complex<_Tp>(__rho * cos(__theta), __rho * sin(__theta)); }
+
+  template
+    inline complex<_Tp>
+    conj(const complex<_Tp>& __z)
+    { return complex<_Tp>(__z.real(), -__z.imag()); }
+  
+  // Transcendentals
+  template
+    inline complex<_Tp>
+    cos(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp __y = __z.imag();
+      return complex<_Tp>(cos(__x) * cosh(__y), -sin(__x) * sinh(__y));
+    }
+
+  template
+    inline complex<_Tp>
+    cosh(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp __y = __z.imag();
+      return complex<_Tp>(cosh(__x) * cos(__y), sinh(__x) * sin(__y));
+    }
+
+  template
+    inline complex<_Tp>
+    exp(const complex<_Tp>& __z)
+    { return polar(exp(__z.real()), __z.imag()); }
+
+  template
+    inline complex<_Tp>
+    log(const complex<_Tp>& __z)
+    { return complex<_Tp>(log(abs(__z)), arg(__z)); }
+
+  template
+    inline complex<_Tp>
+    log10(const complex<_Tp>& __z)
+    { return log(__z) / log(_Tp(10.0)); }
+
+  template
+    inline complex<_Tp>
+    sin(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp __y = __z.imag();
+      return complex<_Tp>(sin(__x) * cosh(__y), cos(__x) * sinh(__y)); 
+    }
+
+  template
+    inline complex<_Tp>
+    sinh(const complex<_Tp>& __z)
+    {
+      const _Tp __x = __z.real();
+      const _Tp  __y = __z.imag();
+      return complex<_Tp>(sinh(__x) * cos(__y), cosh(__x) * sin(__y));
+    }
+
+  template
+    complex<_Tp>
+    sqrt(const complex<_Tp>& __z)
+    {
+      _Tp __x = __z.real();
+      _Tp __y = __z.imag();
+
+      if (__x == _Tp())
+        {
+          _Tp __t = sqrt(abs(__y) / 2);
+          return complex<_Tp>(__t, __y < _Tp() ? -__t : __t);
+        }
+      else
+        {
+          _Tp __t = sqrt(2 * (abs(__z) + abs(__x)));
+          _Tp __u = __t / 2;
+          return __x > _Tp()
+            ? complex<_Tp>(__u, __y / __t)
+            : complex<_Tp>(abs(__y) / __t, __y < _Tp() ? -__u : __u);
+        }
+    }
+
+  template
+    inline complex<_Tp>
+    tan(const complex<_Tp>& __z)
+    {
+      return sin(__z) / cos(__z);
+    }
+
+  template
+    inline complex<_Tp>
+    tanh(const complex<_Tp>& __z)
+    {
+      return sinh(__z) / cosh(__z);
+    }
+
+  template
+    inline complex<_Tp>
+    pow(const complex<_Tp>& __z, int __n)
+    {
+      return __pow_helper(__z, __n);
+    }
+
+  template
+    inline complex<_Tp>
+    pow(const complex<_Tp>& __x, const _Tp& __y)
+    {
+      return exp(__y * log(__x));
+    }
+
+  template
+    inline complex<_Tp>
+    pow(const complex<_Tp>& __x, const complex<_Tp>& __y)
+    {
+      return exp(__y * log(__x));
+    }
+
+  template
+    inline complex<_Tp>
+    pow(const _Tp& __x, const complex<_Tp>& __y)
+    {
+      return exp(__y * log(__x));
+    }
+
+  // 26.2.3  complex specializations
+  // complex specialization
+  template<> class complex
+  {
+  public:
+    typedef float value_type;
+    
+    complex(float = 0.0f, float = 0.0f);
+#ifdef _GLIBCPP_BUGGY_COMPLEX
+    complex(const complex& __z) : _M_value(__z._M_value) { }
+#endif
+    explicit complex(const complex&);
+    explicit complex(const complex&);
+
+    float real() const;
+    float imag() const;
+
+    complex& operator=(float);
+    complex& operator+=(float);
+    complex& operator-=(float);
+    complex& operator*=(float);
+    complex& operator/=(float);
+        
+    // Let's the compiler synthetize the copy and assignment
+    // operator.  It always does a pretty good job.
+    // complex& operator= (const complex&);
+    template
+      complex&operator=(const complex<_Tp>&);
+    template
+      complex& operator+=(const complex<_Tp>&);
+    template
+      complex& operator-=(const complex<_Tp>&);
+    template
+      complex& operator*=(const complex<_Tp>&);
+    template
+      complex&operator/=(const complex<_Tp>&);
+
+  private:
+    typedef __complex__ float _ComplexT;
+    _ComplexT _M_value;
+
+    complex(_ComplexT __z) : _M_value(__z) { }
+        
+    friend class complex;
+    friend class complex;
+  };
+
+  inline float
+  complex::real() const
+  { return __real__ _M_value; }
+
+  inline float
+  complex::imag() const
+  { return __imag__ _M_value; }
+
+  inline
+  complex::complex(float r, float i)
+  {
+    __real__ _M_value = r;
+    __imag__ _M_value = i;
+  }
+
+  inline complex&
+  complex::operator=(float __f)
+  {
+    __real__ _M_value = __f;
+    __imag__ _M_value = 0.0f;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator+=(float __f)
+  {
+    __real__ _M_value += __f;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator-=(float __f)
+  {
+    __real__ _M_value -= __f;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator*=(float __f)
+  {
+    _M_value *= __f;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator/=(float __f)
+  {
+    _M_value /= __f;
+    return *this;
+  }
+
+  template
+  inline complex&
+  complex::operator=(const complex<_Tp>& __z)
+  {
+    __real__ _M_value = __z.real();
+    __imag__ _M_value = __z.imag();
+    return *this;
+  }
+
+  template
+  inline complex&
+  complex::operator+=(const complex<_Tp>& __z)
+  {
+    __real__ _M_value += __z.real();
+    __imag__ _M_value += __z.imag();
+    return *this;
+  }
+    
+  template
+    inline complex&
+    complex::operator-=(const complex<_Tp>& __z)
+    {
+     __real__ _M_value -= __z.real();
+     __imag__ _M_value -= __z.imag();
+     return *this;
+    } 
+
+  template
+    inline complex&
+    complex::operator*=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value *= __t;
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator/=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value /= __t;
+      return *this;
+    }
+
+  // 26.2.3  complex specializations
+  // complex specialization
+  template<> class complex
+  {
+  public:
+    typedef double value_type;
+
+    complex(double  =0.0, double =0.0);
+#ifdef _GLIBCPP_BUGGY_COMPLEX
+    complex(const complex& __z) : _M_value(__z._M_value) { }
+#endif
+    complex(const complex&);
+    explicit complex(const complex&);
+        
+    double real() const;
+    double imag() const;
+        
+    complex& operator=(double);
+    complex& operator+=(double);
+    complex& operator-=(double);
+    complex& operator*=(double);
+    complex& operator/=(double);
+
+    // The compiler will synthetize this, efficiently.
+    // complex& operator= (const complex&);
+    template
+      complex& operator=(const complex<_Tp>&);
+    template
+      complex& operator+=(const complex<_Tp>&);
+    template
+      complex& operator-=(const complex<_Tp>&);
+    template
+      complex& operator*=(const complex<_Tp>&);
+    template
+      complex& operator/=(const complex<_Tp>&);
+
+  private:
+    typedef __complex__ double _ComplexT;
+    _ComplexT _M_value;
+
+    complex(_ComplexT __z) : _M_value(__z) { }
+        
+    friend class complex;
+    friend class complex;
+  };
+
+  inline double
+  complex::real() const
+  { return __real__ _M_value; }
+
+  inline double
+  complex::imag() const
+  { return __imag__ _M_value; }
+
+  inline
+  complex::complex(double __r, double __i)
+  {
+    __real__ _M_value = __r;
+    __imag__ _M_value = __i;
+  }
+
+  inline complex&
+  complex::operator=(double __d)
+  {
+    __real__ _M_value = __d;
+    __imag__ _M_value = 0.0;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator+=(double __d)
+  {
+    __real__ _M_value += __d;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator-=(double __d)
+  {
+    __real__ _M_value -= __d;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator*=(double __d)
+  {
+    _M_value *= __d;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator/=(double __d)
+  {
+    _M_value /= __d;
+    return *this;
+  }
+
+  template
+    inline complex&
+    complex::operator=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value = __z.real();
+      __imag__ _M_value = __z.imag();
+      return *this;
+    }
+    
+  template
+    inline complex&
+    complex::operator+=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value += __z.real();
+      __imag__ _M_value += __z.imag();
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator-=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value -= __z.real();
+      __imag__ _M_value -= __z.imag();
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator*=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value *= __t;
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator/=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value /= __t;
+      return *this;
+    }
+
+  // 26.2.3  complex specializations
+  // complex specialization
+  template<> class complex
+  {
+  public:
+    typedef long double value_type;
+
+    complex(long double = 0.0L, long double = 0.0L);
+#ifdef _GLIBCPP_BUGGY_COMPLEX
+    complex(const complex& __z) : _M_value(__z._M_value) { }
+#endif
+    complex(const complex&);
+    complex(const complex&);
+
+    long double real() const;
+    long double imag() const;
+
+    complex& operator= (long double);
+    complex& operator+= (long double);
+    complex& operator-= (long double);
+    complex& operator*= (long double);
+    complex& operator/= (long double);
+
+    // The compiler knows how to do this efficiently
+    // complex& operator= (const complex&);
+    template
+      complex& operator=(const complex<_Tp>&);
+    template
+      complex& operator+=(const complex<_Tp>&);
+    template
+      complex& operator-=(const complex<_Tp>&);
+    template
+      complex& operator*=(const complex<_Tp>&);
+    template
+      complex& operator/=(const complex<_Tp>&);
+
+  private:
+    typedef __complex__ long double _ComplexT;
+    _ComplexT _M_value;
+
+    complex(_ComplexT __z) : _M_value(__z) { }
+
+    friend class complex;
+    friend class complex;
+  };
+
+  inline
+  complex::complex(long double __r, long double __i)
+  {
+    __real__ _M_value = __r;
+    __imag__ _M_value = __i;
+  }
+
+  inline long double
+  complex::real() const
+  { return __real__ _M_value; }
+
+  inline long double
+  complex::imag() const
+  { return __imag__ _M_value; }
+
+  inline complex&   
+  complex::operator=(long double __r)
+  {
+    __real__ _M_value = __r;
+    __imag__ _M_value = 0.0L;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator+=(long double __r)
+  {
+    __real__ _M_value += __r;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator-=(long double __r)
+  {
+    __real__ _M_value -= __r;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator*=(long double __r)
+  {
+    _M_value *= __r;
+    return *this;
+  }
+
+  inline complex&
+  complex::operator/=(long double __r)
+  {
+    _M_value /= __r;
+    return *this;
+  }
+
+  template
+    inline complex&
+    complex::operator=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value = __z.real();
+      __imag__ _M_value = __z.imag();
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator+=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value += __z.real();
+      __imag__ _M_value += __z.imag();
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator-=(const complex<_Tp>& __z)
+    {
+      __real__ _M_value -= __z.real();
+      __imag__ _M_value -= __z.imag();
+      return *this;
+    }
+    
+  template
+    inline complex&
+    complex::operator*=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value *= __t;
+      return *this;
+    }
+
+  template
+    inline complex&
+    complex::operator/=(const complex<_Tp>& __z)
+    {
+      _ComplexT __t;
+      __real__ __t = __z.real();
+      __imag__ __t = __z.imag();
+      _M_value /= __t;
+      return *this;
+    }
+
+  // These bits have to be at the end of this file, so that the
+  // specializations have all been defined.
+  // ??? No, they have to be there because of compiler limitation at
+  // inlining.  It suffices that class specializations be defined.
+  inline
+  complex::complex(const complex& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex::complex(const complex& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex::complex(const complex& __z) 
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex::complex(const complex& __z)
+  {
+    __real__ _M_value = __z.real();
+    __imag__ _M_value = __z.imag();
+  }
+
+  inline
+  complex::complex(const complex& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+
+  inline
+  complex::complex(const complex& __z)
+  : _M_value(_ComplexT(__z._M_value)) { }
+} // namespace std
+
+#endif	/* _CPP_COMPLEX */
diff --git a/contrib/libstdc++/include/std/std_deque.h b/contrib/libstdc++/include/std/std_deque.h
new file mode 100644
index 0000000..0fca0d1
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_deque.h
@@ -0,0 +1,77 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file deque
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_DEQUE
+#define _CPP_DEQUE 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_DEQUE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_fstream.h b/contrib/libstdc++/include/std/std_fstream.h
new file mode 100644
index 0000000..fb95965
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_fstream.h
@@ -0,0 +1,558 @@
+// File based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.8  File-based streams
+//
+
+/** @file fstream
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_FSTREAM
+#define _CPP_FSTREAM	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 	// For codecvt
+#include 
+#include 
+
+namespace std
+{
+  template
+    class basic_filebuf : public basic_streambuf<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT                     	        char_type;
+      typedef _Traits                    	        traits_type;
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard Types:
+      typedef basic_streambuf  	__streambuf_type;
+      typedef basic_filebuf     __filebuf_type;
+      typedef __basic_file		        __file_type;
+      typedef typename traits_type::state_type          __state_type;
+      typedef codecvt    __codecvt_type;
+      typedef typename __codecvt_type::result 	        __res_type;
+      typedef ctype                          __ctype_type;
+
+      friend class ios_base; // For sync_with_stdio.
+
+    protected:
+      // Data Members:
+      // MT lock inherited from libio or other low-level io library.
+      __c_lock          	_M_lock;
+
+      // External buffer.
+      __file_type 		_M_file;
+
+      // Current and beginning state type for codecvt.
+      __state_type		_M_state_cur;
+      __state_type 		_M_state_beg;
+
+      // Set iff _M_buf is allocated memory from _M_allocate_internal_buffer.
+      bool			_M_buf_allocated;
+      
+      // XXX Needed?
+      bool			_M_last_overflowed;
+
+      // The position in the buffer corresponding to the external file
+      // pointer.
+      char_type*		_M_filepos;
+
+    public:
+      // Constructors/destructor:
+      basic_filebuf();
+
+      virtual
+      ~basic_filebuf()
+      {
+	this->close();
+	_M_last_overflowed = false;
+      }
+
+      // Members:
+      bool
+      is_open() const { return _M_file.is_open(); }
+
+      __filebuf_type*
+      open(const char* __s, ios_base::openmode __mode);
+
+      __filebuf_type*
+      close();
+
+    protected:
+      void
+      _M_allocate_internal_buffer();
+
+      void
+      _M_destroy_internal_buffer();
+
+      // Overridden virtual functions:
+      virtual streamsize
+      showmanyc();
+
+      // Stroustrup, 1998, p. 628
+      // underflow() and uflow() functions are called to get the next
+      // charater from the real input source when the buffer is empty.
+      // Buffered input uses underflow()
+
+      // The only difference between underflow() and uflow() is that the
+      // latter bumps _M_in_cur after the read.  In the sync_with_stdio
+      // case, this is important, as we need to unget the read character in
+      // the underflow() case in order to maintain synchronization.  So
+      // instead of calling underflow() from uflow(), we create a common
+      // subroutine to do the real work.
+      int_type
+      _M_underflow_common(bool __bump);
+
+      virtual int_type
+      underflow() { return _M_underflow_common(false); }
+
+      virtual int_type
+      uflow() { return _M_underflow_common(true); }
+
+      virtual int_type
+      pbackfail(int_type __c = _Traits::eof());
+
+      // NB: For what the standard expects of the overflow function,
+      // see _M_really_overflow(), below. Because basic_streambuf's
+      // sputc/sputn call overflow directly, and the complications of
+      // this implementation's setting of the initial pointers all
+      // equal to _M_buf when initializing, it seems essential to have
+      // this in actuality be a helper function that checks for the
+      // eccentricities of this implementation, and then call
+      // overflow() if indeed the buffer is full.
+      virtual int_type
+      overflow(int_type __c = _Traits::eof());
+
+      // Stroustrup, 1998, p 648
+      // The overflow() function is called to transfer characters to the
+      // real output destination when the buffer is full. A call to
+      // overflow(c) outputs the contents of the buffer plus the
+      // character c.
+      // 27.5.2.4.5
+      // Consume some sequence of the characters in the pending sequence.
+      int_type
+      _M_really_overflow(int_type __c = _Traits::eof());
+
+      // Convert internal byte sequence to external, char-based
+      // sequence via codecvt.
+      void
+      _M_convert_to_external(char_type*, streamsize, streamsize&, streamsize&);
+
+      virtual __streambuf_type*
+      setbuf(char_type* __s, streamsize __n);
+
+      virtual pos_type
+      seekoff(off_type __off, ios_base::seekdir __way,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual pos_type
+      seekpos(pos_type __pos,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual int
+      sync()
+      {
+	bool __testput = _M_out_cur && _M_out_beg < _M_out_end;
+
+	// Make sure that the internal buffer resyncs its idea of
+	// the file position with the external file.
+	if (__testput)
+	  {
+	    // Need to restore current position after the write.
+	    off_type __off = _M_out_cur - _M_out_end;
+	    _M_really_overflow(); // _M_file.sync() will be called within
+	    if (__off)
+	      _M_file.seekoff(__off, ios_base::cur);
+	  }
+	else
+	  _M_file.sync();
+	_M_last_overflowed = false;
+	return 0;
+      }
+
+      virtual void
+      imbue(const locale& __loc);
+
+      virtual streamsize
+      xsgetn(char_type* __s, streamsize __n)
+      {
+	streamsize __ret = 0;
+	// Clear out pback buffer before going on to the real deal...
+	if (_M_pback_init)
+	  {
+	    while (__ret < __n && _M_in_cur < _M_in_end)
+	      {
+		*__s = *_M_in_cur;
+		++__ret;
+		++__s;
+		++_M_in_cur;
+	      }
+	    _M_pback_destroy();
+	  }
+	if (__ret < __n)
+	  __ret += __streambuf_type::xsgetn(__s, __n - __ret);
+	return __ret;
+      }
+
+      virtual streamsize
+      xsputn(const char_type* __s, streamsize __n)
+      {
+	_M_pback_destroy();
+	return __streambuf_type::xsputn(__s, __n);
+      }
+
+      void
+      _M_output_unshift();
+
+      // These three functions are used to clarify internal buffer
+      // maintenance. After an overflow, or after a seekoff call that
+      // started at beg or end, or possibly when the stream becomes
+      // unbuffered, and a myrid other obscure corner cases, the
+      // internal buffer does not truly reflect the contents of the
+      // external buffer. At this point, for whatever reason, it is in
+      // an indeterminate state.
+      void
+      _M_set_indeterminate(void)
+      {
+	if (_M_mode & ios_base::in)
+	  this->setg(_M_buf, _M_buf, _M_buf);
+	if (_M_mode & ios_base::out)
+	  this->setp(_M_buf, _M_buf);
+	_M_filepos = _M_buf;
+      }
+
+      void
+      _M_set_determinate(off_type __off)
+      {
+	bool __testin = _M_mode & ios_base::in;
+	bool __testout = _M_mode & ios_base::out;
+	if (__testin)
+	  this->setg(_M_buf, _M_buf, _M_buf + __off);
+	if (__testout)
+	  this->setp(_M_buf, _M_buf + __off);
+	_M_filepos = _M_buf + __off;
+      }
+
+      bool
+      _M_is_indeterminate(void)
+      { 
+	bool __ret = false;
+	// Don't return true if unbuffered.
+	if (_M_buf)
+	  {
+	    if (_M_mode & ios_base::in)
+	      __ret = _M_in_beg == _M_in_cur && _M_in_cur == _M_in_end;
+	    if (_M_mode & ios_base::out)
+	      __ret = _M_out_beg == _M_out_cur && _M_out_cur == _M_out_end;
+	  }
+	return __ret;
+      }
+    };
+
+
+
+  // 27.8.1.5  Template class basic_ifstream
+  /**
+   *  Derivation of general input streams, specific to files.
+  */
+  template
+    class basic_ifstream : public basic_istream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard types:
+      typedef basic_filebuf 	__filebuf_type;
+      typedef basic_istream	__istream_type;
+
+    private:
+      __filebuf_type	_M_filebuf;
+
+    public:
+     // Constructors/Destructors:
+     /** Default constructor.  Create an input file stream.  */
+      basic_ifstream()
+      : __istream_type(NULL), _M_filebuf()
+      { this->init(&_M_filebuf); }
+
+      /**
+       *  @brief Create an input file stream.
+       *  @param  s  Null terminated string specifying filename.
+       *  @param  mode  Open file in specified mode (see std::ios_base).
+       *
+       *  Tip:  When using std::string to hold the filename, you must use
+       *  .c_str() before passing it to this constructor.
+      */
+      explicit
+      basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
+      : __istream_type(NULL), _M_filebuf()
+      {
+	this->init(&_M_filebuf);
+	this->open(__s, __mode);
+      }
+
+      ~basic_ifstream()
+      { }
+
+      // Members:
+      /**
+       *  @brief  Get a pointer to the file stream's buffer.
+       *  @return Pointer to basic_filebuf.
+      */
+      __filebuf_type*
+      rdbuf() const
+      { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+      bool
+      is_open() { return _M_filebuf.is_open(); }
+
+      void
+      open(const char* __s, ios_base::openmode __mode = ios_base::in)
+      {
+	if (!_M_filebuf.open(__s, __mode | ios_base::in))
+	  this->setstate(ios_base::failbit);
+      }
+
+      /** Close the file.  */
+      void
+      close()
+      {
+	if (!_M_filebuf.close())
+	  this->setstate(ios_base::failbit);
+      }
+    };
+
+
+  // 27.8.1.8  Template class basic_ofstream
+  /**
+   *  Derivation of general output streams, specific to files.
+  */
+  template
+    class basic_ofstream : public basic_ostream<_CharT,_Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard types:
+      typedef basic_filebuf 	__filebuf_type;
+      typedef basic_ostream	__ostream_type;
+
+    private:
+      __filebuf_type	_M_filebuf;
+
+    public:
+      // Constructors:
+      /** Default constructor for output file_stream.  */
+      basic_ofstream()
+      : __ostream_type(NULL), _M_filebuf()
+      { this->init(&_M_filebuf); }
+
+      /**
+       *  @brief  Create an output stream.
+       *  @param  s  Null terminated string specifying filename.
+       *  @param  mode  Open file in specified mode (see std::ios_base).
+       *
+       *  Tip:  When using std::string to hold the filename, you must use
+       *  .c_str() before passing it to this constructor.
+      */
+      explicit
+      basic_ofstream(const char* __s,
+		     ios_base::openmode __mode = ios_base::out|ios_base::trunc)
+      : __ostream_type(NULL), _M_filebuf()
+      {
+	this->init(&_M_filebuf);
+	this->open(__s, __mode);
+      }
+
+      ~basic_ofstream()
+      { }
+
+      // Members:
+      /**
+       *  @brief  Get a pointer to the file stream's buffer.
+       *  @return Pointer to basic_filebuf.
+      */
+      __filebuf_type*
+      rdbuf() const
+      { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+      /**
+       *  @brief Query to see if file stream is open.
+       *  @return True if stream is open.
+      */
+      bool
+      is_open() { return _M_filebuf.is_open(); }
+
+      /**
+       *  @brief Specify a file to open for output.
+       *  @param  s  Null terminated string specifying filename.
+       *  @param  mode  Mode in which to open file (see std::ios_base).
+       *
+       *  Tip:  When using std::string to hold the filename, you must use
+       *  .c_str() before passing it to this constructor.
+      */
+      void
+      open(const char* __s,
+	   ios_base::openmode __mode = ios_base::out | ios_base::trunc)
+      {
+	if (!_M_filebuf.open(__s, __mode | ios_base::out))
+	  this->setstate(ios_base::failbit);
+      }
+
+      /** Close the file stream.  */
+      void
+      close()
+      {
+	if (!_M_filebuf.close())
+	  this->setstate(ios_base::failbit);
+      }
+    };
+
+
+  // 27.8.1.11  Template class basic_fstream
+  /**
+   *  Derivation of general input/output streams, specific to files.
+  */
+  template
+    class basic_fstream : public basic_iostream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard types:
+      typedef basic_filebuf 	__filebuf_type;
+      typedef basic_ios		__ios_type;
+      typedef basic_iostream	__iostream_type;
+
+    private:
+      __filebuf_type	_M_filebuf;
+
+    public:
+      // Constructors/destructor:
+      /** Default constructor.  Create a file stream.  */
+      basic_fstream()
+      : __iostream_type(NULL), _M_filebuf()
+      { this->init(&_M_filebuf); }
+
+      /**
+       *  @brief Create an input/output stream.
+       *  @param  s  Null terminated string specifying filename.
+       *  @param  mode  Open file in specified mode (see std::ios_base).
+       *
+       *  Tip:  When using std::string to hold the filename, you must use
+       *  .c_str() before passing it to this constructor.
+      */
+      explicit
+      basic_fstream(const char* __s,
+		    ios_base::openmode __mode = ios_base::in | ios_base::out)
+      : __iostream_type(NULL), _M_filebuf()
+      {
+	this->init(&_M_filebuf);
+	this->open(__s, __mode);
+      }
+
+      ~basic_fstream()
+      { }
+
+      // Members:
+      /**
+       *  @brief  Get a pointer to the file stream's buffer.
+       *  @return Pointer to basic_filebuf.
+      */
+      __filebuf_type*
+      rdbuf() const
+      { return const_cast<__filebuf_type*>(&_M_filebuf); }
+
+      /**
+       *  @brief Query to see if file stream is open.
+       *  @return True if stream is open.
+      */
+      bool
+      is_open() { return _M_filebuf.is_open(); }
+
+      /**
+       *  @brief Specify a file to open for input and/or output.
+       *  @param  s  Null terminated string specifying filename.
+       *  @param  mode  Mode in which to open file (see std::ios_base).
+       *
+       *  Tip:  When using std::string to hold the filename, you must use
+       *  .c_str() before passing it to this constructor.
+      */
+      void
+      open(const char* __s,
+	   ios_base::openmode __mode = ios_base::in | ios_base::out)
+      {
+	if (!_M_filebuf.open(__s, __mode))
+	  setstate(ios_base::failbit);
+      }
+
+      /** Close the file stream.  */
+      void
+      close()
+      {
+	if (!_M_filebuf.close())
+	  setstate(ios_base::failbit);
+      }
+    };
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#endif
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include 
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/std/std_functional.h b/contrib/libstdc++/include/std/std_functional.h
new file mode 100644
index 0000000..40080d9
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_functional.h
@@ -0,0 +1,62 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file functional
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_FUNCTIONAL
+#define _CPP_FUNCTIONAL 1
+
+#pragma GCC system_header
+#include 
+#include 
+#include 
+
+#endif /* _CPP_FUNCTIONAL */
+
+// Local Variables:
+// mode:C++
+// End:
+
diff --git a/contrib/libstdc++/include/std/std_iomanip.h b/contrib/libstdc++/include/std/std_iomanip.h
new file mode 100644
index 0000000..e046c82
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_iomanip.h
@@ -0,0 +1,249 @@
+// Standard stream manipulators -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.3  Standard manipulators
+//
+
+/** @file iomanip
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_IOMANIP
+#define _CPP_IOMANIP 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+namespace std
+{
+  struct _Resetiosflags { ios_base::fmtflags _M_mask; };
+
+  inline _Resetiosflags 
+  resetiosflags(ios_base::fmtflags __mask)
+  { 
+    _Resetiosflags __x; 
+    __x._M_mask = __mask; 
+    return __x; 
+  }
+
+  template
+    inline basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Resetiosflags __f)
+    { 
+      __is.setf(ios_base::fmtflags(0), __f._M_mask); 
+      return __is; 
+    }
+
+  template
+    inline basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Resetiosflags __f)
+    { 
+      __os.setf(ios_base::fmtflags(0), __f._M_mask); 
+      return __os; 
+    }
+
+
+  struct _Setiosflags { ios_base::fmtflags _M_mask; };
+
+  inline _Setiosflags 
+  setiosflags(ios_base::fmtflags __mask)
+  { 
+    _Setiosflags __x; 
+    __x._M_mask = __mask; 
+    return __x; 
+  }
+
+  template
+    inline basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setiosflags __f)
+    { 
+      __is.setf(__f._M_mask); 
+      return __is; 
+    }
+
+  template
+    inline basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setiosflags __f)
+    { 
+      __os.setf(__f._M_mask); 
+      return __os; 
+    }
+
+
+  struct _Setbase { int _M_base; };
+
+  inline _Setbase 
+  setbase(int __base)
+  { 
+    _Setbase __x; 
+    __x._M_base = __base; 
+    return __x; 
+  }
+
+  template
+    inline basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setbase __f)
+    {
+      __is.setf(__f._M_base ==  8 ? ios_base::oct : 
+	      __f._M_base == 10 ? ios_base::dec : 
+	      __f._M_base == 16 ? ios_base::hex : 
+	      ios_base::fmtflags(0), ios_base::basefield);
+      return __is; 
+    }
+  
+  template
+    inline basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setbase __f)
+    {
+      __os.setf(__f._M_base ==  8 ? ios_base::oct : 
+		__f._M_base == 10 ? ios_base::dec : 
+		__f._M_base == 16 ? ios_base::hex : 
+		ios_base::fmtflags(0), ios_base::basefield);
+      return __os; 
+    }
+  
+
+  template 
+    struct _Setfill { _CharT _M_c; };
+
+  template 
+    inline _Setfill<_CharT> 
+    setfill(_CharT __c)
+    { 
+      _Setfill<_CharT> __x; 
+      __x._M_c = __c; 
+      return __x; 
+    }
+
+  template
+    inline basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setfill<_CharT> __f)
+    { 
+      __is.fill(__f._M_c); 
+      return __is; 
+    }
+
+  template
+    inline basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setfill<_CharT> __f)
+    { 
+      __os.fill(__f._M_c); 
+      return __os; 
+    }
+
+
+  struct _Setprecision { int _M_n; };
+
+  inline _Setprecision 
+  setprecision(int __n)
+  { 
+    _Setprecision __x; 
+    __x._M_n = __n; 
+    return __x; 
+  }
+
+  template
+    inline basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setprecision __f)
+    { 
+      __is.precision(__f._M_n); 
+      return __is; 
+    }
+
+  template
+    inline basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setprecision __f)
+    { 
+      __os.precision(__f._M_n); 
+      return __os; 
+    }
+
+
+  struct _Setw { int _M_n; };
+
+  inline _Setw 
+  setw(int __n)
+  { 
+    _Setw __x; 
+    __x._M_n = __n; 
+    return __x; 
+  }
+
+  template
+    inline basic_istream<_CharT,_Traits>& 
+    operator>>(basic_istream<_CharT,_Traits>& __is, _Setw __f)
+    { 
+      __is.width(__f._M_n); 
+      return __is; 
+    }
+
+  template
+    inline basic_ostream<_CharT,_Traits>& 
+    operator<<(basic_ostream<_CharT,_Traits>& __os, _Setw __f)
+    { 
+      __os.width(__f._M_n); 
+      return __os; 
+    }
+
+  // Inhibit implicit instantiations for required instantiations,
+  // which are defined via explicit instantiations elsewhere.  
+  // NB:  This syntax is a GNU extension.
+  extern template ostream& operator<<(ostream&, _Setfill);
+  extern template ostream& operator<<(ostream&, _Setiosflags);
+  extern template ostream& operator<<(ostream&, _Resetiosflags);
+  extern template ostream& operator<<(ostream&, _Setbase);
+  extern template ostream& operator<<(ostream&, _Setprecision);
+  extern template ostream& operator<<(ostream&, _Setw);
+  extern template wostream& operator<<(wostream&, _Setfill);
+  extern template wostream& operator<<(wostream&, _Setiosflags);
+  extern template wostream& operator<<(wostream&, _Resetiosflags);
+  extern template wostream& operator<<(wostream&, _Setbase);
+  extern template wostream& operator<<(wostream&, _Setprecision);
+  extern template wostream& operator<<(wostream&, _Setw);
+
+  extern template istream& operator>>(istream&, _Setfill);
+  extern template istream& operator>>(istream&, _Setiosflags);
+  extern template istream& operator>>(istream&, _Resetiosflags);
+  extern template istream& operator>>(istream&, _Setbase);
+  extern template istream& operator>>(istream&, _Setprecision);
+  extern template istream& operator>>(istream&, _Setw);
+  extern template wistream& operator>>(wistream&, _Setfill);
+  extern template wistream& operator>>(wistream&, _Setiosflags);
+  extern template wistream& operator>>(wistream&, _Resetiosflags);
+  extern template wistream& operator>>(wistream&, _Setbase);
+  extern template wistream& operator>>(wistream&, _Setprecision);
+  extern template wistream& operator>>(wistream&, _Setw);
+} // namespace std
+
+#endif	
diff --git a/contrib/libstdc++/include/std/std_ios.h b/contrib/libstdc++/include/std/std_ios.h
new file mode 100644
index 0000000..a7764c8
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_ios.h
@@ -0,0 +1,54 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.4  Iostreams base classes
+//
+
+/** @file ios
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_IOS
+#define _CPP_IOS	1
+
+#pragma GCC system_header
+
+#include 
+#include  		// For ios_base::failure
+#include  	// For char_traits, streamoff, streamsize, fpos
+#include  	// For SEEK_SET, SEEK_CUR, SEEK_END
+#include 	// For class locale
+#include 	// For ios_base declarations.
+#include  
+#include 
+
+#endif	/* _CPP_IOS */
+
diff --git a/contrib/libstdc++/include/std/std_iosfwd.h b/contrib/libstdc++/include/std/std_iosfwd.h
new file mode 100644
index 0000000..f76ca7c
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_iosfwd.h
@@ -0,0 +1,134 @@
+// Forwarding declarations -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.2  Forward declarations
+//
+
+/** @file iosfwd
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_IOSFWD
+#define _CPP_IOSFWD 1
+
+#pragma GCC system_header
+
+#include 
+#include  // For string forward declarations.
+#include 
+#include 
+
+namespace std 
+{
+  template >
+    class basic_ios;
+
+  template >
+    class basic_streambuf;
+
+  template >
+    class basic_istream;
+
+  template >
+    class basic_ostream;
+
+  template >
+    class basic_iostream;
+
+  template,
+	    typename _Alloc = allocator<_CharT> >
+    class basic_stringbuf;
+
+  template,
+	   typename _Alloc = allocator<_CharT> >
+    class basic_istringstream;
+
+  template,
+	   typename _Alloc = allocator<_CharT> >
+    class basic_ostringstream;
+
+  template,
+	   typename _Alloc = allocator<_CharT> >
+    class basic_stringstream;
+
+  template >
+    class basic_filebuf;
+
+  template >
+    class basic_ifstream;
+
+  template >
+    class basic_ofstream;
+
+  template >
+    class basic_fstream;
+
+  template >
+    class istreambuf_iterator;
+
+  template >
+    class ostreambuf_iterator;
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+  // Not included.   (??? Apparently no LWG number?)
+  class ios_base; 
+#endif
+
+  typedef basic_ios 		ios;
+  typedef basic_streambuf 	streambuf;
+  typedef basic_istream 		istream;
+  typedef basic_ostream 		ostream;
+  typedef basic_iostream 		iostream;
+  typedef basic_stringbuf 	stringbuf;
+  typedef basic_istringstream 	istringstream;
+  typedef basic_ostringstream 	ostringstream;
+  typedef basic_stringstream 	stringstream;
+  typedef basic_filebuf 		filebuf;
+  typedef basic_ifstream 		ifstream;
+  typedef basic_ofstream 		ofstream;
+  typedef basic_fstream 		fstream;
+
+  typedef basic_ios 		wios;
+  typedef basic_streambuf 	wstreambuf;
+  typedef basic_istream 	wistream;
+  typedef basic_ostream 	wostream;
+  typedef basic_iostream 	wiostream;
+  typedef basic_stringbuf 	wstringbuf;
+  typedef basic_istringstream 	wistringstream;
+  typedef basic_ostringstream 	wostringstream;
+  typedef basic_stringstream 	wstringstream;
+  typedef basic_filebuf 	wfilebuf;
+  typedef basic_ifstream 	wifstream;
+  typedef basic_ofstream 	wofstream;
+  typedef basic_fstream 	wfstream;
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/std/std_iostream.h b/contrib/libstdc++/include/std/std_iostream.h
new file mode 100644
index 0000000..5b3da9c
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_iostream.h
@@ -0,0 +1,65 @@
+// Standard iostream objects -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.3  Standard iostream objects
+//
+
+/** @file iostream
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_IOSTREAM
+#define _CPP_IOSTREAM	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+namespace std 
+{
+  extern istream cin;
+  extern ostream cout;
+  extern ostream cerr;
+  extern ostream clog;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  extern wistream wcin;
+  extern wostream wcout;
+  extern wostream wcerr;
+  extern wostream wclog;
+#endif
+
+  // For construction of filebuffers for cout, cin, cerr, clog et. al.
+  static ios_base::Init __ioinit;
+} // namespace std
+
+#endif
diff --git a/contrib/libstdc++/include/std/std_istream.h b/contrib/libstdc++/include/std/std_istream.h
new file mode 100644
index 0000000..40f4b67
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_istream.h
@@ -0,0 +1,290 @@
+// Input streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.1  Input streams
+//
+
+/** @file istream
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_ISTREAM
+#define _CPP_ISTREAM	1
+
+#pragma GCC system_header
+
+#include 
+#include  // For numeric_limits
+
+namespace std
+{
+  // 27.6.1.1 Template class basic_istream
+  template
+    class basic_istream : virtual public basic_ios<_CharT, _Traits>
+    {
+    public:
+      // Types (inherited from basic_ios (27.4.4)):
+      typedef _CharT                     		char_type;
+      typedef typename _Traits::int_type 		int_type;
+      typedef typename _Traits::pos_type 		pos_type;
+      typedef typename _Traits::off_type 		off_type;
+      typedef _Traits                    		traits_type;
+      
+      // Non-standard Types:
+      typedef basic_streambuf<_CharT, _Traits> 		__streambuf_type;
+      typedef basic_ios<_CharT, _Traits>		__ios_type;
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef istreambuf_iterator<_CharT, _Traits>	__istreambuf_iter;
+      typedef num_get<_CharT, __istreambuf_iter>        __numget_type;
+      typedef ctype<_CharT>           			__ctype_type;
+
+    protected:
+      // Data Members:
+      streamsize 		_M_gcount;
+
+    public:
+      // 27.6.1.1.1 Constructor/destructor:
+      explicit 
+      basic_istream(__streambuf_type* __sb)
+      { 
+	this->init(__sb);
+	_M_gcount = streamsize(0);
+      }
+
+      virtual 
+      ~basic_istream() 
+      { _M_gcount = streamsize(0); }
+
+      // 27.6.1.1.2 Prefix/suffix:
+      class sentry;
+      friend class sentry;
+
+      // 27.6.1.2 Formatted input:
+      // 27.6.1.2.3 basic_istream::operator>>
+      __istream_type&
+      operator>>(__istream_type& (*__pf)(__istream_type&));
+
+      __istream_type&
+      operator>>(__ios_type& (*__pf)(__ios_type&));
+
+      __istream_type&
+      operator>>(ios_base& (*__pf)(ios_base&));
+      
+      // 27.6.1.2.2 Arithmetic Extractors
+      __istream_type& 
+      operator>>(bool& __n);
+      
+      __istream_type& 
+      operator>>(short& __n);
+      
+      __istream_type& 
+      operator>>(unsigned short& __n);
+
+      __istream_type& 
+      operator>>(int& __n);
+      
+      __istream_type& 
+      operator>>(unsigned int& __n);
+
+      __istream_type& 
+      operator>>(long& __n);
+      
+      __istream_type& 
+      operator>>(unsigned long& __n);
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+      __istream_type& 
+      operator>>(long long& __n);
+
+      __istream_type& 
+      operator>>(unsigned long long& __n);
+#endif
+
+      __istream_type& 
+      operator>>(float& __f);
+
+      __istream_type& 
+      operator>>(double& __f);
+
+      __istream_type& 
+      operator>>(long double& __f);
+
+      __istream_type& 
+      operator>>(void*& __p);
+
+      __istream_type& 
+      operator>>(__streambuf_type* __sb);
+      
+      // 27.6.1.3 Unformatted input:
+      inline streamsize 
+      gcount(void) const 
+      { return _M_gcount; }
+      
+      int_type 
+      get(void);
+
+      __istream_type& 
+      get(char_type& __c);
+
+      __istream_type& 
+      get(char_type* __s, streamsize __n, char_type __delim);
+
+      inline __istream_type& 
+      get(char_type* __s, streamsize __n)
+      { return this->get(__s, __n, this->widen('\n')); }
+
+      __istream_type&
+      get(__streambuf_type& __sb, char_type __delim);
+
+      inline __istream_type&
+      get(__streambuf_type& __sb)
+      { return this->get(__sb, this->widen('\n')); }
+
+      __istream_type& 
+      getline(char_type* __s, streamsize __n, char_type __delim);
+
+      inline __istream_type& 
+      getline(char_type* __s, streamsize __n)
+      { return this->getline(__s, __n, this->widen('\n')); }
+
+      __istream_type& 
+      ignore(streamsize __n = 1, int_type __delim = traits_type::eof());
+      
+      int_type 
+      peek(void);
+      
+      __istream_type& 
+      read(char_type* __s, streamsize __n);
+
+      streamsize 
+      readsome(char_type* __s, streamsize __n);
+      
+      __istream_type& 
+      putback(char_type __c);
+
+      __istream_type& 
+      unget(void);
+
+      int 
+      sync(void);
+
+      pos_type 
+      tellg(void);
+
+      __istream_type& 
+      seekg(pos_type);
+
+      __istream_type& 
+      seekg(off_type, ios_base::seekdir);
+    };
+  
+  template
+    class basic_istream<_CharT, _Traits>::sentry
+    {
+    public:
+      typedef _Traits 					traits_type;
+      typedef basic_streambuf<_CharT, _Traits> 		__streambuf_type;
+      typedef basic_istream<_CharT, _Traits> 		__istream_type;
+      typedef typename __istream_type::__ctype_type 	__ctype_type;
+      typedef typename _Traits::int_type		__int_type;
+
+      explicit 
+      sentry(basic_istream<_CharT, _Traits>& __is, bool __noskipws = false);
+
+      operator bool() { return _M_ok; }
+
+    private:
+      bool _M_ok;
+    };
+
+  // 27.6.1.2.3 Character extraction templates
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT& __c);
+
+  template
+    basic_istream&
+    operator>>(basic_istream& __in, unsigned char& __c)
+    { return (__in >> reinterpret_cast(__c)); }
+
+  template
+    basic_istream&
+    operator>>(basic_istream& __in, signed char& __c)
+    { return (__in >> reinterpret_cast(__c)); }
+
+  template
+    basic_istream<_CharT, _Traits>&
+    operator>>(basic_istream<_CharT, _Traits>& __in, _CharT* __s);
+  
+  template
+    basic_istream&
+    operator>>(basic_istream& __in, unsigned char* __s)
+    { return (__in >> reinterpret_cast(__s)); }
+
+  template
+    basic_istream&
+    operator>>(basic_istream& __in, signed char* __s)
+    { return (__in >> reinterpret_cast(__s)); }
+
+  // 27.6.1.5 Template class basic_iostream
+  template
+    class basic_iostream
+    : public basic_istream<_CharT, _Traits>, 
+      public basic_ostream<_CharT, _Traits>
+    {
+    public:
+      // Non-standard Types:
+      typedef basic_istream<_CharT, _Traits>		__istream_type;
+      typedef basic_ostream<_CharT, _Traits>		__ostream_type;
+
+      explicit 
+      basic_iostream(basic_streambuf<_CharT, _Traits>* __sb)
+      : __istream_type(__sb), __ostream_type(__sb)
+      { }
+
+      virtual 
+      ~basic_iostream() { }
+    };
+
+  // 27.6.1.4 Standard basic_istream manipulators
+  template
+    basic_istream<_CharT, _Traits>& 
+    ws(basic_istream<_CharT, _Traits>& __is);
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#endif
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include 
+#endif
+
+#endif	/* _CPP_ISTREAM */
diff --git a/contrib/libstdc++/include/std/std_iterator.h b/contrib/libstdc++/include/std/std_iterator.h
new file mode 100644
index 0000000..7b17094
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_iterator.h
@@ -0,0 +1,79 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file iterator
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_ITERATOR
+#define _CPP_ITERATOR 1
+
+#pragma GCC system_header
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_ITERATOR */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_limits.h b/contrib/libstdc++/include/std/std_limits.h
new file mode 100644
index 0000000..64d8a9b
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_limits.h
@@ -0,0 +1,1926 @@
+// The template and inlines for the -*- C++ -*- numeric_limits classes.
+
+// Copyright (C) 1999, 2000, 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
+// 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.
+
+// Note: this is not a conforming implementation.
+// Written by Gabriel Dos Reis 
+
+//
+// ISO 14882:1998
+// 18.2.1
+//
+
+/** @file limits
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_NUMERIC_LIMITS
+#define _CPP_NUMERIC_LIMITS 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+//
+// The numeric_limits<> traits document implementation-defined aspects
+// of fundamental arithmetic data types (integers and floating points).
+// From Standard C++ point of view, there are 13 such types:
+//   * integers
+//         bool						        (1)
+//         char, signed char, unsigned char			(3)
+//         short, unsigned short				(2)
+//         int, unsigned					(2)
+//         long, unsigned long					(2)
+//
+//   * floating points
+//         float						(1)
+//         double						(1)
+//         long double						(1)
+//
+// GNU C++ undertstands (where supported by the host C-library) 
+//   * integer
+//         long long, unsigned long long			(2)
+//
+// which brings us to 15 fundamental arithmetic data types in GNU C++.
+//
+// 
+// Since a numeric_limits<> is a bit tricky to get right, we rely on
+// an interface composed of macros which should be defined in config/os
+// or config/cpu when they differ from the generic (read arbitrary)
+// definitions given here.
+//
+
+// These values can be overridden in the target configuration file.
+// The default values are appropriate for many 32-bit targets.
+
+#ifndef __glibcpp_char_bits
+#define __glibcpp_char_bits 8
+#endif
+#ifdef __CHAR_UNSIGNED__
+#define __glibcpp_plain_char_is_signed false
+#else
+#define __glibcpp_plain_char_is_signed true
+#endif
+#ifndef __glibcpp_short_bits
+#define __glibcpp_short_bits 16
+#endif
+#ifndef __glibcpp_int_bits
+#define __glibcpp_int_bits 32
+#endif
+#ifndef __glibcpp_long_bits
+#define __glibcpp_long_bits 32
+#endif
+#ifndef __glibcpp_wchar_t_bits
+#define __glibcpp_wchar_t_bits 32
+#endif
+#ifndef __glibcpp_wchar_t_is_signed
+#define __glibcpp_wchar_t_is_signed true
+#endif
+#ifndef __glibcpp_long_long_bits
+#define __glibcpp_long_long_bits 64
+#endif
+#ifndef __glibcpp_float_bits
+#define __glibcpp_float_bits 32
+#endif
+#ifndef __glibcpp_double_bits
+#define __glibcpp_double_bits 64
+#endif
+#ifndef __glibcpp_long_double_bits
+#define __glibcpp_long_double_bits 128
+#endif
+
+#ifndef __glibcpp_char_traps
+#define __glibcpp_char_traps true
+#endif
+#ifndef __glibcpp_short_traps
+#define __glibcpp_short_traps true
+#endif
+#ifndef __glibcpp_int_traps
+#define __glibcpp_int_traps true
+#endif
+#ifndef __glibcpp_long_traps
+#define __glibcpp_long_traps true
+#endif
+#ifndef __glibcpp_wchar_t_traps
+#define __glibcpp_wchar_t_traps true
+#endif
+#ifndef __glibcpp_long_long_traps
+#define __glibcpp_long_long_traps true
+#endif
+
+// You should not need to define any macros below this point, unless
+// you have a machine with non-standard bit-widths.
+
+// These values are the minimums and maximums for standard data types
+// of common widths.
+
+#define __glibcpp_s8_max 127
+#define __glibcpp_s8_min (-__glibcpp_s8_max - 1)
+#define __glibcpp_s8_digits 7
+#define __glibcpp_s8_digits10 2
+#define __glibcpp_u8_min 0U
+#define __glibcpp_u8_max (__glibcpp_s8_max * 2 + 1)
+#define __glibcpp_u8_digits 8
+#define __glibcpp_u8_digits10 2
+#define __glibcpp_s16_max 32767
+#define __glibcpp_s16_min (-__glibcpp_s16_max - 1)
+#define __glibcpp_s16_digits 15
+#define __glibcpp_s16_digits10 4
+#define __glibcpp_u16_min 0U
+#define __glibcpp_u16_max (__glibcpp_s16_max * 2 + 1)
+#define __glibcpp_u16_digits 16
+#define __glibcpp_u16_digits10 4
+#define __glibcpp_s32_max 2147483647L
+#define __glibcpp_s32_min (-__glibcpp_s32_max - 1)
+#define __glibcpp_s32_digits 31
+#define __glibcpp_s32_digits10 9
+#define __glibcpp_u32_min 0UL
+#define __glibcpp_u32_max (__glibcpp_s32_max * 2U + 1)
+#define __glibcpp_u32_digits 32
+#define __glibcpp_u32_digits10 9
+#define __glibcpp_s64_max 9223372036854775807LL
+#define __glibcpp_s64_min (-__glibcpp_s64_max - 1)
+#define __glibcpp_s64_digits 63
+#define __glibcpp_s64_digits10 18
+#define __glibcpp_u64_min 0ULL
+#define __glibcpp_u64_max (__glibcpp_s64_max * 2ULL + 1)
+#define __glibcpp_u64_digits 64
+#define __glibcpp_u64_digits10 19
+
+#define __glibcpp_f32_min 1.17549435e-38F
+#define __glibcpp_f32_max 3.40282347e+38F
+#define __glibcpp_f32_digits 24
+#define __glibcpp_f32_digits10 6
+#define __glibcpp_f32_radix 2
+#define __glibcpp_f32_epsilon 1.19209290e-07F
+#define __glibcpp_f32_round_error 1.0F
+#define __glibcpp_f32_min_exponent -125
+#define __glibcpp_f32_min_exponent10 -37
+#define __glibcpp_f32_max_exponent 128
+#define __glibcpp_f32_max_exponent10 38
+#define __glibcpp_f64_min 2.2250738585072014e-308
+#define __glibcpp_f64_max 1.7976931348623157e+308
+#define __glibcpp_f64_digits 53
+#define __glibcpp_f64_digits10 15
+#define __glibcpp_f64_radix 2
+#define __glibcpp_f64_epsilon 2.2204460492503131e-16
+#define __glibcpp_f64_round_error 1.0
+#define __glibcpp_f64_min_exponent -1021
+#define __glibcpp_f64_min_exponent10 -307
+#define __glibcpp_f64_max_exponent 1024
+#define __glibcpp_f64_max_exponent10 308
+#define __glibcpp_f80_min 3.36210314311209350626e-4932L
+#define __glibcpp_f80_max 1.18973149535723176502e+4932L
+#define __glibcpp_f80_digits 64
+#define __glibcpp_f80_digits10 18
+#define __glibcpp_f80_radix 2
+#define __glibcpp_f80_epsilon 1.08420217248550443401e-19L
+#define __glibcpp_f80_round_error 1.0L
+#define __glibcpp_f80_min_exponent -16381
+#define __glibcpp_f80_min_exponent10 -4931
+#define __glibcpp_f80_max_exponent 16384
+#define __glibcpp_f80_max_exponent10 4932
+#define __glibcpp_f96_min 1.68105157155604675313e-4932L
+#define __glibcpp_f96_max 1.18973149535723176502e+4932L
+#define __glibcpp_f96_digits 64
+#define __glibcpp_f96_digits10 18
+#define __glibcpp_f96_radix 2
+#define __glibcpp_f96_epsilon 1.08420217248550443401e-19L
+#define __glibcpp_f96_round_error 1.0L
+#define __glibcpp_f96_min_exponent -16382
+#define __glibcpp_f96_min_exponent10 -4931
+#define __glibcpp_f96_max_exponent 16384
+#define __glibcpp_f96_max_exponent10 4932
+#define __glibcpp_f128_min 3.362103143112093506262677817321752603E-4932L
+#define __glibcpp_f128_max 1.189731495357231765085759326628007016E+4932L
+#define __glibcpp_f128_digits 113
+#define __glibcpp_f128_digits10 33
+#define __glibcpp_f128_radix 2
+#define __glibcpp_f128_epsilon 1.925929944387235853055977942584927319E-34L
+#define __glibcpp_f128_round_error 1.0L
+#define __glibcpp_f128_min_exponent -16381
+#define __glibcpp_f128_min_exponent10 -4931
+#define __glibcpp_f128_max_exponent 16384
+#define __glibcpp_f128_max_exponent10 4932
+
+// bool-specific hooks:
+//     __glibcpp_bool_digits  __glibcpp_int_traps __glibcpp_long_traps
+
+#ifndef __glibcpp_bool_digits
+#define __glibcpp_bool_digits 1
+#endif
+
+// char.
+
+#define __glibcpp_plain_char_traps true
+#define __glibcpp_signed_char_traps true
+#define __glibcpp_unsigned_char_traps true
+#ifndef __glibcpp_char_is_modulo
+#define __glibcpp_char_is_modulo true
+#endif
+#ifndef __glibcpp_signed_char_is_modulo
+#define __glibcpp_signed_char_is_modulo true
+#endif
+#if __glibcpp_char_bits == 8
+#define __glibcpp_signed_char_min __glibcpp_s8_min
+#define __glibcpp_signed_char_max __glibcpp_s8_max
+#define __glibcpp_signed_char_digits __glibcpp_s8_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_char_min __glibcpp_u8_min
+#define __glibcpp_unsigned_char_max __glibcpp_u8_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_char_bits == 16
+#define __glibcpp_signed_char_min __glibcpp_s16_min
+#define __glibcpp_signed_char_max __glibcpp_s16_max
+#define __glibcpp_signed_char_digits __glibcpp_s16_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_char_min __glibcpp_u16_min
+#define __glibcpp_unsigned_char_max __glibcpp_u16_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_char_bits == 32
+#define __glibcpp_signed_char_min (signed char)__glibcpp_s32_min
+#define __glibcpp_signed_char_max (signed char)__glibcpp_s32_max
+#define __glibcpp_signed_char_digits __glibcpp_s32_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u32_min
+#define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u32_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_char_bits == 64
+#define __glibcpp_signed_char_min (signed char)__glibcpp_s64_min
+#define __glibcpp_signed_char_max (signed char)__glibcpp_s64_max
+#define __glibcpp_signed_char_digits __glibcpp_s64_digits
+#define __glibcpp_signed_char_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u64_min
+#define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u64_max
+#define __glibcpp_unsigned_char_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_char_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+#if __glibcpp_plain_char_is_signed
+#define __glibcpp_char_min (char)__glibcpp_signed_char_min
+#define __glibcpp_char_max (char)__glibcpp_signed_char_max
+#define __glibcpp_char_digits __glibcpp_signed_char_digits
+#define __glibcpp_char_digits10 __glibcpp_signed_char_digits
+#else
+#define __glibcpp_char_min (char)__glibcpp_unsigned_char_min
+#define __glibcpp_char_max (char)__glibcpp_unsigned_char_max
+#define __glibcpp_char_digits __glibcpp_unsigned_char_digits
+#define __glibcpp_char_digits10 __glibcpp_unsigned_char_digits
+#endif
+
+// short
+
+#define __glibcpp_signed_short_traps true
+#define __glibcpp_unsigned_short_traps true
+#ifndef __glibcpp_signed_short_is_modulo
+#define __glibcpp_signed_short_is_modulo true
+#endif
+#if __glibcpp_short_bits == 8
+#define __glibcpp_signed_short_min __glibcpp_s8_min
+#define __glibcpp_signed_short_max __glibcpp_s8_max
+#define __glibcpp_signed_short_digits __glibcpp_s8_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_short_min __glibcpp_u8_min
+#define __glibcpp_unsigned_short_max __glibcpp_u8_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_short_bits == 16
+#define __glibcpp_signed_short_min __glibcpp_s16_min
+#define __glibcpp_signed_short_max __glibcpp_s16_max
+#define __glibcpp_signed_short_digits __glibcpp_s16_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_short_min __glibcpp_u16_min
+#define __glibcpp_unsigned_short_max __glibcpp_u16_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_short_bits == 32
+#define __glibcpp_signed_short_min (short)__glibcpp_s32_min
+#define __glibcpp_signed_short_max (short)__glibcpp_s32_max
+#define __glibcpp_signed_short_digits __glibcpp_s32_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u32_min
+#define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u32_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_short_bits == 64
+#define __glibcpp_signed_short_min (short)__glibcpp_s64_min
+#define __glibcpp_signed_short_max (short)__glibcpp_s64_max
+#define __glibcpp_signed_short_digits __glibcpp_s64_digits
+#define __glibcpp_signed_short_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u64_min
+#define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u64_max
+#define __glibcpp_unsigned_short_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_short_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// int
+
+#define __glibcpp_signed_int_traps true
+#define __glibcpp_unsigned_int_traps true
+#ifndef __glibcpp_signed_int_is_modulo
+#define __glibcpp_signed_int_is_modulo true
+#endif
+#if __glibcpp_int_bits == 8
+#define __glibcpp_signed_int_min __glibcpp_s8_min
+#define __glibcpp_signed_int_max __glibcpp_s8_max
+#define __glibcpp_signed_int_digits __glibcpp_s8_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_int_min __glibcpp_u8_min
+#define __glibcpp_unsigned_int_max __glibcpp_u8_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_int_bits == 16
+#define __glibcpp_signed_int_min __glibcpp_s16_min
+#define __glibcpp_signed_int_max __glibcpp_s16_max
+#define __glibcpp_signed_int_digits __glibcpp_s16_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_int_min __glibcpp_u16_min
+#define __glibcpp_unsigned_int_max __glibcpp_u16_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_int_bits == 32
+#define __glibcpp_signed_int_min (int)__glibcpp_s32_min
+#define __glibcpp_signed_int_max (int)__glibcpp_s32_max
+#define __glibcpp_signed_int_digits __glibcpp_s32_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u32_min
+#define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u32_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_int_bits == 64
+#define __glibcpp_signed_int_min (int)__glibcpp_s64_min
+#define __glibcpp_signed_int_max (int)__glibcpp_s64_max
+#define __glibcpp_signed_int_digits __glibcpp_s64_digits
+#define __glibcpp_signed_int_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u64_min
+#define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u64_max
+#define __glibcpp_unsigned_int_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_int_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// long
+
+#define __glibcpp_signed_long_traps true
+#define __glibcpp_unsigned_long_traps true
+#ifndef __glibcpp_signed_long_is_modulo
+#define __glibcpp_signed_long_is_modulo true
+#endif
+#if __glibcpp_long_bits == 8
+#define __glibcpp_signed_long_min __glibcpp_s8_min
+#define __glibcpp_signed_long_max __glibcpp_s8_max
+#define __glibcpp_signed_long_digits __glibcpp_s8_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_long_min __glibcpp_u8_min
+#define __glibcpp_unsigned_long_max __glibcpp_u8_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_long_bits == 16
+#define __glibcpp_signed_long_min __glibcpp_s16_min
+#define __glibcpp_signed_long_max __glibcpp_s16_max
+#define __glibcpp_signed_long_digits __glibcpp_s16_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_long_min __glibcpp_u16_min
+#define __glibcpp_unsigned_long_max __glibcpp_u16_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_long_bits == 32
+#define __glibcpp_signed_long_min __glibcpp_s32_min
+#define __glibcpp_signed_long_max __glibcpp_s32_max
+#define __glibcpp_signed_long_digits __glibcpp_s32_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_long_min __glibcpp_u32_min
+#define __glibcpp_unsigned_long_max __glibcpp_u32_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_long_bits == 64
+#define __glibcpp_signed_long_min (long)__glibcpp_s64_min
+#define __glibcpp_signed_long_max (long)__glibcpp_s64_max
+#define __glibcpp_signed_long_digits __glibcpp_s64_digits
+#define __glibcpp_signed_long_digits10 __glibcpp_s64_digits10
+#define __glibcpp_unsigned_long_min (unsigned long)__glibcpp_u64_min
+#define __glibcpp_unsigned_long_max (unsigned long)__glibcpp_u64_max
+#define __glibcpp_unsigned_long_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_long_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// long long
+
+#define __glibcpp_signed_long_long_traps true
+#define __glibcpp_signed_long_long_traps true
+#ifndef __glibcpp_signed_long_long_is_modulo
+#define __glibcpp_signed_long_long_is_modulo true
+#endif
+#if __glibcpp_long_long_bits == 8
+#define __glibcpp_signed_long_long_min __glibcpp_s8_min
+#define __glibcpp_signed_long_long_max __glibcpp_s8_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s8_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s8_digits10
+#define __glibcpp_unsigned_long_long_min __glibcpp_u8_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u8_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u8_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_long_long_bits == 16
+#define __glibcpp_signed_long_long_min __glibcpp_s16_min
+#define __glibcpp_signed_long_long_max __glibcpp_s16_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s16_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s16_digits10
+#define __glibcpp_unsigned_long_long_min __glibcpp_u16_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u16_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u16_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_long_long_bits == 32
+#define __glibcpp_signed_long_long_min __glibcpp_s32_min
+#define __glibcpp_signed_long_long_max __glibcpp_s32_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s32_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s32_digits10
+#define __glibcpp_unsigned_long_long_min __glibcpp_u32_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u32_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u32_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_long_long_bits == 64
+#define __glibcpp_signed_long_long_min __glibcpp_s64_min
+#define __glibcpp_signed_long_long_max __glibcpp_s64_max
+#define __glibcpp_signed_long_long_digits __glibcpp_s64_digits
+#define __glibcpp_signed_long_long_digits10 __glibcpp_s64_digits10
+#define __glibcpp_signed_long_long_traps true
+#define __glibcpp_unsigned_long_long_min __glibcpp_u64_min
+#define __glibcpp_unsigned_long_long_max __glibcpp_u64_max
+#define __glibcpp_unsigned_long_long_digits __glibcpp_u64_digits
+#define __glibcpp_unsigned_long_long_digits10 __glibcpp_u64_digits10
+#define __glibcpp_unsigned_long_long_traps true
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// wchar_t
+
+#define __glibcpp_wchar_t_traps true
+#ifndef __glibcpp_wchar_t_is_modulo
+#define __glibcpp_wchar_t_is_modulo true
+#endif
+#if __glibcpp_wchar_t_is_signed
+#if __glibcpp_wchar_t_bits == 8
+#define __glibcpp_wchar_t_min __glibcpp_s8_min
+#define __glibcpp_wchar_t_max __glibcpp_s8_max
+#define __glibcpp_wchar_t_digits __glibcpp_s8_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s8_digits10
+#elif __glibcpp_wchar_t_bits == 16
+#define __glibcpp_wchar_t_min __glibcpp_s16_min
+#define __glibcpp_wchar_t_max __glibcpp_s16_max
+#define __glibcpp_wchar_t_digits __glibcpp_s16_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s16_digits10
+#elif __glibcpp_wchar_t_bits == 32
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s32_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s32_max
+#define __glibcpp_wchar_t_digits __glibcpp_s32_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s32_digits10
+#elif __glibcpp_wchar_t_bits == 64
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s64_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s64_max
+#define __glibcpp_wchar_t_digits __glibcpp_s64_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_s64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+#else
+#if __glibcpp_wchar_t_bits == 8
+#define __glibcpp_wchar_t_min __glibcpp_u8_min
+#define __glibcpp_wchar_t_max __glibcpp_u8_max
+#define __glibcpp_wchar_t_digits __glibcpp_u8_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u8_digits10
+#elif __glibcpp_wchar_t_bits == 16
+#define __glibcpp_wchar_t_min __glibcpp_u16_min
+#define __glibcpp_wchar_t_max __glibcpp_u16_max
+#define __glibcpp_wchar_t_digits __glibcpp_u16_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u16_digits10
+#elif __glibcpp_wchar_t_bits == 32
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u32_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u32_max
+#define __glibcpp_wchar_t_digits __glibcpp_u32_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u32_digits10
+#elif __glibcpp_wchar_t_bits == 64
+#define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u64_min
+#define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u64_max
+#define __glibcpp_wchar_t_digits __glibcpp_u64_digits
+#define __glibcpp_wchar_t_digits10 __glibcpp_u64_digits10
+#else
+// You must define these macros in the configuration file.
+#endif
+#endif
+
+// float
+//
+
+#if __glibcpp_float_bits == 32
+#define __glibcpp_float_min __glibcpp_f32_min
+#define __glibcpp_float_max __glibcpp_f32_max
+#define __glibcpp_float_digits __glibcpp_f32_digits
+#define __glibcpp_float_digits10 __glibcpp_f32_digits10
+#define __glibcpp_float_radix __glibcpp_f32_radix
+#define __glibcpp_float_epsilon __glibcpp_f32_epsilon
+#define __glibcpp_float_round_error __glibcpp_f32_round_error
+#define __glibcpp_float_min_exponent __glibcpp_f32_min_exponent
+#define __glibcpp_float_min_exponent10 __glibcpp_f32_min_exponent10
+#define __glibcpp_float_max_exponent __glibcpp_f32_max_exponent
+#define __glibcpp_float_max_exponent10 __glibcpp_f32_max_exponent10
+#elif __glibcpp_float_bits == 64
+#define __glibcpp_float_min __glibcpp_f64_min
+#define __glibcpp_float_max __glibcpp_f64_max
+#define __glibcpp_float_digits __glibcpp_f64_digits
+#define __glibcpp_float_digits10 __glibcpp_f64_digits10
+#define __glibcpp_float_radix __glibcpp_f64_radix
+#define __glibcpp_float_epsilon __glibcpp_f64_epsilon
+#define __glibcpp_float_round_error __glibcpp_f64_round_error
+#define __glibcpp_float_min_exponent __glibcpp_f64_min_exponent
+#define __glibcpp_float_min_exponent10 __glibcpp_f64_min_exponent10
+#define __glibcpp_float_max_exponent __glibcpp_f64_max_exponent
+#define __glibcpp_float_max_exponent10 __glibcpp_f64_max_exponent10
+#elif __glibcpp_float_bits == 80
+#define __glibcpp_float_min __glibcpp_f80_min
+#define __glibcpp_float_max __glibcpp_f80_max
+#define __glibcpp_float_digits __glibcpp_f80_digits
+#define __glibcpp_float_digits10 __glibcpp_f80_digits10
+#define __glibcpp_float_radix __glibcpp_f80_radix
+#define __glibcpp_float_epsilon __glibcpp_f80_epsilon
+#define __glibcpp_float_round_error __glibcpp_f80_round_error
+#define __glibcpp_float_min_exponent __glibcpp_f80_min_exponent
+#define __glibcpp_float_min_exponent10 __glibcpp_f80_min_exponent10
+#define __glibcpp_float_max_exponent __glibcpp_f80_max_exponent
+#define __glibcpp_float_max_exponent10 __glibcpp_f80_max_exponent10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// FIXME: These are just stubs and inkorrect
+
+#ifndef __glibcpp_float_has_infinity
+#define __glibcpp_float_has_infinity false
+#endif
+
+#ifndef __glibcpp_float_has_quiet_NaN
+#define __glibcpp_float_has_quiet_NaN false
+#endif
+
+#ifndef __glibcpp_float_has_signaling_NaN
+#define __glibcpp_float_has_signaling_NaN false
+#endif
+
+#ifndef __glibcpp_float_has_denorm
+#define __glibcpp_float_has_denorm denorm_absent
+#endif
+
+#ifndef __glibcpp_float_has_denorm_loss
+#define __glibcpp_float_has_denorm_loss false
+#endif
+
+#ifndef __glibcpp_float_infinity
+#define __glibcpp_float_infinity 0.0F
+#endif
+
+#ifndef __glibcpp_float_quiet_NaN
+#define __glibcpp_float_quiet_NaN 0.0F
+#endif
+
+#ifndef __glibcpp_float_signaling_NaN
+#define __glibcpp_float_signaling_NaN 0.0F
+#endif
+
+#ifndef __glibcpp_float_denorm_min
+#define __glibcpp_float_denorm_min 0.0F
+#endif
+
+#ifndef __glibcpp_float_is_iec559
+#define __glibcpp_float_is_iec559 false
+#endif
+
+#ifndef __glibcpp_float_is_bounded
+#define __glibcpp_float_is_bounded true
+#endif
+
+#ifndef __glibcpp_float_is_modulo
+#define __glibcpp_float_is_modulo false
+#endif
+
+#ifndef __glibcpp_float_traps
+#define __glibcpp_float_traps false
+#endif
+
+#ifndef __glibcpp_float_tinyness_before
+#define __glibcpp_float_tinyness_before false
+#endif
+
+#ifndef __glibcpp_float_round_style
+#define __glibcpp_float_round_style round_toward_zero
+#endif
+
+// double
+
+#if __glibcpp_double_bits == 32
+#define __glibcpp_double_min __glibcpp_f32_min
+#define __glibcpp_double_max __glibcpp_f32_max
+#define __glibcpp_double_digits __glibcpp_f32_digits
+#define __glibcpp_double_digits10 __glibcpp_f32_digits10
+#define __glibcpp_double_radix __glibcpp_f32_radix
+#define __glibcpp_double_epsilon __glibcpp_f32_epsilon
+#define __glibcpp_double_round_error __glibcpp_f32_round_error
+#define __glibcpp_double_min_exponent __glibcpp_f32_min_exponent
+#define __glibcpp_double_min_exponent10 __glibcpp_f32_min_exponent10
+#define __glibcpp_double_max_exponent __glibcpp_f32_max_exponent
+#define __glibcpp_double_max_exponent10 __glibcpp_f32_max_exponent10
+#elif __glibcpp_double_bits == 64
+#define __glibcpp_double_min __glibcpp_f64_min
+#define __glibcpp_double_max __glibcpp_f64_max
+#define __glibcpp_double_digits __glibcpp_f64_digits
+#define __glibcpp_double_digits10 __glibcpp_f64_digits10
+#define __glibcpp_double_radix __glibcpp_f64_radix
+#define __glibcpp_double_epsilon __glibcpp_f64_epsilon
+#define __glibcpp_double_round_error __glibcpp_f64_round_error
+#define __glibcpp_double_min_exponent __glibcpp_f64_min_exponent
+#define __glibcpp_double_min_exponent10 __glibcpp_f64_min_exponent10
+#define __glibcpp_double_max_exponent __glibcpp_f64_max_exponent
+#define __glibcpp_double_max_exponent10 __glibcpp_f64_max_exponent10
+#elif __glibcpp_double_bits == 80
+#define __glibcpp_double_min __glibcpp_f80_min
+#define __glibcpp_double_max __glibcpp_f80_max
+#define __glibcpp_double_digits __glibcpp_f80_digits
+#define __glibcpp_double_digits10 __glibcpp_f80_digits10
+#define __glibcpp_double_radix __glibcpp_f80_radix
+#define __glibcpp_double_epsilon __glibcpp_f80_epsilon
+#define __glibcpp_double_round_error __glibcpp_f80_round_error
+#define __glibcpp_double_min_exponent __glibcpp_f80_min_exponent
+#define __glibcpp_double_min_exponent10 __glibcpp_f80_min_exponent10
+#define __glibcpp_double_max_exponent __glibcpp_f80_max_exponent
+#define __glibcpp_double_max_exponent10 __glibcpp_f80_max_exponent10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// FIXME: These are just stubs and inkorrect
+
+#ifndef __glibcpp_double_has_infinity
+#define __glibcpp_double_has_infinity false
+#endif
+
+#ifndef __glibcpp_double_has_quiet_NaN
+#define __glibcpp_double_has_quiet_NaN false
+#endif
+
+#ifndef __glibcpp_double_has_signaling_NaN
+#define __glibcpp_double_has_signaling_NaN false
+#endif
+
+#ifndef __glibcpp_double_has_denorm
+#define __glibcpp_double_has_denorm denorm_absent
+#endif
+
+#ifndef __glibcpp_double_has_denorm_loss
+#define __glibcpp_double_has_denorm_loss false
+#endif
+
+#ifndef __glibcpp_double_infinity
+#define __glibcpp_double_infinity 0.0
+#endif
+
+#ifndef __glibcpp_double_quiet_NaN
+#define __glibcpp_double_quiet_NaN 0.0
+#endif
+
+#ifndef __glibcpp_double_signaling_NaN
+#define __glibcpp_double_signaling_NaN 0.0
+#endif
+
+#ifndef __glibcpp_double_denorm_min
+#define __glibcpp_double_denorm_min 0.0
+#endif
+
+#ifndef __glibcpp_double_is_iec559
+#define __glibcpp_double_is_iec559 false
+#endif
+
+#ifndef __glibcpp_double_is_bounded
+#define __glibcpp_double_is_bounded true
+#endif
+
+#ifndef __glibcpp_double_is_modulo
+#define __glibcpp_double_is_modulo false
+#endif
+
+#ifndef __glibcpp_double_traps
+#define __glibcpp_double_traps false
+#endif
+
+#ifndef __glibcpp_double_tinyness_before
+#define __glibcpp_double_tinyness_before false
+#endif
+
+#ifndef __glibcpp_double_round_style
+#define __glibcpp_double_round_style round_toward_zero
+#endif
+
+// long double
+
+#if __glibcpp_long_double_bits == 32
+#define __glibcpp_long_double_min __glibcpp_f32_min
+#define __glibcpp_long_double_max __glibcpp_f32_max
+#define __glibcpp_long_double_digits __glibcpp_f32_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f32_digits10
+#define __glibcpp_long_double_radix __glibcpp_f32_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f32_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f32_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f32_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f32_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f32_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f32_max_exponent10
+#elif __glibcpp_long_double_bits == 64
+#define __glibcpp_long_double_min __glibcpp_f64_min
+#define __glibcpp_long_double_max __glibcpp_f64_max
+#define __glibcpp_long_double_digits __glibcpp_f64_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f64_digits10
+#define __glibcpp_long_double_radix __glibcpp_f64_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f64_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f64_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f64_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f64_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f64_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f64_max_exponent10
+#elif __glibcpp_long_double_bits == 80
+#define __glibcpp_long_double_min __glibcpp_f80_min
+#define __glibcpp_long_double_max __glibcpp_f80_max
+#define __glibcpp_long_double_digits __glibcpp_f80_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f80_digits10
+#define __glibcpp_long_double_radix __glibcpp_f80_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f80_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f80_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f80_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f80_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f80_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f80_max_exponent10
+#elif __glibcpp_long_double_bits == 96
+#define __glibcpp_long_double_min __glibcpp_f96_min
+#define __glibcpp_long_double_max __glibcpp_f96_max
+#define __glibcpp_long_double_digits __glibcpp_f96_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f96_digits10
+#define __glibcpp_long_double_radix __glibcpp_f96_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f96_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f96_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f96_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f96_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f96_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f96_max_exponent10
+#elif __glibcpp_long_double_bits == 128
+#define __glibcpp_long_double_min __glibcpp_f128_min
+#define __glibcpp_long_double_max __glibcpp_f128_max
+#define __glibcpp_long_double_digits __glibcpp_f128_digits
+#define __glibcpp_long_double_digits10 __glibcpp_f128_digits10
+#define __glibcpp_long_double_radix __glibcpp_f128_radix
+#define __glibcpp_long_double_epsilon __glibcpp_f128_epsilon
+#define __glibcpp_long_double_round_error __glibcpp_f128_round_error
+#define __glibcpp_long_double_min_exponent __glibcpp_f128_min_exponent
+#define __glibcpp_long_double_min_exponent10 __glibcpp_f128_min_exponent10
+#define __glibcpp_long_double_max_exponent __glibcpp_f128_max_exponent
+#define __glibcpp_long_double_max_exponent10 __glibcpp_f128_max_exponent10
+#else
+// You must define these macros in the configuration file.
+#endif
+
+// FIXME: These are just stubs and inkorrect
+
+#ifndef __glibcpp_long_double_has_infinity
+#define __glibcpp_long_double_has_infinity false
+#endif
+
+#ifndef __glibcpp_long_double_has_quiet_NaN
+#define __glibcpp_long_double_has_quiet_NaN false
+#endif
+
+#ifndef __glibcpp_long_double_has_signaling_NaN
+#define __glibcpp_long_double_has_signaling_NaN false
+#endif
+
+#ifndef __glibcpp_long_double_has_denorm
+#define __glibcpp_long_double_has_denorm denorm_absent
+#endif
+
+#ifndef __glibcpp_long_double_has_denorm_loss
+#define __glibcpp_long_double_has_denorm_loss false
+#endif
+
+#ifndef __glibcpp_long_double_infinity
+#define __glibcpp_long_double_infinity 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_quiet_NaN
+#define __glibcpp_long_double_quiet_NaN 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_signaling_NaN
+#define __glibcpp_long_double_signaling_NaN 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_denorm_min
+#define __glibcpp_long_double_denorm_min 0.0L
+#endif
+
+#ifndef __glibcpp_long_double_is_iec559
+#define __glibcpp_long_double_is_iec559 false
+#endif
+
+#ifndef __glibcpp_long_double_is_bounded
+#define __glibcpp_long_double_is_bounded true
+#endif
+
+#ifndef __glibcpp_long_double_is_modulo
+#define __glibcpp_long_double_is_modulo false
+#endif
+
+#ifndef __glibcpp_long_double_traps
+#define __glibcpp_long_double_traps false
+#endif
+
+#ifndef __glibcpp_long_double_tinyness_before
+#define __glibcpp_long_double_tinyness_before false
+#endif
+
+#ifndef __glibcpp_long_double_round_style
+#define __glibcpp_long_double_round_style round_toward_zero
+#endif
+
+
+namespace std
+{
+  enum float_round_style 
+  {
+    round_indeterminate       = -1,
+    round_toward_zero         = 0,
+    round_to_nearest          = 1,
+    round_toward_infinity     = 2,
+    round_toward_neg_infinity = 3
+  };
+
+  enum float_denorm_style 
+  {
+    denorm_indeterminate = -1,
+    denorm_absent        = 0,
+    denorm_present       = 1
+  };
+
+  //
+  // The primary class traits
+  //
+  struct __numeric_limits_base
+  {
+    static const bool is_specialized = false;
+
+    static const int digits = 0;
+    static const int digits10 = 0;
+    static const bool is_signed = false;
+    static const bool is_integer = false;
+    static const bool is_exact = false;
+    static const int radix = 0;
+
+    static const int min_exponent = 0;
+    static const int min_exponent10 = 0;
+    static const int max_exponent = 0;
+    static const int max_exponent10 = 0;
+    
+    static const bool has_infinity = false;
+    static const bool has_quiet_NaN = false;
+    static const bool has_signaling_NaN = false;
+    static const float_denorm_style has_denorm = denorm_absent;
+    static const bool has_denorm_loss = false;
+
+    static const bool is_iec559 = false;
+    static const bool is_bounded = false;
+    static const bool is_modulo = false;
+
+    static const bool traps = false;
+    static const bool tinyness_before = false;
+    static const float_round_style round_style = round_toward_zero;
+  };
+
+  template 
+    struct numeric_limits : public __numeric_limits_base 
+    {
+      static _Tp min() throw() { return static_cast<_Tp>(0); }
+      static _Tp max() throw() { return static_cast<_Tp>(0); }
+      static _Tp epsilon() throw() { return static_cast<_Tp>(0); }
+      static _Tp round_error() throw() { return static_cast<_Tp>(0); }
+      static _Tp infinity() throw()  { return static_cast<_Tp>(0); }
+      static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); }
+      static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); }
+      static _Tp denorm_min() throw() { return static_cast<_Tp>(0); }
+    };
+
+  // Now there follow 15 explicit specializations.  Yes, 15.  Make sure
+  // you get the count right.  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static bool min() throw()
+      { return false; }
+
+      static bool max() throw()
+      { return true; }
+
+      static const int digits = __glibcpp_bool_digits;
+      static const int digits10 = 0;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static bool epsilon() throw()
+      { return false; }
+      static bool round_error() throw()
+      { return false; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static bool infinity() throw()
+      { return false; }
+      static bool quiet_NaN() throw()
+      { return false; }
+      static bool signaling_NaN() throw()
+      { return false; }
+      static bool denorm_min() throw()
+      { return false; }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = false;
+
+      // It is not clear what it means for a boolean type to trap.
+      // This is a DR on the LWG issue list.  Here, I use integer
+      // promotion semantics.
+      static const bool traps = __glibcpp_signed_int_traps
+               || __glibcpp_signed_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_bool_digits  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static char min() throw()
+      { return __glibcpp_char_min; }
+      static char max() throw()
+      { return __glibcpp_char_max; }
+
+      static const int digits = __glibcpp_char_digits;
+      static const int digits10 = __glibcpp_char_digits10;
+      static const bool is_signed = __glibcpp_plain_char_is_signed;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static char epsilon() throw()
+      { return char(); }
+      static char round_error() throw()
+      { return char(); }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static char infinity() throw()
+      { return char(); }
+      static char quiet_NaN() throw()
+      { return char(); }
+      static char signaling_NaN() throw()
+      { return char(); }
+      static char denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_char_is_modulo;
+
+      static const bool traps = __glibcpp_char_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_char_min
+#undef __glibcpp_char_max  
+#undef __glibcpp_char_digits
+#undef __glibcpp_char_digits10
+#undef __glibcpp_char_is_signed
+#undef __glibcpp_char_is_modulo
+#undef __glibcpp_char_traps
+
+
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static signed char min() throw()
+      { return __glibcpp_signed_char_min; }
+      static signed char max() throw()
+      { return __glibcpp_signed_char_max; }
+
+      static const int digits = __glibcpp_signed_char_digits;
+      static const int digits10 = __glibcpp_signed_char_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static signed char epsilon() throw()
+      { return 0; }
+      static signed char round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static signed char infinity() throw()
+      { return static_cast(0); }
+      static signed char quiet_NaN() throw()
+      { return static_cast(0); }
+      static signed char signaling_NaN() throw()
+      { return static_cast(0); }
+      static signed char denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_char_is_modulo;
+
+      static const bool traps = __glibcpp_signed_char_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_char_min
+#undef __glibcpp_signed_char_max
+#undef __glibcpp_signed_char_digits
+#undef __glibcpp_signed_char_digits10
+#undef __glibcpp_signed_char_is_modulo  
+#undef __glibcpp_signed_char_traps  
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static unsigned char min() throw()
+      { return 0; }
+      static unsigned char max() throw()
+      { return __glibcpp_unsigned_char_max; }
+
+      static const int digits = __glibcpp_unsigned_char_digits;
+      static const int digits10 = __glibcpp_unsigned_char_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned char epsilon() throw()
+      { return 0; }
+      static unsigned char round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned char infinity() throw()
+      { return static_cast(0); }
+      static unsigned char quiet_NaN() throw()
+      { return static_cast(0); }
+      static unsigned char signaling_NaN() throw()
+      { return static_cast(0); }
+      static unsigned char denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_char_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_char_max
+#undef __glibcpp_unsigned_char_digits
+#undef __glibcpp_unsigned_char_digits10
+#undef __glibcpp_unsigned_char_traps  
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static wchar_t min() throw()
+      { return __glibcpp_wchar_t_min; }
+      static wchar_t max() throw()
+      { return __glibcpp_wchar_t_max; }
+
+      static const int digits = __glibcpp_wchar_t_digits;
+      static const int digits10 = __glibcpp_wchar_t_digits10;
+      static const bool is_signed = __glibcpp_wchar_t_is_signed;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static wchar_t epsilon() throw()
+      { return 0; }
+      static wchar_t round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static wchar_t infinity() throw()
+      { return wchar_t(); }
+      static wchar_t quiet_NaN() throw()
+      { return wchar_t(); }
+      static wchar_t signaling_NaN() throw()
+      { return wchar_t(); }
+      static wchar_t denorm_min() throw()
+      { return wchar_t(); }
+
+      static const bool is_iec559 = false;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_wchar_t_is_modulo;
+
+      static const bool traps = __glibcpp_wchar_t_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_wchar_t_min
+#undef __glibcpp_wchar_t_max
+#undef __glibcpp_wchar_t_digits
+#undef __glibcpp_wchar_t_digits10  
+#undef __glibcpp_wchar_t_is_signed
+#undef __glibcpp_wchar_t_is_modulo
+#undef __glibcpp_wchar_t_traps  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static short min() throw()
+      { return __glibcpp_signed_short_min; }
+      static short max() throw()
+      { return __glibcpp_signed_short_max; }
+
+      static const int digits = __glibcpp_signed_short_digits;
+      static const int digits10 = __glibcpp_signed_short_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static short epsilon() throw()
+      { return 0; }
+      static short round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static short infinity() throw()
+      { return short(); }
+      static short quiet_NaN() throw()
+      { return short(); }
+      static short signaling_NaN() throw()
+      { return short(); }
+      static short denorm_min() throw()
+      { return short(); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_short_is_modulo;
+
+      static const bool traps = __glibcpp_signed_short_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_short_min
+#undef __glibcpp_signed_short_max
+#undef __glibcpp_signed_short_digits
+#undef __glibcpp_signed_short_digits10
+#undef __glibcpp_signed_short_is_modulo
+#undef __glibcpp_signed_short_traps  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static unsigned short min() throw()
+      { return 0; }
+      static unsigned short max() throw()
+      { return __glibcpp_unsigned_short_max; }
+
+      static const int digits = __glibcpp_unsigned_short_digits;
+      static const int digits10 = __glibcpp_unsigned_short_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned short epsilon() throw()
+      { return 0; }
+      static unsigned short round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned short infinity() throw()
+      { return static_cast(0); }
+      static unsigned short quiet_NaN() throw()
+      { return static_cast(0); }
+      static unsigned short signaling_NaN() throw()
+      { return static_cast(0); }
+      static unsigned short denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_short_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_short_max
+#undef __glibcpp_unsigned_short_digits
+#undef __glibcpp_unsigned_short_digits10
+#undef __glibcpp_unsigned_short_traps  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static int min() throw()
+      { return __glibcpp_signed_int_min; }
+      static int max() throw()
+      { return __glibcpp_signed_int_max; }
+
+      static const int digits = __glibcpp_signed_int_digits;
+      static const int digits10 = __glibcpp_signed_int_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static int epsilon() throw()
+      { return 0; }
+      static int round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static int infinity() throw()
+      { return static_cast(0); }
+      static int quiet_NaN() throw()
+      { return static_cast(0); }
+      static int signaling_NaN() throw()
+      { return static_cast(0); }
+      static int denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_int_is_modulo;
+
+      static const bool traps = __glibcpp_signed_int_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_int_min
+#undef __glibcpp_signed_int_max
+#undef __glibcpp_signed_int_digits
+#undef __glibcpp_signed_int_digits10
+#undef __glibcpp_signed_int_is_modulo
+#undef __glibcpp_signed_int_traps  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static unsigned int min() throw()
+      { return 0; }
+          static unsigned int max() throw()
+      { return __glibcpp_unsigned_int_max; }
+
+      static const int digits = __glibcpp_unsigned_int_digits;
+      static const int digits10 = __glibcpp_unsigned_int_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned int epsilon() throw()
+      { return 0; }
+      static unsigned int round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned int infinity() throw()
+      { return static_cast(0); }
+      static unsigned int quiet_NaN() throw()
+      { return static_cast(0); }
+      static unsigned int signaling_NaN() throw()
+      { return static_cast(0); }
+      static unsigned int denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_int_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_int_max
+#undef __glibcpp_unsigned_int_digits
+#undef __glibcpp_unsigned_int_digits10
+#undef __glibcpp_unsigned_int_traps  
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static long min() throw()
+      { return __glibcpp_signed_long_min; }
+      static long max() throw()
+      { return __glibcpp_signed_long_max; }
+
+      static const int digits = __glibcpp_signed_long_digits;
+      static const int digits10 = __glibcpp_signed_long_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static long epsilon() throw()
+      { return 0; }
+      static long round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static long infinity() throw()
+      { return static_cast(0); }
+      static long quiet_NaN() throw()
+      { return static_cast(0); }
+      static long signaling_NaN() throw()
+      { return static_cast(0); }
+      static long denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_long_is_modulo;
+
+      static const bool traps = __glibcpp_signed_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_long_min
+#undef __glibcpp_signed_long_max
+#undef __glibcpp_signed_long_digits
+#undef __glibcpp_signed_long_digits10
+#undef __glibcpp_signed_long_is_modulo
+#undef __glibcpp_signed_long_traps  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static unsigned long min() throw()
+      { return 0; }
+      static unsigned long max() throw()
+      { return __glibcpp_unsigned_long_max; }
+
+      static const int digits = __glibcpp_unsigned_long_digits;
+      static const int digits10 = __glibcpp_unsigned_long_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned long epsilon() throw()
+      { return 0; }
+      static unsigned long round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned long infinity() throw()
+      { return static_cast(0); }
+      static unsigned long quiet_NaN() throw()
+      { return static_cast(0); }
+      static unsigned long signaling_NaN() throw()
+      { return static_cast(0); }
+      static unsigned long denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = __glibcpp_unsigned_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_long_max
+#undef __glibcpp_unsigned_long_digits
+#undef __glibcpp_unsigned_long_digits10
+#undef __glibcpp_unsigned_long_traps  
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+      
+      static long long min() throw()
+      { return __glibcpp_signed_long_long_min; }
+      static long long max() throw()
+      { return __glibcpp_signed_long_long_max; }
+      
+      static const int digits = __glibcpp_signed_long_long_digits;
+      static const int digits10 = __glibcpp_signed_long_long_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static long long epsilon() throw()
+      { return 0; }
+      static long long round_error() throw()
+      { return 0; }
+      
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+      
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+      
+      static long long infinity() throw()
+      { return static_cast(0); }
+      static long long quiet_NaN() throw()
+      { return static_cast(0); }
+      static long long signaling_NaN() throw()
+      { return static_cast(0); }
+      static long long denorm_min() throw()
+      { return static_cast(0); }
+      
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = __glibcpp_signed_long_long_is_modulo;
+
+      static const bool traps = __glibcpp_signed_long_long_traps;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_signed_long_long_min
+#undef __glibcpp_signed_long_long_max
+#undef __glibcpp_signed_long_long_digits
+#undef __glibcpp_signed_long_long_digits10
+#undef __glibcpp_signed_long_long_is_modulo
+#undef __glibcpp_signed_long_long_traps  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static unsigned long long min() throw()
+      { return 0; }
+      static unsigned long long max() throw()
+      { return __glibcpp_unsigned_long_long_max; }
+
+      static const int digits = __glibcpp_unsigned_long_long_digits;
+      static const int digits10 = __glibcpp_unsigned_long_long_digits10;
+      static const bool is_signed = false;
+      static const bool is_integer = true;
+      static const bool is_exact = true;
+      static const int radix = 2;
+      static unsigned long long epsilon() throw()
+      { return 0; }
+      static unsigned long long round_error() throw()
+      { return 0; }
+
+      static const int min_exponent = 0;
+      static const int min_exponent10 = 0;
+      static const int max_exponent = 0;
+      static const int max_exponent10 = 0;
+
+      static const bool has_infinity = false;
+      static const bool has_quiet_NaN = false;
+      static const bool has_signaling_NaN = false;
+      static const float_denorm_style has_denorm = denorm_absent;
+      static const bool has_denorm_loss = false;
+
+      static unsigned long long infinity() throw()
+      { return static_cast(0); }
+      static unsigned long long quiet_NaN() throw()
+      { return static_cast(0); }
+      static unsigned long long signaling_NaN() throw()
+      { return static_cast(0); }
+      static unsigned long long denorm_min() throw()
+      { return static_cast(0); }
+
+      static const bool is_iec559 = true;
+      static const bool is_bounded = true;
+      static const bool is_modulo = true;
+
+      static const bool traps = true;
+      static const bool tinyness_before = false;
+      static const float_round_style round_style = round_toward_zero;
+    };
+
+#undef __glibcpp_unsigned_long_long_max
+#undef __glibcpp_unsigned_long_long_digits
+#undef __glibcpp_unsigned_long_long_digits10
+#undef __glibcpp_unsigned_long_long_traps  
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static float min() throw()
+      { return __glibcpp_float_min; }
+      static float max() throw()
+      { return __glibcpp_float_max; }
+
+      static const int digits = __glibcpp_float_digits;
+      static const int digits10 = __glibcpp_float_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = __glibcpp_float_radix;
+      static float epsilon() throw()
+      { return __glibcpp_float_epsilon; }
+      static float round_error() throw()
+      { return __glibcpp_float_round_error; }
+
+      static const int min_exponent = __glibcpp_float_min_exponent;
+      static const int min_exponent10 = __glibcpp_float_min_exponent10;
+      static const int max_exponent = __glibcpp_float_max_exponent;
+      static const int max_exponent10 = __glibcpp_float_max_exponent10;
+
+      static const bool has_infinity = __glibcpp_float_has_infinity;
+      static const bool has_quiet_NaN = __glibcpp_float_has_quiet_NaN;
+      static const bool has_signaling_NaN = __glibcpp_float_has_signaling_NaN;
+      static const float_denorm_style has_denorm = __glibcpp_float_has_denorm;
+      static const bool has_denorm_loss = __glibcpp_float_has_denorm_loss;
+
+      static float infinity() throw()
+      { return __glibcpp_float_infinity; }
+      static float quiet_NaN() throw()
+      { return __glibcpp_float_quiet_NaN; }
+      static float signaling_NaN() throw()
+      { return __glibcpp_float_signaling_NaN; }
+      static float denorm_min() throw()
+      { return __glibcpp_float_denorm_min; }
+
+      static const bool is_iec559 = __glibcpp_float_is_iec559;
+      static const bool is_bounded = __glibcpp_float_is_bounded;
+      static const bool is_modulo = __glibcpp_float_is_modulo;
+
+      static const bool traps = __glibcpp_float_traps;
+      static const bool tinyness_before = __glibcpp_float_tinyness_before;
+      static const float_round_style round_style = __glibcpp_float_round_style;
+    };
+
+#undef __glibcpp_float_min
+#undef __glibcpp_float_max
+#undef __glibcpp_float_digits
+#undef __glibcpp_float_digits10
+#undef __glibcpp_float_radix
+#undef __glibcpp_float_round_error
+#undef __glibcpp_float_min_exponent
+#undef __glibcpp_float_min_exponent10
+#undef __glibcpp_float_max_exponent
+#undef __glibcpp_float_max_exponent10
+#undef __glibcpp_float_has_infinity
+#undef __glibcpp_float_has_quiet_NaN
+#undef __glibcpp_float_has_signaling_NaN
+#undef __glibcpp_float_has_denorm
+#undef __glibcpp_float_has_denorm_loss
+#undef __glibcpp_float_infinity
+#undef __glibcpp_float_quiet_NaN
+#undef __glibcpp_float_signaling_NaN
+#undef __glibcpp_float_denorm_min
+#undef __glibcpp_float_is_iec559
+#undef __glibcpp_float_is_bounded
+#undef __glibcpp_float_is_modulo
+#undef __glibcpp_float_traps
+#undef __glibcpp_float_tinyness_before
+#undef __glibcpp_float_round_style  
+
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static double min() throw()
+      { return __glibcpp_double_min; }
+      static double max() throw()
+      { return __glibcpp_double_max; }
+
+      static const int digits = __glibcpp_double_digits;
+      static const int digits10 = __glibcpp_double_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = __glibcpp_double_radix;
+      static double epsilon() throw()
+      { return __glibcpp_double_epsilon; }
+      static double round_error() throw()
+      { return __glibcpp_double_round_error; }
+
+      static const int min_exponent = __glibcpp_double_min_exponent;
+      static const int min_exponent10 = __glibcpp_double_min_exponent10;
+      static const int max_exponent = __glibcpp_double_max_exponent;
+      static const int max_exponent10 = __glibcpp_double_max_exponent10;
+
+      static const bool has_infinity = __glibcpp_double_has_infinity;
+      static const bool has_quiet_NaN = __glibcpp_double_has_quiet_NaN;
+      static const bool has_signaling_NaN = __glibcpp_double_has_signaling_NaN;
+      static const float_denorm_style has_denorm =
+              __glibcpp_double_has_denorm;
+      static const bool has_denorm_loss = __glibcpp_double_has_denorm_loss;
+
+      static double infinity() throw()
+      { return __glibcpp_double_infinity; }
+      static double quiet_NaN() throw()
+      { return __glibcpp_double_quiet_NaN; }
+      static double signaling_NaN() throw()
+      { return __glibcpp_double_signaling_NaN; }
+      static double denorm_min() throw()
+      { return __glibcpp_double_denorm_min; }
+
+      static const bool is_iec559 = __glibcpp_double_is_iec559;
+      static const bool is_bounded = __glibcpp_double_is_bounded;
+      static const bool is_modulo = __glibcpp_double_is_modulo;
+
+      static const bool traps = __glibcpp_double_traps;
+      static const bool tinyness_before = __glibcpp_double_tinyness_before;
+      static const float_round_style round_style =
+              __glibcpp_double_round_style;
+    };
+
+#undef __glibcpp_double_min
+#undef __glibcpp_double_max
+#undef __glibcpp_double_digits
+#undef __glibcpp_double_digits10
+#undef __glibcpp_double_radix
+#undef __glibcpp_double_round_error
+#undef __glibcpp_double_min_exponent
+#undef __glibcpp_double_min_exponent10
+#undef __glibcpp_double_max_exponent
+#undef __glibcpp_double_max_exponent10
+#undef __glibcpp_double_has_infinity
+#undef __glibcpp_double_has_quiet_NaN
+#undef __glibcpp_double_has_signaling_NaN
+#undef __glibcpp_double_has_denorm
+#undef __glibcpp_double_has_denorm_loss
+#undef __glibcpp_double_infinity
+#undef __glibcpp_double_quiet_NaN
+#undef __glibcpp_double_signaling_NaN
+#undef __glibcpp_double_denorm_min
+#undef __glibcpp_double_is_iec559
+#undef __glibcpp_double_is_bounded
+#undef __glibcpp_double_is_modulo
+#undef __glibcpp_double_traps
+#undef __glibcpp_double_tinyness_before
+#undef __glibcpp_double_round_style  
+  
+  
+  template<>
+    struct numeric_limits
+    {
+      static const bool is_specialized = true;
+
+      static long double min() throw()
+      { return __glibcpp_long_double_min; }
+      static long double max() throw()
+      { return __glibcpp_long_double_max; }
+
+      static const int digits = __glibcpp_long_double_digits;
+      static const int digits10 = __glibcpp_long_double_digits10;
+      static const bool is_signed = true;
+      static const bool is_integer = false;
+      static const bool is_exact = false;
+      static const int radix = __glibcpp_long_double_radix;
+      static long double epsilon() throw()
+      { return __glibcpp_long_double_epsilon; }
+      static long double round_error() throw()
+      { return __glibcpp_long_double_round_error; }
+
+      static const int min_exponent = __glibcpp_long_double_min_exponent;
+      static const int min_exponent10 = __glibcpp_long_double_min_exponent10;
+      static const int max_exponent = __glibcpp_long_double_max_exponent;
+      static const int max_exponent10 = __glibcpp_long_double_max_exponent10;
+
+      static const bool has_infinity = __glibcpp_long_double_has_infinity;
+      static const bool has_quiet_NaN = __glibcpp_long_double_has_quiet_NaN;
+      static const bool has_signaling_NaN =
+                __glibcpp_long_double_has_signaling_NaN;
+      static const float_denorm_style has_denorm =
+                __glibcpp_long_double_has_denorm;
+      static const bool has_denorm_loss =
+                __glibcpp_long_double_has_denorm_loss;
+
+      static long double infinity() throw()
+      { return __glibcpp_long_double_infinity; }
+      static long double quiet_NaN() throw()
+      { return __glibcpp_long_double_quiet_NaN; }
+      static long double signaling_NaN() throw()
+      { return __glibcpp_long_double_signaling_NaN; }
+      static long double denorm_min() throw()
+      { return __glibcpp_long_double_denorm_min; }
+
+      static const bool is_iec559 = __glibcpp_long_double_is_iec559;
+      static const bool is_bounded = __glibcpp_long_double_is_bounded;
+      static const bool is_modulo = __glibcpp_long_double_is_modulo;
+
+      static const bool traps = __glibcpp_long_double_traps; 
+      static const bool tinyness_before = __glibcpp_long_double_tinyness_before;
+      static const float_round_style round_style = 
+        __glibcpp_long_double_round_style;
+    };
+
+#undef __glibcpp_long_double_min
+#undef __glibcpp_long_double_max
+#undef __glibcpp_long_double_digits
+#undef __glibcpp_long_double_digits10
+#undef __glibcpp_long_double_radix
+#undef __glibcpp_long_double_round_error
+#undef __glibcpp_long_double_min_exponent
+#undef __glibcpp_long_double_min_exponent10
+#undef __glibcpp_long_double_max_exponent
+#undef __glibcpp_long_double_max_exponent10
+#undef __glibcpp_long_double_has_infinity
+#undef __glibcpp_long_double_has_quiet_NaN
+#undef __glibcpp_long_double_has_signaling_NaN
+#undef __glibcpp_long_double_has_denorm
+#undef __glibcpp_long_double_has_denorm_loss
+#undef __glibcpp_long_double_infinity
+#undef __glibcpp_long_double_quiet_NaN
+#undef __glibcpp_long_double_signaling_NaN
+#undef __glibcpp_long_double_denorm_min
+#undef __glibcpp_long_double_is_iec559
+#undef __glibcpp_long_double_is_bounded
+#undef __glibcpp_long_double_is_modulo
+#undef __glibcpp_long_double_traps
+#undef __glibcpp_long_double_tinyness_before
+#undef __glibcpp_long_double_round_style  
+  
+} // namespace std
+
+#endif // _CPP_NUMERIC_LIMITS
diff --git a/contrib/libstdc++/include/std/std_list.h b/contrib/libstdc++/include/std/std_list.h
new file mode 100644
index 0000000..f32553b
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_list.h
@@ -0,0 +1,77 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file list
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_LIST
+#define _CPP_LIST 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_LIST */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_locale.h b/contrib/libstdc++/include/std/std_locale.h
new file mode 100644
index 0000000..9c46b96
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_locale.h
@@ -0,0 +1,52 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 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
+// 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
+//
+
+/** @file locale
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_LOCALE
+#define _CPP_LOCALE	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+#endif
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/std/std_map.h b/contrib/libstdc++/include/std/std_map.h
new file mode 100644
index 0000000..c04cbd5
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_map.h
@@ -0,0 +1,74 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file map
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_MAP
+#define _CPP_MAP 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+#endif /* _CPP_MAP */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_memory.h b/contrib/libstdc++/include/std/std_memory.h
new file mode 100644
index 0000000..b7feb37
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_memory.h
@@ -0,0 +1,204 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ * Copyright (c) 1997-1999
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ */
+
+/** @file memory
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_MEMORY
+#define _CPP_MEMORY 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include  //for iterator_traits
+#include 
+#include 
+
+namespace std
+{
+
+  /**
+   *  @if maint
+   *  This is a helper function.  The unused second parameter exists to
+   *  permit the real get_temporary_buffer to use template parameter deduction.
+   *  @endif
+  */
+  template 
+  pair<_Tp*, ptrdiff_t> 
+  __get_temporary_buffer(ptrdiff_t __len, _Tp*)
+  {
+    if (__len > ptrdiff_t(INT_MAX / sizeof(_Tp)))
+      __len = INT_MAX / sizeof(_Tp);
+
+    while (__len > 0) {
+      _Tp* __tmp = (_Tp*) std::malloc((std::size_t)__len * sizeof(_Tp));
+      if (__tmp != 0)
+	return pair<_Tp*, ptrdiff_t>(__tmp, __len);
+      __len /= 2;
+    }
+
+    return pair<_Tp*, ptrdiff_t>((_Tp*)0, 0);
+  }
+
+  /**
+   *  @brief This is a mostly-useless wrapper around malloc().
+   *  @param  len  The number of objects of type Tp.
+   *  @return   See full description.
+   *
+   *  Reinventing the wheel, but this time with prettier spokes!
+   *
+   *  This function tries to obtain storage for @c len adjacent Tp objects.
+   *  The objects themselves are not constructed, of course.  A pair<> is
+   *  returned containing "the buffer s address and capacity (in the units of
+   *  sizeof(Tp)), or a pair of 0 values if no storage can be obtained."
+   *  Note that the capacity obtained may be less than that requested if the
+   *  memory is unavailable; you should compare len with the .second return
+   *  value.
+  */
+  template 
+  inline pair<_Tp*, ptrdiff_t> get_temporary_buffer(ptrdiff_t __len) {
+    return __get_temporary_buffer(__len, (_Tp*) 0);
+  }
+
+  /**
+   *  @brief The companion to get_temporary_buffer().
+   *  @param  p  A buffer previously allocated by get_temporary_buffer.
+   *  @return   None.
+   *
+   *  Frees the memory pointed to by p.
+   */
+  template 
+  void return_temporary_buffer(_Tp* __p) {
+    std::free(__p);
+  }
+
+
+template 
+  struct auto_ptr_ref
+{
+   _Tp1* _M_ptr;
+   auto_ptr_ref(_Tp1* __p) : _M_ptr(__p) {}
+};
+
+/**
+ *  A simple smart pointer providing strict ownership semantics.  (More later.)
+*/
+template 
+  class auto_ptr
+{
+private:
+  _Tp* _M_ptr;
+
+public:
+  typedef _Tp element_type;
+
+  explicit auto_ptr(_Tp* __p = 0) throw() : _M_ptr(__p) {}
+  auto_ptr(auto_ptr& __a) throw() : _M_ptr(__a.release()) {}
+
+  template  auto_ptr(auto_ptr<_Tp1>& __a) throw()
+    : _M_ptr(__a.release()) {}
+
+  auto_ptr& operator=(auto_ptr& __a) throw() {
+    reset(__a.release());
+    return *this;
+  }
+
+  template 
+  auto_ptr& operator=(auto_ptr<_Tp1>& __a) throw() {
+    reset(__a.release());
+    return *this;
+  }
+  
+  // Note: The C++ standard says there is supposed to be an empty throw
+  // specification here, but omitting it is standard conforming.  Its 
+  // presence can be detected only if _Tp::~_Tp() throws, but (17.4.3.6/2)
+  // this is prohibited.
+  ~auto_ptr() { delete _M_ptr; }
+ 
+  _Tp& operator*() const throw() {
+    return *_M_ptr;
+  }
+  _Tp* operator->() const throw() {
+    return _M_ptr;
+  }
+  _Tp* get() const throw() {
+    return _M_ptr;
+  }
+  _Tp* release() throw() {
+    _Tp* __tmp = _M_ptr;
+    _M_ptr = 0;
+    return __tmp;
+  }
+  void reset(_Tp* __p = 0) throw() {
+    if (__p != _M_ptr) {
+      delete _M_ptr;
+      _M_ptr = __p;
+    }    
+  }
+
+public:
+  auto_ptr(auto_ptr_ref<_Tp> __ref) throw()
+    : _M_ptr(__ref._M_ptr) {}
+
+  auto_ptr& operator=(auto_ptr_ref<_Tp> __ref) throw() {
+    if (__ref._M_ptr != this->get()) {
+      delete _M_ptr;
+      _M_ptr = __ref._M_ptr;
+    }
+    return *this;
+  }
+
+  template  operator auto_ptr_ref<_Tp1>() throw() 
+    { return auto_ptr_ref<_Tp>(this->release()); }
+  template  operator auto_ptr<_Tp1>() throw()
+    { return auto_ptr<_Tp1>(this->release()); }
+};
+
+} // namespace std
+
+#endif /* _CPP_MEMORY */
+
diff --git a/contrib/libstdc++/include/std/std_numeric.h b/contrib/libstdc++/include/std/std_numeric.h
new file mode 100644
index 0000000..936eaa7
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_numeric.h
@@ -0,0 +1,75 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file numeric
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_NUMERIC
+#define _CPP_NUMERIC 1
+
+#pragma GCC system_header
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_NUMERIC */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_ostream.h b/contrib/libstdc++/include/std/std_ostream.h
new file mode 100644
index 0000000..eff4bb5
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_ostream.h
@@ -0,0 +1,278 @@
+// Output streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.6.2  Output streams
+//
+
+/** @file ostream
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_OSTREAM
+#define _CPP_OSTREAM	1
+
+#pragma GCC system_header
+
+#include 
+
+namespace std
+{
+  // 27.6.2.1 Template class basic_ostream
+  template
+    class basic_ostream : virtual public basic_ios<_CharT, _Traits>
+    {
+    public:
+      // Types (inherited from basic_ios (27.4.4)):
+      typedef _CharT                     		char_type;
+      typedef typename _Traits::int_type 		int_type;
+      typedef typename _Traits::pos_type 		pos_type;
+      typedef typename _Traits::off_type 		off_type;
+      typedef _Traits                    		traits_type;
+      
+      // Non-standard Types:
+      typedef basic_streambuf<_CharT, _Traits> 		__streambuf_type;
+      typedef basic_ios<_CharT, _Traits>		__ios_type;
+      typedef basic_ostream<_CharT, _Traits>		__ostream_type;
+      typedef ostreambuf_iterator<_CharT, _Traits>	__ostreambuf_iter;
+      typedef num_put<_CharT, __ostreambuf_iter>        __numput_type;
+      typedef ctype<_CharT>           			__ctype_type;
+
+      // 27.6.2.2 Constructor/destructor:
+      explicit 
+      basic_ostream(__streambuf_type* __sb)
+      { this->init(__sb); }
+
+      virtual 
+      ~basic_ostream() { }
+
+      // 27.6.2.3 Prefix/suffix:
+      class sentry;
+      friend class sentry;
+      
+      // 27.6.2.5 Formatted output:
+      // 27.6.2.5.3  basic_ostream::operator<<
+      __ostream_type&
+      operator<<(__ostream_type& (*__pf)(__ostream_type&));
+      
+      __ostream_type&
+      operator<<(__ios_type& (*__pf)(__ios_type&));
+      
+      __ostream_type&
+      operator<<(ios_base& (*__pf) (ios_base&));
+
+      // 27.6.2.5.2 Arithmetic Inserters
+      __ostream_type& 
+      operator<<(long __n);
+      
+      __ostream_type& 
+      operator<<(unsigned long __n);
+
+      __ostream_type& 
+      operator<<(bool __n);
+
+      __ostream_type& 
+      operator<<(short __n)
+      { 
+	ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+	if (__fmt & ios_base::oct || __fmt & ios_base::hex)
+	  return this->operator<<(static_cast
+				  (static_cast(__n)));
+	else
+	  return this->operator<<(static_cast(__n));
+      }
+
+      __ostream_type& 
+      operator<<(unsigned short __n)
+      { return this->operator<<(static_cast(__n)); }
+
+      __ostream_type& 
+      operator<<(int __n)
+      { 
+	ios_base::fmtflags __fmt = this->flags() & ios_base::basefield;
+	if (__fmt & ios_base::oct || __fmt & ios_base::hex)
+	  return this->operator<<(static_cast
+				  (static_cast(__n)));
+	else
+	  return this->operator<<(static_cast(__n));
+      }
+
+      __ostream_type& 
+      operator<<(unsigned int __n)
+      { return this->operator<<(static_cast(__n)); }
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+      __ostream_type& 
+      operator<<(long long __n);
+
+      __ostream_type& 
+      operator<<(unsigned long long __n);
+#endif
+
+      __ostream_type& 
+      operator<<(double __f);
+
+      __ostream_type& 
+      operator<<(float __f)
+      { return this->operator<<(static_cast(__f)); }
+
+      __ostream_type& 
+      operator<<(long double __f);
+
+      __ostream_type& 
+      operator<<(const void* __p);
+
+      __ostream_type& 
+      operator<<(__streambuf_type* __sb);
+
+      // Unformatted output:
+      __ostream_type& 
+      put(char_type __c);
+
+      __ostream_type& 
+      write(const char_type* __s, streamsize __n);
+
+      __ostream_type& 
+      flush();
+
+      // Seeks:
+      pos_type 
+      tellp();
+
+      __ostream_type& 
+      seekp(pos_type);
+
+      __ostream_type& 
+      seekp(off_type, ios_base::seekdir);
+    };
+
+  // 27.6.2.3  Class basic_ostream::sentry
+  template 
+    class basic_ostream<_CharT, _Traits>::sentry
+    {
+      // Data Members:
+      bool 				_M_ok;
+      basic_ostream<_CharT,_Traits>& 	_M_os;
+      
+    public:
+      explicit
+      sentry(basic_ostream<_CharT,_Traits>& __os);
+
+      ~sentry()
+      {
+	// XXX MT
+	if (_M_os.flags() & ios_base::unitbuf && !uncaught_exception())
+	  {
+	    // Can't call flush directly or else will get into recursive lock.
+	    if (_M_os.rdbuf() && _M_os.rdbuf()->pubsync() == -1)
+	      _M_os.setstate(ios_base::badbit);
+	  }
+      }
+
+      operator bool() 
+      { return _M_ok; }
+    };
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c);
+
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
+    { return (__out << __out.widen(__c)); }
+
+  // Specialization
+  template  
+    basic_ostream&
+    operator<<(basic_ostream& __out, char __c);
+
+  // Signed and unsigned
+  template
+    basic_ostream&
+    operator<<(basic_ostream& __out, signed char __c)
+    { return (__out << static_cast(__c)); }
+  
+  template
+    basic_ostream&
+    operator<<(basic_ostream& __out, unsigned char __c)
+    { return (__out << static_cast(__c)); }
+  
+  template
+    basic_ostream<_CharT, _Traits>&
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s);
+
+  template
+    basic_ostream<_CharT, _Traits> &
+    operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s);
+
+  // Partial specializationss
+  template
+    basic_ostream&
+    operator<<(basic_ostream& __out, const char* __s);
+ 
+  // Signed and unsigned
+  template
+    basic_ostream&
+    operator<<(basic_ostream& __out, const signed char* __s)
+    { return (__out << reinterpret_cast(__s)); }
+
+  template
+    basic_ostream &
+    operator<<(basic_ostream& __out, const unsigned char* __s)
+    { return (__out << reinterpret_cast(__s)); }
+
+  // 27.6.2.7 Standard basic_ostream manipulators
+  template
+    basic_ostream<_CharT, _Traits>& 
+    endl(basic_ostream<_CharT, _Traits>& __os)
+    { return flush(__os.put(__os.widen('\n'))); }
+
+  template
+    basic_ostream<_CharT, _Traits>& 
+    ends(basic_ostream<_CharT, _Traits>& __os)
+    { return __os.put(_CharT()); }
+  
+  template
+    basic_ostream<_CharT, _Traits>& 
+    flush(basic_ostream<_CharT, _Traits>& __os)
+    { return __os.flush(); }
+
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#endif
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include 
+#endif
+
+#endif	/* _CPP_OSTREAM */
diff --git a/contrib/libstdc++/include/std/std_queue.h b/contrib/libstdc++/include/std/std_queue.h
new file mode 100644
index 0000000..6be3551
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_queue.h
@@ -0,0 +1,81 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file queue
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_QUEUE
+#define _CPP_QUEUE 1
+
+#pragma GCC system_header
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_QUEUE */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_set.h b/contrib/libstdc++/include/std/std_set.h
new file mode 100644
index 0000000..249f396
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_set.h
@@ -0,0 +1,74 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file set
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_SET
+#define _CPP_SET 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+
+#endif /* _CPP_SET */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_sstream.h b/contrib/libstdc++/include/std/std_sstream.h
new file mode 100644
index 0000000..07e47b5
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_sstream.h
@@ -0,0 +1,370 @@
+// String based streams -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.7  String-based streams
+//
+
+/** @file sstream
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_SSTREAM
+#define _CPP_SSTREAM	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+namespace std
+{
+  template
+    class basic_stringbuf : public basic_streambuf<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc				       	allocator_type;
+#endif
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard Types:
+      typedef basic_streambuf  	__streambuf_type;
+      typedef basic_string 	__string_type;
+      typedef typename __string_type::size_type		__size_type;
+
+    protected:
+      // Data Members:
+      __string_type 		_M_string;
+
+    public:
+      // Constructors:
+      explicit
+      basic_stringbuf(ios_base::openmode __mode = ios_base::in | ios_base::out)
+      : __streambuf_type(), _M_string()
+      { _M_stringbuf_init(__mode); }
+
+      explicit
+      basic_stringbuf(const __string_type& __str,
+		      ios_base::openmode __mode = ios_base::in | ios_base::out)
+      : __streambuf_type(), _M_string(__str.data(), __str.size())
+      { _M_stringbuf_init(__mode); }
+
+      // Get and set:
+      __string_type
+      str() const
+      {
+	if (_M_mode & ios_base::out)
+	  {
+	    // This is the deal: _M_string.size() is a value that
+	    // represents the size of the initial string that makes
+	    // _M_string, and may not be the correct size of the
+	    // current stringbuf internal buffer.
+	    __size_type __len = _M_string.size();
+	    if (_M_out_cur > _M_out_beg)
+	      __len = max(__size_type(_M_out_end - _M_out_beg), __len);
+	    return __string_type(_M_out_beg, _M_out_beg + __len);
+	  }
+	else
+	  return _M_string;
+      }
+
+      void
+      str(const __string_type& __s)
+      {
+	_M_string = __s;
+	_M_stringbuf_init(_M_mode);
+      }
+
+    protected:
+      // Common initialization code for both ctors goes here.
+      void
+      _M_stringbuf_init(ios_base::openmode __mode)
+      {
+	// _M_buf_size is a convenient alias for "what the streambuf
+	// thinks the allocated size of the string really is." This is
+	// necessary as ostringstreams are implemented with the
+	// streambufs having control of the allocation and
+	// re-allocation of the internal string object, _M_string.
+	_M_buf_size = _M_string.size();
+
+	// NB: Start ostringstream buffers at 512 bytes. This is an
+	// experimental value (pronounced "arbitrary" in some of the
+	// hipper english-speaking countries), and can be changed to
+	// suit particular needs.
+	_M_buf_size_opt = 512;
+	_M_mode = __mode;
+	if (_M_mode & (ios_base::ate | ios_base::app))
+	  _M_really_sync(0, _M_buf_size);
+	else
+	  _M_really_sync(0, 0);
+      }
+
+      // Overridden virtual functions:
+      virtual int_type
+      underflow()
+      {
+	if (_M_in_cur && _M_in_cur < _M_in_end)
+	  return traits_type::to_int_type(*gptr());
+	else
+	  return traits_type::eof();
+      }
+
+      virtual int_type
+      pbackfail(int_type __c = traits_type::eof());
+
+      virtual int_type
+      overflow(int_type __c = traits_type::eof());
+
+      virtual __streambuf_type*
+      setbuf(char_type* __s, streamsize __n)
+      {
+	if (__s && __n)
+	  {
+	    _M_string = __string_type(__s, __n);
+	    _M_really_sync(0, 0);
+	  }
+	return this;
+      }
+
+      virtual pos_type
+      seekoff(off_type __off, ios_base::seekdir __way,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      virtual pos_type
+      seekpos(pos_type __sp,
+	      ios_base::openmode __mode = ios_base::in | ios_base::out);
+
+      // Internal function for correctly updating the internal buffer
+      // for a particular _M_string, due to initialization or
+      // re-sizing of an existing _M_string.
+      // Assumes: contents of _M_string and internal buffer match exactly.
+      // __i == _M_in_cur - _M_in_beg
+      // __o == _M_out_cur - _M_out_beg
+      virtual int
+      _M_really_sync(__size_type __i, __size_type __o)
+      {
+	char_type* __base = const_cast(_M_string.data());
+	bool __testin = _M_mode & ios_base::in;
+	bool __testout = _M_mode & ios_base::out;
+	__size_type __len = _M_string.size();
+
+	_M_buf = __base;
+	if (__testin)
+	    this->setg(__base, __base + __i, __base + __len);
+	if (__testout)
+	  {
+	    this->setp(__base, __base + __len);
+	    _M_out_cur += __o;
+	  }
+	return 0;
+      }
+    };
+
+
+  // 27.7.2  Template class basic_istringstream
+  template
+    class basic_istringstream : public basic_istream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc				       	allocator_type;
+#endif
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard types:
+      typedef basic_string<_CharT, _Traits, _Alloc> 	__string_type;
+      typedef basic_stringbuf<_CharT, _Traits, _Alloc> 	__stringbuf_type;
+      typedef basic_istream	__istream_type;
+
+    private:
+      __stringbuf_type	_M_stringbuf;
+
+    public:
+      // Constructors:
+      explicit
+      basic_istringstream(ios_base::openmode __mode = ios_base::in)
+      : __istream_type(NULL), _M_stringbuf(__mode | ios_base::in)
+      { this->init(&_M_stringbuf); }
+
+      explicit
+      basic_istringstream(const __string_type& __str,
+			  ios_base::openmode __mode = ios_base::in)
+      : __istream_type(NULL), _M_stringbuf(__str, __mode | ios_base::in)
+      { this->init(&_M_stringbuf); }
+
+      ~basic_istringstream()
+      { }
+
+      // Members:
+      __stringbuf_type*
+      rdbuf() const
+      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+      __string_type
+      str() const
+      { return _M_stringbuf.str(); }
+
+      void
+      str(const __string_type& __s)
+      { _M_stringbuf.str(__s); }
+    };
+
+
+  // 27.7.3  Template class basic_ostringstream
+  template 
+    class basic_ostringstream : public basic_ostream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc				       	allocator_type;
+#endif
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard types:
+      typedef basic_string<_CharT, _Traits, _Alloc> 	__string_type;
+      typedef basic_stringbuf<_CharT, _Traits, _Alloc> 	__stringbuf_type;
+      typedef basic_ostream	__ostream_type;
+
+    private:
+      __stringbuf_type	_M_stringbuf;
+
+    public:
+     // Constructors/destructor:
+      explicit
+      basic_ostringstream(ios_base::openmode __mode = ios_base::out)
+      : __ostream_type(NULL), _M_stringbuf(__mode | ios_base::out)
+      { this->init(&_M_stringbuf); }
+
+      explicit
+      basic_ostringstream(const __string_type& __str,
+			  ios_base::openmode __mode = ios_base::out)
+      : __ostream_type(NULL), _M_stringbuf(__str, __mode | ios_base::out)
+      { this->init(&_M_stringbuf); }
+
+      ~basic_ostringstream()
+      { }
+
+      // Members:
+      __stringbuf_type*
+      rdbuf() const
+      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+      __string_type
+      str() const
+      { return _M_stringbuf.str(); }
+
+      void
+      str(const __string_type& __s)
+      { _M_stringbuf.str(__s); }
+    };
+
+
+  // 27.7.4  Template class basic_stringstream
+  template 
+    class basic_stringstream : public basic_iostream<_CharT, _Traits>
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+// 251. basic_stringbuf missing allocator_type
+      typedef _Alloc				       	allocator_type;
+#endif
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard Types:
+      typedef basic_string<_CharT, _Traits, _Alloc> 	__string_type;
+      typedef basic_stringbuf<_CharT, _Traits, _Alloc> 	__stringbuf_type;
+      typedef basic_iostream	__iostream_type;
+
+    private:
+      __stringbuf_type	_M_stringbuf;
+
+    public:
+      // Constructors/destructors
+      explicit
+      basic_stringstream(ios_base::openmode __m = ios_base::out | ios_base::in)
+      : __iostream_type(NULL), _M_stringbuf(__m)
+      { this->init(&_M_stringbuf); }
+
+      explicit
+      basic_stringstream(const __string_type& __str,
+			 ios_base::openmode __m = ios_base::out | ios_base::in)
+      : __iostream_type(NULL), _M_stringbuf(__str, __m)
+      { this->init(&_M_stringbuf); }
+
+      ~basic_stringstream()
+      { }
+
+      // Members:
+      __stringbuf_type*
+      rdbuf() const
+      { return const_cast<__stringbuf_type*>(&_M_stringbuf); }
+
+      __string_type
+      str() const
+      { return _M_stringbuf.str(); }
+
+      void
+      str(const __string_type& __s)
+      { _M_stringbuf.str(__s); }
+    };
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#endif
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+# include 
+#endif
+
+#endif
diff --git a/contrib/libstdc++/include/std/std_stack.h b/contrib/libstdc++/include/std/std_stack.h
new file mode 100644
index 0000000..e517c42
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_stack.h
@@ -0,0 +1,77 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file stack
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_STACK
+#define _CPP_STACK 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#endif /* _CPP_STACK */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_stdexcept.h b/contrib/libstdc++/include/std/std_stdexcept.h
new file mode 100644
index 0000000..07a15e4
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_stdexcept.h
@@ -0,0 +1,148 @@
+// Standard exception classes  -*- C++ -*-
+
+// 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
+// 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++ 19.1  Exception classes
+//
+
+/** @file stdexcept
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_STDEXCEPT
+#define _CPP_STDEXCEPT 	  1
+
+#pragma GCC system_header
+
+#include 
+#include 
+
+namespace std 
+{
+  /** Logic errors represent problems in the internal logic of a program;
+   *  in theory, these are preventable, and even detectable before the
+   *  program runs (e.g., violations of class invariants).
+   *  @brief One of two subclasses of exception.
+   */
+  class logic_error : public exception 
+  {
+    string _M_msg;
+
+  public:
+    /** Takes a character string describing the error.  */
+    explicit 
+    logic_error(const string&  __arg);
+
+    virtual 
+    ~logic_error() throw();
+
+    /** Returns a C-style character string describing the general cause of
+     *  the current error (the same string passed to the ctor).  */
+    virtual const char* 
+    what() const throw();
+  };
+
+  /** Thrown by the library, or by you, to report domain errors (domain in
+   *  the mathmatical sense).  */
+  class domain_error : public logic_error 
+  {
+  public:
+    explicit domain_error(const string&  __arg);
+  };
+
+  /** Thrown to report invalid arguments to functions.  */
+  class invalid_argument : public logic_error 
+  {
+  public:
+    explicit invalid_argument(const string&  __arg);
+  };
+
+  /** Thrown when an object is constructed that would exceed its maximum
+   *  permitted size (e.g., a basic_string instance).  */
+  class length_error : public logic_error 
+  {
+  public:
+    explicit length_error(const string&  __arg);
+  };
+
+  /** This represents an argument whose value is not within the expected
+   *  range (e.g., boundary checks in basic_string).  */
+  class out_of_range : public logic_error 
+  {
+  public:
+    explicit out_of_range(const string&  __arg);
+  };
+
+  /** Runtime errors represent problems outside the scope of a program;
+   *  they cannot be easily predicted and can generally only be caught as
+   *  the program executes.
+   *  @brief One of two subclasses of exception.
+   */
+  class runtime_error : public exception 
+  {
+    string _M_msg;
+
+  public:
+    /** Takes a character string describing the error.  */
+    explicit 
+    runtime_error(const string&  __arg);
+
+    virtual 
+    ~runtime_error() throw();
+
+    /** Returns a C-style character string describing the general cause of
+     *  the current error (the same string passed to the ctor).  */
+    virtual const char* 
+    what() const throw();
+  };
+
+  /** Thrown to indicate range errors in internal computations.  */
+  class range_error : public runtime_error 
+  {
+  public:
+    explicit range_error(const string&  __arg);
+  };
+
+  /** Thrown to indicate arithmetic overflow.  */
+  class overflow_error : public runtime_error 
+  {
+  public:
+    explicit overflow_error(const string&  __arg);
+  };
+
+  /** Thrown to indicate arithmetic underflow.  */
+  class underflow_error : public runtime_error 
+  {
+  public:
+    explicit underflow_error(const string&  __arg);
+  };
+} // namespace std
+
+#endif // _CPP_STDEXCEPT
diff --git a/contrib/libstdc++/include/std/std_streambuf.h b/contrib/libstdc++/include/std/std_streambuf.h
new file mode 100644
index 0000000..012bf4e
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_streambuf.h
@@ -0,0 +1,496 @@
+// Stream buffer classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.5  Stream buffers
+//
+
+/** @file streambuf
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_STREAMBUF
+#define _CPP_STREAMBUF	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include  	// For SEEK_SET, SEEK_CUR, SEEK_END
+#include 
+#include 
+
+namespace std
+{
+  template
+    streamsize
+    __copy_streambufs(basic_ios<_CharT, _Traits>& _ios,
+		      basic_streambuf<_CharT, _Traits>* __sbin,
+		      basic_streambuf<_CharT, _Traits>* __sbout);
+  
+  // 27.5.2 Template class basic_streambuf<_CharT, _Traits>
+  template
+    class basic_streambuf 
+    {
+    public:
+      // Types:
+      typedef _CharT 					char_type;
+      typedef _Traits 					traits_type;
+      typedef typename traits_type::int_type 		int_type;
+      typedef typename traits_type::pos_type 		pos_type;
+      typedef typename traits_type::off_type 		off_type;
+
+      // Non-standard Types:
+      typedef ctype           		__ctype_type;
+      typedef basic_streambuf  	__streambuf_type;
+      
+      friend class basic_ios;
+      friend class basic_istream;
+      friend class basic_ostream;
+      friend class istreambuf_iterator;
+      friend class ostreambuf_iterator;
+
+      friend streamsize
+      __copy_streambufs<>(basic_ios& __ios,
+			  __streambuf_type* __sbin,__streambuf_type* __sbout);
+      
+    protected:
+      // Pointer to the beginning of internally-allocated
+      // space. Filebuf manually allocates/deallocates this, whereas
+      // stringstreams attempt to use the built-in intelligence of the
+      // string class. If you are managing memory, set this. If not,
+      // leave it NULL.
+      char_type*		_M_buf; 	
+
+      // Actual size of allocated internal buffer, in bytes.
+      int_type			_M_buf_size;
+
+      // Optimal or preferred size of internal buffer, in bytes.
+      int_type			_M_buf_size_opt;
+
+      // True iff _M_in_* and _M_out_* buffers should always point to
+      // the same place.  True for fstreams, false for sstreams.
+      bool 			_M_buf_unified;	
+
+      // This is based on _IO_FILE, just reordered to be more
+      // consistent, and is intended to be the most minimal abstraction
+      // for an internal buffer.
+      // get == input == read
+      // put == output == write
+      char_type* 		_M_in_beg;  	// Start of get area. 
+      char_type* 		_M_in_cur;	// Current read area. 
+      char_type* 		_M_in_end;	// End of get area. 
+      char_type* 		_M_out_beg; 	// Start of put area. 
+      char_type* 		_M_out_cur;  	// Current put area. 
+      char_type* 		_M_out_end;  	// End of put area. 
+
+      // Place to stash in || out || in | out settings for current streambuf.
+      ios_base::openmode 	_M_mode;	
+
+      // Current locale setting.
+      locale 			_M_buf_locale;	
+
+      // True iff locale is initialized.
+      bool 			_M_buf_locale_init;
+
+      // Necessary bits for putback buffer management. Only used in
+      // the basic_filebuf class, as necessary for the standard
+      // requirements. The only basic_streambuf member function that
+      // needs access to these data members is in_avail...
+      // NB: pbacks of over one character are not currently supported.
+      static const int_type    	_S_pback_size = 1; 
+      char_type			_M_pback[_S_pback_size]; 
+      char_type*		_M_pback_cur_save;
+      char_type*		_M_pback_end_save;
+      bool			_M_pback_init; 
+
+      // Initializes pback buffers, and moves normal buffers to safety.
+      // Assumptions:
+      // _M_in_cur has already been moved back
+      void
+      _M_pback_create()
+      {
+	if (!_M_pback_init)
+	  {
+	    int_type __dist = _M_in_end - _M_in_cur;
+	    int_type __len = min(_S_pback_size, __dist);
+	    traits_type::copy(_M_pback, _M_in_cur, __len);
+	    _M_pback_cur_save = _M_in_cur;
+	    _M_pback_end_save = _M_in_end;
+	    this->setg(_M_pback, _M_pback, _M_pback + __len);
+	    _M_pback_init = true;
+	  }
+      }
+
+      // Deactivates pback buffer contents, and restores normal buffer.
+      // Assumptions:
+      // The pback buffer has only moved forward.
+      void
+      _M_pback_destroy()
+      {
+	if (_M_pback_init)
+	  {
+	    // Length _M_in_cur moved in the pback buffer.
+	    int_type __off_cur = _M_in_cur - _M_pback;
+	    
+	    // For in | out buffers, the end can be pushed back...
+	    int_type __off_end = 0;
+	    int_type __pback_len = _M_in_end - _M_pback;
+	    int_type __save_len = _M_pback_end_save - _M_buf;
+	    if (__pback_len > __save_len)
+	      __off_end = __pback_len - __save_len;
+
+	    this->setg(_M_buf, _M_pback_cur_save + __off_cur, 
+		       _M_pback_end_save + __off_end);
+	    _M_pback_cur_save = NULL;
+	    _M_pback_end_save = NULL;
+	    _M_pback_init = false;
+	  }
+      }
+
+      // Correctly sets the _M_in_cur pointer, and bumps the
+      // _M_out_cur pointer as well if necessary.
+      void 
+      _M_in_cur_move(off_type __n) // argument needs to be +-
+      {
+	bool __testout = _M_out_cur;
+	_M_in_cur += __n;
+	if (__testout && _M_buf_unified)
+	  _M_out_cur += __n;
+      }
+
+      // Correctly sets the _M_out_cur pointer, and bumps the
+      // appropriate _M_*_end pointers as well. Necessary for the
+      // un-tied stringbufs, in in|out mode.
+      // Invariant:
+      // __n + _M_out_[cur, end] <= _M_buf + _M_buf_size
+      // Assuming all _M_*_[beg, cur, end] pointers are operating on
+      // the same range:
+      // _M_buf <= _M_*_ <= _M_buf + _M_buf_size
+      void 
+      _M_out_cur_move(off_type __n) // argument needs to be +-
+      {
+	bool __testin = _M_in_cur;
+
+	_M_out_cur += __n;
+	if (__testin && _M_buf_unified)
+	  _M_in_cur += __n;
+	if (_M_out_cur > _M_out_end)
+	  {
+	    _M_out_end = _M_out_cur;
+	    // NB: in | out buffers drag the _M_in_end pointer along...
+	    if (__testin)
+	      _M_in_end += __n;
+	  }
+      }
+
+      // Return the size of the output buffer.  This depends on the
+      // buffer in use: allocated buffers have a stored size in
+      // _M_buf_size and setbuf() buffers don't.
+      off_type
+      _M_out_buf_size()
+      {
+	off_type __ret = 0;
+	if (_M_out_cur)
+	  {
+	    // Using allocated buffer.
+	    if (_M_out_beg == _M_buf)
+	      __ret = _M_out_beg + _M_buf_size - _M_out_cur;
+	    // Using non-allocated buffer.
+	    else
+	      __ret = _M_out_end - _M_out_cur;
+	  }
+	return __ret;
+      }
+
+  public:
+      virtual 
+      ~basic_streambuf() 
+      {
+	_M_buf_unified = false;
+	_M_buf_size = 0;
+	_M_buf_size_opt = 0;
+	_M_mode = ios_base::openmode(0);
+	_M_buf_locale_init = false;
+      }
+
+      // Locales:
+      locale 
+      pubimbue(const locale &__loc)
+      {
+	locale __tmp(this->getloc());
+	this->imbue(__loc);
+	return __tmp;
+      }
+
+      locale   
+      getloc() const
+      {
+	if (_M_buf_locale_init)
+	  return _M_buf_locale; 
+	else 
+	  return locale();
+      } 
+
+      // Buffer and positioning:
+      __streambuf_type* 
+      pubsetbuf(char_type* __s, streamsize __n) 
+      { return this->setbuf(__s, __n); }
+
+      pos_type 
+      pubseekoff(off_type __off, ios_base::seekdir __way, 
+		 ios_base::openmode __mode = ios_base::in | ios_base::out)
+      { return this->seekoff(__off, __way, __mode); }
+
+      pos_type 
+      pubseekpos(pos_type __sp,
+		 ios_base::openmode __mode = ios_base::in | ios_base::out)
+      { return this->seekpos(__sp, __mode); }
+
+      int 
+      pubsync() { return this->sync(); }
+
+      // Get and put areas:
+      // Get area:
+      streamsize 
+      in_avail() 
+      { 
+	streamsize __ret;
+	if (_M_in_cur && _M_in_cur < _M_in_end)
+	  {
+	    if (_M_pback_init)
+	      {
+		int_type __save_len =  _M_pback_end_save - _M_pback_cur_save;
+		int_type __pback_len = _M_in_cur - _M_pback;
+		__ret = __save_len - __pback_len;
+	      }
+	    else
+	      __ret = this->egptr() - this->gptr();
+	  }
+	else
+	  __ret = this->showmanyc();
+	return __ret;
+      }
+
+      int_type 
+      snextc()
+      {
+	int_type __eof = traits_type::eof();
+	return (this->sbumpc() == __eof ? __eof : this->sgetc()); 
+      }
+
+      int_type 
+      sbumpc();
+
+      int_type 
+      sgetc()
+      {
+	int_type __ret;
+	if (_M_in_cur && _M_in_cur < _M_in_end)
+	  __ret = traits_type::to_int_type(*(this->gptr()));
+	else 
+	  __ret = this->underflow();
+	return __ret;
+      }
+
+      streamsize 
+      sgetn(char_type* __s, streamsize __n)
+      { return this->xsgetn(__s, __n); }
+
+      // Putback:
+      int_type 
+      sputbackc(char_type __c);
+
+      int_type 
+      sungetc();
+
+      // Put area:
+      int_type 
+      sputc(char_type __c);
+
+      streamsize 
+      sputn(const char_type* __s, streamsize __n)
+      { return this->xsputn(__s, __n); }
+
+    protected:
+      basic_streambuf()
+      : _M_buf(NULL), _M_buf_size(0), 
+      _M_buf_size_opt(static_cast(BUFSIZ)), _M_buf_unified(false), 
+      _M_in_beg(0), _M_in_cur(0), _M_in_end(0), _M_out_beg(0), _M_out_cur(0), 
+      _M_out_end(0), _M_mode(ios_base::openmode(0)), _M_buf_locale(locale()), 
+      _M_buf_locale_init(false), _M_pback_cur_save(0), _M_pback_end_save(0), 
+      _M_pback_init(false)
+      { }
+
+      // Get area:
+      char_type* 
+      eback() const { return _M_in_beg; }
+
+      char_type* 
+      gptr()  const { return _M_in_cur;  }
+
+      char_type* 
+      egptr() const { return _M_in_end; }
+
+      void 
+      gbump(int __n) { _M_in_cur += __n; }
+
+      void 
+      setg(char_type* __gbeg, char_type* __gnext, char_type* __gend)
+      {
+	_M_in_beg = __gbeg;
+	_M_in_cur = __gnext;
+	_M_in_end = __gend;
+	if (!(_M_mode & ios_base::in) && __gbeg && __gnext && __gend)
+	  _M_mode = _M_mode | ios_base::in;
+      }
+
+      // Put area:
+      char_type* 
+      pbase() const { return _M_out_beg; }
+
+      char_type* 
+      pptr() const { return _M_out_cur; }
+
+      char_type* 
+      epptr() const { return _M_out_end; }
+
+      void 
+      pbump(int __n) { _M_out_cur += __n; }
+
+      void 
+      setp(char_type* __pbeg, char_type* __pend)
+      { 
+	_M_out_beg = _M_out_cur = __pbeg; 
+	_M_out_end = __pend; 
+	if (!(_M_mode & ios_base::out) && __pbeg && __pend)
+	  _M_mode = _M_mode | ios_base::out;
+      }
+
+      // Virtual functions:
+      // Locales:
+      virtual void 
+      imbue(const locale& __loc) 
+      { 
+	_M_buf_locale_init = true;
+	if (_M_buf_locale != __loc)
+	  _M_buf_locale = __loc;
+      }
+
+      // Buffer management and positioning:
+      virtual basic_streambuf* 
+      setbuf(char_type*, streamsize)
+      {	return this; }
+      
+      virtual pos_type 
+      seekoff(off_type, ios_base::seekdir,
+	      ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
+      { return pos_type(off_type(-1)); } 
+
+      virtual pos_type 
+      seekpos(pos_type, 
+	      ios_base::openmode /*__mode*/ = ios_base::in | ios_base::out)
+      { return pos_type(off_type(-1)); } 
+
+      virtual int 
+      sync() { return 0; }
+
+      // Get area:
+      virtual streamsize 
+      showmanyc() { return 0; }
+
+      virtual streamsize 
+      xsgetn(char_type* __s, streamsize __n);
+
+      virtual int_type 
+      underflow()
+      { return traits_type::eof(); }
+
+      virtual int_type 
+      uflow() 
+      {
+	int_type __ret = traits_type::eof();
+	bool __testeof = this->underflow() == __ret;
+	bool __testpending = _M_in_cur && _M_in_cur < _M_in_end;
+	if (!__testeof && __testpending)
+	  {
+	    __ret = traits_type::to_int_type(*_M_in_cur);
+	    ++_M_in_cur;
+	    if (_M_buf_unified && _M_mode & ios_base::out)
+	      ++_M_out_cur;
+	  }
+	return __ret;    
+      }
+
+      // Putback:
+      virtual int_type 
+      pbackfail(int_type /* __c */  = traits_type::eof())
+      { return traits_type::eof(); }
+
+      // Put area:
+      virtual streamsize 
+      xsputn(const char_type* __s, streamsize __n);
+
+      virtual int_type 
+      overflow(int_type /* __c */ = traits_type::eof())
+      { return traits_type::eof(); }
+
+#ifdef _GLIBCPP_DEPRECATED
+    public:
+      void 
+      stossc() 
+      {
+	if (_M_in_cur < _M_in_end) 
+	  ++_M_in_cur;
+	else 
+	  this->uflow();
+      }
+#endif
+
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+    // Side effect of DR 50. 
+    private:
+      basic_streambuf(const __streambuf_type&) { }; 
+
+      __streambuf_type& 
+      operator=(const __streambuf_type&) { return *this; };
+#endif
+    };
+} // namespace std
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# define export
+#endif
+#ifdef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#include 
+#endif
+
+#endif	
diff --git a/contrib/libstdc++/include/std/std_string.h b/contrib/libstdc++/include/std/std_string.h
new file mode 100644
index 0000000..6b82f8e
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_string.h
@@ -0,0 +1,61 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+/** @file string
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_STRING
+#define _CPP_STRING	1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include  	// For allocator.
+#include 
+#include  	// For operators >>, <<, and getline decls.
+#include 
+#include   // For less
+#include 
+
+#ifdef _GLIBCPP_NO_TEMPLATE_EXPORT
+# include  // for find_if
+# include  
+#endif
+
+#endif /* _CPP_STRING */
+
diff --git a/contrib/libstdc++/include/std/std_utility.h b/contrib/libstdc++/include/std/std_utility.h
new file mode 100644
index 0000000..b9c6c09
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_utility.h
@@ -0,0 +1,73 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996,1997
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file utility
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_UTILITY
+#define _CPP_UTILITY 1
+
+#pragma GCC system_header
+#include 
+#include 
+#include 
+
+#endif /* _CPP_UTILITY */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/include/std/std_valarray.h b/contrib/libstdc++/include/std/std_valarray.h
new file mode 100644
index 0000000..3957d7f
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_valarray.h
@@ -0,0 +1,743 @@
+// The template and inlines for the -*- C++ -*- valarray class.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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.
+
+// Written by Gabriel Dos Reis 
+
+/** @file valarray
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_VALARRAY
+#define _CPP_VALARRAY 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+    template class _Expr;
+
+    template class _ValArray;    
+
+    template class _Oper,
+        template class _Meta, class _Dom> struct _UnClos;
+
+    template class _Oper,
+        template class _Meta1,
+        template class _Meta2,
+        class _Dom1, class _Dom2> class _BinClos;
+
+    template class _Meta, class _Dom> class _SClos;
+
+    template class _Meta, class _Dom> class _GClos;
+    
+    template class _Meta, class _Dom> class _IClos;
+    
+    template class _Meta, class _Dom> class _ValFunClos;
+
+    template class _Meta, class _Dom> class _RefFunClos;
+
+    template struct _Unary_plus;
+    template struct _Bitwise_and;
+    template struct _Bitwise_or;
+    template struct _Bitwise_xor;  
+    template struct _Bitwise_not;
+    template struct _Shift_left;
+    template struct _Shift_right;
+  
+    template class valarray;   // An array of type _Tp
+    class slice;                          // BLAS-like slice out of an array
+    template class slice_array;
+    class gslice;                         // generalized slice out of an array
+    template class gslice_array;
+    template class mask_array;     // masked array
+    template class indirect_array; // indirected array
+
+} // namespace std
+
+#include 
+#include 
+  
+namespace std
+{
+  template class valarray
+  {
+  public:
+      typedef _Tp value_type;
+
+      // _lib.valarray.cons_ construct/destroy:
+      valarray();
+      explicit valarray(size_t);
+      valarray(const _Tp&, size_t);
+      valarray(const _Tp* __restrict__, size_t);
+      valarray(const valarray&);
+      valarray(const slice_array<_Tp>&);
+      valarray(const gslice_array<_Tp>&);
+      valarray(const mask_array<_Tp>&);
+      valarray(const indirect_array<_Tp>&);
+      template
+      valarray(const _Expr<_Dom,_Tp>& __e);
+     ~valarray();
+
+      // _lib.valarray.assign_ assignment:
+      valarray<_Tp>& operator=(const valarray<_Tp>&);
+      valarray<_Tp>& operator=(const _Tp&);
+      valarray<_Tp>& operator=(const slice_array<_Tp>&);
+      valarray<_Tp>& operator=(const gslice_array<_Tp>&);
+      valarray<_Tp>& operator=(const mask_array<_Tp>&);
+      valarray<_Tp>& operator=(const indirect_array<_Tp>&);
+
+      template valarray<_Tp>&
+      	operator= (const _Expr<_Dom,_Tp>&);
+
+      // _lib.valarray.access_ element access:
+      // XXX: LWG to be resolved.
+      const _Tp&                 operator[](size_t) const;
+      _Tp&                operator[](size_t);		
+      // _lib.valarray.sub_ subset operations:
+      _Expr<_SClos<_ValArray,_Tp>, _Tp> operator[](slice) const;
+      slice_array<_Tp>    operator[](slice);
+      _Expr<_GClos<_ValArray,_Tp>, _Tp> operator[](const gslice&) const;
+      gslice_array<_Tp>   operator[](const gslice&);
+      valarray<_Tp>     	 operator[](const valarray&) const;
+      mask_array<_Tp>     operator[](const valarray&);
+      _Expr<_IClos<_ValArray, _Tp>, _Tp>
+      	operator[](const valarray&) const;
+      indirect_array<_Tp> operator[](const valarray&);
+
+      // _lib.valarray.unary_ unary operators:
+      _Expr<_UnClos<_Unary_plus,_ValArray,_Tp>,_Tp>  operator+ () const;
+      _Expr<_UnClos,_Tp> operator- () const;
+      _Expr<_UnClos<_Bitwise_not,_ValArray,_Tp>,_Tp> operator~ () const;
+      _Expr<_UnClos,bool> operator! () const;
+      
+      // _lib.valarray.cassign_ computed assignment:
+      valarray<_Tp>& operator*= (const _Tp&);
+      valarray<_Tp>& operator/= (const _Tp&);
+      valarray<_Tp>& operator%= (const _Tp&);
+      valarray<_Tp>& operator+= (const _Tp&);
+      valarray<_Tp>& operator-= (const _Tp&);
+      valarray<_Tp>& operator^= (const _Tp&);
+      valarray<_Tp>& operator&= (const _Tp&);
+      valarray<_Tp>& operator|= (const _Tp&);
+      valarray<_Tp>& operator<<=(const _Tp&);
+      valarray<_Tp>& operator>>=(const _Tp&);
+      valarray<_Tp>& operator*= (const valarray<_Tp>&);
+      valarray<_Tp>& operator/= (const valarray<_Tp>&);
+      valarray<_Tp>& operator%= (const valarray<_Tp>&);
+      valarray<_Tp>& operator+= (const valarray<_Tp>&);
+      valarray<_Tp>& operator-= (const valarray<_Tp>&);
+      valarray<_Tp>& operator^= (const valarray<_Tp>&);
+      valarray<_Tp>& operator|= (const valarray<_Tp>&);
+      valarray<_Tp>& operator&= (const valarray<_Tp>&);
+      valarray<_Tp>& operator<<=(const valarray<_Tp>&);
+      valarray<_Tp>& operator>>=(const valarray<_Tp>&);
+
+      template
+        valarray<_Tp>& operator*= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator/= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator%= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator+= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator-= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator^= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator|= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator&= (const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator<<=(const _Expr<_Dom,_Tp>&);
+      template
+        valarray<_Tp>& operator>>=(const _Expr<_Dom,_Tp>&);
+
+      
+      // _lib.valarray.members_ member functions:
+      size_t size() const;
+      _Tp    sum() const;	
+      _Tp    min() const;	
+      _Tp    max() const;	
+
+//           // FIXME: Extension
+//       _Tp    product () const;
+
+      valarray<_Tp> shift (int) const;
+      valarray<_Tp> cshift(int) const;
+      _Expr<_ValFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(_Tp)) const;
+      _Expr<_RefFunClos<_ValArray,_Tp>,_Tp> apply(_Tp func(const _Tp&)) const;
+      void resize(size_t __size, _Tp __c = _Tp());
+
+  private:
+      size_t _M_size;
+      _Tp* __restrict__ _M_data;
+
+      friend class _Array<_Tp>;
+  };
+
+
+  template struct _Unary_plus : unary_function<_Tp,_Tp> {
+      _Tp operator() (const _Tp& __t) const { return __t; }
+  };
+
+  template struct _Bitwise_and : binary_function<_Tp,_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x & __y; }
+  };
+
+  template struct _Bitwise_or : binary_function<_Tp,_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x | __y; }
+  };
+
+  template struct _Bitwise_xor : binary_function<_Tp,_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x ^ __y; }
+  };
+  
+  template struct _Bitwise_not : unary_function<_Tp,_Tp> {
+      _Tp operator() (_Tp __t) const { return ~__t; }
+  };
+
+  template struct _Shift_left : unary_function<_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x << __y; }
+  };
+
+  template struct _Shift_right : unary_function<_Tp,_Tp> {
+      _Tp operator() (_Tp __x, _Tp __y) const { return __x >> __y; }
+  };
+
+  
+  template
+  inline const _Tp&
+  valarray<_Tp>::operator[] (size_t __i) const
+  { return _M_data[__i]; }
+
+  template
+  inline _Tp&
+  valarray<_Tp>::operator[] (size_t __i)
+  { return _M_data[__i]; }
+
+} // std::
+      
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+  template
+  inline valarray<_Tp>::valarray () : _M_size (0), _M_data (0) {}
+
+  template
+  inline valarray<_Tp>::valarray (size_t __n) 
+      : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+  { __valarray_default_construct(_M_data, _M_data + __n); }
+
+  template
+  inline valarray<_Tp>::valarray (const _Tp& __t, size_t __n)
+    : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+  { __valarray_fill_construct (_M_data, _M_data + __n, __t); }
+
+  template
+  inline valarray<_Tp>::valarray (const _Tp* __restrict__ __p, size_t __n)
+    : _M_size(__n), _M_data(__valarray_get_storage<_Tp>(__n))
+  { __valarray_copy_construct (__p, __p + __n, _M_data); }
+
+  template
+  inline valarray<_Tp>::valarray (const valarray<_Tp>& __v)
+    : _M_size(__v._M_size), _M_data(__valarray_get_storage<_Tp>(__v._M_size))
+  { __valarray_copy_construct (__v._M_data, __v._M_data + _M_size, _M_data); }
+
+  template
+  inline valarray<_Tp>::valarray (const slice_array<_Tp>& __sa)
+    : _M_size(__sa._M_sz), _M_data(__valarray_get_storage<_Tp>(__sa._M_sz))
+  {
+    __valarray_copy
+      (__sa._M_array, __sa._M_sz, __sa._M_stride, _Array<_Tp>(_M_data));
+  }
+
+  template
+  inline valarray<_Tp>::valarray (const gslice_array<_Tp>& __ga)
+    : _M_size(__ga._M_index.size()),
+      _M_data(__valarray_get_storage<_Tp>(_M_size))
+  {
+    __valarray_copy
+      (__ga._M_array, _Array(__ga._M_index),
+       _Array<_Tp>(_M_data), _M_size);
+  }
+
+  template
+  inline valarray<_Tp>::valarray (const mask_array<_Tp>& __ma)
+    : _M_size(__ma._M_sz), _M_data(__valarray_get_storage<_Tp>(__ma._M_sz))
+  {
+    __valarray_copy
+      (__ma._M_array, __ma._M_mask, _Array<_Tp>(_M_data), _M_size);
+  }
+
+  template
+  inline valarray<_Tp>::valarray (const indirect_array<_Tp>& __ia)
+    : _M_size(__ia._M_sz), _M_data(__valarray_get_storage<_Tp>(__ia._M_sz))
+  {
+    __valarray_copy
+      (__ia._M_array, __ia._M_index, _Array<_Tp>(_M_data), _M_size);
+  }
+
+  template template
+  inline valarray<_Tp>::valarray (const _Expr<_Dom, _Tp>& __e)
+    : _M_size(__e.size ()), _M_data(__valarray_get_storage<_Tp>(_M_size))
+  { __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data)); }
+
+  template
+  inline valarray<_Tp>::~valarray ()
+  {
+      __valarray_destroy_elements(_M_data, _M_data + _M_size);
+      __valarray_release_memory(_M_data);
+  }
+
+  template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const valarray<_Tp>& __v)
+  {
+      __valarray_copy(__v._M_data, _M_size, _M_data);
+      return *this;
+  }
+
+  template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const _Tp& __t)
+  {
+      __valarray_fill (_M_data, _M_size, __t);
+      return *this;
+  }
+
+  template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const slice_array<_Tp>& __sa)
+  {
+      __valarray_copy (__sa._M_array, __sa._M_sz,
+              __sa._M_stride, _Array<_Tp>(_M_data));
+      return *this;
+  }
+
+  template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const gslice_array<_Tp>& __ga)
+  {
+      __valarray_copy (__ga._M_array, _Array(__ga._M_index),
+              _Array<_Tp>(_M_data), _M_size);
+      return *this;
+  }
+
+  template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const mask_array<_Tp>& __ma)
+  {
+      __valarray_copy (__ma._M_array, __ma._M_mask,
+              _Array<_Tp>(_M_data), _M_size);
+      return *this;
+  }
+
+  template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const indirect_array<_Tp>& __ia)
+  {
+      __valarray_copy (__ia._M_array, __ia._M_index,
+               _Array<_Tp>(_M_data), _M_size);
+      return *this;
+  }
+
+  template template
+  inline valarray<_Tp>&
+  valarray<_Tp>::operator= (const _Expr<_Dom, _Tp>& __e)
+  {
+      __valarray_copy (__e, _M_size, _Array<_Tp>(_M_data));
+      return *this;
+  }
+
+  template
+  inline _Expr<_SClos<_ValArray,_Tp>, _Tp>
+  valarray<_Tp>::operator[] (slice __s) const
+  {
+      typedef _SClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, _Tp> (_Closure (_Array<_Tp>(_M_data), __s));
+  }
+
+  template
+  inline slice_array<_Tp>
+  valarray<_Tp>::operator[] (slice __s)
+  {
+      return slice_array<_Tp> (_Array<_Tp>(_M_data), __s);
+  }
+
+  template
+  inline _Expr<_GClos<_ValArray,_Tp>, _Tp>
+  valarray<_Tp>::operator[] (const gslice& __gs) const
+  {
+      typedef _GClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, _Tp>
+          (_Closure (_Array<_Tp>(_M_data), __gs._M_index->_M_index));
+  }
+
+  template
+  inline gslice_array<_Tp>
+  valarray<_Tp>::operator[] (const gslice& __gs)
+  {
+      return gslice_array<_Tp>
+          (_Array<_Tp>(_M_data), __gs._M_index->_M_index);
+  }
+
+  template
+  inline valarray<_Tp>
+  valarray<_Tp>::operator[] (const valarray& __m) const
+  {
+      size_t __s (0);
+      size_t __e (__m.size ());
+      for (size_t __i=0; __i<__e; ++__i)
+          if (__m[__i]) ++__s;
+      return valarray<_Tp> (mask_array<_Tp> (_Array<_Tp>(_M_data), __s,
+                                         _Array (__m)));
+  }
+
+  template
+  inline mask_array<_Tp>
+  valarray<_Tp>::operator[] (const valarray& __m)
+  {
+      size_t __s (0);
+      size_t __e (__m.size ());
+      for (size_t __i=0; __i<__e; ++__i)
+          if (__m[__i]) ++__s;
+      return mask_array<_Tp> (_Array<_Tp>(_M_data), __s, _Array (__m));
+  }
+
+  template
+  inline _Expr<_IClos<_ValArray,_Tp>, _Tp>
+  valarray<_Tp>::operator[] (const valarray& __i) const
+  {
+      typedef _IClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure, _Tp> (_Closure (*this, __i));
+  }
+
+  template
+  inline indirect_array<_Tp>
+  valarray<_Tp>::operator[] (const valarray& __i)
+  {
+      return indirect_array<_Tp> (_Array<_Tp>(_M_data), __i.size(),
+                                _Array (__i));
+  }
+
+  template
+  inline size_t valarray<_Tp>::size () const { return _M_size; }
+
+  template
+  inline _Tp
+  valarray<_Tp>::sum () const
+  {
+      return __valarray_sum(_M_data, _M_data + _M_size);
+  }
+
+//   template
+//   inline _Tp
+//   valarray<_Tp>::product () const
+//   {
+//       return __valarray_product(_M_data, _M_data + _M_size);
+//   }
+
+  template 
+     inline valarray<_Tp>
+     valarray<_Tp>::shift(int __n) const
+     {
+       _Tp* const __a = static_cast<_Tp*>
+         (__builtin_alloca(sizeof(_Tp) * _M_size));
+       if (__n == 0)                          // no shift
+         __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
+       else if (__n > 0)         // __n > 0: shift left
+         {                 
+           if (size_t(__n) > _M_size)
+             __valarray_default_construct(__a, __a + __n);
+           else
+             {
+               __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
+               __valarray_default_construct(__a+_M_size-__n, __a + _M_size);
+             }
+         }
+       else                        // __n < 0: shift right
+         {                          
+           __valarray_copy_construct (_M_data, _M_data+_M_size+__n, __a-__n);
+           __valarray_default_construct(__a, __a - __n);
+         }
+       return valarray<_Tp> (__a, _M_size);
+     }
+
+  template 
+     inline valarray<_Tp>
+     valarray<_Tp>::cshift (int __n) const
+     {
+       _Tp* const __a = static_cast<_Tp*>
+         (__builtin_alloca (sizeof(_Tp) * _M_size));
+       if (__n == 0)               // no cshift
+         __valarray_copy_construct(_M_data, _M_data + _M_size, __a);
+       else if (__n > 0)           // cshift left
+         {               
+           __valarray_copy_construct(_M_data, _M_data+__n, __a+_M_size-__n);
+           __valarray_copy_construct(_M_data+__n, _M_data + _M_size, __a);
+         }
+       else                        // cshift right
+         {                       
+           __valarray_copy_construct
+             (_M_data + _M_size+__n, _M_data + _M_size, __a);
+           __valarray_copy_construct
+             (_M_data, _M_data + _M_size+__n, __a - __n);
+         }
+       return valarray<_Tp>(__a, _M_size);
+     }
+
+  template 
+  inline void
+  valarray<_Tp>::resize (size_t __n, _Tp __c)
+  {
+    // This complication is so to make valarray > work
+    // even though it is not required by the standard.  Nobody should
+    // be saying valarray > anyway.  See the specs.
+    __valarray_destroy_elements(_M_data, _M_data + _M_size);
+    if (_M_size != __n)
+      {
+        __valarray_release_memory(_M_data);
+        _M_size = __n;
+        _M_data = __valarray_get_storage<_Tp>(__n);
+      }
+    __valarray_fill_construct(_M_data, _M_data + __n, __c);
+  }
+    
+  template
+  inline _Tp
+  valarray<_Tp>::min() const
+  {
+      return *min_element (_M_data, _M_data+_M_size);
+  }
+
+  template
+  inline _Tp
+  valarray<_Tp>::max() const
+  {
+      return *max_element (_M_data, _M_data+_M_size);
+  }
+  
+  template
+  inline _Expr<_ValFunClos<_ValArray,_Tp>,_Tp>
+  valarray<_Tp>::apply (_Tp func (_Tp)) const
+  {
+      typedef _ValFunClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure,_Tp> (_Closure (*this, func));
+  }
+
+  template
+  inline _Expr<_RefFunClos<_ValArray,_Tp>,_Tp>
+  valarray<_Tp>::apply (_Tp func (const _Tp &)) const
+  {
+      typedef _RefFunClos<_ValArray,_Tp> _Closure;
+      return _Expr<_Closure,_Tp> (_Closure (*this, func));
+  }
+
+#define _DEFINE_VALARRAY_UNARY_OPERATOR(_Op, _Name)                     \
+  template						\
+  inline _Expr<_UnClos<_Name,_ValArray,_Tp>, _Tp>               	\
+  valarray<_Tp>::operator _Op() const					\
+  {									\
+      typedef _UnClos<_Name,_ValArray,_Tp> _Closure;	                \
+      return _Expr<_Closure, _Tp> (_Closure (*this));			\
+  }
+
+    _DEFINE_VALARRAY_UNARY_OPERATOR(+, _Unary_plus)
+    _DEFINE_VALARRAY_UNARY_OPERATOR(-, negate)
+    _DEFINE_VALARRAY_UNARY_OPERATOR(~, _Bitwise_not)
+
+#undef _DEFINE_VALARRAY_UNARY_OPERATOR
+  
+  template
+  inline _Expr<_UnClos, bool>
+  valarray<_Tp>::operator!() const
+  {
+      typedef _UnClos _Closure;
+      return _Expr<_Closure, bool> (_Closure (*this));
+  }
+
+#define _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(_Op, _Name)               \
+  template							\
+  inline valarray<_Tp> &						\
+  valarray<_Tp>::operator _Op##= (const _Tp &__t)			\
+  {									\
+      _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, __t);	\
+      return *this;							\
+  }									\
+									\
+  template							\
+  inline valarray<_Tp> &						\
+  valarray<_Tp>::operator _Op##= (const valarray<_Tp> &__v)		\
+  {									\
+      _Array_augmented_##_Name (_Array<_Tp>(_M_data), _M_size, 		\
+                               _Array<_Tp>(__v._M_data));		\
+      return *this;							\
+  }
+
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(+, plus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(-, minus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(*, multiplies)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(/, divides)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(%, modulus)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(^, xor)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(&, and)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(|, or)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(<<, shift_left)
+_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT
+
+
+} // std::
+  
+
+namespace std
+{
+
+#define _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(_Op, _Name)          \
+  template template				\
+  inline valarray<_Tp> &						\
+  valarray<_Tp>::operator _Op##= (const _Expr<_Dom,_Tp> &__e)		\
+  {									\
+      _Array_augmented_##_Name (_Array<_Tp>(_M_data), __e, _M_size);	\
+      return *this;							\
+  }
+
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(+, plus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(-, minus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(*, multiplies)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(/, divides)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(%, modulus)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(^, xor)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(&, and)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(|, or)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(<<, shift_left)
+_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT(>>, shift_right)
+
+#undef _DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT
+    
+
+#define _DEFINE_BINARY_OPERATOR(_Op, _Name)				\
+  template						\
+  inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>, _Tp>        \
+  operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w)	\
+  {									\
+      typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, _Tp> (_Closure (__v, __w));		\
+  }									\
+									\
+  template						\
+  inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,_Tp>         \
+  operator _Op (const valarray<_Tp> &__v, const _Tp &__t)		\
+  {									\
+      typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure;	\
+      return _Expr<_Closure, _Tp> (_Closure (__v, __t));	        \
+  }									\
+									\
+  template						\
+  inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,_Tp>         \
+  operator _Op (const _Tp &__t, const valarray<_Tp> &__v)		\
+  {									\
+      typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, _Tp> (_Closure (__t, __v));        	\
+  }
+
+_DEFINE_BINARY_OPERATOR(+, plus)
+_DEFINE_BINARY_OPERATOR(-, minus)
+_DEFINE_BINARY_OPERATOR(*, multiplies)
+_DEFINE_BINARY_OPERATOR(/, divides)
+_DEFINE_BINARY_OPERATOR(%, modulus)
+_DEFINE_BINARY_OPERATOR(^, _Bitwise_xor)
+_DEFINE_BINARY_OPERATOR(&, _Bitwise_and)
+_DEFINE_BINARY_OPERATOR(|, _Bitwise_or)
+_DEFINE_BINARY_OPERATOR(<<, _Shift_left)
+_DEFINE_BINARY_OPERATOR(>>, _Shift_right)
+
+#undef _DEFINE_BINARY_OPERATOR
+
+#define _DEFINE_LOGICAL_OPERATOR(_Op, _Name)				\
+  template						\
+  inline _Expr<_BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp>,bool>        \
+  operator _Op (const valarray<_Tp> &__v, const valarray<_Tp> &__w)	\
+  {									\
+      typedef _BinClos<_Name,_ValArray,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, bool> (_Closure (__v, __w));               \
+  }									\
+									\
+  template							\
+  inline _Expr<_BinClos<_Name,_ValArray,_Constant,_Tp,_Tp>,bool>        \
+  operator _Op (const valarray<_Tp> &__v, const _Tp &__t)		\
+  {									\
+      typedef _BinClos<_Name,_ValArray,_Constant,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, bool> (_Closure (__v, __t));       	\
+  }									\
+									\
+  template							\
+  inline _Expr<_BinClos<_Name,_Constant,_ValArray,_Tp,_Tp>,bool>        \
+  operator _Op (const _Tp &__t, const valarray<_Tp> &__v)		\
+  {									\
+      typedef _BinClos<_Name,_Constant,_ValArray,_Tp,_Tp> _Closure;     \
+      return _Expr<_Closure, bool> (_Closure (__t, __v));	        \
+  }
+
+_DEFINE_LOGICAL_OPERATOR(&&, logical_and)
+_DEFINE_LOGICAL_OPERATOR(||, logical_or)
+_DEFINE_LOGICAL_OPERATOR(==, equal_to)
+_DEFINE_LOGICAL_OPERATOR(!=, not_equal_to)
+_DEFINE_LOGICAL_OPERATOR(<, less)
+_DEFINE_LOGICAL_OPERATOR(>, greater)
+_DEFINE_LOGICAL_OPERATOR(<=, less_equal)
+_DEFINE_LOGICAL_OPERATOR(>=, greater_equal)
+
+#undef _DEFINE_LOGICAL_OPERATOR
+
+} // namespace std
+
+#endif // _CPP_VALARRAY
+
+// Local Variables:
+// mode:c++
+// End:
diff --git a/contrib/libstdc++/include/std/std_vector.h b/contrib/libstdc++/include/std/std_vector.h
new file mode 100644
index 0000000..4120aa9
--- /dev/null
+++ b/contrib/libstdc++/include/std/std_vector.h
@@ -0,0 +1,78 @@
+//  -*- C++ -*-
+
+// 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
+// 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.
+
+/*
+ *
+ * Copyright (c) 1994
+ * Hewlett-Packard Company
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Hewlett-Packard Company makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ *
+ *
+ * Copyright (c) 1996
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+/** @file vector
+ *  This is a Standard C++ Library header.  You should @c #include this header
+ *  in your programs, rather than any of the "st[dl]_*.h" implementation files.
+ */
+
+#ifndef _CPP_VECTOR
+#define _CPP_VECTOR 1
+
+#pragma GCC system_header
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include  
+
+#endif /* _CPP_VECTOR */
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/libio/ChangeLog b/contrib/libstdc++/libio/ChangeLog
new file mode 100644
index 0000000..86c0903
--- /dev/null
+++ b/contrib/libstdc++/libio/ChangeLog
@@ -0,0 +1,2774 @@
+2001-02-03  Alexandre Oliva  
+            Gerald Pfeifer  
+
+        * Makefile.am (mkinstalldirs): Set.
+
+2001-01-28  Benjamin Kosnik  
+
+	* Makefile.am (LIBIO_SRCS): Remove stdio.c.
+
+2000-10-29  Benjamin Kosnik  
+
+	* Makefile.am (INCLUDES): Change to $(top_builddir)/include.
+
+2000-10-29  Mark Mitchell  
+
+	* iofopen.c (_IO_new_fopen): Don't define `_IO_wide_data wd'
+	if _GLIBCPP_USE_WCHAR_T is not defined.
+	* iofwide.c: Don't define codecvt functions when 
+	_GLIBCPP_USE_WCHAR_T is not defined.
+	(_IO_fwide): Don't try to put the stream in wide mode when
+	_GLIBCPP_USE_WCHAR_T is not defined.
+	* libio.h (_IO_wide_data): Define it as an incomplete struct
+	when _GLIBCPP_USE_WCHAR_T is not defined.
+	* wfiledoalloc.c: Don't define anything when 
+	_GLIBCPP_USE_WCHAR_T is not defined.
+	* wfileops.c: Likewise.
+	* wgenops.c: Likewise.
+	
+	* _G_config.h (_G_USING_THUNKS): Allow overrides from
+	OS-configuration files.
+	* libioP.h: Test _G_USING_THUNKS with #if, rather than #ifdef.
+
+2000-10-17  Benjamin Kosnik  
+
+	* libioP.h: Break up extern "C" bits around includes.
+	* libio.h: Only include C headers, or else _C_legacy namespaces
+	will be nested.
+	* libioP.h: Same here.
+	
+2000-10-11  Benjamin Kosnik  
+
+	* Makefile.am: Add includes from GLIBCPP_EXPORT_INCLUDES.
+
+2000-10-10  Benjamin Kosnik  
+
+	* _G_config.h (__need_ptrdiff_t): Add.
+
+2000-10-08  Benjamin Kosnik  
+
+	* Makefile.am (INCLUDES): Simplify.
+	* libioP.h (JUMP1): If compiling c++, use std headers.
+	* _G_config.h: Same.
+	
+2000-10-07  Benjamin Kosnik  
+
+	* Makefile.am (CONFIG_INCLUDES): Remove.
+
+2000-10-06   Benjamin Kosnik  
+
+	* Makefile.am (libio_la_DEPENDENCIES): Remove extaneous cruft.
+	(libio_la_SOURCES): Remove.
+	
+2000-10-05  Benjamin Kosnik  
+
+	* Makefile.am (INCLUDES): Add glibcpp_includedir.
+
+2000-10-04  Benjamin Kosnik  
+
+	* _G_config.h : Re-guard the __mbstate_t declaration.
+
+2000-09-27  Benjamin Kosnik  
+
+	* libioP.h: Remove fcntl.h include.
+
+2000-08-22  Benjamin Kosnik  
+
+	* iofwide.c (_IO_fwide): Simplify, as nl_langinfo is assumed.
+
+2000-08-14  Benjamin Kosnik  
+
+	* *: Merge with mainline glibc sources.
+	* filedoalloc.c (_IO_file_doallocate): Don't call
+	_IO_cleanup_registration_needed, even if not libc.
+	* iofwide.c (_IO_fwide): Correct placement of defines.
+	* cleanup.c: Remove.
+	
+2000-08-04  benjamin kosnik  
+
+	* genops.c (_IO_unbuffer_write): Don't call _IO_SETBUF if the
+	stream is not orientated.
+
+2000-08-04  Benjamin Kosnik  
+
+	* Makefile.am (LIBIO_SRCS): Add c_codecvt.c
+
+2000-07-12  benjamin kosnik  
+
+	* _G_config.h: Smoke less crack, don't define _G_HAVE_ST_BLKSIZE.
+
+2000-04-25  Benjamin Kosnik  
+
+	* libio.h: Change decls for seekoff/seekpos.
+	* Makefile.am: Add bits to not generate _G_config.h on linux.
+	* gen-params: Remove sigset_t declaration.
+
+2000-02-29  Benjamin Kosnik  
+
+	* Makefile.am (libio_headers): Strip out deadweight.
+
+2000-02-21  Benjamin Kosnik  
+
+	* gen-params (CONFIG_NM): Specifically add in nm as the
+	default CONFIG_NM.
+
+2000-02-10  Benjamin Kosnik  
+
+	* Makefile.am: Add bits for _G_config.h generation.
+	* gen-params: New file.
+	
+2000-02-07  Benjamin Kosnik  
+
+	* Makefile.am: Change license.
+
+1999-07-28  Benjamin Kosnik  
+
+	* Makefile.am (libio_la_SOURCES): Remove cleanup.c, so that
+	_IO_cleanup will not be undefined.
+
+1998-11-26  Manfred Hollstein  
+
+	* configure.in (compiler_name): Add check to detect if this
+	language's compiler has been built.
+
+1998-10-12  Alexandre Oliva  
+
+	* config.shared (depend.new): delete libc-lock.h from
+	dependencies, and fix _G_config.h -> $(_G_CONFIG_H) rule
+	* depend: Rebuilt.
+	
+Sun Oct 11 01:51:42 1998  Jeffrey A Law  (law@cygnus.com)
+
+	* config.shared (depend.new): Fix typo.
+	* depend: Rebuilt.
+
+1998-09-09  Manfred Hollstein  
+
+	* configure.in (INSTALLDIR): Fix comment about changing INSTALLDIR's
+	value; don't change its value if --enable-version-specific-runtime-libs
+	has been specified.
+
+Wed Sep  2 21:05:39 1998  H.J. Lu  (hjl@gnu.org)
+
+	* configure.in: Fix INSTALLDIR replacement for cross-compile.
+
+Sun Aug 30 22:27:02 1998  Lutz Wohlrab 
+
+        * dbz/Makefile.in: Avoid assumptions about "tr" behaves when
+        LANG is set to something other than English.
+
+Sun Aug 30 22:17:00 1998  H.J. Lu  (hjl@gnu.org)
+
+	* config.shared: Set libsubdir.
+
+1998-08-25 14:34  Ulrich Drepper  
+
+	* libio/iogetline.c (_IO_getline_info): Don't read anything for
+	N == 0.  Patch by HJ Lu.
+
+1998-08-23  Mark Mitchell  
+
+	* iomanip.h: Use __extension__ for `extern' explicit template
+	instantiations.
+
+1998-08-17  Ulrich Drepper  
+
+	* strfile.h: Define __PMT if not already defined.
+
+1998-08-03  Andreas Jaeger  
+
+	* libioP.h: Use __PMT in typedefs.
+	* strfile.h: Likewise.
+
+1998-06-29  Ulrich Drepper  
+
+	* libio.h: Rewrite __PMT change so that it works with platforms
+	defining __P but not __PMT.
+
+	* libio.h (__PMT): New macro.  Defined like __P.  Use is for
+	function pointers.
+
+1998-06-27  Manfred Hollstein  
+
+	* Makefile.in (install): Remove superfluous /include.
+
+1998-06-26  Manfred Hollstein  
+
+	* config.shared (FLAGS_TO_PASS): Add gcc_version_trigger.
+	(Makefile): Add dependency upon $(gcc_version_trigger).
+
+1998-06-24  Manfred Hollstein  
+
+	* Makefile.in (install): Install _G_config.h depending on new flag
+	--enable-version-specific-runtime-libs.
+	* config/linux.mt (gxx_include_dir): Remove definition here as we use
+	gcc's default anyway.
+
+1998-06-24  Manfred Hollstein  
+
+	* config.shared (FLAGS_TO_PASS): Add gcc_version.
+
+1998-06-19  Manfred Hollstein  
+
+	* config.shared (FLAGS_TO_PASS): Add libsubdir.
+
+1998-06-07  Andreas Schwab  
+
+	* genops.c (__underflow): Read character from read pointer as unsigned.
+	(__uflow): Likewise.
+
+1998-05-22  Ulrich Drepper  
+
+	* strops.c (_IO_str_underflow): Read newly available character
+	from buffer as unsigned.
+
+Sun Apr 19 22:13:36 1998  H.J. Lu  (hjl@gnu.org)
+
+	* isgetline.cc (istream::get): Fix a typo.
+
+Thu Mar  5 09:23:28 1998  Manfred Hollstein  
+
+	* configure.in: Make locating frag files failsafe even for the
+	special case if configuring and building in srcdir.
+
+1998-02-24  Andreas Schwab  
+
+	Changes for _G_IO_IO_FILE_VERSION == 0x20001:
+	* libioP.h (_IO_showmanyc_t, _IO_SHOWMANYC, _IO_imbue_t,
+	_IO_IMBUE): New definitions.
+	(struct _IO_jump_t): Add __showmanyc and __imbue fields.
+	(_IO_file_fopen): Add new fourth argument.
+	* filebuf.cc (filebuf::open): Pass new fourth argument to
+	_IO_file_fopen.
+	* iolibio.h (_IO_freopen): Likewise.
+	* streambuf.cc (streambuf::showmanyc, streambuf::imbue): New
+	functions.
+	* streambuf.h (_IO_wchar_t): Define to _G_wchar_t.
+	(ios::fill): Remove casts.
+	(struct streambuf): Add showmanyc and imbue members.
+
+	* iostream.cc (ostream::operator<<(double n)) [__GLIBC_MINOR__ >=
+	1]: Initialize new fields is_char of struct printf_info.
+	(ostream::operator<<(long double n)) [__GLIBC_MINOR__ >= 1]:
+	Likewise.
+
+Sun Feb 22 17:24:53 1998  Jeffrey A Law  (law@cygnus.com)
+
+	* config.shared: Bring back changes from Ian and Fred that were
+	accidentally clobbered.  Should eliminate the need for Dave's
+	recent change.
+
+Tue Feb 17 21:56:25 1998  H.J. Lu  (hjl@gnu.org)
+
+	* config/linux.mt (IO_OBJECTS): Add iogetline.o.
+	* config/linuxlibc1.mt: Ditto.
+
+	* iogetline.c (_IO_getline_info): Renamed from _IO_getline.
+	(_IO_getline): Just call _IO_getline_info.
+
+	* isgetline.cc (istream::getline, istream::get, _sb_readline):
+	Call _IO_getline_info instead of _IO_getline and get the EOF
+	information.
+	* sbgetline.cc (streambuf::sgetline): Ditto.
+
+	* libioP.h (_IO_getline_info): New declaration.
+
+	* iogetline.c (_IO_getline): Handle the case when there is no
+	buffer.
+
+Fri Feb 13 00:57:20 1998  Krister Walfridsson (cato@df.lth.se)
+
+	* fileops.c: #include .
+	* ioprims.c: Likewise.
+
+1998-02-10  Mark Mitchell  
+
+	* iostream.cc (ostream::operator<<(long double)): Don't use
+	labeled initializers.
+
+Fri Feb  6 01:35:56 1998  Manfred Hollstein  
+
+	* config.shared (FLAGS_TO_PASS): Don't emit PICFLAG.
+	(.c.o): Check value of enable_shared, not PICFLAG.
+	(.C.o): Dito.
+	(.cc.o): Dito.
+	(stamp-picdir): Dito.
+
+Thu Feb  5 17:41:26 1998  Dave Brolley  
+
+	* config.shared (LIBS): Change to -L../../libstdc++ (was -L../libstdc++)
+	if ${DOING_GPERF} is true.
+
+1998-01-20  Andreas Schwab  (schwab@issan.informatik.uni-dortmund.de)
+
+	* iostream.cc (istream::operator>>(long double&))
+	[!_G_HAVE_LONG_DOUBLE_IO]: Scan value into separate variable, in
+	case long double is bigger than double.
+	(ostream::operator<<(double)) [_G_HAVE_PRINTF_FP]: Fix order of
+	initializers of struct printf_info to match declaration order,
+	to work around g++ bug.
+	(ostream::operator<<(long double)) [_G_HAVE_PRINTF_FP]: Likewise.
+
+	* gen-params: Add missing quotes.  Avoid useless use of command
+	substitution.
+
+Sun Feb  1 13:29:47 1998  H.J. Lu  (hjl@gnu.org)
+
+	* filebuf.cc (filebuf::open): Call _IO_file_open if
+	_G_HAVE_IO_FILE_OPEN is 1.
+
+	* libio.h (_IO_fpos64_t, _IO_off64_t): Defined if
+	_G_IO_IO_FILE_VERSION == 0x20001.
+
+	* libioP.h (_IO_file_open): New declaration.
+
+	* libio.h (_IO_FILE, _IO_stdin_, _IO_stdout_, _IO_stderr_,
+	_IO_seekoff, _IO_seekpos): Add support for libio in glibc 2.1.
+	* libioP.h (_IO_seekoff_t, _IO_seekpos_t, _IO_seek_t,
+	_IO_seekoff, _IO_seekpos, _IO_default_seekoff,
+	_IO_default_seekpos, _IO_default_seek, _IO_file_seekoff,
+	_IO_file_seek, _IO_str_seekoff, _IO_pos_BAD, _IO_pos_as_off,
+	_IO_pos_0): Ditto.
+	* streambuf.h (streamoff, streampos): Ditto.
+
+	* gen-params (__extension__): Use only if gcc version >= 2.8.
+
+Sun Feb  1 13:08:18 1998  Krister Walfridsson (cato@df.lth.se)
+
+	* dbz/dbz.c (putconf): Handle systems which use "long long" as type
+	for "off_t".
+	* dbz/dbzmain.c (mkfiles): Likewise.
+
+Wed Jan 28 10:27:11 1998  Manfred Hollstein  
+
+	* config.shared (FLAGS_TO_PASS): Add gxx_include_dir.
+
+	* stdio/configure.in, tests/configure.in: Update with yesterday's
+	toplevel configure.in changes.
+	* testsuite/configure.in: Likewise.
+
+	* config.shared: Fix typo in yesterday's changes.
+
+Tue Jan 27 23:26:07 1998  Manfred Hollstein  
+
+	* config.shared: Emit everything which needs to be re-definable
+	via file descriptor 1; the generic stuff is emitted using redirection
+	onto fd 2.
+
+	* configure.in (package_makefile_rules_frag): New variable
+	which is used in the call to config.shared; redirect file descriptor 2
+	to ${package_makefile_rules_frag}.
+
+Tue Jan 27 10:35:22 1998  H.J. Lu  (hjl@gnu.org)
+
+	* configure.in (topsrcdir): New.
+	(CHECK_SUBDIRS, configdirs): Check ${topsrcdir}/gcc instead.
+	(config-ml.in): Use ${topsrcdir}/config-ml.in.
+
+	* tests/configure.in (topsrcdir): New.
+	(CHECK): Check ${topsrcdir}/gcc instead.
+
+Fri Jan 16 00:48:03 1998  Manfred Hollstein  
+
+	* config.shared (FLAGS_TO_PASS): Add SHELL.
+
+Thu Jan 15 00:21:58 1998  Ian Lance Taylor  
+
+	* configure.in: For *-*-cygwin32*, add a -I for winsup to both
+	XCINCLUDES and XCXXINCLUDES.
+	* config.shared: Use ${host_includes} when setting CXXINCLUDES in
+	the DOING_LIBGXX case.
+	* Makefile.in (_G_config.h): Pass $(CINCLUDES) in CC and
+	$(CXXINCLUDES) in CXX when running gen-params.
+
+Tue Jan 13 21:32:08 1998  H.J. Lu  (hjl@gnu.org)
+
+	* configure.in (CHECK_SUBDIRS): Set to testsuite only if
+	${srcdir}/../gcc exists.
+	(configdirs): Include testsuite only if ${srcdir}/../gcc exists.
+
+	* tests/Makefile.in (check): Depend on $(CHECK).
+
+	* tests/configure.in (CHECK): Set to "check-iostream
+	check-stdio" if ${srcdir}/../../gcc doesn't exists.
+
+Thu Jan  8 18:09:03 1998  Fred Fish  
+
+	* config.shared (THIS_FILE): Really found via TOLIBIO instead
+	of TOLIBCXX, which is empty when configuring gperf.
+	(LIBS): When linking gperf, find libstdc++ relative to TO_TOPDIR
+	instead of hardcoded "../".
+
+1997-12-12  Brendan Kehoe  
+
+	Don't make gperf depend upon libg++.
+	* config.shared (TOLIBGCXX) [DOING_GPERF]: Delete.
+	(LIBS) [DOING_GPERF]: Make it just `-L../libstdc++ -lstdc++'.
+
+Thu Dec 11 11:20:59 1997  H.J. Lu  (hjl@gnu.org)
+
+	* configure.in (target frags): Add *-linux-gnu.
+
+Fri Dec  5 16:22:15 1997  H.J. Lu  (hjl@gnu.org)
+
+	* streambuf.cc (streambuf::~streambuf): Don't delete _lock
+	for _IO_stdin/_IO_stdout/_IO_stderr.
+
+Thu Nov 27 01:32:43 1997  Jeffrey A Law  (law@cygnus.com)
+
+	* Makefile.in (install): Change gxx_includedir to gcc_include_dir.
+	* config.shared (gxx_includedir): Remove default definition.
+	* config/linux.mt: Change gxx_includedir to gxx_include_dir.
+	* config/linuxaxp1.mt: Likewise.
+
+Wed Nov 26 16:08:50 1997  Richard Henderson  (rth@cygnus.com)
+
+	* configure.in (target frags): Add powerpc*-linux-gnulibc1.
+	(stdio-lock): Similarly.
+
+	* configure.in (target frags): Add alpha*-linux-gnulibc1.
+	(pic frags): Its alpha*- not alpha-.
+	(stdio-lock): Kill everything.  Add alpha*-linux-gnulibc1.
+	* libio.h: Check __GLIBC_MINOR__ to find stdio-lock.h.  If not
+	_IO_MTSAFE_IO & GLIBC, make sure the lock pointer is still there.
+	* libioP.h: Check __GLIBC_MINOR__ to find libc-lock.h.
+
+	* config/linuxaxp1-libc-lock.h: New file.
+	* config/linuxaxp1-stdio-lock.h: New file.
+	* config/linuxaxp1.mt: New file.
+
+	* gen-params (va_list): Check for and use __gnuc_va_list.
+	(NULL): Work around some linux kernel headers and redefine NULL.
+
+Mon Nov 24 17:04:18 1997  Michael Meissner  
+
+	* stdiostream.cc (sys_read): Declare ch with int type, rather than
+	without a type.
+
+Tue Nov 18 09:53:58 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
+
+	* stdstrbufs.cc (DEF_STDFILE): Use STD_VTABLE.
+
+Tue Nov 11 01:40:17 1997  Oleg Krivosheev 
+
+	* iomanip.h: Fix guiding decls.
+
+1997-11-05  Brendan Kehoe  
+
+	* libio.h (__P): Name its arg `p' instead of `params'.
+	Avoids problems with an unchanged Solaris math.h header.
+
+Wed Oct 29 23:01:47 1997  Jason Merrill  
+
+	* gen-params: Override NULL.
+
+1997-10-27 03:53  Ulrich Drepper  
+
+	* stdio-lock.h: Removed.  Was never needed.
+
+Wed Oct 22 19:19:32 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
+
+	* libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
+	not defined.
+
+	* iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
+	__linux__ is defined instead of __ELF__
+
+	* config/linuxlibc1.mt (USER_INCLUDES): Add libio.h.
+
+1997-10-15  Ulrich Drepper  
+
+	* configure.in: Create compatibility code in bits/libc-lock.h file.
+
+Thu Oct  9 07:08:41 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
+
+	* libio.h (_IO_LOCK_T): Handle glibc 2 when _IO_MTSAFE_IO is
+	not defined.
+
+	* filedoalloc.c (_IO_file_doallocate): Don't call
+	_IO_cleanup_registration_needed if __linux__ is defined.
+
+	* iofclose.c (fclose): Make it weak alias of _IO_fclose if
+	__ELF__ is defined.
+
+	* iovsprintf.c (vsprintf): Make it weak alias of _IO_vsprintf
+	if __ELF__ is defined.
+
+	* iovsscanf.c (vsscanf): Make it weak alias of _IO_vsscanf if
+	__ELF__ is defined.
+
+	* config/linuxlibc1.mt (MT_CFLAGS): Defined as -D_G_HAVE_MMAP.
+	(IO_OBJECTS): Add filedoalloc.o fileops.o genops.o iofclose.o
+	iovsprintf.o iovsscanf.o strops.o.
+
+Fri Oct  3 10:13:13 1997  Jason Merrill  
+
+	* iostream.cc, libio.h: Convert other uses of #ifdef
+	_G_HAVE_PRINTF_FP to #if.
+
+1997-10-02  Brendan Kehoe  
+
+	* iostream.cc (operator<<): Use `#if _G_HAVE_PRINTF_FP', not ifdef.
+
+Thu Oct  2 10:36:49 1997  Jason Merrill  
+
+	* gen-params: Fix __printf_fp test.
+	* config/linuxlibc1.mt (gxx_includedir): Don't define.
+
+Thu Oct  2 10:36:26 1997  Ulrich Drepper  
+
+	* config/linuxlibc1.mt (_G_CONFIG_H): Don't define.
+	* gen-params: Add test for __printf_fp.
+
+Sun Sep 28 12:09:04 1997  Mark Mitchell  
+
+        * iomanip.h: Use new friend <> syntax.
+
+Sun Sep 28 12:04:21 1997  Jason Merrill  
+
+	* libio.h: Don't use _IO_LOCK_T if it's not defined.
+
+Fri Sep 26 20:56:41 1997
+
+	Based on a patch by H.J. Lu  (hjl@gnu.ai.mit.edu).
+
+	* Makefile.in (STDIO_OBJECTS): New. Defined as stdfiles.o.
+	(LIBIO_OBJECTS): Add $(STDIO_OBJECTS).
+	(PICFLAG): New, empty.  moved to here from config.shared.
+
+	* config.shared (DISTCLEAN): Add target-mkfrag.
+	(PICFLAG): Removed.
+
+	* configure.in (*-linux-gnulibc1): Remove warning.
+	(*-linux-gnu): Use linux.mt mtsafe.mt.
+	(alpha-*-linux*): Use mh-elfalphapic.
+
+	* gen-params (_G_ullong): Also check unsigned long long int.
+	(_G_llong): Also check long long int.
+
+	* libio.h (_IO_lock_t): Add support for the Linux libc 5.
+	(_IO_peekc): Defined as _IO_peekc_unlocked if _IO_MTSAFE_IO
+	is not defined.
+
+	* iostream.cc (__cvt_double): Fix a typo in declaration.
+	(info): Use expr != 0 to initialize the bit fields. Don't
+	initialize "extra" for the Linux libc 5.
+
+	* streambuf.h (_G_NEED_STDARG_H): Changed from _IO_NEED_STDARG_H.
+
+	* config/linux.mt (STDIO_OBJECTS): New, empty.
+	(MT_CFLAGS): Removed.
+
+	* config/linuxlibc1.mt: Rewrite.  it's identical to linux.mt but
+	IO_OBJECTS mentions files not in early libc5 versions.
+
+	* config/mtsafe.mt: New.
+
+	* dbz/Makefile.in (check): Support make -j.
+
+	* tests/tFile.cc (tempfile): Fix a typo.
+
+1997-09-19 11:52  Jim Wilson  
+
+	* Makefile.in (LIBIO_OBJECTS): Depend on _G_CONFIG_H.
+
+1997-09-17 04:08  Ulrich Drepper  
+
+	* iostream.cc: Add forward declaration for __cvt_double.
+	* libio.h: Define _IO_USE_DTOA is _G_HAVE_PRINTF_FP is not defined.
+	* strops.c (_IO_str_count): Correct last change.
+
+1997-09-17 02:50  Ulrich Drepper  
+
+	* libioP.h: Define __set_errno if not already defined.
+
+1997-09-15 02:37  Ulrich Drepper  
+
+	* config/linux.mt: Rewrite for use with glibc 2.
+	* config/linuxlibc1.mt: Old content of linux.mt, fir libc4 and
+	libc5.
+
+	* config.shared (COMPILE.c): Allow new flags in MT_CFLAGS be
+	passed.
+	(COMPILE.cc): Likewise.
+
+	* configure.in (*-linux*): Remove goal.  We now have...
+	(*-linux-gnulibc1): For libc4 and libc5.  Emit warning.
+	(*-linux-gnu)): For glibc 2.
+	Create links to find headers for multi-threading if necessary.
+
+	* fileops.c: Make thread-safe by using _IO_cleanup_region_start
+	etc to handle cancelation.  Acquire locks in functions which are
+	called directly.
+	(_IO_file_read, _IO_file_write): Remove dead code.
+
+	* include/empty.h: Define stub macros for locking.
+
+	* iolibio.h: Add prototypes for obstack printing functions.
+
+	* ioseekoff.c (_IO_seekoff): Lock stream before working.
+	* ioseekpos.c (_IO_seekpos): Likewise.
+
+	* iostream.cc: Add support for long double I/O.
+	Use __printf_fp from glibc is available.
+	Use _IO_cleanup_region_start to handle cancelation correctly.
+	* iostream.h (class ostream): Change opfx and osfx to lock/unlock
+	stream
+	(class istream): Likewise for ipfx, ipfx0, ipfx1, and isfx.
+	Declare new function lock and unlock for ostream and istream.
+	* osform.cc: Use _IO_cleanup_region_start to handle cancelation
+	correctly.
+
+	* libio.h: Update from glibc version.  Pretty printing.
+	* libioP.h: Likewise.
+
+	* outfloat.c: Only compile if _IO_USE_DTOA is defined.
+
+	* stdio/feof.c: Make thread safe.
+	* stdio/ferror.c: Likewise.
+	* stdio/getc.c : Likewise.
+	* stdio/putc.c : Likewise.
+	* stdio/stdio.h: Declare function of thread-safe API.
+
+	* stdio/obprintf.c: New file.
+	* stdio/vasprintf.c: New file.
+
+	* stdio-lock.h: Removed.
+
+	* stdstrbufs.c: Add definitions for thread-safe streams.
+
+	* streambuf.cc: Initialize lock.
+
+	* strops.c (_IO_str_count): Undo last change.
+
+	* tests/tFile.cc: Support parallel builds by avoiding fixed
+	name for test file.
+
+Thu Sep 11 18:43:56 1997  Jason Merrill  
+
+	* Makefile.in (iostream.list): Remove STDIO_WRAP_OBJECTS.
+
+Mon Sep  8 01:30:27 1997  Weiwen Liu    
+
+	* libio.h: Fix typo.
+
+Sun Sep  7 23:00:18 1997  Jim Wilson  (wilson@cygnus.com)
+
+	* linux.mt (LIBIOSTREAM_DEP): Change stdio.list to stmp-stdio.
+
+Fri Sep  5 09:58:43 1997  Brendan Kehoe  
+
+	* Makefile.in (iostream.list): Instead of adding stdio.list, add
+	STDIO_WRAP_OBJECTS.
+	(iostream.list): Lose dependency on stmp-stdio, not necessary for
+	our stuff.  The stdio stuff is present here just for uniformity
+	with glibc.
+
+Thu Sep  4 17:26:22 1997  Brendan Kehoe  
+
+	* parsestream.cc (general_parsebuf): Cast return of malloc to char*.
+
+1997-09-04 16:11  Ulrich Drepper  
+
+	Change compared to version initially intended to in:
+	* strops.c (_IO_str_count): Still use _IO_write_ptr, not
+	_IO_write_end, for now.
+
+	* iofeof.c, ioferror.c, iofflush_u.c, iogetc.c, ioputc.c, peekc.c,
+	stdio-lock.h: New files.
+
+	* include: New dir.
+	* include/empty.h: New header.
+
+	* filedoalloc.c: Update and reformat copyright.
+	Don't use DEFUN.
+	Use __set_errno throughout the code to support multi-threaded
+	programs.
+	Correct layout to follow the Coding Standard.
+	Add casts to prevent warnings.
+	* fileops.c: Likewise.
+	* genops.c: Likewise.
+	* iofclose.c: Likewise.
+	* iofdopen.c: Likewise.
+	* iofflush.c: Likewise.
+	* iofgetpos.c: Likewise.
+	* iofgets.c: Likewise.
+	* iofopen.c: Likewise.
+	* iofprintf.c: Likewise.
+	* iofputs.c: Likewise.
+	* iofread.c: Likewise.
+	* iofsetpos.c: Likewise.
+	* ioftell.c: Likewise.
+	* iofwrite.c: Likewise.
+	* iogetdelim.c: Likewise.
+	* iogetline.c: Likewise.
+	* iogets.c: Likewise.
+	* iopadn.c: Likewise.
+	* iopopen.c: Likewise.
+	* ioputs.c: Likewise.
+	* ioseekoff.c: Likewise.
+	* iosetbuffer.c: Likewise.
+	* iosetvbuf.c: Likewise.
+	* iosprintf.c: Likewise.
+	* ioungetc.c: Likewise.
+	* iovsprintf.c: Likewise.
+	* iovsscanf.c: Likewise.
+	* libio.h: Likewise.
+	* libioP.h: Likewise.
+	* stdfiles.c: Likewise.
+	* strfile.h: Likewise.
+	* strops.c: Likewise.
+
+	* Makefile.in (IO_OBJECTS): Add peekc.o, iogetc.o, ioputc.o,
+	iofeof.o, and ioferror.o.
+	(iostream.list): Depend upon stmp-stdio.  Add the entries
+	from stdio.list to iostream.list.
+	(stmp-stdio): New name for what was the stdio/stdio.list rule.
+	All it now does is cd down into stdio and build stdio.list.
+
+	* configure.in (ALL): Add libiostream.a.
+
+	* libio.h [_IO_MTSFE_IO]: Include header declaring locking code.
+	Otherwise define opaque _IO_lock_t.
+	Define _IO_cookie_file.
+	Rename _IO_getc to _IO_getc_unlocked, _IO_peekc to _IO_peekc_unlocked,
+	_IO_putc to _IO_putc_unlocked, _IO_feof to _IO_feof_unclocked, and
+	_IO_ferror to _IO_ferror_unlocked.
+	Add prototypes for _IO_getc, _IO_putc, _IO_feof, _IO_ferror,
+	and _IO_peekc_locked.
+	Add declarations for _IO_flockfile, _IO_funlockfile, and
+	_IO_ftrylockfile.  If !_IO_MTSAFE_IO define _IO_flockfile,
+	_IO_funlockfile, _IO_ftrylockfile, _IO_cleanup_region_start, and
+	_IO_cleanup_region_end as empty macros.
+
+	* libioP.h: Change type of finish function to take an additional int
+	argument and change declaration of finish functions.
+	Add prototypes for _IO_seekoff and _IO_seekpos.
+	If _G_HAVE_MMAP is defined use stream buffers allocated with mmap.
+	Redefine FREE_BUF and ALLOC_BUF macros to help in both situations.
+	(FILEBUF_LITERAL): If we compile for a thread-safe library also
+	initialize lock member.
+
+	* filedoalloc.c: Take care for systems already defining _POSIX_SOURCE.
+	Keep name space clean on systems which require this.
+	(_IO_file_doallocate): Adopt ALLOC_BUF call for changed semantic.
+
+	* fileops.c: Keep name space clean on systems which require this.
+	(_IO_file_attach): Don't fail if seek failed because it's used on a
+	pipe.
+	(_IO_file_underflow): Update buffer pointers before calling `read'
+	since the `read' might not return anymore.
+	(_IO_file_overflow): If stream allows no writes set error flag.
+	(_IO_seekoff): Make sure that after flushing the file pointer in
+	the underlying file is exact.
+	(_IO_file_read): Don't restart `read' syscall if it return EINTR.
+	This violates POSIX.
+	(_IO_file_write): Likewise for `write'.
+	(_IO_cleanup): Install as exit handler in glibc.
+
+	* genops.c (_IO_setb): Correctly use FREE_BUF.
+	(_IO_default_doallocate): Correctly use ALLOC_BUF.
+	(_IO_init): Initialize lock in stream structure.
+	(_IO_default_finish): Destroy lock.
+	(_IO_get_column): Don't compile since it's not needed.
+	(_IO_nobackup_default): Likewise.
+
+	* iopopen.c: Take care for systems already defining _POSIX_SOURCE.
+	Correct _IO_fork and _IO_dup2 prototypes.
+
+	* iofclose.c: Acquire lock before starting the work.
+	* iofflush.c: Likewise.
+	* iofgetpos.c: Likewise.
+	* iofgets.c: Likewise.
+	* iofputs.c: Likewise.
+	* iofread.c: Likewise.
+	* iofsetpos.c: Likewise.
+	* ioftell.c: Likewise.
+	* iofwrite.c: Likewise.
+	* iogetdelim.c: Likewise.
+	* iogets.c: Likewise.
+	* ioputs.c: Likewise.
+	* iosetbuffer.c: Likewise.
+	* iosetvbuf.c: Likewise.
+	* ioungetc.c: Likewise.
+
+	* iofdopen.c: Create and initialize lock for new stream.
+	* iofopen.c: Likewise.
+	* iopopen.c (_IO_popen): Likewise.
+	* iovsprintf.c: Likewise.
+	* iovsscanf.c: Likewise.
+
+	* genops.c: Make weak aliases for various functions.
+	* iofclose.c: Likewise.
+	* iofdopen.c: Likewise.
+	* iofflush.c: Likewise.
+	* iofgetpos.c: Likewise.
+	* iofgets.c: Likewise.
+	* iofopen.c: Likewise.
+	* iofputs.c: Likewise.
+	* iofread.c: Likewise.
+	* iofsetpos.c: Likewise.
+	* ioftell.c: Likewise.
+	* iofwrite.c: Likewise.
+	* iogetdelim.c: Likewise.
+	* iogets.c: Likewise.
+	* ioputs.c: Likewise.
+	* iosetbuffer.c: Likewise.
+	* iosetvbuf.c: Likewise.
+	* ioungetc.c: Likewise.
+	* iovsprintf.c: Likewise.
+	* iovsscanf.c: Likewise.
+
+	* iofflush_u.c: New file.  fflush_unlocked implementation.
+
+	* iostream.h [_G_HAVE_LONG_DOUBLE_IO]: Declare real long double
+	output operator.
+
+	* peekc.c: New file.  Implement _IO_peekc_locked function.
+
+	* stdfiles.c: If we compile for a thread-safe library also define
+	lock variable.
+
+Tue Aug 26 12:24:01 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
+
+	* testsuite/Makefile.in (check): Don't depend on site.exp.
+	(just-check): Depend on site.exp.
+
+Wed Aug 20 02:01:34 1997  Jason Merrill  
+
+	* iostream.h: Add copy assignment ops for _IO_?stream_withassign.
+
+Tue Jul 22 10:31:41 1997  Brendan Kehoe  
+
+	* config.shared (CHECK_SUBDIRS): Use install-sh, not install.sh.
+
+Wed Jun 25 12:20:55 1997  Brendan Kehoe  
+
+	* config.shared (DOING_GPERF): Look for this, defining TOLIBGXX
+	and LIBS for it.
+
+Wed Jun 18 11:03:34 1997  Bob Manson  
+
+	* config.shared (FLAGS_TO_PASS): Don't include RUNTEST.
+
+Tue Jun 17 22:23:48 1997  Bob Manson  
+
+	* config.shared (FLAGS_TO_PASS): Pass RUNTEST and RUNTESTFLAGS.
+
+Fri May 16 21:08:53 1997  Bob Manson  
+
+	* iovfprintf.c: Declare __cvt_double before use.
+
+	* floatconv.c (d2b): Use _G_int32_t instead of int for the
+	e and bits parameters.
+	(_IO_strtod): Use _G_int32_t.
+
+	* gen-params: Look for NO_USE_DTOA and USE_INT32_FLAGS.
+
+	* strops.c (_IO_str_init_static): use _G_int32_t appropriately.
+
+	* libio.h: If _G_NO_USE_DTOA is set, then don't define
+	_IO_USE_DTOA.
+
+	* config/mn10200.mt: Don't use dtoa, it only works
+	for "real" doubles.
+
+Thu May 15 17:44:12 1997  Bob Manson  
+
+	* configure.in: Set CHECK_SUBDIRS to testsuite if we're doing
+	a cross compile.
+
+	* config.shared(check): Only run make check in the directories
+	specified by CHECK_SUBDIRS. Set CHECK_SUBDIRS to SUBDIRS
+	if it has no previous value.
+
+Thu May  1 17:35:19 1997  Jason Merrill  
+
+	* Makefile.in (test, tpipe): Add $(CFLAGS).
+
+Wed Apr 30 12:16:29 1997  Jason Merrill  
+
+	* configure.in: Don't turn on multilib here.
+
+Sat Apr 26 13:38:21 1997  Bob Manson  
+
+	* configure.in (configdirs): Add testsuite directory.
+
+	* testsuite/ChangeLog:
+	* testsuite/Makefile.in:
+	* testsuite/libio.tests/tiomanip.exp:
+	* testsuite/libio.tests/tstdiomisc.exp:
+	* testsuite/libio.tests/tiomisc.exp:
+	* testsuite/libio.tests/tFile.exp:
+	* testsuite/libio.tests/tfformat.exp:
+	* testsuite/libio.tests/tiformat.exp:
+	* testsuite/libio.tests/hounddog.exp:
+	* testsuite/libio.tests/putbackdog.exp:
+	* testsuite/configure.in:
+	* testsuite/lib/libio.exp:
+	* testsuite/config/default.exp:
+	New files for DejaGnu-style testsuite.
+
+Fri Apr  4 03:16:44 1997  Ulrich Drepper  
+
+	* configure.in: Enable multilibing by default.
+	Update multilib template to read config-ml.in.
+
+	* floatconv.c: Enable use in cross targets which use the
+	newlib ieeefp.h header.
+
+Thu Jan 23 09:16:16 1997  Brendan Kehoe  
+
+	* libioP.h (_IO_file_attach): Delete redundant decl.
+
+Tue Jan 21 22:13:45 1997  Brendan Kehoe  
+
+	* streambuf.h (class ios): Take out STREAMSIZE member, since we
+	only need (and should only have) the global one.
+
+Tue Jan  7 14:02:40 1997  Jason Merrill  
+
+	* iostream.h (long long fns): Use __extension__.
+
+	* gen-params: Use _G_llong and _G_ullong instead of long long for
+	deduced types.
+
+Fri Dec  6 13:13:30 1996  Jason Merrill  
+
+	* dbz/dbz.c: Use off_t.
+
+Sat Nov 23 15:44:37 1996  Jason Merrill  
+
+	* Makefile.in (install): Don't install _G_config.h with other headers.
+
+Mon Nov 18 17:12:41 1996  Jason Merrill  
+
+	* config.shared (SUBDIRS): Use -O instead of -O3 for debugging.
+
+Sun Nov  3 12:43:34 1996  Jason Merrill  
+
+	* iostream.cc (write_int): Treat string literals as const.
+
+Thu Sep 26 10:09:18 1996  Michael Meissner  
+
+	* depend: Regenerate.
+
+Wed Sep 25 22:54:45 1996  Jason Merrill  
+
+	* config.shared (depend.new): Deal with headers that don't end in .h.
+
+Thu Aug 29 17:05:53 1996  Michael Meissner  
+
+	* configure.in (i[345]86-*-*): Recognize i686 for pentium pro.
+
+Mon Aug  5 01:26:32 1996  Jason Merrill  
+
+	* config{ure.in,.shared} (DISTCLEAN): Add multilib.out.
+
+Fri Aug  2 17:39:35 1996  Jason Merrill  
+
+	* libio.h (NULL): Use __null.
+	* libioP.h (NULL): Ditto.
+	* streambuf.h (NULL): Ditto.
+	* ioextend.cc (get_array_element): Use NULL instead of (void*)0.
+
+Fri Jul  5 18:26:41 1996  Jim Wilson  
+
+	* strfile.h (struct _IO_streambuf): New struct type.
+	(struct _IO_strfile): Use it.
+
+Tue Jun 18 18:24:21 1996  Jason Merrill  
+
+	* fstream.h (fstreambase): Make __my_fb mutable.
+	From Joe Buck.
+
+Tue Jun 18 11:03:53 1996  Brendan Kehoe  
+
+	* dbz/fake.c (main): Set return type to int.
+	* dbz/dbzmain.c (main): Likewise.
+	* dbz/byteflip.c (main): Likewise.
+
+Mon Jun 17 14:05:36 1996  Jason Merrill  
+
+	* gen-params: Check if clog conflicts with system libraries.
+	* stdstreams.cc: If it does, use __IO_clog.
+	* iostream.h: Likewise.
+
+Tue Jun 11 13:39:31 1996  Brendan Kehoe  
+
+	* stdiostream.h (istdiostream (FILE*)): Put istream base
+	initializer before init for __f.
+	(ostdiostream (FILE*)): Likewise for ostream base init.
+
+Tue May 14 11:47:21 1996  Per Bothner  
+
+	* strfile.h (_IO_str_fields):  Removed _len field.
+	(_IO_STR_DYNAMIC, _IO_STR_FROZEN):  new macros.
+	* strstream.h (strstreambuf::is_static):  Removed.
+	(strstreambuf::frozen):  Use _IO_STR_DYNAMIC instead of is_static.
+	* strstream.h, strstream.cc:  Remove support for !_IO_NEW_STREAMS.
+	* strstream.cc (strstreambuf::init_dynamic):  Don't set _s._len.
+	* strops.c (_IO_str_init_static):  Better handling of the
+	negative (== unbounded) size case.
+	(_IO_str_overflow, _IO_str_underflow, _IO_str_count):  Re-write
+	to not use _s._len, and otherwise cleanup/fix.
+	* strstream.h, strstream.cc (strstreambase::strstreambase()):  Call
+	ios::init here.
+ 	(other constructors):  Simplify - init already called.
+
+Tue May 14 10:55:21 1996  Per Bothner  
+
+	Change so that strstreambuf default constructor does no allocation.
+	* strstream.h (strstreambuf::init_dynamic):  Default initial size = 0.
+	* strstream.cc (strstreambuf::init_dynamic):  Don't allocate a
+	buffer (yet) if initial_size is 0.
+	* strops.c (_IO_str_overflow):  Add 100 to size of re-allocated
+	buffer, to handle case when initial size is 0.
+
+	* iostdio.h (remove, rename, tmpfile, tempnam):  Comment out.
+
+Mon May 13 23:19:39 1996  Per Bothner  
+
+	* fileops.c (_IO_file_close_it):  Just call _IO_do_flush rather
+	than _IO_file_sync, to avoid useless lseek.
+
+Tue May 14 10:48:48 1996  Jason Merrill  
+
+	* floatconv.c (_IO_strtod): Force rv into the stack.
+
+	* config.shared (gxx_includedir): Now $(includedir)/g++.
+
+Sat Apr 27 02:37:49 1996  Jason Merrill  
+
+	* libioP.h (JUMP*): Implement for thunks.
+	(_IO_jump_t): Add second dummy field for thunks.
+
+Thu Apr 25 13:20:00 1996  Jason Merrill  
+
+	* config.shared (CXX): Use gcc, not g++.
+
+Wed Apr 24 10:29:50 1996  Doug Evans  
+
+	* config.shared (depend.new): Delete $(srcdir)/ from foo.{c,cc}
+	for SunOS VPATH.
+	* depend: Regenerated.
+
+Fri Apr 19 17:24:51 1996  Jason Merrill  
+
+	* Version 2.8.0b3.
+
+Wed Apr 10 17:16:01 1996  Jason Merrill  
+
+	* configure.in (ALL): Don't build iostream.a.
+
+Mon Apr  8 14:44:11 1996  Per Bothner  
+
+	* iosetvbuf.c (_IO_setvbuf):  Clear _IO_UNBUFFERED unless _IONBF.
+
+Mon Apr  8 15:08:23 1996  Ian Lance Taylor  
+
+	* configure.in: Permit --enable-shared to specify a list of
+	directories.
+
+Fri Apr  5 17:48:56 1996  Per Bothner  
+
+	* config.shared (MOSTLYCLEAN):  Also remove ${EXTRA_MOSTLYCLEAN}.
+
+Fri Mar 22 23:25:00 1996 Ulrich Drepper  
+
+	* genops.c (_IO_sputbackc, _IO_sungetc): Clear EOF flag if putsh
+	back was successful.
+
+Wed Mar 27 11:54:08 1996  Jason Merrill  
+
+	* Version 2.8.0b2.
+
+Fri Mar 22 15:39:36 1996  Per Bothner  
+
+	* fileops.c (_IO_do_write):  Revert previous fix.  (It fails to
+	handle the case that fp->_IO_read_end != fp->_IO_write_base.)
+	(_IO_file_overflow):  Instead, if _IO_read_ptr is at the end of
+ 	the buffer, reset all the read pointers to _IO_buf_base.
+
+Tue Mar 12 12:03:17 1996  Per Bothner  
+
+	* fileops.c (_IO_do_write):  Even if to_do==0, must re-set buffer
+	pointers.  Bug and solution from Luke Blanshard .
+
+Wed Feb 28 10:00:24 1996  Jason Merrill  
+
+	* Version 2.8.0b1.
+
+Tue Feb 27 18:08:16 1996  Per Bothner  
+
+	* iopopen.c (_IO_proc_open):  Use (char*)0 rather than imprecise NULL.
+
+	* streambuf.h (ios):  Add ios::binary;  deprecate ios::bin.
+	* filebuf.cc (filebuf::open):  Handle ios::binary.
+
+Fri Feb  9 12:40:19 1996  Brendan Kehoe  
+
+	* cleanup.c (_IO_cleanup_registration_needed) [!_G_HAVE_ATEXIT]: Init
+	to NULL.
+	* filedoalloc.c (_IO_cleanup_registration_needed): Remove decl.
+
+Thu Feb  8 08:12:50 1996  Brendan Kehoe  
+
+	* filedoalloc.c (_IO_cleanup_registration_needed): Revert previous
+	change, since cleanup.c only defines it if _G_HAVE_ATEXIT.
+
+Wed Feb  7 15:10:17 1996  Brendan Kehoe  
+
+	* filedoalloc.c (_IO_cleanup_registration_needed): Declare as extern.
+
+Tue Dec 12 17:21:13 1995  Per Bothner  
+
+	* indstream.h, instream.cc (indirectbuf::uflow):  New method.
+	* indstream.cc (indirectbuf::underflow):  Fix to use sgetc, not sbumpc.
+	Fixes bug reported by Kevin Beyer .
+
+	* indstream.cc (indirectbuf::seekpos):  Add paranoia test.
+
+Fri Dec  8 14:55:34 1995  Per Bothner  
+
+	* stream.h:  Add warning to not use these functions.
+	* stream.cc (str, chr):  Re-implement here (from libg++).
+
+Tue Nov 28 15:07:01 1995  Per Bothner  
+
+	* config.shared:  Use test instead of [ to avoid DEC Unix lossage.
+
+Thu Nov 23 14:51:43 1995  Per Bothner  
+
+	* iopopen.c: Move #include  ahead of #include 
+	to deal with BSDI's literal implementation of Posix.
+
+Sat Nov 25 11:21:55 1995  Doug Evans  
+
+	* Makefile.in (install): Set rootme.
+	* config.shared (TOPDIR): Set with ${foo-...} rather than ${foo=...}.
+	(INSTALL): Handle absolute, dot, relative-not-dot values of srcdir.
+	(TEXIDIR): Likewise.
+
+Tue Nov 21 14:12:05 1995  Ian Lance Taylor  
+
+	* configure.in: Check ${with_cross_host} rather than comparing
+	${host} and ${target}.
+
+Mon Nov 20 13:55:29 1995  Brendan Kehoe  
+
+	* configure.in: Match *-sco3.2v[45]*.
+
+Wed Nov 15 20:19:31 1995  Brendan Kehoe  
+
+	* config.shared (FLAGS_TO_PASS): Also pass SHLIB and SHCURSES.
+
+Tue Nov 14 01:41:08 1995  Doug Evans  
+
+	* config.shared (TO_REAL_TOPDIR): Define.
+	(MULTITOP): Deleted.
+	(MULTISRCTOP, MULTIBUILDTOP): New.
+	(TOPDIR): Change MULTITOP to MULTIBUILDTOP, and use TO_REAL_TOPDIR.
+	(INSTALL): Add with_multisrctop, TO_REAL_TOPDIR.
+	(TEXIDIR): Use TO_REAL_TOPDIR.
+	(LIBS): Delete MULTITOP.
+	(FLAGS_TO_PASS): Add NM.
+	(CXXINCLUDES): Delete MULTITOP.
+	(depend.new): Delete adding MULTITOP to ../ build tree references.
+	Add MULTISRCTOP to ../ source tree references.
+	* configure.in: Delete call to cfg-ml-com.in.  Call config-ml.in
+	instead of cfg-ml-pos.in.
+
+Sun Nov 12 16:30:48 1995  Per Bothner  
+
+	* Makefile.in (VERSION):  Set to 2.7.1.
+	* configure.in:  Add warning for Linux.
+	* config.shared (DISTCLEAN):  Add EXTRA_DISTCLEAN.
+
+	* editbuf.h (edit_mark::index_in_buffer):  Avoid unused param warning.
+
+	* iostream.cc (istream::operator>> (char*)):  Improve ANSI compliance.
+
+Fri Nov 10 08:41:37 1995  Brendan Kehoe  
+
+	* config.shared (check): Add missing semicolon.
+
+Thu Nov  9 17:27:22 1995  Jason Merrill  
+
+	* configure.in (ALL): Remove $(OSPRIM_OBJECTS).
+	* config.shared (check): Set LD_LIBRARY_PATH.
+	* NEWS: Fix typo.
+	* iogetdelim.c (_IO_getdelim): Index *lineptr, rather than lineptr.
+	From alan@spri.levels.unisa.edu.au (Alan Modra).
+
+Mon Nov  6 15:03:33 1995  Per Bothner  
+
+	* streambuf.cc, editbuf.cc, isgetline.cc, parsestream.cc:
+	Fixes to avoid -Wall warnings.
+
+Fri Nov  3 16:41:41 1995  Brendan Kehoe  
+
+	* gen-params [!__STDC__]: Include varargs.h instead of stdarg.h.
+
+Thu Nov  2 15:04:03 1995  Per Bothner  
+
+	* config.shared:  Re-write if X then Y else true fi to (not X) || Y.
+
+Wed Nov  1 13:26:44 1995  Per Bothner  
+
+	* iostream.h (istream::ipfx):  Add default argument value.
+	Reported by Yotam Medini .
+
+	* libioP.h (_IO_blen):  Fix typo.
+	Reported by Bryan T. Vold .
+
+Fri Oct 27 19:26:20 1995  Per Bothner  
+
+	* Makefile.in (_G_config.h):  Set CC to $(CC) rather than to $(CXX),
+	now that CXX defaults to g++ and CC default to gcc (when found).
+	* config.shared:  Simplify CXX and CC, since they get overridden
+	by ../configure anyway.
+
+Wed Oct 25 19:45:50 1995  Brendan Kehoe  
+
+	* iostdio.h: Wrap including the file with #ifndef _IOSTDIO_H.
+
+Wed Oct 25 11:14:25 1995  Per Bothner  
+
+	* libio.h (_IO_seekoff, _IO_seekpos):  New declarations.
+	* libioP.h (_IO_seekoff, _IO_seekpos):  Remove declarations.
+	* libioP.h:  Cleanup;  remove old !_IO_UNIFIED_JUMPTABLES stuff.
+
+	* filebuf.cc (filebuf::~filebuf):  Only call SYSYCLOSE if currently
+	open.  Bug found by Martin Gerbershagen .
+
+	* streambuf.h (streambuf::pubseekoff, streambuf::pubseekpos):
+	Added, from ANSI draft.
+	* filebuf.cc (filebuf::open), iostream.cc (variables places), SFile.cc:
+	Use pubseekoff/pubseekpos rather than sseekoff/sseekpos.
+
+	* Makefile.in (install):  Don't install libiostream.a.
+
+	* filedoalloc.c:  Also #include .
+
+Mon Oct  9 18:09:54 1995  Jason Molenda  
+
+	* config.shared (SUFFIXES): add .c.
+
+Tue Sep 26 16:08:01 1995  Per Bothner  
+
+	* procbuf.cc:  Move #pragma implementation to beginning.
+
+Wed Sep 20 17:53:33 1995  Per Bothner  
+
+	* procbuf.h, procbuf.cc:  Add #pragma interface/implementation stuff.
+
+Wed Sep 20 18:59:00 1995  John Eaton  
+
+	* procbuf.h: Protect from being included multiple times.
+
+Wed Sep 20 15:47:14 1995  John Eaton 
+
+	* procbuf.h (procbuf):  Add '_next' pointer field for compatibility
+	with _IO_proc_file.
+
+Wed Sep 20 13:54:02 1995  Ian Lance Taylor  
+
+	* config.shared: Add support for maintainer-clean target as a
+	synonym for realclean.
+	* dbz/Makefile.in: Likewise.
+
+Mon Sep 11 12:11:19 1995  Per Bothner  
+
+	* iopopen.c:  #include  before .
+	This is in accordance with Posix, and needed for ISC.
+
+Fri Sep  8 00:11:55 1995  Brendan Kehoe  
+
+	* gen-params: Use double quotes in the eval setting $TYPE to
+	$VALUE, to preserve any single quotes in $VALUE.
+
+Mon Aug 21 11:39:09 1995  Jason Merrill  
+
+	* gen-params: Test for an appropriate version of gcc before using
+ 	mode attributes.
+
+	* config.shared: Add $(PICDIR) to $ALL.
+
+Mon Aug  7 17:51:40 1995  Per Bothner  
+
+	* gen-params:  Generate new macro _G_HAVE_SYS_CDEFS.
+	* libio.h:  If _G_HAVE_SYS_CDEFS, get __P from .
+
+Fri Aug  4 23:21:17 1995  Paul Eggert  
+
+	* gen-params: When following typedef changes, allow typedefs
+	that do not have a space before the defined type name,
+	e.g. `typedef void *__gnuc_va_list;' as in Linux.  Also,
+	not require a space in the definiens, e.g. `typedef void*foo;'.
+
+Thu Aug  3 17:54:15 1995  Per Bothner  
+
+	* iostream.h, iostream.cc (istream::sync):  Added missing method.
+
+Thu Aug  3 17:49:34 1995  Per Bothner  
+
+	* configure.in:  Remove netbsd special case.
+	* config/netbsd.mt:  Removed;  no longer used.
+
+Tue Jun 20 16:07:12 1995  Paul Eggert  
+
+	* gen-params: Take transitive closure of `typedef' relation.
+	This is needed for BSD/OS 2.0, which has
+	fpos_t -> off_t -> quad_t -> long long.
+
+Mon Jul 24 18:28:10 1995  Doug Evans  
+
+	* config.shared (TOPDIR): Delete extra '/', $rootme may be empty.
+
+Sat Jul 22 13:27:45 1995  Doug Evans  
+
+	* config.shared (depend.new): Fix quoting in DO NOT EDIT line.
+
+	* Makefile.in (_G_config.h): Add multilib support.
+	(install): Likewise.
+	* config.shared: Likewise.
+	* configure.in: Likewise.
+
+Wed Jun 28 17:40:25 1995  Jason Merrill  
+
+	* PlotFile.h, SFile.h, builtinbuf.h, editbuf.h, fstream.h,
+	indstream.h, iomanip.h, iostream.h, parsestream.h, pfstream.h,
+	procbuf.h, stdiostream.h, stream.h, streambuf.h, strstream.h: Wrap
+	with extern "C++".
+
+Thu Jun 22 04:34:01 1995  Jason Merrill  
+
+	* gen-params: Surround attributes with __.
+
+Mon Jun 19 00:33:22 1995  Jason Merrill  
+
+	* config.shared (SUBDIRS): Massage broken shells that require
+        'else true'.
+
+Sat Jun 17 11:25:38 1995  Jason Merrill  
+
+	* streambuf.h: Declare inline members inline in class.
+
+Thu Jun 15 20:45:13 1995  Per Bothner  
+
+	* Makefile.in (VERSION):  Update to version 2.7.0.
+
+Wed Jun 14 21:41:11 1995  Jason Merrill  
+
+	* Makefile.in (STDIO_WRAP_OBJECTS): Remove stdfiles.o.
+	(LIBIO_OBJECTS): Add stdfiles.o.
+
+Wed Jun  7 16:11:36 1995  Jason Merrill  
+
+	* config.shared (all): Appease bash.
+
+Wed Jun  7 11:16:38 1995  Jason Merrill  
+
+	* configure.in (MOSTLYCLEAN): Remove stamp-picdir.
+
+	* config.shared (MOSTLYCLEAN): Ditto.
+	(CLEAN): Don't.
+
+Mon Jun  5 18:29:39 1995  Jason Merrill  
+
+	* config/mh-*pic: Removed.
+
+	* configure.in (MOSTLYCLEAN): Remove pic objects.
+	(frags): Use toplevel pic fragments.
+
+	* config.shared (CXXFLAGS): Use -O3.
+	(PICFLAG, PICDIR): New macros.
+	(all): Depend on $(PICDIR).
+	(FLAGS_TO_PASS): Pass PICFLAG.
+	(.x.o): Also build pic object.
+	(stamp-picdir): Create directory for pic objects.
+	(MOSTLYCLEAN): Remove pic objects.
+	(CLEAN): Remove stamp-picdir.
+
+	* Makefile.in (iostream.list): Depend on stamp-picdir.
+	(c++clean): Don't remove _G_config.h.
+
+Mon Jun  5 15:03:47 1995  Per Bothner  
+
+	* strstream.h, strstream.cc (strstream::strstream()):  Re-implement to
+	be like ostrstream::ostrestream(), and not leak memory.
+
+	* streambuf.h:  Use #if !_IO_UNIFIED_JUMPTABLES instead of #ifndef.
+
+	* iolibio.h (_IO_rewind):  Add missing flags when calling _IO_seekoff.
+
+Thu May 25 22:30:21 1995  J.T. Conklin  
+
+	* config/netbsd.mt (G_CONFIG_ARGS): Add defn for off_t.  Another
+	  layer of typedefs has been added and the gen-params script can
+	  not handle it.
+
+Wed May 10 03:02:58 1995  Jason Merrill  
+
+	* iolibio.h (_IO_rewind): Add new argument to _IO_seekoff.
+
+	* config/linux.mt (LIBIOSTREAM_OBJECTS): Include $(STDIO_WRAP_OBJECTS).
+	(LIBIOSTREAM_DEP): Include stdio.list.
+	(LIBIOSTREAM_USE): Include `cat stdio.list`.
+
+	* Makefile.in (LIBIOSTREAM_DEP): New variable.
+	(LIBIOSTREAM_USE): Ditto.
+	(libiostream.a): Use them.
+	(iostream.list): Ditto.
+	(stdio.list): New rule.
+	(stdio/stdio.list): Ditto.
+
+Tue May  9 18:29:38 1995  Jason Merrill  
+
+	* libioP.h (_IO_jump_t): Change TYPE for __dummy from int to
+        _G_size_t.
+
+Sat May  6 13:50:37 1995  Per Bothner  
+
+	* libio.h (_IO_UNIFIED_JUMPTABLES):  #define as true.
+	(_IO_FILE):  Remove _jumps field (#if _IO_UNIFIED_JUMPTABLES).
+
+	* libioP.h (enum _IO_seekflags_):  Removed.
+
+	* libioP.h (_IO_setbuf_t):  Change return value of setpos jumptable
+	function to match C++ streambuf::setpos.  (Return NULL on failure.)
+	* fileops.c (_IO_file_setbuf), genops.c (_IO_default_setbuf),
+	filebuf.cc, iosetvbuf.c:  Update to use new setbuf conventions.
+
+	* streambuf.h (streambuf):  Re-order virtual functions more logically.
+	* streambuf.cc (streambuf::uflow), streambuf.h:  New virtual.
+	* libioP.h (struct _IO_jump_t):  Define using new JUMP_FIELD macro.
+	And re-order in more logical order consistent with streambuf vtable.
+	* fileops.c (_IO_file_jumps), iopopen.c (_IO_proc_jumps), iovfprintf.c
+	(_IO_helper_jumps), streambuf.cc (_IO_streambuf_jumps), strops.c
+	(_IO_str_jumps):  Update accordingly, using JUMP_INIT macro.
+	* stdfiles.c:  Set vtable to point to _IO_file_jumps.
+	* filebuf.cc, iopopen.c, iovfprintf.c (helper_vfprintf), iovsprintf.c,
+	iovsscanf.c:  Use macros and #if to set jumptables.
+
+	* streambuf.c:  _IO_streambuf_jumps and the _IO_sb_* methods are not
+	needed #if _IO_UNIFIED_JUMPTABLES.
+	* filebuf.cc (filebuf::__new):  Also no longer needed.
+	* fstream.cc (fstreambase::__fb_init, fstreambase::fstreambase):  Fix.
+	* stdstrbufs.c:  Use filebuf vtable instead of builtinbuf's.
+	* builtinbuf.h, builtinbuf.cc (builtinbuf):  Commented out #if
+	_IO_UNIFIED_JUMPTABLES - no longer needed.
+	* strstream.cc (SET_STR_JUMPS):  Does nothing now.
+
+	* builtinbuf.cc, fileops.c, genops.c, iofgetpos.c, iofsetpos.c,
+	ioftell.c, iopopen.c, ioseekoff.c, ioseekpos.c, iosetvbuf.c,
+	iovfprintf.c, iovfscanf.c, strops.c:  Use DEFUN and DEFUN_VOID.
+	* filebuf.cc, fileops.c, genops.c, iopopen.c, ioseekoff.c, ioseekpos.c,
+	iosetvbuf.c, iovfscanf.c:  Use new JUMP_* and IO_OVERFLOW/... macros.
+
+	* libioP.h (_IO_seekpos_t):  Third arg is now an int (using _IOS_INPUT
+	and _IOS_OUTPUT), not an enum _IO_seekflags_.  Flags values are
+	changed, and their sense inverted (to match streambuf::seekpos).
+	* libioP.h (_IO_seekoff_t):  Similarly match streambuf::seekoff.
+	* filebuf.cc, fileops.c (_IO_file_fopen, _IO_file_seekoff), genops.c
+	(_IO_default_seekpos, _IO_default_seekpos), iofgetpos.c, iofsetpos.c,
+	iolibio.h (_IO_fseek), ioftell.c, ioseekoff.c, ioseekpos.c,
+	iostream.cc, streambuf.cc, strops.c (_IO_str_seekoff), strstream.cc:
+	New seekpos/seekoff conventions.
+	* iostreamP.h (convert_to_seekflags):  Removed - no longer needed.
+
+	* iolibio.h (_IO_fread):  New declaration.
+
+	* dbz/Makefile.in:  Re-arrange for cleaner dependencies.
+
+Fri May  5 15:55:22 1995  Per Bothner  
+
+	* libioP.h (_IO_JUMPS. JUMP_FIELD, JUMP0, JUMP1, JUMP2, JUMP3,
+	JUMP_INIT, _IO_FINISH, _IO_OVERFLOW, ... _IO_SYSSTAT):  New macros
+	in preparation for new unified jumptable/vtable implementation.
+	* cleanup.c, filedoalloc.c, iofclose.c, iofflush.c, iofiledoalloc.c,
+	ioprims.c, iosetbuffer.c, iostrerror.c, ioungetc.c:  Use DEFUN.
+	* filedoalloc.c, iofclose, iofflush, iosetbuffer.c:  Use new macros.
+
+	* iofopen.c, iofdopen.c:  Use macros and #if for new jumptables.
+
+	* gen-params:  Do not #include .
+	Add missing quote in 'eval'.
+	Do add #include  in test for .
+	* config/netbsd.mt:  New file, defining _G_CONFIG_ARGS (for fpos_t).
+	* configure.in:  Use netbsd.mt for NetBSD.
+
+Wed May  3 15:03:47 1995  Per Bothner  
+
+	* libioP.h (DEFUN, DEFUN_VOID, AND):  New macros, from ansidecl.h.
+	* iofdopen.c, iofgets.c, iofopen.c, iofputs.c, iofread.c, iofwrite.c,
+	iogetdelim.c, iogetline.c, iogets.c, ioignore.c, iopadn.c, ioperror.c,
+	ioputs.c, iovsprintf.c, iovsscanf.c, outfloat.c:  Use DEFUN.
+
+Mon May  1 16:22:30 1995  Jason Merrill  
+
+	* gen-params: #include .  Don't use __WCHAR_TYPE__ in
+        definition of _G_wchar_t.  Use __attribute__ ((mode)) to get
+        specific-sized ints under gcc, don't worry about int8 or int64
+        otherwise.  Provide defaults if deduction fails.
+
+Thu Apr 27 18:27:53 1995  Per Bothner  
+
+	* streambuf.h (ios::~ios):  Delete _arrays.
+	(_IO_NEW_STREAMS):  Turn on.
+	* libio.h (__adjust_column):  Remove bogus declaration.
+	* genops.c (_IO_set_column):  Fix typo (in commented-out code).
+
+Tue Apr 25 17:14:29 1995  Jason Merrill  
+
+	* config.shared (CXXINCLUDES): Use a shell variable with a
+        different name from the make variable.
+	* configure.in: Update accordingly.
+
+Mon Apr 17 17:19:40 1995  Per Bothner  
+
+	* streambuf.h (__adjust_column):  Remove redundant declaration.
+
+Sat Apr 15 11:39:25 1995  Per Bothner  
+
+	* config.shared (do-clean-dvi):  Also remove *.cps.
+
+	* gen-params:  Use ${SED} instead of sed.
+
+	* libio.h:  Remove #if'd out stuff (confuses makedepend).
+
+	* stdstreams.cc (STD_STR):  Standard streams start with ios::dec set.
+
+Fri Apr 14 23:46:31 1995  Per Bothner  
+
+	* iostream.h, iostream.cc (istream::read, ostream::write):
+	Use streamsize for the length parameter.
+
+	* streambuf.h:  Removed redundant __overflow and __underflow.
+
+	* fstream.h, fstream.cc: Add void fstreambase::attach(int).
+
+	* iosscanf.c (_IO_sscanf):  Fix non-__STDC__ missing declaration.
+
+Mon Apr  3 15:40:55 1995  Jason Merrill  
+
+	* indstream.*: Fix prototypes of xsputn and xsgetn.
+
+	* fileops.c: Avoid ??? trigraph.
+
+Mon Mar 27 16:16:38 1995  Jason Merrill  
+
+	* iomanip.h (operator<< (ostream&, const omanip&): Define
+        separately.
+	(operator>> (istream&, const imanip&): Ditto.
+
+Mon Mar 27 08:56:00 1995  Brendan Kehoe  (brendan@lisa.cygnus.com)
+
+	* builtinbuf.cc (builtinbuf::setbuf): Cast NULL to streambuf*, to
+	avoid warning/error about conversion from void*.
+	* indstream.cc (indirectbuf::seekoff): Likewise.
+	(indirectbuf::seekpos): Likewise.
+	* filebuf.cc (filebuf::setbuf): Likewise.
+	(filebuf::close): Cast NULL to filebuf*.
+
+Wed Mar  1 14:23:18 1995  Per Bothner  
+
+	* configure.in (DISTCLEAN):  Add, with target-mkfrag.
+
+Fri Feb 24 01:01:08 1995  Jason Merrill  
+
+	* configure.in (frags): Don't require so many dashes in the
+        canonical target name.
+
+Sat Feb 18 13:18:30 1995  Per Bothner  
+
+	* streambuf.cc (streambuf::sync):  Always return 0, even for
+	non-flushed output.  This is required by the ANSI/ISO draft.
+	* genops.c (_IO_sync):  Likewise always return 0.
+
+Fri Feb 17 16:33:28 1995  Per Bothner  
+
+	* fileops.c (_IO_file_close_it):  Call _IO_file_sync, rather
+	than _IO_do_flush, because we want to adjust the file pointer
+	if reading and not at end (as in SVR4, and as in fflush).
+	Also, make sure to return error indication if sync fails.
+	(_IO_file_sync):  Ignore seek error if it is ESPIPE.
+	(_IO_file_seekoff):  If not readable, do dumb lseek.
+	* iofclose.c (_IO_fclose):  If closing a non-filebuf, return -1
+	if _IO_ERR_SEEN.
+
+Fri Feb 17 19:31:00 1995  Ian Lance Taylor  
+
+	* gen-params: Check for struct tms in , defining
+	HAVE_SYS_TIMES accordingly.
+
+Wed Feb 15 21:05:11 1995  Per Bothner  
+
+	* strops.c (_IO_str_count):  Use LEN macro.
+	(_IO_str_seekoff):  Update _len field.
+
+Mon Feb  6 19:29:00 1995  Jason Merrill  
+
+	* gen-params: Default to short, long and long long for 16, 32 and
+        64 bit types, in case detection fails.
+
+Wed Jan 25 18:07:30 1995  Jason Merrill  
+
+	* gen-params (_G_wint_t): Allow for broken promotions.
+
+Tue Jan 24 16:15:40 1995  Per Bothner  
+
+	* stdstrbufs.cc (_IO_fake_stdiobufs):  Add an extra layer of struct,
+	to force correct alignment on i960s.
+	(DEF_STDIOBUF, _IO_{stdin,stdout,stderr}_buf):  Update accordingly.
+
+Thu Jan 19 18:30:53 1995  Jason Merrill  
+
+	* config.shared (CXXINCLUDES): Add libstdc++ to includes for
+        building libg++.
+	(LIBS): Also link with libstdc++ when building libg++ toys.
+	Don't set EXPORT_ALL_VARIABLES; users will have to set
+	LD_LIBRARY_PATH themselves.
+
+Fri Dec 30 16:38:13 1994  Mike Stump  
+
+	* config/linux.mt: Fix build problem on linux 1.0.8.
+
+Thu Dec 22 11:49:45 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
+
+	* config/netware.mt: Use gcc to pre-link iostream.nlm's objects
+	  instead of using nlmconv, so that references to functions in
+	  libgcc.a are resolved.
+
+	* configure.in: Append .mt to target makefile fragment file names.
+
+	* floatconv.c (tens, tinytens, bigtens): Added const qualifier.
+
+Tue Dec 20 09:59:50 1994  Mike Stump  
+
+	* gen-params (VTABLE_LABEL_PREFIX): Since some systems have GNU nm
+	as nm, and they demangle by default, we have to notice this, and
+	try --no-cplus (linux) or --no-demangle when running nm.
+
+Wed Dec 14 18:13:58 1994  Per Bothner  
+
+	* gen-params:  To determine vt-name-mangling using dummy.C add
+	#include and #prama interface/implementation to avoid problem with
+	assemblers that don't emit local symbols.  Reported under HPUX 8
+	by Thomas Arend .
+
+	* streambuf.h (ios::ios):  Move inline definition after
+	that of ios::init (which ios::ios calls).
+
+Sun Dec  4 19:50:32 1994  Per Bothner  
+
+	* fileops.c (_IO_file_init, _IO_file_close_it, _IO_file_sync):
+	Set _offset to _IO_pos_BAD, to support applications that follow
+	POSIX.1 rules on mixing file handles.
+
+	* fileops.c (_IO_file_overflow):  Handle case that buffer was
+	allocated (perhaps by setvbuf) but _IO_write_base is still 0.
+
+	* iostdio.h (setbuffer):  #define as _IO_setbuffer.
+	* streambuf.h, filebuf.cc:  Removed filebuf::do_write.
+
+Tue Nov 29 23:38:57 1994  Per Bothner  (bothner@rtl.cygnus.com)
+
+	* floatconv.c (setword0, setword1):  Fix typo.
+
+Tue Nov 29 15:37:29 1994  Per Bothner  
+
+	* config.shared:  Move -fno-implicit-template from CXXFLAGS
+	to LIBCXXFLAGS.  Tests are better run without it.
+
+	* floatconv.c (word0, word1):  Re-place/re-implement using unions
+	instead of casts to avoid optimizer problems.
+
+	* dbz/dbzmain.c:  Renamed dirname -> dir_name to avoid OSF
+	header file braindamage.
+
+Sat Nov  5 19:44:00 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
+
+	* config.shared (LIBCFLAGS): Define.
+	(LIBCXXFLAGS): Define.
+	(DOING_LIBGXX): Define TOLIBGXX.  Change LIBS to use -lg++.  Add
+	LD_LIBRARY_PATH and .EXPORT_ALL_VARIABLES:.
+	(FLAGS_TO_PASS): Add LIBC{,XX}FLAGS.
+	(XC{,XX}FLAGS): Set to LIBCFLAGS or CFLAGS depending on $LIBDIR.
+	(COMPILE.c): Define, use in .c.o rule.
+	(COMPILE.cc): Define, use in .cc.o rule.
+
+Sat Nov  5 15:12:12 1994  Per Bothner  
+
+	* Makefile.in (VERSION):  Update to 0.67.
+
+	* streambuf.h (ios::dont_close):  Is now set by default.
+	* fstream.h, fstream.cc (__fb_init):  New function.  Clears
+	ios::dont_close.  Change fstreambase constructors to call it.
+	* strstream.cc:  *strstream constructors must clear ios::dont_close.
+	* iostream.cc:  Simplify - don't need to set ios::dont_close.
+	* ioassign.cc:  Simplify - assume ios::dont_close is always set.
+
+	* fstream.h, fstream.cc:  If _IO_NEW_STREAMS, put the
+	filebuf as a member __my_fb.
+	* strstream.{h,cc}:  Likewile use a strstreambuf member __my_sb.
+	* streambuf.h, stdstreams.cc, ioextend.cc:
+	Fix if _IO_NEW_STREAMS to not use ios::dont_close.
+
+	* streambuf.h (class ios):  Move rdbuf later, to avoid
+	inability of g++ to inline.
+	* filebuf.cc (filebuf::~filebuf):  Call _IO_do_flush.
+
+	* config.shared:  Emit rules to make depend.
+	* depend:  New file.
+
+Fri Nov  4 17:19:11 1994  Per Bothner  
+
+	* README:  Fix typos.
+	* libio.h:  Add comment.  Update Copyright notice.
+
+Fri Nov  4 21:46:30 1994  Paul Eggert  
+
+	* libio.h (__P): Change argument name spelling from
+	`paramlist' to `protos' for compatibility with BSDI 1.1.
+
+Thu Nov  3 00:45:16 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
+
+	* config.shared (CXXFLAGS): Add -fno-implicit-templates.
+
+Mon Oct 24 15:57:35 1994  Per Bothner  
+
+	* config.shared:  Define NOSTDIC and use it for libio too.
+
+Thu Oct 20 19:45:35 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
+
+	* iogetdelim.c: #include .
+
+Thu Oct 20 17:09:52 1994  Per Bothner  
+
+	* iostream.h:  Add classes _IO_istream_withassign and
+	_IO_ostream_withassign.  Re-type cin, cout, cerr, clog.
+	(class iostream):  Don't add extra _gcount field.
+	* ioassign.cc:  New file.  Implement operator= for cin etc.
+	* streambuf.h (class ios):  Change return type of operator=.
+	* Makefile.in (IOSTREAM_OBJECTS):  Add ioassign.o.
+
+	* Makefile.in:  Re-arrange, so linux.mt overrides can work.
+
+	* fileops.c (_IO_file_seekoff):  Optimize seeks within buffer.
+
+Wed Oct 19 14:25:47 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
+
+	* gen-params (wint_t): Return to using __WCHAR_TYPE__ for
+        compatibility with gcc versions prior to 2.6.1.
+
+Tue Oct 18 17:08:18 1994  Per Bothner  
+
+	* Makefile.in:  Define _G_CONFOG_H as _G_config.h for Linux.  Use it.
+	(IO_OBJECTS):  Add iogetdelim.o.
+	* config/linux.mt:  New file.
+	* configure.in:  Select config/linux.mt if Linux.
+	* iogetdelim.c:  Verious cleanups, many from
+	Ulrich Drepper .
+	* libioP.h: Add _IO_getdelim.  Use (void) for no-parameter functions.
+
+Thu Oct 13 16:30:56 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* libio.h:  Rename USE_DTOA to _IO_USE_DTOA for namespace reasons.
+	* iostream.cc, iovfscanf.c, iovfprintf, floatconv.c:
+	Update USE_DTOA -> _IO_USE_DTOA.
+
+	* libio.h (_IO_feof, _IO_ferror):  Move to here ...
+	* iolibio:  ... from here
+
+	* iostream.cc (istream::get, istream::ignore, istream::read):
+	Set _gcount to 0 if ipfx0 failed.
+
+	* iostream.cc (flush):  Do virtual function call, rather than
+	going through jumptable.  (To get correct method in derived class.)
+	Bug and fix from John Wiegley .
+
+	* iofdopen.c (O_ACCMODE):  Define using O_RDWR, not O_RDWRITE.
+
+	* streambuf.h (ios::rdbuf(streambuf*)):  New.
+	* streambuf.h (ios::operator=):  Make private (i.e. dis-allow).
+
+Wed Oct 12 19:09:20 1994  Jason Merrill  (jason@phydeaux.cygnus.com)
+
+	* gen-params: Define _G_NO_NRV and _G_NO_EXTERN_TEMPLATES if not
+        compiling with g++.
+
+Thu Oct  6 16:03:43 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iostream.texi (ostrstream::str):  Note that NUL is not written
+	automatically.
+
+Wed Oct  5 17:28:29 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iogetdelim.c (_IO_getdelim):  New function.
+
+Wed Oct  5 15:40:22 1994  J.T. Conklin  (jtc@phishhead.cygnus.com)
+
+	* config/netware.mt: New file, first cut at Netware NLM support.
+	* configure.in (*-*-netware*): Use config/netware.mt.
+
+	* config.shared (NLMCONV, LD): New definition.
+
+	* gen-params: check for nm in ${binutils}/nm.new.
+	* config.shared: Likewise.
+
+Tue Oct  4 12:20:01 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iomanip.h (omanip::operator<<):  Make 2nd arg be const.
+	Bug and fix reported by Greg McGary .
+
+	* strstream.cc (strstreambuf::pcount):  Simplify, to match
+	ANSI/ISO specification.
+
+Mon Sep 26 15:19:52 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* gen-params: Include  and  if they exist.
+
+Thu Sep  8 14:41:41 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* iostream.h (class istream): Declare operator>>(long double&).
+	(class ostream): Define operator<<(long double).
+
+	* iostream.cc (istream::operator>>(long double&)): Define.
+
+Wed Sep  7 14:42:29 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iostream.texi (Overflow):  Fix bugs in example.
+
+Fri Sep  2 17:45:57 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iostream.tex:  Document a little on how to write your
+	own streambuf-derived class, with an example.
+
+Tue Aug 30 13:03:57 1994  Brendan Kehoe  (brendan@lisa.cygnus.com)
+
+	* floatconv.c (s2b): Declare X and Y to be _G_int32_t.
+	(diff, quorem): Declare BORROW, Y, and Z likewise.
+	(ulp): Declare L likewise.
+	(_IO_strtod): Declare L and AADJ likewise.
+	(_IO_dtoa): Declare L and D likewise.  Cast division of D by DS to
+	_G_int32_t.
+
+Mon Aug 29 16:01:54 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iosetvbuf.c (_IO_setvbuf):  If setting _IOFBF and no
+	buffer was specified, call __doallocate.
+
+	* fileops.c, floatconv.c:  Add a bunch of parentheses to
+	shut up gcc warnings.  Patch from H.J.Lu.
+
+	* stdiostream.cc (stdiobuf::sys_read):  Inline call to getc
+	for the normal case (size==1).
+
+Sat Aug 20 12:14:52 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in (VERSION):  Increase to 0.66.
+
+Fri Aug 19 17:28:41 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iolibio.h:  Added _IO_printf prototype.
+	Added extern "C" { ... } wrappers #ifdef __cplusplus.
+	Bugs reported by Neal Becker .
+
+Wed Aug 17 18:17:15 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* fileops.c (_IO_file_seekoff):  For _IO_seek_cur, adjust for
+	read-ahead before jumping to label dumb.
+
+Wed Aug  3 13:15:01 1994  H.J. Lu  (hjl@nynexst.com)
+
+	* libioP.h (CHECK_FILE(FILE,RET)): new, which checks for
+	  FILE == NULL and _IO_MAGIC_MASK.
+	  (COERCE_FILE(FILE)): merged into CHECK_FILE(FILE,RET)
+	  with typo fixes.
+
+	* iofread.c, iofwrite.c: add CHECK_FILE(fp, 0);
+	* iofclose.c: add CHECK_FILE(fp, EOF); remove _IO_MAGIC_MASK check.
+
+	* iofflush.c, iofgetpos.c, iofputs.c, iofscanf.c,
+	iofsetpos.c, iofvbuf.c, ioungetc.c:
+	Add CHECK_FILE(fp, EOF) and remove COERCE_FILE(fp).
+
+	* iofgets.c: add CHECK_FILE(fp, NULL) and remove COERCE_FILE(fp).
+	* iofprintf.c: add CHECK_FILE(fp, -1) and remove COERCE_FILE(fp).
+	* ioftell.c: add CHECK_FILE(fp, -1L) and remove COERCE_FILE(fp).
+	* iosetbuffer.c: add CHECK_FILE(fp, ) and remove COERCE_FILE(fp).
+
+Fri Aug 12 15:35:39 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iofdopen.c (_IO_fdopen):  #define O_ACCMODE if it isn't.
+	Still set O_APPEND if "a" is given, but don't unset it
+	if it isn't.  Added comment.
+
+Mon Aug  8 13:11:00 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* gen-params (VTABLE_LABEL_PREFIX):  Changes in the implementation.
+	For look for _*vt[$_.]7*filebuf in the nm output, because that
+	matches what g++ produces and has produced.  Thus it should be
+	somewhat more robust.
+
+Sun Aug  7 22:52:49 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* gen-params (CC):  Remove no-longer-needed -I options
+	passed to xgcc (now they are implied by the -B options).
+
+Wed Jul 20 16:41:13 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in (tooldir):  Added definition, so we can do
+	'make install' in this directory.
+	Bug reported by Klamer Schutte .
+
+Mon Jul 18 18:02:34 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* gen-params (VTABLE_LABEL_PREFIX):  Remove filename sppearing
+	by itself.  Add comment explaining what is going on.
+
+Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@jalod)
+
+	* libio.h: define _IO_uid_t and _IO_HAVE_ST_BLKSIZE
+	  as _G_xxxxxxxx.
+
+Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@jalod)
+
+	* iopopen.c:  Don't include . It is included in "libioP.h".
+
+	* iopopen.c (_IO_proc_close) : check if fp is on the list
+	  before close it.
+
+Thu Jul 14 16:38:47 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* gen-params (CONFIG_NM):  Make sed scripts to find vtable name
+	mangling more robost for different forms of nm output.
+
+Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@jalod)
+
+	* iofopen.c (_IO_fopen): don't check [redundantly] fp == NULL after
+	  IO_file_init(&fp->_file).
+
+	* iomanip.h (template class iapp):
+	  change ostream to istream.
+
+Tue Jul 12 14:09:02 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in (VERSION):  Increase to 0.65.
+	* libioP.h (builtinbuf_vtable):  Only define #ifdef __cplusplus.
+
+	* gen-params (_G_int8_t):  Only define if defined(__STDC__),
+	because K&R C compilers don't have signed char.
+	(_G_int64_t, _G_uint64_t):  Only define if defined(__GNUC__)
+	because other compilers may not have long long.
+
+Sun Mar 06 13:10:21 1994  H.J. Lu  (hjl@nynexst.com)
+
+	* floatconv.c (_IO_dtoa ()): fix a small memory leak, set the
+	  "on_stack" field to be 0 if "result" is not NULL.
+
+Sat Mar 05 13:18:20 1994  H.J. Lu  (hjl@nynexst.com)
+
+	* floatconv.c (_IO_dtoa ()): if the number of digits of the
+	  floating point number is more than the previous one, free the
+	  old string and allocate a new one.
+	  [Minor optimization to avoid Bcopy. -PB]
+
+Mon Jul 11 10:53:41 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* fileops.c (_IO_file_underflow):  'count' should be unsigned,
+	since it contains the return value of read.  Reported by
+	Teemu Torma .
+
+Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@nynexst.com)
+
+	* floatconv.c (_IO_strtod ()): make "+" and "-" as error.
+
+Sat Jul  9 15:09:21 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	Make sure _IO_FILE::_flags is always initialized correctly, for the
+	C functions (fopen, fdopen, popen), and not just the C++ functions.
+	* fileops.c (_IO_file_init):  Set _flags to CLOSED_FILEBUF_FLAGS.
+	* fileops.c (_IO_file_fopen):  Remove bogus assignment.
+	* filebuf.cc (filebuf constructors):  Don't pass CLOSED_FILEBUF_FLAGS
+	to streambuf constructor - _IO_file_init does it instead.
+	* filebuf.cc (CLOSED_FILEBUF_FLAGS):  Removed.
+	* iopopen.c (_IO_proc_open):  Use _IO_mask_flags.
+
+Thu Jun 30 08:49:53 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* dbz/Makefile.in (mostlyclean): Add target.
+
+Wed Jun 29 09:30:12 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* gen-params: Woops, can't run a C program to determine target
+        characteristics.  Sigh.
+
+Tue Jun 28 03:11:33 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* gen-params: Add _G_{,u}int{8,16,64}_t, use a short C program to
+        determine what all these should be rather than trying to compare
+        the MAX numbers in the shell.
+
+Sun Jun 26 21:04:24 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* stdiostream.h, stdiostream.cc (stdiobuf::xsgetn):  Removed.
+	Too hairy.  If we want to optimize it, we should do so in
+	filebuf::xsgetn (or rather _IO_file_xsgetn).
+
+	* stdiostream.h (class stdiobuf), stdiostream.cc:  Fix parameter
+	and return types of virtual function to matcher base types (Oops!).
+	* streamstream.cc (stdiobuf::xsgetn, stdiobuf::xsputn):
+	Optimize to call fread.fwrite directly if !buffered.
+	* fileops.c:  Fix comment.
+
+Fri Jun 24 11:28:18 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* stdiostream.h (istdiostream, ostdiostream):  New classes.
+
+	More robust final cleanup.
+	* cleanup.c (_IO_register_cleanup):  Register _IO_cleanup,
+	rather than _IO_flush_all.
+	* filedoalloc.c: Update comment.
+	* genops.c (_IO_unbuffer_all):  New.  Makes all files unbuffered.
+	* genops.c (_IO_cleanup), libioP.h:  New function.  Call
+	_IO_flush_all, and then _IO_unbuffer_all.  This is in case C++
+	destructors try to do output *after* _IO_cleanup is called.
+
+	Construct standard stdiobufs statically (using type punning).
+	* stdstrbufs.c;  Unless _STDIO_USES_IOSTREAM declare standard
+	stdiobufs (for stdin, stdout, and stderr), using type punning
+	(struct _IO_fake_stdiobuf).  This avoids constructor-time problems.
+	* stdstreams.cc:  Remove the declarations of the stdiobufs.
+	Instead use the new (fake) ones in stdstrbufs.cc.  We no longer
+	have to call ios::sync_with_stdio at constructor time.
+
+	Preliminary support for new ANSI streambuf::uflow virtual.
+	* libioP.h (struct _IO_jump_t):  Add __uflow field.
+	* genops.c (_IO_default_uflow), libioP.h:  New function.
+	* fileops.c (_IO_file_jumps), iopopen.c (IO_proc_jumps),
+	iovfprintf.c (_IO_helper_jumps), strops.c (_IO_str_jumps),
+	streambuf.cc (_IO_streambuf_jumps):  Add _IO_default_uflow.
+	* genops.c (__uflow):  New function.
+	(save_for_backup):  New function.  Some code shared by
+	__underflow and __uflow, moved out from the former.
+	(_IO_default_uflow):  New function.
+	* libio.h (_IO_getc):  Call __uflow, not __underflow.
+
+Wed Jun 22 20:22:49 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	Make sure that the vtable of a streambuf is always valid,
+	which makes ios::rdbuf simpler and faster.
+	* gen-params:  Add code to determine _G_VTABLE_LABEL_HAS_LENGTH,
+	_G_VTABLE_LABEL_PREFIX, _G_VTABLE_LABEL_PREFIX_ID, and
+	_G_USING_THUNKS, which describe how virtual function tables are named.
+	* stdfiles.c (FILEBUF_LITERAL):  Moved to libioP.h.
+	* libioP.h (builtinbuf_vtable):  New (complicated) declaration.
+	* filebuf.cc (filebuf::__new), strstream.cc (SET_STR_JUMPS):
+	Initialize vtable to builtinbuf_vtable, not NULL.
+	* stdstrbufs.cc:  New file.  Same as stdfiles.c, except that
+	vtable is initialized to builtinbuf_vtable, not NULL.
+	* streambuf.h (ios::rdbuf):  Can now simplify/optimize, due to
+	above changes.  Always, just return _strbuf.
+	* builtinbuf.h, builtinbuf.cc (builtinbuf::vtable,
+	builtinbuf::get_builtin_vtable):  Removed.  No longer needed.
+	* streambuf.h, builtinbuf.cc (ios::_IO_fix_vtable):  No longer needed.
+	Only defined #ifdef _STREAM_COMPAT, for binary compatibility.
+	* Makefile.in:  Move stdfiles.o from IO_OBJECTS to STDIO_WRAP_OBJECTS.
+	(IOSTREAM_OBJECT):  Add stdstrbufs.o.
+	* Makefile.in (_G_config.h):  Pass $(CXXFLAGS) as part of $(CXX).
+
+Fri Feb 11 11:08:01 1994  SBPM Marc GINGOLD (marc@david.saclay.cea.fr)
+
+	* iovfprintf.c (helper_vfprintf): add
+	  hp->_IO_file_flags = _IO_MAGIC|(_IO_IS_FILEBUF+_IO_NO_READS);
+	[This is needed because _IO_vfprintf checks for _IO_UNBUFFERED. -PB]
+	[Actually:  don't set _IO_IS_FILEBUF. -PB]
+
+Wed Jun 22 13:49:22 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* stdiostream.cc, stdiostream.h (stdiobuf::buffered):  New methods.
+
+	* iofdopen.c (_IO_fdopen):  Various minor improvements.
+
+	* iovfscanf.c:  Don't return EOF on control_failure.
+
+Tue Dec 21 13:02:48 1993  H.J. Lu  (hjl@nynexst.com)
+
+	* iovfscanf.c:  Enforce the sequence of the conversion specifications.
+
+Fri Jun 17 20:57:22 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iofdopen.c:  Use fcntl to check that requested access mode is
+	compatible with existing access mode, and to change the
+	O_APPEND file status flag if need be.
+
+Thu Jun 16 17:33:50 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* streambuf.h (ios::init):  Initialize all the fields.
+	This may be overkill, but the current ANSI working paper requires it.
+	* streambuf.h (ios::ios):  Reimplement in terms of ios::init.
+	* iostream.cc (Non-default constructors istream::istream,
+	ostream::ostream, iostream::iostream):  Cannot use a mem-initializer,
+	because it is ignored if initializing a derived class.  Instead,
+	call ios::init.
+
+Wed Jun 15 13:35:37 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* stdstreams.cc (ISTREAM_DEF):  Fix typo (it's a _fake_istream, not
+	a _fake_ostream).  Reported by Jason Shirk .
+
+	* stdiostream.h, stdiostream.cc (stdiobuf::~stdiobuf):  New.
+	Call _IO_do_flush.
+	* stdiostream.cc (stdiobuf::sync):  Call _IO_do_flush rather
+	than filebuf::sync (to avoid bad seeks).
+
+	* libioP.h (_IO_do_flush):  Add missing parentheses.
+
+Fri Jun  3 19:16:57 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* config.shared (CXXFLAGS): Remove -fno-implicit-templates.
+
+	* iomanip.h: Add explicit external instantiations.
+
+Wed Jun  1 14:14:44 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* libio.h (struct _IO_FILE_plus):  Move definition from here ...
+	* libioP.h (struct _IO_FILE_plus):  ... to here.  Since this
+	file is private to the implementation, we can rename the fields
+	from the implementor's to the user's name anme space.
+	(This avoids a lossage on SCO, whose stdio.h has a #define _file.)
+	* iofdopen.c, iofopen.c, stdfiles.c:  Fix field references accordingly.
+	* iopopen.c (struct_IO_proc_file):  Rename fields from
+	implementor's name space to user's, and update usages.
+	* streambuf.h (streambuf::_vtable):  Re-implement to not need
+	struct _IO_FILE_plus.
+	* strfile.h (struct _IO_strfile_): Likewise.
+
+Wed Jun  1 13:57:48 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* config.shared (CXXFLAGS): Use -fno-implicit-templates instead of
+	-fexternal-templates.
+
+Tue May 31 08:49:28 1994  Mike Stump  (mrs@cygnus.com)
+
+	* genops.c, iofclose.c, iofdopen.c, iofopen.c, iopopen.c: Be
+	consistent about protecting #include .
+
+	* ioputs.c: Add #include , to avoid warning on alpha.
+
+	* iofdopen.c: Add #include , so that malloc works on
+	machines where sizeof(int) != sizeof(void *).
+
+Mon May 30 17:26:49 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* pfstream.cc (ipfstream::ipfstream, opfstream::opfstream):
+	Reverse sense of test of return value of procbuf::open.
+	(It returns NULL on failure.)
+
+	* filedoalloc.c (_IO_file_doallocate):  Remove dead code for
+	USE_MALLOC_BUF.  Add code to return EOF if ALLOC_BUF fails.
+
+Sat May 28 13:47:47 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* iomanip.cc: Explicitly instantiate smanip and
+	smanip.
+
+Wed May 25 16:04:12 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* strfile.h:  Use __P instead of _PARAMS.
+
+Fri May 20 11:42:17 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* libio.h: Rename _PARAMS macro to __P for better glibc and BSD
+	compatibility.  (Also define _PARAMS for backwards compatibility.)
+	* cleanup.c, iolibio.h, ioperror.c, iovfprintf.c, iovfscanf.c,
+	libioP.h: Use __P instead of _PARAMS.
+	* iostdio.h: Use __P instead of _ARGS.
+
+	* fileops.c (_IO_file_read):  Minor stylistic tweak.  (It is
+	preferable to test errno *after* the error return.)
+
+Fri May 13 15:25:36 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* iostream.*: Add insertor and extractor for bool (just pretend
+	it's an int).
+
+Fri May 13 14:12:03 1994  Mike Stump  (mrs@cygnus.com)
+
+	* gen-params: Check for builtin bool support.
+
+Wed May 11 00:48:35 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	Make libg++ build with gcc -ansi -pedantic-errors
+	* gen-params: #ifdef __STRICT_ANSI__, #define _G_NO_NRV.
+	* pfstream.cc (ipfstream::ipfstream): Wrap use of variable-size
+	array in #ifndef __STRICT_ANSI__.
+
+Fri May  6 12:42:21 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in (VERSION):  Increase to 0.64.
+
+	* isgetline.cc (istream::getline):  The delimiter should *not*
+	be included in the gcount().
+
+	* filedoalloc.c:  #include  (If __STDC__) to get malloc.
+	* iostream.h (ostream::put):  Remove overloaded versions, to match
+	new working paper.  (Actually just put inside _STREAM_COMPAT, for now.)
+
+Tue May  3 14:14:57 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* genops.c (_IO_default_finish):  Make robust when called
+	multiple times on the same _IO_FILE*.  (One way this can
+	happen is by the builtinbuf destructor being followed by the
+	streambuf destructor.)
+
+Mon May  2 13:55:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* gen-params: Actually determine wint_t rather than depending on
+	cpp to provide it or defaulting to the underlying type for
+	wchar_t.
+
+Sat Apr 30 14:47:30 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* gen-params: Add _G_wint_t, allow __*_TYPE__ to override values
+	at compile time, fix definition of _G_ARGS.
+
+Fri Apr 29 16:55:37 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* libio.h: Remove #pragma interface.  (There is no implementation.)
+
+Mon Mar 28 14:22:26 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iostream.cc (ostream::operator<<(double)):  Add/fix support
+	for printing '+' when ios::showpos is set.
+	(Fixes bug reported by Doug Moore .)
+	* iostream.cc (istream::read):  Set eofbit as well as failbit on eof.
+	* iostream.cc (ostream::operator<<(int)):  Fix conversion
+	to unsigned (used to lose on INT_MIN).
+	* iostream.cc (ostream::operator<<(long)):  Use (unsigned long),
+	rather than (unsigned) for temporary.
+
+	* config.shared, Makefile.in:  Remove definitions and uses
+	of XTRAFLAGS.  It is no longer needed, since it is
+	now implied by the -B flag.
+
+Fri Mar 25 00:31:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* builtinbuf.h: Add put /**/ around comment on trailing #endif.
+
+	* Makefile.in (c++clean): Make clean in tests subdir, too.
+
+Wed Mar 23 16:42:09 1994  Doug Evans  (dje@canuck.cygnus.com)
+
+	* configure.in: Remove Makefile.tem before creating it.
+	Needed when configuring from read-only source trees.
+
+Wed Mar 16 14:06:42 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* stdstreams.cc:  Fix so that stdiobuf are used for cin/cout/cerr,
+	unless _STDIO_USES_IOSTREAM is defined.
+	* filebuf.cc (filebuf::setbuf):  Fix confusion about return
+	value from _IO_file_setbuf.
+
+Sun Mar 13 00:54:12 1994  Paul Eggert  (eggert@twinsun.com)
+
+	* config.shared: Ensure that `all' precedes `.PHONY';
+	BSDI 1.1 needs this.
+
+Sat Mar 12 03:58:00 1994  Paul Eggert  (eggert@twinsun.com)
+
+	* config.shared: Output a definition of INSTALL that uses
+	$${rootme}, not ${rootme}.  Most `make's don't care, but BSDI
+	1.1 `make' does.
+
+Fri Mar  4 17:33:01 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iopopen.c:  #define _POSIX_SOURCE.
+	* isgetline.c (istream::getline):  Various fixes.
+
+Thu Mar  3 17:58:20 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iostream.cc (write_int):  Fix test for when to add initial '0'
+	when ios::oct and ios::showbase are set.
+	For hex, showbase adds initial 0x (or 0X) regardless of val==0.
+	Bugs reported by Phil Roth .
+
+Mon Feb 21 13:18:20 1994  H.J. Lu  (hjl@nynexst.com)
+
+	* libio.h (_IO_PENDING_OUTPUT_COUNT(_fp)): return the
+	pending output count in _fp.
+
+Fri Feb 25 09:26:57 1994  Ian Lance Taylor  (ian@cygnus.com)
+
+	* gen-params: For HAVE_SYS_WAIT, compile dummy.c, not dummy.C.
+
+Tue Feb 22 11:19:09 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* streambuf.h, genops.c, libioP.h:  Rename references to
+	_IO_FILE fields other_gbase => _IO_save_base,
+	_aux_limit => _IO_backup_base, and _other_egptr => _IO_save_end.
+	* libio.h:  Remove no-longer needed macros _other_gbase,
+	_aux_limit, and _other_egptr.
+	* genops.c (__underflow, _IO_default_finishh, _IO_unsave_markers):
+	Check _IO_save_base for NULL before FREEing it or calling
+	_IO_free_backup_area.
+
+Thu Feb 17 15:26:59 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* gen-params:  Improve deduction of _G_uint32 and _G_int32.
+	Should now work for 16-bit, 32-bit, or 64-bit targets.
+	* gen-params:  Check for sys/wait.h using ${CC}, since it's
+	now used in a C file, not a C++ file.
+	* floatconv.c:  Typedef _G_uint32_t as unsigned32, and use
+	unsigned32 in place of unsigned long.  (Needed for Alpha.)
+
+Tue Feb  8 13:40:15 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* fileops.c (_IO_file_close_it):  Simplify by using _IO_do_flush.
+	* fileops.c (_IO_file_finish):  Don't call _IO_file_close_it -
+	do it inline.  Call _IO_do_flush even if _IO_DELETE_DONT_CLOSE.
+	* fileops.c (_IO_file_attach):  Set _IO_DELETE_DONT_CLOSE.
+	* genops.c (_IO_flush_all):  Only call overflow if there is
+	something to write.
+	* iofclose.c (_IO_fclose):  Check that magic number is correct,
+	and clear it when done.  Avoids crashing some buggy applications.
+	* iogetline.c (_IO_getline):  Don't gratuitously increment old_len.
+	* iogets.c (_IO_gets):  Take care to get required ANSi semantics.
+
+Sun Feb  6 19:50:39 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* iomanip.cc: Explicitly instantiate operator<< and >>.
+
+Fri Feb  4 12:28:22 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* config.shared (CXXFLAGS): Use -fexternal-templates.
+
+	* iomanip.h: Uncomment #pragma interface.
+
+Thu Jan 20 13:48:40 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	If no characters are read by fgets, ANSI C doesn't allow '\0' to
+	be written to the buffer, but it is required by ANSI C++
+	for istream::get and istream::getline.  Both use _IO_getline ...
+	* iogetline.c (_IO_getline):  Don't write a '\0' at the end
+	of the read data.  The input buffer length does not include
+	space for a '\0'.
+	* iofgets.c, iogets.c:  Change appropriately.
+	Also check for _IO_ERR_SEEN, as required by ANSI.
+	* isgetline.cc:  Update accordingly.
+
+Mon Jan 17 13:24:26 1994  Jason Merrill  (jason@deneb.cygnus.com)
+
+	* Makefile.in (c++clean): Added target for compiler testing
+	(i.e. make c++clean all).
+
+Mon Jan 10 11:20:42 1994  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* libio.h (_IO_putc):  Add parentheses.
+	Patch from Rik Faith .
+
+Tue Jan  4 01:32:28 1993  Hongjiu Lu (hjl@nynexst.com)
+
+	* genops.c (_IO_default_xsputn):
+	  (_IO_default_xsgetn):
+	* ioignore.c: change "_IO_size_t count" to
+	  "_IO_ssize_t count".
+	* iogetline.c: change "_IO_size_t len" to
+	  "_IO_ssize_t len".
+
+Mon Dec 20 00:31:21 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* config.shared (CXXINCLUDES):  Fix quoting of $(NOSTDINC).
+
+Sun Dec 19 21:03:45 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in (VERSION):  Increase to 0.63.
+
+Fri Dec 17 13:02:44 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iofread.c (_IO_fread):  Return 0 if either size or count is 0.
+	* iofwrite.c (_IO_fwrite):  Return 0 if either size or count is 0.
+	(This is consistent with fread, and most implementations, but not
+	with a literal reading of the ANSI spec.)
+	* iovfscanf.c (_IO_vfscanf):  If got EOF while skipping spaces,
+	set seen_eof and break (instead of returning).
+	* sbscan.cc (streambuf::vscan):  Set error state before returning.
+	* streambuf.h:  Add a forward declarations for class istream
+	to work around a g++ vtable name mangling bug.  (Patch from
+	harry@pdsrc.hilco.com via Jeffrey A Law .)
+	* NEWS:  New file.
+
+Sat Dec 11 16:21:08 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iovfprintf.c (struct helper_file, _IO_helper_overflow,
+	helper_vfprintf, _IO_helper_jumps):  New structs and functions.
+	(_IO_vfprintf):  Use helper_vfprintf to make printing to
+	unbuffered files more efficient.
+	* genops.c (_IO_default_underflow), libioP.h:  New function.
+
+	* iovsscanf.c (_IO_vsscanf):  The input string's length marks
+	its logical end-of-file.
+
+Wed Dec  8 13:20:46 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* indstream.cc (indirectbuf::sync()):  Don't crash if get_stream()
+	or put_stream() are NULL;  sync() both streams even if error.
+
+Sun Dec  5 19:24:29 1993  Brendan Kehoe  (brendan@lisa.cygnus.com)
+
+	* iostreamP.h (convert_to_seekflags): Use _IO_seek_set instead of
+	0 inside the conditial expressions.
+
+	* iofsetpos.c (_IO_fsetpos): Delete unused var `pos'.
+
+Sat Dec  4 15:57:26 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* filedoalloc.c (_IO_file_doallocate):  Change type of couldbetty
+	to int, and type of size to _IO_size_t, instead of size_t.
+	(Change needed for Ultrix, which incorrectly deliberately doesn't
+	define size_t in  if _POSIX_SOURCE is defined.)
+
+Thu Dec  2 22:43:03 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* fileops.c (_IO_file_finish):  Remove redundant call to _IO_un_link.
+	* iofclose.c (_IO_fclose):  Don't call fp->_jumps->__close;  it's
+	too low-level.  Instead call _IO_file_close_it.
+	* dbz/Makefile.in (rclean, distclean):  Add some missing files.
+
+Wed Dec  1 13:19:14 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* config/hpux.mt (MATH_H_INLINES): No longer define.
+	Patch from Jeffrey A Law .
+
+Fri Nov 26 13:28:36 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* config.shared (CINCLUDES):  Define default if libg++.
+	* iofread.c:  Use _IO_sgetn.c.
+	* iolibio.h (_IO_clearerr):  Fix typo.
+	* genops.c (_IO_seekmark):  Return 0 on success.
+	* floactconv.c (Binit):  Change to static.
+	* iofclose.c (_IO_fclose):  Check if file is _IO_stdin, _IO_stdout,
+	or _IO_stderr;  if so don't try to free it.  Fix from hjl@nynexst.com.
+
+	* genops.c (_IO_default_sync), libioP.h:  New function.
+	* libioP.h (_IO_default_close):  Use _IO_default_sync -same interface.
+
+	* Makefile.in:  Increase version to 0.62.
+	* iopopen.c (_IO_proc_close):  Use waitpid (available in libibarty,
+	if needed), rather than wait.  Don't block/ignore SIGINT etc,
+	as this is counter to Posix.2.
+	* iopopen.c:  Chain open proc_files, and have the child close
+	the ones that are open (as required by Posix.2).
+
+	* fstream.h (fstreambase::rdbuf), strstream.h (strstreambase
+	::rdbuf):  Call ios::rdbuf() instead of getting _strbuf directly.
+
+	* sbscan.cc (streambuf::vscan):  Comment out duplicate default arg.
+	* floatconv.c:  Recognize Alpha and i860 as little-endian.
+	* streambuf.cc:  Return two bogus value returns from void functions.
+	* iolibio.h, iofwrite.c:  Fix buffer type to (const void*).
+	* libio.h:  Predefine of struct _IO_FILE to help non-g++-compilers.
+	* libioP.h, pfstream.cc, stdfiles.c, iovfscanf.c: Cleanup syntax junk.
+	* stdstreams.cc:  Minor simplification.
+	* streambuf.h, builtinbuf.cc:  Add non-const ios::_IO_fix_vtable()
+	for temporary binary compatibility.
+
+	* filedoalloc.c, fileops.c:  Add _POSIX_SOURCE.
+	* fileops.c, iofopen.c, iofputs.c, iostream.cc, strops.c,
+	strstream.cc, genops.c:  Add some missing #includes.
+	* iofopen.c, iofdopen.c:  Return NULL if malloc fails.
+	* iovfscanf.c:  Fix return type in strtol prototype.
+	* fwrite.c:  Remove bogus file.
+
+Wed Nov 17 14:09:42 1993  Per Bothner  (bothner@cygnus.com)
+
+	* builtinbuf.cc (ios::_IO_fix_vtable), streambuf.h:  Make method
+	const, to reduce problems with -Wcast-qual.
+
+Tue Nov 16 19:30:42 1993  david d `zoo' zuhn  (zoo@rtl.cygnus.com)
+
+	* config.shared (CXXINCLUDE): use ${} instead of $() for NOSTDINC
+
+Tue Nov 16 14:15:45 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iopopen.c (_IO_proc_close):  Re-structure to avoid
+	declarations after statements.
+	* floatconv.c:  If not __STDC__, #define DBL_MANT_DIG.
+	* config/isc.mt (G_CONFIG_ARGS): Remove bogus spaces.
+	Patch from David A. Avery .
+
+Tue Nov 16 15:58:31 1993  Mark Eichin  (eichin@cygnus.com)
+
+	* Makefile.in (_G_config.h): explicitly use $(SHELL) to run
+	gen-params, since we know it is a script (we're explicitly looking
+	in ${srcdir} for it) and /bin/sh might not be good enough.
+
+Mon Nov 15 13:26:22 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* builtinbuf.cc:  Don't depend on initialization of static
+	variable builtinbuf::vtable, since that might happen after
+	we need it (for a static constructor).  Instead, initialize
+	it when needed by inlining the code from get_builtin_vtable
+	into ios::_IO_fix_vtable().
+
+	* floatconv.c:  Avoid using #elif, which some C compilers lack.
+	* iogetline.c, libioP.h:  Make char parameter be int, to avoid
+	some default promotion anomalies.
+
+Fri Nov  5 11:49:46 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* config.shared (do-clean-dvi):  Remove TeX work files.
+	* iopopen.c (extern _IO_fork):  Don't use parameter type void.
+	* strops.c (_IO_str_init_static):  Clear the allocate_buffer
+	function pointer, to mark the strfile as being static.
+	Bug fix from Mike Raisbeck .
+
+Thu Nov  4 10:44:24 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* filebuf.cc (filebuf:): Use sseekoff rather than seekoff
+	(which loses if vtable pointer is NULL).
+
+	* iostream.cc (ostream::operator<<(long long n)):  Fix thinko.
+
+	* Makefile.in (VERSION):  Increase to 0.60.
+	* Makefile.in (IO_OBJECTS):  Added iopopen.o.
+	* config.shared (DISTCLEAN):  Also remove Make.pack.
+	* config.shared (CXXINCLUDES):  Add $(NOSTDINC).
+
+	* config.shared (INSTALL):  Fix so it ues the correct install.sh
+	whether $srcdir is absolute or relative.
+
+	* floatconv.c (DBL_MAX_10_EXP): Fix default value.
+
+Wed Nov  3 10:20:49 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* gen-params:  Make more robust to allow random junk (NeXT
+	has spaces) before typedefs.
+
+	* fileops.c (_IO_file_overflow):  Reduce code duplication.
+	* Makefile.in (IO_OBJECTS):  Remove ioputs.o.
+
+	* iovfscanf.c, libio.h:  Extra parameter to _IO_vfscanf,
+	for optionally setting an error indication..
+	* iofscanf.c, ioscanf.c, iofscanf.c, iovsscanf.c:  Fix calls to
+	_IO_vfscanf to pass an extra NULL.
+	* sbscan.cc (streambuf::vscan):  If passed an extra stream,
+	set its error state (using new _IO_vfscanf parameter.
+
+	* filedoalloc.c, fileops.c, genops.c, iogetline.c, ioignore.c,
+	libio.h, libioP.h, streambuf.cc streambuf.h, strfile.h, strops.c,
+	strstream.cc:  Replace macros (_base, _ebuf, _eback, _gptr, _egptr,
+	_pbase, _pptr, _epptr) by field names (_IO_buf_base, _IO_buf_end,
+	_IO_read_base, _IO_read_pre, IO_read_end, _IO_write_base,
+	_IO_write_ptr, _IO_write_end).
+	* libio.h:  Remove the old macros (which fixes a conflict.
+
+Mon Nov  1 15:22:12 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iostream.cc:  Use _IO_sputn instead of sputn.  _IO_sputn does
+	not require a vtable pointer, and is also slightly faster.
+
+	* builtinbuf.{h,cc} (builtinbuf::setbuf):  Fix return and
+	parameter types.
+
+Mon Oct 25 12:56:33 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	Kludge to make sure _IO_FILE buffers get flushed before exit.
+	* dbz/dbzmain.c, dbz/fake.c, dbz/byteflip.c:
+	Invoke DBZ_FINISH macro (if defined) before (normal) exits.
+	* dbz/Makefile.in (CFLAGS):  Define DBZ_FINISH to call _IO_flush_all.
+
+Sat Oct 23 22:10:53 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in (VERSION):  Set to 0.60 for libg++ release.
+	* fileops.c (_IO_file_attach):  Set _offset to _IO_pos_BAD.
+	* iostream.cc (ostream::flush):  Fix thinkp.
+	* editbuf.cc, isgetsb.cc, isscan.cc, osform.cc, parsestream.cc,
+	pfstream.cc, sbform.cc, sbscan.cc, stdstreams.cc, stream.cc:
+	Replace #include "ioprivate.h" by #include "libioP.h" (and
+	sometimes stdarg.h, stdlib.h and/or string.h).
+	* ioprivate.h:  Removed.
+
+
+Thu Oct 21 19:24:02 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* PlotFile.h, SFile.h, editbuf.cc, editbuf.h, filebuf.cc,
+	fstream.cc, fstream.h, indstream.cc, indstream.h, iomanip.cc,
+	iomanip.h, ioprivate.h, iostream.cc, iostream.h, isgetline.cc,
+	isgetsb.cc, parsestream.cc, parsestream.h, pfstream.cc,
+	pfstream.h, procbuf.cc, procbuf.h, stdiostream.cc, stdiostream.h,
+	stdstreams.cc, streambuf.cc, streambuf.h, strstream.cc,
+	strstream.h:  Remove old (duplicate) copyright notices.
+
+	* iostream.cc:  Fix calls to sync() to be safe in the presence
+	of vtable-less streambufs.
+
+Wed Oct 20 15:22:04 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* streambuf.h (streambuf::underflow, streambuf::overflow):
+	Don't make virtual functions pure.
+	* streambuf.cc (streambuf::underflow, streambuf::overflow):
+	Default definitions (return EOF).
+	* fstream.h:  Add new (int fd, char* buf, int len) constructors.
+	These are deprecated, but added for AT&T compatibility.
+	* fstream.cc fstreambase::fstreambase(int fd, char *p, int l): New.
+
+Thu Oct 14 14:57:01 1993  david d `zoo' zuhn  (zoo@rtl.cygnus.com)
+
+	* configure.in: use 'mv -f' instead of 'mv'
+
+Tue Oct 12 05:01:44 1993  Mike Stump  (mrs@cygnus.com)
+
+	* floatconv.c: Fix typo, change __STDC to __STDC__.
+
+Mon Oct 11 17:03:12 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* cleanup.c:  It should be #if _G_HAVE_ATEXIT, not #ifdef.
+
+	* floatconv.c, iostrerror.c, iovfprintf.c, iovfscanf.c, libioP.h:
+	Bunch of fixes to allow use of non-ANSI (K&R) C compilers.
+
+	* Makefile.in (iostream.list):  Use CC=$(CXX) to force use of gcc.
+	* README:  New file.
+
+Fri Oct  8 16:19:58 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in:  Move ioungetc.o from STDIO_WRAP_OBJECTS to
+	IO_OBJECTS (since it is needed for iovfscanf.c).
+	* iostrerror.c:  Add declaration of strerror.
+
+Thu Oct  7 12:02:28 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* cleanup.c:  New file, to cause flushing at exit.
+	* filedoalloc.c:  Cause flushing on exit.
+	* Makefile.in (OSPRIM_OBJECTS):  Add cleanup.o.
+	* gen-params:  Check for atexit.
+
+Tue Oct  5 19:11:14 1993  Mike Stump  (mrs@cygnus.com)
+
+	* ioperror.c (_IO_strerror): Add missing ()s in _PARAMS usage.
+
+Tue Oct  5 10:33:37 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iofprintf.c, iofscanf.c, ioprintf.c, ioscanf.c, iosprintf.c,
+	iosscanf.c:  Remove bogus semi-colon after va_dcl.
+	* ioperror.c:  Fix typos in declaration.
+
+Mon Oct  4 17:12:22 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* configure.in (CLEAN):  Define (as _G_config.h *.a).
+
+	* fileops.c (_IO_file_read):  Don't assume EINTR is defined.
+	* iosetbuf.c:  Replace by generalized ...
+	* iosetbuffer.c:  ... variant, derived from BSD.
+	* Makefile.in (STDIO_WRAP_OBJECTS):  Change correspondingly.
+	* iosetvbuf.c (iosetvbuf):  Minor ANSI tweak.
+	* iostdio.h (setbuf, setlinebuf):  New #defines.
+	* iolibio.h (_IO_setbuf, _IO_setlinebuf):  (Re-)define as macros.
+	* Makefile.in (LIBIO_OBJECTS):  New macro.
+
+Tue Sep 28 14:15:52 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* libioP.h (_IO_proc_open, _IO_proc_close): Add missing return types.
+	* procbuf.cc:  Belated fixes.
+
+Mon Sep 27 14:04:47 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in: List new files.  Add STDIO_WRAP_OBJECTS macro.
+	* floatconv.c (d2b):  Use Exp_msk11 instead of Exp_msk1.
+	* iofgetpos.c (_IO_fgetpos), iofsetpos.c (_IO_fsetpos):  Clean up.
+	* iolibio.h:  New file.  Declarations of _IO_foo, for most foo
+	where foo is a stdio function.  (Remove these from libio.h.)
+	* iostream.h (istream::istreambuf, ostream::ostreambuf):  Move
+	obsolete functions inside #ifdef _STREAM_COMPAT.
+	* libio.h, libioP.h, streambuf.h, parsestream.h, stdiostream.h:
+	Use _IO_fpos_t rather than _IO_pos_t.
+	* iopopen.c:  New file type, for pipe (popen-like) streams.
+	* procbuf.cc:  Now just a C++ wrapper for the files in iopopen.c.
+	* streambuf.h (ios::unsetf):  Return complete old value of flags.
+	* iogets.c (_IO_gets(), ioungetc.c (_IO_ungetc), ioperror.c
+	(_IO_perror), iostrerror.c (_IO_strerror):  New files and
+	functions, for stdio implementation.
+	* iostdio.h:  Add declarations for various recently-added functions.
+
+Sun Sep 12 14:24:55 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* streambuf.h (ios::showpos):: Fix typo.
+
+Fri Aug 27 12:05:47 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iopadn.c (_IO_padn):  Change to return count of chars written.
+	* outfloat.c, iovfprintf.c:  Change for new _IO_padn interface.
+	* iostream.cc (ostream::operator<<):  Make sure to set badbit
+	on a failure (many places).  Use _IO_padn more.
+	* iostream.cc (ostream& ostream::operator<<(const void *p):  Move to
+	* osform.cc:  ... here, to reduce linking-in-the-world syndrome.
+	* osform.cc: Use rdbuf(), instead of _strbuf directly.
+
+	* genops.c (_IO_sgetn), libio.h:  New function.
+	* streambuf.h (streambuf.h::sgetn):  Use _IO_sgetn.
+	* SFile.cc (SFile::operator[]):  Use sseekoff, not seekoff.
+
+Thu Aug 26 10:16:31 1993  david d `zoo' zuhn  (zoo@rtl.cygnus.com)
+
+	* config.shared (SUBDIRS): only recurse if the directory is configured
+
+Wed Aug 25 12:56:12 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* config/{hpux.mt, isc.mt, sco4.mt}:
+	Moved from ../libg++/config (since they affect _G_config.h).
+	* configure.in:  Set target_make_frag to one of the above files.
+
+Fri Aug 20 00:53:14 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* iofopen.c (iofopen):  Fix type passed to _IO_un_link().
+	* Makefile.in (_G_config.h):  Pass $CC (not $CXX) as CC.
+
+	* configure.in (configdirs):  Add dbz and stdio.
+	* fileops.c (_IO_file_seekoff):  Convert more old functionality.
+	* iofdopen.c:  Use mode parameter to set _flags.
+	* iofscanf.c, ioputs.c, ioscanf.c, iosprintf.c:  New files.
+	* Makefile.in (IO_OBJECTS):  Added new objects.
+	* iostdio.h:  Add feof. fscanf, puts, sprintf, vsprintf.
+	* libio.h:  Add _IO_vprintf macro.
+	* iofopen.c:  Invoke _IO_un_link if failure.
+	* iovsprintf.c:  Write terminating NUL.
+
+	* libioP.h:  Add COERCE_FILE macro (by default does nothing).
+	* iofclose.c, iofflush.c, iofgets.c, iofprintf.c, iofputs.c,
+	iofread.c, ioftell.c, iofwrite.c, iosetbuf.c, iosetvbuf.c:
+	Invoke COERCE_FILE macro.
+	* ioftell.c:  Use _IO_seekoff.
+
+Wed Aug 18 22:49:56 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* sbform.cc (streambuf::form), sbscan.cc (streambuf::scan):
+	Remove cast to _IO_va_list.  (Loses if array type.)
+
+	* libio.h:  Handle _IO_va_list for systems that need .
+	* floatconv.h:  Fix typo (reported by H.J.Lu).
+
+Wed Aug 18 19:34:04 1993  david d `zoo' zuhn  (zoo@rtl.cygnus.com)
+
+	* configure.in (INSTALLDIR): handle native vs. cross case
+
+	* Makefile.in (install): don't use $TARGETLIB, set INSTALLDIR to
+	$(libdir)
+
+Wed Aug 18 12:10:03 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in:  Rename iostream-files to iostream.list.
+	* configure.in:  Add iostream.list to MOSTLYCLEAN.
+
+Tue Aug 17 18:56:59 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	* Makefile.in:  Depend on _G_config.h where appropriate.
+	* config.shared (CXXINCLUDES):  If doing libg++, search ../libio.
+
+Tue Aug 17 17:34:24 1993  Per Bothner  (bothner@kalessin.cygnus.com)
+
+	New directory.  Based on old libg++/iostream code,
+	but extensively re-written.
diff --git a/contrib/libstdc++/libio/Makefile.am b/contrib/libstdc++/libio/Makefile.am
new file mode 100644
index 0000000..dbba6ff
--- /dev/null
+++ b/contrib/libstdc++/libio/Makefile.am
@@ -0,0 +1,67 @@
+## Makefile for the libio subdirectory of the GNU C++ Standard library.
+##
+## Copyright (C) 1999, 2000, 2001 Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## 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.
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+if GLIBCPP_BUILD_LIBIO
+noinst_LTLIBRARIES = libio.la
+else
+noinst_LTLIBRARIES =
+endif
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+
+INCLUDES = \
+	-nostdinc++ \
+	$(GLIBCPP_INCLUDES) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)	
+
+libio_headers = \
+        libio.h libioP.h iolibio.h
+
+if GLIBCPP_NEED_LIBIO
+LIBIO_SRCS = \
+	filedoalloc.c genops.c fileops.c stdfiles.c c_codecvt.c \
+	iofclose.c iofopen.c 
+else
+LIBIO_SRCS =
+endif
+
+if GLIBCPP_NEED_WLIBIO
+LIBIO_WSRCS = \
+	wfiledoalloc.c wfileops.c wgenops.c iofwide.c
+else
+LIBIO_WSRCS =
+endif
+
+
+EXTRA_DIST = iostreamP.h
+
+libio_la_SOURCES = $(LIBIO_SRCS) $(LIBIO_WSRCS)
+
+
+AM_CFLAGS = -D_GNU_SOURCE @DEBUG_FLAGS@ 
diff --git a/contrib/libstdc++/libio/Makefile.in b/contrib/libstdc++/libio/Makefile.in
new file mode 100644
index 0000000..085c1af
--- /dev/null
+++ b/contrib/libstdc++/libio/Makefile.in
@@ -0,0 +1,426 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+AS = @AS@
+ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+AWK = @AWK@
+BASIC_FILE_H = @BASIC_FILE_H@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCODECVT_C = @CCODECVT_C@
+CCODECVT_H = @CCODECVT_H@
+CLOCALE_H = @CLOCALE_H@
+CMESSAGES_H = @CMESSAGES_H@
+CPP = @CPP@
+CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
+CSHADOW_FLAGS = @CSHADOW_FLAGS@
+CSTDIO_H = @CSTDIO_H@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DATADIRNAME = @DATADIRNAME@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DLLTOOL = @DLLTOOL@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIBICONV = @LIBICONV@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+STRIP = @STRIP@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+check_msgfmt = @check_msgfmt@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+glibcpp_CXX = @glibcpp_CXX@
+glibcpp_MOFILES = @glibcpp_MOFILES@
+glibcpp_POFILES = @glibcpp_POFILES@
+glibcpp_basedir = @glibcpp_basedir@
+glibcpp_builddir = @glibcpp_builddir@
+glibcpp_localedir = @glibcpp_localedir@
+glibcpp_prefixdir = @glibcpp_prefixdir@
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_thread_h = @glibcpp_thread_h@
+glibcpp_toolexecdir = @glibcpp_toolexecdir@
+glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+ifGNUmake = @ifGNUmake@
+libio_la = @libio_la@
+libtool_VERSION = @libtool_VERSION@
+release_VERSION = @release_VERSION@
+toplevel_srcdir = @toplevel_srcdir@
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+@GLIBCPP_BUILD_LIBIO_TRUE@noinst_LTLIBRARIES = @GLIBCPP_BUILD_LIBIO_TRUE@libio.la
+@GLIBCPP_BUILD_LIBIO_FALSE@noinst_LTLIBRARIES = 
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+
+INCLUDES = \
+	-nostdinc++ \
+	$(GLIBCPP_INCLUDES) $(LIBIO_INCLUDES) $(TOPLEVEL_INCLUDES)	
+
+
+libio_headers = \
+        libio.h libioP.h iolibio.h
+
+@GLIBCPP_NEED_LIBIO_TRUE@LIBIO_SRCS = @GLIBCPP_NEED_LIBIO_TRUE@\
+@GLIBCPP_NEED_LIBIO_TRUE@	filedoalloc.c genops.c fileops.c stdfiles.c c_codecvt.c \
+@GLIBCPP_NEED_LIBIO_TRUE@	iofclose.c iofopen.c 
+@GLIBCPP_NEED_LIBIO_FALSE@LIBIO_SRCS = 
+@GLIBCPP_NEED_WLIBIO_TRUE@LIBIO_WSRCS = @GLIBCPP_NEED_WLIBIO_TRUE@\
+@GLIBCPP_NEED_WLIBIO_TRUE@	wfiledoalloc.c wfileops.c wgenops.c iofwide.c
+@GLIBCPP_NEED_WLIBIO_FALSE@LIBIO_WSRCS = 
+
+EXTRA_DIST = iostreamP.h
+
+libio_la_SOURCES = $(LIBIO_SRCS) $(LIBIO_WSRCS)
+
+AM_CFLAGS = -D_GNU_SOURCE @DEBUG_FLAGS@ 
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LTLIBRARIES =  $(noinst_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libio_la_LDFLAGS = 
+libio_la_LIBADD = 
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS =  \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo fileops.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@c_codecvt.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofclose.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofopen.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wfiledoalloc.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wfileops.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@wgenops.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_TRUE@iofwide.lo
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS =  \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wfiledoalloc.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wfileops.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@wgenops.lo \
+@GLIBCPP_NEED_WLIBIO_TRUE@@GLIBCPP_NEED_LIBIO_FALSE@iofwide.lo
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@libio_la_OBJECTS =  \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@filedoalloc.lo \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@genops.lo \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@fileops.lo \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@stdfiles.lo \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@c_codecvt.lo \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@iofclose.lo \
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_TRUE@iofopen.lo
+@GLIBCPP_NEED_WLIBIO_FALSE@@GLIBCPP_NEED_LIBIO_FALSE@libio_la_OBJECTS = 
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+DIST_COMMON =  ChangeLog Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libio_la_SOURCES)
+OBJECTS = $(libio_la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus libio/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLTLIBRARIES:
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+
+distclean-noinstLTLIBRARIES:
+
+maintainer-clean-noinstLTLIBRARIES:
+
+.c.o:
+	$(COMPILE) -c $<
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+	-rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libio.la: $(libio_la_OBJECTS) $(libio_la_DEPENDENCIES)
+	$(LINK)  $(libio_la_LDFLAGS) $(libio_la_OBJECTS) $(libio_la_LIBADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = libio
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am: 
+install-info: install-info-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLTLIBRARIES clean-compile clean-libtool \
+		clean-tags clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLTLIBRARIES distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-noinstLTLIBRARIES \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
+clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/libstdc++/libio/_G_config.h b/contrib/libstdc++/libio/_G_config.h
new file mode 100644
index 0000000..d6738c2
--- /dev/null
+++ b/contrib/libstdc++/libio/_G_config.h
@@ -0,0 +1,136 @@
+/* This file is needed by libio to define various configuration parameters.
+   These are always the same in the GNU C library.  */
+
+#ifndef _G_config_h
+#define _G_config_h 1
+
+#ifndef _LIBC
+# include 
+# ifdef _GLIBCPP_USE_THREADS
+#   define _IO_MTSAFE_IO
+# endif
+#endif
+
+/* Define types for libio in terms of the standard internal type names.  */
+
+#include 
+#define __need_size_t
+#define __need_wchar_t
+#define __need_wint_t
+#define __need_NULL
+#define __need_ptrdiff_t
+#ifdef __cplusplus
+# include 
+#else
+# include 
+#endif
+
+
+#ifndef _WINT_T
+/* Integral type unchanged by default argument promotions that can
+   hold any value corresponding to members of the extended character
+   set, as well as at least one value that does not correspond to any
+   member of the extended character set.  */
+# define _WINT_T
+typedef unsigned int wint_t;
+#endif
+
+/* For use as part of glibc (native) or as part of libstdc++ (maybe
+   not glibc) */
+#ifndef __c_mbstate_t_defined
+# define __c_mbstate_t_defined	1
+/*# ifdef _GLIBCPP_USE_WCHAR_T*/
+typedef struct
+{
+  int count;
+  wint_t value;
+}__c_mbstate_t;
+/*# endif*/
+#endif
+#undef __need_mbstate_t
+
+typedef size_t _G_size_t;
+
+
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+typedef struct
+{
+  __off_t __pos;
+  __c_mbstate_t __state;
+} _G_fpos_t;
+
+typedef struct
+{
+  __off64_t __pos;
+  __c_mbstate_t __state;
+} _G_fpos64_t;
+#else
+typedef __off_t _G_fpos_t;
+typedef __off64_t _G_fpos64_t;
+#endif
+#define _G_ssize_t	__ssize_t
+#define _G_off_t	__off_t
+#define _G_off64_t	__off64_t
+#define	_G_pid_t	__pid_t
+#define	_G_uid_t	__uid_t
+#define _G_wchar_t	wchar_t
+#define _G_wint_t	wint_t
+#define _G_stat64	stat64
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+# include 
+typedef iconv_t _G_iconv_t;
+#endif
+
+typedef int _G_int16_t __attribute__ ((__mode__ (__HI__)));
+typedef int _G_int32_t __attribute__ ((__mode__ (__SI__)));
+typedef unsigned int _G_uint16_t __attribute__ ((__mode__ (__HI__)));
+typedef unsigned int _G_uint32_t __attribute__ ((__mode__ (__SI__)));
+
+#define _G_HAVE_BOOL 1
+
+
+/* These library features are always available in the GNU C library.  */
+#define _G_HAVE_ATEXIT 1
+#define _G_HAVE_SYS_CDEFS 1
+#define _G_HAVE_SYS_WAIT 1
+#define _G_NEED_STDARG_H 1
+#define _G_va_list __gnuc_va_list
+
+#define _G_HAVE_PRINTF_FP 1
+#define _G_HAVE_MMAP 1
+#define _G_HAVE_LONG_DOUBLE_IO 1
+#define _G_HAVE_IO_FILE_OPEN 1
+#define _G_HAVE_IO_GETLINE_INFO 1
+
+#define _G_IO_IO_FILE_VERSION 0x20001
+
+//#define _G_OPEN64	__open64
+//#define _G_LSEEK64	__lseek64
+//#define _G_FSTAT64(fd,buf) __fxstat64 (_STAT_VER, fd, buf)
+
+/* This is defined by  if `st_blksize' exists.  */
+/*#define _G_HAVE_ST_BLKSIZE defined (_STATBUF_ST_BLKSIZE)*/
+
+#define _G_BUFSIZ 8192
+
+/* These are the vtbl details for ELF.  */
+#define _G_NAMES_HAVE_UNDERSCORE 0
+#define _G_VTABLE_LABEL_HAS_LENGTH 1
+#ifndef _G_USING_THUNKS
+# define _G_USING_THUNKS	1
+#endif /* _G_USING_THUNKS */
+#define _G_VTABLE_LABEL_PREFIX "__vt_"
+#define _G_VTABLE_LABEL_PREFIX_ID __vt_
+
+#define _G_INTERNAL_CCS	"UCS4"
+#define _G_HAVE_WEAK_SYMBOL 1
+#define _G_STDIO_USES_LIBIO 1
+
+#if defined __cplusplus || defined __STDC__
+# define _G_ARGS(ARGLIST) ARGLIST
+#else
+# define _G_ARGS(ARGLIST) ()
+#endif
+
+#endif	/* _G_config.h */
+
diff --git a/contrib/libstdc++/libio/filedoalloc.c b/contrib/libstdc++/libio/filedoalloc.c
new file mode 100644
index 0000000..12c1135
--- /dev/null
+++ b/contrib/libstdc++/libio/filedoalloc.c
@@ -0,0 +1,101 @@
+/* Copyright (C) 1993, 1997 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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.  */
+
+/*
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* Modified for GNU iostream by Per Bothner 1991, 1992. */
+
+#ifndef _POSIX_SOURCE
+# define _POSIX_SOURCE
+#endif
+#include "libioP.h"
+#include 
+#include 
+#ifdef __STDC__
+#include 
+#include 
+#endif
+
+#ifdef _LIBC
+# undef isatty
+# define isatty(Fd) __isatty (Fd)
+#endif
+
+/*
+ * Allocate a file buffer, or switch to unbuffered I/O.
+ * Per the ANSI C standard, ALL tty devices default to line buffered.
+ *
+ * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
+ * optimisation) right after the _fstat() that finds the buffer size.
+ */
+
+int
+_IO_file_doallocate (fp)
+     _IO_FILE *fp;
+{
+  _IO_size_t size;
+  int couldbetty;
+  char *p;
+  struct _G_stat64 st;
+
+  if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
+    {
+      couldbetty = 0;
+      size = _IO_BUFSIZ;
+#if 0
+      /* do not try to optimise fseek() */
+      fp->_flags |= __SNPT;
+#endif
+    }
+  else
+    {
+      couldbetty = S_ISCHR (st.st_mode);
+#if _IO_HAVE_ST_BLKSIZE
+      size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
+#else
+      size = _IO_BUFSIZ;
+#endif
+    }
+  ALLOC_BUF (p, size, EOF);
+  _IO_setb (fp, p, p + size, 1);
+  if (couldbetty && isatty (fp->_fileno))
+    fp->_flags |= _IO_LINE_BUF;
+  return 1;
+}
diff --git a/contrib/libstdc++/libio/fileops.c b/contrib/libstdc++/libio/fileops.c
new file mode 100644
index 0000000..a830b5c
--- /dev/null
+++ b/contrib/libstdc++/libio/fileops.c
@@ -0,0 +1,1049 @@
+/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO Library.
+   Written by Per Bothner .
+
+   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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 _POSIX_SOURCE
+# define _POSIX_SOURCE
+#endif
+#include "libioP.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#ifdef __STDC__
+#include 
+#endif
+#if _LIBC
+# include "../wcsmbs/wcsmbsload.h"
+# include 
+#endif
+#ifndef errno
+extern int errno;
+#endif
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+
+
+#ifdef _LIBC
+# define open(Name, Flags, Prot) __open (Name, Flags, Prot)
+# define close(FD) __close (FD)
+# define lseek(FD, Offset, Whence) __lseek (FD, Offset, Whence)
+# define read(FD, Buf, NBytes) __read (FD, Buf, NBytes)
+# define write(FD, Buf, NBytes) __write (FD, Buf, NBytes)
+#else
+# define _IO_new_do_write _IO_do_write
+# define _IO_new_file_attach _IO_file_attach
+# define _IO_new_file_close_it _IO_file_close_it
+# define _IO_new_file_finish _IO_file_finish
+# define _IO_new_file_fopen _IO_file_fopen
+# define _IO_new_file_init _IO_file_init
+# define _IO_new_file_setbuf _IO_file_setbuf
+# define _IO_new_file_sync _IO_file_sync
+# define _IO_new_file_overflow _IO_file_overflow
+# define _IO_new_file_seekoff _IO_file_seekoff
+# define _IO_new_file_underflow _IO_file_underflow
+# define _IO_new_file_write _IO_file_write
+# define _IO_new_file_xsputn _IO_file_xsputn
+#endif
+
+/* An fstream can be in at most one of put mode, get mode, or putback mode.
+   Putback mode is a variant of get mode.
+
+   In a filebuf, there is only one current position, instead of two
+   separate get and put pointers.  In get mode, the current position
+   is that of gptr(); in put mode that of pptr().
+
+   The position in the buffer that corresponds to the position
+   in external file system is normally _IO_read_end, except in putback
+   mode, when it is _IO_save_end.
+   If the field _fb._offset is >= 0, it gives the offset in
+   the file as a whole corresponding to eGptr(). (?)
+
+   PUT MODE:
+   If a filebuf is in put mode, then all of _IO_read_ptr, _IO_read_end,
+   and _IO_read_base are equal to each other.  These are usually equal
+   to _IO_buf_base, though not necessarily if we have switched from
+   get mode to put mode.  (The reason is to maintain the invariant
+   that _IO_read_end corresponds to the external file position.)
+   _IO_write_base is non-NULL and usually equal to _IO_base_base.
+   We also have _IO_write_end == _IO_buf_end, but only in fully buffered mode.
+   The un-flushed character are those between _IO_write_base and _IO_write_ptr.
+
+   GET MODE:
+   If a filebuf is in get or putback mode, eback() != egptr().
+   In get mode, the unread characters are between gptr() and egptr().
+   The OS file position corresponds to that of egptr().
+
+   PUTBACK MODE:
+   Putback mode is used to remember "excess" characters that have
+   been sputbackc'd in a separate putback buffer.
+   In putback mode, the get buffer points to the special putback buffer.
+   The unread characters are the characters between gptr() and egptr()
+   in the putback buffer, as well as the area between save_gptr()
+   and save_egptr(), which point into the original reserve buffer.
+   (The pointers save_gptr() and save_egptr() are the values
+   of gptr() and egptr() at the time putback mode was entered.)
+   The OS position corresponds to that of save_egptr().
+
+   LINE BUFFERED OUTPUT:
+   During line buffered output, _IO_write_base==base() && epptr()==base().
+   However, ptr() may be anywhere between base() and ebuf().
+   This forces a call to filebuf::overflow(int C) on every put.
+   If there is more space in the buffer, and C is not a '\n',
+   then C is inserted, and pptr() incremented.
+
+   UNBUFFERED STREAMS:
+   If a filebuf is unbuffered(), the _shortbuf[1] is used as the buffer.
+*/
+
+#define CLOSED_FILEBUF_FLAGS \
+  (_IO_IS_FILEBUF+_IO_NO_READS+_IO_NO_WRITES+_IO_TIED_PUT_GET)
+
+
+void
+_IO_new_file_init (fp)
+     struct _IO_FILE_plus *fp;
+{
+  /* POSIX.1 allows another file handle to be used to change the position
+     of our file descriptor.  Hence we actually don't know the actual
+     position before we do the first fseek (and until a following fflush). */
+  fp->file._offset = _IO_pos_BAD;
+  fp->file._IO_file_flags |= CLOSED_FILEBUF_FLAGS;
+
+  _IO_link_in (fp);
+  fp->file._fileno = -1;
+}
+
+int
+_IO_new_file_close_it (fp)
+     _IO_FILE *fp;
+{
+  int write_status, close_status;
+  if (!_IO_file_is_open (fp))
+    return EOF;
+
+  write_status = _IO_do_flush (fp);
+
+  _IO_unsave_markers(fp);
+
+  close_status = _IO_SYSCLOSE (fp);
+
+  /* Free buffer. */
+  if (fp->_mode <= 0)
+    {
+      _IO_setb (fp, NULL, NULL, 0);
+      _IO_setg (fp, NULL, NULL, NULL);
+      _IO_setp (fp, NULL, NULL);
+    }
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  else
+    {
+      _IO_wsetb (fp, NULL, NULL, 0);
+      _IO_wsetg (fp, NULL, NULL, NULL);
+      _IO_wsetp (fp, NULL, NULL);
+    }
+#endif
+
+  _IO_un_link ((struct _IO_FILE_plus *) fp);
+  fp->_flags = _IO_MAGIC|CLOSED_FILEBUF_FLAGS;
+  fp->_fileno = -1;
+  fp->_offset = _IO_pos_BAD;
+
+  return close_status ? close_status : write_status;
+}
+
+void
+_IO_new_file_finish (fp, dummy)
+     _IO_FILE *fp;
+     int dummy;
+{
+  if (_IO_file_is_open (fp))
+    {
+      _IO_do_flush (fp);
+      if (!(fp->_flags & _IO_DELETE_DONT_CLOSE))
+	_IO_SYSCLOSE (fp);
+    }
+  _IO_default_finish (fp, 0);
+}
+
+#if defined __GNUC__ && __GNUC__ >= 2
+__inline__
+#endif
+_IO_FILE *
+_IO_file_open (fp, filename, posix_mode, prot, read_write, is32not64)
+     _IO_FILE *fp;
+     const char *filename;
+     int posix_mode;
+     int prot;
+     int read_write;
+     int is32not64;
+{
+  int fdesc;
+#ifdef _G_OPEN64
+  fdesc = (is32not64
+	   ? open (filename, posix_mode, prot)
+	   : _G_OPEN64 (filename, posix_mode, prot));
+#else
+  fdesc = open (filename, posix_mode, prot);
+#endif
+  if (fdesc < 0)
+    return NULL;
+  fp->_fileno = fdesc;
+  _IO_mask_flags (fp, read_write,_IO_NO_READS+_IO_NO_WRITES+_IO_IS_APPENDING);
+  if (read_write & _IO_IS_APPENDING)
+    if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_end, _IOS_INPUT|_IOS_OUTPUT)
+	== _IO_pos_BAD && errno != ESPIPE)
+      return NULL;
+  _IO_link_in ((struct _IO_FILE_plus *) fp);
+  return fp;
+}
+
+_IO_FILE *
+_IO_new_file_fopen (fp, filename, mode, is32not64)
+     _IO_FILE *fp;
+     const char *filename;
+     const char *mode;
+     int is32not64;
+{
+  int oflags = 0, omode;
+  int read_write;
+  int oprot = 0666;
+  int i;
+  _IO_FILE *result;
+#if _LIBC
+  const char *cs;
+#endif
+
+  if (_IO_file_is_open (fp))
+    return 0;
+  switch (*mode)
+    {
+    case 'r':
+      omode = O_RDONLY;
+      read_write = _IO_NO_WRITES;
+      break;
+    case 'w':
+      omode = O_WRONLY;
+      oflags = O_CREAT|O_TRUNC;
+      read_write = _IO_NO_READS;
+      break;
+    case 'a':
+      omode = O_WRONLY;
+      oflags = O_CREAT|O_APPEND;
+      read_write = _IO_NO_READS|_IO_IS_APPENDING;
+      break;
+    default:
+      __set_errno (EINVAL);
+      return NULL;
+    }
+  for (i = 1; i < 4; ++i)
+    {
+      switch (*++mode)
+	{
+	case '\0':
+	  break;
+	case '+':
+	  omode = O_RDWR;
+	  read_write &= _IO_IS_APPENDING;
+	  continue;
+	case 'x':
+	  oflags |= O_EXCL;
+	  continue;
+	case 'b':
+	default:
+	  /* Ignore.  */
+	  continue;
+	}
+      break;
+    }
+
+  result = _IO_file_open (fp, filename, omode|oflags, oprot, read_write,
+			  is32not64);
+
+
+#if _LIBC
+  /* Test whether the mode string specifies the conversion.  */
+  cs = strstr (mode, ",ccs=");
+  if (cs != NULL)
+    {
+      /* Yep.  Load the appropriate conversions and set the orientation
+	 to wide.  */
+	struct gconv_fcts fcts;
+	struct _IO_codecvt *cc;
+
+	if (! _IO_CHECK_WIDE (fp) || __wcsmbs_named_conv (&fcts, cs + 5) != 0)
+	  {
+	    /* Something went wrong, we cannot load the conversion modules.
+	       This means we cannot proceed since the user explicitly asked
+	       for these.  */
+	    _IO_new_fclose (result);
+	    return NULL;
+	  }
+
+	cc = fp->_codecvt = &fp->_wide_data->_codecvt;
+
+	/* The functions are always the same.  */
+	*cc = __libio_codecvt;
+
+	cc->__cd_in.__cd.__nsteps = 1; /* Only one step allowed.  */
+	cc->__cd_in.__cd.__steps = fcts.towc;
+
+	cc->__cd_in.__cd.__data[0].__invocation_counter = 0;
+	cc->__cd_in.__cd.__data[0].__internal_use = 1;
+	cc->__cd_in.__cd.__data[0].__flags = __GCONV_IS_LAST;
+	cc->__cd_in.__cd.__data[0].__statep = &result->_wide_data->_IO_state;
+
+	cc->__cd_out.__cd.__nsteps = 1; /* Only one step allowed.  */
+	cc->__cd_out.__cd.__steps = fcts.tomb;
+
+	cc->__cd_out.__cd.__data[0].__invocation_counter = 0;
+	cc->__cd_out.__cd.__data[0].__internal_use = 1;
+	cc->__cd_out.__cd.__data[0].__flags = __GCONV_IS_LAST;
+	cc->__cd_out.__cd.__data[0].__statep = &result->_wide_data->_IO_state;
+
+	/* Set the mode now.  */
+	result->_mode = 1;
+    }
+#endif	/* GNU libc */
+
+  return result;
+}
+
+_IO_FILE *
+_IO_new_file_attach (fp, fd)
+     _IO_FILE *fp;
+     int fd;
+{
+  if (_IO_file_is_open (fp))
+    return NULL;
+  fp->_fileno = fd;
+  fp->_flags &= ~(_IO_NO_READS+_IO_NO_WRITES);
+  fp->_flags |= _IO_DELETE_DONT_CLOSE;
+  /* Get the current position of the file. */
+  /* We have to do that since that may be junk. */
+  fp->_offset = _IO_pos_BAD;
+  if (_IO_SEEKOFF (fp, (_IO_off64_t)0, _IO_seek_cur, _IOS_INPUT|_IOS_OUTPUT)
+      == _IO_pos_BAD && errno != ESPIPE)
+    return NULL;
+  return fp;
+}
+
+_IO_FILE *
+_IO_new_file_setbuf (fp, p, len)
+     _IO_FILE *fp;
+     char *p;
+     _IO_ssize_t len;
+{
+  if (_IO_default_setbuf (fp, p, len) == NULL)
+    return NULL;
+
+  fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
+    = fp->_IO_buf_base;
+  _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+
+  return fp;
+}
+
+static int new_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
+
+/* Write TO_DO bytes from DATA to FP.
+   Then mark FP as having empty buffers. */
+
+int
+_IO_new_do_write (fp, data, to_do)
+     _IO_FILE *fp;
+     const char *data;
+     _IO_size_t to_do;
+{
+  return (to_do == 0 || new_do_write (fp, data, to_do) == to_do) ? 0 : EOF;
+}
+
+static
+int
+new_do_write (fp, data, to_do)
+     _IO_FILE *fp;
+     const char *data;
+     _IO_size_t to_do;
+{
+  _IO_size_t count;
+  if (fp->_flags & _IO_IS_APPENDING)
+    /* On a system without a proper O_APPEND implementation,
+       you would need to sys_seek(0, SEEK_END) here, but is
+       is not needed nor desirable for Unix- or Posix-like systems.
+       Instead, just indicate that offset (before and after) is
+       unpredictable. */
+    fp->_offset = _IO_pos_BAD;
+  else if (fp->_IO_read_end != fp->_IO_write_base)
+    {
+      _IO_off64_t new_pos
+	= _IO_SYSSEEK (fp, fp->_IO_write_base - fp->_IO_read_end, 1);
+      if (new_pos == _IO_pos_BAD)
+	return 0;
+      fp->_offset = new_pos;
+    }
+  count = _IO_SYSWRITE (fp, data, to_do);
+  if (fp->_cur_column && count)
+    fp->_cur_column = _IO_adjust_column (fp->_cur_column - 1, data, count) + 1;
+  _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+  fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_buf_base;
+  fp->_IO_write_end = (fp->_mode < 0
+		       && (fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+		       ? fp->_IO_buf_base : fp->_IO_buf_end);
+  return count;
+}
+
+int
+_IO_new_file_underflow (fp)
+     _IO_FILE *fp;
+{
+  _IO_ssize_t count;
+#if 0
+  /* SysV does not make this test; take it out for compatibility */
+  if (fp->_flags & _IO_EOF_SEEN)
+    return (EOF);
+#endif
+
+  if (fp->_flags & _IO_NO_READS)
+    {
+      fp->_flags |= _IO_ERR_SEEN;
+      __set_errno (EBADF);
+      return EOF;
+    }
+  if (fp->_IO_read_ptr < fp->_IO_read_end)
+    return *(unsigned char *) fp->_IO_read_ptr;
+
+  if (fp->_IO_buf_base == NULL)
+    {
+      /* Maybe we already have a push back pointer.  */
+      if (fp->_IO_save_base != NULL)
+	{
+	  free (fp->_IO_save_base);
+	  fp->_flags &= ~_IO_IN_BACKUP;
+	}
+      _IO_doallocbuf (fp);
+    }
+
+  /* Flush all line buffered files before reading. */
+  /* FIXME This can/should be moved to genops ?? */
+  if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
+    _IO_flush_all_linebuffered ();
+
+  _IO_switch_to_get_mode (fp);
+
+  /* This is very tricky. We have to adjust those
+     pointers before we call _IO_SYSREAD () since
+     we may longjump () out while waiting for
+     input. Those pointers may be screwed up. H.J. */
+  fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
+  fp->_IO_read_end = fp->_IO_buf_base;
+  fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end
+    = fp->_IO_buf_base;
+
+  count = _IO_SYSREAD (fp, fp->_IO_buf_base,
+		       fp->_IO_buf_end - fp->_IO_buf_base);
+  if (count <= 0)
+    {
+      if (count == 0)
+	fp->_flags |= _IO_EOF_SEEN;
+      else
+	fp->_flags |= _IO_ERR_SEEN, count = 0;
+  }
+  fp->_IO_read_end += count;
+  if (count == 0)
+    return EOF;
+  if (fp->_offset != _IO_pos_BAD)
+    _IO_pos_adjust (fp->_offset, count);
+  return *(unsigned char *) fp->_IO_read_ptr;
+}
+
+int
+_IO_new_file_overflow (f, ch)
+      _IO_FILE *f;
+      int ch;
+{
+  if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
+    {
+      f->_flags |= _IO_ERR_SEEN;
+      __set_errno (EBADF);
+      return EOF;
+    }
+  /* If currently reading or no buffer allocated. */
+  if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0 || f->_IO_write_base == 0)
+    {
+      /* Allocate a buffer if needed. */
+      if (f->_IO_write_base == 0)
+	{
+	  _IO_doallocbuf (f);
+	  _IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base);
+	}
+      /* Otherwise must be currently reading.
+	 If _IO_read_ptr (and hence also _IO_read_end) is at the buffer end,
+	 logically slide the buffer forwards one block (by setting the
+	 read pointers to all point at the beginning of the block).  This
+	 makes room for subsequent output.
+	 Otherwise, set the read pointers to _IO_read_end (leaving that
+	 alone, so it can continue to correspond to the external position). */
+      if (f->_IO_read_ptr == f->_IO_buf_end)
+	f->_IO_read_end = f->_IO_read_ptr = f->_IO_buf_base;
+      f->_IO_write_ptr = f->_IO_read_ptr;
+      f->_IO_write_base = f->_IO_write_ptr;
+      f->_IO_write_end = f->_IO_buf_end;
+      f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end;
+
+      f->_flags |= _IO_CURRENTLY_PUTTING;
+      if (f->_mode < 0 && f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+	f->_IO_write_end = f->_IO_write_ptr;
+    }
+  if (ch == EOF)
+    return _IO_new_do_write(f, f->_IO_write_base,
+			    f->_IO_write_ptr - f->_IO_write_base);
+  if (f->_IO_write_ptr == f->_IO_buf_end ) /* Buffer is really full */
+    if (_IO_do_flush (f) == EOF)
+      return EOF;
+  *f->_IO_write_ptr++ = ch;
+  if ((f->_flags & _IO_UNBUFFERED)
+      || ((f->_flags & _IO_LINE_BUF) && ch == '\n'))
+    if (_IO_new_do_write(f, f->_IO_write_base,
+			 f->_IO_write_ptr - f->_IO_write_base) == EOF)
+      return EOF;
+  return (unsigned char) ch;
+}
+
+int
+_IO_new_file_sync (fp)
+     _IO_FILE *fp;
+{
+  _IO_ssize_t delta;
+  int retval = 0;
+
+  /*    char* ptr = cur_ptr(); */
+  if (fp->_IO_write_ptr > fp->_IO_write_base)
+    if (_IO_do_flush(fp)) return EOF;
+  delta = fp->_IO_read_ptr - fp->_IO_read_end;
+  if (delta != 0)
+    {
+#ifdef TODO
+      if (_IO_in_backup (fp))
+	delta -= eGptr () - Gbase ();
+#endif
+      _IO_off64_t new_pos = _IO_SYSSEEK (fp, delta, 1);
+      if (new_pos != (_IO_off64_t) EOF)
+	fp->_IO_read_end = fp->_IO_read_ptr;
+#ifdef ESPIPE
+      else if (errno == ESPIPE)
+	; /* Ignore error from unseekable devices. */
+#endif
+      else
+	retval = EOF;
+    }
+  if (retval != EOF)
+    fp->_offset = _IO_pos_BAD;
+  /* FIXME: Cleanup - can this be shared? */
+  /*    setg(base(), ptr, ptr); */
+  return retval;
+}
+
+_IO_off64_t
+_IO_new_file_seekoff (fp, offset, dir, mode)
+     _IO_FILE *fp;
+     _IO_off64_t offset;
+     int dir;
+     int mode;
+{
+  _IO_off64_t result;
+  _IO_off64_t delta, new_offset;
+  long count;
+  /* POSIX.1 8.2.3.7 says that after a call the fflush() the file
+     offset of the underlying file must be exact.  */
+  int must_be_exact = (fp->_IO_read_base == fp->_IO_read_end
+		       && fp->_IO_write_base == fp->_IO_write_ptr);
+
+  if (mode == 0)
+    dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
+
+  /* Flush unwritten characters.
+     (This may do an unneeded write if we seek within the buffer.
+     But to be able to switch to reading, we would need to set
+     egptr to ptr.  That can't be done in the current design,
+     which assumes file_ptr() is eGptr.  Anyway, since we probably
+     end up flushing when we close(), it doesn't make much difference.)
+     FIXME: simulate mem-papped files. */
+
+  if (fp->_IO_write_ptr > fp->_IO_write_base || _IO_in_put_mode (fp))
+    if (_IO_switch_to_get_mode (fp))
+      return EOF;
+
+  if (fp->_IO_buf_base == NULL)
+    {
+      /* It could be that we already have a pushback buffer.  */
+      if (fp->_IO_read_base != NULL)
+	{
+	  free (fp->_IO_read_base);
+	  fp->_flags &= ~_IO_IN_BACKUP;
+	}
+      _IO_doallocbuf (fp);
+      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+      _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+    }
+
+  switch (dir)
+    {
+    case _IO_seek_cur:
+      /* Adjust for read-ahead (bytes is buffer). */
+      offset -= fp->_IO_read_end - fp->_IO_read_ptr;
+      if (fp->_offset == _IO_pos_BAD)
+	goto dumb;
+      /* Make offset absolute, assuming current pointer is file_ptr(). */
+      offset += fp->_offset;
+
+      dir = _IO_seek_set;
+      break;
+    case _IO_seek_set:
+      break;
+    case _IO_seek_end:
+      {
+	struct _G_stat64 st;
+	if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode))
+	  {
+	    offset += st.st_size;
+	    dir = _IO_seek_set;
+	  }
+	else
+	  goto dumb;
+      }
+    }
+  /* At this point, dir==_IO_seek_set. */
+
+  /* If we are only interested in the current position we've found it now.  */
+  if (mode == 0)
+    return offset;
+
+  /* If destination is within current buffer, optimize: */
+  if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
+      && !_IO_in_backup (fp))
+    {
+      /* Offset relative to start of main get area. */
+      _IO_off64_t rel_offset = (offset - fp->_offset
+				+ (fp->_IO_read_end - fp->_IO_read_base));
+      if (rel_offset >= 0)
+	{
+#if 0
+	  if (_IO_in_backup (fp))
+	    _IO_switch_to_main_get_area (fp);
+#endif
+	  if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base)
+	    {
+	      _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + rel_offset,
+			fp->_IO_read_end);
+	      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+	      {
+		_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+		goto resync;
+	      }
+	    }
+#ifdef TODO
+	    /* If we have streammarkers, seek forward by reading ahead. */
+	    if (_IO_have_markers (fp))
+	      {
+		int to_skip = rel_offset
+		  - (fp->_IO_read_ptr - fp->_IO_read_base);
+		if (ignore (to_skip) != to_skip)
+		  goto dumb;
+		_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+		goto resync;
+	      }
+#endif
+	}
+#ifdef TODO
+      if (rel_offset < 0 && rel_offset >= Bbase () - Bptr ())
+	{
+	  if (!_IO_in_backup (fp))
+	    _IO_switch_to_backup_area (fp);
+	  gbump (fp->_IO_read_end + rel_offset - fp->_IO_read_ptr);
+	  _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+	  goto resync;
+	}
+#endif
+    }
+
+#ifdef TODO
+  _IO_unsave_markers (fp);
+#endif
+
+  if (fp->_flags & _IO_NO_READS)
+    goto dumb;
+
+  /* Try to seek to a block boundary, to improve kernel page management. */
+  new_offset = offset & ~(fp->_IO_buf_end - fp->_IO_buf_base - 1);
+  delta = offset - new_offset;
+  if (delta > fp->_IO_buf_end - fp->_IO_buf_base)
+    {
+      new_offset = offset;
+      delta = 0;
+    }
+  result = _IO_SYSSEEK (fp, new_offset, 0);
+  if (result < 0)
+    return EOF;
+  if (delta == 0)
+    count = 0;
+  else
+    {
+      count = _IO_SYSREAD (fp, fp->_IO_buf_base,
+			   (must_be_exact
+			    ? delta : fp->_IO_buf_end - fp->_IO_buf_base));
+      if (count < delta)
+	{
+	  /* We weren't allowed to read, but try to seek the remainder. */
+	  offset = count == EOF ? delta : delta-count;
+	  dir = _IO_seek_cur;
+	  goto dumb;
+	}
+    }
+  _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + delta,
+	    fp->_IO_buf_base + count);
+  _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+  fp->_offset = result + count;
+  _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+  return offset;
+ dumb:
+
+  _IO_unsave_markers (fp);
+  result = _IO_SYSSEEK (fp, offset, dir);
+  if (result != EOF)
+    {
+      _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+      fp->_offset = result;
+      _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+    }
+  return result;
+
+resync:
+  /* We need to do it since it is possible that the file offset in
+     the kernel may be changed behind our back. It may happen when
+     we fopen a file and then do a fork. One process may access the
+     the file and the kernel file offset will be changed. */
+  if (fp->_offset >= 0)
+    _IO_SYSSEEK (fp, fp->_offset, 0);
+
+  return offset;
+}
+
+_IO_ssize_t
+_IO_file_read (fp, buf, size)
+     _IO_FILE *fp;
+     void *buf;
+     _IO_ssize_t size;
+{
+  return read (fp->_fileno, buf, size);
+}
+
+_IO_off64_t
+_IO_file_seek (fp, offset, dir)
+     _IO_FILE *fp;
+     _IO_off64_t offset;
+     int dir;
+{
+#ifdef _G_LSEEK64
+  return _G_LSEEK64 (fp->_fileno, offset, dir);
+#else
+  return lseek (fp->_fileno, offset, dir);
+#endif
+}
+
+int
+_IO_file_stat (fp, st)
+     _IO_FILE *fp;
+     void *st;
+{
+#ifdef _G_FSTAT64
+  return _G_FSTAT64 (fp->_fileno, (struct _G_stat64 *) st);
+#else
+  return fstat (fp->_fileno, (struct stat *) st);
+#endif
+}
+
+int
+_IO_file_close (fp)
+     _IO_FILE *fp;
+{
+  return close (fp->_fileno);
+}
+
+_IO_ssize_t
+_IO_new_file_write (f, data, n)
+     _IO_FILE *f;
+     const void *data;
+     _IO_ssize_t n;
+{
+  _IO_ssize_t to_do = n;
+  while (to_do > 0)
+    {
+      _IO_ssize_t count = write (f->_fileno, data, to_do);
+      if (count < 0)
+	{
+	  f->_flags |= _IO_ERR_SEEN;
+	  break;
+        }
+      to_do -= count;
+      data = (void *) ((char *) data + count);
+    }
+  n -= to_do;
+  if (f->_offset >= 0)
+    f->_offset += n;
+  return n;
+}
+
+_IO_size_t
+_IO_new_file_xsputn (f, data, n)
+     _IO_FILE *f;
+     const void *data;
+     _IO_size_t n;
+{
+  register const char *s = (const char *) data;
+  _IO_size_t to_do = n;
+  int must_flush = 0;
+  _IO_size_t count;
+
+  if (n <= 0)
+    return 0;
+  /* This is an optimized implementation.
+     If the amount to be written straddles a block boundary
+     (or the filebuf is unbuffered), use sys_write directly. */
+
+  /* First figure out how much space is available in the buffer. */
+  count = f->_IO_write_end - f->_IO_write_ptr; /* Space available. */
+  if ((f->_flags & _IO_LINE_BUF) && (f->_flags & _IO_CURRENTLY_PUTTING))
+    {
+      count = f->_IO_buf_end - f->_IO_write_ptr;
+      if (count >= n)
+	{
+	  register const char *p;
+	  for (p = s + n; p > s; )
+	    {
+	      if (*--p == '\n')
+		{
+		  count = p - s + 1;
+		  must_flush = 1;
+		  break;
+		}
+	    }
+	}
+    }
+  /* Then fill the buffer. */
+  if (count > 0)
+    {
+      if (count > to_do)
+	count = to_do;
+      if (count > 20)
+	{
+#ifdef _LIBC
+	  f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
+#else
+	  memcpy (f->_IO_write_ptr, s, count);
+	  f->_IO_write_ptr += count;
+#endif
+	  s += count;
+	}
+      else
+	{
+	  register char *p = f->_IO_write_ptr;
+	  register int i = (int) count;
+	  while (--i >= 0)
+	    *p++ = *s++;
+	  f->_IO_write_ptr = p;
+	}
+      to_do -= count;
+    }
+  if (to_do + must_flush > 0)
+    {
+      _IO_size_t block_size, do_write;
+      /* Next flush the (full) buffer. */
+      if (_IO_OVERFLOW (f, EOF) == EOF)
+	return n - to_do;
+
+      /* Try to maintain alignment: write a whole number of blocks.
+	 dont_write is what gets left over. */
+      block_size = f->_IO_buf_end - f->_IO_buf_base;
+      do_write = to_do - (block_size >= 128 ? to_do % block_size : 0);
+
+      if (do_write)
+        {
+	  count = new_do_write (f, s, do_write);
+	  to_do -= count;
+	  if (count < do_write)
+	    return n - to_do;
+        }
+
+      /* Now write out the remainder.  Normally, this will fit in the
+	 buffer, but it's somewhat messier for line-buffered files,
+	 so we let _IO_default_xsputn handle the general case. */
+      if (to_do)
+	to_do -= _IO_default_xsputn (f, s+do_write, to_do);
+    }
+  return n - to_do;
+}
+
+_IO_size_t
+_IO_file_xsgetn (fp, data, n)
+     _IO_FILE *fp;
+     void *data;
+     _IO_size_t n;
+{
+  register _IO_size_t want, have;
+  register _IO_ssize_t count;
+  register char *s = data;
+
+  want = n;
+
+  if (fp->_IO_buf_base == NULL)
+    {
+      /* Maybe we already have a push back pointer.  */
+      if (fp->_IO_save_base != NULL)
+	{
+	  free (fp->_IO_save_base);
+	  fp->_flags &= ~_IO_IN_BACKUP;
+	}
+      _IO_doallocbuf (fp);
+    }
+
+  while (want > 0)
+    {
+      have = fp->_IO_read_end - fp->_IO_read_ptr;
+      if (want <= have)
+	{
+	  memcpy (s, fp->_IO_read_ptr, want);
+	  fp->_IO_read_ptr += want;
+	  want = 0;
+	}
+      else
+	{
+	  if (have > 0)
+	    {
+#ifdef _LIBC
+	      s = __mempcpy (s, fp->_IO_read_ptr, have);
+#else
+	      memcpy (s, fp->_IO_read_ptr, have);
+	      s += have;
+#endif
+	      want -= have;
+	      fp->_IO_read_ptr += have;
+	    }
+
+	  /* Check for backup and repeat */
+	  if (_IO_in_backup (fp))
+	    {
+	      _IO_switch_to_main_get_area (fp);
+	      continue;
+	    }
+
+	  /* If we now want less than a buffer, underflow and repeat
+	     the copy.  Otherwise, _IO_SYSREAD directly to
+	     the user buffer. */
+	  if (fp->_IO_buf_base && want < fp->_IO_buf_end - fp->_IO_buf_base)
+	    {
+	      if (__underflow (fp) == EOF)
+		break;
+
+	      continue;
+	    }
+
+	  /* These must be set before the sysread as we might longjmp out
+	     waiting for input. */
+	  _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+	  _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+
+	  /* Try to maintain alignment: read a whole number of blocks.  */
+	  count = want;
+	  if (fp->_IO_buf_base)
+	    {
+	      _IO_size_t block_size = fp->_IO_buf_end - fp->_IO_buf_base;
+	      if (block_size >= 128)
+		count -= want % block_size;
+	    }
+
+	  count = _IO_SYSREAD (fp, s, count);
+	  if (count <= 0)
+	    {
+	      if (count == 0)
+		fp->_flags |= _IO_EOF_SEEN;
+	      else
+		fp->_flags |= _IO_ERR_SEEN;
+
+	      break;
+	    }
+
+	  s += count;
+	  want -= count;
+	  if (fp->_offset != _IO_pos_BAD)
+	    _IO_pos_adjust (fp->_offset, count);
+	}
+    }
+
+  return n - want;
+}
+
+struct _IO_jump_t _IO_file_jumps =
+{
+  JUMP_INIT_DUMMY,
+  JUMP_INIT(finish, _IO_new_file_finish),
+  JUMP_INIT(overflow, _IO_new_file_overflow),
+  JUMP_INIT(underflow, _IO_new_file_underflow),
+  JUMP_INIT(uflow, _IO_default_uflow),
+  JUMP_INIT(pbackfail, _IO_default_pbackfail),
+  JUMP_INIT(xsputn, _IO_new_file_xsputn),
+  JUMP_INIT(xsgetn, _IO_file_xsgetn),
+  JUMP_INIT(seekoff, _IO_new_file_seekoff),
+  JUMP_INIT(seekpos, _IO_default_seekpos),
+  JUMP_INIT(setbuf, _IO_new_file_setbuf),
+  JUMP_INIT(sync, _IO_new_file_sync),
+  JUMP_INIT(doallocate, _IO_file_doallocate),
+  JUMP_INIT(read, _IO_file_read),
+  JUMP_INIT(write, _IO_new_file_write),
+  JUMP_INIT(seek, _IO_file_seek),
+  JUMP_INIT(close, _IO_file_close),
+  JUMP_INIT(stat, _IO_file_stat),
+  JUMP_INIT(showmanyc, _IO_default_showmanyc),
+  JUMP_INIT(imbue, _IO_default_imbue)
+};
+
+#ifdef _LIBC
+versioned_symbol (libc, _IO_new_do_write, _IO_do_write, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_attach, _IO_file_attach, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_close_it, _IO_file_close_it, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_finish, _IO_file_finish, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_fopen, _IO_file_fopen, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_init, _IO_file_init, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_setbuf, _IO_file_setbuf, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_sync, _IO_file_sync, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_overflow, _IO_file_overflow, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_seekoff, _IO_file_seekoff, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_underflow, _IO_file_underflow, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_write, _IO_file_write, GLIBC_2_1);
+versioned_symbol (libc, _IO_new_file_xsputn, _IO_file_xsputn, GLIBC_2_1);
+#endif
diff --git a/contrib/libstdc++/libio/genops.c b/contrib/libstdc++/libio/genops.c
new file mode 100644
index 0000000..b1ae5af
--- /dev/null
+++ b/contrib/libstdc++/libio/genops.c
@@ -0,0 +1,1123 @@
+/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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.  */
+
+/* Generic or default I/O operations. */
+
+#include "libioP.h"
+#ifdef __STDC__
+#include 
+#endif
+#include 
+
+#ifdef _IO_MTSAFE_IO
+static _IO_lock_t list_all_lock = _IO_lock_initializer;
+#endif
+
+void
+_IO_un_link (fp)
+     struct _IO_FILE_plus *fp;
+{
+  if (fp->file._flags & _IO_LINKED)
+    {
+      struct _IO_FILE_plus **f;
+#ifdef _IO_MTSAFE_IO
+      _IO_lock_lock (list_all_lock);
+#endif
+      for (f = &_IO_list_all; *f; f = (struct _IO_FILE_plus **) &(*f)->file._chain)
+	{
+	  if (*f == fp)
+	    {
+	      *f = (struct _IO_FILE_plus *) fp->file._chain;
+	      break;
+	    }
+	}
+#ifdef _IO_MTSAFE_IO
+      _IO_lock_unlock (list_all_lock);
+#endif
+      fp->file._flags &= ~_IO_LINKED;
+    }
+}
+
+void
+_IO_link_in (fp)
+     struct _IO_FILE_plus *fp;
+{
+    if ((fp->file._flags & _IO_LINKED) == 0)
+      {
+	fp->file._flags |= _IO_LINKED;
+#ifdef _IO_MTSAFE_IO
+	_IO_lock_lock (list_all_lock);
+#endif
+	fp->file._chain = (_IO_FILE *) _IO_list_all;
+	_IO_list_all = fp;
+#ifdef _IO_MTSAFE_IO
+	_IO_lock_unlock (list_all_lock);
+#endif
+      }
+}
+
+/* Return minimum _pos markers
+   Assumes the current get area is the main get area. */
+_IO_ssize_t _IO_least_marker __P ((_IO_FILE *fp, char *end_p));
+
+_IO_ssize_t
+_IO_least_marker (fp, end_p)
+     _IO_FILE *fp;
+     char *end_p;
+{
+  _IO_ssize_t least_so_far = end_p - fp->_IO_read_base;
+  struct _IO_marker *mark;
+  for (mark = fp->_markers; mark != NULL; mark = mark->_next)
+    if (mark->_pos < least_so_far)
+      least_so_far = mark->_pos;
+  return least_so_far;
+}
+
+/* Switch current get area from backup buffer to (start of) main get area. */
+
+void
+_IO_switch_to_main_get_area (fp)
+     _IO_FILE *fp;
+{
+  char *tmp;
+  fp->_flags &= ~_IO_IN_BACKUP;
+  /* Swap _IO_read_end and _IO_save_end. */
+  tmp = fp->_IO_read_end;
+  fp->_IO_read_end = fp->_IO_save_end;
+  fp->_IO_save_end= tmp;
+  /* Swap _IO_read_base and _IO_save_base. */
+  tmp = fp->_IO_read_base;
+  fp->_IO_read_base = fp->_IO_save_base;
+  fp->_IO_save_base = tmp;
+  /* Set _IO_read_ptr. */
+  fp->_IO_read_ptr = fp->_IO_read_base;
+}
+
+/* Switch current get area from main get area to (end of) backup area. */
+
+void
+_IO_switch_to_backup_area (fp)
+     _IO_FILE *fp;
+{
+  char *tmp;
+  fp->_flags |= _IO_IN_BACKUP;
+  /* Swap _IO_read_end and _IO_save_end. */
+  tmp = fp->_IO_read_end;
+  fp->_IO_read_end = fp->_IO_save_end;
+  fp->_IO_save_end = tmp;
+  /* Swap _IO_read_base and _IO_save_base. */
+  tmp = fp->_IO_read_base;
+  fp->_IO_read_base = fp->_IO_save_base;
+  fp->_IO_save_base = tmp;
+  /* Set _IO_read_ptr.  */
+  fp->_IO_read_ptr = fp->_IO_read_end;
+}
+
+int
+_IO_switch_to_get_mode (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_IO_write_ptr > fp->_IO_write_base)
+    if (_IO_OVERFLOW (fp, EOF) == EOF)
+      return EOF;
+  if (_IO_in_backup (fp))
+    fp->_IO_read_base = fp->_IO_backup_base;
+  else
+    {
+      fp->_IO_read_base = fp->_IO_buf_base;
+      if (fp->_IO_write_ptr > fp->_IO_read_end)
+	fp->_IO_read_end = fp->_IO_write_ptr;
+    }
+  fp->_IO_read_ptr = fp->_IO_write_ptr;
+
+  fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end = fp->_IO_read_ptr;
+
+  fp->_flags &= ~_IO_CURRENTLY_PUTTING;
+  return 0;
+}
+
+void
+_IO_free_backup_area (fp)
+     _IO_FILE *fp;
+{
+  if (_IO_in_backup (fp))
+    _IO_switch_to_main_get_area (fp);  /* Just in case. */
+  free (fp->_IO_save_base);
+  fp->_IO_save_base = NULL;
+  fp->_IO_save_end = NULL;
+  fp->_IO_backup_base = NULL;
+}
+
+#if 0
+int
+_IO_switch_to_put_mode (fp)
+     _IO_FILE *fp;
+{
+  fp->_IO_write_base = fp->_IO_read_ptr;
+  fp->_IO_write_ptr = fp->_IO_read_ptr;
+  /* Following is wrong if line- or un-buffered? */
+  fp->_IO_write_end = (fp->_flags & _IO_IN_BACKUP
+		       ? fp->_IO_read_end : fp->_IO_buf_end);
+
+  fp->_IO_read_ptr = fp->_IO_read_end;
+  fp->_IO_read_base = fp->_IO_read_end;
+
+  fp->_flags |= _IO_CURRENTLY_PUTTING;
+  return 0;
+}
+#endif
+
+int
+__overflow (f, ch)
+     _IO_FILE *f;
+     int ch;
+{
+  /* This is a single-byte stream.  */
+  if (f->_mode == 0)
+    _IO_fwide (f, -1);
+  return _IO_OVERFLOW (f, ch);
+}
+
+static int save_for_backup __P ((_IO_FILE *fp, char *end_p))
+#ifdef _LIBC
+     internal_function
+#endif
+     ;
+
+static int
+#ifdef _LIBC
+internal_function
+#endif
+save_for_backup (fp, end_p)
+     _IO_FILE *fp;
+     char *end_p;
+{
+  /* Append [_IO_read_base..end_p] to backup area. */
+  _IO_ssize_t least_mark = _IO_least_marker (fp, end_p);
+  /* needed_size is how much space we need in the backup area. */
+  _IO_size_t needed_size = (end_p - fp->_IO_read_base) - least_mark;
+  /* FIXME: Dubious arithmetic if pointers are NULL */
+  _IO_size_t current_Bsize = fp->_IO_save_end - fp->_IO_save_base;
+  _IO_size_t avail; /* Extra space available for future expansion. */
+  _IO_ssize_t delta;
+  struct _IO_marker *mark;
+  if (needed_size > current_Bsize)
+    {
+      char *new_buffer;
+      avail = 100;
+      new_buffer = (char *) malloc (avail + needed_size);
+      if (new_buffer == NULL)
+	return EOF;		/* FIXME */
+      if (least_mark < 0)
+	{
+#ifdef _LIBC
+	  __mempcpy (__mempcpy (new_buffer + avail,
+				fp->_IO_save_end + least_mark,
+				-least_mark),
+		     fp->_IO_read_base,
+		     end_p - fp->_IO_read_base);
+#else
+	  memcpy (new_buffer + avail,
+		  fp->_IO_save_end + least_mark,
+		  -least_mark);
+	  memcpy (new_buffer + avail - least_mark,
+		  fp->_IO_read_base,
+		  end_p - fp->_IO_read_base);
+#endif
+	}
+      else
+	memcpy (new_buffer + avail,
+		fp->_IO_read_base + least_mark,
+		needed_size);
+      if (fp->_IO_save_base)
+	free (fp->_IO_save_base);
+      fp->_IO_save_base = new_buffer;
+      fp->_IO_save_end = new_buffer + avail + needed_size;
+    }
+  else
+    {
+      avail = current_Bsize - needed_size;
+      if (least_mark < 0)
+	{
+	  memmove (fp->_IO_save_base + avail,
+		   fp->_IO_save_end + least_mark,
+		   -least_mark);
+	  memcpy (fp->_IO_save_base + avail - least_mark,
+		  fp->_IO_read_base,
+		  end_p - fp->_IO_read_base);
+	}
+      else if (needed_size > 0)
+	memcpy (fp->_IO_save_base + avail,
+		fp->_IO_read_base + least_mark,
+		needed_size);
+    }
+  fp->_IO_backup_base = fp->_IO_save_base + avail;
+  /* Adjust all the streammarkers. */
+  delta = end_p - fp->_IO_read_base;
+  for (mark = fp->_markers; mark != NULL; mark = mark->_next)
+    mark->_pos -= delta;
+  return 0;
+}
+
+int
+__underflow (fp)
+     _IO_FILE *fp;
+{
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1)
+    return EOF;
+#endif
+
+  if (fp->_mode == 0)
+    _IO_fwide (fp, -1);
+  if (_IO_in_put_mode (fp))
+    if (_IO_switch_to_get_mode (fp) == EOF)
+      return EOF;
+  if (fp->_IO_read_ptr < fp->_IO_read_end)
+    return *(unsigned char *) fp->_IO_read_ptr;
+  if (_IO_in_backup (fp))
+    {
+      _IO_switch_to_main_get_area (fp);
+      if (fp->_IO_read_ptr < fp->_IO_read_end)
+	return *(unsigned char *) fp->_IO_read_ptr;
+    }
+  if (_IO_have_markers (fp))
+    {
+      if (save_for_backup (fp, fp->_IO_read_end))
+	return EOF;
+    }
+  else if (_IO_have_backup (fp))
+    _IO_free_backup_area (fp);
+  return _IO_UNDERFLOW (fp);
+}
+
+int
+__uflow (fp)
+     _IO_FILE *fp;
+{
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  if (fp->_vtable_offset == 0 && _IO_fwide (fp, -1) != -1)
+    return EOF;
+#endif
+
+  if (fp->_mode == 0)
+    _IO_fwide (fp, -11);
+  if (_IO_in_put_mode (fp))
+    if (_IO_switch_to_get_mode (fp) == EOF)
+      return EOF;
+  if (fp->_IO_read_ptr < fp->_IO_read_end)
+    return *(unsigned char *) fp->_IO_read_ptr++;
+  if (_IO_in_backup (fp))
+    {
+      _IO_switch_to_main_get_area (fp);
+      if (fp->_IO_read_ptr < fp->_IO_read_end)
+	return *(unsigned char *) fp->_IO_read_ptr++;
+    }
+  if (_IO_have_markers (fp))
+    {
+      if (save_for_backup (fp, fp->_IO_read_end))
+	return EOF;
+    }
+  else if (_IO_have_backup (fp))
+    _IO_free_backup_area (fp);
+  return _IO_UFLOW (fp);
+}
+
+void
+_IO_setb (f, b, eb, a)
+     _IO_FILE *f;
+      char *b;
+     char *eb;
+     int a;
+{
+  if (f->_IO_buf_base && !(f->_flags & _IO_USER_BUF))
+    FREE_BUF (f->_IO_buf_base, _IO_blen (f));
+  f->_IO_buf_base = b;
+  f->_IO_buf_end = eb;
+  if (a)
+    f->_flags &= ~_IO_USER_BUF;
+  else
+    f->_flags |= _IO_USER_BUF;
+}
+
+void
+_IO_doallocbuf (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_IO_buf_base)
+    return;
+  if (!(fp->_flags & _IO_UNBUFFERED))
+    if (_IO_DOALLOCATE (fp) != EOF)
+      return;
+  _IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
+}
+
+int
+_IO_default_underflow (fp)
+     _IO_FILE *fp;
+{
+  return EOF;
+}
+
+int
+_IO_default_uflow (fp)
+     _IO_FILE *fp;
+{
+  int ch = _IO_UNDERFLOW (fp);
+  if (ch == EOF)
+    return EOF;
+  return *(unsigned char *) fp->_IO_read_ptr++;
+}
+
+_IO_size_t
+_IO_default_xsputn (f, data, n)
+     _IO_FILE *f;
+     const void *data;
+     _IO_size_t n;
+{
+  const char *s = (char *) data;
+  _IO_size_t more = n;
+  if (more <= 0)
+    return 0;
+  for (;;)
+    {
+      /* Space available. */
+      _IO_ssize_t count = f->_IO_write_end - f->_IO_write_ptr;
+      if (count > 0)
+	{
+	  if ((_IO_size_t) count > more)
+	    count = more;
+	  if (count > 20)
+	    {
+#ifdef _LIBC
+	      f->_IO_write_ptr = __mempcpy (f->_IO_write_ptr, s, count);
+#else
+	      memcpy (f->_IO_write_ptr, s, count);
+	      f->_IO_write_ptr += count;
+#endif
+	      s += count;
+            }
+	  else if (count <= 0)
+	    count = 0;
+	  else
+	    {
+	      char *p = f->_IO_write_ptr;
+	      _IO_ssize_t i;
+	      for (i = count; --i >= 0; )
+		*p++ = *s++;
+	      f->_IO_write_ptr = p;
+            }
+	  more -= count;
+        }
+      if (more == 0 || _IO_OVERFLOW (f, (unsigned char) *s++) == EOF)
+	break;
+      more--;
+    }
+  return n - more;
+}
+
+_IO_size_t
+_IO_sgetn (fp, data, n)
+     _IO_FILE *fp;
+     void *data;
+     _IO_size_t n;
+{
+  /* FIXME handle putback buffer here! */
+  return _IO_XSGETN (fp, data, n);
+}
+
+_IO_size_t
+_IO_default_xsgetn (fp, data, n)
+     _IO_FILE *fp;
+     void *data;
+     _IO_size_t n;
+{
+  _IO_size_t more = n;
+  char *s = (char*) data;
+  for (;;)
+    {
+      /* Data available. */
+      _IO_ssize_t count = fp->_IO_read_end - fp->_IO_read_ptr;
+      if (count > 0)
+	{
+	  if ((_IO_size_t) count > more)
+	    count = more;
+	  if (count > 20)
+	    {
+#ifdef _LIBC
+	      s = __mempcpy (s, fp->_IO_read_ptr, count);
+#else
+	      memcpy (s, fp->_IO_read_ptr, count);
+	      s += count;
+#endif
+	      fp->_IO_read_ptr += count;
+	    }
+	  else if (count <= 0)
+	    count = 0;
+	  else
+	    {
+	      char *p = fp->_IO_read_ptr;
+	      int i = (int) count;
+	      while (--i >= 0)
+		*s++ = *p++;
+	      fp->_IO_read_ptr = p;
+            }
+            more -= count;
+        }
+      if (more == 0 || __underflow (fp) == EOF)
+	break;
+    }
+  return n - more;
+}
+
+#if 0
+/* Seems not to be needed. --drepper */
+int
+_IO_sync (fp)
+     _IO_FILE *fp;
+{
+  return 0;
+}
+#endif
+
+_IO_FILE *
+_IO_default_setbuf (fp, p, len)
+     _IO_FILE *fp;
+     char *p;
+     _IO_ssize_t len;
+{
+    if (_IO_SYNC (fp) == EOF)
+	return NULL;
+    if (p == NULL || len == 0)
+      {
+	fp->_flags |= _IO_UNBUFFERED;
+	_IO_setb (fp, fp->_shortbuf, fp->_shortbuf+1, 0);
+      }
+    else
+      {
+	fp->_flags &= ~_IO_UNBUFFERED;
+	_IO_setb (fp, p, p+len, 0);
+      }
+    fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end = 0;
+    fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end = 0;
+    return fp;
+}
+
+_IO_off64_t
+_IO_default_seekpos (fp, pos, mode)
+     _IO_FILE *fp;
+     _IO_off64_t pos;
+     int mode;
+{
+  return _IO_SEEKOFF (fp, pos, 0, mode);
+}
+
+int
+_IO_default_doallocate (fp)
+     _IO_FILE *fp;
+{
+  char *buf;
+
+  ALLOC_BUF (buf, _IO_BUFSIZ, EOF);
+  _IO_setb (fp, buf, buf+_IO_BUFSIZ, 1);
+  return 1;
+}
+
+void
+_IO_init (fp, flags)
+     _IO_FILE *fp;
+     int flags;
+{
+  _IO_no_init (fp, flags, -1, NULL, NULL);
+}
+
+void
+_IO_no_init (fp, flags, orientation, wd, jmp)
+     _IO_FILE *fp;
+     int flags;
+     int orientation;
+     struct _IO_wide_data *wd;
+     struct _IO_jump_t *jmp;
+{
+  fp->_flags = _IO_MAGIC|flags;
+  fp->_IO_buf_base = NULL;
+  fp->_IO_buf_end = NULL;
+  fp->_IO_read_base = NULL;
+  fp->_IO_read_ptr = NULL;
+  fp->_IO_read_end = NULL;
+  fp->_IO_write_base = NULL;
+  fp->_IO_write_ptr = NULL;
+  fp->_IO_write_end = NULL;
+  fp->_chain = NULL; /* Not necessary. */
+
+  fp->_IO_save_base = NULL;
+  fp->_IO_backup_base = NULL;
+  fp->_IO_save_end = NULL;
+  fp->_markers = NULL;
+  fp->_cur_column = 0;
+#if _IO_JUMPS_OFFSET
+  fp->_vtable_offset = 0;
+#endif
+#ifdef _IO_MTSAFE_IO
+  _IO_lock_init (*fp->_lock);
+#endif
+  fp->_mode = orientation;
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  if (orientation >= 0)
+    {
+      fp->_wide_data = wd;
+      fp->_wide_data->_IO_buf_base = NULL;
+      fp->_wide_data->_IO_buf_end = NULL;
+      fp->_wide_data->_IO_read_base = NULL;
+      fp->_wide_data->_IO_read_ptr = NULL;
+      fp->_wide_data->_IO_read_end = NULL;
+      fp->_wide_data->_IO_write_base = NULL;
+      fp->_wide_data->_IO_write_ptr = NULL;
+      fp->_wide_data->_IO_write_end = NULL;
+      fp->_wide_data->_IO_save_base = NULL;
+      fp->_wide_data->_IO_backup_base = NULL;
+      fp->_wide_data->_IO_save_end = NULL;
+
+      fp->_wide_data->_wide_vtable = jmp;
+    }
+#endif
+}
+
+int
+_IO_default_sync (fp)
+     _IO_FILE *fp;
+{
+  return 0;
+}
+
+/* The way the C++ classes are mapped into the C functions in the
+   current implementation, this function can get called twice! */
+
+void
+_IO_default_finish (fp, dummy)
+     _IO_FILE *fp;
+     int dummy;
+{
+  struct _IO_marker *mark;
+  if (fp->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
+    {
+      FREE_BUF (fp->_IO_buf_base, _IO_blen (fp));
+      fp->_IO_buf_base = fp->_IO_buf_end = NULL;
+    }
+
+  for (mark = fp->_markers; mark != NULL; mark = mark->_next)
+    mark->_sbuf = NULL;
+
+  if (fp->_IO_save_base)
+    {
+      free (fp->_IO_save_base);
+      fp->_IO_save_base = NULL;
+    }
+
+#ifdef _IO_MTSAFE_IO
+  _IO_lock_fini (*fp->_lock);
+#endif
+
+  _IO_un_link ((struct _IO_FILE_plus *) fp);
+}
+
+_IO_off64_t
+_IO_default_seekoff (fp, offset, dir, mode)
+     _IO_FILE *fp;
+     _IO_off64_t offset;
+     int dir;
+     int mode;
+{
+    return _IO_pos_BAD;
+}
+
+int
+_IO_sputbackc (fp, c)
+     _IO_FILE *fp;
+     int c;
+{
+  int result;
+
+  if (fp->_IO_read_ptr > fp->_IO_read_base
+      && (unsigned char)fp->_IO_read_ptr[-1] == (unsigned char)c)
+    {
+      fp->_IO_read_ptr--;
+      result = (unsigned char) c;
+    }
+  else
+    result = _IO_PBACKFAIL (fp, c);
+
+  if (result != EOF)
+    fp->_flags &= ~_IO_EOF_SEEN;
+
+  return result;
+}
+
+int
+_IO_sungetc (fp)
+     _IO_FILE *fp;
+{
+  int result;
+
+  if (fp->_IO_read_ptr > fp->_IO_read_base)
+    {
+      fp->_IO_read_ptr--;
+      result = (unsigned char) *fp->_IO_read_ptr;
+    }
+  else
+    result = _IO_PBACKFAIL (fp, EOF);
+
+  if (result != EOF)
+    fp->_flags &= ~_IO_EOF_SEEN;
+
+  return result;
+}
+
+#if 0 /* Work in progress */
+/* Seems not to be needed.  */
+#if 0
+void
+_IO_set_column (fp, c)
+     _IO_FILE *fp;
+     int c;
+{
+  if (c == -1)
+    fp->_column = -1;
+  else
+    fp->_column = c - (fp->_IO_write_ptr - fp->_IO_write_base);
+}
+#else
+int
+_IO_set_column (fp, i)
+     _IO_FILE *fp;
+     int i;
+{
+  fp->_cur_column = i + 1;
+  return 0;
+}
+#endif
+#endif
+
+
+unsigned
+_IO_adjust_column (start, line, count)
+     unsigned start;
+     const char *line;
+     int count;
+{
+  const char *ptr = line + count;
+  while (ptr > line)
+    if (*--ptr == '\n')
+      return line + count - ptr - 1;
+  return start + count;
+}
+
+#if 0
+/* Seems not to be needed. --drepper */
+int
+_IO_get_column (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_cur_column)
+    return _IO_adjust_column (fp->_cur_column - 1,
+			      fp->_IO_write_base,
+			      fp->_IO_write_ptr - fp->_IO_write_base);
+  return -1;
+}
+#endif
+
+int
+_IO_flush_all ()
+{
+  int result = 0;
+  struct _IO_FILE *fp;
+  for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
+    if (((fp->_mode < 0 && fp->_IO_write_ptr > fp->_IO_write_base)
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+	 || (fp->_vtable_offset == 0
+	     && fp->_mode > 0 && (fp->_wide_data->_IO_write_ptr
+				  > fp->_wide_data->_IO_write_base))
+#endif
+	 )
+	&& _IO_OVERFLOW (fp, EOF) == EOF)
+      result = EOF;
+  return result;
+}
+
+void
+_IO_flush_all_linebuffered ()
+{
+  struct _IO_FILE *fp;
+  for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
+    if ((fp->_flags & _IO_NO_WRITES) == 0 && fp->_flags & _IO_LINE_BUF)
+      _IO_OVERFLOW (fp, EOF);
+}
+
+static void _IO_unbuffer_write __P ((void));
+
+static void
+_IO_unbuffer_write ()
+{
+  struct _IO_FILE *fp;
+  for (fp = (_IO_FILE *) _IO_list_all; fp; fp = fp->_chain)
+    if (! (fp->_flags & _IO_UNBUFFERED)
+	&& (! (fp->_flags & _IO_NO_WRITES)
+	    || (fp->_flags & _IO_IS_APPENDING))
+	/* Iff stream is un-orientated, it wasn't used. */
+	&& fp->_mode != 0)
+      _IO_SETBUF (fp, NULL, 0);
+}
+
+int
+_IO_cleanup ()
+{
+  int result = _IO_flush_all ();
+
+  /* We currently don't have a reliable mechanism for making sure that
+     C++ static destructors are executed in the correct order.
+     So it is possible that other static destructors might want to
+     write to cout - and they're supposed to be able to do so.
+
+     The following will make the standard streambufs be unbuffered,
+     which forces any output from late destructors to be written out. */
+  _IO_unbuffer_write ();
+
+  return result;
+}
+
+
+void
+_IO_init_marker (marker, fp)
+     struct _IO_marker *marker;
+     _IO_FILE *fp;
+{
+  marker->_sbuf = fp;
+  if (_IO_in_put_mode (fp))
+    _IO_switch_to_get_mode (fp);
+  if (_IO_in_backup (fp))
+    marker->_pos = fp->_IO_read_ptr - fp->_IO_read_end;
+  else
+    marker->_pos = fp->_IO_read_ptr - fp->_IO_read_base;
+
+  /* Should perhaps sort the chain? */
+  marker->_next = fp->_markers;
+  fp->_markers = marker;
+}
+
+void
+_IO_remove_marker (marker)
+     struct _IO_marker *marker;
+{
+  /* Unlink from sb's chain. */
+  struct _IO_marker **ptr = &marker->_sbuf->_markers;
+  for (; ; ptr = &(*ptr)->_next)
+    {
+      if (*ptr == NULL)
+	break;
+      else if (*ptr == marker)
+	{
+	  *ptr = marker->_next;
+	  return;
+	}
+    }
+#if 0
+    if _sbuf has a backup area that is no longer needed, should we delete
+    it now, or wait until the next underflow?
+#endif
+}
+
+#define BAD_DELTA EOF
+
+int
+_IO_marker_difference (mark1, mark2)
+     struct _IO_marker *mark1;
+     struct _IO_marker *mark2;
+{
+  return mark1->_pos - mark2->_pos;
+}
+
+/* Return difference between MARK and current position of MARK's stream. */
+int
+_IO_marker_delta (mark)
+     struct _IO_marker *mark;
+{
+  int cur_pos;
+  if (mark->_sbuf == NULL)
+    return BAD_DELTA;
+  if (_IO_in_backup (mark->_sbuf))
+    cur_pos = mark->_sbuf->_IO_read_ptr - mark->_sbuf->_IO_read_end;
+  else
+    cur_pos = mark->_sbuf->_IO_read_ptr - mark->_sbuf->_IO_read_base;
+  return mark->_pos - cur_pos;
+}
+
+int
+_IO_seekmark (fp, mark, delta)
+     _IO_FILE *fp;
+     struct _IO_marker *mark;
+     int delta;
+{
+  if (mark->_sbuf != fp)
+    return EOF;
+ if (mark->_pos >= 0)
+    {
+      if (_IO_in_backup (fp))
+	_IO_switch_to_main_get_area (fp);
+      fp->_IO_read_ptr = fp->_IO_read_base + mark->_pos;
+    }
+  else
+    {
+      if (!_IO_in_backup (fp))
+	_IO_switch_to_backup_area (fp);
+      fp->_IO_read_ptr = fp->_IO_read_end + mark->_pos;
+    }
+  return 0;
+}
+
+void
+_IO_unsave_markers (fp)
+     _IO_FILE *fp;
+{
+  struct _IO_marker *mark = fp->_markers;
+  if (mark)
+    {
+#ifdef TODO
+      streampos offset = seekoff (0, ios::cur, ios::in);
+      if (offset != EOF)
+	{
+	  offset += eGptr () - Gbase ();
+	  for ( ; mark != NULL; mark = mark->_next)
+	    mark->set_streampos (mark->_pos + offset);
+	}
+    else
+      {
+	for ( ; mark != NULL; mark = mark->_next)
+	  mark->set_streampos (EOF);
+      }
+#endif
+      fp->_markers = 0;
+    }
+
+  if (_IO_have_backup (fp))
+    _IO_free_backup_area (fp);
+}
+
+#if 0
+/* Seems not to be needed. --drepper */
+int
+_IO_nobackup_pbackfail (fp, c)
+     _IO_FILE *fp;
+     int c;
+{
+  if (fp->_IO_read_ptr > fp->_IO_read_base)
+	fp->_IO_read_ptr--;
+  if (c != EOF && *fp->_IO_read_ptr != c)
+      *fp->_IO_read_ptr = c;
+  return (unsigned char) c;
+}
+#endif
+
+int
+_IO_default_pbackfail (fp, c)
+     _IO_FILE *fp;
+     int c;
+{
+  if (fp->_IO_read_ptr > fp->_IO_read_base && !_IO_in_backup (fp)
+      && (unsigned char) fp->_IO_read_ptr[-1] == c)
+    --fp->_IO_read_ptr;
+  else
+    {
+      /* Need to handle a filebuf in write mode (switch to read mode). FIXME!*/
+      if (!_IO_in_backup (fp))
+	{
+	  /* We need to keep the invariant that the main get area
+	     logically follows the backup area.  */
+	  if (fp->_IO_read_ptr > fp->_IO_read_base && _IO_have_backup (fp))
+	    {
+	      if (save_for_backup (fp, fp->_IO_read_ptr))
+		return EOF;
+	    }
+	  else if (!_IO_have_backup (fp))
+	    {
+	      /* No backup buffer: allocate one. */
+	      /* Use nshort buffer, if unused? (probably not)  FIXME */
+	      int backup_size = 128;
+	      char *bbuf = (char *) malloc (backup_size);
+	      if (bbuf == NULL)
+		return EOF;
+	      fp->_IO_save_base = bbuf;
+	      fp->_IO_save_end = fp->_IO_save_base + backup_size;
+	      fp->_IO_backup_base = fp->_IO_save_end;
+	    }
+	  fp->_IO_read_base = fp->_IO_read_ptr;
+	  _IO_switch_to_backup_area (fp);
+	}
+      else if (fp->_IO_read_ptr <= fp->_IO_read_base)
+	{
+	  /* Increase size of existing backup buffer. */
+	  _IO_size_t new_size;
+	  _IO_size_t old_size = fp->_IO_read_end - fp->_IO_read_base;
+	  char *new_buf;
+	  new_size = 2 * old_size;
+	  new_buf = (char *) malloc (new_size);
+	  if (new_buf == NULL)
+	    return EOF;
+	  memcpy (new_buf + (new_size - old_size), fp->_IO_read_base,
+		  old_size);
+	  free (fp->_IO_read_base);
+	  _IO_setg (fp, new_buf, new_buf + (new_size - old_size),
+		    new_buf + new_size);
+	  fp->_IO_backup_base = fp->_IO_read_ptr;
+	}
+
+      *--fp->_IO_read_ptr = c;
+    }
+  return (unsigned char) c;
+}
+
+_IO_off64_t
+_IO_default_seek (fp, offset, dir)
+     _IO_FILE *fp;
+     _IO_off64_t offset;
+     int dir;
+{
+  return _IO_pos_BAD;
+}
+
+int
+_IO_default_stat (fp, st)
+     _IO_FILE *fp;
+     void* st;
+{
+  return EOF;
+}
+
+_IO_ssize_t
+_IO_default_read (fp, data, n)
+     _IO_FILE* fp;
+     void *data;
+     _IO_ssize_t n;
+{
+  return -1;
+}
+
+_IO_ssize_t
+_IO_default_write (fp, data, n)
+     _IO_FILE *fp;
+     const void *data;
+     _IO_ssize_t n;
+{
+  return 0;
+}
+
+int
+_IO_default_showmanyc (fp)
+     _IO_FILE *fp;
+{
+  return -1;
+}
+
+void
+_IO_default_imbue (fp, locale)
+     _IO_FILE *fp;
+     void *locale;
+{
+}
+
+_IO_ITER
+_IO_iter_begin()
+{
+  return (_IO_ITER) _IO_list_all;
+}
+
+_IO_ITER
+_IO_iter_end()
+{
+  return NULL;
+}
+
+_IO_ITER
+_IO_iter_next(iter)
+    _IO_ITER iter;
+{
+  return iter->_chain;
+}
+
+_IO_FILE *
+_IO_iter_file(iter)
+    _IO_ITER iter;
+{
+  return iter;
+}
+
+void
+_IO_list_lock()
+{
+#ifdef _IO_MTSAFE_IO
+  _IO_lock_lock (list_all_lock);
+#endif
+}
+
+void
+_IO_list_unlock()
+{
+#ifdef _IO_MTSAFE_IO
+  _IO_lock_unlock (list_all_lock);
+#endif
+}
+
+void
+_IO_list_resetlock()
+{
+#ifdef _IO_MTSAFE_IO
+  _IO_lock_init (list_all_lock);
+#endif
+}
+
+
+#ifdef TODO
+#if defined(linux)
+#define IO_CLEANUP ;
+#endif
+
+#ifdef IO_CLEANUP
+  IO_CLEANUP
+#else
+struct __io_defs {
+    __io_defs() { }
+    ~__io_defs() { _IO_cleanup (); }
+};
+__io_defs io_defs__;
+#endif
+
+#endif /* TODO */
+
+#ifdef weak_alias
+weak_alias (_IO_cleanup, _cleanup)
+#endif
+
+#ifdef text_set_element
+text_set_element(__libc_atexit, _cleanup);
+#endif
diff --git a/contrib/libstdc++/libio/iofclose.c b/contrib/libstdc++/libio/iofclose.c
new file mode 100644
index 0000000..43a3f58
--- /dev/null
+++ b/contrib/libstdc++/libio/iofclose.c
@@ -0,0 +1,97 @@
+/* Copyright (C) 1993, 1995, 1997-1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 "libioP.h"
+#ifdef __STDC__
+#include 
+#endif
+#if _LIBC
+# include "../iconv/gconv_int.h"
+# include 
+#else
+# define SHLIB_COMPAT(a, b, c) 0
+# define _IO_new_fclose fclose
+#endif
+
+int
+_IO_new_fclose (fp)
+     _IO_FILE *fp;
+{
+  int status;
+
+  CHECK_FILE(fp, EOF);
+
+#if SHLIB_COMPAT (libc, GLIBC_2_0, GLIBC_2_1)
+  /* We desperately try to help programs which are using streams in a
+     strange way and mix old and new functions.  Detect old streams
+     here.  */
+  if (fp->_vtable_offset != 0)
+    return _IO_old_fclose (fp);
+#endif
+
+  _IO_cleanup_region_start ((void (*) __P ((void *))) _IO_funlockfile, fp);
+  _IO_flockfile (fp);
+  if (fp->_IO_file_flags & _IO_IS_FILEBUF)
+    status = _IO_file_close_it (fp);
+  else
+    status = fp->_flags & _IO_ERR_SEEN ? -1 : 0;
+  _IO_FINISH (fp);
+  _IO_funlockfile (fp);
+  if (fp->_mode > 0)
+    {
+#if _LIBC
+      /* This stream has a wide orientation.  This means we have to free
+	 the conversion functions.  */
+      struct _IO_codecvt *cc = fp->_codecvt;
+
+      if (cc->__cd_in.__cd.__steps->__shlib_handle != NULL)
+	{
+	  --cc->__cd_in.__cd.__steps->__counter;
+	  __gconv_close_transform (cc->__cd_in.__cd.__steps, 1);
+	}
+      if (cc->__cd_out.__cd.__steps->__shlib_handle != NULL)
+	{
+	  --cc->__cd_out.__cd.__steps->__counter;
+	  __gconv_close_transform (cc->__cd_out.__cd.__steps, 1);
+	}
+#endif
+    }
+  _IO_cleanup_region_end (0);
+  if (_IO_have_backup (fp))
+    _IO_free_backup_area (fp);
+  if (fp != _IO_stdin && fp != _IO_stdout && fp != _IO_stderr)
+    {
+      fp->_IO_file_flags = 0;
+      free(fp);
+    }
+
+  return status;
+}
+
+#ifdef _LIBC
+versioned_symbol (libc, _IO_new_fclose, _IO_fclose, GLIBC_2_1);
+strong_alias (_IO_new_fclose, __new_fclose)
+versioned_symbol (libc, __new_fclose, fclose, GLIBC_2_1);
+#endif
diff --git a/contrib/libstdc++/libio/iofopen.c b/contrib/libstdc++/libio/iofopen.c
new file mode 100644
index 0000000..2dcdee0
--- /dev/null
+++ b/contrib/libstdc++/libio/iofopen.c
@@ -0,0 +1,78 @@
+/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 "libioP.h"
+#ifdef __STDC__
+#include 
+#endif
+#ifdef _LIBC
+# include 
+#else
+# define _IO_new_fopen fopen
+#endif
+
+_IO_FILE *
+_IO_new_fopen (filename, mode)
+     const char *filename;
+     const char *mode;
+{
+  struct locked_FILE
+  {
+    struct _IO_FILE_plus fp;
+#ifdef _IO_MTSAFE_IO
+    _IO_lock_t lock;
+#endif
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+    struct _IO_wide_data wd;
+#endif /* !(defined _LIBC || defined _GLIBCPP_USE_WCHAR_T) */
+  } *new_f = (struct locked_FILE *) malloc (sizeof (struct locked_FILE));
+
+  if (new_f == NULL)
+    return NULL;
+#ifdef _IO_MTSAFE_IO
+  new_f->fp.file._lock = &new_f->lock;
+#endif
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  _IO_no_init (&new_f->fp.file, 0, 0, &new_f->wd, &_IO_wfile_jumps);
+#else
+  _IO_no_init (&new_f->fp.file, 1, 0, NULL, NULL);
+#endif
+  _IO_JUMPS (&new_f->fp) = &_IO_file_jumps;
+  _IO_file_init (&new_f->fp);
+#if  !_IO_UNIFIED_JUMPTABLES
+  new_f->fp.vtable = NULL;
+#endif
+  if (_IO_file_fopen ((_IO_FILE *) new_f, filename, mode, 1) != NULL)
+    return (_IO_FILE *) &new_f->fp;
+  _IO_un_link (&new_f->fp);
+  free (new_f);
+  return NULL;
+}
+
+#ifdef _LIBC
+strong_alias (_IO_new_fopen, __new_fopen)
+versioned_symbol (libc, _IO_new_fopen, _IO_fopen, GLIBC_2_1);
+versioned_symbol (libc, __new_fopen, fopen, GLIBC_2_1);
+#endif
diff --git a/contrib/libstdc++/libio/iofwide.c b/contrib/libstdc++/libio/iofwide.c
new file mode 100644
index 0000000..76a20ce
--- /dev/null
+++ b/contrib/libstdc++/libio/iofwide.c
@@ -0,0 +1,476 @@
+/* Copyright (C) 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 
+#ifdef _LIBC
+# include 
+# include 
+# include 
+# include 
+# include 
+#endif
+#include 
+#include 
+
+#if defined(_LIBC) || defined(_GLIBCPP_USE_WCHAR_T)
+# include 
+#endif
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+/* Prototypes of libio's codecvt functions.  */
+static enum __codecvt_result do_out (struct _IO_codecvt *codecvt,
+				     __c_mbstate_t *statep,
+				     const wchar_t *from_start,
+				     const wchar_t *from_end,
+				     const wchar_t **from_stop, char *to_start,
+				     char *to_end, char **to_stop);
+static enum __codecvt_result do_unshift (struct _IO_codecvt *codecvt,
+					 __c_mbstate_t *statep, char *to_start,
+					 char *to_end, char **to_stop);
+static enum __codecvt_result do_in (struct _IO_codecvt *codecvt,
+				    __c_mbstate_t *statep,
+				    const char *from_start,
+				    const char *from_end,
+				    const char **from_stop, wchar_t *to_start,
+				    wchar_t *to_end, wchar_t **to_stop);
+static int do_encoding (struct _IO_codecvt *codecvt);
+static int do_length (struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+		      const char *from_start,
+		      const char *from_end, _IO_size_t max);
+static int do_max_length (struct _IO_codecvt *codecvt);
+static int do_always_noconv (struct _IO_codecvt *codecvt);
+
+
+/* The functions used in `codecvt' for libio are always the same.  */
+struct _IO_codecvt __libio_codecvt =
+{
+  .__codecvt_destr = NULL,		/* Destructor, never used.  */
+  .__codecvt_do_out = do_out,
+  .__codecvt_do_unshift = do_unshift,
+  .__codecvt_do_in = do_in,
+  .__codecvt_do_encoding = do_encoding,
+  .__codecvt_do_always_noconv = do_always_noconv,
+  .__codecvt_do_length = do_length,
+  .__codecvt_do_max_length = do_max_length
+};
+
+
+#ifdef _LIBC
+static struct __gconv_trans_data libio_translit =
+{
+  .__trans_fct = __gconv_transliterate
+};
+#endif
+#endif /* defined(GLIBCPP_USE_WCHAR_T) */
+
+/* Return orientation of stream.  If mode is nonzero try to change
+   the orientation first.  */
+#undef _IO_fwide
+int
+_IO_fwide (fp, mode)
+     _IO_FILE *fp;
+     int mode;
+{
+  /* Normalize the value.  */
+  mode = mode < 0 ? -1 : (mode == 0 ? 0 : 1);
+
+  if (mode == 0 || fp->_mode != 0)
+    /* The caller simply wants to know about the current orientation
+       or the orientation already has been determined.  */
+    return fp->_mode;
+
+  /* Set the orientation appropriately.  */
+  if (mode > 0)
+    {
+#ifdef _GLIBCPP_USE_WCHAR_T
+      struct _IO_codecvt *cc = fp->_codecvt;
+
+      fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
+      fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_write_base;
+
+#ifdef _LIBC
+      /* Get the character conversion functions based on the currently
+	 selected locale for LC_CTYPE.  */
+      {
+	struct gconv_fcts fcts;
+
+	/* Clear the state.  We start all over again.  */
+	memset (&fp->_wide_data->_IO_state, '\0', sizeof (__c_mbstate_t));
+	memset (&fp->_wide_data->_IO_last_state, '\0', sizeof (__c_mbstate_t));
+
+	__wcsmbs_clone_conv (&fcts);
+
+	/* The functions are always the same.  */
+	*cc = __libio_codecvt;
+
+	cc->__cd_in.__cd.__nsteps = 1; /* Only one step allowed.  */
+	cc->__cd_in.__cd.__steps = fcts.towc;
+
+	cc->__cd_in.__cd.__data[0].__invocation_counter = 0;
+	cc->__cd_in.__cd.__data[0].__internal_use = 1;
+	cc->__cd_in.__cd.__data[0].__flags = __GCONV_IS_LAST;
+	cc->__cd_in.__cd.__data[0].__statep = &fp->_wide_data->_IO_state;
+
+	/* XXX For now no transliteration.  */
+	cc->__cd_in.__cd.__data[0].__trans = NULL;
+
+	cc->__cd_out.__cd.__nsteps = 1; /* Only one step allowed.  */
+	cc->__cd_out.__cd.__steps = fcts.tomb;
+
+	cc->__cd_out.__cd.__data[0].__invocation_counter = 0;
+	cc->__cd_out.__cd.__data[0].__internal_use = 1;
+	cc->__cd_out.__cd.__data[0].__flags = __GCONV_IS_LAST;
+	cc->__cd_out.__cd.__data[0].__statep = &fp->_wide_data->_IO_state;
+
+	/* And now the transliteration.  */
+	cc->__cd_out.__cd.__data[0].__trans = &libio_translit;
+      }
+#else
+# ifdef _GLIBCPP_USE_WCHAR_T
+      {
+	/* Determine internal and external character sets.
+	   XXX For now we make our life easy: we assume a fixed internal
+	   encoding (as most sane systems have; hi HP/UX!).  If somebody
+	   cares about systems which changing internal charsets they
+	   should come up with a solution for the determination of the
+	   currently used internal character set.  */
+#if 0
+	const char *internal_ccs = _G_INTERNAL_CCS;
+	const char *external_ccs = nl_langinfo(CODESET);
+
+	if (external_ccs == NULL)
+	  external_ccs = "ISO-8859-1";
+
+	cc->__cd_in = iconv_open (internal_ccs, external_ccs);
+	if (cc->__cd_in != (iconv_t) -1)
+	  cc->__cd_out = iconv_open (external_ccs, internal_ccs);
+#endif
+      }
+# else
+#  error "somehow determine this from LC_CTYPE"
+# endif
+#endif
+
+      /* From now on use the wide character callback functions.  */
+      ((struct _IO_FILE_plus *) fp)->vtable = fp->_wide_data->_wide_vtable;
+#else /* !defined(_GLIBCPP_USE_WCHAR_T) */
+      mode = fp->_mode;
+#endif /* !defined(_GLIBCPP_USE_WCHAR_T) */
+    }
+
+  /* Set the mode now.  */
+  fp->_mode = mode;
+
+  return mode;
+}
+
+#ifdef weak_alias
+weak_alias (_IO_fwide, fwide)
+#endif
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+
+static enum __codecvt_result
+do_out (struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+	const wchar_t *from_start, const wchar_t *from_end,
+	const wchar_t **from_stop, char *to_start, char *to_end,
+	char **to_stop)
+{
+  enum __codecvt_result result;
+
+#ifdef _LIBC
+  struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps;
+  int status;
+  size_t dummy;
+  const unsigned char *from_start_copy = (unsigned char *) from_start;
+
+  codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
+  codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+  codecvt->__cd_out.__cd.__data[0].__statep = statep;
+
+  status = DL_CALL_FCT (gs->__fct,
+			(gs, codecvt->__cd_out.__cd.__data, &from_start_copy,
+			 (const unsigned char *) from_end, NULL,
+			 &dummy, 0, 0));
+
+  *from_stop = (wchar_t *) from_start_copy;
+  *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+
+  switch (status)
+    {
+    case __GCONV_OK:
+    case __GCONV_EMPTY_INPUT:
+      result = __codecvt_ok;
+      break;
+
+    case __GCONV_FULL_OUTPUT:
+    case __GCONV_INCOMPLETE_INPUT:
+      result = __codecvt_partial;
+      break;
+
+    default:
+      result = __codecvt_error;
+      break;
+    }
+#else
+# ifdef _GLIBCPP_USE_WCHAR_T
+  size_t res;
+  const char *from_start_copy = (const char *) from_start;
+  size_t from_len = from_end - from_start;
+  char *to_start_copy = to_start;
+  size_t to_len = to_end - to_start;
+  res = iconv (codecvt->__cd_out, &from_start_copy, &from_len,
+	       &to_start_copy, &to_len);
+
+  if (res == 0 || from_len == 0)
+    result = __codecvt_ok;
+  else if (to_len < codecvt->__codecvt_do_max_length (codecvt))
+    result = __codecvt_partial;
+  else
+    result = __codecvt_error;
+
+# else
+  /* Decide what to do.  */
+  result = __codecvt_error;
+# endif
+#endif
+
+  return result;
+}
+
+
+static enum __codecvt_result
+do_unshift (struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+	    char *to_start, char *to_end, char **to_stop)
+{
+  enum __codecvt_result result;
+
+#ifdef _LIBC
+  struct __gconv_step *gs = codecvt->__cd_out.__cd.__steps;
+  int status;
+  size_t dummy;
+
+  codecvt->__cd_out.__cd.__data[0].__outbuf = to_start;
+  codecvt->__cd_out.__cd.__data[0].__outbufend = to_end;
+  codecvt->__cd_out.__cd.__data[0].__statep = statep;
+
+  status = DL_CALL_FCT (gs->__fct,
+			(gs, codecvt->__cd_out.__cd.__data, NULL, NULL,
+			 NULL, &dummy, 1, 0));
+
+  *to_stop = codecvt->__cd_out.__cd.__data[0].__outbuf;
+
+  switch (status)
+    {
+    case __GCONV_OK:
+    case __GCONV_EMPTY_INPUT:
+      result = __codecvt_ok;
+      break;
+
+    case __GCONV_FULL_OUTPUT:
+    case __GCONV_INCOMPLETE_INPUT:
+      result = __codecvt_partial;
+      break;
+
+    default:
+      result = __codecvt_error;
+      break;
+    }
+#else
+# ifdef _GLIBCPP_USE_WCHAR_T
+  size_t res;
+  char *to_start_copy = (char *) to_start;
+  size_t to_len = to_end - to_start;
+
+  res = iconv (codecvt->__cd_out, NULL, NULL, &to_start_copy, &to_len);
+
+  if (res == 0)
+    result = __codecvt_ok;
+  else if (to_len < codecvt->__codecvt_do_max_length (codecvt))
+    result = __codecvt_partial;
+  else
+    result = __codecvt_error;
+# else
+  /* Decide what to do.  */
+  result = __codecvt_error;
+# endif
+#endif
+
+  return result;
+}
+
+
+static enum __codecvt_result
+do_in (struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+       const char *from_start, const char *from_end, const char **from_stop,
+       wchar_t *to_start, wchar_t *to_end, wchar_t **to_stop)
+{
+  enum __codecvt_result result;
+
+#ifdef _LIBC
+  struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps;
+  int status;
+  size_t dummy;
+  const unsigned char *from_start_copy = (unsigned char *) from_start;
+
+  codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_start;
+  codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) to_end;
+  codecvt->__cd_in.__cd.__data[0].__statep = statep;
+
+  status = DL_CALL_FCT (gs->__fct,
+			(gs, codecvt->__cd_in.__cd.__data, &from_start_copy,
+			 from_end, NULL, &dummy, 0, 0));
+
+  *from_stop = from_start_copy;
+  *to_stop = (wchar_t *) codecvt->__cd_in.__cd.__data[0].__outbuf;
+
+  switch (status)
+    {
+    case __GCONV_OK:
+    case __GCONV_EMPTY_INPUT:
+      result = __codecvt_ok;
+      break;
+
+    case __GCONV_FULL_OUTPUT:
+    case __GCONV_INCOMPLETE_INPUT:
+      result = __codecvt_partial;
+      break;
+
+    default:
+      result = __codecvt_error;
+      break;
+    }
+#else
+# ifdef _GLIBCPP_USE_WCHAR_T
+  size_t res;
+  const char *from_start_copy = (const char *) from_start;
+  size_t from_len = from_end - from_start;
+  char *to_start_copy = (char *) from_start;
+  size_t to_len = to_end - to_start;
+
+  res = iconv (codecvt->__cd_in, &from_start_copy, &from_len,
+	       &to_start_copy, &to_len);
+
+  if (res == 0)
+    result = __codecvt_ok;
+  else if (to_len == 0)
+    result = __codecvt_partial;
+  else if (from_len < codecvt->__codecvt_do_max_length (codecvt))
+    result = __codecvt_partial;
+  else
+    result = __codecvt_error;
+# else
+  /* Decide what to do.  */
+  result = __codecvt_error;
+# endif
+#endif
+
+  return result;
+}
+
+
+static int
+do_encoding (struct _IO_codecvt *codecvt)
+{
+#ifdef _LIBC
+  /* See whether the encoding is stateful.  */
+  if (codecvt->__cd_in.__cd.__steps[0].__stateful)
+    return -1;
+  /* Fortunately not.  Now determine the input bytes for the conversion
+     necessary for each wide character.  */
+  if (codecvt->__cd_in.__cd.__steps[0].__min_needed_from
+      != codecvt->__cd_in.__cd.__steps[0].__max_needed_from)
+    /* Not a constant value.  */
+    return 0;
+
+  return codecvt->__cd_in.__cd.__steps[0].__min_needed_from;
+#else
+  /* Worst case scenario.  */
+  return -1;
+#endif
+}
+
+
+static int
+do_always_noconv (struct _IO_codecvt *codecvt)
+{
+  return 0;
+}
+
+
+static int
+do_length (struct _IO_codecvt *codecvt, __c_mbstate_t *statep,
+	   const char *from_start, const char *from_end, _IO_size_t max)
+{
+  int result;
+#ifdef _LIBC
+  const unsigned char *cp = (const unsigned char *) from_start;
+  wchar_t to_buf[max];
+  struct __gconv_step *gs = codecvt->__cd_in.__cd.__steps;
+  int status;
+  size_t dummy;
+
+  codecvt->__cd_in.__cd.__data[0].__outbuf = (char *) to_buf;
+  codecvt->__cd_in.__cd.__data[0].__outbufend = (char *) &to_buf[max];
+  codecvt->__cd_in.__cd.__data[0].__statep = statep;
+
+  status = DL_CALL_FCT (gs->__fct,
+			(gs, codecvt->__cd_in.__cd.__data, &cp, from_end,
+			 NULL, &dummy, 0, 0));
+
+  result = cp - (const unsigned char *) from_start;
+#else
+# ifdef _GLIBCPP_USE_WCHAR_T
+  const char *from_start_copy = (const char *) from_start;
+  size_t from_len = from_end - from_start;
+  wchar_t to_buf[max];
+  size_t res;
+  char *to_start = (char *) to_buf;
+
+  res = iconv (codecvt->__cd_in, &from_start_copy, &from_len,
+	       &to_start, &max);
+
+  result = from_start_copy - (char *) from_start;
+# else
+  /* Decide what to do.  */
+  result = 0;
+# endif
+#endif
+
+  return result;
+}
+
+
+static int
+do_max_length (struct _IO_codecvt *codecvt)
+{
+#ifdef _LIBC
+  return codecvt->__cd_in.__cd.__steps[0].__max_needed_from;
+#else
+  return MB_CUR_MAX;
+#endif
+}
+
+#endif /* defined(_GLIBCPP_USE_WCHAR_T) */
diff --git a/contrib/libstdc++/libio/iolibio.h b/contrib/libstdc++/libio/iolibio.h
new file mode 100644
index 0000000..61be4b73
--- /dev/null
+++ b/contrib/libstdc++/libio/iolibio.h
@@ -0,0 +1,82 @@
+#include "libio.h"
+
+/* These emulate stdio functionality, but with a different name
+   (_IO_ungetc instead of ungetc), and using _IO_FILE instead of FILE. */
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int _IO_fclose __P((_IO_FILE*));
+extern int _IO_new_fclose __P((_IO_FILE*));
+extern int _IO_old_fclose __P((_IO_FILE*));
+extern _IO_FILE *_IO_fdopen __P((int, const char*));
+extern _IO_FILE *_IO_old_fdopen __P((int, const char*));
+extern _IO_FILE *_IO_new_fdopen __P((int, const char*));
+extern int _IO_fflush __P((_IO_FILE*));
+extern int _IO_fgetpos __P((_IO_FILE*, _IO_fpos_t*));
+extern int _IO_fgetpos64 __P((_IO_FILE*, _IO_fpos64_t*));
+extern char* _IO_fgets __P((char*, int, _IO_FILE*));
+extern _IO_FILE *_IO_fopen __P((const char*, const char*));
+extern _IO_FILE *_IO_old_fopen __P((const char*, const char*));
+extern _IO_FILE *_IO_new_fopen __P((const char*, const char*));
+extern _IO_FILE *_IO_fopen64 __P((const char*, const char*));
+extern int _IO_fprintf __P((_IO_FILE*, const char*, ...));
+extern int _IO_fputs __P((const char*, _IO_FILE*));
+extern int _IO_fsetpos __P((_IO_FILE*, const _IO_fpos_t *));
+extern int _IO_fsetpos64 __P((_IO_FILE*, const _IO_fpos64_t *));
+extern long int _IO_ftell __P((_IO_FILE*));
+extern _IO_size_t _IO_fread __P((void*, _IO_size_t, _IO_size_t, _IO_FILE*));
+extern _IO_size_t _IO_fwrite __P((const void*,
+				      _IO_size_t, _IO_size_t, _IO_FILE*));
+extern char* _IO_gets __P((char*));
+extern void _IO_perror __P((const char*));
+extern int _IO_printf __P((const char*, ...));
+extern int _IO_puts __P((const char*));
+extern int _IO_scanf __P((const char*, ...));
+extern void _IO_setbuffer __P((_IO_FILE *, char*, _IO_size_t));
+extern int _IO_setvbuf __P((_IO_FILE*, char*, int, _IO_size_t));
+extern int _IO_sscanf __P((const char*, const char*, ...));
+extern int _IO_sprintf __P((char *, const char*, ...));
+extern int _IO_ungetc __P((int, _IO_FILE*));
+extern int _IO_vsscanf __P((const char *, const char *, _IO_va_list));
+extern int _IO_vsprintf __P((char*, const char*, _IO_va_list));
+extern int _IO_vswprintf __P((wchar_t*, _IO_size_t, const wchar_t*,
+			      _IO_va_list));
+
+struct obstack;
+extern int _IO_obstack_vprintf __P ((struct obstack *, const char *,
+				     _IO_va_list));
+extern int _IO_obstack_printf __P ((struct obstack *, const char *, ...));
+#ifndef _IO_pos_BAD
+#define _IO_pos_BAD ((_IO_off64_t)(-1))
+#endif
+#define _IO_clearerr(FP) ((FP)->_flags &= ~(_IO_ERR_SEEN|_IO_EOF_SEEN))
+#define _IO_fseek(__fp, __offset, __whence) \
+  (_IO_seekoff(__fp, __offset, __whence, _IOS_INPUT|_IOS_OUTPUT) == _IO_pos_BAD ? EOF : 0)
+#define _IO_rewind(FILE) (void)_IO_seekoff(FILE, 0, 0, _IOS_INPUT|_IOS_OUTPUT)
+#define _IO_vprintf(FORMAT, ARGS) _IO_vfprintf(_IO_stdout, FORMAT, ARGS)
+#define _IO_freopen(FILENAME, MODE, FP) \
+  (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 0))
+#define _IO_old_freopen(FILENAME, MODE, FP) \
+  (_IO_old_file_close_it (FP), _IO_old_file_fopen(FP, FILENAME, MODE))
+#define _IO_freopen64(FILENAME, MODE, FP) \
+  (_IO_file_close_it(FP), _IO_file_fopen(FP, FILENAME, MODE, 1))
+#define _IO_fileno(FP) ((FP)->_fileno)
+extern _IO_FILE* _IO_popen __P((const char*, const char*));
+extern _IO_FILE* _IO_new_popen __P((const char*, const char*));
+extern _IO_FILE* _IO_old_popen __P((const char*, const char*));
+extern int __new_pclose __P((_IO_FILE *));
+extern int __old_pclose __P((_IO_FILE *));
+#define _IO_pclose _IO_fclose
+#define _IO_setbuf(_FP, _BUF) _IO_setbuffer(_FP, _BUF, _IO_BUFSIZ)
+#define _IO_setlinebuf(_FP) _IO_setvbuf(_FP, NULL, 1, 0)
+
+_IO_FILE *__new_freopen __P ((const char *, const char *, _IO_FILE *));
+_IO_FILE *__old_freopen __P ((const char *, const char *, _IO_FILE *));
+
+#ifdef __cplusplus
+}
+#endif
+
+
diff --git a/contrib/libstdc++/libio/libio.h b/contrib/libstdc++/libio/libio.h
new file mode 100644
index 0000000..e2a2a15
--- /dev/null
+++ b/contrib/libstdc++/libio/libio.h
@@ -0,0 +1,511 @@
+/* Copyright (C) 1991,92,93,94,95,97,98,99,2000,2001 Free Software Foundation, Inc.
+   This file is part of the GNU IO Library.
+   Written by Per Bothner .
+
+   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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 _IO_STDIO_H
+#define _IO_STDIO_H
+
+#include <_G_config.h>
+/* ALL of these should be defined in _G_config.h */
+#define _IO_pos_t _G_fpos_t /* obsolete */
+#define _IO_fpos_t _G_fpos_t
+#define _IO_fpos64_t _G_fpos64_t
+#define _IO_size_t _G_size_t
+#define _IO_ssize_t _G_ssize_t
+#define _IO_off_t _G_off_t
+#define _IO_off64_t _G_off64_t
+#define _IO_pid_t _G_pid_t
+#define _IO_uid_t _G_uid_t
+#define _IO_iconv_t _G_iconv_t
+#define _IO_HAVE_SYS_WAIT _G_HAVE_SYS_WAIT
+#define _IO_HAVE_ST_BLKSIZE _G_HAVE_ST_BLKSIZE
+#define _IO_BUFSIZ _G_BUFSIZ
+#define _IO_va_list _G_va_list
+#define _IO_wint_t _G_wint_t
+
+#ifdef _G_NEED_STDARG_H
+/* This define avoids name pollution if we're using GNU stdarg.h */
+# define __need___va_list
+# include 
+# ifdef __GNUC_VA_LIST
+#  undef _IO_va_list
+#  define _IO_va_list __gnuc_va_list
+# endif /* __GNUC_VA_LIST */
+#endif
+
+#ifndef __THROW
+# ifdef __cplusplus
+#  define __THROW throw ()
+# else
+#  define __THROW
+# endif
+#endif /* not __THROW */
+
+#ifndef __P
+# define __P(p) p __THROW
+#endif /* not __P */
+
+#ifndef __PMT
+# define __PMT(p) p
+#endif /* not __PMT */
+
+/* For backward compatibility */
+#ifndef _PARAMS
+# define _PARAMS(protos) __P(protos)
+#endif /*!_PARAMS*/
+
+#ifndef __STDC__
+# ifndef const
+#  define const
+# endif
+#endif
+#define _IO_UNIFIED_JUMPTABLES 1
+#ifndef _G_HAVE_PRINTF_FP
+# define _IO_USE_DTOA 1
+#endif
+
+#ifndef EOF
+# define EOF (-1)
+#endif
+#ifndef NULL
+# if defined __GNUG__ && \
+    (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
+#  define NULL (__null)
+# else
+#  if !defined(__cplusplus)
+#   define NULL ((void*)0)
+#  else
+#   define NULL (0)
+#  endif
+# endif
+#endif
+
+#define _IOS_INPUT	1
+#define _IOS_OUTPUT	2
+#define _IOS_ATEND	4
+#define _IOS_APPEND	8
+#define _IOS_TRUNC	16
+#define _IOS_NOCREATE	32
+#define _IOS_NOREPLACE	64
+#define _IOS_BIN	128
+
+/* Magic numbers and bits for the _flags field.
+   The magic numbers use the high-order bits of _flags;
+   the remaining bits are available for variable flags.
+   Note: The magic numbers must all be negative if stdio
+   emulation is desired. */
+
+#define _IO_MAGIC 0xFBAD0000 /* Magic number */
+#define _OLD_STDIO_MAGIC 0xFABC0000 /* Emulate old stdio. */
+#define _IO_MAGIC_MASK 0xFFFF0000
+#define _IO_USER_BUF 1 /* User owns buffer; don't delete it on close. */
+#define _IO_UNBUFFERED 2
+#define _IO_NO_READS 4 /* Reading not allowed */
+#define _IO_NO_WRITES 8 /* Writing not allowd */
+#define _IO_EOF_SEEN 0x10
+#define _IO_ERR_SEEN 0x20
+#define _IO_DELETE_DONT_CLOSE 0x40 /* Don't call close(_fileno) on cleanup. */
+#define _IO_LINKED 0x80 /* Set if linked (using _chain) to streambuf::_list_all.*/
+#define _IO_IN_BACKUP 0x100
+#define _IO_LINE_BUF 0x200
+#define _IO_TIED_PUT_GET 0x400 /* Set if put and get pointer logicly tied. */
+#define _IO_CURRENTLY_PUTTING 0x800
+#define _IO_IS_APPENDING 0x1000
+#define _IO_IS_FILEBUF 0x2000
+#define _IO_BAD_SEEN 0x4000
+#define _IO_USER_LOCK 0x8000
+
+/* These are "formatting flags" matching the iostream fmtflags enum values. */
+#define _IO_SKIPWS 01
+#define _IO_LEFT 02
+#define _IO_RIGHT 04
+#define _IO_INTERNAL 010
+#define _IO_DEC 020
+#define _IO_OCT 040
+#define _IO_HEX 0100
+#define _IO_SHOWBASE 0200
+#define _IO_SHOWPOINT 0400
+#define _IO_UPPERCASE 01000
+#define _IO_SHOWPOS 02000
+#define _IO_SCIENTIFIC 04000
+#define _IO_FIXED 010000
+#define _IO_UNITBUF 020000
+#define _IO_STDIO 040000
+#define _IO_DONT_CLOSE 0100000
+#define _IO_BOOLALPHA 0200000
+
+
+struct _IO_jump_t;  struct _IO_FILE;
+
+/* Handle lock.  */
+#ifdef _IO_MTSAFE_IO
+# if defined __GLIBC__ && __GLIBC__ >= 2
+#  if __GLIBC_MINOR__ == 0
+#   include 
+#  else
+#   include 
+#  endif
+# else
+/*# include */
+# endif
+#else
+typedef void _IO_lock_t;
+#endif
+
+
+/* A streammarker remembers a position in a buffer. */
+
+struct _IO_marker {
+  struct _IO_marker *_next;
+  struct _IO_FILE *_sbuf;
+  /* If _pos >= 0
+ it points to _buf->Gbase()+_pos. FIXME comment */
+  /* if _pos < 0, it points to _buf->eBptr()+_pos. FIXME comment */
+  int _pos;
+#if 0
+    void set_streampos(streampos sp) { _spos = sp; }
+    void set_offset(int offset) { _pos = offset; _spos = (streampos)(-2); }
+  public:
+    streammarker(streambuf *sb);
+    ~streammarker();
+    int saving() { return  _spos == -2; }
+    int delta(streammarker&);
+    int delta();
+#endif
+};
+
+/* This is the structure from the libstdc++ codecvt class.  */
+enum __codecvt_result
+{
+  __codecvt_ok,
+  __codecvt_partial,
+  __codecvt_error,
+  __codecvt_noconv
+};
+
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+/* The order of the elements in the following struct must match the order
+   of the virtual functions in the libstdc++ codecvt class.  */
+struct _IO_codecvt
+{
+  void (*__codecvt_destr) (struct _IO_codecvt *);
+  enum __codecvt_result (*__codecvt_do_out) (struct _IO_codecvt *,
+					     __c_mbstate_t *,
+					     const wchar_t *,
+					     const wchar_t *,
+					     const wchar_t **, char *,
+					     char *, char **);
+  enum __codecvt_result (*__codecvt_do_unshift) (struct _IO_codecvt *,
+						 __c_mbstate_t *, char *,
+						 char *, char **);
+  enum __codecvt_result (*__codecvt_do_in) (struct _IO_codecvt *,
+					    __c_mbstate_t *,
+					    const char *, const char *,
+					    const char **, wchar_t *,
+					    wchar_t *, wchar_t **);
+  int (*__codecvt_do_encoding) (struct _IO_codecvt *);
+  int (*__codecvt_do_always_noconv) (struct _IO_codecvt *);
+  int (*__codecvt_do_length) (struct _IO_codecvt *, __c_mbstate_t *,
+			      const char *, const char *, _IO_size_t);
+  int (*__codecvt_do_max_length) (struct _IO_codecvt *);
+
+  _IO_iconv_t __cd_in;
+  _IO_iconv_t __cd_out;
+};
+
+/* Extra data for wide character streams.  */
+struct _IO_wide_data
+{
+  wchar_t *_IO_read_ptr;	/* Current read pointer */
+  wchar_t *_IO_read_end;	/* End of get area. */
+  wchar_t *_IO_read_base;	/* Start of putback+get area. */
+  wchar_t *_IO_write_base;	/* Start of put area. */
+  wchar_t *_IO_write_ptr;	/* Current put pointer. */
+  wchar_t *_IO_write_end;	/* End of put area. */
+  wchar_t *_IO_buf_base;	/* Start of reserve area. */
+  wchar_t *_IO_buf_end;		/* End of reserve area. */
+  /* The following fields are used to support backing up and undo. */
+  wchar_t *_IO_save_base;	/* Pointer to start of non-current get area. */
+  wchar_t *_IO_backup_base;	/* Pointer to first valid character of
+				   backup area */
+  wchar_t *_IO_save_end;	/* Pointer to end of non-current get area. */
+
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  __c_mbstate_t _IO_state;
+  __c_mbstate_t _IO_last_state;
+#endif
+  struct _IO_codecvt _codecvt;
+
+  wchar_t _shortbuf[1];
+
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  struct _IO_jump_t *_wide_vtable;
+#endif
+};
+#else /* !(defined _LIBC || defined _GLIBCPP_USE_WCHAR_T) */
+/* Because _IO_no_init unconditionally takes a `_IO_wide_data*' as its
+   last parameter we must still define this type.  We intentionally
+   leave it incomplete to prevent any use of this type when we are not
+   supporting wide characters.  */
+struct _IO_wide_data;
+#endif /* !(defined _LIBC || defined _GLIBCPP_USE_WCHAR_T) */
+
+struct _IO_FILE {
+  int _flags;		/* High-order word is _IO_MAGIC; rest is flags. */
+#define _IO_file_flags _flags
+
+  /* The following pointers correspond to the C++ streambuf protocol. */
+  /* Note:  Tk uses the _IO_read_ptr and _IO_read_end fields directly. */
+  char* _IO_read_ptr;	/* Current read pointer */
+  char* _IO_read_end;	/* End of get area. */
+  char* _IO_read_base;	/* Start of putback+get area. */
+  char* _IO_write_base;	/* Start of put area. */
+  char* _IO_write_ptr;	/* Current put pointer. */
+  char* _IO_write_end;	/* End of put area. */
+  char* _IO_buf_base;	/* Start of reserve area. */
+  char* _IO_buf_end;	/* End of reserve area. */
+  /* The following fields are used to support backing up and undo. */
+  char *_IO_save_base; /* Pointer to start of non-current get area. */
+  char *_IO_backup_base;  /* Pointer to first valid character of backup area */
+  char *_IO_save_end; /* Pointer to end of non-current get area. */
+
+  struct _IO_marker *_markers;
+
+  struct _IO_FILE *_chain;
+
+  int _fileno;
+  int _blksize;
+  _IO_off_t _old_offset; /* This used to be _offset but it's too small.  */
+
+#define __HAVE_COLUMN /* temporary */
+  /* 1+column number of pbase(); 0 is unknown. */
+  unsigned short _cur_column;
+  signed char _vtable_offset;
+  char _shortbuf[1];
+
+  /*  char* _save_gptr;  char* _save_egptr; */
+
+  _IO_lock_t *_lock;
+#ifdef _IO_USE_OLD_IO_FILE
+};
+
+struct _IO_FILE_complete
+{
+  struct _IO_FILE _file;
+#endif
+#if defined _G_IO_IO_FILE_VERSION && _G_IO_IO_FILE_VERSION == 0x20001
+  _IO_off64_t _offset;
+# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+  /* Wide character stream stuff.  */
+  struct _IO_codecvt *_codecvt;
+  struct _IO_wide_data *_wide_data;
+# else
+  void *__pad1;
+  void *__pad2;
+# endif
+  int _mode;
+  /* Make sure we don't get into trouble again.  */
+  char _unused2[15 * sizeof (int) - 2 * sizeof (void *)];
+#endif
+};
+
+#ifndef __cplusplus
+typedef struct _IO_FILE _IO_FILE;
+#endif
+
+struct _IO_FILE_plus;
+
+extern struct _IO_FILE_plus _IO_2_1_stdin_;
+extern struct _IO_FILE_plus _IO_2_1_stdout_;
+extern struct _IO_FILE_plus _IO_2_1_stderr_;
+#ifndef _LIBC
+#define _IO_stdin ((_IO_FILE*)(&_IO_2_1_stdin_))
+#define _IO_stdout ((_IO_FILE*)(&_IO_2_1_stdout_))
+#define _IO_stderr ((_IO_FILE*)(&_IO_2_1_stderr_))
+#else
+extern _IO_FILE *_IO_stdin;
+extern _IO_FILE *_IO_stdout;
+extern _IO_FILE *_IO_stderr;
+#endif
+
+
+/* Functions to do I/O and file management for a stream.  */
+
+/* Read NBYTES bytes from COOKIE into a buffer pointed to by BUF.
+   Return number of bytes read.  */
+typedef __ssize_t __io_read_fn (void *__cookie, char *__buf, size_t __nbytes);
+
+/* Write N bytes pointed to by BUF to COOKIE.  Write all N bytes
+   unless there is an error.  Return number of bytes written, or -1 if
+   there is an error without writing anything.  If the file has been
+   opened for append (__mode.__append set), then set the file pointer
+   to the end of the file and then do the write; if not, just write at
+   the current file pointer.  */
+typedef __ssize_t __io_write_fn (void *__cookie, __const char *__buf,
+				 size_t __n);
+
+/* Move COOKIE's file position to *POS bytes from the
+   beginning of the file (if W is SEEK_SET),
+   the current position (if W is SEEK_CUR),
+   or the end of the file (if W is SEEK_END).
+   Set *POS to the new file position.
+   Returns zero if successful, nonzero if not.  */
+typedef int __io_seek_fn (void *__cookie, _IO_off64_t *__pos, int __w);
+
+/* Close COOKIE.  */
+typedef int __io_close_fn (void *__cookie);
+
+
+#ifdef _GNU_SOURCE
+/* User-visible names for the above.  */
+typedef __io_read_fn cookie_read_function_t;
+typedef __io_write_fn cookie_write_function_t;
+typedef __io_seek_fn cookie_seek_function_t;
+typedef __io_close_fn cookie_close_function_t;
+
+/* The structure with the cookie function pointers.  */
+typedef struct
+{
+  __io_read_fn *read;		/* Read bytes.  */
+  __io_write_fn *write;		/* Write bytes.  */
+  __io_seek_fn *seek;		/* Seek/tell file position.  */
+  __io_close_fn *close;		/* Close file.  */
+} _IO_cookie_io_functions_t;
+typedef _IO_cookie_io_functions_t cookie_io_functions_t;
+
+struct _IO_cookie_file;
+
+/* Initialize one of those.  */
+extern void _IO_cookie_init (struct _IO_cookie_file *__cfile, int __read_write,
+			     void *__cookie, _IO_cookie_io_functions_t __fns);
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int __underflow (_IO_FILE *) __THROW;
+extern int __uflow (_IO_FILE *) __THROW;
+extern int __overflow (_IO_FILE *, int) __THROW;
+extern _IO_wint_t __wunderflow (_IO_FILE *) __THROW;
+extern _IO_wint_t __wuflow (_IO_FILE *) __THROW;
+extern _IO_wint_t __woverflow (_IO_FILE *, _IO_wint_t) __THROW;
+
+#define _IO_getc_unlocked(_fp) \
+       ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end ? __uflow (_fp) \
+	: *(unsigned char *) (_fp)->_IO_read_ptr++)
+#define _IO_peekc_unlocked(_fp) \
+       ((_fp)->_IO_read_ptr >= (_fp)->_IO_read_end \
+	  && __underflow (_fp) == EOF ? EOF \
+	: *(unsigned char *) (_fp)->_IO_read_ptr)
+#define _IO_putc_unlocked(_ch, _fp) \
+   (((_fp)->_IO_write_ptr >= (_fp)->_IO_write_end) \
+    ? __overflow (_fp, (unsigned char) (_ch)) \
+    : (unsigned char) (*(_fp)->_IO_write_ptr++ = (_ch)))
+
+#define _IO_getwc_unlocked(_fp) \
+  ((_fp)->_wide_data->_IO_read_ptr >= (_fp)->_wide_data->_IO_read_end \
+   ? __wuflow (_fp) : (_IO_wint_t) *(_fp)->_wide_data->_IO_read_ptr++)
+#define _IO_putwc_unlocked(_wch, _fp) \
+  ((_fp)->_wide_data->_IO_write_ptr >= (_fp)->_wide_data->_IO_write_end \
+   ? __woverflow (_fp, _wch) \
+   : (_IO_wint_t) (*(_fp)->_wide_data->_IO_write_ptr++ = (_wch)))
+
+#define _IO_feof_unlocked(__fp) (((__fp)->_flags & _IO_EOF_SEEN) != 0)
+#define _IO_ferror_unlocked(__fp) (((__fp)->_flags & _IO_ERR_SEEN) != 0)
+
+extern int _IO_getc (_IO_FILE *__fp) __THROW;
+extern int _IO_putc (int __c, _IO_FILE *__fp) __THROW;
+extern int _IO_feof (_IO_FILE *__fp) __THROW;
+extern int _IO_ferror (_IO_FILE *__fp) __THROW;
+
+extern int _IO_peekc_locked (_IO_FILE *__fp) __THROW;
+
+/* This one is for Emacs. */
+#define _IO_PENDING_OUTPUT_COUNT(_fp)	\
+	((_fp)->_IO_write_ptr - (_fp)->_IO_write_base)
+
+extern void _IO_flockfile (_IO_FILE *) __THROW;
+extern void _IO_funlockfile (_IO_FILE *) __THROW;
+extern int _IO_ftrylockfile (_IO_FILE *) __THROW;
+
+#ifdef _IO_MTSAFE_IO
+# define _IO_peekc(_fp) _IO_peekc_locked (_fp)
+#else
+# define _IO_peekc(_fp) _IO_peekc_unlocked (_fp)
+# define _IO_flockfile(_fp) /**/
+# define _IO_funlockfile(_fp) /**/
+# define _IO_ftrylockfile(_fp) /**/
+# define _IO_cleanup_region_start(_fct, _fp) /**/
+# define _IO_cleanup_region_end(_Doit) /**/
+#endif /* !_IO_MTSAFE_IO */
+
+extern int _IO_vfscanf (_IO_FILE * __restrict, const char * __restrict,
+			_IO_va_list, int *__restrict) __THROW;
+extern int _IO_vfprintf (_IO_FILE *__restrict, const char *__restrict,
+			 _IO_va_list) __THROW;
+extern _IO_ssize_t _IO_padn (_IO_FILE *, int, _IO_ssize_t) __THROW;
+extern _IO_size_t _IO_sgetn (_IO_FILE *, void *, _IO_size_t) __THROW;
+
+extern _IO_off64_t _IO_seekoff (_IO_FILE *, _IO_off64_t, int, int) __THROW;
+extern _IO_off64_t _IO_seekpos (_IO_FILE *, _IO_off64_t, int) __THROW;
+
+extern void _IO_free_backup_area (_IO_FILE *) __THROW;
+
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+extern _IO_wint_t _IO_getwc (_IO_FILE *__fp) __THROW;
+extern _IO_wint_t _IO_putwc (wchar_t __wc, _IO_FILE *__fp) __THROW;
+extern int _IO_fwide (_IO_FILE *__fp, int __mode) __THROW;
+# if __GNUC__ >= 2
+/* A special optimized version of the function above.  It optimizes the
+   case of initializing an unoriented byte stream.  */
+#  define _IO_fwide(__fp, __mode) \
+  ({ int __result = (__mode);						      \
+     if (__result < 0)							      \
+       {								      \
+	 if ((__fp)->_mode == 0)					      \
+	   /* We know that all we have to do is to set the flag.  */	      \
+	   (__fp)->_mode = -1;						      \
+	 __result = (__fp)->_mode;					      \
+       }								      \
+     else								      \
+       __result = _IO_fwide (__fp, __result);				      \
+     __result; })
+# endif
+
+extern int _IO_vfwscanf (_IO_FILE * __restrict, const wchar_t * __restrict,
+			 _IO_va_list, int *__restrict) __THROW;
+extern int _IO_vfwprintf (_IO_FILE *__restrict, const wchar_t *__restrict,
+			  _IO_va_list) __THROW;
+extern _IO_ssize_t _IO_wpadn (_IO_FILE *, wint_t, _IO_ssize_t) __THROW;
+extern void _IO_free_wbackup_area (_IO_FILE *) __THROW;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _IO_STDIO_H */
diff --git a/contrib/libstdc++/libio/libioP.h b/contrib/libstdc++/libio/libioP.h
new file mode 100644
index 0000000..4aecf4e
--- /dev/null
+++ b/contrib/libstdc++/libio/libioP.h
@@ -0,0 +1,821 @@
+/* Copyright (C) 1993, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 
+
+#ifndef __set_errno
+# define __set_errno(Val) errno = (Val)
+#endif
+#if defined __GLIBC__ && __GLIBC__ >= 2
+# include 
+#else
+/*# include */
+#endif
+
+#include "iolibio.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define _IO_seek_set 0
+#define _IO_seek_cur 1
+#define _IO_seek_end 2
+
+/* THE JUMPTABLE FUNCTIONS.
+
+ * The _IO_FILE type is used to implement the FILE type in GNU libc,
+ * as well as the streambuf class in GNU iostreams for C++.
+ * These are all the same, just used differently.
+ * An _IO_FILE (or FILE) object is allows followed by a pointer to
+ * a jump table (of pointers to functions).  The pointer is accessed
+ * with the _IO_JUMPS macro.  The jump table has a eccentric format,
+ * so as to be compatible with the layout of a C++ virtual function table.
+ * (as implemented by g++).  When a pointer to a streambuf object is
+ * coerced to an (_IO_FILE*), then _IO_JUMPS on the result just
+ * happens to point to the virtual function table of the streambuf.
+ * Thus the _IO_JUMPS function table used for C stdio/libio does
+ * double duty as the virtual function table for C++ streambuf.
+ *
+ * The entries in the _IO_JUMPS function table (and hence also the
+ * virtual functions of a streambuf) are described below.
+ * The first parameter of each function entry is the _IO_FILE/streambuf
+ * object being acted on (i.e. the 'this' parameter).
+ */
+
+#if (!defined _IO_USE_OLD_IO_FILE \
+     && (!defined _G_IO_NO_BACKWARD_COMPAT || _G_IO_NO_BACKWARD_COMPAT == 0))
+# define _IO_JUMPS_OFFSET 1
+#endif
+
+#define _IO_JUMPS(THIS) (THIS)->vtable
+#define _IO_WIDE_JUMPS(THIS) ((struct _IO_FILE *) (THIS))->_wide_data->_wide_vtable
+#define _IO_CHECK_WIDE(THIS) (((struct _IO_FILE *) (THIS))->_wide_data != NULL)
+
+#if _IO_JUMPS_OFFSET
+# define _IO_JUMPS_FUNC(THIS) \
+ (*(struct _IO_jump_t **) ((void *) &_IO_JUMPS ((struct _IO_FILE_plus *) (THIS)) \
+			   + (THIS)->_vtable_offset))
+#else
+# define _IO_JUMPS_FUNC(THIS) _IO_JUMPS ((struct _IO_FILE_plus *) (THIS))
+#endif
+#define _IO_WIDE_JUMPS_FUNC(THIS) _IO_WIDE_JUMPS(THIS)
+#if _G_USING_THUNKS
+# define JUMP_FIELD(TYPE, NAME) TYPE NAME
+# define JUMP0(FUNC, THIS) _IO_JUMPS_FUNC(THIS)->FUNC (THIS)
+# define JUMP1(FUNC, THIS, X1) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1)
+# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1, X2)
+# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS_FUNC(THIS)->FUNC (THIS, X1,X2, X3)
+# define JUMP_INIT(NAME, VALUE) VALUE
+# define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0), JUMP_INIT (dummy2, 0)
+
+# define WJUMP0(FUNC, THIS) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS)
+# define WJUMP1(FUNC, THIS, X1) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1)
+# define WJUMP2(FUNC, THIS, X1, X2) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1, X2)
+# define WJUMP3(FUNC, THIS, X1,X2,X3) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC (THIS, X1,X2, X3)
+#else
+/* These macros will change when we re-implement vtables to use "thunks"! */
+# define JUMP_FIELD(TYPE, NAME) struct { short delta1, delta2; TYPE pfn; } NAME
+# define JUMP0(FUNC, THIS) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS)
+# define JUMP1(FUNC, THIS, X1) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1)
+# define JUMP2(FUNC, THIS, X1, X2) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1, X2)
+# define JUMP3(FUNC, THIS, X1,X2,X3) _IO_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1,X2,X3)
+# define JUMP_INIT(NAME, VALUE) {0, 0, VALUE}
+# define JUMP_INIT_DUMMY JUMP_INIT(dummy, 0)
+
+# define WJUMP0(FUNC, THIS) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS)
+# define WJUMP1(FUNC, THIS, X1) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1)
+# define WJUMP2(FUNC, THIS, X1, X2) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1, X2)
+# define WJUMP3(FUNC, THIS, X1,X2,X3) _IO_WIDE_JUMPS_FUNC(THIS)->FUNC.pfn (THIS, X1,X2,X3)
+#endif
+
+/* The 'finish' function does any final cleaning up of an _IO_FILE object.
+   It does not delete (free) it, but does everything else to finalize it.
+   It matches the streambuf::~streambuf virtual destructor.  */
+typedef void (*_IO_finish_t) __PMT ((_IO_FILE *, int)); /* finalize */
+#define _IO_FINISH(FP) JUMP1 (__finish, FP, 0)
+#define _IO_WFINISH(FP) WJUMP1 (__finish, FP, 0)
+
+/* The 'overflow' hook flushes the buffer.
+   The second argument is a character, or EOF.
+   It matches the streambuf::overflow virtual function. */
+typedef int (*_IO_overflow_t) __PMT ((_IO_FILE *, int));
+#define _IO_OVERFLOW(FP, CH) JUMP1 (__overflow, FP, CH)
+#define _IO_WOVERFLOW(FP, CH) WJUMP1 (__overflow, FP, CH)
+
+/* The 'underflow' hook tries to fills the get buffer.
+   It returns the next character (as an unsigned char) or EOF.  The next
+   character remains in the get buffer, and the get position is not changed.
+   It matches the streambuf::underflow virtual function. */
+typedef int (*_IO_underflow_t) __PMT ((_IO_FILE *));
+#define _IO_UNDERFLOW(FP) JUMP0 (__underflow, FP)
+#define _IO_WUNDERFLOW(FP) WJUMP0 (__underflow, FP)
+
+/* The 'uflow' hook returns the next character in the input stream
+   (cast to unsigned char), and increments the read position;
+   EOF is returned on failure.
+   It matches the streambuf::uflow virtual function, which is not in the
+   cfront implementation, but was added to C++ by the ANSI/ISO committee. */
+#define _IO_UFLOW(FP) JUMP0 (__uflow, FP)
+#define _IO_WUFLOW(FP) WJUMP0 (__uflow, FP)
+
+/* The 'pbackfail' hook handles backing up.
+   It matches the streambuf::pbackfail virtual function. */
+typedef int (*_IO_pbackfail_t) __PMT ((_IO_FILE *, int));
+#define _IO_PBACKFAIL(FP, CH) JUMP1 (__pbackfail, FP, CH)
+#define _IO_WPBACKFAIL(FP, CH) WJUMP1 (__pbackfail, FP, CH)
+
+/* The 'xsputn' hook writes upto N characters from buffer DATA.
+   Returns the number of character actually written.
+   It matches the streambuf::xsputn virtual function. */
+typedef _IO_size_t (*_IO_xsputn_t) __PMT ((_IO_FILE *FP, const void *DATA,
+					   _IO_size_t N));
+#define _IO_XSPUTN(FP, DATA, N) JUMP2 (__xsputn, FP, DATA, N)
+#define _IO_WXSPUTN(FP, DATA, N) WJUMP2 (__xsputn, FP, DATA, N)
+
+/* The 'xsgetn' hook reads upto N characters into buffer DATA.
+   Returns the number of character actually read.
+   It matches the streambuf::xsgetn virtual function. */
+typedef _IO_size_t (*_IO_xsgetn_t) __PMT ((_IO_FILE *FP, void *DATA,
+					   _IO_size_t N));
+#define _IO_XSGETN(FP, DATA, N) JUMP2 (__xsgetn, FP, DATA, N)
+#define _IO_WXSGETN(FP, DATA, N) WJUMP2 (__xsgetn, FP, DATA, N)
+
+/* The 'seekoff' hook moves the stream position to a new position
+   relative to the start of the file (if DIR==0), the current position
+   (MODE==1), or the end of the file (MODE==2).
+   It matches the streambuf::seekoff virtual function.
+   It is also used for the ANSI fseek function. */
+typedef _IO_off64_t (*_IO_seekoff_t) __PMT ((_IO_FILE *FP, _IO_off64_t OFF,
+					     int DIR, int MODE));
+#define _IO_SEEKOFF(FP, OFF, DIR, MODE) JUMP3 (__seekoff, FP, OFF, DIR, MODE)
+#define _IO_WSEEKOFF(FP, OFF, DIR, MODE) WJUMP3 (__seekoff, FP, OFF, DIR, MODE)
+
+/* The 'seekpos' hook also moves the stream position,
+   but to an absolute position given by a fpos64_t (seekpos).
+   It matches the streambuf::seekpos virtual function.
+   It is also used for the ANSI fgetpos and fsetpos functions.  */
+/* The _IO_seek_cur and _IO_seek_end options are not allowed. */
+typedef _IO_off64_t (*_IO_seekpos_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
+#define _IO_SEEKPOS(FP, POS, FLAGS) JUMP2 (__seekpos, FP, POS, FLAGS)
+#define _IO_WSEEKPOS(FP, POS, FLAGS) WJUMP2 (__seekpos, FP, POS, FLAGS)
+
+/* The 'setbuf' hook gives a buffer to the file.
+   It matches the streambuf::setbuf virtual function. */
+typedef _IO_FILE* (*_IO_setbuf_t) __PMT ((_IO_FILE *, char *, _IO_ssize_t));
+#define _IO_SETBUF(FP, BUFFER, LENGTH) JUMP2 (__setbuf, FP, BUFFER, LENGTH)
+#define _IO_WSETBUF(FP, BUFFER, LENGTH) WJUMP2 (__setbuf, FP, BUFFER, LENGTH)
+
+/* The 'sync' hook attempts to synchronize the internal data structures
+   of the file with the external state.
+   It matches the streambuf::sync virtual function. */
+typedef int (*_IO_sync_t) __PMT ((_IO_FILE *));
+#define _IO_SYNC(FP) JUMP0 (__sync, FP)
+#define _IO_WSYNC(FP) WJUMP0 (__sync, FP)
+
+/* The 'doallocate' hook is used to tell the file to allocate a buffer.
+   It matches the streambuf::doallocate virtual function, which is not
+   in the ANSI/ISO C++ standard, but is part traditional implementations. */
+typedef int (*_IO_doallocate_t) __PMT ((_IO_FILE *));
+#define _IO_DOALLOCATE(FP) JUMP0 (__doallocate, FP)
+#define _IO_WDOALLOCATE(FP) WJUMP0 (__doallocate, FP)
+
+/* The following four hooks (sysread, syswrite, sysclose, sysseek, and
+   sysstat) are low-level hooks specific to this implementation.
+   There is no correspondence in the ANSI/ISO C++ standard library.
+   The hooks basically correspond to the Unix system functions
+   (read, write, close, lseek, and stat) except that a _IO_FILE*
+   parameter is used instead of a integer file descriptor;  the default
+   implementation used for normal files just calls those functions.
+   The advantage of overriding these functions instead of the higher-level
+   ones (underflow, overflow etc) is that you can leave all the buffering
+   higher-level functions.  */
+
+/* The 'sysread' hook is used to read data from the external file into
+   an existing buffer.  It generalizes the Unix read(2) function.
+   It matches the streambuf::sys_read virtual function, which is
+   specific to this implementation. */
+typedef _IO_ssize_t (*_IO_read_t) __PMT ((_IO_FILE *, void *, _IO_ssize_t));
+#define _IO_SYSREAD(FP, DATA, LEN) JUMP2 (__read, FP, DATA, LEN)
+#define _IO_WSYSREAD(FP, DATA, LEN) WJUMP2 (__read, FP, DATA, LEN)
+
+/* The 'syswrite' hook is used to write data from an existing buffer
+   to an external file.  It generalizes the Unix write(2) function.
+   It matches the streambuf::sys_write virtual function, which is
+   specific to this implementation. */
+typedef _IO_ssize_t (*_IO_write_t) __PMT ((_IO_FILE *, const void *,
+					   _IO_ssize_t));
+#define _IO_SYSWRITE(FP, DATA, LEN) JUMP2 (__write, FP, DATA, LEN)
+#define _IO_WSYSWRITE(FP, DATA, LEN) WJUMP2 (__write, FP, DATA, LEN)
+
+/* The 'sysseek' hook is used to re-position an external file.
+   It generalizes the Unix lseek(2) function.
+   It matches the streambuf::sys_seek virtual function, which is
+   specific to this implementation. */
+typedef _IO_off64_t (*_IO_seek_t) __PMT ((_IO_FILE *, _IO_off64_t, int));
+#define _IO_SYSSEEK(FP, OFFSET, MODE) JUMP2 (__seek, FP, OFFSET, MODE)
+#define _IO_WSYSSEEK(FP, OFFSET, MODE) WJUMP2 (__seek, FP, OFFSET, MODE)
+
+/* The 'sysclose' hook is used to finalize (close, finish up) an
+   external file.  It generalizes the Unix close(2) function.
+   It matches the streambuf::sys_close virtual function, which is
+   specific to this implementation. */
+typedef int (*_IO_close_t) __PMT ((_IO_FILE *)); /* finalize */
+#define _IO_SYSCLOSE(FP) JUMP0 (__close, FP)
+#define _IO_WSYSCLOSE(FP) WJUMP0 (__close, FP)
+
+/* The 'sysstat' hook is used to get information about an external file
+   into a struct stat buffer.  It generalizes the Unix fstat(2) call.
+   It matches the streambuf::sys_stat virtual function, which is
+   specific to this implementation. */
+typedef int (*_IO_stat_t) __PMT ((_IO_FILE *, void *));
+#define _IO_SYSSTAT(FP, BUF) JUMP1 (__stat, FP, BUF)
+#define _IO_WSYSSTAT(FP, BUF) WJUMP1 (__stat, FP, BUF)
+
+/* The 'showmany' hook can be used to get an image how much input is
+   available.  In many cases the answer will be 0 which means unknown
+   but some cases one can provide real information.  */
+typedef int (*_IO_showmanyc_t) __PMT ((_IO_FILE *));
+#define _IO_SHOWMANYC(FP) JUMP0 (__showmanyc, FP)
+#define _IO_WSHOWMANYC(FP) WJUMP0 (__showmanyc, FP)
+
+/* The 'imbue' hook is used to get information about the currently
+   installed locales.  */
+typedef void (*_IO_imbue_t) __PMT ((_IO_FILE *, void *));
+#define _IO_IMBUE(FP, LOCALE) JUMP1 (__imbue, FP, LOCALE)
+#define _IO_WIMBUE(FP, LOCALE) WJUMP1 (__imbue, FP, LOCALE)
+
+
+#define _IO_CHAR_TYPE char /* unsigned char ? */
+#define _IO_INT_TYPE int
+
+struct _IO_jump_t
+{
+    JUMP_FIELD(_G_size_t, __dummy);
+#if _G_USING_THUNKS
+    JUMP_FIELD(_G_size_t, __dummy2);
+#endif
+    JUMP_FIELD(_IO_finish_t, __finish);
+    JUMP_FIELD(_IO_overflow_t, __overflow);
+    JUMP_FIELD(_IO_underflow_t, __underflow);
+    JUMP_FIELD(_IO_underflow_t, __uflow);
+    JUMP_FIELD(_IO_pbackfail_t, __pbackfail);
+    /* showmany */
+    JUMP_FIELD(_IO_xsputn_t, __xsputn);
+    JUMP_FIELD(_IO_xsgetn_t, __xsgetn);
+    JUMP_FIELD(_IO_seekoff_t, __seekoff);
+    JUMP_FIELD(_IO_seekpos_t, __seekpos);
+    JUMP_FIELD(_IO_setbuf_t, __setbuf);
+    JUMP_FIELD(_IO_sync_t, __sync);
+    JUMP_FIELD(_IO_doallocate_t, __doallocate);
+    JUMP_FIELD(_IO_read_t, __read);
+    JUMP_FIELD(_IO_write_t, __write);
+    JUMP_FIELD(_IO_seek_t, __seek);
+    JUMP_FIELD(_IO_close_t, __close);
+    JUMP_FIELD(_IO_stat_t, __stat);
+    JUMP_FIELD(_IO_showmanyc_t, __showmanyc);
+    JUMP_FIELD(_IO_imbue_t, __imbue);
+#if 0
+    get_column;
+    set_column;
+#endif
+};
+
+/* We always allocate an extra word following an _IO_FILE.
+   This contains a pointer to the function jump table used.
+   This is for compatibility with C++ streambuf; the word can
+   be used to smash to a pointer to a virtual function table. */
+
+struct _IO_FILE_plus
+{
+  _IO_FILE file;
+  const struct _IO_jump_t *vtable;
+};
+
+/* Special file type for fopencookie function.  */
+struct _IO_cookie_file
+{
+  struct _IO_FILE_plus __fp;
+  void *__cookie;
+  _IO_cookie_io_functions_t __io_functions;
+};
+
+/* Iterator type for walking global linked list of _IO_FILE objects. */
+
+typedef struct _IO_FILE *_IO_ITER;
+
+/* Generic functions */
+
+extern void _IO_switch_to_main_get_area __P ((_IO_FILE *));
+extern void _IO_switch_to_backup_area __P ((_IO_FILE *));
+extern int _IO_switch_to_get_mode __P ((_IO_FILE *));
+extern void _IO_init __P ((_IO_FILE *, int));
+extern int _IO_sputbackc __P ((_IO_FILE *, int));
+extern int _IO_sungetc __P ((_IO_FILE *));
+extern void _IO_un_link __P ((struct _IO_FILE_plus *));
+extern void _IO_link_in __P ((struct _IO_FILE_plus *));
+extern void _IO_doallocbuf __P ((_IO_FILE *));
+extern void _IO_unsave_markers __P ((_IO_FILE *));
+extern void _IO_setb __P ((_IO_FILE *, char *, char *, int));
+extern unsigned _IO_adjust_column __P ((unsigned, const char *, int));
+#define _IO_sputn(__fp, __s, __n) _IO_XSPUTN (__fp, __s, __n)
+
+extern void _IO_switch_to_main_wget_area __P ((_IO_FILE *));
+extern void _IO_switch_to_wbackup_area __P ((_IO_FILE *));
+extern int _IO_switch_to_wget_mode __P ((_IO_FILE *));
+extern void _IO_wsetb __P ((_IO_FILE *, wchar_t *, wchar_t *, int));
+extern wint_t _IO_sputbackwc __P ((_IO_FILE *, wint_t));
+extern wint_t _IO_sungetwc __P ((_IO_FILE *));
+extern void _IO_wdoallocbuf __P ((_IO_FILE *));
+extern void _IO_unsave_wmarkers __P ((_IO_FILE *));
+extern unsigned _IO_adjust_wcolumn __P ((unsigned, const wchar_t *, int));
+
+/* Marker-related function. */
+
+extern void _IO_init_marker __P ((struct _IO_marker *, _IO_FILE *));
+extern void _IO_init_wmarker __P ((struct _IO_marker *, _IO_FILE *));
+extern void _IO_remove_marker __P ((struct _IO_marker *));
+extern int _IO_marker_difference __P ((struct _IO_marker *,
+				       struct _IO_marker *));
+extern int _IO_marker_delta __P ((struct _IO_marker *));
+extern int _IO_wmarker_delta __P ((struct _IO_marker *));
+extern int _IO_seekmark __P ((_IO_FILE *, struct _IO_marker *, int));
+extern int _IO_seekwmark __P ((_IO_FILE *, struct _IO_marker *, int));
+
+/* Functions for iterating global list and dealing with
+   its lock */
+
+extern _IO_ITER _IO_iter_begin __P ((void));
+extern _IO_ITER _IO_iter_end __P ((void));
+extern _IO_ITER _IO_iter_next __P ((_IO_ITER));
+extern _IO_FILE *_IO_iter_file __P ((_IO_ITER));
+extern void _IO_list_lock __P ((void));
+extern void _IO_list_unlock __P ((void));
+extern void _IO_list_resetlock __P ((void));
+
+/* Default jumptable functions. */
+
+extern int _IO_default_underflow __P ((_IO_FILE *));
+extern int _IO_default_uflow __P ((_IO_FILE *));
+extern wint_t _IO_wdefault_uflow __P ((_IO_FILE *));
+extern int _IO_default_doallocate __P ((_IO_FILE *));
+extern int _IO_wdefault_doallocate __P ((_IO_FILE *));
+extern void _IO_default_finish __P ((_IO_FILE *, int));
+extern void _IO_wdefault_finish __P ((_IO_FILE *, int));
+extern int _IO_default_pbackfail __P ((_IO_FILE *, int));
+extern wint_t _IO_wdefault_pbackfail __P ((_IO_FILE *, wint_t));
+extern _IO_FILE* _IO_default_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
+extern _IO_FILE* _IO_wdefault_setbuf __P ((_IO_FILE *, wchar_t *,
+					   _IO_ssize_t));
+extern _IO_size_t _IO_default_xsputn __P ((_IO_FILE *, const void *,
+					   _IO_size_t));
+extern _IO_size_t _IO_wdefault_xsputn __P ((_IO_FILE *, const void *,
+					    _IO_size_t));
+extern _IO_size_t _IO_default_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
+extern _IO_size_t _IO_wdefault_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
+extern _IO_off64_t _IO_default_seekoff __P ((_IO_FILE *,
+					     _IO_off64_t, int, int));
+extern _IO_off64_t _IO_default_seekpos __P ((_IO_FILE *, _IO_off64_t, int));
+extern _IO_ssize_t _IO_default_write __P ((_IO_FILE *, const void *,
+					   _IO_ssize_t));
+extern _IO_ssize_t _IO_default_read __P ((_IO_FILE *, void *, _IO_ssize_t));
+extern int _IO_default_stat __P ((_IO_FILE *, void *));
+extern _IO_off64_t _IO_default_seek __P ((_IO_FILE *, _IO_off64_t, int));
+extern int _IO_default_sync __P ((_IO_FILE *));
+#define _IO_default_close ((_IO_close_t) _IO_default_sync)
+extern int _IO_default_showmanyc __P ((_IO_FILE *));
+extern void _IO_default_imbue __P ((_IO_FILE *, void *));
+
+extern struct _IO_jump_t _IO_file_jumps;
+extern struct _IO_jump_t _IO_wfile_jumps;
+extern struct _IO_jump_t _IO_old_file_jumps;
+extern struct _IO_jump_t _IO_streambuf_jumps;
+extern struct _IO_jump_t _IO_proc_jumps;
+extern struct _IO_jump_t _IO_old_proc_jumps;
+extern struct _IO_jump_t _IO_str_jumps;
+extern struct _IO_jump_t _IO_wstr_jumps;
+extern struct _IO_codecvt __libio_codecvt;
+extern int _IO_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
+extern int _IO_new_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
+extern int _IO_old_do_write __P ((_IO_FILE *, const char *, _IO_size_t));
+extern int _IO_wdo_write __P ((_IO_FILE *, const wchar_t *, _IO_size_t));
+extern int _IO_flush_all __P ((void));
+extern int _IO_cleanup __P ((void));
+extern void _IO_flush_all_linebuffered __P ((void));
+extern int _IO_new_fgetpos __P ((_IO_FILE *, _IO_fpos_t *));
+extern int _IO_old_fgetpos __P ((_IO_FILE *, _IO_fpos_t *));
+extern int _IO_new_fsetpos __P ((_IO_FILE *, const _IO_fpos_t *));
+extern int _IO_old_fsetpos __P ((_IO_FILE *, const _IO_fpos_t *));
+extern int _IO_new_fgetpos64 __P ((_IO_FILE *, _IO_fpos64_t *));
+extern int _IO_old_fgetpos64 __P ((_IO_FILE *, _IO_fpos64_t *));
+extern int _IO_new_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *));
+extern int _IO_old_fsetpos64 __P ((_IO_FILE *, const _IO_fpos64_t *));
+
+
+#if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+# define _IO_do_flush(_f) \
+  ((_f)->_mode <= 0							      \
+   ? _IO_do_write(_f, (_f)->_IO_write_base,				      \
+		  (_f)->_IO_write_ptr-(_f)->_IO_write_base)		      \
+   : _IO_wdo_write(_f, (_f)->_wide_data->_IO_write_base,		      \
+		   ((_f)->_wide_data->_IO_write_ptr			      \
+		    - (_f)->_wide_data->_IO_write_base)))
+#else
+# define _IO_do_flush(_f) \
+   _IO_do_write(_f, (_f)->_IO_write_base,				      \
+		(_f)->_IO_write_ptr-(_f)->_IO_write_base)
+#endif
+#define _IO_old_do_flush(_f) \
+  _IO_old_do_write(_f, (_f)->_IO_write_base, \
+		   (_f)->_IO_write_ptr-(_f)->_IO_write_base)
+#define _IO_in_put_mode(_fp) ((_fp)->_flags & _IO_CURRENTLY_PUTTING)
+#define _IO_mask_flags(fp, f, mask) \
+       ((fp)->_flags = ((fp)->_flags & ~(mask)) | ((f) & (mask)))
+#define _IO_setg(fp, eb, g, eg)  ((fp)->_IO_read_base = (eb),\
+	(fp)->_IO_read_ptr = (g), (fp)->_IO_read_end = (eg))
+#define _IO_wsetg(fp, eb, g, eg)  ((fp)->_wide_data->_IO_read_base = (eb),\
+	(fp)->_wide_data->_IO_read_ptr = (g), \
+	(fp)->_wide_data->_IO_read_end = (eg))
+#define _IO_setp(__fp, __p, __ep) \
+       ((__fp)->_IO_write_base = (__fp)->_IO_write_ptr \
+	= __p, (__fp)->_IO_write_end = (__ep))
+#define _IO_wsetp(__fp, __p, __ep) \
+       ((__fp)->_wide_data->_IO_write_base \
+	= (__fp)->_wide_data->_IO_write_ptr = __p, \
+	(__fp)->_wide_data->_IO_write_end = (__ep))
+#define _IO_have_backup(fp) ((fp)->_IO_save_base != NULL)
+#define _IO_have_wbackup(fp) ((fp)->_wide_data->_IO_save_base != NULL)
+#define _IO_in_backup(fp) ((fp)->_flags & _IO_IN_BACKUP)
+#define _IO_have_markers(fp) ((fp)->_markers != NULL)
+#define _IO_blen(fp) ((fp)->_IO_buf_end - (fp)->_IO_buf_base)
+#define _IO_wblen(fp) ((fp)->_wide_data->_IO_buf_end \
+		       - (fp)->_wide_data->_IO_buf_base)
+
+/* Jumptable functions for files. */
+
+extern int _IO_file_doallocate __P ((_IO_FILE *));
+extern _IO_FILE* _IO_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
+extern _IO_off64_t _IO_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_size_t _IO_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
+extern _IO_size_t _IO_file_xsgetn __P ((_IO_FILE *, void *, _IO_size_t));
+extern int _IO_file_stat __P ((_IO_FILE *, void *));
+extern int _IO_file_close __P ((_IO_FILE *));
+extern int _IO_file_underflow __P ((_IO_FILE *));
+extern int _IO_file_overflow __P ((_IO_FILE *, int));
+#define _IO_file_is_open(__fp) ((__fp)->_fileno != -1)
+extern void _IO_file_init __P ((struct _IO_FILE_plus *));
+extern _IO_FILE* _IO_file_attach __P ((_IO_FILE *, int));
+extern _IO_FILE* _IO_file_open __P ((_IO_FILE *, const char *, int, int,
+				     int, int));
+extern _IO_FILE* _IO_file_fopen __P ((_IO_FILE *, const char *, const char *,
+				      int));
+extern _IO_ssize_t _IO_file_write __P ((_IO_FILE *, const void *,
+					_IO_ssize_t));
+extern _IO_ssize_t _IO_file_read __P ((_IO_FILE *, void *, _IO_ssize_t));
+extern int _IO_file_sync __P ((_IO_FILE *));
+extern int _IO_file_close_it __P ((_IO_FILE *));
+extern _IO_off64_t _IO_file_seek __P ((_IO_FILE *, _IO_off64_t, int));
+extern void _IO_file_finish __P ((_IO_FILE *, int));
+
+extern _IO_FILE* _IO_new_file_attach __P ((_IO_FILE *, int));
+extern int _IO_new_file_close_it __P ((_IO_FILE *));
+extern void _IO_new_file_finish __P ((_IO_FILE *, int));
+extern _IO_FILE* _IO_new_file_fopen __P ((_IO_FILE *, const char *, const char *,
+					  int));
+extern void _IO_no_init __P ((_IO_FILE *, int, int, struct _IO_wide_data *,
+			      struct _IO_jump_t *));
+extern void _IO_new_file_init __P ((struct _IO_FILE_plus *));
+extern _IO_FILE* _IO_new_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
+extern int _IO_new_file_sync __P ((_IO_FILE *));
+extern int _IO_new_file_underflow __P ((_IO_FILE *));
+extern int _IO_new_file_overflow __P ((_IO_FILE *, int));
+extern _IO_off64_t _IO_new_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_ssize_t _IO_new_file_write __P ((_IO_FILE *, const void *,
+					    _IO_ssize_t));
+extern _IO_size_t _IO_new_file_xsputn __P ((_IO_FILE *, const void *, _IO_size_t));
+
+extern _IO_FILE* _IO_old_file_setbuf __P ((_IO_FILE *, char *, _IO_ssize_t));
+extern _IO_off64_t _IO_old_file_seekoff __P ((_IO_FILE *, _IO_off64_t, int,
+					      int));
+extern _IO_size_t _IO_old_file_xsputn __P ((_IO_FILE *, const void *,
+					    _IO_size_t));
+extern int _IO_old_file_underflow __P ((_IO_FILE *));
+extern int _IO_old_file_overflow __P ((_IO_FILE *, int));
+extern void _IO_old_file_init __P ((struct _IO_FILE_plus *));
+extern _IO_FILE* _IO_old_file_attach __P ((_IO_FILE *, int));
+extern _IO_FILE* _IO_old_file_fopen __P ((_IO_FILE *, const char *,
+					  const char *));
+extern _IO_ssize_t _IO_old_file_write __P ((_IO_FILE *, const void *,
+					    _IO_ssize_t));
+extern int _IO_old_file_sync __P ((_IO_FILE *));
+extern int _IO_old_file_close_it __P ((_IO_FILE *));
+extern void _IO_old_file_finish __P ((_IO_FILE *, int));
+
+extern int _IO_wfile_doallocate __P ((_IO_FILE *));
+extern _IO_size_t _IO_wfile_xsputn __P ((_IO_FILE *, const void *,
+					 _IO_size_t));
+extern _IO_FILE* _IO_wfile_setbuf __P ((_IO_FILE *, wchar_t *, _IO_ssize_t));
+extern wint_t _IO_wfile_sync __P ((_IO_FILE *));
+extern wint_t _IO_wfile_underflow __P ((_IO_FILE *));
+extern wint_t _IO_wfile_overflow __P ((_IO_FILE *, wint_t));
+extern _IO_off64_t _IO_wfile_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+
+/* Jumptable functions for proc_files. */
+extern _IO_FILE* _IO_proc_open __P ((_IO_FILE *, const char *, const char *));
+extern _IO_FILE* _IO_new_proc_open __P ((_IO_FILE *, const char *, const char *));
+extern _IO_FILE* _IO_old_proc_open __P ((_IO_FILE *, const char *, const char *));
+extern int _IO_proc_close __P ((_IO_FILE *));
+extern int _IO_new_proc_close __P ((_IO_FILE *));
+extern int _IO_old_proc_close __P ((_IO_FILE *));
+
+/* Jumptable functions for strfiles. */
+extern int _IO_str_underflow __P ((_IO_FILE *));
+extern int _IO_str_overflow __P ((_IO_FILE *, int));
+extern int _IO_str_pbackfail __P ((_IO_FILE *, int));
+extern _IO_off64_t _IO_str_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern void _IO_str_finish __P ((_IO_FILE *, int));
+
+/* Other strfile functions */
+struct _IO_strfile_;
+extern void _IO_str_init_static __P ((struct _IO_strfile_ *, char *, int, char *));
+extern void _IO_str_init_readonly __P ((struct _IO_strfile_ *, const char *, int));
+extern _IO_ssize_t _IO_str_count __P ((_IO_FILE *));
+
+/* And the wide character versions.  */
+extern void _IO_wstr_init_static __P ((_IO_FILE *, wchar_t *, int, wchar_t *));
+extern void _IO_wstr_init_readonly __P ((_IO_FILE *, const char *, int));
+extern _IO_ssize_t _IO_wstr_count __P ((_IO_FILE *));
+extern _IO_wint_t _IO_wstr_overflow __P ((_IO_FILE *, _IO_wint_t));
+extern _IO_wint_t _IO_wstr_underflow __P ((_IO_FILE *));
+extern _IO_off64_t _IO_wstr_seekoff __P ((_IO_FILE *, _IO_off64_t, int, int));
+extern _IO_wint_t _IO_wstr_pbackfail __P ((_IO_FILE *, _IO_wint_t));
+extern void _IO_wstr_finish __P ((_IO_FILE *, int));
+
+extern int _IO_vasprintf __P ((char **result_ptr, __const char *format,
+			       _IO_va_list args));
+extern int _IO_vdprintf __P ((int d, __const char *format, _IO_va_list arg));
+extern int _IO_vsnprintf __P ((char *string, _IO_size_t maxlen,
+			       __const char *format, _IO_va_list args));
+
+
+extern _IO_size_t _IO_getline __P ((_IO_FILE *,char *, _IO_size_t, int, int));
+extern _IO_size_t _IO_getline_info __P ((_IO_FILE *,char *, _IO_size_t,
+					 int, int, int *));
+extern _IO_ssize_t _IO_getdelim __P ((char **, _IO_size_t *, int, _IO_FILE *));
+extern _IO_size_t _IO_getwline __P ((_IO_FILE *,wchar_t *, _IO_size_t, wint_t,
+				     int));
+extern _IO_size_t _IO_getwline_info __P ((_IO_FILE *,wchar_t *, _IO_size_t,
+					  wint_t, int, wint_t *));
+extern double _IO_strtod __P ((const char *, char **));
+extern char *_IO_dtoa __P ((double __d, int __mode, int __ndigits,
+			    int *__decpt, int *__sign, char **__rve));
+extern int _IO_outfloat __P ((double __value, _IO_FILE *__sb, int __type,
+			      int __width, int __precision, int __flags,
+			      int __sign_mode, int __fill));
+
+extern struct _IO_FILE_plus *_IO_list_all;
+extern void (*_IO_cleanup_registration_needed) __PMT ((void));
+
+#ifndef EOF
+# define EOF (-1)
+#endif
+#ifndef NULL
+# if defined __GNUG__ && \
+    (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 8))
+#  define NULL (__null)
+# else
+#  if !defined(__cplusplus)
+#   define NULL ((void*)0)
+#  else
+#   define NULL (0)
+#  endif
+# endif
+#endif
+
+#if _G_HAVE_MMAP
+
+#ifdef __cplusplus
+} 
+#endif
+
+# include 
+# include 
+# include 
+# include 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+# if !defined(MAP_ANONYMOUS) && defined(MAP_ANON)
+#  define MAP_ANONYMOUS MAP_ANON
+# endif
+
+# if !defined(MAP_ANONYMOUS) || !defined(EXEC_PAGESIZE)
+#  undef _G_HAVE_MMAP
+#  define _G_HAVE_MMAP 0
+# endif
+
+#endif /* _G_HAVE_MMAP */
+
+#if _G_HAVE_MMAP
+
+# ifdef _LIBC
+/* When using this code in the GNU libc we must not pollute the name space.  */
+#  define mmap __mmap
+#  define munmap __munmap
+#  define ftruncate __ftruncate
+# endif
+
+# define ROUND_TO_PAGE(_S) \
+       (((_S) + EXEC_PAGESIZE - 1) & ~(EXEC_PAGESIZE - 1))
+
+# define FREE_BUF(_B, _S) \
+       munmap ((_B), ROUND_TO_PAGE (_S))
+# define ALLOC_BUF(_B, _S, _R) \
+       do {								      \
+	  (_B) = (char *) mmap (0, ROUND_TO_PAGE (_S),			      \
+				PROT_READ | PROT_WRITE,			      \
+				MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);	      \
+	  if ((_B) == (char *) MAP_FAILED)				      \
+	    return (_R);						      \
+       } while (0)
+# define ALLOC_WBUF(_B, _S, _R) \
+       do {								      \
+	  (_B) = (wchar_t *) mmap (0, ROUND_TO_PAGE (_S),		      \
+				   PROT_READ | PROT_WRITE,		      \
+				   MAP_PRIVATE | MAP_ANONYMOUS, -1, 0);	      \
+	  if ((_B) == (wchar_t *) MAP_FAILED)				      \
+	    return (_R);						      \
+       } while (0)
+
+#else /* _G_HAVE_MMAP */
+
+# define FREE_BUF(_B, _S) \
+       free(_B)
+# define ALLOC_BUF(_B, _S, _R) \
+       do {								      \
+	  (_B) = (char*)malloc(_S);					      \
+	  if ((_B) == NULL)						      \
+	    return (_R);						      \
+       } while (0)
+# define ALLOC_WBUF(_B, _S, _R) \
+       do {								      \
+	  (_B) = (wchar_t *)malloc(_S);					      \
+	  if ((_B) == NULL)						      \
+	    return (_R);						      \
+       } while (0)
+
+#endif /* _G_HAVE_MMAP */
+
+#ifndef OS_FSTAT
+# define OS_FSTAT fstat
+#endif
+struct stat;
+extern _IO_ssize_t _IO_read __P ((int, void *, _IO_size_t));
+extern _IO_ssize_t _IO_write __P ((int, const void *, _IO_size_t));
+extern _IO_off64_t _IO_lseek __P ((int, _IO_off64_t, int));
+extern int _IO_close __P ((int));
+extern int _IO_fstat __P ((int, struct stat *));
+extern int _IO_vscanf __P ((const char *, _IO_va_list));
+
+/* _IO_pos_BAD is an _IO_off64_t value indicating error, unknown, or EOF. */
+#ifndef _IO_pos_BAD
+# define _IO_pos_BAD ((_IO_off64_t) -1)
+#endif
+/* _IO_pos_adjust adjust an _IO_off64_t by some number of bytes. */
+#ifndef _IO_pos_adjust
+# define _IO_pos_adjust(pos, delta) ((pos) += (delta))
+#endif
+/* _IO_pos_0 is an _IO_off64_t value indicating beginning of file. */
+#ifndef _IO_pos_0
+# define _IO_pos_0 ((_IO_off64_t) 0)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
+#ifdef _IO_MTSAFE_IO
+/* check following! */
+# ifdef _IO_USE_OLD_IO_FILE
+#  define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
+       { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock }
+# else
+#  if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+#   define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
+       { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\
+	 NULL, WDP, 0 }
+#  else
+#   define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
+       { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, _IO_pos_BAD, 0, 0, { 0 }, &_IO_stdfile_##FD##_lock, _IO_pos_BAD,\
+	 0 }
+#  endif
+# endif
+#else
+# ifdef _IO_USE_OLD_IO_FILE
+#  define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
+       { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, _IO_pos_BAD }
+# else
+#  if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+#   define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
+       { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \
+	 NULL, WDP, 0 }
+#  else
+#   define FILEBUF_LITERAL(CHAIN, FLAGS, FD, WDP) \
+       { _IO_MAGIC+_IO_LINKED+_IO_IS_FILEBUF+FLAGS, \
+	 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, (_IO_FILE *) CHAIN, FD, \
+	 0, _IO_pos_BAD, 0, 0, { 0 }, 0, _IO_pos_BAD, \
+	 0 }
+#  endif
+# endif
+#endif
+
+/* VTABLE_LABEL defines NAME as of the CLASS class.
+   CNLENGTH is strlen(#CLASS).  */
+#ifdef __GNUC__
+# if _G_VTABLE_LABEL_HAS_LENGTH
+#  define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
+  extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CNLENGTH #CLASS);
+# else
+#  define VTABLE_LABEL(NAME, CLASS, CNLENGTH) \
+  extern char NAME[] asm (_G_VTABLE_LABEL_PREFIX #CLASS);
+# endif
+#endif /* __GNUC__ */
+
+#if !defined(builtinbuf_vtable) && defined(__cplusplus)
+# ifdef __GNUC__
+VTABLE_LABEL(builtinbuf_vtable, builtinbuf, 10)
+# else
+#  if _G_VTABLE_LABEL_HAS_LENGTH
+#   define builtinbuf_vtable _G_VTABLE_LABEL_PREFIX_ID##10builtinbuf
+#  else
+#   define builtinbuf_vtable _G_VTABLE_LABEL_PREFIX_ID##builtinbuf
+#  endif
+# endif
+#endif /* !defined(builtinbuf_vtable) && defined(__cplusplus) */
+
+#if defined(__STDC__) || defined(__cplusplus)
+# define _IO_va_start(args, last) va_start(args, last)
+#else
+# define _IO_va_start(args, last) va_start(args)
+#endif
+
+extern struct _IO_fake_stdiobuf _IO_stdin_buf, _IO_stdout_buf, _IO_stderr_buf;
+
+#if 1
+# define COERCE_FILE(FILE) /* Nothing */
+#else
+/* This is part of the kludge for binary compatibility with old stdio. */
+# define COERCE_FILE(FILE) \
+  (((FILE)->_IO_file_flags & _IO_MAGIC_MASK) == _OLD_MAGIC_MASK \
+    && (FILE) = *(FILE**)&((int*)fp)[1])
+#endif
+
+#ifdef EINVAL
+# define MAYBE_SET_EINVAL __set_errno (EINVAL)
+#else
+# define MAYBE_SET_EINVAL /* nothing */
+#endif
+
+#ifdef IO_DEBUG
+# define CHECK_FILE(FILE, RET) \
+	if ((FILE) == NULL) { MAYBE_SET_EINVAL; return RET; } \
+	else { COERCE_FILE(FILE); \
+	       if (((FILE)->_IO_file_flags & _IO_MAGIC_MASK) != _IO_MAGIC) \
+	  { MAYBE_SET_EINVAL; return RET; }}
+#else
+# define CHECK_FILE(FILE, RET) COERCE_FILE (FILE)
+#endif
diff --git a/contrib/libstdc++/libio/stdfiles.c b/contrib/libstdc++/libio/stdfiles.c
new file mode 100644
index 0000000..b81fef8
--- /dev/null
+++ b/contrib/libstdc++/libio/stdfiles.c
@@ -0,0 +1,71 @@
+/* Copyright (C) 1993, 1994, 1996, 1997, 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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.  */
+
+
+/* This file provides definitions of _IO_stdin, _IO_stdout, and _IO_stderr
+   for C code.  Compare stdstreams.cc.
+   (The difference is that here the vtable field is set to 0,
+   so the objects defined are not valid C++ objects.  On the other
+   hand, we don't need a C++ compiler to build this file.) */
+
+#include "libioP.h"
+
+#ifdef _IO_MTSAFE_IO
+# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+  static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
+  static struct _IO_wide_data _IO_wide_data_##FD \
+    = { ._wide_vtable = &_IO_wfile_jumps }; \
+  struct _IO_FILE_plus NAME \
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
+       &_IO_file_jumps};
+# else
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+  static _IO_lock_t _IO_stdfile_##FD##_lock = _IO_lock_initializer; \
+  struct _IO_FILE_plus NAME \
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
+       &_IO_file_jumps};
+# endif
+#else
+# if defined _LIBC || defined _GLIBCPP_USE_WCHAR_T
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+  static struct _IO_wide_data _IO_wide_data_##FD \
+    = { ._wide_vtable = &_IO_wfile_jumps }; \
+  struct _IO_FILE_plus NAME \
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, &_IO_wide_data_##FD), \
+       &_IO_file_jumps};
+# else
+#  define DEF_STDFILE(NAME, FD, CHAIN, FLAGS) \
+  struct _IO_FILE_plus NAME \
+    = {FILEBUF_LITERAL(CHAIN, FLAGS, FD, NULL), \
+       &_IO_file_jumps};
+# endif
+#endif
+
+DEF_STDFILE(_IO_2_1_stdin_, 0, 0, _IO_NO_WRITES);
+DEF_STDFILE(_IO_2_1_stdout_, 1, &_IO_2_1_stdin_, _IO_NO_READS);
+DEF_STDFILE(_IO_2_1_stderr_, 2, &_IO_2_1_stdout_, _IO_NO_READS+_IO_UNBUFFERED);
+
+struct _IO_FILE_plus *_IO_list_all = &_IO_2_1_stderr_;
diff --git a/contrib/libstdc++/libio/stdio.c b/contrib/libstdc++/libio/stdio.c
new file mode 100644
index 0000000..3b897ce
--- /dev/null
+++ b/contrib/libstdc++/libio/stdio.c
@@ -0,0 +1,43 @@
+/* Copyright (C) 1993, 1994, 1996, 1997, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 "libioP.h"
+#include "stdio.h"
+
+#undef stdin
+#undef stdout
+#undef stderr
+_IO_FILE *stdin = (FILE *) &_IO_2_1_stdin_;
+_IO_FILE *stdout = (FILE *) &_IO_2_1_stdout_;
+_IO_FILE *stderr = (FILE *) &_IO_2_1_stderr_;
+
+#undef _IO_stdin
+#undef _IO_stdout
+#undef _IO_stderr
+#ifdef _LIBC
+strong_alias (stdin, _IO_stdin);
+strong_alias (stdout, _IO_stdout);
+strong_alias (stderr, _IO_stderr);
+#endif
diff --git a/contrib/libstdc++/libio/wfiledoalloc.c b/contrib/libstdc++/libio/wfiledoalloc.c
new file mode 100644
index 0000000..9c05162
--- /dev/null
+++ b/contrib/libstdc++/libio/wfiledoalloc.c
@@ -0,0 +1,108 @@
+/* Copyright (C) 1993, 1997, 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO 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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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.  */
+
+/*
+ * Copyright (c) 1990 The Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley.  The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* Modified for GNU iostream by Per Bothner 1991, 1992. */
+
+#ifndef _POSIX_SOURCE
+# define _POSIX_SOURCE
+#endif
+#include "libioP.h"
+#ifdef _GLIBCPP_USE_WCHAR_T
+#include 
+#include 
+#ifdef __STDC__
+#include 
+#include 
+#endif
+
+#ifdef _LIBC
+# undef isatty
+# define isatty(Fd) __isatty (Fd)
+#endif
+
+/*
+ * Allocate a file buffer, or switch to unbuffered I/O.
+ * Per the ANSI C standard, ALL tty devices default to line buffered.
+ *
+ * As a side effect, we set __SOPT or __SNPT (en/dis-able fseek
+ * optimisation) right after the _fstat() that finds the buffer size.
+ */
+
+int
+_IO_wfile_doallocate (fp)
+     _IO_FILE *fp;
+{
+  _IO_size_t size;
+  int couldbetty;
+  wchar_t *p;
+  struct _G_stat64 st;
+
+  /* Allocate room for the external buffer.  */
+  if (fp->_IO_buf_base == NULL)
+    _IO_file_doallocate (fp);
+
+  if (fp->_fileno < 0 || _IO_SYSSTAT (fp, &st) < 0)
+    {
+      couldbetty = 0;
+      size = _IO_BUFSIZ;
+#if 0
+      /* do not try to optimise fseek() */
+      fp->_flags |= __SNPT;
+#endif
+    }
+  else
+    {
+      couldbetty = S_ISCHR (st.st_mode);
+#if _IO_HAVE_ST_BLKSIZE
+      size = st.st_blksize <= 0 ? _IO_BUFSIZ : st.st_blksize;
+#else
+      size = _IO_BUFSIZ;
+#endif
+    }
+  ALLOC_WBUF (p, size * sizeof (wchar_t), EOF);
+  _IO_wsetb (fp, p, p + size, 1);
+  if (couldbetty && isatty (fp->_fileno))
+    fp->_flags |= _IO_LINE_BUF;
+  return 1;
+}
+
+#endif /* _GLIBCPP_USE_WCHAR_T */
diff --git a/contrib/libstdc++/libio/wfileops.c b/contrib/libstdc++/libio/wfileops.c
new file mode 100644
index 0000000..1dd524a
--- /dev/null
+++ b/contrib/libstdc++/libio/wfileops.c
@@ -0,0 +1,754 @@
+/* Copyright (C) 1993, 95, 97, 98, 99, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO Library.
+   Written by Ulrich Drepper .
+   Based on the single byte version by Per Bothner .
+
+   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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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 
+#include 
+#ifdef _GLIBCPP_USE_WCHAR_T
+#include 
+#ifdef HAVE_GCONV_H
+#  include 
+#endif
+#include 
+#include 
+
+
+#ifndef _LIBC
+# define _IO_new_do_write _IO_do_write
+# define _IO_new_file_attach _IO_file_attach
+# define _IO_new_file_close_it _IO_file_close_it
+# define _IO_new_file_finish _IO_file_finish
+# define _IO_new_file_fopen _IO_file_fopen
+# define _IO_new_file_init _IO_file_init
+# define _IO_new_file_setbuf _IO_file_setbuf
+# define _IO_new_file_sync _IO_file_sync
+# define _IO_new_file_overflow _IO_file_overflow
+# define _IO_new_file_seekoff _IO_file_seekoff
+# define _IO_new_file_underflow _IO_file_underflow
+# define _IO_new_file_write _IO_file_write
+# define _IO_new_file_xsputn _IO_file_xsputn
+#endif
+
+
+_IO_FILE *
+_IO_wfile_setbuf (fp, p, len)
+     _IO_FILE *fp;
+     wchar_t *p;
+     _IO_ssize_t len;
+{
+  if (_IO_wdefault_setbuf (fp, p, len) == NULL)
+    return NULL;
+
+  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr =
+    fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_buf_base;
+  _IO_wsetg (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base,
+	     fp->_wide_data->_IO_buf_base);
+
+  return fp;
+}
+
+
+/* Convert TO_DO wide character from DATA to FP.
+   Then mark FP as having empty buffers. */
+int
+_IO_wdo_write (fp, data, to_do)
+     _IO_FILE *fp;
+     const wchar_t *data;
+     _IO_size_t to_do;
+{
+  struct _IO_codecvt *cc = fp->_codecvt;
+
+  if (to_do > 0)
+    {
+      if (fp->_IO_write_end == fp->_IO_write_ptr
+	  && fp->_IO_write_end != fp->_IO_write_base)
+	{
+	  if (_IO_new_do_write (fp, fp->_IO_write_base,
+				fp->_IO_write_ptr - fp->_IO_write_base) == EOF)
+	    return EOF;
+	}
+
+      do
+	{
+	  enum __codecvt_result result;
+	  const wchar_t *new_data;
+
+	  /* Now convert from the internal format into the external buffer.  */
+	  result = (*cc->__codecvt_do_out) (cc, &fp->_wide_data->_IO_state,
+					    data, data + to_do, &new_data,
+					    fp->_IO_write_ptr,
+					    fp->_IO_buf_end,
+					    &fp->_IO_write_ptr);
+
+	  /* Write out what we produced so far.  */
+	  if (_IO_new_do_write (fp, fp->_IO_write_base,
+				fp->_IO_write_ptr - fp->_IO_write_base) == EOF)
+	    /* Something went wrong.  */
+	    return EOF;
+
+	  to_do -= new_data - data;
+
+	  /* Next see whether we had problems during the conversion.  If yes,
+	     we cannot go on.  */
+	  if (result != __codecvt_ok
+	      && (result != __codecvt_partial || new_data - data == 0))
+	    break;
+
+	  data = new_data;
+	}
+      while (to_do > 0);
+    }
+
+  _IO_wsetg (fp, fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base,
+	     fp->_wide_data->_IO_buf_base);
+  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr
+    = fp->_wide_data->_IO_buf_base;
+  fp->_wide_data->_IO_write_end = ((fp->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+				   ? fp->_wide_data->_IO_buf_base
+				   : fp->_wide_data->_IO_buf_end);
+
+  return to_do == 0 ? 0 : WEOF;
+}
+
+
+wint_t
+_IO_wfile_underflow (fp)
+     _IO_FILE *fp;
+{
+  struct _IO_codecvt *cd;
+  enum __codecvt_result status;
+  _IO_ssize_t count;
+  int tries;
+  const char *read_ptr_copy;
+
+  if (fp->_flags & _IO_NO_READS)
+    {
+      fp->_flags |= _IO_ERR_SEEN;
+      __set_errno (EBADF);
+      return WEOF;
+    }
+  if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
+    return *fp->_wide_data->_IO_read_ptr;
+
+  cd = fp->_codecvt;
+
+  /* Maybe there is something left in the external buffer.  */
+  if (fp->_IO_read_ptr < fp->_IO_read_end)
+    {
+      /* Convert it.  */
+      size_t avail_bytes = fp->_IO_read_end - fp->_IO_read_ptr;
+
+      if (avail_bytes >= (*cd->__codecvt_do_max_length) (cd))
+	{
+	  /* There is more in the external.  */
+	  const char *read_stop = (const char *) fp->_IO_read_ptr;
+
+	  fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;
+	  status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state,
+					   fp->_IO_read_ptr, fp->_IO_read_end,
+					   &read_stop,
+					   fp->_wide_data->_IO_read_end,
+					   fp->_wide_data->_IO_buf_end,
+					   &fp->_wide_data->_IO_read_end);
+
+	  fp->_IO_read_ptr = (char *) read_stop;
+
+	  /* If we managed to generate some text return the next character.  */
+	  if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
+	    return *fp->_wide_data->_IO_read_ptr;
+
+	  if (status == __codecvt_error)
+	    {
+	      __set_errno (EILSEQ);
+	      fp->_flags |= _IO_ERR_SEEN;
+	      return WEOF;
+	    }
+	}
+
+      /* Move the remaining content of the read buffer to the beginning.  */
+      memmove (fp->_IO_buf_base, fp->_IO_read_ptr,
+	       fp->_IO_read_end - fp->_IO_read_ptr);
+      fp->_IO_read_end = (fp->_IO_buf_base
+			  + (fp->_IO_read_end - fp->_IO_read_ptr));
+      fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_buf_base;
+    }
+  else
+    fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end =
+      fp->_IO_buf_base;
+
+  if (fp->_IO_buf_base == NULL)
+    {
+      /* Maybe we already have a push back pointer.  */
+      if (fp->_IO_save_base != NULL)
+	{
+	  free (fp->_IO_save_base);
+	  fp->_flags &= ~_IO_IN_BACKUP;
+	}
+      _IO_doallocbuf (fp);
+
+      fp->_IO_read_base = fp->_IO_read_ptr = fp->_IO_read_end =
+	fp->_IO_buf_base;
+    }
+
+  fp->_IO_write_base = fp->_IO_write_ptr = fp->_IO_write_end =
+    fp->_IO_buf_base;
+
+  if (fp->_wide_data->_IO_buf_base == NULL)
+    {
+      /* Maybe we already have a push back pointer.  */
+      if (fp->_wide_data->_IO_save_base != NULL)
+	{
+	  free (fp->_wide_data->_IO_save_base);
+	  fp->_flags &= ~_IO_IN_BACKUP;
+	}
+      _IO_wdoallocbuf (fp);
+    }
+
+  /* Flush all line buffered files before reading. */
+  /* FIXME This can/should be moved to genops ?? */
+  if (fp->_flags & (_IO_LINE_BUF|_IO_UNBUFFERED))
+    _IO_flush_all_linebuffered ();
+
+  _IO_switch_to_get_mode (fp);
+
+  fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr =
+    fp->_wide_data->_IO_buf_base;
+  fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_buf_base;
+  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr =
+    fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_buf_base;
+
+  tries = 0;
+ again:
+  count = _IO_SYSREAD (fp, fp->_IO_read_end,
+		       fp->_IO_buf_end - fp->_IO_read_end);
+  if (count <= 0)
+    {
+      if (count == 0 && tries == 0)
+	fp->_flags |= _IO_EOF_SEEN;
+      else
+	fp->_flags |= _IO_ERR_SEEN, count = 0;
+    }
+  fp->_IO_read_end += count;
+  if (count == 0)
+    {
+      if (tries != 0)
+	/* There are some bytes in the external buffer but they don't
+           convert to anything.  */
+	__set_errno (EILSEQ);
+      return WEOF;
+    }
+  if (fp->_offset != _IO_pos_BAD)
+    _IO_pos_adjust (fp->_offset, count);
+
+  /* Now convert the read input.  */
+  fp->_wide_data->_IO_last_state = fp->_wide_data->_IO_state;
+  fp->_IO_read_base = fp->_IO_read_ptr;
+  status = (*cd->__codecvt_do_in) (cd, &fp->_wide_data->_IO_state,
+				   fp->_IO_read_ptr, fp->_IO_read_end,
+				   &read_ptr_copy,
+				   fp->_wide_data->_IO_read_end,
+				   fp->_wide_data->_IO_buf_end,
+				   &fp->_wide_data->_IO_read_end);
+
+  fp->_IO_read_ptr = (char *) read_ptr_copy;
+  if (fp->_wide_data->_IO_read_end == fp->_wide_data->_IO_buf_base)
+    {
+      if (status == __codecvt_error || fp->_IO_read_end == fp->_IO_buf_end)
+	{
+	  __set_errno (EILSEQ);
+	  fp->_flags |= _IO_ERR_SEEN;
+	  return WEOF;
+	}
+
+      /* The read bytes make no complete character.  Try reading again.  */
+      assert (status == __codecvt_partial);
+      ++tries;
+      goto again;
+    }
+
+  return *fp->_wide_data->_IO_read_ptr;
+}
+
+
+wint_t
+_IO_wfile_overflow (f, wch)
+     _IO_FILE *f;
+     wint_t wch;
+{
+  if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
+    {
+      f->_flags |= _IO_ERR_SEEN;
+      __set_errno (EBADF);
+      return WEOF;
+    }
+  /* If currently reading or no buffer allocated. */
+  if ((f->_flags & _IO_CURRENTLY_PUTTING) == 0)
+    {
+      /* Allocate a buffer if needed. */
+      if (f->_wide_data->_IO_write_base == 0)
+	{
+	  _IO_wdoallocbuf (f);
+	  _IO_wsetg (f, f->_wide_data->_IO_buf_base,
+		     f->_wide_data->_IO_buf_base, f->_wide_data->_IO_buf_base);
+
+	  if (f->_IO_write_base == NULL)
+	    {
+	      _IO_doallocbuf (f);
+	      _IO_setg (f, f->_IO_buf_base, f->_IO_buf_base, f->_IO_buf_base);
+	    }
+	}
+      else
+	{
+	  /* Otherwise must be currently reading.  If _IO_read_ptr
+	     (and hence also _IO_read_end) is at the buffer end,
+	     logically slide the buffer forwards one block (by setting
+	     the read pointers to all point at the beginning of the
+	     block).  This makes room for subsequent output.
+	     Otherwise, set the read pointers to _IO_read_end (leaving
+	     that alone, so it can continue to correspond to the
+	     external position). */
+	  if (f->_wide_data->_IO_read_ptr == f->_wide_data->_IO_buf_end)
+	    {
+	      f->_IO_read_end = f->_IO_read_ptr = f->_IO_buf_base;
+	      f->_wide_data->_IO_read_end = f->_wide_data->_IO_read_ptr =
+		f->_wide_data->_IO_buf_base;
+	    }
+	}
+      f->_wide_data->_IO_write_ptr = f->_wide_data->_IO_read_ptr;
+      f->_wide_data->_IO_write_base = f->_wide_data->_IO_write_ptr;
+      f->_wide_data->_IO_write_end = f->_wide_data->_IO_buf_end;
+      f->_wide_data->_IO_read_base = f->_wide_data->_IO_read_ptr =
+	f->_wide_data->_IO_read_end;
+
+      f->_IO_write_ptr = f->_IO_read_ptr;
+      f->_IO_write_base = f->_IO_write_ptr;
+      f->_IO_write_end = f->_IO_buf_end;
+      f->_IO_read_base = f->_IO_read_ptr = f->_IO_read_end;
+
+      f->_flags |= _IO_CURRENTLY_PUTTING;
+      if (f->_flags & (_IO_LINE_BUF+_IO_UNBUFFERED))
+	f->_wide_data->_IO_write_end = f->_wide_data->_IO_write_ptr;
+    }
+  if (wch == WEOF)
+    return _IO_do_flush (f);
+  if (f->_wide_data->_IO_write_ptr == f->_wide_data->_IO_buf_end)
+    /* Buffer is really full */
+    if (_IO_do_flush (f) == WEOF)
+      return WEOF;
+  *f->_wide_data->_IO_write_ptr++ = wch;
+  if ((f->_flags & _IO_UNBUFFERED)
+      || ((f->_flags & _IO_LINE_BUF) && wch == L'\n'))
+    if (_IO_do_flush (f) == WEOF)
+      return WEOF;
+  return wch;
+}
+
+wint_t
+_IO_wfile_sync (fp)
+     _IO_FILE *fp;
+{
+  _IO_ssize_t delta;
+  wint_t retval = 0;
+
+  /*    char* ptr = cur_ptr(); */
+  if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base)
+    if (_IO_do_flush (fp))
+      return WEOF;
+  delta = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end;
+  if (delta != 0)
+    {
+      /* We have to find out how many bytes we have to go back in the
+	 external buffer.  */
+      struct _IO_codecvt *cv = fp->_codecvt;
+      _IO_off64_t new_pos;
+
+      int clen = (*cv->__codecvt_do_encoding) (cv);
+
+      if (clen > 0)
+	/* It is easy, a fixed number of input bytes are used for each
+	   wide character.  */
+	delta *= clen;
+      else
+	{
+	  /* We have to find out the hard way how much to back off.
+             To do this we determine how much input we needed to
+             generate the wide characters up to the current reading
+             position.  */
+	  int nread;
+
+	  fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
+	  nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state,
+					      fp->_IO_read_base,
+					      fp->_IO_read_end, delta);
+	  fp->_IO_read_ptr = fp->_IO_read_base + nread;
+	  delta = -(fp->_IO_read_end - fp->_IO_read_base - nread);
+	}
+
+      new_pos = _IO_SYSSEEK (fp, delta, 1);
+      if (new_pos != (_IO_off64_t) EOF)
+	{
+	  fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_read_ptr;
+	  fp->_IO_read_end = fp->_IO_read_ptr;
+	}
+#ifdef ESPIPE
+      else if (errno == ESPIPE)
+	; /* Ignore error from unseekable devices. */
+#endif
+      else
+	retval = WEOF;
+    }
+  if (retval != WEOF)
+    fp->_offset = _IO_pos_BAD;
+  /* FIXME: Cleanup - can this be shared? */
+  /*    setg(base(), ptr, ptr); */
+  return retval;
+}
+
+_IO_off64_t
+_IO_wfile_seekoff (fp, offset, dir, mode)
+     _IO_FILE *fp;
+     _IO_off64_t offset;
+     int dir;
+     int mode;
+{
+  _IO_off64_t result;
+  _IO_off64_t delta, new_offset;
+  long int count;
+  /* POSIX.1 8.2.3.7 says that after a call the fflush() the file
+     offset of the underlying file must be exact.  */
+  int must_be_exact = ((fp->_wide_data->_IO_read_base
+			== fp->_wide_data->_IO_read_end)
+		       && (fp->_wide_data->_IO_write_base
+			   == fp->_wide_data->_IO_write_ptr));
+
+  if (mode == 0)
+    dir = _IO_seek_cur, offset = 0; /* Don't move any pointers. */
+
+  /* Flush unwritten characters.
+     (This may do an unneeded write if we seek within the buffer.
+     But to be able to switch to reading, we would need to set
+     egptr to ptr.  That can't be done in the current design,
+     which assumes file_ptr() is eGptr.  Anyway, since we probably
+     end up flushing when we close(), it doesn't make much difference.)
+     FIXME: simulate mem-papped files. */
+
+  if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base
+      || _IO_in_put_mode (fp))
+    if (_IO_switch_to_wget_mode (fp))
+      return WEOF;
+
+  if (fp->_wide_data->_IO_buf_base == NULL)
+    {
+      /* It could be that we already have a pushback buffer.  */
+      if (fp->_wide_data->_IO_read_base != NULL)
+	{
+	  free (fp->_wide_data->_IO_read_base);
+	  fp->_flags &= ~_IO_IN_BACKUP;
+	}
+      _IO_doallocbuf (fp);
+      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+      _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+      _IO_wsetp (fp, fp->_wide_data->_IO_buf_base,
+		 fp->_wide_data->_IO_buf_base);
+      _IO_wsetg (fp, fp->_wide_data->_IO_buf_base,
+		 fp->_wide_data->_IO_buf_base, fp->_wide_data->_IO_buf_base);
+    }
+
+  switch (dir)
+    {
+      struct _IO_codecvt *cv;
+      int clen;
+
+    case _IO_seek_cur:
+      /* Adjust for read-ahead (bytes is buffer).  To do this we must
+         find out which position in the external buffer corresponds to
+         the current position in the internal buffer.  */
+      cv = fp->_codecvt;
+      clen = (*cv->__codecvt_do_encoding) (cv);
+
+      if (clen > 0)
+	offset -= (fp->_wide_data->_IO_read_end
+		   - fp->_wide_data->_IO_read_ptr) * clen;
+      else
+	{
+	  int nread;
+
+	  delta = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end;
+	  fp->_wide_data->_IO_state = fp->_wide_data->_IO_last_state;
+	  nread = (*cv->__codecvt_do_length) (cv, &fp->_wide_data->_IO_state,
+					      fp->_IO_read_base,
+					      fp->_IO_read_end, delta);
+	  fp->_IO_read_ptr = fp->_IO_read_base + nread;
+	  offset -= fp->_IO_read_end - fp->_IO_read_base - nread;
+	}
+
+      if (fp->_offset == _IO_pos_BAD)
+	goto dumb;
+      /* Make offset absolute, assuming current pointer is file_ptr(). */
+      offset += fp->_offset;
+
+      dir = _IO_seek_set;
+      break;
+    case _IO_seek_set:
+      break;
+    case _IO_seek_end:
+      {
+	struct _G_stat64 st;
+	if (_IO_SYSSTAT (fp, &st) == 0 && S_ISREG (st.st_mode))
+	  {
+	    offset += st.st_size;
+	    dir = _IO_seek_set;
+	  }
+	else
+	  goto dumb;
+      }
+    }
+  /* At this point, dir==_IO_seek_set. */
+
+  /* If we are only interested in the current position we've found it now.  */
+  if (mode == 0)
+    return offset;
+
+  /* If destination is within current buffer, optimize: */
+  if (fp->_offset != _IO_pos_BAD && fp->_IO_read_base != NULL
+      && !_IO_in_backup (fp))
+    {
+      /* Offset relative to start of main get area. */
+      _IO_off64_t rel_offset = (offset - fp->_offset
+				+ (fp->_IO_read_end - fp->_IO_read_base));
+      if (rel_offset >= 0)
+	{
+#if 0
+	  if (_IO_in_backup (fp))
+	    _IO_switch_to_main_get_area (fp);
+#endif
+	  if (rel_offset <= fp->_IO_read_end - fp->_IO_read_base)
+	    {
+	      fp->_IO_read_ptr = fp->_IO_read_base + rel_offset;
+	      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+
+	      /* Now set the pointer for the internal buffer.  This
+                 might be an iterative process.  Though the read
+                 pointer is somewhere in the current external buffer
+                 this does not mean we can convert this whole buffer
+                 at once fitting in the internal buffer.  */
+	      do
+		{
+
+		}
+	      while (0);
+
+	      _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+	      goto resync;
+	    }
+#ifdef TODO
+	    /* If we have streammarkers, seek forward by reading ahead. */
+	    if (_IO_have_markers (fp))
+	      {
+		int to_skip = rel_offset
+		  - (fp->_IO_read_ptr - fp->_IO_read_base);
+		if (ignore (to_skip) != to_skip)
+		  goto dumb;
+		_IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+		goto resync;
+	      }
+#endif
+	}
+#ifdef TODO
+      if (rel_offset < 0 && rel_offset >= Bbase () - Bptr ())
+	{
+	  if (!_IO_in_backup (fp))
+	    _IO_switch_to_backup_area (fp);
+	  gbump (fp->_IO_read_end + rel_offset - fp->_IO_read_ptr);
+	  _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+	  goto resync;
+	}
+#endif
+    }
+
+#ifdef TODO
+  _IO_unsave_markers (fp);
+#endif
+
+  if (fp->_flags & _IO_NO_READS)
+    goto dumb;
+
+  /* Try to seek to a block boundary, to improve kernel page management. */
+  new_offset = offset & ~(fp->_IO_buf_end - fp->_IO_buf_base - 1);
+  delta = offset - new_offset;
+  if (delta > fp->_IO_buf_end - fp->_IO_buf_base)
+    {
+      new_offset = offset;
+      delta = 0;
+    }
+  result = _IO_SYSSEEK (fp, new_offset, 0);
+  if (result < 0)
+    return EOF;
+  if (delta == 0)
+    count = 0;
+  else
+    {
+      count = _IO_SYSREAD (fp, fp->_IO_buf_base,
+			   (must_be_exact
+			    ? delta : fp->_IO_buf_end - fp->_IO_buf_base));
+      if (count < delta)
+	{
+	  /* We weren't allowed to read, but try to seek the remainder. */
+	  offset = count == EOF ? delta : delta-count;
+	  dir = _IO_seek_cur;
+	  goto dumb;
+	}
+    }
+  _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base + delta,
+	    fp->_IO_buf_base + count);
+  _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+  fp->_offset = result + count;
+  _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+  return offset;
+ dumb:
+
+  _IO_unsave_markers (fp);
+  result = _IO_SYSSEEK (fp, offset, dir);
+  if (result != EOF)
+    {
+      _IO_mask_flags (fp, 0, _IO_EOF_SEEN);
+      fp->_offset = result;
+      _IO_setg (fp, fp->_IO_buf_base, fp->_IO_buf_base, fp->_IO_buf_base);
+      _IO_setp (fp, fp->_IO_buf_base, fp->_IO_buf_base);
+    }
+  return result;
+
+resync:
+  /* We need to do it since it is possible that the file offset in
+     the kernel may be changed behind our back. It may happen when
+     we fopen a file and then do a fork. One process may access the
+     the file and the kernel file offset will be changed. */
+  if (fp->_offset >= 0)
+    _IO_SYSSEEK (fp, fp->_offset, 0);
+
+  return offset;
+}
+
+
+_IO_size_t
+_IO_wfile_xsputn (f, data, n)
+     _IO_FILE *f;
+     const void *data;
+     _IO_size_t n;
+{
+  register const wchar_t *s = (const wchar_t *) data;
+  _IO_size_t to_do = n;
+  int must_flush = 0;
+  _IO_size_t count;
+
+  if (n <= 0)
+    return 0;
+  /* This is an optimized implementation.
+     If the amount to be written straddles a block boundary
+     (or the filebuf is unbuffered), use sys_write directly. */
+
+  /* First figure out how much space is available in the buffer. */
+  count = f->_wide_data->_IO_write_end - f->_wide_data->_IO_write_ptr;
+  if ((f->_flags & _IO_LINE_BUF) && (f->_flags & _IO_CURRENTLY_PUTTING))
+    {
+      count = f->_wide_data->_IO_buf_end - f->_wide_data->_IO_write_ptr;
+      if (count >= n)
+	{
+	  register const wchar_t *p;
+	  for (p = s + n; p > s; )
+	    {
+	      if (*--p == L'\n')
+		{
+		  count = p - s + 1;
+		  must_flush = 1;
+		  break;
+		}
+	    }
+	}
+    }
+  /* Then fill the buffer. */
+  if (count > 0)
+    {
+      if (count > to_do)
+	count = to_do;
+      if (count > 20)
+	{
+#ifdef _LIBC
+	  f->_wide_data->_IO_write_ptr =
+	    __wmempcpy (f->_wide_data->_IO_write_ptr, s, count);
+#else
+	  wmemcpy (f->_wide_data->_IO_write_ptr, s, count);
+	  f->_wide_data->_IO_write_ptr += count;
+#endif
+	  s += count;
+	}
+      else
+	{
+	  register wchar_t *p = f->_wide_data->_IO_write_ptr;
+	  register int i = (int) count;
+	  while (--i >= 0)
+	    *p++ = *s++;
+	  f->_wide_data->_IO_write_ptr = p;
+	}
+      to_do -= count;
+    }
+  if (to_do > 0)
+    to_do -= _IO_wdefault_xsputn (f, s, to_do);
+  if (must_flush
+      && f->_wide_data->_IO_write_ptr != f->_wide_data->_IO_write_base)
+    _IO_wdo_write (f, f->_wide_data->_IO_write_base,
+		   f->_wide_data->_IO_write_ptr
+		   - f->_wide_data->_IO_write_base);
+
+  return n - to_do;
+}
+
+
+struct _IO_jump_t _IO_wfile_jumps =
+{
+  JUMP_INIT_DUMMY,
+  JUMP_INIT(finish, _IO_new_file_finish),
+  JUMP_INIT(overflow, (_IO_overflow_t) _IO_wfile_overflow),
+  JUMP_INIT(underflow, (_IO_underflow_t) _IO_wfile_underflow),
+  JUMP_INIT(uflow, (_IO_underflow_t) _IO_wdefault_uflow),
+  JUMP_INIT(pbackfail, (_IO_pbackfail_t) _IO_wdefault_pbackfail),
+  JUMP_INIT(xsputn, _IO_wfile_xsputn),
+  JUMP_INIT(xsgetn, _IO_file_xsgetn),
+  JUMP_INIT(seekoff, _IO_wfile_seekoff),
+  JUMP_INIT(seekpos, _IO_default_seekpos),
+  JUMP_INIT(setbuf, _IO_new_file_setbuf),
+  JUMP_INIT(sync, (_IO_sync_t) _IO_wfile_sync),
+  JUMP_INIT(doallocate, _IO_wfile_doallocate),
+  JUMP_INIT(read, _IO_file_read),
+  JUMP_INIT(write, _IO_new_file_write),
+  JUMP_INIT(seek, _IO_file_seek),
+  JUMP_INIT(close, _IO_file_close),
+  JUMP_INIT(stat, _IO_file_stat),
+  JUMP_INIT(showmanyc, _IO_default_showmanyc),
+  JUMP_INIT(imbue, _IO_default_imbue)
+};
+
+#endif /* _GLIBCPP_USE_WCHAR_T */
diff --git a/contrib/libstdc++/libio/wgenops.c b/contrib/libstdc++/libio/wgenops.c
new file mode 100644
index 0000000..7485452
--- /dev/null
+++ b/contrib/libstdc++/libio/wgenops.c
@@ -0,0 +1,756 @@
+/* Copyright (C) 1993, 1995, 1997, 1998, 1999, 2000 Free Software Foundation, Inc.
+   This file is part of the GNU IO Library.
+   Written by Ulrich Drepper .
+   Based on the single byte version by Per Bothner .
+
+   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, if you link this library with files
+   compiled with a GNU compiler to produce an executable, this does
+   not 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.  */
+
+/* Generic or default I/O operations. */
+
+#include "libioP.h"
+#ifdef _GLIBCPP_USE_WCHAR_T
+#ifdef __STDC__
+#include 
+#endif
+#include 
+#include 
+
+
+#ifndef _LIBC
+# define __wmemcpy(dst, src, n) wmemcpy (dst, src, n)
+#endif
+
+
+static int save_for_wbackup __P ((_IO_FILE *fp, wchar_t *end_p))
+#ifdef _LIBC
+     internal_function
+#endif
+     ;
+
+/* Return minimum _pos markers
+   Assumes the current get area is the main get area. */
+_IO_ssize_t _IO_least_wmarker __P ((_IO_FILE *fp, wchar_t *end_p));
+
+_IO_ssize_t
+_IO_least_wmarker (fp, end_p)
+     _IO_FILE *fp;
+     wchar_t *end_p;
+{
+  _IO_ssize_t least_so_far = end_p - fp->_wide_data->_IO_read_base;
+  struct _IO_marker *mark;
+  for (mark = fp->_markers; mark != NULL; mark = mark->_next)
+    if (mark->_pos < least_so_far)
+      least_so_far = mark->_pos;
+  return least_so_far;
+}
+
+/* Switch current get area from backup buffer to (start of) main get area. */
+void
+_IO_switch_to_main_wget_area (fp)
+     _IO_FILE *fp;
+{
+  wchar_t *tmp;
+  fp->_flags &= ~_IO_IN_BACKUP;
+  /* Swap _IO_read_end and _IO_save_end. */
+  tmp = fp->_wide_data->_IO_read_end;
+  fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_save_end;
+  fp->_wide_data->_IO_save_end= tmp;
+  /* Swap _IO_read_base and _IO_save_base. */
+  tmp = fp->_wide_data->_IO_read_base;
+  fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_save_base;
+  fp->_wide_data->_IO_save_base = tmp;
+  /* Set _IO_read_ptr. */
+  fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_base;
+}
+
+
+/* Switch current get area from main get area to (end of) backup area. */
+void
+_IO_switch_to_wbackup_area (fp)
+     _IO_FILE *fp;
+{
+  wchar_t *tmp;
+  fp->_flags |= _IO_IN_BACKUP;
+  /* Swap _IO_read_end and _IO_save_end. */
+  tmp = fp->_wide_data->_IO_read_end;
+  fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_save_end;
+  fp->_wide_data->_IO_save_end = tmp;
+  /* Swap _IO_read_base and _IO_save_base. */
+  tmp = fp->_wide_data->_IO_read_base;
+  fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_save_base;
+  fp->_wide_data->_IO_save_base = tmp;
+  /* Set _IO_read_ptr.  */
+  fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
+}
+
+
+void
+_IO_wsetb (f, b, eb, a)
+     _IO_FILE *f;
+     wchar_t *b;
+     wchar_t *eb;
+     int a;
+{
+  if (f->_wide_data->_IO_buf_base && !(f->_flags & _IO_USER_BUF))
+    FREE_BUF (f->_wide_data->_IO_buf_base, _IO_wblen (f));
+  f->_wide_data->_IO_buf_base = b;
+  f->_wide_data->_IO_buf_end = eb;
+  if (a)
+    f->_flags &= ~_IO_USER_BUF;
+  else
+    f->_flags |= _IO_USER_BUF;
+}
+
+
+wint_t
+_IO_wdefault_pbackfail (fp, c)
+     _IO_FILE *fp;
+     wint_t c;
+{
+  if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base
+      && !_IO_in_backup (fp)
+      && (wint_t) fp->_IO_read_ptr[-1] == c)
+    --fp->_IO_read_ptr;
+  else
+    {
+      /* Need to handle a filebuf in write mode (switch to read mode). FIXME!*/
+      if (!_IO_in_backup (fp))
+	{
+	  /* We need to keep the invariant that the main get area
+	     logically follows the backup area.  */
+	  if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base
+	      && _IO_have_wbackup (fp))
+	    {
+	      if (save_for_wbackup (fp, fp->_wide_data->_IO_read_ptr))
+		return WEOF;
+	    }
+	  else if (!_IO_have_wbackup (fp))
+	    {
+	      /* No backup buffer: allocate one. */
+	      /* Use nshort buffer, if unused? (probably not)  FIXME */
+	      int backup_size = 128;
+	      wchar_t *bbuf = (wchar_t *) malloc (backup_size
+						  * sizeof (wchar_t));
+	      if (bbuf == NULL)
+		return WEOF;
+	      fp->_wide_data->_IO_save_base = bbuf;
+	      fp->_wide_data->_IO_save_end = (fp->_wide_data->_IO_save_base
+					      + backup_size);
+	      fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_end;
+	    }
+	  fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr;
+	  _IO_switch_to_wbackup_area (fp);
+	}
+      else if (fp->_wide_data->_IO_read_ptr <= fp->_wide_data->_IO_read_base)
+	{
+	  /* Increase size of existing backup buffer. */
+	  _IO_size_t new_size;
+	  _IO_size_t old_size = (fp->_wide_data->_IO_read_end
+				 - fp->_wide_data->_IO_read_base);
+	  wchar_t *new_buf;
+	  new_size = 2 * old_size;
+	  new_buf = (wchar_t *) malloc (new_size * sizeof (wchar_t));
+	  if (new_buf == NULL)
+	    return WEOF;
+	  __wmemcpy (new_buf + (new_size - old_size),
+		     fp->_wide_data->_IO_read_base, old_size);
+	  free (fp->_wide_data->_IO_read_base);
+	  _IO_wsetg (fp, new_buf, new_buf + (new_size - old_size),
+		     new_buf + new_size);
+	  fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_read_ptr;
+	}
+
+      *--fp->_wide_data->_IO_read_ptr = c;
+    }
+  return c;
+}
+
+
+void
+_IO_wdefault_finish (fp, dummy)
+     _IO_FILE *fp;
+     int dummy;
+{
+  struct _IO_marker *mark;
+  if (fp->_wide_data->_IO_buf_base && !(fp->_flags & _IO_USER_BUF))
+    {
+      FREE_BUF (fp->_wide_data->_IO_buf_base,
+		_IO_wblen (fp) * sizeof (wchar_t));
+      fp->_wide_data->_IO_buf_base = fp->_wide_data->_IO_buf_end = NULL;
+    }
+
+  for (mark = fp->_markers; mark != NULL; mark = mark->_next)
+    mark->_sbuf = NULL;
+
+  if (fp->_IO_save_base)
+    {
+      free (fp->_wide_data->_IO_save_base);
+      fp->_IO_save_base = NULL;
+    }
+
+#ifdef _IO_MTSAFE_IO
+  _IO_lock_fini (*fp->_lock);
+#endif
+
+  _IO_un_link ((struct _IO_FILE_plus *) fp);
+}
+
+
+wint_t
+_IO_wdefault_uflow (fp)
+     _IO_FILE *fp;
+{
+  wint_t wch;
+  wch = _IO_UNDERFLOW (fp);
+  if (wch == WEOF)
+    return WEOF;
+  return *fp->_wide_data->_IO_read_ptr++;
+}
+
+
+wint_t
+__woverflow (f, wch)
+     _IO_FILE *f;
+     wint_t wch;
+{
+  if (f->_mode == 0)
+    _IO_fwide (f, 1);
+  return _IO_OVERFLOW (f, wch);
+}
+
+
+wint_t
+__wuflow (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
+    return WEOF;
+
+  if (fp->_mode == 0)
+    _IO_fwide (fp, 1);
+  if (_IO_in_put_mode (fp))
+    if (_IO_switch_to_wget_mode (fp) == EOF)
+      return WEOF;
+  if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
+    return *fp->_wide_data->_IO_read_ptr++;
+  if (_IO_in_backup (fp))
+    {
+      _IO_switch_to_main_wget_area (fp);
+      if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
+	return *fp->_wide_data->_IO_read_ptr++;
+    }
+  if (_IO_have_markers (fp))
+    {
+      if (save_for_wbackup (fp, fp->_wide_data->_IO_read_end))
+	return WEOF;
+    }
+  else if (_IO_have_wbackup (fp))
+    _IO_free_wbackup_area (fp);
+  return _IO_UFLOW (fp);
+}
+
+
+wint_t
+__wunderflow (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_mode < 0 || (fp->_mode == 0 && _IO_fwide (fp, 1) != 1))
+    return WEOF;
+
+  if (fp->_mode == 0)
+    _IO_fwide (fp, 1);
+  if (_IO_in_put_mode (fp))
+    if (_IO_switch_to_wget_mode (fp) == EOF)
+      return WEOF;
+  if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
+    return *fp->_wide_data->_IO_read_ptr;
+  if (_IO_in_backup (fp))
+    {
+      _IO_switch_to_main_wget_area (fp);
+      if (fp->_wide_data->_IO_read_ptr < fp->_wide_data->_IO_read_end)
+	return *fp->_wide_data->_IO_read_ptr;
+    }
+  if (_IO_have_markers (fp))
+    {
+      if (save_for_wbackup (fp, fp->_wide_data->_IO_read_end))
+	return WEOF;
+    }
+  else if (_IO_have_backup (fp))
+    _IO_free_wbackup_area (fp);
+  return _IO_UNDERFLOW (fp);
+}
+
+
+_IO_size_t
+_IO_wdefault_xsputn (f, data, n)
+     _IO_FILE *f;
+     const void *data;
+     _IO_size_t n;
+{
+  const wchar_t *s = (const wchar_t *) data;
+  _IO_size_t more = n;
+  if (more <= 0)
+    return 0;
+  for (;;)
+    {
+      /* Space available. */
+      _IO_ssize_t count = (f->_wide_data->_IO_write_end
+			   - f->_wide_data->_IO_write_ptr);
+      if (count > 0)
+	{
+	  if ((_IO_size_t) count > more)
+	    count = more;
+	  if (count > 20)
+	    {
+#ifdef _LIBC
+	      f->_wide_data->_IO_write_ptr =
+		__wmempcpy (f->_wide_data->_IO_write_ptr, s, count);
+#else
+	      memcpy (f->_wide_data->_IO_write_ptr, s, count);
+	      f->_wide_data->_IO_write_ptr += count;
+#endif
+	      s += count;
+            }
+	  else if (count <= 0)
+	    count = 0;
+	  else
+	    {
+	      wchar_t *p = f->_wide_data->_IO_write_ptr;
+	      _IO_ssize_t i;
+	      for (i = count; --i >= 0; )
+		*p++ = *s++;
+	      f->_wide_data->_IO_write_ptr = p;
+            }
+	  more -= count;
+        }
+      if (more == 0 || __woverflow (f, *s++) == WEOF)
+	break;
+      more--;
+    }
+  return n - more;
+}
+
+
+_IO_size_t
+_IO_wdefault_xsgetn (fp, data, n)
+     _IO_FILE *fp;
+     void *data;
+     _IO_size_t n;
+{
+  _IO_size_t more = n;
+  wchar_t *s = (wchar_t*) data;
+  for (;;)
+    {
+      /* Data available. */
+      _IO_ssize_t count = (fp->_wide_data->_IO_read_end
+			   - fp->_wide_data->_IO_read_ptr);
+      if (count > 0)
+	{
+	  if ((_IO_size_t) count > more)
+	    count = more;
+	  if (count > 20)
+	    {
+#ifdef _LIBC
+	      s = __wmempcpy (s, fp->_wide_data->_IO_read_ptr, count);
+#else
+	      memcpy (s, fp->_wide_data->_IO_read_ptr, count);
+	      s += count;
+#endif
+	      fp->_wide_data->_IO_read_ptr += count;
+	    }
+	  else if (count <= 0)
+	    count = 0;
+	  else
+	    {
+	      wchar_t *p = fp->_wide_data->_IO_read_ptr;
+	      int i = (int) count;
+	      while (--i >= 0)
+		*s++ = *p++;
+	      fp->_wide_data->_IO_read_ptr = p;
+            }
+            more -= count;
+        }
+      if (more == 0 || __wunderflow (fp) == WEOF)
+	break;
+    }
+  return n - more;
+}
+
+
+void
+_IO_wdoallocbuf (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_wide_data->_IO_buf_base)
+    return;
+  if (!(fp->_flags & _IO_UNBUFFERED))
+    if (_IO_DOALLOCATE (fp) != WEOF)
+      return;
+  _IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1, 0);
+}
+
+
+_IO_FILE *
+_IO_wdefault_setbuf (fp, p, len)
+     _IO_FILE *fp;
+     wchar_t *p;
+     _IO_ssize_t len;
+{
+  if (_IO_SYNC (fp) == EOF)
+    return NULL;
+  if (p == NULL || len == 0)
+    {
+      fp->_flags |= _IO_UNBUFFERED;
+      _IO_wsetb (fp, fp->_wide_data->_shortbuf, fp->_wide_data->_shortbuf + 1,
+		 0);
+    }
+  else
+    {
+      fp->_flags &= ~_IO_UNBUFFERED;
+      _IO_wsetb (fp, p, p + len, 0);
+    }
+  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr
+    = fp->_wide_data->_IO_write_end = 0;
+  fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_ptr
+    = fp->_wide_data->_IO_read_end = 0;
+  return fp;
+}
+
+
+int
+_IO_wdefault_doallocate (fp)
+     _IO_FILE *fp;
+{
+  wchar_t *buf;
+
+  ALLOC_WBUF (buf, _IO_BUFSIZ, EOF);
+  _IO_wsetb (fp, buf, buf + _IO_BUFSIZ, 1);
+  return 1;
+}
+
+
+int
+_IO_switch_to_wget_mode (fp)
+     _IO_FILE *fp;
+{
+  if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_write_base)
+    if (_IO_OVERFLOW (fp, WEOF) == WEOF)
+      return EOF;
+  if (_IO_in_backup (fp))
+    fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_backup_base;
+  else
+    {
+      fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_buf_base;
+      if (fp->_wide_data->_IO_write_ptr > fp->_wide_data->_IO_read_end)
+	fp->_wide_data->_IO_read_end = fp->_wide_data->_IO_write_ptr;
+    }
+  fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_write_ptr;
+
+  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_write_ptr
+    = fp->_wide_data->_IO_write_end = fp->_wide_data->_IO_read_ptr;
+
+  fp->_flags &= ~_IO_CURRENTLY_PUTTING;
+  return 0;
+}
+
+void
+_IO_free_wbackup_area (fp)
+     _IO_FILE *fp;
+{
+  if (_IO_in_backup (fp))
+    _IO_switch_to_main_wget_area (fp);  /* Just in case. */
+  free (fp->_wide_data->_IO_save_base);
+  fp->_wide_data->_IO_save_base = NULL;
+  fp->_wide_data->_IO_save_end = NULL;
+  fp->_wide_data->_IO_backup_base = NULL;
+}
+
+#if 0
+int
+_IO_switch_to_wput_mode (fp)
+     _IO_FILE *fp;
+{
+  fp->_wide_data->_IO_write_base = fp->_wide_data->_IO_read_ptr;
+  fp->_wide_data->_IO_write_ptr = fp->_wide_data->_IO_read_ptr;
+  /* Following is wrong if line- or un-buffered? */
+  fp->_wide_data->_IO_write_end = (fp->_flags & _IO_IN_BACKUP
+				   ? fp->_wide_data->_IO_read_end
+				   : fp->_wide_data->_IO_buf_end);
+
+  fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end;
+  fp->_wide_data->_IO_read_base = fp->_wide_data->_IO_read_end;
+
+  fp->_flags |= _IO_CURRENTLY_PUTTING;
+  return 0;
+}
+#endif
+
+
+static int
+#ifdef _LIBC
+internal_function
+#endif
+save_for_wbackup (fp, end_p)
+     _IO_FILE *fp;
+     wchar_t *end_p;
+{
+  /* Append [_IO_read_base..end_p] to backup area. */
+  _IO_ssize_t least_mark = _IO_least_wmarker (fp, end_p);
+  /* needed_size is how much space we need in the backup area. */
+  _IO_size_t needed_size = ((end_p - fp->_wide_data->_IO_read_base)
+			    - least_mark);
+  /* FIXME: Dubious arithmetic if pointers are NULL */
+  _IO_size_t current_Bsize = (fp->_wide_data->_IO_save_end
+			      - fp->_wide_data->_IO_save_base);
+  _IO_size_t avail; /* Extra space available for future expansion. */
+  _IO_ssize_t delta;
+  struct _IO_marker *mark;
+  if (needed_size > current_Bsize)
+    {
+      wchar_t *new_buffer;
+      avail = 100;
+      new_buffer = (wchar_t *) malloc ((avail + needed_size)
+				       * sizeof (wchar_t));
+      if (new_buffer == NULL)
+	return EOF;		/* FIXME */
+      if (least_mark < 0)
+	{
+#ifdef _LIBC
+	  __wmempcpy (__wmempcpy (new_buffer + avail,
+				  fp->_wide_data->_IO_save_end + least_mark,
+				  -least_mark),
+		      fp->_wide_data->_IO_read_base,
+		      end_p - fp->_wide_data->_IO_read_base);
+#else
+	  memcpy (new_buffer + avail,
+		  fp->_wide_data->_IO_save_end + least_mark,
+		  -least_mark * sizeof (wchar_t));
+	  memcpy (new_buffer + avail - least_mark,
+		  fp->_wide_data->_IO_read_base,
+		  (end_p - fp->_wide_data->_IO_read_base) * sizeof (wchar_t));
+#endif
+	}
+      else
+	{
+#ifdef _LIBC
+	  __wmemcpy (new_buffer + avail,
+		     fp->_wide_data->_IO_read_base + least_mark,
+		     needed_size);
+#else
+	  memcpy (new_buffer + avail,
+		  fp->_wide_data->_IO_read_base + least_mark,
+		  needed_size * sizeof (wchar_t));
+#endif
+	}
+      if (fp->_wide_data->_IO_save_base)
+	free (fp->_wide_data->_IO_save_base);
+      fp->_wide_data->_IO_save_base = new_buffer;
+      fp->_wide_data->_IO_save_end = new_buffer + avail + needed_size;
+    }
+  else
+    {
+      avail = current_Bsize - needed_size;
+      if (least_mark < 0)
+	{
+#ifdef _LIBC
+	  __wmemmove (fp->_wide_data->_IO_save_base + avail,
+		      fp->_wide_data->_IO_save_end + least_mark,
+		      -least_mark);
+	  __wmemcpy (fp->_wide_data->_IO_save_base + avail - least_mark,
+		     fp->_wide_data->_IO_read_base,
+		     end_p - fp->_wide_data->_IO_read_base);
+#else
+	  memmove (fp->_wide_data->_IO_save_base + avail,
+		   fp->_wide_data->_IO_save_end + least_mark,
+		   -least_mark * sizeof (wchar_t));
+	  memcpy (fp->_wide_data->_IO_save_base + avail - least_mark,
+		  fp->_wide_data->_IO_read_base,
+		  (end_p - fp->_wide_data->_IO_read_base) * sizeof (wchar_t));
+#endif
+	}
+      else if (needed_size > 0)
+#ifdef _LIBC
+	__wmemcpy (fp->_wide_data->_IO_save_base + avail,
+		   fp->_wide_data->_IO_read_base + least_mark,
+		   needed_size);
+#else
+	memcpy (fp->_wide_data->_IO_save_base + avail,
+		fp->_wide_data->_IO_read_base + least_mark,
+		needed_size * sizeof (wchar_t));
+#endif
+    }
+  fp->_wide_data->_IO_backup_base = fp->_wide_data->_IO_save_base + avail;
+  /* Adjust all the streammarkers. */
+  delta = end_p - fp->_wide_data->_IO_read_base;
+  for (mark = fp->_markers; mark != NULL; mark = mark->_next)
+    mark->_pos -= delta;
+  return 0;
+}
+
+wint_t
+_IO_sputbackwc (fp, c)
+     _IO_FILE *fp;
+     wint_t c;
+{
+  wint_t result;
+
+  if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base
+      && (wchar_t)fp->_wide_data->_IO_read_ptr[-1] == (wchar_t) c)
+    {
+      fp->_wide_data->_IO_read_ptr--;
+      result = c;
+    }
+  else
+    result = _IO_PBACKFAIL (fp, c);
+
+  if (result != EOF)
+    fp->_flags &= ~_IO_EOF_SEEN;
+
+  return result;
+}
+
+wint_t
+_IO_sungetwc (fp)
+     _IO_FILE *fp;
+{
+  int result;
+
+  if (fp->_wide_data->_IO_read_ptr > fp->_wide_data->_IO_read_base)
+    {
+      fp->_wide_data->_IO_read_ptr--;
+      result = *fp->_wide_data->_IO_read_ptr;
+    }
+  else
+    result = _IO_PBACKFAIL (fp, EOF);
+
+  if (result != WEOF)
+    fp->_flags &= ~_IO_EOF_SEEN;
+
+  return result;
+}
+
+
+unsigned
+_IO_adjust_wcolumn (start, line, count)
+     unsigned start;
+     const wchar_t *line;
+     int count;
+{
+  const wchar_t *ptr = line + count;
+  while (ptr > line)
+    if (*--ptr == L'\n')
+      return line + count - ptr - 1;
+  return start + count;
+}
+
+void
+_IO_init_wmarker (marker, fp)
+     struct _IO_marker *marker;
+     _IO_FILE *fp;
+{
+  marker->_sbuf = fp;
+  if (_IO_in_put_mode (fp))
+    _IO_switch_to_wget_mode (fp);
+  if (_IO_in_backup (fp))
+    marker->_pos = fp->_wide_data->_IO_read_ptr - fp->_wide_data->_IO_read_end;
+  else
+    marker->_pos = (fp->_wide_data->_IO_read_ptr
+		    - fp->_wide_data->_IO_read_base);
+
+  /* Should perhaps sort the chain? */
+  marker->_next = fp->_markers;
+  fp->_markers = marker;
+}
+
+#define BAD_DELTA EOF
+
+/* Return difference between MARK and current position of MARK's stream. */
+int
+_IO_wmarker_delta (mark)
+     struct _IO_marker *mark;
+{
+  int cur_pos;
+  if (mark->_sbuf == NULL)
+    return BAD_DELTA;
+  if (_IO_in_backup (mark->_sbuf))
+    cur_pos = (mark->_sbuf->_wide_data->_IO_read_ptr
+	       - mark->_sbuf->_wide_data->_IO_read_end);
+  else
+    cur_pos = (mark->_sbuf->_wide_data->_IO_read_ptr
+	       - mark->_sbuf->_wide_data->_IO_read_base);
+  return mark->_pos - cur_pos;
+}
+
+int
+_IO_seekwmark (fp, mark, delta)
+     _IO_FILE *fp;
+     struct _IO_marker *mark;
+     int delta;
+{
+  if (mark->_sbuf != fp)
+    return EOF;
+ if (mark->_pos >= 0)
+    {
+      if (_IO_in_backup (fp))
+	_IO_switch_to_main_wget_area (fp);
+      fp->_wide_data->_IO_read_ptr = (fp->_wide_data->_IO_read_base
+				      + mark->_pos);
+    }
+  else
+    {
+      if (!_IO_in_backup (fp))
+	_IO_switch_to_wbackup_area (fp);
+      fp->_wide_data->_IO_read_ptr = fp->_wide_data->_IO_read_end + mark->_pos;
+    }
+  return 0;
+}
+
+void
+_IO_unsave_wmarkers (fp)
+     _IO_FILE *fp;
+{
+  struct _IO_marker *mark = fp->_markers;
+  if (mark)
+    {
+#ifdef TODO
+      streampos offset = seekoff (0, ios::cur, ios::in);
+      if (offset != EOF)
+	{
+	  offset += eGptr () - Gbase ();
+	  for ( ; mark != NULL; mark = mark->_next)
+	    mark->set_streampos (mark->_pos + offset);
+	}
+    else
+      {
+	for ( ; mark != NULL; mark = mark->_next)
+	  mark->set_streampos (EOF);
+      }
+#endif
+      fp->_markers = 0;
+    }
+
+  if (_IO_have_backup (fp))
+    _IO_free_wbackup_area (fp);
+}
+
+#endif /* _GLIBCPP_USE_WCHAR_T */
diff --git a/contrib/libstdc++/libmath/Makefile.am b/contrib/libstdc++/libmath/Makefile.am
new file mode 100644
index 0000000..27d76e9
--- /dev/null
+++ b/contrib/libstdc++/libmath/Makefile.am
@@ -0,0 +1,45 @@
+## Makefile for the math subdirectory of the GNU C++ Standard library.
+##
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002 
+## Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## 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.
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+noinst_LTLIBRARIES = libmath.la
+
+libmath_la_LIBADD = @LIBMATHOBJS@ 
+
+libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
+
+libmath_la_SOURCES = stubs.c
+
+LINK = \
+	$(LIBTOOL) --tag CC --mode=link "$(CCLD)" \
+	$(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+
+INCLUDES = \
+	$(TOPLEVEL_INCLUDES) 
diff --git a/contrib/libstdc++/libmath/Makefile.in b/contrib/libstdc++/libmath/Makefile.in
new file mode 100644
index 0000000..4ac55ad
--- /dev/null
+++ b/contrib/libstdc++/libmath/Makefile.in
@@ -0,0 +1,393 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+AS = @AS@
+ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+AWK = @AWK@
+BASIC_FILE_H = @BASIC_FILE_H@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCODECVT_C = @CCODECVT_C@
+CCODECVT_H = @CCODECVT_H@
+CLOCALE_H = @CLOCALE_H@
+CMESSAGES_H = @CMESSAGES_H@
+CPP = @CPP@
+CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
+CSHADOW_FLAGS = @CSHADOW_FLAGS@
+CSTDIO_H = @CSTDIO_H@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DATADIRNAME = @DATADIRNAME@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DLLTOOL = @DLLTOOL@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIBICONV = @LIBICONV@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+STRIP = @STRIP@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+check_msgfmt = @check_msgfmt@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+glibcpp_CXX = @glibcpp_CXX@
+glibcpp_MOFILES = @glibcpp_MOFILES@
+glibcpp_POFILES = @glibcpp_POFILES@
+glibcpp_basedir = @glibcpp_basedir@
+glibcpp_builddir = @glibcpp_builddir@
+glibcpp_localedir = @glibcpp_localedir@
+glibcpp_prefixdir = @glibcpp_prefixdir@
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_thread_h = @glibcpp_thread_h@
+glibcpp_toolexecdir = @glibcpp_toolexecdir@
+glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+ifGNUmake = @ifGNUmake@
+libio_la = @libio_la@
+libtool_VERSION = @libtool_VERSION@
+release_VERSION = @release_VERSION@
+toplevel_srcdir = @toplevel_srcdir@
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+noinst_LTLIBRARIES = libmath.la
+
+libmath_la_LIBADD = @LIBMATHOBJS@ 
+
+libmath_la_DEPENDENCIES = $(libmath_la_LIBADD)
+
+libmath_la_SOURCES = stubs.c
+
+LINK = \
+	$(LIBTOOL) --tag CC --mode=link "$(CCLD)" \
+	$(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+
+INCLUDES = \
+	$(TOPLEVEL_INCLUDES) 
+
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LTLIBRARIES =  $(noinst_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libmath_la_LDFLAGS = 
+libmath_la_OBJECTS =  stubs.lo
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libmath_la_SOURCES)
+OBJECTS = $(libmath_la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .lo .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus libmath/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLTLIBRARIES:
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+
+distclean-noinstLTLIBRARIES:
+
+maintainer-clean-noinstLTLIBRARIES:
+
+.c.o:
+	$(COMPILE) -c $<
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+	-rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libmath.la: $(libmath_la_OBJECTS) $(libmath_la_DEPENDENCIES)
+	$(LINK)  $(libmath_la_LDFLAGS) $(libmath_la_OBJECTS) $(libmath_la_LIBADD) $(LIBS)
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = libmath
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am: 
+install-info: install-info-am
+install-exec-am:
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am:
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLTLIBRARIES mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLTLIBRARIES clean-compile clean-libtool \
+		clean-tags clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLTLIBRARIES distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-noinstLTLIBRARIES \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
+clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/libstdc++/libmath/copysignf.c b/contrib/libstdc++/libmath/copysignf.c
new file mode 100644
index 0000000..91d40e9
--- /dev/null
+++ b/contrib/libstdc++/libmath/copysignf.c
@@ -0,0 +1,39 @@
+/* Copy sign of one number to another.  */
+
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+
+   This file is part of the GNU ISO C++ Library.  This library is free
+   software; you can redistribute it and/or modify it under the
+   terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this library; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.
+
+   As a special exception, you may use this file as part of a free software
+   library without restriction.  Specifically, if other files instantiate
+   templates or use macros or inline functions from this file, or you compile
+   this file and link it with other files to produce an executable, this
+   file does not by itself cause the resulting executable to be covered by
+   the GNU General Public License.  This exception does not however
+   invalidate any other reasons why the executable file might be covered by
+   the GNU General Public License.  */
+
+
+#include 
+#include "mathconf.h"
+
+float
+copysignf (float x, float y)
+{
+  /* We use the double version.  */
+  return copysign (x, y);
+}
diff --git a/contrib/libstdc++/libmath/mathconf.h b/contrib/libstdc++/libmath/mathconf.h
new file mode 100644
index 0000000..087631a
--- /dev/null
+++ b/contrib/libstdc++/libmath/mathconf.h
@@ -0,0 +1,314 @@
+/* Configuration data for libmath subpart of libstdc++. */
+
+/* Copyright (C) 1997-1999, 2000, 2001 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 
+
+#ifdef HAVE_ENDIAN_H
+# include 
+#else
+# ifdef HAVE_MACHINE_ENDIAN_H
+#  ifdef HAVE_SYS_TYPES_H
+#   include 
+#  endif
+#  include 
+# else
+#  ifdef HAVE_SYS_MACHINE_H
+#   include 
+#  else
+#   if defined HAVE_SYS_ISA_DEFS_H || defined HAVE_MACHINE_PARAM_H
+/* This is on Solaris.  */
+#    ifdef HAVE_SYS_ISA_DEFS_H
+#     include 
+#    endif
+#    ifdef HAVE_MACHINE_PARAM_H
+#     include 
+#    endif
+#    ifdef _LITTLE_ENDIAN
+#     define LITTLE_ENDIAN 1
+#    endif
+#    ifdef _BIG_ENDIAN
+#     define BIG_ENDIAN 1
+#    endif
+#    define BYTE_ORDER 1
+#   else
+/* We have to rely on the AC_C_BIGENDIAN test.  */
+#    ifdef WORDS_BIGENDIAN
+#     define BIG_ENDIAN 1
+#    else
+#     define LITTLE_ENDIAN 1
+#    endif
+#    define BYTE_ORDER 1
+#   endif
+#  endif
+# endif
+#endif
+
+typedef unsigned int U_int32_t __attribute ((mode (SI)));
+typedef int Int32_t __attribute ((mode (SI)));
+typedef unsigned int U_int64_t __attribute ((mode (DI)));
+typedef int Int64_t __attribute ((mode (DI)));
+
+#ifdef HAVE_NAN_H
+# include 
+#endif
+
+#ifndef NAN
+# define NAN (nan())
+double nan (void);
+#endif
+
+#ifdef HAVE_IEEEFP_H
+# include 
+#endif
+
+#ifdef HAVE_FP_H
+# include 
+#endif
+
+#ifdef HAVE_FLOAT_H
+# include 
+#endif
+
+/* `float' variant of HUGE_VAL.  */
+#ifndef HUGE_VALF
+# ifdef HUGE_VALf
+#  define HUGE_VALF HUGE_VALf
+# else
+#  define HUGE_VALF HUGE_VAL
+# endif
+#endif
+
+/* `long double' variant of HUGE_VAL.  */
+#ifndef HUGE_VALL
+# ifdef HUGE_VALl
+#  define HUGE_VALL HUGE_VALl
+# else
+#  define HUGE_VALL HUGE_VAL
+# endif
+#endif
+
+/* Make sure that at least HUGE_VAL is defined.  */
+#ifndef HUGE_VAL
+# ifdef HUGE
+#  define HUGE_VAL HUGE
+# else
+#  ifdef MAXFLOAT
+#   define HUGE_VAL MAXFLOAT
+#  else
+#   error "We need HUGE_VAL!"
+#  endif
+# endif
+#endif
+
+#ifndef M_PI
+# define M_PI 3.14159265358979323846
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* signbit is a macro in ISO C99.  */
+#ifndef signbit
+extern int __signbitf (float);
+extern int __signbit (double);
+extern int __signbitl (long double);
+
+# define signbit(x) \
+     (sizeof (x) == sizeof (float) ?                                          \
+        __signbitf (x)                                                        \
+      : sizeof (x) == sizeof (double) ?                                       \
+        __signbit (x) : __signbitl (x))
+#endif
+
+#if BYTE_ORDER == BIG_ENDIAN
+typedef union
+{
+  double value;
+  struct
+  {
+    U_int32_t msw;
+    U_int32_t lsw;
+  } parts;
+} ieee_double_shape_type;
+#endif
+#if BYTE_ORDER == LITTLE_ENDIAN
+typedef union
+{
+  double value;
+  struct
+  {
+    U_int32_t lsw;
+    U_int32_t msw;
+  } parts;
+} ieee_double_shape_type;
+#endif
+/* Get the more significant 32 bit int from a double.  */
+#define GET_HIGH_WORD(i,d)                                      \
+do {                                                            \
+  ieee_double_shape_type gh_u;                                  \
+  gh_u.value = (d);                                             \
+  (i) = gh_u.parts.msw;                                         \
+} while (0)
+
+
+typedef union
+{
+  float value;
+  U_int32_t word;
+} ieee_float_shape_type;
+/* Get a 32 bit int from a float.  */
+#define GET_FLOAT_WORD(i,d)                                     \
+do {                                                            \
+  ieee_float_shape_type gf_u;                                   \
+  gf_u.value = (d);                                             \
+  (i) = gf_u.word;                                              \
+} while (0)
+
+
+#if BYTE_ORDER == BIG_ENDIAN
+typedef union
+{
+  long double value;
+  struct
+  {
+    unsigned int sign_exponent:16;
+    unsigned int empty:16;
+    U_int32_t msw;
+    U_int32_t lsw;
+  } parts;
+} ieee_long_double_shape_type;
+#endif
+#if BYTE_ORDER == LITTLE_ENDIAN
+typedef union
+{
+  long double value;
+  struct
+  {
+    U_int32_t lsw;
+    U_int32_t msw;
+    unsigned int sign_exponent:16;
+    unsigned int empty:16;
+  } parts;
+} ieee_long_double_shape_type;
+#endif
+/* Get int from the exponent of a long double.  */
+#define GET_LDOUBLE_EXP(exp,d)                                  \
+do {                                                            \
+  ieee_long_double_shape_type ge_u;                             \
+  ge_u.value = (d);                                             \
+  (exp) = ge_u.parts.sign_exponent;                             \
+} while (0)
+
+#if BYTE_ORDER == BIG_ENDIAN
+typedef union
+{
+  long double value;
+  struct
+  {
+    U_int64_t msw;
+    U_int64_t lsw;
+  } parts64;
+  struct
+  {
+    U_int32_t w0, w1, w2, w3;
+  } parts32;
+} ieee_quad_double_shape_type;
+#endif
+#if BYTE_ORDER == LITTLE_ENDIAN
+typedef union
+{
+  long double value;
+  struct
+  {
+    U_int64_t lsw;
+    U_int64_t msw;
+  } parts64;
+  struct
+  {
+    U_int32_t w3, w2, w1, w0;
+  } parts32;
+} ieee_quad_double_shape_type;
+#endif
+/* Get most significant 64 bit int from a quad long double.  */
+#define GET_LDOUBLE_MSW64(msw,d)				\
+do {								\
+  ieee_quad_double_shape_type qw_u;				\
+  qw_u.value = (d);						\
+  (msw) = qw_u.parts64.msw;					\
+} while (0)
+
+
+/* Replacement for non-existing float functions.  */
+#if !defined(HAVE_FABSF) && !defined(HAVE___BUILTIN_FABSF)
+# define fabsf(x) fabs (x)
+#endif
+#if !defined(HAVE_COSF) && !defined(HAVE___BUILTIN_COSF)
+# define cosf(x) cos (x)
+#endif
+#ifndef HAVE_COSHF
+# define coshf(x) cosh (x)
+#endif
+#ifndef HAVE_EXPF
+# define expf(x) expf (x)
+#endif
+#ifndef HAVE_LOGF
+# define logf(x) log(x)
+#endif
+#ifndef HAVE_LOG10F
+# define log10f(x) log10 (x)
+#endif
+#ifndef HAVE_POWF
+# define powf(x, y) pow (x, y)
+#endif
+#if !defined(HAVE_SINF) && !defined(HAVE___BUILTIN_SINF)
+# define sinf(x) sin (x)
+#endif
+#ifndef HAVE_SINHF
+# define sinhf(x) sinh (x)
+#endif
+#if !defined(HAVE_SQRTF) && !defined(HAVE___BUILTIN_SQRTF)
+# define sqrtf(x) sqrt (x)
+#endif
+#ifndef HAVE_TANF
+# define tanf(x) tan (x)
+#endif
+#ifndef HAVE_TANHF
+# define tanhf(x) tanh (x)
+#endif
+#ifndef HAVE_STRTOF
+# define strtof(s, e) strtod (s, e)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+
diff --git a/contrib/libstdc++/libmath/nan.c b/contrib/libstdc++/libmath/nan.c
new file mode 100644
index 0000000..1814b5d
--- /dev/null
+++ b/contrib/libstdc++/libmath/nan.c
@@ -0,0 +1,36 @@
+/* Return quiet nan. */
+
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+
+   This file is part of the GNU ISO C++ Library.  This library is free
+   software; you can redistribute it and/or modify it under the
+   terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this library; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.
+
+   As a special exception, you may use this file as part of a free software
+   library without restriction.  Specifically, if other files instantiate
+   templates or use macros or inline functions from this file, or you compile
+   this file and link it with other files to produce an executable, this
+   file does not by itself cause the resulting executable to be covered by
+   the GNU General Public License.  This exception does not however
+   invalidate any other reasons why the executable file might be covered by
+   the GNU General Public License.  */
+
+
+#include 
+#include 
+
+double
+nan ()
+{ return strtod ("nan", NULL); }
diff --git a/contrib/libstdc++/libmath/signbit.c b/contrib/libstdc++/libmath/signbit.c
new file mode 100644
index 0000000..f400b8d
--- /dev/null
+++ b/contrib/libstdc++/libmath/signbit.c
@@ -0,0 +1,41 @@
+/* Return nonzero value if number is negative. */
+
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+
+   This file is part of the GNU ISO C++ Library.  This library is free
+   software; you can redistribute it and/or modify it under the
+   terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this library; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.
+
+   As a special exception, you may use this file as part of a free software
+   library without restriction.  Specifically, if other files instantiate
+   templates or use macros or inline functions from this file, or you compile
+   this file and link it with other files to produce an executable, this
+   file does not by itself cause the resulting executable to be covered by
+   the GNU General Public License.  This exception does not however
+   invalidate any other reasons why the executable file might be covered by
+   the GNU General Public License.  */
+
+
+#include 
+#include "mathconf.h"
+
+int
+__signbit (double x)
+{
+  Int32_t hx;
+
+  GET_HIGH_WORD (hx, x);
+  return hx & 0x80000000;
+}
diff --git a/contrib/libstdc++/libmath/signbitf.c b/contrib/libstdc++/libmath/signbitf.c
new file mode 100644
index 0000000..6a72f46
--- /dev/null
+++ b/contrib/libstdc++/libmath/signbitf.c
@@ -0,0 +1,41 @@
+/* Return nonzero value if number is negative. */
+
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+
+   This file is part of the GNU ISO C++ Library.  This library is free
+   software; you can redistribute it and/or modify it under the
+   terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this library; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.
+
+   As a special exception, you may use this file as part of a free software
+   library without restriction.  Specifically, if other files instantiate
+   templates or use macros or inline functions from this file, or you compile
+   this file and link it with other files to produce an executable, this
+   file does not by itself cause the resulting executable to be covered by
+   the GNU General Public License.  This exception does not however
+   invalidate any other reasons why the executable file might be covered by
+   the GNU General Public License.  */
+
+
+#include 
+#include "mathconf.h"
+
+int
+__signbitf (float x)
+{
+  Int32_t hx;
+
+  GET_FLOAT_WORD (hx, x);
+  return hx & 0x80000000;
+}
diff --git a/contrib/libstdc++/libmath/signbitl.c b/contrib/libstdc++/libmath/signbitl.c
new file mode 100644
index 0000000..f5e0035
--- /dev/null
+++ b/contrib/libstdc++/libmath/signbitl.c
@@ -0,0 +1,48 @@
+/* Return nonzero value if number is negative. */
+
+/* Copyright (C) 1997, 1998, 1999 Free Software Foundation, Inc.
+
+   This file is part of the GNU ISO C++ Library.  This library is free
+   software; you can redistribute it and/or modify it under the
+   terms of the GNU General Public License as published by the
+   Free Software Foundation; either version 2, or (at your option)
+   any later version.
+
+   This library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License along
+   with this library; see the file COPYING.  If not, write to the Free
+   Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+   USA.
+
+   As a special exception, you may use this file as part of a free software
+   library without restriction.  Specifically, if other files instantiate
+   templates or use macros or inline functions from this file, or you compile
+   this file and link it with other files to produce an executable, this
+   file does not by itself cause the resulting executable to be covered by
+   the GNU General Public License.  This exception does not however
+   invalidate any other reasons why the executable file might be covered by
+   the GNU General Public License.  */
+
+#include 
+#include 
+#include "mathconf.h"
+
+int
+__signbitl (long double x)
+{
+#if LDBL_MANT_DIG == 113
+  Int64_t msw;
+
+  GET_LDOUBLE_MSW64 (msw, x);
+  return msw < 0;
+#else
+  Int32_t e;
+
+  GET_LDOUBLE_EXP (e, x);
+  return e & 0x8000;
+#endif
+}
diff --git a/contrib/libstdc++/libmath/stubs.c b/contrib/libstdc++/libmath/stubs.c
new file mode 100644
index 0000000..586fd6d
--- /dev/null
+++ b/contrib/libstdc++/libmath/stubs.c
@@ -0,0 +1,271 @@
+/* Stub definitions for libmath subpart of libstdc++. */
+
+/* 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
+   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 
+#include "config.h"
+
+/* For targets which do not have support for long double versions,
+   we use the crude approximation.  We'll do better later.  */
+
+
+#ifndef HAVE_ATAN2F
+float
+atan2f(float x, float y)
+{
+  return (float) atan2(x, y);
+}
+#endif
+
+#ifndef HAVE_ATAN2L
+long double
+atan2l(long double x, long double y)
+{
+  return atan2((double) x, (double) y);
+}
+#endif
+
+
+#ifndef HAVE_COSF
+float
+cosf(float x)
+{
+  return (float) cos(x);
+}
+#endif
+
+#ifndef HAVE_COSL
+long double
+cosl(long double x)
+{
+  return cos((double) x);
+}
+#endif
+
+
+#ifndef HAVE_COSHF
+float
+coshf(float x)
+{
+  return (float) cosh(x);
+}
+#endif
+
+#ifndef HAVE_COSHL
+long double
+coshl(long double x)
+{
+  return cosh((double) x);
+}
+#endif
+
+
+#ifndef HAVE_EXPF
+float
+expf(float x)
+{
+  return (float) exp(x);
+}
+#endif
+
+#ifndef HAVE_EXPL
+long double
+expl(long double x)
+{
+  return exp((double) x);
+}
+#endif
+
+
+/* Compute the hypothenuse of a right triangle with side x and y.  */
+#ifndef HAVE_HYPOTF
+float
+hypotf(float x, float y)
+{
+  float s = fabsf(x) + fabsf(y);
+  x /= s; y /= s;
+  return s * sqrtf(x * x + y * y);
+}
+#endif
+
+#ifndef HAVE_HYPOT
+double
+hypot(double x, double y)
+{
+  double s = fabs(x) + fabs(y);
+  x /= s; y /= s;
+  return s * sqrt(x * x + y * y);
+}
+#endif
+
+#ifndef HAVE_HYPOTL
+long double
+hypotl(long double x, long double y)
+{
+  long double s = fabsl(x) + fabsl(y);
+  x /= s; y /= s;
+  return s * sqrtl(x * x + y * y);
+}
+#endif
+
+
+
+#ifndef HAVE_LOGF
+float
+logf(float x)
+{
+  return (float) log(x);
+}
+#endif
+
+#ifndef HAVE_LOGL
+long double
+logl(long double x)
+{
+  return log((double) x);
+}
+#endif
+
+
+#ifndef HAVE_LOG10F
+float
+log10f(float x)
+{
+  return (float) log10(x);
+}
+#endif
+
+#ifndef HAVE_LOG10L
+long double
+log10l(long double x)
+{
+  return log10((double) x);
+}
+#endif
+
+
+#ifndef HAVE_POWF
+float
+powf(float x, float y)
+{
+  return (float) pow(x, y);
+}
+#endif
+
+#ifndef HAVE_POWL
+long double
+powl(long double x, long double y)
+{
+  return pow((double) x, (double) y);
+}
+#endif
+
+
+#ifndef HAVE_SINF
+float
+sinf(float x)
+{
+  return (float) sin(x);
+}
+#endif
+
+#ifndef HAVE_SINL
+long double
+sinl(long double x)
+{
+  return sin((double) x);
+}
+#endif
+
+
+#ifndef HAVE_SINHF
+float
+sinhf(float x)
+{
+  return (float) sinh(x);
+}
+#endif
+
+#ifndef HAVE_SINHL
+long double
+sinhl(long double x)
+{
+  return sinh((double) x);
+}
+#endif
+
+
+#ifndef HAVE_SQRTF
+float
+sqrtf(float x)
+{
+  return (float) sqrt(x);
+}
+#endif
+
+#ifndef HAVE_SQRTL
+long double
+sqrtl(long double x)
+{
+  return  sqrt((double) x);
+}
+#endif
+
+
+#ifndef HAVE_TANF
+float
+tanf(float x)
+{
+  return (float) tan(x);
+}
+#endif
+
+#ifndef HAVE_TANL
+long double
+tanl(long double x)
+{
+  return tan((double) x);
+}
+#endif
+
+
+#ifndef HAVE_TANHF
+float
+tanhf(float x)
+{
+  return (float) tanh(x);
+}
+#endif
+
+#ifndef HAVE_TANHL
+long double
+tanhl(long double x)
+{
+  return tanh((double) x);
+}
+#endif
diff --git a/contrib/libstdc++/libsupc++/Makefile.am b/contrib/libstdc++/libsupc++/Makefile.am
new file mode 100644
index 0000000..e37613f
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/Makefile.am
@@ -0,0 +1,189 @@
+## Makefile for the GNU C++ Support library.
+##
+## Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+##
+## Process this file with automake to produce Makefile.in.
+##
+## This file is part of GNU CC.
+##
+## GNU CC 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.
+##
+## GNU CC 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 GNU CC; see the file COPYING.  If not, write to
+## the Free Software Foundation, 59 Temple Place - Suite 330,
+## Boston, MA 02111-1307, USA. 
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Cross compiler and multilib support.
+CC = @CC@
+CXX = @glibcpp_CXX@
+toolexecdir = @glibcpp_toolexecdir@
+toolexeclibdir = @glibcpp_toolexeclibdir@
+
+
+# Need this library to both be part of libstdc++.a, and installed
+# separately too.
+# 1) separate libsupc++.la 
+toolexeclib_LTLIBRARIES = libsupc++.la
+# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
+noinst_LTLIBRARIES = libsupc++convenience.la
+
+
+# Compile flags that should be constant throughout the build, both for
+# SUBDIRS and for libstdc++-v3 in general.
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
+# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
+CONFIG_CXXFLAGS = \
+	@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ 
+
+# Warning flags to use.
+WARN_CXXFLAGS = \
+	@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+
+INCLUDES = \
+	-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
+	$(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+
+headers = \
+	exception new typeinfo cxxabi.h exception_defines.h 
+
+sources = \
+	cxa_demangle.c \
+	del_op.cc \
+	del_opnt.cc \
+	del_opv.cc \
+	del_opvnt.cc \
+	dyn-string.c \
+	eh_alloc.cc \
+	eh_aux_runtime.cc \
+	eh_catch.cc \
+	eh_exception.cc \
+	eh_globals.cc \
+	eh_personality.cc \
+	eh_terminate.cc \
+	eh_throw.cc \
+	eh_type.cc \
+	new_handler.cc \
+	new_op.cc \
+	new_opnt.cc \
+	new_opv.cc \
+	new_opvnt.cc \
+	pure.cc \
+	tinfo.cc \
+	tinfo2.cc \
+	vec.cc
+
+libsupc___la_SOURCES = $(sources)
+libsupc__convenience_la_SOURCES = $(sources)
+
+glibcppinstalldir = @gxx_include_dir@
+glibcppinstall_HEADERS = $(headers)
+
+LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
+
+# Use special rules for pulling things out of libiberty.
+cxa_demangle.c:
+	rm -f $@
+	$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
+cxa_demangle.lo: cxa_demangle.c
+	$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+cxa_demangle.o: cxa_demangle.c
+	$(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.c:
+	rm -f $@
+	$(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
+dyn-string.lo: dyn-string.c
+	$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.o: dyn-string.c
+	$(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+
+# LTCOMPILE is copied from LTCXXCOMPILE below.
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
+               --mode=compile $(CC) $(INCLUDES) \
+               $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way.  Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion call for it. (ie, --enable-debug)
+AM_CXXFLAGS = \
+	-fno-implicit-templates \
+	$(LIBSUPCXX_CXXFLAGS) \
+	$(WARN_CXXFLAGS) \
+	$(OPTIMIZE_CXXFLAGS) \
+	$(CONFIG_CXXFLAGS) 
+
+# libstdc++ libtool notes
+
+# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
+
+# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# using the C++ compiler, because that will enable the settings
+# detected when C++ support was being configured.  However, when no
+# such flag is given in the command line, libtool attempts to figure
+# it out by matching the compiler name in each configuration section
+# against a prefix of the command line.  The problem is that, if the
+# compiler name and its initial flags stored in the libtool
+# configuration file don't match those in the command line, libtool
+# can't decide which configuration to use, and it gives up.  The
+# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
+# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
+# attempt to infer which configuration to use.
+#
+# We have to put --tag disable-shared after --tag CXX lest things
+# CXX undo the affect of disable-shared.
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
+               --mode=compile $(CXX) $(INCLUDES) \
+	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+
+# 3) We'd have a problem when building the shared libstdc++ object if
+# the rules automake generates would be used.  We cannot allow g++ to
+# be used since this would add -lstdc++ to the link line which of
+# course is problematic at this point.  So, we get the top-level
+# directory to configure libstdc++-v3 to use gcc as the C++
+# compilation driver.
+CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
+          --mode=link $(CXX) \
+          @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+# We have to have rules modified from the default to counteract SUN make
+# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
+install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
+	@list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+	  q=`echo $$p | sed -e 's,.*/,,'`; \
+	  if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q"; \
+	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q; \
+	done
+
+uninstall-glibcppinstallHEADERS:
+	@$(NORMAL_UNINSTALL)
+	list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+	  q=`echo $$p | sed -e 's,.*/,,'`; \
+	  rm -f $(DESTDIR)$(glibcppinstalldir)/$$q; \
+	done
diff --git a/contrib/libstdc++/libsupc++/Makefile.in b/contrib/libstdc++/libsupc++/Makefile.in
new file mode 100644
index 0000000..84f85d3
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/Makefile.in
@@ -0,0 +1,600 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+AS = @AS@
+ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+AWK = @AWK@
+BASIC_FILE_H = @BASIC_FILE_H@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CCODECVT_C = @CCODECVT_C@
+CCODECVT_H = @CCODECVT_H@
+CLOCALE_H = @CLOCALE_H@
+CMESSAGES_H = @CMESSAGES_H@
+CPP = @CPP@
+CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
+CSHADOW_FLAGS = @CSHADOW_FLAGS@
+CSTDIO_H = @CSTDIO_H@
+CXXCPP = @CXXCPP@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DATADIRNAME = @DATADIRNAME@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DLLTOOL = @DLLTOOL@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIBICONV = @LIBICONV@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+STRIP = @STRIP@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+check_msgfmt = @check_msgfmt@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+glibcpp_CXX = @glibcpp_CXX@
+glibcpp_MOFILES = @glibcpp_MOFILES@
+glibcpp_POFILES = @glibcpp_POFILES@
+glibcpp_basedir = @glibcpp_basedir@
+glibcpp_builddir = @glibcpp_builddir@
+glibcpp_localedir = @glibcpp_localedir@
+glibcpp_prefixdir = @glibcpp_prefixdir@
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_thread_h = @glibcpp_thread_h@
+glibcpp_toolexecdir = @glibcpp_toolexecdir@
+glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+ifGNUmake = @ifGNUmake@
+libio_la = @libio_la@
+libtool_VERSION = @libtool_VERSION@
+release_VERSION = @release_VERSION@
+toplevel_srcdir = @toplevel_srcdir@
+
+AUTOMAKE_OPTIONS = 1.3 cygnus
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Cross compiler and multilib support.
+CC = @CC@
+CXX = @glibcpp_CXX@
+toolexecdir = @glibcpp_toolexecdir@
+toolexeclibdir = @glibcpp_toolexeclibdir@
+
+# Need this library to both be part of libstdc++.a, and installed
+# separately too.
+# 1) separate libsupc++.la 
+toolexeclib_LTLIBRARIES = libsupc++.la
+# 2) integrated libsupc++convenience.la that is to be a part of libstdc++.a
+noinst_LTLIBRARIES = libsupc++convenience.la
+
+# Compile flags that should be constant throughout the build, both for
+# SUBDIRS and for libstdc++-v3 in general.
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
+# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
+CONFIG_CXXFLAGS = \
+	@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ 
+
+
+# Warning flags to use.
+WARN_CXXFLAGS = \
+	@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+
+INCLUDES = \
+	-I$(toplevel_srcdir)/gcc -I$(toplevel_srcdir)/include \
+	$(GLIBCPP_INCLUDES) $(LIBSUPCXX_INCLUDES)
+
+
+headers = \
+	exception new typeinfo cxxabi.h exception_defines.h 
+
+
+sources = \
+	cxa_demangle.c \
+	del_op.cc \
+	del_opnt.cc \
+	del_opv.cc \
+	del_opvnt.cc \
+	dyn-string.c \
+	eh_alloc.cc \
+	eh_aux_runtime.cc \
+	eh_catch.cc \
+	eh_exception.cc \
+	eh_globals.cc \
+	eh_personality.cc \
+	eh_terminate.cc \
+	eh_throw.cc \
+	eh_type.cc \
+	new_handler.cc \
+	new_op.cc \
+	new_opnt.cc \
+	new_opv.cc \
+	new_opvnt.cc \
+	pure.cc \
+	tinfo.cc \
+	tinfo2.cc \
+	vec.cc
+
+
+libsupc___la_SOURCES = $(sources)
+libsupc__convenience_la_SOURCES = $(sources)
+
+glibcppinstalldir = @gxx_include_dir@
+glibcppinstall_HEADERS = $(headers)
+
+LIBSUPCXX_CXXFLAGS = $(LIBSUPCXX_PICFLAGS)
+
+# LTCOMPILE is copied from LTCXXCOMPILE below.
+LTCOMPILE = $(LIBTOOL) --tag CC --tag disable-shared \
+               --mode=compile $(CC) $(INCLUDES) \
+               $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way.  Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion call for it. (ie, --enable-debug)
+AM_CXXFLAGS = \
+	-fno-implicit-templates \
+	$(LIBSUPCXX_CXXFLAGS) \
+	$(WARN_CXXFLAGS) \
+	$(OPTIMIZE_CXXFLAGS) \
+	$(CONFIG_CXXFLAGS) 
+
+
+# libstdc++ libtool notes
+
+# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
+
+# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# using the C++ compiler, because that will enable the settings
+# detected when C++ support was being configured.  However, when no
+# such flag is given in the command line, libtool attempts to figure
+# it out by matching the compiler name in each configuration section
+# against a prefix of the command line.  The problem is that, if the
+# compiler name and its initial flags stored in the libtool
+# configuration file don't match those in the command line, libtool
+# can't decide which configuration to use, and it gives up.  The
+# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
+# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
+# attempt to infer which configuration to use.
+#
+# We have to put --tag disable-shared after --tag CXX lest things
+# CXX undo the affect of disable-shared.
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --tag disable-shared \
+               --mode=compile $(CXX) $(INCLUDES) \
+	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+
+
+# 3) We'd have a problem when building the shared libstdc++ object if
+# the rules automake generates would be used.  We cannot allow g++ to
+# be used since this would add -lstdc++ to the link line which of
+# course is problematic at this point.  So, we get the top-level
+# directory to configure libstdc++-v3 to use gcc as the C++
+# compilation driver.
+CXXLINK = $(LIBTOOL) --tag CXX --tag disable-shared \
+          --mode=link $(CXX) \
+          @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LTLIBRARIES =  $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libsupc__convenience_la_LDFLAGS = 
+libsupc__convenience_la_LIBADD = 
+libsupc__convenience_la_OBJECTS =  cxa_demangle.lo del_op.lo del_opnt.lo \
+del_opv.lo del_opvnt.lo dyn-string.lo eh_alloc.lo eh_aux_runtime.lo \
+eh_catch.lo eh_exception.lo eh_globals.lo eh_personality.lo \
+eh_terminate.lo eh_throw.lo eh_type.lo new_handler.lo new_op.lo \
+new_opnt.lo new_opv.lo new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo
+libsupc___la_LDFLAGS = 
+libsupc___la_LIBADD = 
+libsupc___la_OBJECTS =  cxa_demangle.lo del_op.lo del_opnt.lo del_opv.lo \
+del_opvnt.lo dyn-string.lo eh_alloc.lo eh_aux_runtime.lo eh_catch.lo \
+eh_exception.lo eh_globals.lo eh_personality.lo eh_terminate.lo \
+eh_throw.lo eh_type.lo new_handler.lo new_op.lo new_opnt.lo new_opv.lo \
+new_opvnt.lo pure.lo tinfo.lo tinfo2.lo vec.lo
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+CFLAGS = @CFLAGS@
+COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@
+HEADERS =  $(glibcppinstall_HEADERS)
+
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libsupc__convenience_la_SOURCES) $(libsupc___la_SOURCES)
+OBJECTS = $(libsupc__convenience_la_OBJECTS) $(libsupc___la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .lo .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus libsupc++/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-noinstLTLIBRARIES:
+
+clean-noinstLTLIBRARIES:
+	-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+
+distclean-noinstLTLIBRARIES:
+
+maintainer-clean-noinstLTLIBRARIES:
+
+mostlyclean-toolexeclibLTLIBRARIES:
+
+clean-toolexeclibLTLIBRARIES:
+	-test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
+
+distclean-toolexeclibLTLIBRARIES:
+
+maintainer-clean-toolexeclibLTLIBRARIES:
+
+install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
+	@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
+	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-toolexeclibLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+	  $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
+	done
+
+.c.o:
+	$(COMPILE) -c $<
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+	-rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libsupc++convenience.la: $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_DEPENDENCIES)
+	$(CXXLINK)  $(libsupc__convenience_la_LDFLAGS) $(libsupc__convenience_la_OBJECTS) $(libsupc__convenience_la_LIBADD) $(LIBS)
+
+libsupc++.la: $(libsupc___la_OBJECTS) $(libsupc___la_DEPENDENCIES)
+	$(CXXLINK) -rpath $(toolexeclibdir) $(libsupc___la_LDFLAGS) $(libsupc___la_OBJECTS) $(libsupc___la_LIBADD) $(LIBS)
+.cc.o:
+	$(CXXCOMPILE) -c $<
+.cc.obj:
+	$(CXXCOMPILE) -c `cygpath -w $<`
+.cc.lo:
+	$(LTCXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = libsupc++
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am: 
+install-info: install-info-am
+install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec: install-exec-am
+
+install-data-am: install-glibcppinstallHEADERS
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-toolexeclibLTLIBRARIES \
+		uninstall-glibcppinstallHEADERS
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(toolexeclibdir) \
+		$(DESTDIR)$(glibcppinstalldir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-noinstLTLIBRARIES \
+		mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-noinstLTLIBRARIES clean-toolexeclibLTLIBRARIES \
+		clean-compile clean-libtool clean-tags clean-generic \
+		mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-noinstLTLIBRARIES \
+		distclean-toolexeclibLTLIBRARIES distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-noinstLTLIBRARIES \
+		maintainer-clean-toolexeclibLTLIBRARIES \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-noinstLTLIBRARIES distclean-noinstLTLIBRARIES \
+clean-noinstLTLIBRARIES maintainer-clean-noinstLTLIBRARIES \
+mostlyclean-toolexeclibLTLIBRARIES distclean-toolexeclibLTLIBRARIES \
+clean-toolexeclibLTLIBRARIES maintainer-clean-toolexeclibLTLIBRARIES \
+uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool uninstall-glibcppinstallHEADERS \
+install-glibcppinstallHEADERS tags mostlyclean-tags distclean-tags \
+clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \
+check-am installcheck-am installcheck install-info-am install-info \
+install-exec-am install-exec install-data-am install-data install-am \
+install uninstall-am uninstall all-redirect all-am all installdirs \
+mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+
+# Use special rules for pulling things out of libiberty.
+cxa_demangle.c:
+	rm -f $@
+	$(LN_S) $(toplevel_srcdir)/libiberty/cp-demangle.c $@
+cxa_demangle.lo: cxa_demangle.c
+	$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+cxa_demangle.o: cxa_demangle.c
+	$(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.c:
+	rm -f $@
+	$(LN_S) $(toplevel_srcdir)/libiberty/dyn-string.c $@
+dyn-string.lo: dyn-string.c
+	$(LTCOMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+dyn-string.o: dyn-string.c
+	$(COMPILE) -DIN_GLIBCPP_V3 -Wno-error -c $<
+
+# We have to have rules modified from the default to counteract SUN make
+# prepending each of $(glibcppinstall_HEADERS) with VPATH below.
+install-glibcppinstallHEADERS: $(glibcppinstall_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(glibcppinstalldir)
+	@list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+	  q=`echo $$p | sed -e 's,.*/,,'`; \
+	  if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
+	  echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q"; \
+	  $(INSTALL_DATA) $$d$$p $(DESTDIR)$(glibcppinstalldir)/$$q; \
+	done
+
+uninstall-glibcppinstallHEADERS:
+	@$(NORMAL_UNINSTALL)
+	list='$(glibcppinstall_HEADERS)'; for p in $$list; do \
+	  q=`echo $$p | sed -e 's,.*/,,'`; \
+	  rm -f $(DESTDIR)$(glibcppinstalldir)/$$q; \
+	done
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/libstdc++/libsupc++/cxxabi.h b/contrib/libstdc++/libsupc++/cxxabi.h
new file mode 100644
index 0000000..dd6b774
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/cxxabi.h
@@ -0,0 +1,526 @@
+// new abi support -*- C++ -*-
+  
+// Copyright (C) 2000 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+// Written by Nathan Sidwell, Codesourcery LLC, 
+ 
+/* This file declares the new abi entry points into the runtime. It is not
+   normally necessary for user programs to include this header, or use the
+   entry points directly. However, this header is available should that be
+   needed.
+   
+   Some of the entry points are intended for both C and C++, thus this header
+   is includable from both C and C++. Though the C++ specific parts are not
+   available in C, naturally enough.  */
+
+#ifndef __CXXABI_H
+#define __CXXABI_H 1
+
+#ifdef __cplusplus
+
+// We use the compiler builtins __SIZE_TYPE__ and __PTRDIFF_TYPE__ instead of
+// std::size_t and std::ptrdiff_t respectively. This makes us independent of
+// the conformance level of  and whether -fhonor-std was supplied.
+//  is not currently available during compiler building anyway.
+// Including  would be wrong, as that would rudely place size_t in
+// the global namespace.
+
+#include 
+
+namespace __cxxabiv1
+{
+
+/* type information for int, float etc */
+class __fundamental_type_info
+  : public std::type_info
+{
+public:
+  virtual ~__fundamental_type_info ();
+public:
+  explicit __fundamental_type_info (const char *__n)
+    : std::type_info (__n)
+    { }
+};
+
+/* type information for array objects */
+class __array_type_info
+  : public std::type_info
+{
+/* abi defined member functions */
+protected:
+  virtual ~__array_type_info ();
+public:
+  explicit __array_type_info (const char *__n)
+    : std::type_info (__n)
+    { }
+};
+
+/* type information for functions (both member and non-member) */
+class __function_type_info
+  : public std::type_info
+{
+/* abi defined member functions */
+public:
+  virtual ~__function_type_info ();
+public:
+  explicit __function_type_info (const char *__n)
+    : std::type_info (__n)
+    { }
+  
+/* implementation defined member functions */
+protected:
+  virtual bool __is_function_p () const;
+};
+
+/* type information for enumerations */
+class __enum_type_info
+  : public std::type_info
+{
+/* abi defined member functions */
+public:
+  virtual ~__enum_type_info ();
+public:
+  explicit __enum_type_info (const char *__n)
+    : std::type_info (__n)
+    { }
+};
+
+/* common type information for simple pointers and pointers to member */
+class __pbase_type_info
+  : public std::type_info
+{
+/* abi defined member variables */
+public:
+  unsigned int __qualifier_flags; /* qualification of the target object */
+  const std::type_info *__pointee;   /* type of pointed to object */
+
+/* abi defined member functions */
+public:
+  virtual ~__pbase_type_info ();
+public:
+  explicit __pbase_type_info (const char *__n,
+                                int __quals,
+                                const std::type_info *__type)
+    : std::type_info (__n), __qualifier_flags (__quals), __pointee (__type)
+    { }
+
+/* implementation defined types */
+public:
+  enum __qualifier_masks {
+    __const_mask = 0x1,
+    __volatile_mask = 0x2,
+    __restrict_mask = 0x4,
+    __incomplete_mask = 0x8,
+    __incomplete_class_mask = 0x10
+  };
+
+/* implementation defined member functions */
+protected:
+  virtual bool __do_catch (const std::type_info *__thr_type,
+                           void **__thr_obj,
+                           unsigned __outer) const;
+protected:
+  inline virtual bool __pointer_catch (const __pbase_type_info *__thr_type,
+                                       void **__thr_obj,
+                                       unsigned __outer) const;
+};
+
+/* type information for simple pointers */
+class __pointer_type_info
+  : public __pbase_type_info
+{
+/* abi defined member functions */
+public:
+  virtual ~__pointer_type_info ();
+public:
+  explicit __pointer_type_info (const char *__n,
+                                int __quals,
+                                const std::type_info *__type)
+    : __pbase_type_info (__n, __quals, __type)
+    { }
+
+/* implementation defined member functions */
+protected:
+  virtual bool __is_pointer_p () const;
+
+protected:
+  virtual bool __pointer_catch (const __pbase_type_info *__thr_type,
+                                void **__thr_obj,
+                                unsigned __outer) const;
+};
+
+/* type information for a pointer to member variable */
+class __pointer_to_member_type_info
+  : public __pbase_type_info
+{
+/* abi defined member variables */
+public:
+  __class_type_info *__context_class;   /* class of the member */
+
+/* abi defined member functions */
+public:
+  virtual ~__pointer_to_member_type_info ();
+public:
+  explicit __pointer_to_member_type_info (const char *__n,
+                                          int __quals,
+                                          const std::type_info *__type,
+                                          __class_type_info *__klass)
+    : __pbase_type_info (__n, __quals, __type), __context_class (__klass)
+    { }
+
+/* implementation defined member functions */
+protected:
+  virtual bool __pointer_catch (const __pbase_type_info *__thr_type,
+                                void **__thr_obj,
+                                unsigned __outer) const;
+};
+
+class __class_type_info;
+
+/* helper class for __vmi_class_type */
+class __base_class_info
+{
+/* abi defined member variables */
+public:
+  const __class_type_info *__base;    /* base class type */
+  long __offset_flags;            /* offset and info */
+
+/* implementation defined types */
+public:
+  enum __offset_flags_masks {
+    __virtual_mask = 0x1,
+    __public_mask = 0x2,
+    hwm_bit = 2,
+    offset_shift = 8          /* bits to shift offset by */
+  };
+  
+/* implementation defined member functions */
+public:
+  bool __is_virtual_p () const
+    { return __offset_flags & __virtual_mask; }
+  bool __is_public_p () const
+    { return __offset_flags & __public_mask; }
+  __PTRDIFF_TYPE__ __offset () const
+    { 
+      // This shift, being of a signed type, is implementation defined. GCC
+      // implements such shifts as arithmetic, which is what we want.
+      return static_cast<__PTRDIFF_TYPE__> (__offset_flags) >> offset_shift;
+    }
+};
+
+/* type information for a class */
+class __class_type_info
+  : public std::type_info
+{
+/* abi defined member functions */
+public:
+  virtual ~__class_type_info ();
+public:
+  explicit __class_type_info (const char *__n)
+    : type_info (__n)
+    { }
+
+/* implementation defined types */
+public:
+  /* sub_kind tells us about how a base object is contained within a derived
+     object. We often do this lazily, hence the UNKNOWN value. At other times
+     we may use NOT_CONTAINED to mean not publicly contained. */
+  enum __sub_kind
+  {
+    __unknown = 0,              /* we have no idea */
+    __not_contained,            /* not contained within us (in some */
+                                /* circumstances this might mean not contained */
+                                /* publicly) */
+    __contained_ambig,          /* contained ambiguously */
+    
+    __contained_virtual_mask = __base_class_info::__virtual_mask, /* via a virtual path */
+    __contained_public_mask = __base_class_info::__public_mask,   /* via a public path */
+    __contained_mask = 1 << __base_class_info::hwm_bit,         /* contained within us */
+    
+    __contained_private = __contained_mask,
+    __contained_public = __contained_mask | __contained_public_mask
+  };
+
+public:  
+  struct __upcast_result;
+  struct __dyncast_result;
+
+/* implementation defined member functions */
+protected:
+  virtual bool __do_upcast (const __class_type_info *__dst_type, void **__obj_ptr) const;
+
+protected:
+  virtual bool __do_catch (const type_info *__thr_type, void **__thr_obj,
+                           unsigned __outer) const;
+
+
+public:
+  /* Helper for upcast. See if DST is us, or one of our bases. */
+  /* Return false if not found, true if found. */
+  virtual bool __do_upcast (const __class_type_info *__dst,
+                            const void *__obj,
+                            __upcast_result &__restrict __result) const;
+
+public:
+  /* Indicate whether SRC_PTR of type SRC_TYPE is contained publicly within
+     OBJ_PTR. OBJ_PTR points to a base object of our type, which is the
+     destination type. SRC2DST indicates how SRC objects might be contained
+     within this type.  If SRC_PTR is one of our SRC_TYPE bases, indicate the
+     virtuality. Returns not_contained for non containment or private
+     containment. */
+  inline __sub_kind __find_public_src (__PTRDIFF_TYPE__ __src2dst,
+                                       const void *__obj_ptr,
+                                       const __class_type_info *__src_type,
+                                       const void *__src_ptr) const;
+
+public:
+  /* dynamic cast helper. ACCESS_PATH gives the access from the most derived
+     object to this base. DST_TYPE indicates the desired type we want. OBJ_PTR
+     points to a base of our type within the complete object. SRC_TYPE
+     indicates the static type started from and SRC_PTR points to that base
+     within the most derived object. Fill in RESULT with what we find. Return
+     true if we have located an ambiguous match. */
+  virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst,
+                             __sub_kind __access_path,
+                             const __class_type_info *__dst_type,
+                             const void *__obj_ptr,
+                             const __class_type_info *__src_type,
+                             const void *__src_ptr,
+                             __dyncast_result &__result) const;
+public:
+  /* Helper for find_public_subobj. SRC2DST indicates how SRC_TYPE bases are
+     inherited by the type started from -- which is not necessarily the
+     current type. The current type will be a base of the destination type.
+     OBJ_PTR points to the current base. */
+  virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst,
+                                           const void *__obj_ptr,
+                                           const __class_type_info *__src_type,
+                                           const void *__src_ptr) const;
+};
+
+/* type information for a class with a single non-virtual base */
+class __si_class_type_info
+  : public __class_type_info
+{
+/* abi defined member variables */
+public:
+  const __class_type_info *__base_type;
+
+/* abi defined member functions */
+public:
+  virtual ~__si_class_type_info ();
+public:
+  explicit __si_class_type_info (const char *__n,
+                                 const __class_type_info *__base)
+    : __class_type_info (__n), __base_type (__base)
+    { }
+
+/* implementation defined member functions */
+protected:
+  virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst,
+                             __sub_kind __access_path,
+                             const __class_type_info *__dst_type,
+                             const void *__obj_ptr,
+                             const __class_type_info *__src_type,
+                             const void *__src_ptr,
+                             __dyncast_result &__result) const;
+  virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst,
+                                           const void *__obj_ptr,
+                                           const __class_type_info *__src_type,
+                                           const void *__sub_ptr) const;
+  virtual bool __do_upcast (const __class_type_info *__dst,
+                            const void *__obj,
+                            __upcast_result &__restrict __result) const;
+};
+
+/* type information for a class with multiple and/or virtual bases */
+class __vmi_class_type_info : public __class_type_info {
+/* abi defined member variables */
+public:
+  unsigned int __flags;         /* details about the class hierarchy */
+  unsigned int __base_count;    /* number of direct bases */
+  __base_class_info const __base_info[1]; /* array of bases */
+  /* The array of bases uses the trailing array struct hack
+     so this class is not constructable with a normal constructor. It is
+     internally generated by the compiler. */
+
+/* abi defined member functions */
+public:
+  virtual ~__vmi_class_type_info ();
+public:
+  explicit __vmi_class_type_info (const char *__n,
+                                  int ___flags)
+    : __class_type_info (__n), __flags (___flags), __base_count (0)
+    { }
+
+/* implementation defined types */
+public:
+  enum __flags_masks {
+    __non_diamond_repeat_mask = 0x1,   /* distinct instance of repeated base */
+    __diamond_shaped_mask = 0x2,       /* diamond shaped multiple inheritance */
+    non_public_base_mask = 0x4,      /* has non-public direct or indirect base */
+    public_base_mask = 0x8,          /* has public base (direct) */
+    
+    __flags_unknown_mask = 0x10
+  };
+
+/* implementation defined member functions */
+protected:
+  virtual bool __do_dyncast (__PTRDIFF_TYPE__ __src2dst,
+                             __sub_kind __access_path,
+                             const __class_type_info *__dst_type,
+                             const void *__obj_ptr,
+                             const __class_type_info *__src_type,
+                             const void *__src_ptr,
+                             __dyncast_result &__result) const;
+  virtual __sub_kind __do_find_public_src (__PTRDIFF_TYPE__ __src2dst,
+                                           const void *__obj_ptr,
+                                           const __class_type_info *__src_type,
+                                           const void *__src_ptr) const;
+  virtual bool __do_upcast (const __class_type_info *__dst,
+                            const void *__obj,
+                            __upcast_result &__restrict __result) const;
+};
+
+/* dynamic cast runtime */
+extern "C"
+void *__dynamic_cast (const void *__src_ptr,    /* object started from */
+                      const __class_type_info *__src_type, /* static type of object */
+                      const __class_type_info *__dst_type, /* desired target type */
+                      __PTRDIFF_TYPE__ __src2dst); /* how src and dst are related */
+
+    /* src2dst has the following possible values
+       >= 0: src_type is a unique public non-virtual base of dst_type
+             dst_ptr + src2dst == src_ptr
+       -1: unspecified relationship
+       -2: src_type is not a public base of dst_type
+       -3: src_type is a multiple public non-virtual base of dst_type */
+
+/* array ctor/dtor routines */
+
+/* allocate and construct array */
+extern "C"
+void *__cxa_vec_new (__SIZE_TYPE__ __element_count,
+                     __SIZE_TYPE__ __element_size,
+                     __SIZE_TYPE__ __padding_size,
+                     void (*__constructor) (void *),
+                     void (*__destructor) (void *));
+
+extern "C"
+void *__cxa_vec_new2 (__SIZE_TYPE__ __element_count,
+                      __SIZE_TYPE__ __element_size,
+                      __SIZE_TYPE__ __padding_size,
+                      void (*__constructor) (void *),
+                      void (*__destructor) (void *),
+                      void *(*__alloc) (__SIZE_TYPE__),
+                      void (*__dealloc) (void *));
+
+extern "C"
+void *__cxa_vec_new3 (__SIZE_TYPE__ __element_count,
+                      __SIZE_TYPE__ __element_size,
+                      __SIZE_TYPE__ __padding_size,
+                      void (*__constructor) (void *),
+                      void (*__destructor) (void *),
+                      void *(*__alloc) (__SIZE_TYPE__),
+                      void (*__dealloc) (void *, __SIZE_TYPE__));
+
+/* construct array */
+extern "C"
+void __cxa_vec_ctor (void *__array_address,
+                     __SIZE_TYPE__ __element_count,
+                     __SIZE_TYPE__ __element_size,
+                     void (*__constructor) (void *),
+                     void (*__destructor) (void *));
+
+extern "C"
+void __cxa_vec_cctor (void *dest_array,
+		      void *src_array,
+		      __SIZE_TYPE__ element_count,
+		      __SIZE_TYPE__ element_size,
+		      void (*constructor) (void *, void *),
+		      void (*destructor) (void *));
+ 
+/* destruct array */
+extern "C"
+void __cxa_vec_dtor (void *__array_address,
+                     __SIZE_TYPE__ __element_count,
+                     __SIZE_TYPE__ __element_size,
+                     void (*__destructor) (void *));
+
+/* destruct array */
+extern "C"
+void __cxa_vec_cleanup (void *__array_address,
+			__SIZE_TYPE__ __element_count,
+			__SIZE_TYPE__ __element_size,
+			void (*__destructor) (void *));
+
+/* destruct and release array */
+extern "C"
+void __cxa_vec_delete (void *__array_address,
+                       __SIZE_TYPE__ __element_size,
+                       __SIZE_TYPE__ __padding_size,
+                       void (*__destructor) (void *));
+
+extern "C"
+void __cxa_vec_delete2 (void *__array_address,
+                        __SIZE_TYPE__ __element_size,
+                        __SIZE_TYPE__ __padding_size,
+                        void (*__destructor) (void *),
+                        void (*__dealloc) (void *));
+                  
+extern "C"
+void __cxa_vec_delete3 (void *__array_address,
+                        __SIZE_TYPE__ __element_size,
+                        __SIZE_TYPE__ __padding_size,
+                        void (*__destructor) (void *),
+                        void (*__dealloc) (void *, __SIZE_TYPE__));
+                  
+/* demangling routines */
+
+extern "C" 
+char *__cxa_demangle (const char *__mangled_name,
+		      char *__output_buffer,
+		      __SIZE_TYPE__ *__length,
+		      int *__status);
+
+// Returns the type_info for the currently handled exception [15.3/8], or
+// null if there is none.
+extern "C"
+std::type_info *__cxa_current_exception_type ();
+
+} /* namespace __cxxabiv1 */
+
+/* User programs should use the alias `abi'. */
+namespace abi = __cxxabiv1;
+
+#else
+#endif /* __cplusplus */
+
+
+#endif /* __CXXABI_H */
diff --git a/contrib/libstdc++/libsupc++/del_op.cc b/contrib/libstdc++/libsupc++/del_op.cc
new file mode 100644
index 0000000..f433024
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/del_op.cc
@@ -0,0 +1,40 @@
+// Boilerplate support routines for -*- C++ -*- dynamic memory management.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+extern "C" void free (void *);
+
+void
+operator delete (void *ptr) throw ()
+{
+  if (ptr)
+    free (ptr);
+}
diff --git a/contrib/libstdc++/libsupc++/del_opnt.cc b/contrib/libstdc++/libsupc++/del_opnt.cc
new file mode 100644
index 0000000..032ea68
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/del_opnt.cc
@@ -0,0 +1,40 @@
+// Boilerplate support routines for -*- C++ -*- dynamic memory management.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+extern "C" void free (void *);
+
+void
+operator delete (void *ptr, const std::nothrow_t&) throw ()
+{
+  if (ptr)
+    free (ptr);
+}
diff --git a/contrib/libstdc++/libsupc++/del_opv.cc b/contrib/libstdc++/libsupc++/del_opv.cc
new file mode 100644
index 0000000..47d7842
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/del_opv.cc
@@ -0,0 +1,37 @@
+// Boilerplate support routines for -*- C++ -*- dynamic memory management.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+void
+operator delete[] (void *ptr) throw ()
+{
+  ::operator delete (ptr);
+}
diff --git a/contrib/libstdc++/libsupc++/del_opvnt.cc b/contrib/libstdc++/libsupc++/del_opvnt.cc
new file mode 100644
index 0000000..3504d99a
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/del_opvnt.cc
@@ -0,0 +1,37 @@
+// Boilerplate support routines for -*- C++ -*- dynamic memory management.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+void
+operator delete[] (void *ptr, const std::nothrow_t&) throw ()
+{
+  ::operator delete (ptr);
+}
diff --git a/contrib/libstdc++/libsupc++/eh_alloc.cc b/contrib/libstdc++/libsupc++/eh_alloc.cc
new file mode 100644
index 0000000..1f59ec4
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_alloc.cc
@@ -0,0 +1,163 @@
+// -*- C++ -*- Allocate exception objects.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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.
+
+// This is derived from the C++ ABI for IA-64.  Where we diverge
+// for cross-architecture compatibility are noted with "@@@".
+
+#include 
+#include 
+#include 
+#include 
+#include "unwind-cxx.h"
+#include "bits/c++config.h"
+#include "bits/gthr.h"
+
+using namespace __cxxabiv1;
+
+
+// ??? How to control these parameters.
+
+// Guess from the size of basic types how large a buffer is reasonable.
+// Note that the basic c++ exception header has 13 pointers and 2 ints,
+// so on a system with PSImode pointers we're talking about 56 bytes
+// just for overhead.
+
+#if INT_MAX == 32767
+# define EMERGENCY_OBJ_SIZE	128
+# define EMERGENCY_OBJ_COUNT	16
+#elif LONG_MAX == 2147483647
+# define EMERGENCY_OBJ_SIZE	512
+# define EMERGENCY_OBJ_COUNT	32
+#else
+# define EMERGENCY_OBJ_SIZE	1024
+# define EMERGENCY_OBJ_COUNT	64
+#endif
+
+#ifndef __GTHREADS
+# undef EMERGENCY_OBJ_COUNT
+# define EMERGENCY_OBJ_COUNT	4
+#endif
+
+#if INT_MAX == 32767 || EMERGENCY_OBJ_COUNT <= 32
+typedef unsigned int bitmask_type;
+#else
+typedef unsigned long bitmask_type;
+#endif
+
+
+typedef char one_buffer[EMERGENCY_OBJ_SIZE] __attribute__((aligned));
+static one_buffer emergency_buffer[EMERGENCY_OBJ_COUNT];
+static bitmask_type emergency_used;
+
+
+#ifdef __GTHREADS
+#ifdef __GTHREAD_MUTEX_INIT
+static __gthread_mutex_t emergency_mutex =__GTHREAD_MUTEX_INIT;
+#else 
+static __gthread_mutex_t emergency_mutex;
+#endif
+
+#ifdef __GTHREAD_MUTEX_INIT_FUNCTION
+static void
+emergency_mutex_init ()
+{
+  __GTHREAD_MUTEX_INIT_FUNCTION (&emergency_mutex);
+}
+#endif
+#endif
+
+
+extern "C" void *
+__cxa_allocate_exception(std::size_t thrown_size)
+{
+  void *ret;
+
+  thrown_size += sizeof (__cxa_exception);
+  ret = std::malloc (thrown_size);
+
+  if (! ret)
+    {
+#ifdef __GTHREADS
+#ifdef __GTHREAD_MUTEX_INIT_FUNCTION
+      static __gthread_once_t once = __GTHREAD_ONCE_INIT;
+      __gthread_once (&once, emergency_mutex_init);
+#endif
+      __gthread_mutex_lock (&emergency_mutex);
+#endif
+
+      bitmask_type used = emergency_used;
+      unsigned int which = 0;
+
+      if (thrown_size > EMERGENCY_OBJ_SIZE)
+	goto failed;
+      while (used & 1)
+	{
+	  used >>= 1;
+	  if (++which >= EMERGENCY_OBJ_COUNT)
+	    goto failed;
+	}
+
+      emergency_used |= (bitmask_type)1 << which;
+      ret = &emergency_buffer[which][0];
+
+    failed:;
+#ifdef __GTHREADS
+      __gthread_mutex_unlock (&emergency_mutex);
+#endif
+      if (!ret)
+	std::terminate ();
+    }
+
+  std::memset (ret, 0, sizeof (__cxa_exception));
+
+  return (void *)((char *)ret + sizeof (__cxa_exception));
+}
+
+
+extern "C" void
+__cxa_free_exception(void *vptr)
+{
+  char *ptr = (char *) vptr;
+  if (ptr >= &emergency_buffer[0][0]
+      && ptr < &emergency_buffer[0][0] + sizeof (emergency_buffer))
+    {
+      unsigned int which
+	= (unsigned)(ptr - &emergency_buffer[0][0]) / EMERGENCY_OBJ_SIZE;
+
+#ifdef __GTHREADS
+      __gthread_mutex_lock (&emergency_mutex);
+      emergency_used &= ~((bitmask_type)1 << which);
+      __gthread_mutex_unlock (&emergency_mutex);
+#else
+      emergency_used &= ~((bitmask_type)1 << which);
+#endif
+    }
+  else
+    std::free (ptr - sizeof (__cxa_exception));
+}
diff --git a/contrib/libstdc++/libsupc++/eh_aux_runtime.cc b/contrib/libstdc++/libsupc++/eh_aux_runtime.cc
new file mode 100644
index 0000000..118aa91
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_aux_runtime.cc
@@ -0,0 +1,57 @@
+// -*- C++ -*- Common throw conditions.
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "typeinfo"
+#include "exception"
+#include 
+#include "unwind-cxx.h"
+#include "exception_defines.h"
+
+
+extern "C" void
+__cxa_bad_cast ()
+{
+#ifdef __EXCEPTIONS  
+  throw std::bad_cast();
+#else
+  std::abort();
+#endif
+}
+
+extern "C" void
+__cxa_bad_typeid ()
+{
+#ifdef __EXCEPTIONS  
+  throw std::bad_typeid();
+#else
+  std::abort();
+#endif
+}
+
diff --git a/contrib/libstdc++/libsupc++/eh_catch.cc b/contrib/libstdc++/libsupc++/eh_catch.cc
new file mode 100644
index 0000000..ba49dfe
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_catch.cc
@@ -0,0 +1,106 @@
+// -*- C++ -*- Exception handling routines for catching.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 
+#include "unwind-cxx.h"
+
+using namespace __cxxabiv1;
+
+
+extern "C" void *
+__cxa_begin_catch (void *exc_obj_in)
+{
+  _Unwind_Exception *exceptionObject
+    = reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
+
+  // ??? Foreign exceptions can't be stacked here, and there doesn't
+  // appear to be any place to store for __cxa_end_catch to destroy.
+
+  __cxa_exception *header = __get_exception_header_from_ue (exceptionObject);
+  __cxa_eh_globals *globals = __cxa_get_globals ();
+  __cxa_exception *prev = globals->caughtExceptions;
+  int count = header->handlerCount;
+
+  if (count < 0)
+    // This exception was rethrown from an immediately enclosing region.
+    count = -count + 1;
+  else
+    count += 1;
+  header->handlerCount = count;
+
+  globals->uncaughtExceptions -= 1;
+  if (header != prev)
+    {
+      header->nextException = prev;
+      globals->caughtExceptions = header;
+    }
+
+  return header->adjustedPtr;
+}
+
+
+extern "C" void
+__cxa_end_catch ()
+{
+  __cxa_eh_globals *globals = __cxa_get_globals_fast ();
+  __cxa_exception *header = globals->caughtExceptions;
+  int count = header->handlerCount;
+
+  if (count < 0)
+    {
+      // This exception was rethrown.  Decrement the (inverted) catch
+      // count and remove it from the chain when it reaches zero.
+      if (++count == 0)
+	{
+	  globals->uncaughtExceptions += 1;
+	  globals->caughtExceptions = header->nextException;
+	}
+    }
+  else if (--count == 0)
+    {
+      // Handling for this exception is complete.  Destroy the object.
+      globals->caughtExceptions = header->nextException;
+      _Unwind_DeleteException (&header->unwindHeader);
+      return;
+    }
+  else if (count < 0)
+    // A bug in the exception handling library or compiler.
+    std::abort ();
+
+  header->handlerCount = count;
+}
+
+
+bool
+std::uncaught_exception() throw()
+{
+  __cxa_eh_globals *globals = __cxa_get_globals ();
+  return globals->uncaughtExceptions != 0;
+}
diff --git a/contrib/libstdc++/libsupc++/eh_exception.cc b/contrib/libstdc++/libsupc++/eh_exception.cc
new file mode 100644
index 0000000..a581be7
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_exception.cc
@@ -0,0 +1,44 @@
+// -*- C++ -*- std::exception implementation.
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "typeinfo"
+#include "exception"
+#include "unwind-cxx.h"
+
+std::exception::~exception() throw() { }
+
+std::bad_exception::~bad_exception() throw() { }
+
+const char* 
+std::exception::what() const throw()
+{
+  return typeid (*this).name ();
+}
diff --git a/contrib/libstdc++/libsupc++/eh_globals.cc b/contrib/libstdc++/libsupc++/eh_globals.cc
new file mode 100644
index 0000000..3033619
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_globals.cc
@@ -0,0 +1,118 @@
+// -*- C++ -*- Manage the thread-local exception globals.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 
+#include 
+#include "unwind-cxx.h"
+#include "bits/c++config.h"
+#include "bits/gthr.h"
+
+using namespace __cxxabiv1;
+
+
+// Single-threaded fallback buffer.
+static __cxa_eh_globals globals_static;
+
+#if __GTHREADS
+static __gthread_key_t globals_key;
+static int use_thread_key = -1;
+
+static void
+get_globals_dtor (void *ptr)
+{
+  __gthread_key_dtor (globals_key, ptr);
+  if (ptr)
+    std::free (ptr);
+}
+
+static void
+get_globals_init ()
+{
+  use_thread_key =
+    (__gthread_key_create (&globals_key, get_globals_dtor) == 0);
+}
+
+static void
+get_globals_init_once ()
+{
+  static __gthread_once_t once = __GTHREAD_ONCE_INIT;
+  if (__gthread_once (&once, get_globals_init) != 0
+      || use_thread_key < 0)
+    use_thread_key = 0;
+}
+#endif
+
+extern "C" __cxa_eh_globals *
+__cxa_get_globals_fast ()
+{
+#if __GTHREADS
+  if (use_thread_key)
+    return (__cxa_eh_globals *) __gthread_getspecific (globals_key);
+  else
+    return &globals_static;
+#else
+  return &globals_static;
+#endif
+}
+
+extern "C" __cxa_eh_globals *
+__cxa_get_globals ()
+{
+#if __GTHREADS
+  __cxa_eh_globals *g;
+
+  if (use_thread_key == 0)
+    return &globals_static;
+
+  if (use_thread_key < 0)
+    {
+      get_globals_init_once ();
+
+      // Make sure use_thread_key got initialized.
+      if (use_thread_key == 0)
+	return &globals_static;
+    }
+
+  g = (__cxa_eh_globals *) __gthread_getspecific (globals_key);
+  if (! g)
+    {
+      if ((g = (__cxa_eh_globals *)
+	   std::malloc (sizeof (__cxa_eh_globals))) == 0
+	  || __gthread_setspecific (globals_key, (void *) g) != 0)
+        std::terminate ();
+      g->caughtExceptions = 0;
+      g->uncaughtExceptions = 0;
+    }
+
+  return g;
+#else
+  return &globals_static;
+#endif
+}
diff --git a/contrib/libstdc++/libsupc++/eh_personality.cc b/contrib/libstdc++/libsupc++/eh_personality.cc
new file mode 100644
index 0000000..35e93a3
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_personality.cc
@@ -0,0 +1,485 @@
+// -*- C++ -*- The GNU C++ exception personality routine.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 
+#include 
+#include 
+#include "unwind-cxx.h"
+
+using namespace __cxxabiv1;
+
+#include "unwind-pe.h"
+
+
+struct lsda_header_info
+{
+  _Unwind_Ptr Start;
+  _Unwind_Ptr LPStart;
+  _Unwind_Ptr ttype_base;
+  const unsigned char *TType;
+  const unsigned char *action_table;
+  unsigned char ttype_encoding;
+  unsigned char call_site_encoding;
+};
+
+static const unsigned char *
+parse_lsda_header (_Unwind_Context *context, const unsigned char *p,
+		   lsda_header_info *info)
+{
+  _Unwind_Word tmp;
+  unsigned char lpstart_encoding;
+
+  info->Start = (context ? _Unwind_GetRegionStart (context) : 0);
+
+  // Find @LPStart, the base to which landing pad offsets are relative.
+  lpstart_encoding = *p++;
+  if (lpstart_encoding != DW_EH_PE_omit)
+    p = read_encoded_value (context, lpstart_encoding, p, &info->LPStart);
+  else
+    info->LPStart = info->Start;
+
+  // Find @TType, the base of the handler and exception spec type data.
+  info->ttype_encoding = *p++;
+  if (info->ttype_encoding != DW_EH_PE_omit)
+    {
+      p = read_uleb128 (p, &tmp);
+      info->TType = p + tmp;
+    }
+  else
+    info->TType = 0;
+
+  // The encoding and length of the call-site table; the action table
+  // immediately follows.
+  info->call_site_encoding = *p++;
+  p = read_uleb128 (p, &tmp);
+  info->action_table = p + tmp;
+
+  return p;
+}
+
+static const std::type_info *
+get_ttype_entry (lsda_header_info *info, _Unwind_Word i)
+{
+  _Unwind_Ptr ptr;
+
+  i *= size_of_encoded_value (info->ttype_encoding);
+  read_encoded_value_with_base (info->ttype_encoding, info->ttype_base,
+				info->TType - i, &ptr);
+
+  return reinterpret_cast(ptr);
+}
+
+// Given the thrown type THROW_TYPE, pointer to a variable containing a
+// pointer to the exception object THROWN_PTR_P and a type CATCH_TYPE to
+// compare against, return whether or not there is a match and if so,
+// update *THROWN_PTR_P.
+
+static bool
+get_adjusted_ptr (const std::type_info *catch_type,
+		  const std::type_info *throw_type,
+		  void **thrown_ptr_p)
+{
+  void *thrown_ptr = *thrown_ptr_p;
+
+  // Pointer types need to adjust the actual pointer, not
+  // the pointer to pointer that is the exception object.
+  // This also has the effect of passing pointer types
+  // "by value" through the __cxa_begin_catch return value.
+  if (throw_type->__is_pointer_p ())
+    thrown_ptr = *(void **) thrown_ptr;
+
+  if (catch_type->__do_catch (throw_type, &thrown_ptr, 1))
+    {
+      *thrown_ptr_p = thrown_ptr;
+      return true;
+    }
+
+  return false;
+}
+
+static bool
+check_exception_spec (lsda_header_info *info, const std::type_info *throw_type,
+		      void *thrown_ptr, _Unwind_Sword filter_value)
+{
+  const unsigned char *e = info->TType - filter_value - 1;
+
+  while (1)
+    {
+      const std::type_info *catch_type;
+      _Unwind_Word tmp;
+
+      e = read_uleb128 (e, &tmp);
+
+      // Zero signals the end of the list.  If we've not found
+      // a match by now, then we've failed the specification.
+      if (tmp == 0)
+        return false;
+
+      // Match a ttype entry.
+      catch_type = get_ttype_entry (info, tmp);
+
+      // ??? There is currently no way to ask the RTTI code about the
+      // relationship between two types without reference to a specific
+      // object.  There should be; then we wouldn't need to mess with
+      // thrown_ptr here.
+      if (get_adjusted_ptr (catch_type, throw_type, &thrown_ptr))
+	return true;
+    }
+}
+
+// Using a different personality function name causes link failures
+// when trying to mix code using different exception handling models.
+#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+#define PERSONALITY_FUNCTION	__gxx_personality_sj0
+#define __builtin_eh_return_data_regno(x) x
+#else
+#define PERSONALITY_FUNCTION	__gxx_personality_v0
+#endif
+
+extern "C" _Unwind_Reason_Code
+PERSONALITY_FUNCTION (int version,
+		      _Unwind_Action actions,
+		      _Unwind_Exception_Class exception_class,
+		      struct _Unwind_Exception *ue_header,
+		      struct _Unwind_Context *context)
+{
+  __cxa_exception *xh = __get_exception_header_from_ue (ue_header);
+
+  enum found_handler_type
+  {
+    found_nothing,
+    found_terminate,
+    found_cleanup,
+    found_handler
+  } found_type;
+
+  lsda_header_info info;
+  const unsigned char *language_specific_data;
+  const unsigned char *action_record;
+  const unsigned char *p;
+  _Unwind_Ptr landing_pad, ip;
+  int handler_switch_value;
+  void *thrown_ptr = xh + 1;
+
+  // Interface version check.
+  if (version != 1)
+    return _URC_FATAL_PHASE1_ERROR;
+
+  // Shortcut for phase 2 found handler for domestic exception.
+  if (actions == (_UA_CLEANUP_PHASE | _UA_HANDLER_FRAME)
+      && exception_class == __gxx_exception_class)
+    {
+      handler_switch_value = xh->handlerSwitchValue;
+      landing_pad = (_Unwind_Ptr) xh->catchTemp;
+      found_type = (landing_pad == 0 ? found_terminate : found_handler);
+      goto install_context;
+    }
+
+  language_specific_data = (const unsigned char *)
+    _Unwind_GetLanguageSpecificData (context);
+
+  // If no LSDA, then there are no handlers or cleanups.
+  if (! language_specific_data)
+    return _URC_CONTINUE_UNWIND;
+
+  // Parse the LSDA header.
+  p = parse_lsda_header (context, language_specific_data, &info);
+  info.ttype_base = base_of_encoded_value (info.ttype_encoding, context);
+  ip = _Unwind_GetIP (context) - 1;
+  landing_pad = 0;
+  action_record = 0;
+  handler_switch_value = 0;
+
+#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+  // The given "IP" is an index into the call-site table, with two
+  // exceptions -- -1 means no-action, and 0 means terminate.  But
+  // since we're using uleb128 values, we've not got random access
+  // to the array.
+  if ((int) ip < 0)
+    return _URC_CONTINUE_UNWIND;
+  else if (ip == 0)
+    {
+      // Fall through to set found_terminate.
+    }
+  else
+    {
+      _Unwind_Word cs_lp, cs_action;
+      do
+	{
+	  p = read_uleb128 (p, &cs_lp);
+	  p = read_uleb128 (p, &cs_action);
+	}
+      while (--ip);
+
+      // Can never have null landing pad for sjlj -- that would have
+      // been indicated by a -1 call site index.
+      landing_pad = cs_lp + 1;
+      if (cs_action)
+	action_record = info.action_table + cs_action - 1;
+      goto found_something;
+    }
+#else
+  // Search the call-site table for the action associated with this IP.
+  while (p < info.action_table)
+    {
+      _Unwind_Ptr cs_start, cs_len, cs_lp;
+      _Unwind_Word cs_action;
+
+      // Note that all call-site encodings are "absolute" displacements.
+      p = read_encoded_value (0, info.call_site_encoding, p, &cs_start);
+      p = read_encoded_value (0, info.call_site_encoding, p, &cs_len);
+      p = read_encoded_value (0, info.call_site_encoding, p, &cs_lp);
+      p = read_uleb128 (p, &cs_action);
+
+      // The table is sorted, so if we've passed the ip, stop.
+      if (ip < info.Start + cs_start)
+	p = info.action_table;
+      else if (ip < info.Start + cs_start + cs_len)
+	{
+	  if (cs_lp)
+	    landing_pad = info.LPStart + cs_lp;
+	  if (cs_action)
+	    action_record = info.action_table + cs_action - 1;
+	  goto found_something;
+	}
+    }
+#endif // _GLIBCPP_SJLJ_EXCEPTIONS
+
+  // If ip is not present in the table, call terminate.  This is for
+  // a destructor inside a cleanup, or a library routine the compiler
+  // was not expecting to throw.
+  found_type = (actions & _UA_FORCE_UNWIND ? found_nothing : found_terminate);
+  goto do_something;
+
+ found_something:
+  if (landing_pad == 0)
+    {
+      // If ip is present, and has a null landing pad, there are
+      // no cleanups or handlers to be run.
+      found_type = found_nothing;
+    }
+  else if (action_record == 0)
+    {
+      // If ip is present, has a non-null landing pad, and a null
+      // action table offset, then there are only cleanups present.
+      // Cleanups use a zero switch value, as set above.
+      found_type = found_cleanup;
+    }
+  else
+    {
+      // Otherwise we have a catch handler or exception specification.
+
+      _Unwind_Sword ar_filter, ar_disp;
+      const std::type_info *throw_type, *catch_type;
+      bool saw_cleanup = false;
+      bool saw_handler = false;
+
+      // During forced unwinding, we only run cleanups.  With a foreign
+      // exception class, there's no exception type.
+      // ??? What to do about GNU Java and GNU Ada exceptions.
+
+      if ((actions & _UA_FORCE_UNWIND)
+	  || exception_class != __gxx_exception_class)
+	throw_type = 0;
+      else
+	throw_type = xh->exceptionType;
+
+      while (1)
+	{
+	  p = action_record;
+	  p = read_sleb128 (p, &ar_filter);
+	  read_sleb128 (p, &ar_disp);
+
+	  if (ar_filter == 0)
+	    {
+	      // Zero filter values are cleanups.
+	      saw_cleanup = true;
+	    }
+	  else if (ar_filter > 0)
+	    {
+	      // Positive filter values are handlers.
+	      catch_type = get_ttype_entry (&info, ar_filter);
+
+	      // Null catch type is a catch-all handler.  We can catch
+	      // foreign exceptions with this.
+	      if (! catch_type)
+		{
+		  if (!(actions & _UA_FORCE_UNWIND))
+		    {
+		      saw_handler = true;
+		      break;
+		    }
+		}
+	      else if (throw_type)
+		{
+		  if (get_adjusted_ptr (catch_type, throw_type, &thrown_ptr))
+		    {
+		      saw_handler = true;
+		      break;
+		    }
+		}
+	    }
+	  else
+	    {
+	      // Negative filter values are exception specifications.
+	      // ??? How do foreign exceptions fit in?  As far as I can
+	      // see we can't match because there's no __cxa_exception
+	      // object to stuff bits in for __cxa_call_unexpected to use.
+	      if (throw_type
+		  && ! check_exception_spec (&info, throw_type, thrown_ptr,
+					     ar_filter))
+		{
+		  saw_handler = true;
+		  break;
+		}
+	    }
+
+	  if (ar_disp == 0)
+	    break;
+	  action_record = p + ar_disp;
+	}
+
+      if (saw_handler)
+	{
+	  handler_switch_value = ar_filter;
+	  found_type = found_handler;
+	}
+      else
+	found_type = (saw_cleanup ? found_cleanup : found_nothing);
+    }
+
+ do_something:
+   if (found_type == found_nothing)
+     return _URC_CONTINUE_UNWIND;
+
+  if (actions & _UA_SEARCH_PHASE)
+    {
+      if (found_type == found_cleanup)
+	return _URC_CONTINUE_UNWIND;
+
+      // For domestic exceptions, we cache data from phase 1 for phase 2.
+      if (exception_class == __gxx_exception_class)
+        {
+          xh->handlerSwitchValue = handler_switch_value;
+          xh->actionRecord = action_record;
+          xh->languageSpecificData = language_specific_data;
+          xh->adjustedPtr = thrown_ptr;
+
+          // ??? Completely unknown what this field is supposed to be for.
+          // ??? Need to cache TType encoding base for call_unexpected.
+          xh->catchTemp = (void *) (_Unwind_Ptr) landing_pad;
+	}
+      return _URC_HANDLER_FOUND;
+    }
+
+ install_context:
+  if (found_type == found_terminate)
+    {
+      __cxa_begin_catch (&xh->unwindHeader);
+      __terminate (xh->terminateHandler);
+    }
+
+  // Cache the TType base value for __cxa_call_unexpected, as we won't
+  // have an _Unwind_Context then.
+  if (handler_switch_value < 0)
+    {
+      parse_lsda_header (context, xh->languageSpecificData, &info);
+      xh->catchTemp = (void *) base_of_encoded_value (info.ttype_encoding,
+						      context);
+    }
+
+  _Unwind_SetGR (context, __builtin_eh_return_data_regno (0),
+		 (_Unwind_Ptr) &xh->unwindHeader);
+  _Unwind_SetGR (context, __builtin_eh_return_data_regno (1),
+		 handler_switch_value);
+  _Unwind_SetIP (context, landing_pad);
+  return _URC_INSTALL_CONTEXT;
+}
+
+extern "C" void
+__cxa_call_unexpected (void *exc_obj_in)
+{
+  _Unwind_Exception *exc_obj
+    = reinterpret_cast <_Unwind_Exception *>(exc_obj_in);
+
+  __cxa_begin_catch (exc_obj);
+
+  // This function is a handler for our exception argument.  If we exit
+  // by throwing a different exception, we'll need the original cleaned up.
+  struct end_catch_protect
+  {
+    end_catch_protect() { }
+    ~end_catch_protect() { __cxa_end_catch(); }
+  } end_catch_protect_obj;
+
+  lsda_header_info info;
+  __cxa_exception *xh = __get_exception_header_from_ue (exc_obj);
+  const unsigned char *xh_lsda;
+  _Unwind_Sword xh_switch_value;
+  std::terminate_handler xh_terminate_handler;
+
+  // If the unexpectedHandler rethrows the exception (e.g. to categorize it),
+  // it will clobber data about the current handler.  So copy the data out now.
+  xh_lsda = xh->languageSpecificData;
+  xh_switch_value = xh->handlerSwitchValue;
+  xh_terminate_handler = xh->terminateHandler;
+  info.ttype_base = (_Unwind_Ptr) xh->catchTemp;
+
+  try 
+    { __unexpected (xh->unexpectedHandler); } 
+  catch(...) 
+    {
+      // Get the exception thrown from unexpected.
+      // ??? Foreign exceptions can't be stacked this way.
+      
+      __cxa_eh_globals *globals = __cxa_get_globals_fast ();
+      __cxa_exception *new_xh = globals->caughtExceptions;
+      void *new_ptr = new_xh + 1;
+      
+      // We don't quite have enough stuff cached; re-parse the LSDA.
+      parse_lsda_header (0, xh_lsda, &info);
+      
+      // If this new exception meets the exception spec, allow it.
+      if (check_exception_spec (&info, new_xh->exceptionType,
+				new_ptr, xh_switch_value))
+	__throw_exception_again;
+      
+      // If the exception spec allows std::bad_exception, throw that.
+      // We don't have a thrown object to compare against, but since
+      // bad_exception doesn't have virtual bases, that's OK; just pass 0.
+#ifdef __EXCEPTIONS  
+      const std::type_info &bad_exc = typeid (std::bad_exception);
+      if (check_exception_spec (&info, &bad_exc, 0, xh_switch_value))
+	throw std::bad_exception();
+#endif   
+      // Otherwise, die.
+      __terminate (xh_terminate_handler);
+    }
+}
diff --git a/contrib/libstdc++/libsupc++/eh_terminate.cc b/contrib/libstdc++/libsupc++/eh_terminate.cc
new file mode 100644
index 0000000..58a6ea4
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_terminate.cc
@@ -0,0 +1,87 @@
+// -*- C++ -*- std::terminate, std::unexpected and friends.
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "typeinfo"
+#include "exception"
+#include 
+#include "unwind-cxx.h"
+#include "exception_defines.h"
+
+using namespace __cxxabiv1;
+
+/* The current installed user handlers.  */
+std::terminate_handler __cxxabiv1::__terminate_handler = std::abort;
+std::unexpected_handler __cxxabiv1::__unexpected_handler = std::terminate;
+
+void
+__cxxabiv1::__terminate (std::terminate_handler handler)
+{
+  try {
+    handler ();
+    std::abort ();
+  } catch (...) {
+    std::abort ();
+  }
+}
+
+void
+std::terminate ()
+{
+  __terminate (__terminate_handler);
+}
+
+void
+__cxxabiv1::__unexpected (std::unexpected_handler handler)
+{
+  handler();
+  std::terminate ();
+}
+
+void
+std::unexpected ()
+{
+  __unexpected (__unexpected_handler);
+}
+
+std::terminate_handler
+std::set_terminate (std::terminate_handler func) throw()
+{
+  std::terminate_handler old = __terminate_handler;
+  __terminate_handler = func;
+  return old;
+}
+
+std::unexpected_handler
+std::set_unexpected (std::unexpected_handler func) throw()
+{
+  std::unexpected_handler old = __unexpected_handler;
+  __unexpected_handler = func;
+  return old;
+}
diff --git a/contrib/libstdc++/libsupc++/eh_throw.cc b/contrib/libstdc++/libsupc++/eh_throw.cc
new file mode 100644
index 0000000..407b829
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_throw.cc
@@ -0,0 +1,102 @@
+// -*- C++ -*- Exception handling routines for throwing.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 
+#include "unwind-cxx.h"
+
+
+using namespace __cxxabiv1;
+
+
+static void
+__gxx_exception_cleanup (_Unwind_Reason_Code code, _Unwind_Exception *exc)
+{
+  __cxa_exception *header = __get_exception_header_from_ue (exc);
+
+  // If we haven't been caught by a foreign handler, then this is
+  // some sort of unwind error.  In that case just die immediately.
+  if (code != _URC_FOREIGN_EXCEPTION_CAUGHT)
+    __terminate (header->terminateHandler);
+
+  if (header->exceptionDestructor)
+    header->exceptionDestructor (header + 1);
+
+  __cxa_free_exception (header + 1);
+}
+
+
+extern "C" void
+__cxa_throw (void *obj, std::type_info *tinfo, void (*dest) (void *))
+{
+  __cxa_exception *header = __get_exception_header_from_obj (obj);
+  header->exceptionType = tinfo;
+  header->exceptionDestructor = dest;
+  header->unexpectedHandler = __unexpected_handler;
+  header->terminateHandler = __terminate_handler;
+  header->unwindHeader.exception_class = __gxx_exception_class;
+  header->unwindHeader.exception_cleanup = __gxx_exception_cleanup;
+
+  __cxa_eh_globals *globals = __cxa_get_globals ();
+  globals->uncaughtExceptions += 1;
+
+#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+  _Unwind_SjLj_RaiseException (&header->unwindHeader);
+#else
+  _Unwind_RaiseException (&header->unwindHeader);
+#endif
+
+  // Some sort of unwinding error.  Note that terminate is a handler.
+  __cxa_begin_catch (&header->unwindHeader);
+  std::terminate ();
+}
+
+extern "C" void
+__cxa_rethrow ()
+{
+  __cxa_eh_globals *globals = __cxa_get_globals ();
+  __cxa_exception *header = globals->caughtExceptions;
+
+  // Watch for luser rethrowing with no active exception.
+  if (header)
+    {
+      // Tell __cxa_end_catch this is a rethrow.
+      header->handlerCount = -header->handlerCount;
+
+#ifdef _GLIBCPP_SJLJ_EXCEPTIONS
+      _Unwind_SjLj_RaiseException (&header->unwindHeader);
+#else
+      _Unwind_RaiseException (&header->unwindHeader);
+#endif
+  
+      // Some sort of unwinding error.  Note that terminate is a handler.
+      __cxa_begin_catch (&header->unwindHeader);
+    }
+  std::terminate ();
+}
diff --git a/contrib/libstdc++/libsupc++/eh_type.cc b/contrib/libstdc++/libsupc++/eh_type.cc
new file mode 100644
index 0000000..1c8afac
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/eh_type.cc
@@ -0,0 +1,50 @@
+// -*- C++ -*- Exception handling routines for catching.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 
+#include "unwind-cxx.h"
+
+namespace __cxxabiv1
+{
+
+// Returns the type_info for the currently handled exception [15.3/8], or
+// null if there is none.
+extern "C"
+std::type_info *__cxa_current_exception_type ()
+{
+  __cxa_eh_globals *globals = __cxa_get_globals ();
+  __cxa_exception *header = globals->caughtExceptions;
+  if (header)
+    return header->exceptionType;
+  else
+    return 0;
+}
+
+} // namespace __cxxabiv1
diff --git a/contrib/libstdc++/libsupc++/exception b/contrib/libstdc++/libsupc++/exception
new file mode 100644
index 0000000..b26cb6d
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/exception
@@ -0,0 +1,116 @@
+// Exception Handling support header for -*- C++ -*-
+
+// Copyright (C) 1995, 1996, 1997, 1998, 2000, 2001, 2002
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+/** @file exception
+ *  This header defines several types and functions relating to the
+ *  handling of exceptions in a C++ program.
+ */
+
+#ifndef __EXCEPTION__
+#define __EXCEPTION__
+
+extern "C++" {
+
+namespace std 
+{
+  /** This is the base class for all exceptions thrown by the standard
+   *  library, and by certain language expressions.  You are free to derive
+   *  your own %exception classes, or use a different hierarchy, or to
+   *  throw non-class data (e.g., fundamental types).
+   *  @brief Base class for all library exceptions.
+   */
+  class exception 
+  {
+  public:
+    exception() throw() { }
+    virtual ~exception() throw();
+    /** Returns a C-style character string describing the general cause
+     *  of the current error.  */
+    virtual const char* what() const throw();
+  };
+
+  /** If an %exception is thrown which is not listed in a function's
+   *  %exception specification, one of these may be thrown.  */
+  class bad_exception : public exception 
+  {
+  public:
+    bad_exception() throw() { }
+    // This declaration is not useless:
+    // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+    virtual ~bad_exception() throw();
+  };
+
+  /// If you write a replacement %terminate handler, it must be of this type.
+  typedef void (*terminate_handler) ();
+  /// If you write a replacement %unexpected handler, it must be of this type.
+  typedef void (*unexpected_handler) ();
+
+  /// Takes a new handler function as an argument, returns the old function.
+  terminate_handler set_terminate(terminate_handler) throw();
+  /** The runtime will call this function if %exception handling must be
+   *  abandoned for any reason.  */
+  void terminate() __attribute__ ((__noreturn__));
+
+  /// Takes a new handler function as an argument, returns the old function.
+  unexpected_handler set_unexpected(unexpected_handler) throw();
+  /** The runtime will call this function if an %exception is thrown which
+   *  violates the function's %exception specification.  */
+  void unexpected() __attribute__ ((__noreturn__));
+
+  /** [18.6.4]/1:  "Returns true after completing evaluation of a
+   *  throw-expression until either completing initialization of the
+   *  exception-declaration in the matching handler or entering @c unexpected()
+   *  due to the throw; or after entering @c terminate() for any reason
+   *  other than an explicit call to @c terminate().  [Note: This includes
+   *  stack unwinding [15.2].  end note]"
+   *
+   *  2:  "When @c uncaught_exception() is true, throwing an %exception can
+   *  result in a call of @c terminate() (15.5.1)."
+   */
+  bool uncaught_exception() throw();
+} // namespace std
+
+namespace __gnu_cxx
+{
+  /** A replacement for the standard terminate_handler which prints more
+      information about the terminating exception (if any) on stderr.  Call
+      @code
+        std::set_terminate (__gnu_cxx::__verbose_terminate_handler)
+      @endcode
+      to use.  For more info, see
+      http://gcc.gnu.org/onlinedocs/libstdc++/19_diagnostics/howto.html#4
+  */
+  void __verbose_terminate_handler ();
+} // namespace __gnu_cxx
+  
+} // extern "C++"
+
+#endif
diff --git a/contrib/libstdc++/libsupc++/exception_defines.h b/contrib/libstdc++/libsupc++/exception_defines.h
new file mode 100644
index 0000000..fca2d83
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/exception_defines.h
@@ -0,0 +1,42 @@
+// -fno-exceptions Support -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.1  Exception classes
+//
+
+#ifndef __EXCEPTIONS
+// Iff -fno-exceptions, transform error handling code to work without it.
+# define try      if (true)
+# define catch(X) if (false)
+# define __throw_exception_again
+#else
+// Else proceed normally.
+# define __throw_exception_again throw
+#endif
diff --git a/contrib/libstdc++/libsupc++/new b/contrib/libstdc++/libsupc++/new
new file mode 100644
index 0000000..afa603a
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/new
@@ -0,0 +1,94 @@
+// The -*- C++ -*- dynamic memory management header.
+
+// Copyright (C) 1994, 1996, 1997, 1998, 2000, 2001, 2002
+// Free Software Foundation
+
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+/** @file new
+ *  The header @c new defines several functions to manage dynamic memory and
+ *  handling memory allocation errors; see
+ *  http://gcc.gnu.org/onlinedocs/libstdc++/18_support/howto.html#4 for more.
+ */
+
+#ifndef __NEW__
+#define __NEW__
+
+#include 
+#include 
+
+extern "C++" {
+
+namespace std 
+{
+  /** @c bad_alloc (or classes derived from it) is used to report allocation
+   *  errors from the throwing forms of @c new.  */
+  class bad_alloc : public exception 
+  {
+  public:
+    bad_alloc() throw() { }
+    // This declaration is not useless:
+    // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+    virtual ~bad_alloc() throw();
+  };
+
+  struct nothrow_t { };
+  extern const nothrow_t nothrow;
+  /** If you write your own error handler to be called by @c new, it must
+   *  be of this type.  */
+  typedef void (*new_handler)();
+  /// Takes a replacement handler as the argument, returns the previous handler.
+  new_handler set_new_handler(new_handler);
+} // namespace std
+
+//@{
+/** These are replaceable signatures:
+ *  - normal single new and delete (no arguments, throw @c bad_alloc on error)
+ *  - normal array new and delete (same)
+ *  - @c nothrow single new and delete (take a @c nothrow argument, return
+ *    @c NULL on error)
+ *  - @c nothrow array new and delete (same)
+ *
+ *  Placement new and delete signatures (take a memory address argument,
+ *  does nothing) may not be replaced by a user's program.
+*/
+void* operator new(std::size_t) throw (std::bad_alloc);
+void* operator new[](std::size_t) throw (std::bad_alloc);
+void operator delete(void*) throw();
+void operator delete[](void*) throw();
+void* operator new(std::size_t, const std::nothrow_t&) throw();
+void* operator new[](std::size_t, const std::nothrow_t&) throw();
+void operator delete(void*, const std::nothrow_t&) throw();
+void operator delete[](void*, const std::nothrow_t&) throw();
+
+// Default placement versions of operator new.
+inline void* operator new(std::size_t, void* __p) throw() { return __p; }
+inline void* operator new[](std::size_t, void* __p) throw() { return __p; }
+//@}
+} // extern "C++"
+
+#endif
diff --git a/contrib/libstdc++/libsupc++/new_handler.cc b/contrib/libstdc++/libsupc++/new_handler.cc
new file mode 100644
index 0000000..ed34bc8
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/new_handler.cc
@@ -0,0 +1,47 @@
+// Implementation file for the -*- C++ -*- dynamic memory management header.
+
+// Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+const std::nothrow_t std::nothrow = { };
+
+using std::new_handler;
+new_handler __new_handler;
+
+new_handler
+std::set_new_handler (new_handler handler)
+{
+  new_handler prev_handler = __new_handler;
+  __new_handler = handler;
+  return prev_handler;
+}
+
+std::bad_alloc::~bad_alloc() throw() { }
diff --git a/contrib/libstdc++/libsupc++/new_op.cc b/contrib/libstdc++/libsupc++/new_op.cc
new file mode 100644
index 0000000..df43e6e
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/new_op.cc
@@ -0,0 +1,63 @@
+// Support routines for the -*- C++ -*- dynamic memory management.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+#include 
+#include 
+
+using std::new_handler;
+using std::bad_alloc;
+
+extern "C" void *malloc (std::size_t);
+extern new_handler __new_handler;
+
+void *
+operator new (std::size_t sz) throw (std::bad_alloc)
+{
+  void *p;
+
+  /* malloc (0) is unpredictable; avoid it.  */
+  if (sz == 0)
+    sz = 1;
+  p = (void *) malloc (sz);
+  while (p == 0)
+    {
+      new_handler handler = __new_handler;
+      if (! handler)
+#ifdef __EXCEPTIONS
+	throw bad_alloc();
+#else
+        std::abort();
+#endif
+      handler ();
+      p = (void *) malloc (sz);
+    }
+
+  return p;
+}
diff --git a/contrib/libstdc++/libsupc++/new_opnt.cc b/contrib/libstdc++/libsupc++/new_opnt.cc
new file mode 100644
index 0000000..e97ac98
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/new_opnt.cc
@@ -0,0 +1,66 @@
+// Support routines for the -*- C++ -*- dynamic memory management.
+// Copyright (C) 1997, 1998, 1999, 2000, 2001 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+#include 
+
+using std::new_handler;
+using std::bad_alloc;
+
+extern "C" void *malloc (std::size_t);
+extern new_handler __new_handler;
+
+void *
+operator new (std::size_t sz, const std::nothrow_t&) throw()
+{
+  void *p;
+
+  /* malloc (0) is unpredictable; avoid it.  */
+  if (sz == 0)
+    sz = 1;
+  p = (void *) malloc (sz);
+  while (p == 0)
+    {
+      new_handler handler = __new_handler;
+      if (! handler)
+	return 0;
+      try
+	{
+	  handler ();
+	}
+      catch (bad_alloc &)
+	{
+	  return 0;
+	}
+
+      p = (void *) malloc (sz);
+    }
+
+  return p;
+}
diff --git a/contrib/libstdc++/libsupc++/new_opv.cc b/contrib/libstdc++/libsupc++/new_opv.cc
new file mode 100644
index 0000000..7b1b1ca
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/new_opv.cc
@@ -0,0 +1,37 @@
+// Boilerplate support routines for -*- C++ -*- dynamic memory management.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+void *
+operator new[] (std::size_t sz) throw (std::bad_alloc)
+{
+  return ::operator new(sz);
+}
diff --git a/contrib/libstdc++/libsupc++/new_opvnt.cc b/contrib/libstdc++/libsupc++/new_opvnt.cc
new file mode 100644
index 0000000..ad5fbf4
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/new_opvnt.cc
@@ -0,0 +1,37 @@
+// Boilerplate support routines for -*- C++ -*- dynamic memory management.
+
+// Copyright (C) 1997, 1998, 1999, 2000 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 "new"
+
+void *
+operator new[] (std::size_t sz, const std::nothrow_t& nothrow) throw()
+{
+  return ::operator new(sz, nothrow);
+}
diff --git a/contrib/libstdc++/libsupc++/pure.cc b/contrib/libstdc++/libsupc++/pure.cc
new file mode 100644
index 0000000..5f9b3c8
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/pure.cc
@@ -0,0 +1,51 @@
+// -*- C++ -*- 
+// Copyright (C) 2000, 2001 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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 
+#include "unwind-cxx.h"
+
+#ifdef _GLIBCPP_HAVE_UNISTD_H
+# include 
+# define writestr(str)	write(2, str, sizeof(str) - 1)
+# ifdef __GNU_LIBRARY__
+  /* Avoid forcing the library's meaning of `write' on the user program
+     by using the "internal" name (for use within the library).  */
+/*#  define write(fd, buf, n)	__write((fd), (buf), (n))*/
+# endif
+#else
+# include 
+# define writestr(str)	fputs(str, stderr)
+#endif
+
+extern "C" void
+__cxa_pure_virtual (void)
+{
+  writestr ("pure virtual method called\n");
+  std::terminate ();
+}
diff --git a/contrib/libstdc++/libsupc++/tinfo.cc b/contrib/libstdc++/libsupc++/tinfo.cc
new file mode 100644
index 0000000..1eecdeb
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/tinfo.cc
@@ -0,0 +1,721 @@
+// Methods for type_info for -*- C++ -*- Run Time Type Identification.
+// Copyright (C) 1994, 1996, 1998, 1999, 2000, 2001, 2002
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+
+// GNU CC 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 GNU CC; 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 
+#include "tinfo.h"
+#include "new"			// for placement new
+
+// This file contains the minimal working set necessary to link with code
+// that uses virtual functions and -frtti but does not actually use RTTI
+// functionality.
+
+std::type_info::
+~type_info ()
+{ }
+
+std::bad_cast::~bad_cast() throw() { }
+std::bad_typeid::~bad_typeid() throw() { }
+
+#if !__GXX_MERGED_TYPEINFO_NAMES
+
+// We can't rely on common symbols being shared between shared objects.
+bool std::type_info::
+operator== (const std::type_info& arg) const
+{
+  return (&arg == this) || (__builtin_strcmp (name (), arg.name ()) == 0);
+}
+
+#endif
+
+namespace std {
+
+// return true if this is a type_info for a pointer type
+bool type_info::
+__is_pointer_p () const
+{
+  return false;
+}
+
+// return true if this is a type_info for a function type
+bool type_info::
+__is_function_p () const
+{
+  return false;
+}
+
+// try and catch a thrown object.
+bool type_info::
+__do_catch (const type_info *thr_type, void **, unsigned) const
+{
+  return *this == *thr_type;
+}
+
+// upcast from this type to the target. __class_type_info will override
+bool type_info::
+__do_upcast (const abi::__class_type_info *, void **) const
+{
+  return false;
+}
+
+};
+
+namespace {
+
+using namespace std;
+using namespace abi;
+
+// initial part of a vtable, this structure is used with offsetof, so we don't
+// have to keep alignments consistent manually.
+struct vtable_prefix {
+  ptrdiff_t whole_object;           // offset to most derived object
+  const __class_type_info *whole_type;  // pointer to most derived type_info
+  const void *origin;               // what a class's vptr points to
+};
+
+template 
+inline const T *
+adjust_pointer (const void *base, ptrdiff_t offset)
+{
+  return reinterpret_cast 
+    (reinterpret_cast  (base) + offset);
+}
+
+// ADDR is a pointer to an object.  Convert it to a pointer to a base,
+// using OFFSET. IS_VIRTUAL is true, if we are getting a virtual base.
+inline void const *
+convert_to_base (void const *addr, bool is_virtual, ptrdiff_t offset)
+{
+  if (is_virtual)
+    {
+      const void *vtable = *static_cast  (addr);
+      
+      offset = *adjust_pointer (vtable, offset);
+    }
+
+  return adjust_pointer (addr, offset);
+}
+
+// some predicate functions for __class_type_info::__sub_kind
+inline bool contained_p (__class_type_info::__sub_kind access_path)
+{
+  return access_path >= __class_type_info::__contained_mask;
+}
+inline bool public_p (__class_type_info::__sub_kind access_path)
+{
+  return access_path & __class_type_info::__contained_public_mask;
+}
+inline bool virtual_p (__class_type_info::__sub_kind access_path)
+{
+  return (access_path & __class_type_info::__contained_virtual_mask);
+}
+inline bool contained_public_p (__class_type_info::__sub_kind access_path)
+{
+  return ((access_path & __class_type_info::__contained_public)
+          == __class_type_info::__contained_public);
+}
+inline bool contained_nonpublic_p (__class_type_info::__sub_kind access_path)
+{
+  return ((access_path & __class_type_info::__contained_public)
+          == __class_type_info::__contained_mask);
+}
+inline bool contained_nonvirtual_p (__class_type_info::__sub_kind access_path)
+{
+  return ((access_path & (__class_type_info::__contained_mask
+                          | __class_type_info::__contained_virtual_mask))
+          == __class_type_info::__contained_mask);
+}
+
+static const __class_type_info *const nonvirtual_base_type =
+    static_cast  (0) + 1;
+
+}; // namespace
+
+namespace __cxxabiv1
+{
+
+__class_type_info::
+~__class_type_info ()
+{}
+
+__si_class_type_info::
+~__si_class_type_info ()
+{}
+
+__vmi_class_type_info::
+~__vmi_class_type_info ()
+{}
+
+// __upcast_result is used to hold information during traversal of a class
+// hierarchy when catch matching.
+struct __class_type_info::__upcast_result
+{
+  const void *dst_ptr;        // pointer to caught object
+  __sub_kind part2dst;        // path from current base to target
+  int src_details;            // hints about the source type hierarchy
+  const __class_type_info *base_type; // where we found the target,
+                              // if in vbase the __class_type_info of vbase
+                              // if a non-virtual base then 1
+                              // else NULL
+  public:
+  __upcast_result (int d)
+    :dst_ptr (NULL), part2dst (__unknown), src_details (d), base_type (NULL)
+    {}
+};
+
+// __dyncast_result is used to hold information during traversal of a class
+// hierarchy when dynamic casting.
+struct __class_type_info::__dyncast_result
+{
+  const void *dst_ptr;        // pointer to target object or NULL
+  __sub_kind whole2dst;       // path from most derived object to target
+  __sub_kind whole2src;       // path from most derived object to sub object
+  __sub_kind dst2src;         // path from target to sub object
+  int whole_details;          // details of the whole class hierarchy
+  
+  public:
+  __dyncast_result (int details_ = __vmi_class_type_info::__flags_unknown_mask)
+    :dst_ptr (NULL), whole2dst (__unknown),
+     whole2src (__unknown), dst2src (__unknown),
+     whole_details (details_)
+    {}
+};
+
+bool __class_type_info::
+__do_catch (const type_info *thr_type,
+            void **thr_obj,
+            unsigned outer) const
+{
+  if (*this == *thr_type)
+    return true;
+  if (outer >= 4)
+    // Neither `A' nor `A *'.
+    return false;
+  return thr_type->__do_upcast (this, thr_obj);
+}
+
+bool __class_type_info::
+__do_upcast (const __class_type_info *dst_type,
+             void **obj_ptr) const
+{
+  __upcast_result result (__vmi_class_type_info::__flags_unknown_mask);
+  
+  __do_upcast (dst_type, *obj_ptr, result);
+  if (!contained_public_p (result.part2dst))
+    return false;
+  *obj_ptr = const_cast  (result.dst_ptr);
+  return true;
+}
+
+inline __class_type_info::__sub_kind __class_type_info::
+__find_public_src (ptrdiff_t src2dst,
+                   const void *obj_ptr,
+                   const __class_type_info *src_type,
+                   const void *src_ptr) const
+{
+  if (src2dst >= 0)
+    return adjust_pointer  (obj_ptr, src2dst) == src_ptr
+            ? __contained_public : __not_contained;
+  if (src2dst == -2)
+    return __not_contained;
+  return __do_find_public_src (src2dst, obj_ptr, src_type, src_ptr);
+}
+
+__class_type_info::__sub_kind __class_type_info::
+__do_find_public_src (ptrdiff_t,
+                      const void *obj_ptr,
+                      const __class_type_info *,
+                      const void *src_ptr) const
+{
+  if (src_ptr == obj_ptr)
+    // Must be our type, as the pointers match.
+    return __contained_public;
+  return __not_contained;
+}
+
+__class_type_info::__sub_kind __si_class_type_info::
+__do_find_public_src (ptrdiff_t src2dst,
+                      const void *obj_ptr,
+                      const __class_type_info *src_type,
+                      const void *src_ptr) const
+{
+  if (src_ptr == obj_ptr && *this == *src_type)
+    return __contained_public;
+  return __base_type->__do_find_public_src (src2dst, obj_ptr, src_type, src_ptr);
+}
+
+__class_type_info::__sub_kind __vmi_class_type_info::
+__do_find_public_src (ptrdiff_t src2dst,
+                      const void *obj_ptr,
+                      const __class_type_info *src_type,
+                      const void *src_ptr) const
+{
+  if (obj_ptr == src_ptr && *this == *src_type)
+    return __contained_public;
+  
+  for (std::size_t i = __base_count; i--;)
+    {
+      if (!__base_info[i].__is_public_p ())
+        continue; // Not public, can't be here.
+      
+      const void *base = obj_ptr;
+      ptrdiff_t offset = __base_info[i].__offset ();
+      bool is_virtual = __base_info[i].__is_virtual_p ();
+      
+      if (is_virtual)
+        {
+          if (src2dst == -3)
+            continue; // Not a virtual base, so can't be here.
+        }
+      base = convert_to_base (base, is_virtual, offset);
+      
+      __sub_kind base_kind = __base_info[i].__base->__do_find_public_src
+                              (src2dst, base, src_type, src_ptr);
+      if (contained_p (base_kind))
+        {
+          if (is_virtual)
+            base_kind = __sub_kind (base_kind | __contained_virtual_mask);
+          return base_kind;
+        }
+    }
+  
+  return __not_contained;
+}
+
+bool __class_type_info::
+__do_dyncast (ptrdiff_t,
+              __sub_kind access_path,
+              const __class_type_info *dst_type,
+              const void *obj_ptr,
+              const __class_type_info *src_type,
+              const void *src_ptr,
+              __dyncast_result &__restrict result) const
+{
+  if (obj_ptr == src_ptr && *this == *src_type)
+    {
+      // The src object we started from. Indicate how we are accessible from
+      // the most derived object.
+      result.whole2src = access_path;
+      return false;
+    }
+  if (*this == *dst_type)
+    {
+      result.dst_ptr = obj_ptr;
+      result.whole2dst = access_path;
+      result.dst2src = __not_contained;
+      return false;
+    }
+  return false;
+}
+
+bool __si_class_type_info::
+__do_dyncast (ptrdiff_t src2dst,
+              __sub_kind access_path,
+              const __class_type_info *dst_type,
+              const void *obj_ptr,
+              const __class_type_info *src_type,
+              const void *src_ptr,
+              __dyncast_result &__restrict result) const
+{
+  if (*this == *dst_type)
+    {
+      result.dst_ptr = obj_ptr;
+      result.whole2dst = access_path;
+      if (src2dst >= 0)
+        result.dst2src = adjust_pointer  (obj_ptr, src2dst) == src_ptr
+              ? __contained_public : __not_contained;
+      else if (src2dst == -2)
+        result.dst2src = __not_contained;
+      return false;
+    }
+  if (obj_ptr == src_ptr && *this == *src_type)
+    {
+      // The src object we started from. Indicate how we are accessible from
+      // the most derived object.
+      result.whole2src = access_path;
+      return false;
+    }
+  return __base_type->__do_dyncast (src2dst, access_path, dst_type, obj_ptr,
+                             src_type, src_ptr, result);
+}
+
+// This is a big hairy function. Although the run-time behaviour of
+// dynamic_cast is simple to describe, it gives rise to some non-obvious
+// behaviour. We also desire to determine as early as possible any definite
+// answer we can get. Because it is unknown what the run-time ratio of
+// succeeding to failing dynamic casts is, we do not know in which direction
+// to bias any optimizations. To that end we make no particular effort towards
+// early fail answers or early success answers. Instead we try to minimize
+// work by filling in things lazily (when we know we need the information),
+// and opportunisticly take early success or failure results.
+bool __vmi_class_type_info::
+__do_dyncast (ptrdiff_t src2dst,
+              __sub_kind access_path,
+              const __class_type_info *dst_type,
+              const void *obj_ptr,
+              const __class_type_info *src_type,
+              const void *src_ptr,
+              __dyncast_result &__restrict result) const
+{
+  if (result.whole_details & __flags_unknown_mask)
+    result.whole_details = __flags;
+  
+  if (obj_ptr == src_ptr && *this == *src_type)
+    {
+      // The src object we started from. Indicate how we are accessible from
+      // the most derived object.
+      result.whole2src = access_path;
+      return false;
+    }
+  if (*this == *dst_type)
+    {
+      result.dst_ptr = obj_ptr;
+      result.whole2dst = access_path;
+      if (src2dst >= 0)
+        result.dst2src = adjust_pointer  (obj_ptr, src2dst) == src_ptr
+              ? __contained_public : __not_contained;
+      else if (src2dst == -2)
+        result.dst2src = __not_contained;
+      return false;
+    }
+
+  bool result_ambig = false;
+  for (std::size_t i = __base_count; i--;)
+    {
+      __dyncast_result result2 (result.whole_details);
+      void const *base = obj_ptr;
+      __sub_kind base_access = access_path;
+      ptrdiff_t offset = __base_info[i].__offset ();
+      bool is_virtual = __base_info[i].__is_virtual_p ();
+      
+      if (is_virtual)
+        base_access = __sub_kind (base_access | __contained_virtual_mask);
+      base = convert_to_base (base, is_virtual, offset);
+
+      if (!__base_info[i].__is_public_p ())
+        {
+          if (src2dst == -2 &&
+              !(result.whole_details
+                & (__non_diamond_repeat_mask | __diamond_shaped_mask)))
+            // The hierarchy has no duplicate bases (which might ambiguate
+            // things) and where we started is not a public base of what we
+            // want (so it cannot be a downcast). There is nothing of interest
+            // hiding in a non-public base.
+            continue;
+          base_access = __sub_kind (base_access & ~__contained_public_mask);
+        }
+      
+      bool result2_ambig
+          = __base_info[i].__base->__do_dyncast (src2dst, base_access,
+                                             dst_type, base,
+                                             src_type, src_ptr, result2);
+      result.whole2src = __sub_kind (result.whole2src | result2.whole2src);
+      if (result2.dst2src == __contained_public
+          || result2.dst2src == __contained_ambig)
+        {
+          result.dst_ptr = result2.dst_ptr;
+          result.whole2dst = result2.whole2dst;
+          result.dst2src = result2.dst2src;
+          // Found a downcast which can't be bettered or an ambiguous downcast
+          // which can't be disambiguated
+          return result2_ambig;
+        }
+      
+      if (!result_ambig && !result.dst_ptr)
+        {
+          // Not found anything yet.
+          result.dst_ptr = result2.dst_ptr;
+          result.whole2dst = result2.whole2dst;
+          result_ambig = result2_ambig;
+          if (result.dst_ptr && result.whole2src != __unknown
+              && !(__flags & __non_diamond_repeat_mask))
+            // Found dst and src and we don't have repeated bases.
+            return result_ambig;
+        }
+      else if (result.dst_ptr && result.dst_ptr == result2.dst_ptr)
+        {
+          // Found at same address, must be via virtual.  Pick the most
+          // accessible path.
+          result.whole2dst =
+              __sub_kind (result.whole2dst | result2.whole2dst);
+        }
+      else if ((result.dst_ptr != 0 | result_ambig)
+               && (result2.dst_ptr != 0 | result2_ambig))
+        {
+          // Found two different DST_TYPE bases, or a valid one and a set of
+          // ambiguous ones, must disambiguate. See whether SRC_PTR is
+          // contained publicly within one of the non-ambiguous choices. If it
+          // is in only one, then that's the choice. If it is in both, then
+          // we're ambiguous and fail. If it is in neither, we're ambiguous,
+          // but don't yet fail as we might later find a third base which does
+          // contain SRC_PTR.
+        
+          __sub_kind new_sub_kind = result2.dst2src;
+          __sub_kind old_sub_kind = result.dst2src;
+          
+          if (contained_p (result.whole2src)
+              && (!virtual_p (result.whole2src)
+                  || !(result.whole_details & __diamond_shaped_mask)))
+            {
+              // We already found SRC_PTR as a base of most derived, and
+              // either it was non-virtual, or the whole hierarchy is
+              // not-diamond shaped. Therefore if it is in either choice, it
+              // can only be in one of them, and we will already know.
+              if (old_sub_kind == __unknown)
+                old_sub_kind = __not_contained;
+              if (new_sub_kind == __unknown)
+                new_sub_kind = __not_contained;
+            }
+          else
+            {
+              if (old_sub_kind >= __not_contained)
+                ;// already calculated
+              else if (contained_p (new_sub_kind)
+                       && (!virtual_p (new_sub_kind)
+                           || !(__flags & __diamond_shaped_mask)))
+                // Already found inside the other choice, and it was
+                // non-virtual or we are not diamond shaped.
+                old_sub_kind = __not_contained;
+              else
+                old_sub_kind = dst_type->__find_public_src
+                                (src2dst, result.dst_ptr, src_type, src_ptr);
+          
+              if (new_sub_kind >= __not_contained)
+                ;// already calculated
+              else if (contained_p (old_sub_kind)
+                       && (!virtual_p (old_sub_kind)
+                           || !(__flags & __diamond_shaped_mask)))
+                // Already found inside the other choice, and it was
+                // non-virtual or we are not diamond shaped.
+                new_sub_kind = __not_contained;
+              else
+                new_sub_kind = dst_type->__find_public_src
+                                (src2dst, result2.dst_ptr, src_type, src_ptr);
+            }
+          
+          // Neither sub_kind can be contained_ambig -- we bail out early
+          // when we find those.
+          if (contained_p (__sub_kind (new_sub_kind ^ old_sub_kind)))
+            {
+              // Only on one choice, not ambiguous.
+              if (contained_p (new_sub_kind))
+                {
+                  // Only in new.
+                  result.dst_ptr = result2.dst_ptr;
+                  result.whole2dst = result2.whole2dst;
+                  result_ambig = false;
+                  old_sub_kind = new_sub_kind;
+                }
+              result.dst2src = old_sub_kind;
+              if (public_p (result.dst2src))
+                return false; // Can't be an ambiguating downcast for later discovery.
+              if (!virtual_p (result.dst2src))
+                return false; // Found non-virtually can't be bettered
+            }
+          else if (contained_p (__sub_kind (new_sub_kind & old_sub_kind)))
+            {
+              // In both.
+              result.dst_ptr = NULL;
+              result.dst2src = __contained_ambig;
+              return true;  // Fail.
+            }
+          else
+            {
+              // In neither publicly, ambiguous for the moment, but keep
+              // looking. It is possible that it was private in one or
+              // both and therefore we should fail, but that's just tough.
+              result.dst_ptr = NULL;
+              result.dst2src = __not_contained;
+              result_ambig = true;
+            }
+        }
+      
+      if (result.whole2src == __contained_private)
+        // We found SRC_PTR as a private non-virtual base, therefore all
+        // cross casts will fail. We have already found a down cast, if
+        // there is one.
+        return result_ambig;
+    }
+
+  return result_ambig;
+}
+
+bool __class_type_info::
+__do_upcast (const __class_type_info *dst, const void *obj,
+             __upcast_result &__restrict result) const
+{
+  if (*this == *dst)
+    {
+      result.dst_ptr = obj;
+      result.base_type = nonvirtual_base_type;
+      result.part2dst = __contained_public;
+      return true;
+    }
+  return false;
+}
+
+bool __si_class_type_info::
+__do_upcast (const __class_type_info *dst, const void *obj_ptr,
+             __upcast_result &__restrict result) const
+{
+  if (__class_type_info::__do_upcast (dst, obj_ptr, result))
+    return true;
+  
+  return __base_type->__do_upcast (dst, obj_ptr, result);
+}
+
+bool __vmi_class_type_info::
+__do_upcast (const __class_type_info *dst, const void *obj_ptr,
+             __upcast_result &__restrict result) const
+{
+  if (__class_type_info::__do_upcast (dst, obj_ptr, result))
+    return true;
+  
+  int src_details = result.src_details;
+  if (src_details & __flags_unknown_mask)
+    src_details = __flags;
+  
+  for (std::size_t i = __base_count; i--;)
+    {
+      __upcast_result result2 (src_details);
+      const void *base = obj_ptr;
+      ptrdiff_t offset = __base_info[i].__offset ();
+      bool is_virtual = __base_info[i].__is_virtual_p ();
+      bool is_public = __base_info[i].__is_public_p ();
+      
+      if (!is_public && !(src_details & __non_diamond_repeat_mask))
+        // original cannot have an ambiguous base, so skip private bases
+        continue;
+
+      if (base)
+        base = convert_to_base (base, is_virtual, offset);
+      
+      if (__base_info[i].__base->__do_upcast (dst, base, result2))
+        {
+          if (result2.base_type == nonvirtual_base_type && is_virtual)
+            result2.base_type = __base_info[i].__base;
+          if (contained_p (result2.part2dst) && !is_public)
+            result2.part2dst = __sub_kind (result2.part2dst & ~__contained_public_mask);
+          
+          if (!result.base_type)
+            {
+              result = result2;
+              if (!contained_p (result.part2dst))
+                return true; // found ambiguously
+              
+              if (result.part2dst & __contained_public_mask)
+                {
+                  if (!(__flags & __non_diamond_repeat_mask))
+                    return true;  // cannot have an ambiguous other base
+                }
+              else
+                {
+                  if (!virtual_p (result.part2dst))
+                    return true; // cannot have another path
+                  if (!(__flags & __diamond_shaped_mask))
+                    return true; // cannot have a more accessible path
+                }
+            }
+          else if (result.dst_ptr != result2.dst_ptr)
+            {
+              // Found an ambiguity.
+	      result.dst_ptr = NULL;
+	      result.part2dst = __contained_ambig;
+	      return true;
+            }
+          else if (result.dst_ptr)
+            {
+              // Ok, found real object via a virtual path.
+              result.part2dst
+                  = __sub_kind (result.part2dst | result2.part2dst);
+            }
+          else
+            {
+              // Dealing with a null pointer, need to check vbase
+              // containing each of the two choices.
+              if (result2.base_type == nonvirtual_base_type
+                  || result.base_type == nonvirtual_base_type
+                  || !(*result2.base_type == *result.base_type))
+                {
+                  // Already ambiguous, not virtual or via different virtuals.
+                  // Cannot match.
+                  result.part2dst = __contained_ambig;
+                  return true;
+                }
+              result.part2dst
+                  = __sub_kind (result.part2dst | result2.part2dst);
+            }
+        }
+    }
+  return result.part2dst != __unknown;
+}
+
+// this is the external interface to the dynamic cast machinery
+extern "C" void *
+__dynamic_cast (const void *src_ptr,    // object started from
+                const __class_type_info *src_type, // type of the starting object
+                const __class_type_info *dst_type, // desired target type
+                ptrdiff_t src2dst) // how src and dst are related
+{
+  const void *vtable = *static_cast  (src_ptr);
+  const vtable_prefix *prefix =
+      adjust_pointer  (vtable, 
+				      -offsetof (vtable_prefix, origin));
+  const void *whole_ptr =
+      adjust_pointer  (src_ptr, prefix->whole_object);
+  const __class_type_info *whole_type = prefix->whole_type;
+  __class_type_info::__dyncast_result result;
+  
+  whole_type->__do_dyncast (src2dst, __class_type_info::__contained_public,
+                            dst_type, whole_ptr, src_type, src_ptr, result);
+  if (!result.dst_ptr)
+    return NULL;
+  if (contained_public_p (result.dst2src))
+    // Src is known to be a public base of dst.
+    return const_cast  (result.dst_ptr);
+  if (contained_public_p (__class_type_info::__sub_kind (result.whole2src & result.whole2dst)))
+    // Both src and dst are known to be public bases of whole. Found a valid
+    // cross cast.
+    return const_cast  (result.dst_ptr);
+  if (contained_nonvirtual_p (result.whole2src))
+    // Src is known to be a non-public nonvirtual base of whole, and not a
+    // base of dst. Found an invalid cross cast, which cannot also be a down
+    // cast
+    return NULL;
+  if (result.dst2src == __class_type_info::__unknown)
+    result.dst2src = dst_type->__find_public_src (src2dst, result.dst_ptr,
+                                                  src_type, src_ptr);
+  if (contained_public_p (result.dst2src))
+    // Found a valid down cast
+    return const_cast  (result.dst_ptr);
+  // Must be an invalid down cast, or the cross cast wasn't bettered
+  return NULL;
+}
+
+}; // namespace __cxxabiv1
diff --git a/contrib/libstdc++/libsupc++/tinfo.h b/contrib/libstdc++/libsupc++/tinfo.h
new file mode 100644
index 0000000..b7191900
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/tinfo.h
@@ -0,0 +1,10 @@
+// RTTI support internals for -*- C++ -*-
+// Copyright (C) 1994, 1995, 1996, 1998, 1999, 2000, 2001 
+// Free Software Foundation
+
+#include "typeinfo"
+#include 
+
+// Class declarations shared between the typeinfo implementation files.
+
+#include 
diff --git a/contrib/libstdc++/libsupc++/tinfo2.cc b/contrib/libstdc++/libsupc++/tinfo2.cc
new file mode 100644
index 0000000..8f3d631
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/tinfo2.cc
@@ -0,0 +1,167 @@
+// Methods for type_info for -*- C++ -*- Run Time Type Identification.
+
+// Copyright (C) 1994, 1996, 1997, 1998, 1999, 2000, 2001 
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+
+// GNU CC 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 GNU CC; 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 
+#include "tinfo.h"
+#include "new"			// for placement new
+
+// We can't rely on having stdlib.h if we're freestanding.
+extern "C" void abort ();
+
+using std::type_info;
+
+#if !__GXX_MERGED_TYPEINFO_NAMES
+
+bool
+type_info::before (const type_info &arg) const
+{
+  return __builtin_strcmp (name (), arg.name ()) < 0;
+}
+
+#endif
+
+#include 
+
+namespace __cxxabiv1 {
+
+using namespace std;
+
+// This has special meaning to the compiler, and will cause it
+// to emit the type_info structures for the fundamental types which are
+// mandated to exist in the runtime.
+__fundamental_type_info::
+~__fundamental_type_info ()
+{}
+
+__array_type_info::
+~__array_type_info ()
+{}
+
+__function_type_info::
+~__function_type_info ()
+{}
+
+__enum_type_info::
+~__enum_type_info ()
+{}
+
+__pbase_type_info::
+~__pbase_type_info ()
+{}
+
+__pointer_type_info::
+~__pointer_type_info ()
+{}
+
+__pointer_to_member_type_info::
+~__pointer_to_member_type_info ()
+{}
+
+bool __pointer_type_info::
+__is_pointer_p () const
+{
+  return true;
+}
+
+bool __function_type_info::
+__is_function_p () const
+{
+  return true;
+}
+
+bool __pbase_type_info::
+__do_catch (const type_info *thr_type,
+            void **thr_obj,
+            unsigned outer) const
+{
+  if (*this == *thr_type)
+    return true;      // same type
+  if (typeid (*this) != typeid (*thr_type))
+    return false;     // not both same kind of pointers
+  
+  if (!(outer & 1))
+    // We're not the same and our outer pointers are not all const qualified
+    // Therefore there must at least be a qualification conversion involved
+    // But for that to be valid, our outer pointers must be const qualified.
+    return false;
+  
+  const __pbase_type_info *thrown_type =
+    static_cast  (thr_type);
+  
+  if (thrown_type->__qualifier_flags & ~__qualifier_flags)
+    // We're less qualified.
+    return false;
+  
+  if (!(__qualifier_flags & __const_mask))
+    outer &= ~1;
+  
+  return __pointer_catch (thrown_type, thr_obj, outer);
+}
+
+inline bool __pbase_type_info::
+__pointer_catch (const __pbase_type_info *thrown_type,
+                 void **thr_obj,
+                 unsigned outer) const
+{
+  return __pointee->__do_catch (thrown_type->__pointee, thr_obj, outer + 2);
+}
+
+bool __pointer_type_info::
+__pointer_catch (const __pbase_type_info *thrown_type,
+                 void **thr_obj,
+                 unsigned outer) const
+{
+  if (outer < 2 && *__pointee == typeid (void))
+    {
+      // conversion to void
+      return !thrown_type->__pointee->__is_function_p ();
+    }
+  
+  return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);
+}
+
+bool __pointer_to_member_type_info::
+__pointer_catch (const __pbase_type_info *thr_type,
+                 void **thr_obj,
+                 unsigned outer) const
+{
+  // This static cast is always valid, as our caller will have determined that
+  // thr_type is really a __pointer_to_member_type_info.
+  const __pointer_to_member_type_info *thrown_type =
+    static_cast  (thr_type);
+  
+  if (*__context_class != *thrown_type->__context_class)
+    return false;     // not pointers to member of same class
+  
+  return __pbase_type_info::__pointer_catch (thrown_type, thr_obj, outer);
+}
+
+} // namespace std
diff --git a/contrib/libstdc++/libsupc++/typeinfo b/contrib/libstdc++/libsupc++/typeinfo
new file mode 100644
index 0000000..480dc4a
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/typeinfo
@@ -0,0 +1,150 @@
+// RTTI support for -*- C++ -*-
+// Copyright (C) 1994, 1995, 1996, 1997, 1998, 2000, 2001, 2002
+// Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+/** @file typeinfo
+ *  This header provides RTTI support.
+ */
+
+#ifndef __TYPEINFO__
+#define __TYPEINFO__
+
+#include 
+
+extern "C++" {
+
+namespace __cxxabiv1
+{
+  class __class_type_info;
+} // namespace __cxxabiv1
+
+#if !__GXX_WEAK__
+  // If weak symbols are not supported, typeinfo names are not merged.
+  #define __GXX_MERGED_TYPEINFO_NAMES 0
+#else
+  // On platforms that support weak symbols, typeinfo names are merged.
+  #define __GXX_MERGED_TYPEINFO_NAMES 1
+#endif
+
+namespace std 
+{
+  /** The @c type_info class describes type information generated by
+   *  an implementation.
+   *  @brief Used in RTTI.  */
+  class type_info 
+  {
+  public:
+    /** Destructor. Being the first non-inline virtual function, this
+     *  controls in which translation unit the vtable is emitted. The
+     *  compiler makes use of that information to know where to emit
+     *  the runtime-mandated type_info structures in the new-abi.  */
+    virtual ~type_info();
+
+  private:
+    /// Assigning type_info is not supported.  Made private.
+    type_info& operator=(const type_info&);
+    type_info(const type_info&);
+    
+  protected:
+    const char *__name;
+    
+  protected:
+    explicit type_info(const char *__n): __name(__n) { }
+    
+  public:
+    // the public interface
+    /** Returns an @e implementation-defined byte string; this is not
+     *  portable between compilers!  */
+    const char* name() const
+    { return __name; }
+
+#if !__GXX_MERGED_TYPEINFO_NAMES
+    bool before(const type_info& __arg) const;
+    // In old abi, or when weak symbols are not supported, there can
+    // be multiple instances of a type_info object for one
+    // type. Uniqueness must use the _name value, not object address.
+    bool operator==(const type_info& __arg) const;
+#else
+    /** Returns true if @c *this precedes @c __arg in the implementation's
+     *  collation order.  */
+    // In new abi we can rely on type_info's NTBS being unique,
+    // and therefore address comparisons are sufficient.
+    bool before(const type_info& __arg) const
+    { return __name < __arg.__name; }
+    bool operator==(const type_info& __arg) const
+    { return __name == __arg.__name; }
+#endif
+    bool operator!=(const type_info& __arg) const
+    { return !operator==(__arg); }
+    
+    // the internal interface
+  public:
+    // return true if this is a pointer type of some kind
+    virtual bool __is_pointer_p() const;
+    // return true if this is a function type
+    virtual bool __is_function_p() const;
+
+    // Try and catch a thrown type. Store an adjusted pointer to the
+    // caught type in THR_OBJ. If THR_TYPE is not a pointer type, then
+    // THR_OBJ points to the thrown object. If THR_TYPE is a pointer
+    // type, then THR_OBJ is the pointer itself. OUTER indicates the
+    // number of outer pointers, and whether they were const
+    // qualified.
+    virtual bool __do_catch(const type_info *__thr_type, void **__thr_obj,
+			    unsigned __outer) const;
+
+    // internally used during catch matching
+    virtual bool __do_upcast(const __cxxabiv1::__class_type_info *__target,
+			     void **__obj_ptr) const;
+  };
+
+  /** If you attempt an invalid @c dynamic_cast expression, an instance of
+   *  this class (or something derived from this class) is thrown.  */
+  class bad_cast : public exception 
+  {
+  public:
+    bad_cast() throw() { }
+    // This declaration is not useless:
+    // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+    virtual ~bad_cast() throw();
+  };
+  
+  /** If you use a NULL pointer in a @c typeid expression, this is thrown.  */
+  class bad_typeid : public exception 
+  {
+  public:
+    bad_typeid () throw() { }
+    // This declaration is not useless:
+    // http://gcc.gnu.org/onlinedocs/gcc-3.0.2/gcc_6.html#SEC118
+    virtual ~bad_typeid() throw();
+  };
+} // namespace std
+
+} // extern "C++"
+#endif
diff --git a/contrib/libstdc++/libsupc++/unwind-cxx.h b/contrib/libstdc++/libsupc++/unwind-cxx.h
new file mode 100644
index 0000000..ea30eba
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/unwind-cxx.h
@@ -0,0 +1,171 @@
+// -*- C++ -*- Exception handling and frame unwind runtime interface routines.
+// Copyright (C) 2001 Free Software Foundation, Inc.
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+//
+// GNU CC 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 GNU CC; 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.
+
+// This is derived from the C++ ABI for IA-64.  Where we diverge
+// for cross-architecture compatibility are noted with "@@@".
+
+#ifndef __UNWIND_CXX_H
+#define __UNWIND_CXX_H 1
+
+// Level 2: C++ ABI
+
+#include 
+#include 
+#include 
+#include "unwind.h"
+
+namespace __cxxabiv1
+{
+
+// A C++ exception object consists of a header, which is a wrapper around
+// an unwind object header with additional C++ specific information,
+// followed by the exception object itself.
+
+struct __cxa_exception
+{ 
+  // Manage the exception object itself.
+  std::type_info *exceptionType;
+  void (*exceptionDestructor)(void *); 
+
+  // The C++ standard has entertaining rules wrt calling set_terminate
+  // and set_unexpected in the middle of the exception cleanup process.
+  std::unexpected_handler unexpectedHandler;
+  std::terminate_handler terminateHandler;
+
+  // The caught exception stack threads through here.
+  __cxa_exception *nextException;
+
+  // How many nested handlers have caught this exception.  A negated
+  // value is a signal that this object has been rethrown.
+  int handlerCount;
+
+  // Cache parsed handler data from the personality routine Phase 1
+  // for Phase 2 and __cxa_call_unexpected.
+  int handlerSwitchValue;
+  const unsigned char *actionRecord;
+  const unsigned char *languageSpecificData;
+  void *catchTemp;
+  void *adjustedPtr;
+
+  // The generic exception header.  Must be last.
+  _Unwind_Exception unwindHeader;
+};
+
+// Each thread in a C++ program has access to a __cxa_eh_globals object.
+struct __cxa_eh_globals
+{
+  __cxa_exception *caughtExceptions;
+  unsigned int uncaughtExceptions;
+};
+
+
+// The __cxa_eh_globals for the current thread can be obtained by using
+// either of the following functions.  The "fast" version assumes at least
+// one prior call of __cxa_get_globals has been made from the current
+// thread, so no initialization is necessary.
+extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
+extern "C" __cxa_eh_globals *__cxa_get_globals_fast () throw();
+
+// Allocate memory for the exception plus the thown object.
+extern "C" void *__cxa_allocate_exception(std::size_t thrown_size) throw();
+
+// Free the space allocated for the exception.
+extern "C" void __cxa_free_exception(void *thrown_exception) throw();
+
+// Throw the exception.
+extern "C" void __cxa_throw (void *thrown_exception,
+			     std::type_info *tinfo,
+			     void (*dest) (void *))
+     __attribute__((noreturn));
+
+// Used to implement exception handlers.
+extern "C" void *__cxa_begin_catch (void *) throw();
+extern "C" void __cxa_end_catch ();
+extern "C" void __cxa_rethrow () __attribute__((noreturn));
+
+// These facilitate code generation for recurring situations.
+extern "C" void __cxa_bad_cast ();
+extern "C" void __cxa_bad_typeid ();
+
+// @@@ These are not directly specified by the IA-64 C++ ABI.
+
+// Handles re-checking the exception specification if unexpectedHandler
+// throws, and if bad_exception needs to be thrown.  Called from the
+// compiler.
+extern "C" void __cxa_call_unexpected (void *) __attribute__((noreturn));
+
+// Invokes given handler, dying appropriately if the user handler was
+// so inconsiderate as to return.
+extern void __terminate(std::terminate_handler) __attribute__((noreturn));
+extern void __unexpected(std::unexpected_handler) __attribute__((noreturn));
+
+// The current installed user handlers.
+extern std::terminate_handler __terminate_handler;
+extern std::unexpected_handler __unexpected_handler;
+
+// These are explicitly GNU C++ specific.
+
+// This is the exception class we report -- "GNUCC++\0".
+const _Unwind_Exception_Class __gxx_exception_class
+= ((((((((_Unwind_Exception_Class) 'G' 
+	 << 8 | (_Unwind_Exception_Class) 'N')
+	<< 8 | (_Unwind_Exception_Class) 'U')
+       << 8 | (_Unwind_Exception_Class) 'C')
+      << 8 | (_Unwind_Exception_Class) 'C')
+     << 8 | (_Unwind_Exception_Class) '+')
+    << 8 | (_Unwind_Exception_Class) '+')
+   << 8 | (_Unwind_Exception_Class) '\0');
+
+// GNU C++ personality routine, Version 0.
+extern "C" _Unwind_Reason_Code __gxx_personality_v0
+     (int, _Unwind_Action, _Unwind_Exception_Class,
+      struct _Unwind_Exception *, struct _Unwind_Context *);
+
+// GNU C++ sjlj personality routine, Version 0.
+extern "C" _Unwind_Reason_Code __gxx_personality_sj0
+     (int, _Unwind_Action, _Unwind_Exception_Class,
+      struct _Unwind_Exception *, struct _Unwind_Context *);
+
+// Acquire the C++ exception header from the C++ object.
+static inline __cxa_exception *
+__get_exception_header_from_obj (void *ptr)
+{
+  return reinterpret_cast<__cxa_exception *>(ptr) - 1;
+}
+
+// Acquire the C++ exception header from the generic exception header.
+static inline __cxa_exception *
+__get_exception_header_from_ue (_Unwind_Exception *exc)
+{
+  return reinterpret_cast<__cxa_exception *>(exc + 1) - 1;
+}
+
+} /* namespace __cxxabiv1 */
+
+#endif // __UNWIND_CXX_H
diff --git a/contrib/libstdc++/libsupc++/vec.cc b/contrib/libstdc++/libsupc++/vec.cc
new file mode 100644
index 0000000..557fd03
--- /dev/null
+++ b/contrib/libstdc++/libsupc++/vec.cc
@@ -0,0 +1,336 @@
+// New abi Support -*- C++ -*-
+
+// Copyright (C) 2000, 2001 Free Software Foundation, Inc.
+//  
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+
+// GNU CC 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 GNU CC; 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.
+
+// Written by Nathan Sidwell, Codesourcery LLC, 
+
+#include 
+#include 
+#include 
+#include 
+#include "unwind-cxx.h"
+
+namespace __cxxabiv1
+{
+  namespace 
+  {
+    struct uncatch_exception 
+    {
+      uncatch_exception ();
+      ~uncatch_exception () { __cxa_begin_catch (&p->unwindHeader); }
+      
+      __cxa_exception *p;
+    };
+
+    uncatch_exception::uncatch_exception ()
+    {
+      __cxa_eh_globals *globals = __cxa_get_globals_fast ();
+
+      p = globals->caughtExceptions;
+      p->handlerCount -= 1;
+      globals->caughtExceptions = p->nextException;
+      globals->uncaughtExceptions += 1;
+    }
+  }
+
+  // Allocate and construct array.
+  extern "C" void *
+  __cxa_vec_new(std::size_t element_count,
+		std::size_t element_size,
+		std::size_t padding_size,
+		void (*constructor) (void *),
+		void (*destructor) (void *))
+  {
+    return __cxa_vec_new2(element_count, element_size, padding_size,
+			   constructor, destructor,
+			   &operator new[], &operator delete []);
+  }
+
+  extern "C" void *
+  __cxa_vec_new2(std::size_t element_count,
+		 std::size_t element_size,
+		 std::size_t padding_size,
+		 void (*constructor) (void *),
+		 void (*destructor) (void *),
+		 void *(*alloc) (std::size_t),
+		 void (*dealloc) (void *))
+  {
+    std::size_t size = element_count * element_size + padding_size;
+    char *base = static_cast  (alloc (size));
+    
+    if (padding_size)
+      {
+	base += padding_size;
+	reinterpret_cast  (base)[-1] = element_count;
+      }
+    try
+      {
+	__cxa_vec_ctor(base, element_count, element_size,
+		       constructor, destructor);
+      }
+    catch (...)
+      {
+	{
+	  uncatch_exception ue;
+	  dealloc(base - padding_size);
+	}
+	__throw_exception_again;
+      }
+    return base;
+  }
+  
+  extern "C" void *
+  __cxa_vec_new3(std::size_t element_count,
+		 std::size_t element_size,
+		 std::size_t padding_size,
+		 void (*constructor) (void *),
+		 void (*destructor) (void *),
+		 void *(*alloc) (std::size_t),
+		 void (*dealloc) (void *, std::size_t))
+  {
+    std::size_t size = element_count * element_size + padding_size;
+    char *base = static_cast(alloc (size));
+    
+    if (padding_size)
+      {
+	base += padding_size;
+	reinterpret_cast(base)[-1] = element_count;
+      }
+    try
+      {
+	__cxa_vec_ctor(base, element_count, element_size,
+		       constructor, destructor);
+      }
+    catch (...)
+      {
+	{
+	  uncatch_exception ue;
+	  dealloc(base - padding_size, size);
+	}
+	__throw_exception_again;
+      }
+    return base;
+  }
+  
+  // Construct array.
+  extern "C" void
+  __cxa_vec_ctor(void *array_address,
+		 std::size_t element_count,
+		 std::size_t element_size,
+		 void (*constructor) (void *),
+		 void (*destructor) (void *))
+  {
+    std::size_t ix = 0;
+    char *ptr = static_cast(array_address);
+    
+    try
+      {
+	if (constructor)
+	  for (; ix != element_count; ix++, ptr += element_size)
+	    constructor(ptr);
+      }
+    catch (...)
+      {
+	{
+	  uncatch_exception ue;
+	  __cxa_vec_cleanup(array_address, ix, element_size, destructor);
+	}
+	__throw_exception_again;
+      }
+  }
+  
+  // Construct an array by copying.
+  extern "C" void
+  __cxa_vec_cctor(void *dest_array,
+		  void *src_array,
+		  std::size_t element_count,
+		  std::size_t element_size,
+		  void (*constructor) (void *, void *),
+		  void (*destructor) (void *))
+  {
+    std::size_t ix = 0;
+    char *dest_ptr = static_cast(dest_array);
+    char *src_ptr = static_cast(src_array);
+    
+    try
+      {
+	if (constructor)
+	  for (; ix != element_count; 
+	       ix++, src_ptr += element_size, dest_ptr += element_size)
+	    constructor(dest_ptr, src_ptr);
+      }
+    catch (...)
+      {
+	{
+	  uncatch_exception ue;
+	  __cxa_vec_cleanup(dest_array, ix, element_size, destructor);
+	}
+	__throw_exception_again;
+      }
+  }
+  
+  // Destruct array.
+  extern "C" void
+  __cxa_vec_dtor(void *array_address,
+		 std::size_t element_count,
+		 std::size_t element_size,
+		 void (*destructor) (void *))
+  {
+    if (destructor)
+      {
+	char *ptr = static_cast(array_address);
+	std::size_t ix = element_count;
+
+	ptr += element_count * element_size;
+
+	try
+	  {
+	    while (ix--)
+	      {
+		ptr -= element_size;
+		destructor(ptr);
+	      }
+	  }
+	catch (...)
+	  {
+	    {
+	      uncatch_exception ue;
+	      __cxa_vec_cleanup(array_address, ix, element_size, destructor);
+	    }
+	    __throw_exception_again;
+	  }
+      }
+  }
+
+  // Destruct array as a result of throwing an exception.
+  // [except.ctor]/3 If a destructor called during stack unwinding
+  // exits with an exception, terminate is called.
+  extern "C" void
+  __cxa_vec_cleanup(void *array_address,
+		    std::size_t element_count,
+		    std::size_t element_size,
+		    void (*destructor) (void *))
+  {
+    if (destructor)
+      {
+	char *ptr = static_cast  (array_address);
+	std::size_t ix = element_count;
+
+	ptr += element_count * element_size;
+
+	try
+	  {
+	    while (ix--)
+	      {
+		ptr -= element_size;
+		destructor(ptr);
+	      }
+	  }
+	catch (...)
+	  {
+	    std::terminate();
+	  }
+      }
+  }
+
+  // Destruct and release array.
+  extern "C" void
+  __cxa_vec_delete(void *array_address,
+		   std::size_t element_size,
+		   std::size_t padding_size,
+		   void (*destructor) (void *))
+  {
+    __cxa_vec_delete2(array_address, element_size, padding_size,
+		       destructor,
+		       &operator delete []);
+  }
+
+  extern "C" void
+  __cxa_vec_delete2(void *array_address,
+		    std::size_t element_size,
+		    std::size_t padding_size,
+		    void (*destructor) (void *),
+		    void (*dealloc) (void *))
+  {
+    char *base = static_cast(array_address);
+  
+    if (padding_size)
+      {
+	std::size_t element_count = reinterpret_cast(base)[-1];
+	base -= padding_size;
+	try
+	  {
+	    __cxa_vec_dtor(array_address, element_count, element_size,
+			   destructor);
+	  }
+	catch (...)
+	  {
+	    {
+	      uncatch_exception ue;
+	      dealloc(base);
+	    }
+	    __throw_exception_again;
+	  }
+      }
+    dealloc(base);
+  }
+
+  extern "C" void
+  __cxa_vec_delete3(void *array_address,
+		    std::size_t element_size,
+		    std::size_t padding_size,
+		     void (*destructor) (void *),
+		    void (*dealloc) (void *, std::size_t))
+  {
+    char *base = static_cast  (array_address);
+    std::size_t size = 0;
+    
+    if (padding_size)
+      {
+	std::size_t element_count = reinterpret_cast (base)[-1];
+	base -= padding_size;
+	size = element_count * element_size + padding_size;
+	try
+	  {
+	    __cxa_vec_dtor(array_address, element_count, element_size,
+			   destructor);
+	  }
+	catch (...)
+	  {
+	    {
+	      uncatch_exception ue;
+	      dealloc(base, size);
+	    }
+	    __throw_exception_again;
+	  }
+      }
+    dealloc(base, size);
+  }
+} // namespace __cxxabiv1
+
diff --git a/contrib/libstdc++/mkcheck.in b/contrib/libstdc++/mkcheck.in
new file mode 100755
index 0000000..b104244
--- /dev/null
+++ b/contrib/libstdc++/mkcheck.in
@@ -0,0 +1,447 @@
+#!/usr/bin/env bash
+
+# Script to do automated testing and data collection for various test
+# files, so that we don't have to do this by hand on every test file.
+# It attempts to collect some diagnostic info about size and speed that
+# should be useful in the future as the library gets tuned for size
+# and speed.  In addition, it tests static and shared linkage, iff each
+# has been enabled.
+
+# Invocation 
+# mkcheck [01] 
+
+# 1: variables
+#
+# WHICH determines if you are
+# (0) testing the build binary and headers, or
+# (1) testing the installed binary and headers, or
+WHICH=$1
+if [ "$WHICH"x = 0x ]; then
+  echo "running mkcheck"
+  echo "$0: testing the build directory"
+elif [ "$WHICH"x = 1x ]; then
+  echo "running mkcheck"
+  echo "$0: testing the install directory"
+else
+  echo 'Usage: mkcheck 0    /* test the build directory    */'
+  echo '       mkcheck 1    /* test the install directory  */'
+  exit 1;
+fi
+
+# Now that we've successfully translated the numerical option into
+# a symbolic one, we can safely ignore it.
+shift
+
+# This has been true all along.  Found out about it the hard way...
+case $BASH_VERSION in
+    1*)  echo 'You need bash 2.x to run mkcheck.  Exiting.'; exit 1 ;;
+    *)   ;;   # ??
+esac
+
+BUILD_DIR=@glibcpp_builddir@
+SRC_DIR=@glibcpp_srcdir@
+PREFIX_DIR=@glibcpp_prefixdir@
+if [ "$WHICH"x = 0x ]; then
+  CXX=`$BUILD_DIR/testsuite_flags --build-cxx`
+  INCLUDES=`$BUILD_DIR/testsuite_flags --build-includes`
+else
+  CXX=`$BUILD_DIR/testsuite_flags --install-cxx`
+  INCLUDES=`$BUILD_DIR/testsuite_flags --install-includes`
+fi
+CXXFLAGS=`$BUILD_DIR/testsuite_flags --cxxflags`
+LIBTOOL="$BUILD_DIR/libtool"
+LTEXE="$LIBTOOL --mode=execute"
+#LTCXX="$LIBTOOL --tag=CXX --mode=link $CXX $CXXFLAGS $INCLUDES"
+LTCXX="$CXX $CXXFLAGS $INCLUDES"
+
+# specific libtool flag(s) to use shared libraries, if any
+SH_FLAG="-Wl,--rpath -Wl,$BUILD_DIR/../../gcc -Wl,--rpath -Wl,$BUILD_DIR/src/.libs"
+
+# specific libtool flag(s) to use static libraries, if any
+ST_FLAG="-static"
+#ST_FLAG="-all-static"
+
+# Set up the testing directory, which should be in a directory called
+# "testsuite" in the root level of the build directory.
+TEST_DIR="$BUILD_DIR/testsuite"
+# help libtool keep quiet
+if [ ! -d ${TEST_DIR}/.libs ]; then
+    mkdir $TEST_DIR/.libs    
+fi
+
+# the name of the file that will collect and hold all this useful data:
+RESULTS_FILE="$TEST_DIR/$(date +%Y%m%d)-mkcheck.txt"
+
+# the name of the log file that will append compiler diagnostics:
+LOG_FILE="$TEST_DIR/$(date +%Y%m%d)-mkchecklog.txt"
+
+# the names of the specific test files to be run
+TESTS_FILE="$TEST_DIR/$(date +%Y%m%d)-mkcheckfiles.txt"
+
+
+#
+# 2: clean, make files, append general test info
+#
+
+# Remove old executables.
+rm -rf "$TEST_DIR"/*exe
+rm -rf "$TEST_DIR"/compile.out
+
+# Remove old core files (which now get left in cwd, not $TEST_DIR).
+rm -rf ./*core*
+
+if [ -f $RESULTS_FILE ]; then
+    rm $RESULTS_FILE
+fi
+if [ -f $LOG_FILE ]; then
+    rm $LOG_FILE
+fi
+
+# Make a list of the files we're going to run, or use an old one if it exists.
+if [ ! -f "$TESTS_FILE" ]; then
+    echo "making file $TESTS_FILE"
+    for LONG_NAME in $SRC_DIR/testsuite/*/*.cc
+    do
+        DIR_NAME=$(dirname $LONG_NAME)
+        SHORT_NAME="`basename $DIR_NAME`/`basename $LONG_NAME`"
+        echo "$SHORT_NAME" >> $TESTS_FILE
+    done
+fi
+
+# Nasty solution to replace GNU date(1)'s %s time_t output function.
+TIMER_COMMAND=$TEST_DIR/printnow.exe
+if [ ! -x "$TIMER_COMMAND" ]; then
+    echo "making utility $TIMER_COMMAND"
+    gcc -o "$TIMER_COMMAND" "$SRC_DIR/testsuite/printnow.c"
+    strip "$TIMER_COMMAND"
+fi
+
+# Copy over the data files for filebufs
+cp $SRC_DIR/testsuite/27_io/*.txt $TEST_DIR
+cp $SRC_DIR/testsuite/27_io/*.tst $TEST_DIR
+chmod u+w $TEST_DIR/*.txt
+chmod u+w $TEST_DIR/*.tst
+
+# Emit useful info about compiler and platform
+echo "host: $(uname -mrsv)" >> $RESULTS_FILE
+echo "compiler: $($CXX -v 2>&1)" >> $RESULTS_FILE
+echo "compiler flags: $CXXFLAGS" >> $RESULTS_FILE
+echo "date: $(date +%Y%m%d)" >> $RESULTS_FILE
+echo "" >> $RESULTS_FILE
+
+explanation='+: pass, -b: build failure, -r: run failure, x: disabled'
+printf "%s\n     %s\n"  'p == pass/fail execution test'  "$explanation"  \
+       >> $RESULTS_FILE
+echo "ctime == time to compile and link" >> $RESULTS_FILE
+echo "etime == time for executable to run" >> $RESULTS_FILE
+echo "text == size of the executable text section" >> $RESULTS_FILE
+echo "data == size of the executable data section" >> $RESULTS_FILE
+echo "total == size of the executable" >> $RESULTS_FILE
+echo "" >> $RESULTS_FILE
+
+echo "p" | awk '{printf("%s ", $1)}' >> $RESULTS_FILE
+echo "ctime" "etime" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
+echo "text" "data" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
+echo "total" "name" | awk '{printf("%s\t%s\t", $1, $2)}' >> $RESULTS_FILE
+echo "" >> $RESULTS_FILE
+
+# Counters.  These could be members of an array, but they'd all have to
+# become individuals anyhow if we ever change this script to super-portable sh.
+shared_pass=0
+shared_fail=0
+static_pass=0
+static_fail=0
+
+
+#
+# 2.5:  support functions
+#
+
+# Figure out how to extract size information from binaries.  We take
+# the text of the value we want as an argument, and leave the size in
+# the appropriate variable.
+#
+# We discover what kind of size(1) we are using *once* and build a shell
+# function named 'size_command' to wrap it.  (The "function" keyword is
+# redundant here, but helps me read it, so there.)  Previously we were
+# re-discovering the size(1) arguments three times for each test; sloooow.
+#
+# It is VERY IMPORTANT not to compare these numbers across platforms.
+# Different size(1)'s extract section information differently.  For
+# example, using the native Sun size(1) and GNU size(1) built for Suns
+# on the exact same binary will give very different numbers, due to all
+# the variance in command-line options and arbitrary names of ELF sections.
+#
+# and suddenly we go to 2-space indentations...
+setup_size_command()
+{
+  if size --version 2> /dev/null | grep -c GNU > /dev/null;
+  then    # Then we're using a GNU size(1) built for this platform.
+    # We lose .rodata and .data1 and who knows what else... kludge.
+    function size_command()
+    {
+      case $1 in
+        TEXT)  TEXT=$(size -B $EXENAME | tail -1 | awk '{print $1}')  ;;
+        DATA)  DATA=$(size -B $EXENAME | tail -1 | awk '{print $2}')  ;;
+        SIZE)  SIZE=$(size -B $EXENAME | tail -1 | awk '{print $4}')  ;;
+      esac
+    }
+  else
+    # Not using GNU size; check for platform.  These numbers seem to match
+    # up to text/data/total, although their meanings seem to be different.
+    # THIS TABLE IS SORTED.  KEEP IT THAT WAY.
+    case @host_os@ in
+      *aix*)
+        function size_command()
+        {
+          case $1 in
+            TEXT)  TEXT=$(size -X32_64 $EXENAME | awk '{print $2}')  ;;
+            DATA)  DATA=$(size -X32_64 $EXENAME | awk '{print $4}')  ;;
+            SIZE)  SIZE=$(size -X32_64 $EXENAME | awk '{print $12}')  ;;
+          esac
+        }
+        ;;
+      *hpux*)
+        function size_command()
+        {
+          case $1 in
+            TEXT)  TEXT=$(size  $EXENAME | awk '{print $1}')  ;;
+            DATA)  DATA=$(size  $EXENAME | awk '{print $3}')  ;;
+            SIZE)  SIZE=$(size  $EXENAME | awk '{print $7}')  ;;
+          esac
+        }
+        ;;
+      *irix*)
+        function size_command()
+        {
+          case $1 in
+            TEXT)  TEXT=$(size -4 $EXENAME | awk '{print $1}')  ;;
+            DATA)  DATA=$(size -4 $EXENAME | awk '{print $3}')  ;;
+            SIZE)  SIZE=$(size -4 $EXENAME | awk '{print $7}')  ;;
+          esac
+        }
+        ;;
+      *solaris*)
+        function size_command()
+        {
+          case $1 in
+            TEXT)  TEXT=$(size $EXENAME | awk '{print $1}')  ;;
+            DATA)  DATA=$(size $EXENAME | awk '{print $3}')  ;;
+            SIZE)  SIZE=$(size $EXENAME | awk '{print $7}')  ;;
+          esac
+        }
+        ;;
+      *)
+        echo ' * Warning!  Skipping section sizes!' 1>&2
+        function size_command()
+        {
+        case $1 in
+          TEXT)  TEXT=0 ;;
+          DATA)  DATA=0 ;;
+          SIZE)  SIZE=0 ;;
+        esac
+        }
+        ;;
+    esac
+  fi
+}
+
+# Test for file output
+test_for_output()
+{
+    # This checks for emitted output files, which is useful when
+    # testing file-related output.  The rules for this working are as
+    # follows: the emitted file must have the ".txt" extension, and be
+    # based on the actual *.cc file's name.  For example, 27/filbuf.cc
+    # currently outputs files named 27/filebuf-2.txt and 27/filebuf-3.txt.
+    # Also, the first emitted file must be in the form $NAME-1.txt.
+    # The control file must follow the same constraints, but have a
+    # ".tst" extension.  Thus, you have 27/filebuf-2.tst, etc.
+
+    # NAME contains the source name, like 27/filebuf.cc
+    # From that NAME, we want to generate some possible names, using
+    # ls on MATCH, a pattern description generated with sed.
+
+    # this is the name of the resulting diff file, if any
+    DIFF_FILE="`echo $TEST_NAME | sed 's/cc$/diff/'`"
+    # construct wildcard names, ie for $NAME=filebuf.cc, makes "filebuf*.tst"
+    DATA_FILES="`echo $TEST_NAME | sed 's/\.cc/\*\.tst/g'`"
+    # make sure there is at least one, then go
+    ST_E="`echo $TEST_NAME | sed 's/\.cc/\-1\.tst/g'`"
+    if [ -f $ST_E ]; then
+        # list of actual files that match the wildcard above, ie
+        # "filebuf-1.tst"
+        ST_MATCH_LIST="`ls $DATA_FILES`"
+        for i in $ST_MATCH_LIST; do
+            # ST_OUT_FILE is generated in the build directory.
+            PRE_NAME2="$TEST_DIR/`basename $i`"
+            ST_OUT_FILE="`echo $PRE_NAME2 | sed 's/tst$/txt/'`"
+            diff $ST_OUT_FILE $i > $DIFF_FILE
+            if [ -s $DIFF_FILE ]; then
+                RESULT="-r"
+            else
+                RESULT="+"
+            fi
+            rm $DIFF_FILE
+        done
+    else
+        # the file does no output, and didn't abnormally
+        # terminate, so assume passed.
+        RESULT="+"
+    fi
+}
+    
+
+#
+# 3: compile, link, execute, time
+#
+# Abstract out the common code for compiling, linking, executing and printing.
+test_file()
+{
+    # NB: S_FLAG has to be last argument because it may be null, and
+    # error checking hasn't been invented yet.
+    NAME=$1
+    EXENAME=$2
+    S_FLAG=$3
+
+    SRC_NAME="$SRC_DIR/testsuite/$1"
+    TEST_NAME="$TEST_DIR/`basename $NAME`"
+
+    # This would be deliciously easy if GNU date's %s were always around.
+    # There are three ways to do this:  1) use the builtin 'time' like we
+    # do later; then getting compiler errors into LOG_FILE is a nightmare.
+    # 2) Grab the output of a formatted date(1) and do the math; harder
+    # and harder as we try compiling at, say, top of the hour; we would
+    # eventually have to calculate time_t anyhow.  Or 3) just grab two
+    # time_t's (no more overhead than grabbing two date(1)'s).
+    compiler_invocation="$LTCXX $S_FLAG $SRC_NAME -o $EXENAME"
+    echo $compiler_invocation >> compile.out 2>&1
+    COMP_TIME_START=$($TIMER_COMMAND)
+    $compiler_invocation >> compile.out 2>&1
+    COMP_TIME_END=$($TIMER_COMMAND)
+
+    if [ $COMP_TIME_START -lt $COMP_TIME_END ]; then
+        C_TIME=$[ $COMP_TIME_END - $COMP_TIME_START ]
+    else
+        C_TIME="0"
+    fi
+
+    if [ -f $EXENAME ]; then
+#        rm compile.out
+        size_command TEXT
+        size_command DATA
+        size_command SIZE
+
+        # Actually run the executable and time it.  Note that output
+        # printed by the executable will be lost and cannot be redirected,
+        # because we need to capture the output of 'time'.  Bummer.
+        TIMEFORMAT='timemark %R'
+        E_TIME_TEXT="$(exec 2>&1; time $LTEXE $EXENAME)"
+        E_ABNORMAL_TERMINATION=$?
+ 
+        if [ "$E_ABNORMAL_TERMINATION" -ne 0 ]; then
+            RESULT='-r'
+	    E_TIME="0"
+            rm -f ./*core
+            # sometimes you want to save all core files for review:
+            #mv ./core $EXENAME.core
+            # sometimes the OS allows you to name core files yourself:
+            #mv ./*core $EXENAME.core
+            #mv ./core* $EXENAME.core
+        else
+            test_for_output
+	    # XXX This doesn't always result in a number.
+	    # E_TIME="$(echo $E_TIME_TEXT | awk '{print $2}')"
+	    E_TIME="0"
+        fi
+
+        # sometimes you want to save all failing exe files for review:
+        if [ "$RESULT" = '+' ]; then
+            rm "$EXENAME"
+        fi
+    else
+        # the file did not compile/link.
+        printf "\n" >> $LOG_FILE
+        `cat compile.out >> $LOG_FILE` 
+        rm compile.out
+        RESULT="-b"
+        TEXT="0"
+        DATA="0"
+        SIZE="0"
+    fi
+
+    # update the counters
+    if test "$RESULT" = "+" ; then
+        if test x"$S_FLAG" = x"$ST_FLAG"; then
+            static_pass=`expr $static_pass + 1`
+        else
+            shared_pass=`expr $shared_pass + 1`
+        fi
+    else
+        if test x"$S_FLAG" = x"$ST_FLAG"; then
+            static_fail=`expr $static_fail + 1`
+        else
+            shared_fail=`expr $shared_fail + 1`
+        fi
+    fi
+
+    printf "%s\t" "$RESULT"
+    printf "%-2s %d\t%.3f\t%s\t%s\t%s\t%s %s\n"   \
+        "$RESULT" $C_TIME $E_TIME $TEXT $DATA $SIZE $NAME >> $RESULTS_FILE
+}
+
+setup_size_command
+echo ""
+echo "Detailed test results in .${RESULTS_FILE/$BUILD_DIR}"
+echo $explanation
+echo "------------------------------------------------------------------------"
+printf "static\tshared\ttest\n"
+echo "------------------------------------------------------------------------"
+
+TEST_TIME_START=$($TIMER_COMMAND)
+for NAME in `cat $TESTS_FILE`
+do
+    PRE_NAME="$TEST_DIR/`basename $NAME`"
+    ST_NAME="`echo $PRE_NAME | sed 's/cc$/st-exe/'`"
+    SH_NAME="`echo $PRE_NAME | sed 's/cc$/sh-exe/'`"
+
+    if test @enable_static@ = yes; then
+        test_file $NAME $ST_NAME "$ST_FLAG"
+    else
+        printf "x\t"
+        printf "static skipped\n" >> $RESULTS_FILE
+    fi
+    if test @enable_shared@ = yes; then
+        test_file $NAME $SH_NAME "$SH_FLAG"
+    else
+        printf "x\t"
+        printf "shared skipped\n" >> $RESULTS_FILE
+    fi
+    printf "%s\n" "$NAME"
+
+    echo "" >> $RESULTS_FILE
+done
+TEST_TIME_END=$($TIMER_COMMAND)
+
+
+#
+# 4: summary
+#
+# grep can count faster than we can...
+total_failures=`expr ${shared_fail} + ${static_fail}`
+total_successes=`expr ${shared_pass} + ${static_pass}`
+resultstext="pass/fail results:  ${static_pass}/${static_fail} static + ${shared_pass}/${shared_fail} shared = ${total_successes}/${total_failures} total"
+if [ $total_failures -eq 0 ]; then
+    resultstext="${resultstext}, WIN WIN"
+fi
+sed -e "/^date:/a\\
+$resultstext" $RESULTS_FILE > ${RESULTS_FILE}.tmp
+mv ${RESULTS_FILE}.tmp $RESULTS_FILE
+
+if [ $TEST_TIME_START -lt $TEST_TIME_END ]; then
+    TEST_TIME=$[ $TEST_TIME_END - $TEST_TIME_START ]
+    echo "testrun == $TEST_TIME seconds"
+    echo "testrun == $TEST_TIME seconds" >> $RESULTS_FILE
+fi
+
+exit 0
diff --git a/contrib/libstdc++/mkcshadow b/contrib/libstdc++/mkcshadow
new file mode 100755
index 0000000..4d4bd4f
--- /dev/null
+++ b/contrib/libstdc++/mkcshadow
@@ -0,0 +1,98 @@
+#!/usr/bin/env bash
+
+# mkcshadow: reads header names (like "features.h" or "sys/types.h")
+#   from stdin, and creates shadow headers under cshadow/, except where
+#   a header of the same name is already in shadow/.
+
+SCRIPTDIR=${0%/*}
+
+if [ ! -d cshadow ]; then
+  echo "Creating cshadow."
+  mkdir ../cshadow
+fi
+
+echo "Creating..."
+while read header; do
+
+  if [ ! -f $SCRIPTDIR/shadow/$header ]; then
+
+    # strip off directory names while making 
+    #   any necessary directories
+
+    dir=../cshadow
+    case "$header" in */*)
+      right="$header"
+      while [ "$right" != "${right##*/}" ] ; do
+        dir="$dir/${right%%/*}"
+        if [ ! -d "$dir" ]; then mkdir "$dir"; fi
+        right="${right#*/}"
+      done
+      ;;
+    esac
+
+    echo "  ../cshadow/$header"
+    UPNAME=`echo $header | tr 'a-z./-' 'A-Z___'`
+    cat >"../cshadow/$header" <
+# else
+
+    namespace _C_legacy { namespace _C_shadow { } }
+    using namespace ::_C_legacy::_C_shadow;
+    namespace _C_legacy {
+      extern "C" {
+#       define _IN_C_LEGACY_
+#       pragma GCC system_header
+#       include_next <${header}>
+      } // close extern "C"
+    }   // close namespace _C_legacy::
+# undef _IN_C_LEGACY_
+  
+# endif /* _IN_C_LEGACY_ */
+#endif /* _INCLUDED_CPP_${UPNAME}_ */
+EOF
+#################### end ####################
+  fi
+done
+
+
+
+
+
+
diff --git a/contrib/libstdc++/mkinclosure b/contrib/libstdc++/mkinclosure
new file mode 100755
index 0000000..7996b4b
--- /dev/null
+++ b/contrib/libstdc++/mkinclosure
@@ -0,0 +1,102 @@
+#!/usr/bin/env bash
+#
+# usage: inclosure [ -I dir ] ... [ -G header-name ] ... header-name ...
+#
+# Locates each standard header and argument header-name in the
+# specified "-I" include path (default is /usr/include) and parses 
+# any header names out of its #include directives.  These names are 
+# treated recursively to identify a _transitive_closure_ of standard
+# header names, which is sorted and sent to standard output.  Headers 
+# not specified with -G, and included somewhere but not located are 
+# reported.
+#
+# Each header reported by this program must be "shadowed" by a 
+# file of the same name in a C++ header.  See 
+#   http://www.cantrip.org/cheaders.html
+#
+# BUGS: 
+#  - Cannot cope with header file names that contain spaces
+#  - Ignores comment-block delimiters
+#  - Ignores sub-includes under #include_next headers.
+
+OLDH=/tmp/old$$
+echo "this-compensates-for-a-stupid-bug-in-GNU-fgrep." >$OLDH
+HDRS=/tmp/hdrs$$
+>$HDRS
+NEW=/tmp/new$$
+>$NEW
+IGNORES=/tmp/ignores$$
+echo "this-compensates-for-a-stupid-bug-in-GNU-fgrep.">$IGNORES
+
+trap "rm -f $NEW $HDRS $OLDH $IGNORES" 0
+
+# process arguments
+unset INCPATH
+while [ $# != 0 -a "$1" != "${1#-}" ]; do
+  FLAG="${1%%${1##-?}}"
+  case "$FLAG" in -I|-G)
+    ARG="${1##${FLAG}}"
+    if [ "$ARG" = "" ]; then
+      if [ $# != 0 ]; then 
+        shift;
+        ARG="$1"
+      else
+        echo "$0: $FLAG needs an argument."
+	exit
+      fi
+    fi ;;
+  esac
+  shift
+  case "$FLAG" in 
+    -I) INCPATH="$INCPATH $ARG" ;;
+    -G) echo " $ARG " >>$IGNORES ;;
+  esac
+done
+INCPATH=${INCPATH-"/usr/include"}  
+
+# identify headers
+
+STDHDRS="assert.h ctype.h errno.h float.h limits.h \
+ locale.h math.h setjmp.h signal.h stdarg.h stddef.h \
+ stdio.h stdlib.h string.h time.h wchar.h wctype.h "
+OTHERS="$*"
+
+for file in $STDHDRS $OTHERS; do
+  echo "$file" 
+done >$HDRS
+
+until cmp -s $OLDH $HDRS; do #  (until no new headers found)
+
+  fgrep -v -f $OLDH $HDRS \
+  | while read file; do
+    found=no
+    for dir in $INCPATH; do 
+      name="$dir/$file"
+      if [ -f "$name" ]; then 
+        cat "$name"
+	found=yes
+        break;
+      fi
+    done
+    if [ "$found" = no ]; then # && echo " $file " | fgrep -v -q -f $IGNORES 
+      echo "$0: warning: header $file not found in include path." $1>&2
+    fi
+  done \
+  | sed -n -e \
+'/^[ 	]*#[ 	]*include[ 	]*<[^>]*>/s/^[^<]*<\([^>]*\)>.*/\1/p' \
+  | while read file; do
+     drop=no
+     for ignore in `cat $IGNORES`; do
+       if [ "$ignore" = "$file" ]; then drop=yes; fi
+     done
+     case "$file" in /*) drop=yes;; esac   # no absolute paths
+     case $drop in no) echo "$file";; esac
+  done >$NEW
+  mv $HDRS $OLDH
+  cat $OLDH $NEW | sort -u -o $HDRS
+
+done
+cat $HDRS
+
+
+
diff --git a/contrib/libstdc++/src/Makefile.am b/contrib/libstdc++/src/Makefile.am
new file mode 100644
index 0000000..dde80dd
--- /dev/null
+++ b/contrib/libstdc++/src/Makefile.am
@@ -0,0 +1,151 @@
+## Makefile for the src subdirectory of the GNU C++ Standard library.
+##
+## Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002
+## Free Software Foundation, Inc.
+##
+## This file is part of the libstdc++ version 3 distribution.
+## Process this file with automake to produce Makefile.in.
+
+## 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.
+
+AUTOMAKE_OPTIONS = 1.3 gnits
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Cross compiler and multilib support.
+CXX = @glibcpp_CXX@
+toolexecdir = @glibcpp_toolexecdir@
+toolexeclibdir = @glibcpp_toolexeclibdir@
+toolexeclib_LTLIBRARIES = libstdc++.la
+
+# Compile flags that should be constant throughout the build, both for
+# SUBDIRS and for libstdc++-v3 in general.
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
+# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
+CONFIG_CXXFLAGS = \
+	@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ 
+
+# Warning flags to use.
+WARN_CXXFLAGS = \
+	@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+
+INCLUDES = \
+	-nostdinc++ \
+	$(GLIBCPP_INCLUDES) \
+	$(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
+	$(TOPLEVEL_INCLUDES)
+
+sources = \
+	globals.cc limits.cc \
+	basic_file.cc complex_io.cc ios.cc strstream.cc \
+	cmath.cc bitset.cc \
+	functexcept.cc stdexcept.cc vterminate.cc \
+	c++locale.cc locale.cc localename.cc codecvt.cc \
+	collate.cc ctype.cc messages.cc monetary.cc numeric.cc time.cc \
+	concept-inst.cc locale-inst.cc misc-inst.cc stl-inst.cc \
+	string-inst.cc wstring-inst.cc valarray-inst.cc  ext-inst.cc
+
+VPATH = $(top_srcdir)/src:$(top_srcdir)
+
+libstdc___la_SOURCES = $(sources)
+
+libstdc___la_LIBADD = \
+	../libmath/libmath.la @libio_la@ \
+	../libsupc++/libsupc++convenience.la
+
+if GLIBCPP_BUILD_VERSIONED_SHLIB
+version_arg=-Wl,--version-script=linker.map
+else
+version_arg=
+endif
+
+libstdc___la_LDFLAGS = \
+	-version-info @libtool_VERSION@ ${version_arg} \
+	-lm @LIBUNWIND_FLAG@ 
+
+libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) linker.map
+
+# Use special rules for the deprecated source files so that they find
+# deprecated include files.
+GLIBCPP_INCLUDE_DIR=@glibcpp_builddir@/include
+strstream.lo: strstream.cc
+	$(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+strstream.o: strstream.cc
+	$(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+
+# Use special rules for the concept-checking instantiations so that all
+# the generated template functions are also instantiated.  Force the checks
+# to be on so that the instantiations are actually seen.
+concept-inst.lo: concept-inst.cc
+	$(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+concept-inst.o: concept-inst.cc
+	$(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way.  Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion call for it. (ie, --enable-debug)
+AM_CXXFLAGS = \
+	-fno-implicit-templates \
+	$(LIBSUPCXX_CXXFLAGS) \
+	$(WARN_CXXFLAGS) \
+	$(OPTIMIZE_CXXFLAGS) \
+	$(CONFIG_CXXFLAGS) 
+
+
+# libstdc++ libtool notes
+
+# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
+
+# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# using the C++ compiler, because that will enable the settings
+# detected when C++ support was being configured.  However, when no
+# such flag is given in the command line, libtool attempts to figure
+# it out by matching the compiler name in each configuration section
+# against a prefix of the command line.  The problem is that, if the
+# compiler name and its initial flags stored in the libtool
+# configuration file don't match those in the command line, libtool
+# can't decide which configuration to use, and it gives up.  The
+# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
+# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
+# attempt to infer which configuration to use
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
+	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+
+# 3) We'd have a problem when building the shared libstdc++ object if
+# the rules automake generates would be used.  We cannot allow g++ to
+# be used since this would add -lstdc++ to the link line which of
+# course is problematic at this point.  So, we get the top-level
+# directory to configure libstdc++-v3 to use gcc as the C++
+# compilation driver.
+CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
+	  @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
diff --git a/contrib/libstdc++/src/Makefile.in b/contrib/libstdc++/src/Makefile.in
new file mode 100644
index 0000000..51e25be
--- /dev/null
+++ b/contrib/libstdc++/src/Makefile.in
@@ -0,0 +1,521 @@
+# Makefile.in generated automatically by automake 1.4-p5 from Makefile.am
+
+# Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+SHELL = @SHELL@
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+prefix = @prefix@
+exec_prefix = @exec_prefix@
+
+bindir = @bindir@
+sbindir = @sbindir@
+libexecdir = @libexecdir@
+datadir = @datadir@
+sysconfdir = @sysconfdir@
+sharedstatedir = @sharedstatedir@
+localstatedir = @localstatedir@
+libdir = @libdir@
+infodir = @infodir@
+mandir = @mandir@
+includedir = @includedir@
+oldincludedir = /usr/include
+
+DESTDIR =
+
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+
+top_builddir = ..
+
+ACLOCAL = @ACLOCAL@
+AUTOCONF = @AUTOCONF@
+AUTOMAKE = @AUTOMAKE@
+AUTOHEADER = @AUTOHEADER@
+
+INSTALL = @INSTALL@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS)
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+transform = @program_transform_name@
+
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_alias = @build_alias@
+build_triplet = @build@
+host_alias = @host_alias@
+host_triplet = @host@
+target_alias = @target_alias@
+target_triplet = @target@
+AR = @AR@
+AS = @AS@
+ATOMICITY_INC_SRCDIR = @ATOMICITY_INC_SRCDIR@
+AWK = @AWK@
+BASIC_FILE_H = @BASIC_FILE_H@
+BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
+CATALOGS = @CATALOGS@
+CATOBJEXT = @CATOBJEXT@
+CC = @CC@
+CCODECVT_C = @CCODECVT_C@
+CCODECVT_H = @CCODECVT_H@
+CLOCALE_H = @CLOCALE_H@
+CMESSAGES_H = @CMESSAGES_H@
+CPP = @CPP@
+CPU_LIMITS_INC_SRCDIR = @CPU_LIMITS_INC_SRCDIR@
+CSHADOW_FLAGS = @CSHADOW_FLAGS@
+CSTDIO_H = @CSTDIO_H@
+CXXCPP = @CXXCPP@
+C_INCLUDE_DIR = @C_INCLUDE_DIR@
+DATADIRNAME = @DATADIRNAME@
+DEBUG_FLAGS = @DEBUG_FLAGS@
+DLLTOOL = @DLLTOOL@
+EXEEXT = @EXEEXT@
+EXTRA_CXX_FLAGS = @EXTRA_CXX_FLAGS@
+GCJ = @GCJ@
+GCJFLAGS = @GCJFLAGS@
+GENCAT = @GENCAT@
+GLIBC21 = @GLIBC21@
+GLIBCPP_IS_CROSS_COMPILING = @GLIBCPP_IS_CROSS_COMPILING@
+GMOFILES = @GMOFILES@
+GMSGFMT = @GMSGFMT@
+INSTOBJEXT = @INSTOBJEXT@
+INTLBISON = @INTLBISON@
+INTLLIBS = @INTLLIBS@
+INTLOBJS = @INTLOBJS@
+INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
+LIBICONV = @LIBICONV@
+LIBMATHOBJS = @LIBMATHOBJS@
+LIBSUPCXX_PICFLAGS = @LIBSUPCXX_PICFLAGS@
+LIBTOOL = @LIBTOOL@
+LIBUNWIND_FLAG = @LIBUNWIND_FLAG@
+LN_S = @LN_S@
+MAINT = @MAINT@
+MAKEINFO = @MAKEINFO@
+MKINSTALLDIRS = @MKINSTALLDIRS@
+MSGFMT = @MSGFMT@
+OBJDUMP = @OBJDUMP@
+OBJEXT = @OBJEXT@
+OPT_LDFLAGS = @OPT_LDFLAGS@
+OS_INC_SRCDIR = @OS_INC_SRCDIR@
+PACKAGE = @PACKAGE@
+POFILES = @POFILES@
+POSUB = @POSUB@
+RANLIB = @RANLIB@
+SECTION_FLAGS = @SECTION_FLAGS@
+SECTION_LDFLAGS = @SECTION_LDFLAGS@
+STRIP = @STRIP@
+USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
+USE_NLS = @USE_NLS@
+VERSION = @VERSION@
+WARN_FLAGS = @WARN_FLAGS@
+WERROR = @WERROR@
+check_msgfmt = @check_msgfmt@
+enable_shared = @enable_shared@
+enable_static = @enable_static@
+glibcpp_CXX = @glibcpp_CXX@
+glibcpp_MOFILES = @glibcpp_MOFILES@
+glibcpp_POFILES = @glibcpp_POFILES@
+glibcpp_basedir = @glibcpp_basedir@
+glibcpp_builddir = @glibcpp_builddir@
+glibcpp_localedir = @glibcpp_localedir@
+glibcpp_prefixdir = @glibcpp_prefixdir@
+glibcpp_srcdir = @glibcpp_srcdir@
+glibcpp_thread_h = @glibcpp_thread_h@
+glibcpp_toolexecdir = @glibcpp_toolexecdir@
+glibcpp_toolexeclibdir = @glibcpp_toolexeclibdir@
+gxx_include_dir = @gxx_include_dir@
+ifGNUmake = @ifGNUmake@
+libio_la = @libio_la@
+libtool_VERSION = @libtool_VERSION@
+release_VERSION = @release_VERSION@
+toplevel_srcdir = @toplevel_srcdir@
+
+AUTOMAKE_OPTIONS = 1.3 gnits
+MAINT_CHARSET = latin1
+
+mkinstalldirs = $(SHELL) $(toplevel_srcdir)/mkinstalldirs
+
+# Cross compiler and multilib support.
+CXX = @glibcpp_CXX@
+toolexecdir = @glibcpp_toolexecdir@
+toolexeclibdir = @glibcpp_toolexeclibdir@
+toolexeclib_LTLIBRARIES = libstdc++.la
+
+# Compile flags that should be constant throughout the build, both for
+# SUBDIRS and for libstdc++-v3 in general.
+OPTIMIZE_CXXFLAGS = @OPTIMIZE_CXXFLAGS@
+
+# These bits are all figured out from configure. Look in acinclude.m4
+# or configure.in to see how they are set. See GLIBCPP_EXPORT_FLAGS
+# NB: DEBUGFLAGS have to be at the end so that -O2 can be overridden.
+CONFIG_CXXFLAGS = \
+	@EXTRA_CXX_FLAGS@ @SECTION_FLAGS@ @CSHADOW_FLAGS@ @DEBUG_FLAGS@ 
+
+
+# Warning flags to use.
+WARN_CXXFLAGS = \
+	@WARN_FLAGS@ $(WERROR) -fdiagnostics-show-location=once
+
+
+# Use common includes from acinclude.m4/GLIBCPP_EXPORT_INCLUDES
+GLIBCPP_INCLUDES = @GLIBCPP_INCLUDES@
+LIBMATH_INCLUDES = @LIBMATH_INCLUDES@
+LIBSUPCXX_INCLUDES = @LIBSUPCXX_INCLUDES@
+LIBIO_INCLUDES = @LIBIO_INCLUDES@
+TOPLEVEL_INCLUDES = @TOPLEVEL_INCLUDES@
+
+INCLUDES = \
+	-nostdinc++ \
+	$(GLIBCPP_INCLUDES) \
+	$(LIBSUPCXX_INCLUDES) $(LIBIO_INCLUDES) $(LIBMATH_INCLUDES) \
+	$(TOPLEVEL_INCLUDES)
+
+
+sources = \
+	globals.cc limits.cc \
+	basic_file.cc complex_io.cc ios.cc strstream.cc \
+	cmath.cc bitset.cc \
+	functexcept.cc stdexcept.cc vterminate.cc \
+	c++locale.cc locale.cc localename.cc codecvt.cc \
+	collate.cc ctype.cc messages.cc monetary.cc numeric.cc time.cc \
+	concept-inst.cc locale-inst.cc misc-inst.cc stl-inst.cc \
+	string-inst.cc wstring-inst.cc valarray-inst.cc  ext-inst.cc
+
+
+VPATH = $(top_srcdir)/src:$(top_srcdir)
+
+libstdc___la_SOURCES = $(sources)
+
+libstdc___la_LIBADD = \
+	../libmath/libmath.la @libio_la@ \
+	../libsupc++/libsupc++convenience.la
+
+@GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@version_arg = @GLIBCPP_BUILD_VERSIONED_SHLIB_TRUE@-Wl,--version-script=linker.map
+@GLIBCPP_BUILD_VERSIONED_SHLIB_FALSE@version_arg = 
+
+libstdc___la_LDFLAGS = \
+	-version-info @libtool_VERSION@ ${version_arg} \
+	-lm @LIBUNWIND_FLAG@ 
+
+
+libstdc___la_DEPENDENCIES = $(libstdc___la_LIBADD) linker.map
+
+# Use special rules for the deprecated source files so that they find
+# deprecated include files.
+GLIBCPP_INCLUDE_DIR = @glibcpp_builddir@/include
+
+# AM_CXXFLAGS needs to be in each subdirectory so that it can be
+# modified in a per-library or per-sub-library way.  Need to manually
+# set this option because CONFIG_CXXFLAGS has to be after
+# OPTIMIZE_CXXFLAGS on the compile line so that -O2 can be overridden
+# as the occasion call for it. (ie, --enable-debug)
+AM_CXXFLAGS = \
+	-fno-implicit-templates \
+	$(LIBSUPCXX_CXXFLAGS) \
+	$(WARN_CXXFLAGS) \
+	$(OPTIMIZE_CXXFLAGS) \
+	$(CONFIG_CXXFLAGS) 
+
+
+# libstdc++ libtool notes
+
+# 1) Need to explicitly set LTCXXCOMPILE so that AM_CXXFLAGS is
+# last. (That way, things like -O2 passed down from the toplevel can
+# be overridden by --enable-debug.)
+
+# 2) In general, libtool expects an argument such as `--tag=CXX' when
+# using the C++ compiler, because that will enable the settings
+# detected when C++ support was being configured.  However, when no
+# such flag is given in the command line, libtool attempts to figure
+# it out by matching the compiler name in each configuration section
+# against a prefix of the command line.  The problem is that, if the
+# compiler name and its initial flags stored in the libtool
+# configuration file don't match those in the command line, libtool
+# can't decide which configuration to use, and it gives up.  The
+# correct solution is to add `--tag CXX' to LTCXXCOMPILE and maybe
+# CXXLINK, just after $(LIBTOOL), so that libtool doesn't have to
+# attempt to infer which configuration to use
+LTCXXCOMPILE = $(LIBTOOL) --tag CXX --mode=compile $(CXX) $(INCLUDES) \
+	       $(AM_CPPFLAGS) $(CPPFLAGS) $(CXXFLAGS) $(AM_CXXFLAGS) 
+
+
+# 3) We'd have a problem when building the shared libstdc++ object if
+# the rules automake generates would be used.  We cannot allow g++ to
+# be used since this would add -lstdc++ to the link line which of
+# course is problematic at this point.  So, we get the top-level
+# directory to configure libstdc++-v3 to use gcc as the C++
+# compilation driver.
+CXXLINK = $(LIBTOOL) --tag CXX --mode=link $(CXX) \
+	  @OPT_LDFLAGS@ @SECTION_LDFLAGS@ $(AM_CXXFLAGS) $(LDFLAGS) -o $@
+
+CONFIG_HEADER = ../config.h
+CONFIG_CLEAN_FILES = 
+LTLIBRARIES =  $(toolexeclib_LTLIBRARIES)
+
+
+DEFS = @DEFS@ -I. -I$(srcdir) -I..
+CPPFLAGS = @CPPFLAGS@
+LDFLAGS = @LDFLAGS@
+LIBS = @LIBS@
+libstdc___la_OBJECTS =  globals.lo limits.lo basic_file.lo complex_io.lo \
+ios.lo strstream.lo cmath.lo bitset.lo functexcept.lo stdexcept.lo \
+vterminate.lo c++locale.lo locale.lo localename.lo codecvt.lo \
+collate.lo ctype.lo messages.lo monetary.lo numeric.lo time.lo \
+concept-inst.lo locale-inst.lo misc-inst.lo stl-inst.lo string-inst.lo \
+wstring-inst.lo valarray-inst.lo ext-inst.lo
+CXXFLAGS = @CXXFLAGS@
+CXXCOMPILE = $(CXX) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)
+CXXLD = $(CXX)
+DIST_COMMON =  Makefile.am Makefile.in
+
+
+DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
+
+TAR = gtar
+GZIP_ENV = --best
+SOURCES = $(libstdc___la_SOURCES)
+OBJECTS = $(libstdc___la_OBJECTS)
+
+all: all-redirect
+.SUFFIXES:
+.SUFFIXES: .S .c .cc .lo .o .obj .s
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOMAKE) --cygnus src/Makefile
+
+Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) \
+	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
+
+
+mostlyclean-toolexeclibLTLIBRARIES:
+
+clean-toolexeclibLTLIBRARIES:
+	-test -z "$(toolexeclib_LTLIBRARIES)" || rm -f $(toolexeclib_LTLIBRARIES)
+
+distclean-toolexeclibLTLIBRARIES:
+
+maintainer-clean-toolexeclibLTLIBRARIES:
+
+install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(toolexeclibdir)
+	@list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    echo "$(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p"; \
+	    $(LIBTOOL)  --mode=install $(INSTALL) $$p $(DESTDIR)$(toolexeclibdir)/$$p; \
+	  else :; fi; \
+	done
+
+uninstall-toolexeclibLTLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	list='$(toolexeclib_LTLIBRARIES)'; for p in $$list; do \
+	  $(LIBTOOL)  --mode=uninstall rm -f $(DESTDIR)$(toolexeclibdir)/$$p; \
+	done
+
+.c.o:
+	$(COMPILE) -c $<
+
+# FIXME: We should only use cygpath when building on Windows,
+# and only if it is available.
+.c.obj:
+	$(COMPILE) -c `cygpath -w $<`
+
+.s.o:
+	$(COMPILE) -c $<
+
+.S.o:
+	$(COMPILE) -c $<
+
+mostlyclean-compile:
+	-rm -f *.o core *.core
+	-rm -f *.$(OBJEXT)
+
+clean-compile:
+
+distclean-compile:
+	-rm -f *.tab.c
+
+maintainer-clean-compile:
+
+.c.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.s.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+.S.lo:
+	$(LIBTOOL) --mode=compile $(COMPILE) -c $<
+
+mostlyclean-libtool:
+	-rm -f *.lo
+
+clean-libtool:
+	-rm -rf .libs _libs
+
+distclean-libtool:
+
+maintainer-clean-libtool:
+
+libstdc++.la: $(libstdc___la_OBJECTS) $(libstdc___la_DEPENDENCIES)
+	$(CXXLINK) -rpath $(toolexeclibdir) $(libstdc___la_LDFLAGS) $(libstdc___la_OBJECTS) $(libstdc___la_LIBADD) $(LIBS)
+.cc.o:
+	$(CXXCOMPILE) -c $<
+.cc.obj:
+	$(CXXCOMPILE) -c `cygpath -w $<`
+.cc.lo:
+	$(LTCXXCOMPILE) -c $<
+
+tags: TAGS
+
+ID: $(HEADERS) $(SOURCES) $(LISP)
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	here=`pwd` && cd $(srcdir) \
+	  && mkid -f$$here/ID $$unique $(LISP)
+
+TAGS:  $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS)'; \
+	unique=`for i in $$list; do echo $$i; done | \
+	  awk '    { files[$$0] = 1; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \
+	  || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags  $$unique $(LISP) -o $$here/TAGS)
+
+mostlyclean-tags:
+
+clean-tags:
+
+distclean-tags:
+	-rm -f TAGS ID
+
+maintainer-clean-tags:
+
+distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
+
+subdir = src
+
+distdir: $(DISTFILES)
+	@for file in $(DISTFILES); do \
+	  if test -f $$file; then d=.; else d=$(srcdir); fi; \
+	  if test -d $$d/$$file; then \
+	    cp -pr $$d/$$file $(distdir)/$$file; \
+	  else \
+	    test -f $(distdir)/$$file \
+	    || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
+	    || cp -p $$d/$$file $(distdir)/$$file || :; \
+	  fi; \
+	done
+info-am:
+info: info-am
+dvi-am:
+dvi: dvi-am
+check-am:
+check: check-am
+installcheck-am:
+installcheck: installcheck-am
+install-info-am: 
+install-info: install-info-am
+install-exec-am: install-toolexeclibLTLIBRARIES
+install-exec: install-exec-am
+
+install-data-am:
+install-data: install-data-am
+
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
+install: install-am
+uninstall-am: uninstall-toolexeclibLTLIBRARIES
+uninstall: uninstall-am
+all-am: Makefile $(LTLIBRARIES)
+all-redirect: all-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install
+installdirs:
+	$(mkinstalldirs)  $(DESTDIR)$(toolexeclibdir)
+
+
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f Makefile $(CONFIG_CLEAN_FILES)
+	-rm -f config.cache config.log stamp-h stamp-h[0-9]*
+
+maintainer-clean-generic:
+mostlyclean-am:  mostlyclean-toolexeclibLTLIBRARIES mostlyclean-compile \
+		mostlyclean-libtool mostlyclean-tags \
+		mostlyclean-generic
+
+mostlyclean: mostlyclean-am
+
+clean-am:  clean-toolexeclibLTLIBRARIES clean-compile clean-libtool \
+		clean-tags clean-generic mostlyclean-am
+
+clean: clean-am
+
+distclean-am:  distclean-toolexeclibLTLIBRARIES distclean-compile \
+		distclean-libtool distclean-tags distclean-generic \
+		clean-am
+	-rm -f libtool
+
+distclean: distclean-am
+
+maintainer-clean-am:  maintainer-clean-toolexeclibLTLIBRARIES \
+		maintainer-clean-compile maintainer-clean-libtool \
+		maintainer-clean-tags maintainer-clean-generic \
+		distclean-am
+	@echo "This command is intended for maintainers to use;"
+	@echo "it deletes files that may require special tools to rebuild."
+
+maintainer-clean: maintainer-clean-am
+
+.PHONY: mostlyclean-toolexeclibLTLIBRARIES \
+distclean-toolexeclibLTLIBRARIES clean-toolexeclibLTLIBRARIES \
+maintainer-clean-toolexeclibLTLIBRARIES \
+uninstall-toolexeclibLTLIBRARIES install-toolexeclibLTLIBRARIES \
+mostlyclean-compile distclean-compile clean-compile \
+maintainer-clean-compile mostlyclean-libtool distclean-libtool \
+clean-libtool maintainer-clean-libtool tags mostlyclean-tags \
+distclean-tags clean-tags maintainer-clean-tags distdir info-am info \
+dvi-am dvi check check-am installcheck-am installcheck install-info-am \
+install-info install-exec-am install-exec install-data-am install-data \
+install-am install uninstall-am uninstall all-redirect all-am all \
+installdirs mostlyclean-generic distclean-generic clean-generic \
+maintainer-clean-generic clean mostlyclean distclean maintainer-clean
+
+strstream.lo: strstream.cc
+	$(LTCXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+strstream.o: strstream.cc
+	$(CXXCOMPILE) -I$(GLIBCPP_INCLUDE_DIR)/backward -Wno-deprecated -c $<
+
+# Use special rules for the concept-checking instantiations so that all
+# the generated template functions are also instantiated.  Force the checks
+# to be on so that the instantiations are actually seen.
+concept-inst.lo: concept-inst.cc
+	$(LTCXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+concept-inst.o: concept-inst.cc
+	$(CXXCOMPILE) -D_GLIBCPP_CONCEPT_CHECKS -fimplicit-templates -c $<
+
+# Tell versions [3.59,3.63) of GNU make to not export all variables.
+# Otherwise a system limit (for SysV at least) may be exceeded.
+.NOEXPORT:
diff --git a/contrib/libstdc++/src/bitset.cc b/contrib/libstdc++/src/bitset.cc
new file mode 100644
index 0000000..244f308
--- /dev/null
+++ b/contrib/libstdc++/src/bitset.cc
@@ -0,0 +1,219 @@
+// Bitset definitions -*- C++ -*-
+
+// Copyright (C) 2001, 2002 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */ 
+
+#include 
+
+//
+// Definitions of non-inline functions from the single-word version of
+//  _Base_bitset.
+//
+
+std::size_t
+std::_Base_bitset<1>::_M_do_find_first(std::size_t __not_found) const
+{
+  _WordT __thisword = _M_w;
+
+  if ( __thisword != static_cast<_WordT>(0) ) {
+    // find byte within word
+    for (std::size_t __j = 0; __j < sizeof(_WordT); __j++ ) {
+      unsigned char __this_byte
+        = static_cast(__thisword & (~(unsigned char)0));
+      if ( __this_byte )
+        return __j * CHAR_BIT + _S_first_one[__this_byte];
+
+      __thisword >>= CHAR_BIT;
+    }
+  }
+  // not found, so return a value that indicates failure.
+  return __not_found;
+}
+
+std::size_t
+std::_Base_bitset<1>::_M_do_find_next(std::size_t __prev, 
+				      std::size_t __not_found) const
+{
+  // make bound inclusive
+  ++__prev;
+
+  // check out of bounds
+  if ( __prev >= _GLIBCPP_BITSET_BITS_PER_WORD )
+    return __not_found;
+
+    // search first (and only) word
+  _WordT __thisword = _M_w;
+
+  // mask off bits below bound
+  __thisword &= (~static_cast<_WordT>(0)) << _S_whichbit(__prev);
+
+  if ( __thisword != static_cast<_WordT>(0) ) {
+    // find byte within word
+    // get first byte into place
+    __thisword >>= _S_whichbyte(__prev) * CHAR_BIT;
+    for ( std::size_t __j = _S_whichbyte(__prev); __j < sizeof(_WordT); __j++ ) {
+      unsigned char __this_byte
+        = static_cast(__thisword & (~(unsigned char)0));
+      if ( __this_byte )
+        return __j * CHAR_BIT + _S_first_one[__this_byte];
+
+      __thisword >>= CHAR_BIT;
+    }
+  }
+
+  // not found, so return a value that indicates failure.
+  return __not_found;
+} // end _M_do_find_next
+
+
+// Lookup tables for find and count operations.
+unsigned char std::_S_bit_count[256] = 
+{
+  0, /*   0 */ 1, /*   1 */ 1, /*   2 */ 2, /*   3 */ 1, /*   4 */
+  2, /*   5 */ 2, /*   6 */ 3, /*   7 */ 1, /*   8 */ 2, /*   9 */
+  2, /*  10 */ 3, /*  11 */ 2, /*  12 */ 3, /*  13 */ 3, /*  14 */
+  4, /*  15 */ 1, /*  16 */ 2, /*  17 */ 2, /*  18 */ 3, /*  19 */
+  2, /*  20 */ 3, /*  21 */ 3, /*  22 */ 4, /*  23 */ 2, /*  24 */
+  3, /*  25 */ 3, /*  26 */ 4, /*  27 */ 3, /*  28 */ 4, /*  29 */
+  4, /*  30 */ 5, /*  31 */ 1, /*  32 */ 2, /*  33 */ 2, /*  34 */
+  3, /*  35 */ 2, /*  36 */ 3, /*  37 */ 3, /*  38 */ 4, /*  39 */
+  2, /*  40 */ 3, /*  41 */ 3, /*  42 */ 4, /*  43 */ 3, /*  44 */
+  4, /*  45 */ 4, /*  46 */ 5, /*  47 */ 2, /*  48 */ 3, /*  49 */
+  3, /*  50 */ 4, /*  51 */ 3, /*  52 */ 4, /*  53 */ 4, /*  54 */
+  5, /*  55 */ 3, /*  56 */ 4, /*  57 */ 4, /*  58 */ 5, /*  59 */
+  4, /*  60 */ 5, /*  61 */ 5, /*  62 */ 6, /*  63 */ 1, /*  64 */
+  2, /*  65 */ 2, /*  66 */ 3, /*  67 */ 2, /*  68 */ 3, /*  69 */
+  3, /*  70 */ 4, /*  71 */ 2, /*  72 */ 3, /*  73 */ 3, /*  74 */
+  4, /*  75 */ 3, /*  76 */ 4, /*  77 */ 4, /*  78 */ 5, /*  79 */
+  2, /*  80 */ 3, /*  81 */ 3, /*  82 */ 4, /*  83 */ 3, /*  84 */
+  4, /*  85 */ 4, /*  86 */ 5, /*  87 */ 3, /*  88 */ 4, /*  89 */
+  4, /*  90 */ 5, /*  91 */ 4, /*  92 */ 5, /*  93 */ 5, /*  94 */
+  6, /*  95 */ 2, /*  96 */ 3, /*  97 */ 3, /*  98 */ 4, /*  99 */
+  3, /* 100 */ 4, /* 101 */ 4, /* 102 */ 5, /* 103 */ 3, /* 104 */
+  4, /* 105 */ 4, /* 106 */ 5, /* 107 */ 4, /* 108 */ 5, /* 109 */
+  5, /* 110 */ 6, /* 111 */ 3, /* 112 */ 4, /* 113 */ 4, /* 114 */
+  5, /* 115 */ 4, /* 116 */ 5, /* 117 */ 5, /* 118 */ 6, /* 119 */
+  4, /* 120 */ 5, /* 121 */ 5, /* 122 */ 6, /* 123 */ 5, /* 124 */
+  6, /* 125 */ 6, /* 126 */ 7, /* 127 */ 1, /* 128 */ 2, /* 129 */
+  2, /* 130 */ 3, /* 131 */ 2, /* 132 */ 3, /* 133 */ 3, /* 134 */
+  4, /* 135 */ 2, /* 136 */ 3, /* 137 */ 3, /* 138 */ 4, /* 139 */
+  3, /* 140 */ 4, /* 141 */ 4, /* 142 */ 5, /* 143 */ 2, /* 144 */
+  3, /* 145 */ 3, /* 146 */ 4, /* 147 */ 3, /* 148 */ 4, /* 149 */
+  4, /* 150 */ 5, /* 151 */ 3, /* 152 */ 4, /* 153 */ 4, /* 154 */
+  5, /* 155 */ 4, /* 156 */ 5, /* 157 */ 5, /* 158 */ 6, /* 159 */
+  2, /* 160 */ 3, /* 161 */ 3, /* 162 */ 4, /* 163 */ 3, /* 164 */
+  4, /* 165 */ 4, /* 166 */ 5, /* 167 */ 3, /* 168 */ 4, /* 169 */
+  4, /* 170 */ 5, /* 171 */ 4, /* 172 */ 5, /* 173 */ 5, /* 174 */
+  6, /* 175 */ 3, /* 176 */ 4, /* 177 */ 4, /* 178 */ 5, /* 179 */
+  4, /* 180 */ 5, /* 181 */ 5, /* 182 */ 6, /* 183 */ 4, /* 184 */
+  5, /* 185 */ 5, /* 186 */ 6, /* 187 */ 5, /* 188 */ 6, /* 189 */
+  6, /* 190 */ 7, /* 191 */ 2, /* 192 */ 3, /* 193 */ 3, /* 194 */
+  4, /* 195 */ 3, /* 196 */ 4, /* 197 */ 4, /* 198 */ 5, /* 199 */
+  3, /* 200 */ 4, /* 201 */ 4, /* 202 */ 5, /* 203 */ 4, /* 204 */
+  5, /* 205 */ 5, /* 206 */ 6, /* 207 */ 3, /* 208 */ 4, /* 209 */
+  4, /* 210 */ 5, /* 211 */ 4, /* 212 */ 5, /* 213 */ 5, /* 214 */
+  6, /* 215 */ 4, /* 216 */ 5, /* 217 */ 5, /* 218 */ 6, /* 219 */
+  5, /* 220 */ 6, /* 221 */ 6, /* 222 */ 7, /* 223 */ 3, /* 224 */
+  4, /* 225 */ 4, /* 226 */ 5, /* 227 */ 4, /* 228 */ 5, /* 229 */
+  5, /* 230 */ 6, /* 231 */ 4, /* 232 */ 5, /* 233 */ 5, /* 234 */
+  6, /* 235 */ 5, /* 236 */ 6, /* 237 */ 6, /* 238 */ 7, /* 239 */
+  4, /* 240 */ 5, /* 241 */ 5, /* 242 */ 6, /* 243 */ 5, /* 244 */
+  6, /* 245 */ 6, /* 246 */ 7, /* 247 */ 5, /* 248 */ 6, /* 249 */
+  6, /* 250 */ 7, /* 251 */ 6, /* 252 */ 7, /* 253 */ 7, /* 254 */
+  8  /* 255 */
+}; // end _S_bit_count
+
+unsigned char std::_S_first_one[256] = 
+{
+  0, /*   0 */ 0, /*   1 */ 1, /*   2 */ 0, /*   3 */ 2, /*   4 */
+  0, /*   5 */ 1, /*   6 */ 0, /*   7 */ 3, /*   8 */ 0, /*   9 */
+  1, /*  10 */ 0, /*  11 */ 2, /*  12 */ 0, /*  13 */ 1, /*  14 */
+  0, /*  15 */ 4, /*  16 */ 0, /*  17 */ 1, /*  18 */ 0, /*  19 */
+  2, /*  20 */ 0, /*  21 */ 1, /*  22 */ 0, /*  23 */ 3, /*  24 */
+  0, /*  25 */ 1, /*  26 */ 0, /*  27 */ 2, /*  28 */ 0, /*  29 */
+  1, /*  30 */ 0, /*  31 */ 5, /*  32 */ 0, /*  33 */ 1, /*  34 */
+  0, /*  35 */ 2, /*  36 */ 0, /*  37 */ 1, /*  38 */ 0, /*  39 */
+  3, /*  40 */ 0, /*  41 */ 1, /*  42 */ 0, /*  43 */ 2, /*  44 */
+  0, /*  45 */ 1, /*  46 */ 0, /*  47 */ 4, /*  48 */ 0, /*  49 */
+  1, /*  50 */ 0, /*  51 */ 2, /*  52 */ 0, /*  53 */ 1, /*  54 */
+  0, /*  55 */ 3, /*  56 */ 0, /*  57 */ 1, /*  58 */ 0, /*  59 */
+  2, /*  60 */ 0, /*  61 */ 1, /*  62 */ 0, /*  63 */ 6, /*  64 */
+  0, /*  65 */ 1, /*  66 */ 0, /*  67 */ 2, /*  68 */ 0, /*  69 */
+  1, /*  70 */ 0, /*  71 */ 3, /*  72 */ 0, /*  73 */ 1, /*  74 */
+  0, /*  75 */ 2, /*  76 */ 0, /*  77 */ 1, /*  78 */ 0, /*  79 */
+  4, /*  80 */ 0, /*  81 */ 1, /*  82 */ 0, /*  83 */ 2, /*  84 */
+  0, /*  85 */ 1, /*  86 */ 0, /*  87 */ 3, /*  88 */ 0, /*  89 */
+  1, /*  90 */ 0, /*  91 */ 2, /*  92 */ 0, /*  93 */ 1, /*  94 */
+  0, /*  95 */ 5, /*  96 */ 0, /*  97 */ 1, /*  98 */ 0, /*  99 */
+  2, /* 100 */ 0, /* 101 */ 1, /* 102 */ 0, /* 103 */ 3, /* 104 */
+  0, /* 105 */ 1, /* 106 */ 0, /* 107 */ 2, /* 108 */ 0, /* 109 */
+  1, /* 110 */ 0, /* 111 */ 4, /* 112 */ 0, /* 113 */ 1, /* 114 */
+  0, /* 115 */ 2, /* 116 */ 0, /* 117 */ 1, /* 118 */ 0, /* 119 */
+  3, /* 120 */ 0, /* 121 */ 1, /* 122 */ 0, /* 123 */ 2, /* 124 */
+  0, /* 125 */ 1, /* 126 */ 0, /* 127 */ 7, /* 128 */ 0, /* 129 */
+  1, /* 130 */ 0, /* 131 */ 2, /* 132 */ 0, /* 133 */ 1, /* 134 */
+  0, /* 135 */ 3, /* 136 */ 0, /* 137 */ 1, /* 138 */ 0, /* 139 */
+  2, /* 140 */ 0, /* 141 */ 1, /* 142 */ 0, /* 143 */ 4, /* 144 */
+  0, /* 145 */ 1, /* 146 */ 0, /* 147 */ 2, /* 148 */ 0, /* 149 */
+  1, /* 150 */ 0, /* 151 */ 3, /* 152 */ 0, /* 153 */ 1, /* 154 */
+  0, /* 155 */ 2, /* 156 */ 0, /* 157 */ 1, /* 158 */ 0, /* 159 */
+  5, /* 160 */ 0, /* 161 */ 1, /* 162 */ 0, /* 163 */ 2, /* 164 */
+  0, /* 165 */ 1, /* 166 */ 0, /* 167 */ 3, /* 168 */ 0, /* 169 */
+  1, /* 170 */ 0, /* 171 */ 2, /* 172 */ 0, /* 173 */ 1, /* 174 */
+  0, /* 175 */ 4, /* 176 */ 0, /* 177 */ 1, /* 178 */ 0, /* 179 */
+  2, /* 180 */ 0, /* 181 */ 1, /* 182 */ 0, /* 183 */ 3, /* 184 */
+  0, /* 185 */ 1, /* 186 */ 0, /* 187 */ 2, /* 188 */ 0, /* 189 */
+  1, /* 190 */ 0, /* 191 */ 6, /* 192 */ 0, /* 193 */ 1, /* 194 */
+  0, /* 195 */ 2, /* 196 */ 0, /* 197 */ 1, /* 198 */ 0, /* 199 */
+  3, /* 200 */ 0, /* 201 */ 1, /* 202 */ 0, /* 203 */ 2, /* 204 */
+  0, /* 205 */ 1, /* 206 */ 0, /* 207 */ 4, /* 208 */ 0, /* 209 */
+  1, /* 210 */ 0, /* 211 */ 2, /* 212 */ 0, /* 213 */ 1, /* 214 */
+  0, /* 215 */ 3, /* 216 */ 0, /* 217 */ 1, /* 218 */ 0, /* 219 */
+  2, /* 220 */ 0, /* 221 */ 1, /* 222 */ 0, /* 223 */ 5, /* 224 */
+  0, /* 225 */ 1, /* 226 */ 0, /* 227 */ 2, /* 228 */ 0, /* 229 */
+  1, /* 230 */ 0, /* 231 */ 3, /* 232 */ 0, /* 233 */ 1, /* 234 */
+  0, /* 235 */ 2, /* 236 */ 0, /* 237 */ 1, /* 238 */ 0, /* 239 */
+  4, /* 240 */ 0, /* 241 */ 1, /* 242 */ 0, /* 243 */ 2, /* 244 */
+  0, /* 245 */ 1, /* 246 */ 0, /* 247 */ 3, /* 248 */ 0, /* 249 */
+  1, /* 250 */ 0, /* 251 */ 2, /* 252 */ 0, /* 253 */ 1, /* 254 */
+  0, /* 255 */
+}; // end _S_first_one
+
diff --git a/contrib/libstdc++/src/cmath.cc b/contrib/libstdc++/src/cmath.cc
new file mode 100644
index 0000000..7a7433a
--- /dev/null
+++ b/contrib/libstdc++/src/cmath.cc
@@ -0,0 +1,47 @@
+// Explicit instantiation file for -*- C++ -*- math library.
+
+// Copyright (C) 2001 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.
+
+
+// These are explicit instantiations of the behind-the-scenes internal
+// helper functions used in the math routines of libstdc++.
+
+
+#include 
+
+namespace std
+{
+    // This function is only declared/used in the cheaders=c_std case.
+    template float
+      __cmath_power(float, unsigned int);
+    template double
+      __cmath_power(double, unsigned int);
+    template long double
+      __cmath_power(long double, unsigned int);
+  
+} // namespace std
diff --git a/contrib/libstdc++/src/codecvt.cc b/contrib/libstdc++/src/codecvt.cc
new file mode 100644
index 0000000..032667e
--- /dev/null
+++ b/contrib/libstdc++/src/codecvt.cc
@@ -0,0 +1,202 @@
+// Copyright (C) 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
+// 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.
+
+// Written by Benjamin Kosnik 
+
+#include 
+
+namespace std 
+{
+#ifdef _GLIBCPP_USE___ENC_TRAITS
+  // Definitions for static const data members of __enc_traits.
+  const int __enc_traits::_S_max_size;
+#endif 
+
+  codecvt::
+  codecvt(size_t __refs)
+  : __codecvt_abstract_base(__refs)
+  { }
+
+  codecvt::
+  ~codecvt() { }
+  
+  codecvt_base::result
+  codecvt::
+  do_out(state_type&, const intern_type* __from, 
+	 const intern_type* __from_end, const intern_type*& __from_next,
+	 extern_type* __to, extern_type* __to_end, 
+	 extern_type*& __to_next) const
+  { 
+    size_t __len = min(__from_end - __from, __to_end - __to);
+    memcpy(__to, __from, __len);
+    __from_next = __from; 
+    __to_next = __to;
+    return noconv;  
+  }
+  
+  codecvt_base::result
+  codecvt::
+  do_unshift(state_type&, extern_type* __to,
+             extern_type*, extern_type*& __to_next) const
+  { 
+    __to_next = __to; 
+    return noconv; 
+  }
+  
+  codecvt_base::result
+  codecvt::
+  do_in(state_type&, const extern_type* __from, 
+	const extern_type* __from_end, const extern_type*& __from_next,
+	intern_type* __to, intern_type* __to_end, 
+	intern_type*& __to_next) const
+  { 
+    size_t __len = min(__from_end - __from, __to_end - __to);
+    memcpy(__to, __from, __len);
+    __from_next = __from; 
+    __to_next = __to;
+    return noconv;  
+  }
+
+  int 
+  codecvt::
+  do_encoding() const throw() 
+  { return 1; }
+  
+  bool 
+  codecvt::
+  do_always_noconv() const throw() 
+  { return true; }
+  
+  int 
+  codecvt::
+  do_length (const state_type&, const extern_type* __from,
+	     const extern_type* __end, size_t __max) const
+  { return min(__max, static_cast(__end - __from)); }
+  
+  int 
+  codecvt::
+  do_max_length() const throw() 
+  { return 1; }
+  
+#ifdef _GLIBCPP_USE_WCHAR_T
+  // codecvt required specialization
+  codecvt::
+  codecvt(size_t __refs)
+  : __codecvt_abstract_base(__refs) { }
+
+  codecvt::
+  ~codecvt() { }
+  
+  codecvt_base::result
+  codecvt::
+  do_out(state_type& __state, const intern_type* __from, 
+	 const intern_type* __from_end, const intern_type*& __from_next,
+	 extern_type* __to, extern_type* __to_end,
+	 extern_type*& __to_next) const
+  {
+    result __ret = error;
+    size_t __len = min(__from_end - __from, __to_end - __to);
+    size_t __conv = wcsrtombs(__to, &__from, __len, &__state);
+
+    if (__conv == __len)
+      {
+	__from_next = __from;
+	__to_next = __to + __conv;
+	__ret = ok;
+      }
+    else if (__conv > 0 && __conv < __len)
+      {
+	__from_next = __from;
+	__to_next = __to + __conv;
+	__ret = partial;
+      }
+    else
+      __ret = error;
+	
+    return __ret; 
+  }
+  
+  codecvt_base::result
+  codecvt::
+  do_unshift(state_type&, extern_type* __to,
+	     extern_type*, extern_type*& __to_next) const
+  {
+    __to_next = __to;
+    return noconv;
+  }
+  
+  codecvt_base::result
+  codecvt::
+  do_in(state_type& __state, const extern_type* __from, 
+	const extern_type* __from_end, const extern_type*& __from_next,
+	intern_type* __to, intern_type* __to_end,
+	intern_type*& __to_next) const
+  {
+    result __ret = error;
+    size_t __len = min(__from_end - __from, __to_end - __to);
+    size_t __conv = mbsrtowcs(__to, &__from, __len, &__state);
+
+    if (__conv == __len)
+      {
+	__from_next = __from;
+	__to_next = __to + __conv;
+	__ret = ok;
+      }
+    else if (__conv > 0 && __conv < __len)
+      {
+	__from_next = __from;
+	__to_next = __to + __conv;
+	__ret = partial;
+      }
+    else
+      __ret = error;
+	
+    return __ret; 
+  }
+  
+  int 
+  codecvt::
+  do_encoding() const throw()
+  { return sizeof(wchar_t); }
+  
+  bool 
+  codecvt::
+  do_always_noconv() const throw()
+  { return false; }
+  
+  int 
+  codecvt::
+  do_length(const state_type&, const extern_type* __from,
+	    const extern_type* __end, size_t __max) const
+  { return min(__max, static_cast(__end - __from)); }
+
+  int 
+  codecvt::
+  do_max_length() const throw()
+  { return 1; }
+#endif //  _GLIBCPP_USE_WCHAR_T
+} // namespace std
diff --git a/contrib/libstdc++/src/complex_io.cc b/contrib/libstdc++/src/complex_io.cc
new file mode 100644
index 0000000..a6d502f
--- /dev/null
+++ b/contrib/libstdc++/src/complex_io.cc
@@ -0,0 +1,93 @@
+// The template and inlines for the -*- C++ -*- complex number classes.
+
+// Copyright (C) 2000, 2001 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 
+
+namespace std
+{
+  template
+    basic_istream >&
+    operator>>(basic_istream >&, complex&);
+
+  template
+    basic_ostream >&
+    operator<<(basic_ostream >&, 
+	       const complex&);
+
+  template
+    basic_istream >&
+    operator>>(basic_istream >&, complex&);
+
+  template
+    basic_ostream >&
+    operator<<(basic_ostream >&, 
+	       const complex&);
+
+  template
+    basic_istream >&
+    operator>>(basic_istream >&, 
+	       complex&);
+
+  template
+    basic_ostream >&
+    operator<<(basic_ostream >&,
+               const complex&);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template
+    basic_istream >&
+    operator>>(basic_istream >&,
+               complex&);
+
+  template
+    basic_ostream >&
+    operator<<(basic_ostream >&,
+               const complex&);
+
+  template
+    basic_istream >&
+    operator>>(basic_istream >&,
+               complex&);
+
+  template
+    basic_ostream >&
+    operator<<(basic_ostream >&,
+               const complex&);
+
+  template
+    basic_istream >&
+    operator>>(basic_istream >&,
+               complex&);
+
+  template
+    basic_ostream >&
+    operator<<(basic_ostream >&,
+               const complex&);
+#endif //_GLIBCPP_USE_WCHAR_T
+} // namespace std
diff --git a/contrib/libstdc++/src/concept-inst.cc b/contrib/libstdc++/src/concept-inst.cc
new file mode 100644
index 0000000..01cc030
--- /dev/null
+++ b/contrib/libstdc++/src/concept-inst.cc
@@ -0,0 +1,112 @@
+// Concept checking instantiations -*- C++ -*-
+
+// Copyright (C) 2001, 2002 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+// The implementation of some of the more complex checks uses the simple
+// checks (good reuse of code), thereby requiring that the simple checks
+// be instantiated somewhere.  The simple checks use other simple checks,
+// and so on, until a couple hundred symbols all need instantiations.  We
+// explicitly instantiate the initial set of symbols; compiling this file
+// with -fimplicit-templates will take care of the rest for us.
+
+#include 
+
+#ifdef _GLIBCPP_CONCEPT_CHECKS
+
+#include 
+#include 
+
+#define _Instantiate(...) template void __function_requires< __VA_ARGS__ > ()
+
+namespace __gnu_cxx
+{
+  template void __aux_require_boolean_expr(bool const&);
+
+  _Instantiate(_ConvertibleConcept );
+
+  _Instantiate(_InputIteratorConcept );
+
+  _Instantiate(_InputIteratorConcept );
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  _Instantiate(_InputIteratorConcept );
+
+  _Instantiate(_InputIteratorConcept );
+
+  _Instantiate(_LessThanComparableConcept );
+#endif
+
+  _Instantiate(_LessThanComparableConcept );
+
+  _Instantiate(_LessThanComparableConcept );
+
+  _Instantiate(_LessThanComparableConcept );
+
+  _Instantiate(_LessThanComparableConcept );
+
+  _Instantiate(_LessThanComparableConcept );
+
+  _Instantiate(_OutputIteratorConcept >, char> );
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  _Instantiate(_OutputIteratorConcept >, wchar_t> );
+#endif
+
+  _Instantiate(_RandomAccessIteratorConcept );
+
+  _Instantiate(_RandomAccessIteratorConcept );
+
+  _Instantiate(_RandomAccessIteratorConcept<
+    __normal_iterator > );
+
+  _Instantiate(_RandomAccessIteratorConcept<
+    __normal_iterator > );
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  _Instantiate(_RandomAccessIteratorConcept<
+    __normal_iterator,
+                               std::allocator > > > );
+
+  _Instantiate(_RandomAccessIteratorConcept<
+    __normal_iterator,
+                               std::allocator > > > );
+
+  _Instantiate(_RandomAccessIteratorConcept );
+
+  _Instantiate(_RandomAccessIteratorConcept );
+#endif
+} // namespace __gnu_cxx
+
+#undef _Instantiate
+
+#endif
diff --git a/contrib/libstdc++/src/ext-inst.cc b/contrib/libstdc++/src/ext-inst.cc
new file mode 100644
index 0000000..21b98c8
--- /dev/null
+++ b/contrib/libstdc++/src/ext-inst.cc
@@ -0,0 +1,40 @@
+// Explicit instantiation file.
+
+// Copyright (C) 2001 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:
+//
+
+#include 
+
+namespace std
+{
+  template
+  const unsigned long __gnu_cxx::rope >::_S_min_len;
+} // namespace std
diff --git a/contrib/libstdc++/src/functexcept.cc b/contrib/libstdc++/src/functexcept.cc
new file mode 100644
index 0000000..dab6f2f
--- /dev/null
+++ b/contrib/libstdc++/src/functexcept.cc
@@ -0,0 +1,151 @@
+// 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
+// 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 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std 
+{
+#if __EXCEPTIONS
+  void
+  __throw_bad_exception(void)
+  { throw bad_exception(); }
+
+  void
+  __throw_bad_alloc(void)
+  { throw bad_alloc(); }
+
+  void
+  __throw_bad_cast(void)
+  { throw bad_cast(); }
+
+  void
+  __throw_bad_typeid(void)
+  { throw bad_typeid(); }
+
+  void
+  __throw_logic_error(const char* __s)
+  { throw logic_error(__s); }
+
+  void
+  __throw_domain_error(const char* __s)
+  { throw domain_error(__s); }
+
+  void
+  __throw_invalid_argument(const char* __s)
+  { throw invalid_argument(__s); }
+
+  void
+  __throw_length_error(const char* __s)
+  { throw length_error(__s); }
+
+  void
+  __throw_out_of_range(const char* __s)
+  { throw out_of_range(__s); }
+
+  void
+  __throw_runtime_error(const char* __s)
+  { throw runtime_error(__s); }
+
+  void
+  __throw_range_error(const char* __s)
+  { throw range_error(__s); }
+
+  void
+  __throw_overflow_error(const char* __s)
+  { throw overflow_error(__s); }
+
+  void
+  __throw_underflow_error(const char* __s)
+  { throw underflow_error(__s); }
+
+  void
+  __throw_ios_failure(const char* __s)
+  { throw ios_base::failure(__s); }
+#else
+  void
+  __throw_bad_exception(void)
+  { abort(); }
+
+  void
+  __throw_bad_alloc(void)
+  { abort(); }
+
+  void
+  __throw_bad_cast(void)
+  { abort(); }
+
+  void
+  __throw_bad_typeid(void)
+  { abort(); }
+
+  void
+  __throw_logic_error(const char*)
+  { abort(); }
+
+  void
+  __throw_domain_error(const char*)
+  { abort(); }
+
+  void
+  __throw_invalid_argument(const char*)
+  { abort(); }
+
+  void
+  __throw_length_error(const char*)
+  { abort(); }
+
+  void
+  __throw_out_of_range(const char*)
+  { abort(); }
+
+  void
+  __throw_runtime_error(const char*)
+  { abort(); }
+
+  void
+  __throw_range_error(const char*)
+  { abort(); }
+
+  void
+  __throw_overflow_error(const char*)
+  { abort(); }
+
+  void
+  __throw_underflow_error(const char*)
+  { abort(); }
+
+  void
+  __throw_ios_failure(const char*)
+  { abort(); }
+#endif //__EXCEPTIONS
+}
diff --git a/contrib/libstdc++/src/globals.cc b/contrib/libstdc++/src/globals.cc
new file mode 100644
index 0000000..36d193f
--- /dev/null
+++ b/contrib/libstdc++/src/globals.cc
@@ -0,0 +1,226 @@
+// 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
+// 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 "bits/c++config.h"
+#include "bits/gthr.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+
+// On AIX, and perhaps other systems, library initialization order is
+// not guaranteed.  For example, the static initializers for the main
+// program might run before the static initializers for this library.
+// That means that we cannot rely on static initialization in the
+// library; there is no guarantee that things will get initialized in
+// time.  This file contains definitions of all global variables that
+// require initialization as arrays of characters.
+
+// Because  declares the standard streams to be [io]stream
+// types instead of say [io]fstream types, it is also necessary to
+// allocate the actual file buffers in this file.
+namespace std 
+{
+  // Standard "C" locale.
+  typedef char fake_locale[sizeof(locale)]
+  __attribute__ ((aligned(__alignof__(locale))));
+  fake_locale c_locale;
+
+  typedef char fake_locale_Impl[sizeof(locale::_Impl)]
+  __attribute__ ((aligned(__alignof__(locale::_Impl))));
+  fake_locale_Impl c_locale_impl;
+  
+  typedef char fake_facet_vec[sizeof(locale::facet*)]
+  __attribute__ ((aligned(__alignof__(locale::facet*))));
+  fake_facet_vec facet_vec[_GLIBCPP_NUM_FACETS];
+
+  typedef char fake_ctype_c[sizeof(std::ctype)]
+  __attribute__ ((aligned(__alignof__(std::ctype))));
+  fake_ctype_c ctype_c;
+
+  typedef char fake_collate_c[sizeof(std::collate)]
+  __attribute__ ((aligned(__alignof__(std::collate))));
+  fake_collate_c collate_c;
+
+  typedef char fake_numpunct_c[sizeof(numpunct)]
+  __attribute__ ((aligned(__alignof__(numpunct))));
+  fake_numpunct_c numpunct_c;
+
+  typedef char fake_num_get_c[sizeof(num_get)]
+  __attribute__ ((aligned(__alignof__(num_get))));
+  fake_num_get_c num_get_c;
+
+  typedef char fake_num_put_c[sizeof(num_put)]
+  __attribute__ ((aligned(__alignof__(num_put))));
+  fake_num_put_c num_put_c;
+
+  typedef char fake_codecvt_c[sizeof(codecvt)]
+  __attribute__ ((aligned(__alignof__(codecvt))));
+  fake_codecvt_c codecvt_c;
+
+  typedef char fake_moneypunct_c[sizeof(moneypunct)]
+  __attribute__ ((aligned(__alignof__(moneypunct))));
+  fake_moneypunct_c moneypunct_tc;
+  fake_moneypunct_c moneypunct_fc;
+
+  typedef char fake_money_get_c[sizeof(money_get)]
+  __attribute__ ((aligned(__alignof__(money_get))));
+  fake_money_get_c money_get_c;
+  
+  typedef char fake_money_put_c[sizeof(money_put)]
+  __attribute__ ((aligned(__alignof__(money_put))));
+  fake_money_put_c money_put_c;
+
+  typedef char fake_timepunct_c[sizeof(__timepunct)]
+  __attribute__ ((aligned(__alignof__(__timepunct))));
+  fake_timepunct_c timepunct_c;
+
+  typedef char fake_time_get_c[sizeof(time_get)]
+  __attribute__ ((aligned(__alignof__(time_get))));
+  fake_time_get_c time_get_c;
+
+  typedef char fake_time_put_c[sizeof(time_put)]
+  __attribute__ ((aligned(__alignof__(time_put))));
+  fake_time_put_c time_put_c;
+
+  typedef char fake_messages_c[sizeof(messages)]
+  __attribute__ ((aligned(__alignof__(messages))));
+  fake_messages_c messages_c;
+
+#ifdef  _GLIBCPP_USE_WCHAR_T
+  typedef char fake_wtype_w[sizeof(std::ctype)]
+  __attribute__ ((aligned(__alignof__(std::ctype))));
+  fake_wtype_w ctype_w;
+
+  typedef char fake_wollate_w[sizeof(std::collate)]
+  __attribute__ ((aligned(__alignof__(std::collate))));
+  fake_wollate_w collate_w;
+
+  typedef char fake_numpunct_w[sizeof(numpunct)]
+  __attribute__ ((aligned(__alignof__(numpunct))));
+  fake_numpunct_w numpunct_w;
+
+  typedef char fake_num_get_w[sizeof(num_get)]
+  __attribute__ ((aligned(__alignof__(num_get))));
+  fake_num_get_w num_get_w;
+
+  typedef char fake_num_put_w[sizeof(num_put)]
+  __attribute__ ((aligned(__alignof__(num_put))));
+  fake_num_put_w num_put_w;
+
+  typedef char fake_wodecvt_w[sizeof(codecvt)]
+  __attribute__ ((aligned(__alignof__(codecvt))));
+  fake_wodecvt_w codecvt_w;
+
+  typedef char fake_moneypunct_w[sizeof(moneypunct)]
+  __attribute__ ((aligned(__alignof__(moneypunct))));
+  fake_moneypunct_w moneypunct_tw;
+  fake_moneypunct_w moneypunct_fw;
+
+  typedef char fake_money_get_w[sizeof(money_get)]
+  __attribute__ ((aligned(__alignof__(money_get))));
+  fake_money_get_w money_get_w;
+  
+  typedef char fake_money_put_w[sizeof(money_put)]
+  __attribute__ ((aligned(__alignof__(money_put))));
+  fake_money_put_w money_put_w;
+
+  typedef char fake_timepunct_w[sizeof(__timepunct)]
+  __attribute__ ((aligned(__alignof__(__timepunct))));
+  fake_timepunct_w timepunct_w;
+
+  typedef char fake_time_get_w[sizeof(time_get)]
+  __attribute__ ((aligned(__alignof__(time_get))));
+  fake_time_get_w time_get_w;
+
+  typedef char fake_time_put_w[sizeof(time_put)]
+  __attribute__ ((aligned(__alignof__(time_put))));
+  fake_time_put_w time_put_w;
+
+  typedef char fake_messages_w[sizeof(messages)]
+  __attribute__ ((aligned(__alignof__(messages))));
+  fake_messages_w messages_w;
+#endif
+
+  // Standard stream objects.
+  typedef char fake_istream[sizeof(istream)]
+  __attribute__ ((aligned(__alignof__(istream))));
+  typedef char fake_ostream[sizeof(ostream)] 
+  __attribute__ ((aligned(__alignof__(ostream))));
+  fake_istream cin;
+  fake_ostream cout;
+  fake_ostream cerr;
+  fake_ostream clog;
+
+  typedef char fake_filebuf[sizeof(__gnu_cxx::stdio_filebuf)]
+  __attribute__ ((aligned(__alignof__(__gnu_cxx::stdio_filebuf))));
+  fake_filebuf buf_cout;
+  fake_filebuf buf_cin;
+  fake_filebuf buf_cerr;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  typedef char fake_wistream[sizeof(wistream)] 
+  __attribute__ ((aligned(__alignof__(wistream))));
+  typedef char fake_wostream[sizeof(wostream)] 
+  __attribute__ ((aligned(__alignof__(wostream))));
+  fake_wistream wcin;
+  fake_wostream wcout;
+  fake_wostream wcerr;
+  fake_wostream wclog;
+
+  typedef char fake_wfilebuf[sizeof(__gnu_cxx::stdio_filebuf)]
+  __attribute__ ((aligned(__alignof__(__gnu_cxx::stdio_filebuf))));
+  fake_wfilebuf buf_wcout;
+  fake_wfilebuf buf_wcin;
+  fake_wfilebuf buf_wcerr;
+#endif
+
+
+  // Globals for once-only runtime initialization of mutex objects.  This
+  // allows static initialization of these objects on systems that need a
+  // function call to initialize a mutex.  For example, see stl_threads.h.
+#ifdef __GTHREAD_MUTEX_INIT
+  // Need to provide explicit instantiations of static data for
+  // systems with broken weak linkage support.
+  template __gthread_mutex_t _Swap_lock_struct<0>::_S_swap_lock;
+#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+  __gthread_once_t _GLIBCPP_once = __GTHREAD_ONCE_INIT;
+  __gthread_mutex_t _GLIBCPP_mutex;
+  __gthread_mutex_t *_GLIBCPP_mutex_address;
+  
+  // Once-only initializer function for _GLIBCPP_mutex.  
+  void
+  _GLIBCPP_mutex_init ()
+  { __GTHREAD_MUTEX_INIT_FUNCTION (&_GLIBCPP_mutex); }
+
+  // Once-only initializer function for _GLIBCPP_mutex_address.  
+  void
+  _GLIBCPP_mutex_address_init ()
+  { __GTHREAD_MUTEX_INIT_FUNCTION (_GLIBCPP_mutex_address); }
+#endif
+}
diff --git a/contrib/libstdc++/src/ios.cc b/contrib/libstdc++/src/ios.cc
new file mode 100644
index 0000000..c1167f8
--- /dev/null
+++ b/contrib/libstdc++/src/ios.cc
@@ -0,0 +1,359 @@
+// Iostreams base classes -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 27.4  Iostreams base classes
+//
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std 
+{
+  // Extern declarations for global objects in src/globals.cc.
+  extern istream cin;
+  extern ostream cout;
+  extern ostream cerr;
+  extern ostream clog;
+
+  using __gnu_cxx::stdio_filebuf;
+  extern stdio_filebuf buf_cout;
+  extern stdio_filebuf buf_cin;
+  extern stdio_filebuf buf_cerr;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  extern wistream wcin;
+  extern wostream wcout;
+  extern wostream wcerr;
+  extern wostream wclog;
+
+  extern stdio_filebuf buf_wcout;
+  extern stdio_filebuf buf_wcin;
+  extern stdio_filebuf buf_wcerr;
+#endif
+
+  // Definitions for static const data members of __ios_flags.
+  const __ios_flags::__int_type __ios_flags::_S_boolalpha;
+  const __ios_flags::__int_type __ios_flags::_S_dec;
+  const __ios_flags::__int_type __ios_flags::_S_fixed;
+  const __ios_flags::__int_type __ios_flags::_S_hex;
+  const __ios_flags::__int_type __ios_flags::_S_internal;
+  const __ios_flags::__int_type __ios_flags::_S_left;
+  const __ios_flags::__int_type __ios_flags::_S_oct;
+  const __ios_flags::__int_type __ios_flags::_S_right;
+  const __ios_flags::__int_type __ios_flags::_S_scientific;
+  const __ios_flags::__int_type __ios_flags::_S_showbase;
+  const __ios_flags::__int_type __ios_flags::_S_showpoint;
+  const __ios_flags::__int_type __ios_flags::_S_showpos;
+  const __ios_flags::__int_type __ios_flags::_S_skipws;
+  const __ios_flags::__int_type __ios_flags::_S_unitbuf;
+  const __ios_flags::__int_type __ios_flags::_S_uppercase;
+  const __ios_flags::__int_type __ios_flags::_S_adjustfield;
+  const __ios_flags::__int_type __ios_flags::_S_basefield;
+  const __ios_flags::__int_type __ios_flags::_S_floatfield;
+
+  const __ios_flags::__int_type __ios_flags::_S_badbit;
+  const __ios_flags::__int_type __ios_flags::_S_eofbit;
+  const __ios_flags::__int_type __ios_flags::_S_failbit;
+
+  const __ios_flags::__int_type __ios_flags::_S_app;
+  const __ios_flags::__int_type __ios_flags::_S_ate;
+  const __ios_flags::__int_type __ios_flags::_S_bin;
+  const __ios_flags::__int_type __ios_flags::_S_in;
+  const __ios_flags::__int_type __ios_flags::_S_out;
+  const __ios_flags::__int_type __ios_flags::_S_trunc;
+
+  // Definitions for static const members of ios_base.
+  const ios_base::fmtflags ios_base::boolalpha;
+  const ios_base::fmtflags ios_base::dec;
+  const ios_base::fmtflags ios_base::fixed;
+  const ios_base::fmtflags ios_base::hex;
+  const ios_base::fmtflags ios_base::internal;
+  const ios_base::fmtflags ios_base::left;
+  const ios_base::fmtflags ios_base::oct;
+  const ios_base::fmtflags ios_base::right;
+  const ios_base::fmtflags ios_base::scientific;
+  const ios_base::fmtflags ios_base::showbase;
+  const ios_base::fmtflags ios_base::showpoint;
+  const ios_base::fmtflags ios_base::showpos;
+  const ios_base::fmtflags ios_base::skipws;
+  const ios_base::fmtflags ios_base::unitbuf;
+  const ios_base::fmtflags ios_base::uppercase;
+  const ios_base::fmtflags ios_base::adjustfield;
+  const ios_base::fmtflags ios_base::basefield;
+  const ios_base::fmtflags ios_base::floatfield;
+
+  const ios_base::iostate ios_base::badbit;
+  const ios_base::iostate ios_base::eofbit;
+  const ios_base::iostate ios_base::failbit;
+  const ios_base::iostate ios_base::goodbit;
+
+  const ios_base::openmode ios_base::app;
+  const ios_base::openmode ios_base::ate;
+  const ios_base::openmode ios_base::binary;
+  const ios_base::openmode ios_base::in;
+  const ios_base::openmode ios_base::out;
+  const ios_base::openmode ios_base::trunc;
+
+  const ios_base::seekdir ios_base::beg;
+  const ios_base::seekdir ios_base::cur;
+  const ios_base::seekdir ios_base::end;
+
+  const int ios_base::_S_local_word_size;
+  int ios_base::Init::_S_ios_base_init = 0;
+  bool ios_base::Init::_S_synced_with_stdio = true;
+
+  ios_base::failure::failure(const string& __str) throw()
+  {
+    strncpy(_M_name, __str.c_str(), _M_bufsize);
+    _M_name[_M_bufsize - 1] = '\0';
+  }
+
+  ios_base::failure::~failure() throw()
+  { }
+
+  const char*
+  ios_base::failure::what() const throw()
+  { return _M_name; }
+
+  void
+  ios_base::Init::_S_ios_create(bool __sync)
+  {
+    int __out_size = __sync ? 0 : static_cast(BUFSIZ);
+    int __in_size = __sync ? 1 : static_cast(BUFSIZ);
+
+    // NB: The file globals.cc creates the four standard files
+    // with NULL buffers. At this point, we swap out the dummy NULL
+    // [io]stream objects and buffers with the real deal.
+    new (&buf_cout) stdio_filebuf(stdout, ios_base::out, __out_size);
+    new (&buf_cin) stdio_filebuf(stdin, ios_base::in, __in_size);
+    new (&buf_cerr) stdio_filebuf(stderr, ios_base::out, __out_size);
+    new (&cout) ostream(&buf_cout);
+    new (&cin) istream(&buf_cin);
+    new (&cerr) ostream(&buf_cerr);
+    new (&clog) ostream(&buf_cerr);
+    cin.tie(&cout);
+    cerr.flags(ios_base::unitbuf);
+    
+#ifdef _GLIBCPP_USE_WCHAR_T
+    new (&buf_wcout) stdio_filebuf(stdout, ios_base::out, __out_size);
+    new (&buf_wcin) stdio_filebuf(stdin, ios_base::in, __in_size);
+    new (&buf_wcerr) stdio_filebuf(stderr, ios_base::out, __out_size);
+    new (&wcout) wostream(&buf_wcout);
+    new (&wcin) wistream(&buf_wcin);
+    new (&wcerr) wostream(&buf_wcerr);
+    new (&wclog) wostream(&buf_wcerr);
+    wcin.tie(&wcout);
+    wcerr.flags(ios_base::unitbuf);
+#endif
+  }
+
+  void
+  ios_base::Init::_S_ios_destroy()
+  {
+    // Explicitly call dtors to free any memory that is dynamically
+    // allocated by filebuf ctor or member functions, but don't
+    // deallocate all memory by calling operator delete.
+    buf_cout.~stdio_filebuf();
+    buf_cin.~stdio_filebuf();
+    buf_cerr.~stdio_filebuf();
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+    buf_wcout.~stdio_filebuf();
+    buf_wcin.~stdio_filebuf();
+    buf_wcerr.~stdio_filebuf();
+#endif
+  }
+
+  ios_base::Init::Init()
+  {
+    if (_S_ios_base_init == 0)
+      {
+	// Standard streams default to synced with "C" operations.
+	ios_base::Init::_S_synced_with_stdio = true;
+	_S_ios_create(ios_base::Init::_S_synced_with_stdio);
+      }
+    ++_S_ios_base_init;
+  }
+
+  ios_base::Init::~Init()
+  {
+    if (--_S_ios_base_init == 0)
+      _S_ios_destroy();
+  } 
+
+  // 27.4.2.5  ios_base storage functions
+  int 
+  ios_base::xalloc() throw()
+  {
+    // Implementation note: Initialize top to zero to ensure that
+    // initialization occurs before main() is started.
+    static _Atomic_word _S_top = 0; 
+    return __exchange_and_add(&_S_top, 1) + 4;
+  }
+
+  // 27.4.2.5  iword/pword storage
+  ios_base::_Words&
+  ios_base::_M_grow_words(int ix)
+  {
+    // Precondition: _M_word_size <= ix
+    int newsize = _S_local_word_size;
+    _Words* words = _M_local_word;
+    if (ix > _S_local_word_size - 1)
+      {
+	if (ix < numeric_limits::max())
+	  {
+	    newsize = ix + 1;
+	    try
+	      { words = new _Words[newsize]; }
+	    catch (...)
+	      {
+		delete [] _M_word;
+		_M_word = 0;
+		_M_streambuf_state |= badbit;
+		if (_M_streambuf_state & _M_exception)
+		  __throw_ios_failure("ios_base::_M_grow_words failure");
+		return _M_word_zero;
+	      }
+	    for (int i = 0; i < _M_word_size; i++) 
+	      words[i] = _M_word[i];
+	    if (_M_word && _M_word != _M_local_word) 
+	      {
+		delete [] _M_word;
+		_M_word = 0;
+	      }
+	  }
+	else
+	  {
+	    _M_streambuf_state |= badbit;
+	    return _M_word_zero;
+	  }
+      }
+    _M_word = words;
+    _M_word_size = newsize;
+    return _M_word[ix];
+  }
+  
+  // Called only by basic_ios<>::init.
+  void 
+  ios_base::_M_init()   
+  {
+    // NB: May be called more than once
+    _M_precision = 6;
+    _M_width = 0;
+    _M_flags = skipws | dec;
+    _M_callbacks = 0;
+    _M_word_size = 0;
+    _M_ios_locale = locale();
+  }  
+  
+  // 27.4.2.3  ios_base locale functions
+  locale
+  ios_base::imbue(const locale& __loc)
+  {
+    locale __old = _M_ios_locale;
+    _M_ios_locale = __loc;
+    _M_call_callbacks(imbue_event);
+    return __old;
+  }
+
+  ios_base::ios_base() : _M_callbacks(0), _M_word(0)
+  {
+    // Do nothing: basic_ios::init() does it.  
+    // NB: _M_callbacks and _M_word must be zero for non-initialized
+    // ios_base to go through ~ios_base gracefully.
+  }
+  
+  // 27.4.2.7  ios_base constructors/destructors
+  ios_base::~ios_base()
+  {
+    _M_call_callbacks(erase_event);
+    _M_dispose_callbacks();
+    if (_M_word && _M_word != _M_local_word) 
+      {
+	delete [] _M_word;
+	_M_word = 0;
+      }
+  }
+
+  void 
+  ios_base::register_callback(event_callback __fn, int __index)
+  { _M_callbacks = new _Callback_list(__fn, __index, _M_callbacks); }
+
+  void 
+  ios_base::_M_call_callbacks(event __e) throw()
+  {
+    _Callback_list* __p = _M_callbacks;
+    while (__p)
+      {
+	try 
+	  { (*__p->_M_fn) (__e, *this, __p->_M_index); } 
+	catch (...) 
+	  { }
+	__p = __p->_M_next;
+      }
+  }
+
+  void 
+  ios_base::_M_dispose_callbacks(void)
+  {
+    _Callback_list* __p = _M_callbacks;
+    while (__p && __p->_M_remove_reference() == 0)
+      {
+	_Callback_list* __next = __p->_M_next;
+	delete __p;
+	__p = __next;
+      }
+    _M_callbacks = 0;
+  }
+
+  bool 
+  ios_base::sync_with_stdio(bool __sync)
+  { 
+#ifdef _GLIBCPP_RESOLVE_LIB_DEFECTS
+    // 49.  Underspecification of ios_base::sync_with_stdio
+    bool __ret = ios_base::Init::_S_synced_with_stdio;
+#endif
+
+    // Turn off sync with C FILE* for cin, cout, cerr, clog iff
+    // currently synchronized.
+    if (!__sync && __ret)
+      {
+	ios_base::Init::_S_synced_with_stdio = false;
+	ios_base::Init::_S_ios_destroy();
+	ios_base::Init::_S_ios_create(ios_base::Init::_S_synced_with_stdio);
+      }
+    return __ret; 
+  }
+}  // namespace std
diff --git a/contrib/libstdc++/src/limits.cc b/contrib/libstdc++/src/limits.cc
new file mode 100644
index 0000000..294673e
--- /dev/null
+++ b/contrib/libstdc++/src/limits.cc
@@ -0,0 +1,449 @@
+// Static data members of -*- C++ -*- numeric_limits classes
+
+// Copyright (C) 1999, 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
+// 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.
+
+// Written by Gabriel Dos Reis 
+
+//
+// ISO C++ 14882:1998
+// 18.2.1
+//
+
+#include 
+
+namespace std 
+{
+  const bool __numeric_limits_base::is_specialized;
+  const int  __numeric_limits_base::digits;
+  const int  __numeric_limits_base::digits10;
+  const bool __numeric_limits_base::is_signed;
+  const bool __numeric_limits_base::is_integer;
+  const bool __numeric_limits_base::is_exact;
+  const int  __numeric_limits_base::radix;
+  const int  __numeric_limits_base::min_exponent;
+  const int  __numeric_limits_base::min_exponent10;
+  const int  __numeric_limits_base::max_exponent;
+  const int  __numeric_limits_base::max_exponent10;
+  const bool __numeric_limits_base::has_infinity;
+  const bool __numeric_limits_base::has_quiet_NaN;
+  const bool __numeric_limits_base::has_signaling_NaN;
+  const float_denorm_style __numeric_limits_base::has_denorm;
+  const bool __numeric_limits_base::has_denorm_loss;
+  const bool __numeric_limits_base::is_iec559;
+  const bool __numeric_limits_base::is_bounded;
+  const bool __numeric_limits_base::is_modulo;
+  const bool __numeric_limits_base::traps;
+  const bool __numeric_limits_base::tinyness_before;
+  const float_round_style __numeric_limits_base::round_style;
+
+  // bool
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // char
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // signed char
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // unsigned char
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // wchar_t
+  // This used to be problematic...
+#ifdef _GLIBCPP_USE_WCHAR_T  
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+#endif // _GLIBCPP_USE_WCHAR_T
+
+  // short
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // unsigned short
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // int
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // unsigned int
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // long
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // unsigned long
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // NOTA BENE:  long long is an extension
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // float
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // double
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+
+  // long double
+  const bool numeric_limits::is_specialized;
+  const int  numeric_limits::digits;
+  const int  numeric_limits::digits10;
+  const bool numeric_limits::is_signed;
+  const bool numeric_limits::is_integer;
+  const bool numeric_limits::is_exact;
+  const int  numeric_limits::radix;
+  const int  numeric_limits::min_exponent;
+  const int  numeric_limits::min_exponent10;
+  const int  numeric_limits::max_exponent;
+  const int  numeric_limits::max_exponent10;
+  const bool numeric_limits::has_infinity;
+  const bool numeric_limits::has_quiet_NaN;
+  const bool numeric_limits::has_signaling_NaN;
+  const float_denorm_style numeric_limits::has_denorm;
+  const bool numeric_limits::has_denorm_loss;
+  const bool numeric_limits::is_iec559;
+  const bool numeric_limits::is_bounded;
+  const bool numeric_limits::is_modulo;
+  const bool numeric_limits::traps;
+  const bool numeric_limits::tinyness_before;
+  const float_round_style numeric_limits::round_style;
+} // namespace std
diff --git a/contrib/libstdc++/src/locale-inst.cc b/contrib/libstdc++/src/locale-inst.cc
new file mode 100644
index 0000000..7ac147f
--- /dev/null
+++ b/contrib/libstdc++/src/locale-inst.cc
@@ -0,0 +1,480 @@
+// Locale support -*- C++ -*-
+
+// Copyright (C) 1999, 2000, 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
+// 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
+//
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+  // moneypunct, money_get, and money_put
+  template class moneypunct;
+  template class moneypunct;
+  template class moneypunct_byname;
+  template class moneypunct_byname;
+  template class money_get >;
+  template class money_put >;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class moneypunct;
+  template class moneypunct;
+  template class moneypunct_byname;
+  template class moneypunct_byname;
+  template class money_get >;
+  template class money_put >;
+#endif
+
+  // numpunct, numpunct_byname, num_get, and num_put
+  template class numpunct;
+  template class numpunct_byname;
+  template class num_get >;
+  template class num_put >; 
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, char, char, char, 
+		   long) const;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, char, char, char, 
+		   unsigned long) const;
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, char, char, char, 
+		   long long) const;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, char, char, char,
+		   unsigned long long) const;
+#endif
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_float(ostreambuf_iterator, ios_base&, char, char, 
+		     double) const;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_float(ostreambuf_iterator, ios_base&, char, char, 
+		    long double) const;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class numpunct;
+  template class numpunct_byname;
+  template class num_get >;
+  template class num_put >;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, wchar_t, char, 
+		   char, long) const;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, wchar_t, char, 
+		   char, unsigned long) const;
+
+#ifdef _GLIBCPP_USE_LONG_LONG
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, wchar_t, char, 
+		   char, long long) const;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_int(ostreambuf_iterator, ios_base&, wchar_t, char, 
+		   char, unsigned long long) const;
+#endif
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_float(ostreambuf_iterator, ios_base&, wchar_t, char, 
+		     double) const;
+
+  template
+    ostreambuf_iterator
+    num_put >::
+    _M_convert_float(ostreambuf_iterator, ios_base&, wchar_t, char, 
+		     long double) const;
+#endif
+
+  // time_get and time_put
+  template class __timepunct;
+  template class time_put >;
+  template class time_put_byname >;
+  template class time_get >;
+  template class time_get_byname >;
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class __timepunct;
+  template class time_put >;
+  template class time_put_byname >;
+  template class time_get >;
+  template class time_get_byname >;
+#endif
+
+  // messages
+  template class messages;
+  template class messages_byname;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class messages;
+  template class messages_byname;
+#endif
+  
+  // ctype
+  inline template class __ctype_abstract_base;
+  template class ctype_byname;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  inline template class __ctype_abstract_base;
+  template class ctype_byname;
+#endif
+  
+  // codecvt
+  inline template class __codecvt_abstract_base;
+  inline template class __codecvt_abstract_base;
+  template class codecvt_byname;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class codecvt_byname;
+#endif
+
+  // collate
+  template class collate;
+  template class collate_byname;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class collate;
+  template class collate_byname;
+#endif
+    
+  // use_facet
+  // NB: use_facet is specialized
+  template
+    const codecvt& 
+    use_facet >(const locale&);
+
+  template
+    const collate& 
+    use_facet >(const locale&);
+
+  template
+    const numpunct& 
+    use_facet >(const locale&);
+
+  template 
+    const num_put& 
+    use_facet >(const locale&);
+
+  template 
+    const num_get& 
+    use_facet >(const locale&);
+
+  template
+    const moneypunct& 
+    use_facet >(const locale&);
+
+  template
+    const moneypunct& 
+    use_facet >(const locale&);
+
+  template 
+    const money_put& 
+    use_facet >(const locale&);
+
+  template 
+    const money_get& 
+    use_facet >(const locale&);
+
+  template
+    const __timepunct& 
+    use_facet<__timepunct >(const locale&);
+
+  template 
+    const time_put& 
+    use_facet >(const locale&);
+
+  template 
+    const time_get& 
+    use_facet >(const locale&);
+
+  template 
+    const messages& 
+    use_facet >(const locale&);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template
+    const codecvt& 
+    use_facet >(locale const&);
+
+  template
+    const collate& 
+    use_facet >(const locale&);
+
+  template
+    const numpunct& 
+    use_facet >(const locale&);
+
+  template 
+    const num_put& 
+    use_facet >(const locale&);
+
+  template 
+    const num_get& 
+    use_facet >(const locale&);
+
+  template
+    const moneypunct& 
+    use_facet >(const locale&);
+
+  template
+    const moneypunct& 
+    use_facet >(const locale&);
+ 
+  template 
+    const money_put& 
+    use_facet >(const locale&);
+
+  template 
+    const money_get& 
+    use_facet >(const locale&);
+
+  template
+    const __timepunct& 
+    use_facet<__timepunct >(const locale&);
+
+  template 
+    const time_put& 
+    use_facet >(const locale&);
+
+  template 
+    const time_get& 
+    use_facet >(const locale&);
+
+  template 
+    const messages& 
+    use_facet >(const locale&);
+#endif
+
+  // has_facet
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet<__timepunct >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+ template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet<__timepunct >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+
+  template 
+    bool
+    has_facet >(const locale&);
+#endif
+
+  // locale
+  template
+    char*
+    __add_grouping(char*, char, char const*, char const*, 
+			 char const*, char const*);
+
+  template
+    bool
+    __verify_grouping(const basic_string&, basic_string&);
+
+  template
+    void 
+    __pad(ios_base&, char, char*, const char *, streamsize, 
+		streamsize, const bool);
+
+  template
+    void 
+    __pad >(ios_base&, char, char*, const char *, 
+				    streamsize, streamsize, const bool);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template
+    wchar_t*
+    __add_grouping(wchar_t*, wchar_t, char const*, char const*, 
+			    wchar_t const*, wchar_t const*);
+  template
+    bool
+    __verify_grouping(const basic_string&, 
+			       basic_string&);
+
+  template
+    void 
+    __pad(ios_base&, wchar_t, wchar_t*, const wchar_t*, 
+		   streamsize, streamsize, const bool);
+
+  template
+    void 
+    __pad >(ios_base&, wchar_t, wchar_t*, 
+					  const wchar_t*, streamsize, 
+					  streamsize, const bool);
+#endif // _GLIBCPP_USE_WCHAR_T
+
+  template
+    int
+    __convert_from_v(char*, const int, const char*, double, const __c_locale&, int);
+
+  template
+    int
+    __convert_from_v(char*, const int, const char*, long double, const __c_locale&, int);
+
+  template
+    int
+    __convert_from_v(char*, const int, const char*, long, const __c_locale&, int);
+
+  template
+    int
+    __convert_from_v(char*, const int, const char*, unsigned long, 
+		     const __c_locale&, int);
+
+  template
+    int
+    __convert_from_v(char*, const int, const char*, long long, const __c_locale&, int);
+
+  template
+    int
+    __convert_from_v(char*, const int, const char*, unsigned long long, 
+		     const __c_locale&, int);
+} // namespace std
diff --git a/contrib/libstdc++/src/locale.cc b/contrib/libstdc++/src/locale.cc
new file mode 100644
index 0000000..26c2834
--- /dev/null
+++ b/contrib/libstdc++/src/locale.cc
@@ -0,0 +1,588 @@
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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 
+#include 
+#include 
+#include 
+#include      // For towupper, etc.
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std 
+{
+  // Defined in globals.cc.
+  extern locale 		c_locale;
+  extern locale::_Impl 		c_locale_impl;
+  extern locale::facet**	facet_vec;
+
+  // Definitions for static const data members of locale.
+  const locale::category 	locale::none;
+  const locale::category 	locale::ctype;
+  const locale::category 	locale::numeric;
+  const locale::category 	locale::collate;
+  const locale::category 	locale::time;
+  const locale::category 	locale::monetary;
+  const locale::category 	locale::messages;
+  const locale::category 	locale::all;
+
+  locale::_Impl* 		locale::_S_classic;
+  locale::_Impl* 		locale::_S_global; 
+  const size_t 			locale::_S_num_categories;
+
+  // Definitions for locale::id of standard facets that are specialized.
+  locale::id ctype::id;
+  locale::id codecvt::id;
+
+#ifdef _GLIBCPP_USE_WCHAR_T  
+  locale::id ctype::id;
+  locale::id codecvt::id;
+#endif
+
+  // Definitions for static const data members of locale::id
+  _Atomic_word locale::id::_S_highwater;  // init'd to 0 by linker
+
+  // Definitions for static const data members of locale::_Impl
+  const locale::id* const
+  locale::_Impl::_S_id_ctype[] =
+  {
+    &std::ctype::id, 
+    &codecvt::id,
+#ifdef _GLIBCPP_USE_WCHAR_T
+    &std::ctype::id,
+    &codecvt::id,
+#endif
+    0
+  };
+
+  const locale::id* const
+  locale::_Impl::_S_id_numeric[] =
+  {
+    &num_get::id,  
+    &num_put::id,  
+    &numpunct::id, 
+#ifdef _GLIBCPP_USE_WCHAR_T
+    &num_get::id,
+    &num_put::id,
+    &numpunct::id,
+#endif
+    0
+  };
+  
+  const locale::id* const
+  locale::_Impl::_S_id_collate[] =
+  {
+    &std::collate::id,
+#ifdef _GLIBCPP_USE_WCHAR_T
+    &std::collate::id,
+#endif
+    0
+  };
+
+  const locale::id* const
+  locale::_Impl::_S_id_time[] =
+  {
+    &__timepunct::id, 
+    &time_get::id, 
+    &time_put::id, 
+#ifdef _GLIBCPP_USE_WCHAR_T
+    &__timepunct::id, 
+    &time_get::id,
+    &time_put::id,
+#endif
+    0
+  };
+  
+  const locale::id* const
+  locale::_Impl::_S_id_monetary[] =
+  {
+    &money_get::id,        
+    &money_put::id,        
+    &moneypunct::id, 
+    &moneypunct::id, 
+#ifdef _GLIBCPP_USE_WCHAR_T
+    &money_get::id,
+    &money_put::id,
+    &moneypunct::id,
+    &moneypunct::id,
+#endif
+    0
+  };
+
+  const locale::id* const
+  locale::_Impl::_S_id_messages[] =
+  {
+    &std::messages::id, 
+#ifdef _GLIBCPP_USE_WCHAR_T
+    &std::messages::id,
+#endif
+    0
+  };
+  
+  const locale::id* const* const
+  locale::_Impl::_S_facet_categories[] =
+  {
+    // Order must match the decl order in class locale.
+    locale::_Impl::_S_id_ctype,
+    locale::_Impl::_S_id_numeric,
+    locale::_Impl::_S_id_collate,
+    locale::_Impl::_S_id_monetary,
+    locale::_Impl::_S_id_time,
+    locale::_Impl::_S_id_messages,
+    0
+  };
+
+  locale::~locale() throw()
+  { _M_impl->_M_remove_reference(); }
+
+  void
+  locale::_M_coalesce(const locale& __base, const locale& __add, 
+		      category __cat)
+  {
+    __cat = _S_normalize_category(__cat);  
+    _M_impl = new _Impl(*__base._M_impl, 1);  
+
+    try 
+      { _M_impl->_M_replace_categories(__add._M_impl, __cat); }
+    catch (...) 
+      { 
+	_M_impl->_M_remove_reference(); 
+	__throw_exception_again;
+      }
+  }
+
+  locale::locale() throw()
+  { 
+    _S_initialize(); 
+    (_M_impl = _S_global)->_M_add_reference(); 
+  }
+
+  locale::locale(const locale& __other) throw()
+  { (_M_impl = __other._M_impl)->_M_add_reference(); }
+
+  // This is used to initialize global and classic locales, and
+  // assumes that the _Impl objects are constructed correctly.
+  locale::locale(_Impl* __ip) throw() : _M_impl(__ip)
+  { }
+
+  locale::locale(const char* __s)
+  {
+    if (__s)
+      {
+	_S_initialize(); 
+	if (strcmp(__s, "C") == 0 || strcmp(__s, "POSIX") == 0)
+	  (_M_impl = _S_classic)->_M_add_reference();
+	else if (strcmp(__s, "") == 0)
+	  _M_impl = new _Impl(setlocale(LC_ALL, __s), 1);
+	else
+	  _M_impl = new _Impl(__s, 1);
+      }
+    else
+      __throw_runtime_error("attempt to create locale from NULL name");
+  }
+
+  locale::locale(const locale& __base, const char* __s, category __cat)
+  { 
+    // NB: There are complicated, yet more efficient ways to do
+    // this. Building up locales on a per-category way is tedious, so
+    // let's do it this way until people complain.
+    locale __add(__s);
+    _M_coalesce(__base, __add, __cat);
+  }
+
+  locale::locale(const locale& __base, const locale& __add, category __cat)
+  { _M_coalesce(__base, __add, __cat); }
+
+  bool
+  locale::operator==(const locale& __rhs) const throw()
+  {
+    string __name = this->name();
+    return (_M_impl == __rhs._M_impl 
+	    || (__name != "*" && __name == __rhs.name()));
+  }
+
+  const locale&
+  locale::operator=(const locale& __other) throw()
+  {
+    __other._M_impl->_M_add_reference();
+    _M_impl->_M_remove_reference();
+    _M_impl = __other._M_impl;
+    return *this;
+  }
+
+  locale
+  locale::global(const locale& __other)
+  {
+    // XXX MT
+    _S_initialize();
+    _Impl* __old = _S_global;
+    __other._M_impl->_M_add_reference();
+    _S_global = __other._M_impl; 
+    if (_S_global->_M_check_same_name() 
+	&& (strcmp(_S_global->_M_names[0], "*") != 0))
+      setlocale(LC_ALL, __other.name().c_str());
+
+    // Reference count sanity check: one reference removed for the
+    // subsition of __other locale, one added by return-by-value. Net
+    // difference: zero. When the returned locale object's destrutor
+    // is called, then the reference count is decremented and possibly
+    // destroyed.
+    return locale(__old);
+  }
+
+  string
+  locale::name() const
+  {
+    // Need some kind of separator character. This one was pretty much
+    // arbitrarily chosen as to not conflict with glibc locales: the
+    // exact formatting is not set in stone.
+    const char __separator = '|';
+
+    string __ret;
+    if (_M_impl->_M_check_same_name())
+      __ret = _M_impl->_M_names[0];
+    else
+      {
+	for (size_t i = 0; i < _S_num_categories; ++i)
+	  {
+	    __ret += __separator;
+	    __ret += _M_impl->_M_names[i];
+	  }
+      }
+    return __ret;
+  }
+
+  const locale&
+  locale::classic()
+  {
+    static _STL_mutex_lock __lock __STL_MUTEX_INITIALIZER;
+    _STL_auto_lock __auto(__lock);
+
+    if (!_S_classic)
+      {
+	try 
+	  {
+	    // 26 Standard facets, 2 references.
+	    // One reference for _M_classic, one for _M_global
+	    facet** f = new(&facet_vec) facet*[_GLIBCPP_NUM_FACETS];
+	    for (size_t __i = 0; __i < _GLIBCPP_NUM_FACETS; ++__i)
+	      f[__i] = 0;
+
+	    _S_classic = new (&c_locale_impl) _Impl(f, 2, true);
+	    _S_global = _S_classic; 	    
+	    new (&c_locale) locale(_S_classic);
+	  }
+	catch(...) 
+	  {
+	    // Just call destructor, so that locale_impl_c's memory is
+	    // not deallocated via a call to delete.
+	    if (_S_classic)
+	      _S_classic->~_Impl();
+	    _S_classic = _S_global = 0;
+	    __throw_exception_again;
+	  }
+      }
+    return c_locale;
+  }
+
+  locale::category
+  locale::_S_normalize_category(category __cat) 
+  {
+    int __ret = 0;
+    if (__cat == none || (__cat & all) && !(__cat & ~all))
+      __ret = __cat;
+    else
+      {
+	// NB: May be a C-style "LC_ALL" category; convert.
+	switch (__cat)
+	  {
+	  case LC_COLLATE:  
+	    __ret = collate; 
+	    break;
+	  case LC_CTYPE:    
+	    __ret = ctype;
+	    break;
+	  case LC_MONETARY: 
+	    __ret = monetary;
+	    break;
+	  case LC_NUMERIC:  
+	    __ret = numeric;
+	    break;
+	  case LC_TIME:     
+	    __ret = time; 
+	    break;
+#ifdef _GLIBCPP_HAVE_LC_MESSAGES
+	  case LC_MESSAGES: 
+	    __ret = messages;
+	    break;
+#endif	
+	  case LC_ALL:      
+	    __ret = all;
+	    break;
+	  default:
+	    __throw_runtime_error("bad locale category");
+	  }
+      }
+    return __ret;
+  }
+
+  __c_locale
+  locale::facet::_S_c_locale;
+  
+  locale::facet::
+  ~facet() { }
+
+  locale::facet::
+  facet(size_t __refs) throw() : _M_references(__refs) 
+  { 
+    if (!_S_c_locale)
+      _S_create_c_locale(_S_c_locale, "C");
+  }
+
+  void  
+  locale::facet::
+  _M_add_reference() throw()
+  { __atomic_add(&_M_references, 1); }
+
+  void  
+  locale::facet::
+  _M_remove_reference() throw()
+  {
+    if (__exchange_and_add(&_M_references, -1) == 0)
+      {
+        try 
+	  { delete this; }  
+	catch (...) 
+	  { }
+      }
+  }
+  
+  locale::id::id() 
+  { }
+
+  // Definitions for static const data members of ctype_base.
+  const ctype_base::mask ctype_base::space;
+  const ctype_base::mask ctype_base::print;
+  const ctype_base::mask ctype_base::cntrl;
+  const ctype_base::mask ctype_base::upper;
+  const ctype_base::mask ctype_base::lower;
+  const ctype_base::mask ctype_base::alpha;
+  const ctype_base::mask ctype_base::digit;
+  const ctype_base::mask ctype_base::punct;
+  const ctype_base::mask ctype_base::xdigit;
+  const ctype_base::mask ctype_base::alnum;
+  const ctype_base::mask ctype_base::graph;
+
+  // Platform-specific initialization code for ctype tables.
+  #include 
+
+  const size_t ctype::table_size;
+
+  ctype::~ctype()
+  { 
+    if (_M_c_locale_ctype != _S_c_locale)
+      _S_destroy_c_locale(_M_c_locale_ctype);
+    if (_M_del) 
+      delete[] this->table(); 
+  }
+
+  // These are dummy placeholders as these virtual functions are never called.
+  bool 
+  ctype::do_is(mask, char_type) const 
+  { return false; }
+  
+  const char*
+  ctype::do_is(const char_type* __c, const char_type*, mask*) const 
+  { return __c; }
+  
+  const char*
+  ctype::do_scan_is(mask, const char_type* __c, const char_type*) const 
+  { return __c; }
+
+  const char* 
+  ctype::do_scan_not(mask, const char_type* __c, const char_type*) const
+  { return __c; }
+
+  char
+  ctype::do_widen(char __c) const
+  { return __c; }
+  
+  const char* 
+  ctype::do_widen(const char* __lo, const char* __hi, char* __dest) const
+  {
+    memcpy(__dest, __lo, __hi - __lo);
+    return __hi;
+  }
+  
+  char
+  ctype::do_narrow(char __c, char /*__dfault*/) const
+  { return __c; }
+  
+  const char* 
+  ctype::do_narrow(const char* __lo, const char* __hi, 
+			 char /*__dfault*/, char* __dest) const
+  {
+    memcpy(__dest, __lo, __hi - __lo);
+    return __hi;
+  }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  ctype::ctype(size_t __refs) 
+  : __ctype_abstract_base(__refs)
+  { _M_c_locale_ctype = _S_c_locale; }
+
+  ctype::ctype(__c_locale __cloc, size_t __refs) 
+  : __ctype_abstract_base(__refs) 
+  { _M_c_locale_ctype = _S_clone_c_locale(__cloc); }
+
+  ctype::~ctype() 
+  { 
+    if (_M_c_locale_ctype != _S_c_locale)
+      _S_destroy_c_locale(_M_c_locale_ctype); 
+  }
+
+  template<>
+    ctype_byname::ctype_byname(const char* __s, size_t __refs)
+    : ctype(__refs) 
+    { 	
+      if (_M_c_locale_ctype != _S_c_locale)
+	_S_destroy_c_locale(_M_c_locale_ctype);
+      _S_create_c_locale(_M_c_locale_ctype, __s); 
+    }
+#endif
+
+  // Definitions for static const data members of time_base
+  template<> 
+    const char*
+    __timepunct::_S_timezones[14] =
+    { 
+      "GMT", "HST", "AKST", "PST", "MST", "CST", "EST", "AST", "NST", "CET", 
+      "IST", "EET", "CST", "JST"  
+    };
+ 
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<> 
+    const wchar_t*
+    __timepunct::_S_timezones[14] =
+    { 
+      L"GMT", L"HST", L"AKST", L"PST", L"MST", L"CST", L"EST", L"AST", 
+      L"NST", L"CET", L"IST", L"EET", L"CST", L"JST"  
+    };
+#endif
+
+  // Definitions for static const data members of money_base
+  const money_base::pattern 
+  money_base::_S_default_pattern =  { {symbol, sign, none, value} };
+
+  template<>
+    const ctype&
+    use_facet >(const locale& __loc)
+    {
+      size_t __i = ctype::id._M_id();
+      const locale::_Impl* __tmp = __loc._M_impl;
+      return static_cast&>(*(__tmp->_M_facets[__i]));
+    }
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template<>
+    const ctype&
+    use_facet >(const locale& __loc)
+    {
+      size_t __i = ctype::id._M_id();
+      const locale::_Impl* __tmp = __loc._M_impl;
+      return static_cast&>(*(__tmp->_M_facets[__i]));
+    }
+#endif
+
+  const char __num_base::_S_atoms[] = "0123456789eEabcdfABCDF";
+
+  bool
+  __num_base::_S_format_float(const ios_base& __io, char* __fptr, char __mod,
+			      streamsize __prec)
+  {
+    bool __incl_prec = false;
+    ios_base::fmtflags __flags = __io.flags();
+    *__fptr++ = '%';
+    // [22.2.2.2.2] Table 60
+    if (__flags & ios_base::showpos)
+      *__fptr++ = '+';
+    if (__flags & ios_base::showpoint)
+      *__fptr++ = '#';
+    // As per [22.2.2.2.2.11]
+    if (__flags & ios_base::fixed || __prec > 0)
+      {
+	*__fptr++ = '.';
+	*__fptr++ = '*';
+	__incl_prec = true;
+      }
+    if (__mod)
+      *__fptr++ = __mod;
+    ios_base::fmtflags __fltfield = __flags & ios_base::floatfield;
+    // [22.2.2.2.2] Table 58
+    if (__fltfield == ios_base::fixed)
+      *__fptr++ = 'f';
+    else if (__fltfield == ios_base::scientific)
+      *__fptr++ = (__flags & ios_base::uppercase) ? 'E' : 'e';
+    else
+      *__fptr++ = (__flags & ios_base::uppercase) ? 'G' : 'g';
+    *__fptr = '\0';
+    return __incl_prec;
+  }
+  
+  void
+  __num_base::_S_format_int(const ios_base& __io, char* __fptr, char __mod, 
+			    char __modl)
+  {
+    ios_base::fmtflags __flags = __io.flags();
+    *__fptr++ = '%';
+    // [22.2.2.2.2] Table 60
+    if (__flags & ios_base::showpos)
+      *__fptr++ = '+';
+    if (__flags & ios_base::showbase)
+      *__fptr++ = '#';
+    *__fptr++ = 'l';
+
+    // For long long types.
+    if (__modl)
+      *__fptr++ = __modl;
+
+    ios_base::fmtflags __bsefield = __flags & ios_base::basefield;
+    if (__bsefield == ios_base::hex)
+      *__fptr++ = (__flags & ios_base::uppercase) ? 'X' : 'x';
+    else if (__bsefield == ios_base::oct)
+      *__fptr++ = 'o';
+    else
+      *__fptr++ = __mod;
+    *__fptr = '\0';
+  }
+} // namespace std
+
diff --git a/contrib/libstdc++/src/localename.cc b/contrib/libstdc++/src/localename.cc
new file mode 100644
index 0000000..1b40e0c
--- /dev/null
+++ b/contrib/libstdc++/src/localename.cc
@@ -0,0 +1,292 @@
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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 
+#include 
+#include 
+
+namespace std
+{
+  // Defined in globals.cc.
+  extern std::ctype			ctype_c;
+  extern std::collate 			collate_c;
+  extern numpunct 			numpunct_c;
+  extern num_get 				num_get_c;
+  extern num_put 				num_put_c;
+  extern codecvt		codecvt_c;
+  extern moneypunct 		moneypunct_fc;
+  extern moneypunct 		moneypunct_tc;
+  extern money_get 			money_get_c;
+  extern money_put 			money_put_c;
+  extern __timepunct 			timepunct_c;
+  extern time_get 			time_get_c;
+  extern time_put 			time_put_c;
+  extern std::messages 			messages_c;
+#ifdef  _GLIBCPP_USE_WCHAR_T
+  extern std::ctype			ctype_w;
+  extern std::collate 			collate_w;
+  extern numpunct 			numpunct_w;
+  extern num_get 			num_get_w;
+  extern num_put 			num_put_w;
+  extern codecvt	codecvt_w;
+  extern moneypunct 		moneypunct_fw;
+  extern moneypunct 		moneypunct_tw;
+  extern money_get 			money_get_w;
+  extern money_put 			money_put_w;
+  extern __timepunct 			timepunct_w;
+  extern time_get 			time_get_w;
+  extern time_put 			time_put_w;
+  extern std::messages 		messages_w;
+#endif
+
+  locale::_Impl::
+  ~_Impl() throw()
+  {
+    for (size_t __i = 0; __i < _M_facets_size; ++__i)
+      if (_M_facets[__i])
+	_M_facets[__i]->_M_remove_reference();
+    delete [] _M_facets;
+  }
+
+  // Clone existing _Impl object.
+  locale::_Impl::
+  _Impl(const _Impl& __imp, size_t __refs)
+  : _M_references(__refs), _M_facets_size(__imp._M_facets_size) // XXX
+  {
+    try
+      { 
+	_M_facets = new facet*[_M_facets_size]; 
+	for (size_t __i = 0; __i < _M_facets_size; ++__i)
+	  _M_facets[__i] = 0;
+      }
+    catch(...) 
+      {
+	delete [] _M_facets;
+	__throw_exception_again;
+      }
+    for (size_t __i = 0; __i < _M_facets_size; ++__i)
+      {
+	_M_facets[__i] = __imp._M_facets[__i];
+	if (_M_facets[__i])
+	  _M_facets[__i]->_M_add_reference();
+      }
+    for (size_t __i = 0; __i < _S_num_categories; ++__i)
+      _M_names[__i] = __imp._M_names[__i];
+  }
+
+  // Construct named _Impl.
+  locale::_Impl::
+  _Impl(const char* __s, size_t __refs) 
+  : _M_references(__refs), _M_facets_size(_GLIBCPP_NUM_FACETS) // XXX
+  {
+    // Initialize the underlying locale model, which also checks
+    // to see if the given name is valid.
+    __c_locale __cloc;
+    locale::facet::_S_create_c_locale(__cloc, __s);
+
+    try
+      { 
+	_M_facets = new facet*[_M_facets_size]; 
+	for (size_t __i = 0; __i < _M_facets_size; ++__i)
+	  _M_facets[__i] = 0;
+      }
+    catch(...) 
+      {
+	delete [] _M_facets;
+	__throw_exception_again;
+      }
+
+    // Name all the categories.
+    for (size_t i = 0; i < _S_num_categories; ++i)
+      _M_names[i] = __s;
+
+    // Construct all standard facets and add them to _M_facets.
+    _M_init_facet(new std::ctype(__cloc));
+    _M_init_facet(new codecvt);
+    _M_init_facet(new numpunct(__cloc));
+    _M_init_facet(new num_get);
+    _M_init_facet(new num_put);
+    _M_init_facet(new std::collate(__cloc));
+    _M_init_facet(new moneypunct(__cloc));
+    _M_init_facet(new moneypunct(__cloc));
+    _M_init_facet(new money_get);
+    _M_init_facet(new money_put);
+    _M_init_facet(new __timepunct(__cloc, __s));
+    _M_init_facet(new time_get);
+    _M_init_facet(new time_put);
+    _M_init_facet(new std::messages(__cloc, __s));
+	
+#ifdef  _GLIBCPP_USE_WCHAR_T
+    _M_init_facet(new std::ctype(__cloc));
+    _M_init_facet(new codecvt);
+    _M_init_facet(new numpunct(__cloc));
+    _M_init_facet(new num_get);
+    _M_init_facet(new num_put);
+    _M_init_facet(new std::collate(__cloc));
+    _M_init_facet(new moneypunct(__cloc));
+    _M_init_facet(new moneypunct(__cloc));
+    _M_init_facet(new money_get);
+    _M_init_facet(new money_put);
+    _M_init_facet(new __timepunct(__cloc, __s));
+    _M_init_facet(new time_get);
+    _M_init_facet(new time_put);
+    _M_init_facet(new std::messages(__cloc, __s));
+#endif	  
+    locale::facet::_S_destroy_c_locale(__cloc);
+  }
+
+  // Construct "C" _Impl.
+  locale::_Impl::
+  _Impl(facet** __f, size_t __refs, bool) 
+  : _M_references(__refs), _M_facets(__f), _M_facets_size(_GLIBCPP_NUM_FACETS)
+  {
+    // Name all the categories.
+    for (size_t i = 0; i < _S_num_categories; ++i)
+      _M_names[i] = "C";
+
+    // This is needed as presently the C++ version of "C" locales
+    // != data in the underlying locale model for __timepunct,
+    // numpunct, and moneypunct. Also, the "C" locales must be
+    // constructed in a way such that they are pre-allocated.
+    _M_init_facet(new (&ctype_c) std::ctype);
+    _M_init_facet(new (&codecvt_c) codecvt);
+    _M_init_facet(new (&numpunct_c) numpunct);
+    _M_init_facet(new (&num_get_c) num_get);
+    _M_init_facet(new (&num_put_c) num_put);
+    _M_init_facet(new (&collate_c) std::collate);
+    _M_init_facet(new (&moneypunct_fc) moneypunct);
+    _M_init_facet(new (&moneypunct_tc) moneypunct);
+    _M_init_facet(new (&money_get_c) money_get);
+    _M_init_facet(new (&money_put_c) money_put);
+    _M_init_facet(new (&timepunct_c) __timepunct);
+    _M_init_facet(new (&time_get_c) time_get);
+    _M_init_facet(new (&time_put_c) time_put);
+    _M_init_facet(new (&messages_c) std::messages);	
+#ifdef  _GLIBCPP_USE_WCHAR_T
+    _M_init_facet(new (&ctype_w) std::ctype);
+    _M_init_facet(new (&codecvt_w) codecvt);
+    _M_init_facet(new (&numpunct_w) numpunct);
+    _M_init_facet(new (&num_get_w) num_get);
+    _M_init_facet(new (&num_put_w) num_put);
+    _M_init_facet(new (&collate_w) std::collate);
+    _M_init_facet(new (&moneypunct_fw) moneypunct);
+    _M_init_facet(new (&moneypunct_tw) moneypunct);
+    _M_init_facet(new (&money_get_w) money_get);
+    _M_init_facet(new (&money_put_w) money_put);
+    _M_init_facet(new (&timepunct_w) __timepunct);
+    _M_init_facet(new (&time_get_w) time_get);
+    _M_init_facet(new (&time_put_w) time_put);
+    _M_init_facet(new (&messages_w) std::messages);
+#endif	  
+  }
+  
+  void
+  locale::_Impl::
+  _M_replace_categories(const _Impl* __imp, category __cat)
+  {
+    category __mask;
+    for (unsigned int __ix = 0; __ix < _S_num_categories; ++__ix)
+      {
+	__mask = 1 << __ix;
+	if (__mask & __cat)
+	  {
+	    // Need to replace entry in _M_facets with other locale's info.
+	    _M_replace_category(__imp, _S_facet_categories[__ix]);
+	    // If both have names, go ahead and mangle.
+	    if (strcmp(_M_names[__ix], "*") != 0 
+		&& strcmp(__imp->_M_names[__ix], "*") != 0)
+	      _M_names[__ix] = __imp->_M_names[__ix];
+	  }
+      }
+  }
+
+  void
+  locale::_Impl::
+  _M_replace_category(const _Impl* __imp, const locale::id* const* __idpp)
+  {
+    for (; *__idpp; ++__idpp)
+      _M_replace_facet(__imp, *__idpp);
+  }
+  
+  void
+  locale::_Impl::
+  _M_replace_facet(const _Impl* __imp, const locale::id* __idp)
+  {
+    size_t __index = __idp->_M_id();
+    if ((__index > (__imp->_M_facets_size - 1)) || !__imp->_M_facets[__index])
+      __throw_runtime_error("no locale facet");
+    _M_install_facet(__idp, __imp->_M_facets[__index]); 
+  }
+
+  void
+  locale::_Impl::
+  _M_install_facet(const locale::id* __idp, facet* __fp)
+  {
+    if (__fp)
+      {
+	size_t __index = __idp->_M_id();
+	if (__index > _M_facets_size - 1)
+	  {
+	    facet** __old = _M_facets;
+	    facet** __new;
+	    const size_t __new_size = __index + 4;
+	    try
+	      { __new = new facet*[__new_size]; }
+	    catch(...) 
+	      {
+		delete [] __new;
+		__throw_exception_again;
+	      }
+	    for (size_t __i = 0; __i < _M_facets_size; ++__i)
+	      __new[__i] = _M_facets[__i];
+	    for (size_t __i2 = _M_facets_size; __i2 < __new_size; ++__i2)
+	      __new[__i2] = 0;
+
+	    _M_facets_size = __new_size;
+	    _M_facets = __new;
+	    delete [] __old;
+	  }
+
+	facet*& __fpr = _M_facets[__index];
+	if (__fpr)
+	  {
+	    // Replacing an existing facet. Order matters.
+	    __fp->_M_add_reference();
+	    __fpr->_M_remove_reference();
+	    __fpr = __fp;
+	  }
+	else
+	  {
+	    // Installing a newly created facet into an empty
+	    // _M_facets container, say a newly-constructed,
+	    // swanky-fresh _Impl.
+	    _M_facets[__index] = __fp;
+	  }
+      }
+  }
+} // namespace std
diff --git a/contrib/libstdc++/src/misc-inst.cc b/contrib/libstdc++/src/misc-inst.cc
new file mode 100644
index 0000000..07a4b1a
--- /dev/null
+++ b/contrib/libstdc++/src/misc-inst.cc
@@ -0,0 +1,274 @@
+// Explicit instantiation file.
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// 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:
+//
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+// NB: Unnecessary if the .h headers already include these.
+#ifndef  _GLIBCPP_FULLY_COMPLIANT_HEADERS
+#include 
+#include 
+#include 
+#include 
+#include 
+#endif
+
+namespace std
+{
+  // streambuf
+  template class basic_streambuf;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_streambuf;
+#endif
+
+  // stringbuf
+  template class basic_stringbuf;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_stringbuf;
+#endif
+
+  // filebuf
+  template class basic_filebuf >;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_filebuf >;
+#endif
+
+  // basic_ios
+  template class basic_ios;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_ios;
+#endif
+
+  // iomanip
+  template class _Setfill;
+  template _Setfill setfill(char);
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class _Setfill;
+  template _Setfill setfill(wchar_t);
+#endif
+
+  // istream
+  template class basic_istream;
+  template istream& ws(istream&);
+  template istream& operator>>(istream&, char&);
+  template istream& operator>>(istream&, unsigned char&);
+  template istream& operator>>(istream&, signed char&);
+  template istream& operator>>(istream&, char*);
+  template istream& operator>>(istream&, unsigned char*);
+  template istream& operator>>(istream&, signed char*);
+
+  template istream& operator>>(istream&, _Setfill);
+  template istream& operator>>(istream&, _Setiosflags);
+  template istream& operator>>(istream&, _Resetiosflags);
+  template istream& operator>>(istream&, _Setbase);
+  template istream& operator>>(istream&, _Setprecision);
+  template istream& operator>>(istream&, _Setw);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_istream;
+  template wistream& ws(wistream&);
+  template wistream& operator>>(wistream&, wchar_t&);
+  template wistream& operator>>(wistream&, wchar_t*);
+
+  template wistream& operator>>(wistream&, _Setfill);
+  template wistream& operator>>(wistream&, _Setiosflags);
+  template wistream& operator>>(wistream&, _Resetiosflags);
+  template wistream& operator>>(wistream&, _Setbase);
+  template wistream& operator>>(wistream&, _Setprecision);
+  template wistream& operator>>(wistream&, _Setw);
+#endif
+
+  // ostream
+  template class basic_ostream;
+  template ostream& endl(ostream&);
+  template ostream& ends(ostream&);
+  template ostream& flush(ostream&);
+  template ostream& operator<<(ostream&, char);
+  template ostream& operator<<(ostream&, unsigned char);
+  template ostream& operator<<(ostream&, signed char);
+  template ostream& operator<<(ostream&, const char*);
+  template ostream& operator<<(ostream&, const unsigned char*);
+  template ostream& operator<<(ostream&, const signed char*);
+
+  template ostream& operator<<(ostream&, _Setfill);
+  template ostream& operator<<(ostream&, _Setiosflags);
+  template ostream& operator<<(ostream&, _Resetiosflags);
+  template ostream& operator<<(ostream&, _Setbase);
+  template ostream& operator<<(ostream&, _Setprecision);
+  template ostream& operator<<(ostream&, _Setw);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_ostream;
+  template wostream& endl(wostream&);
+  template wostream& ends(wostream&);
+  template wostream& flush(wostream&);
+  template wostream& operator<<(wostream&, wchar_t);
+  template wostream& operator<<(wostream&, char);
+  template wostream& operator<<(wostream&, const wchar_t*);
+  template wostream& operator<<(wostream&, const char*);
+
+  template wostream& operator<<(wostream&, _Setfill);
+  template wostream& operator<<(wostream&, _Setiosflags);
+  template wostream& operator<<(wostream&, _Resetiosflags);
+  template wostream& operator<<(wostream&, _Setbase);
+  template wostream& operator<<(wostream&, _Setprecision);
+  template wostream& operator<<(wostream&, _Setw);
+#endif
+  
+
+  // iostream
+  template class basic_iostream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_iostream; 
+#endif
+
+  // ifstream
+  template class basic_ifstream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_ifstream;
+#endif
+
+  // ofstream
+  template class basic_ofstream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_ofstream;
+#endif
+
+  // fstream
+  template class basic_fstream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_fstream;
+#endif
+
+  // istringstream
+  template class basic_istringstream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_istringstream; 
+#endif
+
+  // ostringstream
+  template class basic_ostringstream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_ostringstream; 
+#endif
+
+  // stringstream
+  template class basic_stringstream;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class basic_stringstream; 
+#endif
+
+  // string related to iostreams
+  template 
+    basic_istream& 
+    operator>>(basic_istream&, string&);
+  template 
+    basic_ostream& 
+    operator<<(basic_ostream&, const string&);
+  template 
+    basic_istream& 
+    getline(basic_istream&, string&, char);
+  template 
+    basic_istream& 
+    getline(basic_istream&, string&);
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template 
+    basic_istream& 
+    operator>>(basic_istream&, wstring&);
+  template 
+    basic_ostream& 
+    operator<<(basic_ostream&, const wstring&);
+  template 
+    basic_istream& 
+    getline(basic_istream&, wstring&, wchar_t);
+  template 
+    basic_istream& 
+    getline(basic_istream&, wstring&);
+#endif
+
+  // algorithm
+  typedef  _Char_traits_match > char_match;
+
+  template 
+    const char*  
+    find_if
+    (const char *, const char *, char_match, random_access_iterator_tag);
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+  typedef  _Char_traits_match > wchar_match;
+
+  template const wchar_t*  
+    find_if
+    (const wchar_t*, const wchar_t*, wchar_match, random_access_iterator_tag);
+#endif
+  
+  template 
+    string* 
+    __uninitialized_fill_n_aux
+    (string*, size_t, string const &, __false_type);
+
+  template 
+    string* 
+    __uninitialized_copy_aux::const_iterator, string *>
+    (vector::const_iterator, vector::const_iterator, 
+     string*, __false_type);
+
+  template
+    streamsize
+    __copy_streambufs(basic_ios&, basic_streambuf*,
+		      basic_streambuf*); 
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template
+    streamsize
+    __copy_streambufs(basic_ios&, basic_streambuf*,
+		      basic_streambuf*); 
+#endif
+  
+  using __gnu_cxx::stdio_filebuf;
+  template class stdio_filebuf;
+#ifdef _GLIBCPP_USE_WCHAR_T
+  template class stdio_filebuf;
+#endif
+} //std
diff --git a/contrib/libstdc++/src/stdexcept.cc b/contrib/libstdc++/src/stdexcept.cc
new file mode 100644
index 0000000..d39d41f
--- /dev/null
+++ b/contrib/libstdc++/src/stdexcept.cc
@@ -0,0 +1,78 @@
+// Methods for Exception Support for -*- C++ -*-
+
+// Copyright (C) 1997, 1999, 2001 Free Software Foundation, Inc.
+//
+// This file is part of the GNU ISO C++ Library.  This library is free
+// software; you can redistribute it and/or modify it under the
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this
+// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 19.1  Exception classes
+//
+
+#include 
+#include 
+
+namespace std 
+{
+  logic_error::logic_error(const string& __arg) 
+  : exception(), _M_msg(__arg) { }
+
+  logic_error::~logic_error() throw() { };
+
+  const char*
+  logic_error::what() const throw()
+  { return _M_msg.c_str(); }
+
+  domain_error::domain_error(const string& __arg)
+  : logic_error(__arg) { }
+
+  invalid_argument::invalid_argument(const string& __arg)
+  : logic_error(__arg) { }
+
+  length_error::length_error(const string& __arg)
+  : logic_error(__arg) { }
+
+  out_of_range::out_of_range(const string& __arg)
+  : logic_error(__arg) { }
+
+  runtime_error::runtime_error(const string& __arg) 
+  : exception(), _M_msg(__arg) { }
+
+  runtime_error::~runtime_error() throw() { };
+
+  const char*
+  runtime_error::what() const throw()
+  { return _M_msg.c_str(); }
+
+  range_error::range_error(const string& __arg)
+  : runtime_error(__arg) { }
+
+  overflow_error::overflow_error(const string& __arg)
+  : runtime_error(__arg) { }
+
+  underflow_error::underflow_error(const string& __arg)
+  : runtime_error(__arg) { }
+} // namespace std
+
diff --git a/contrib/libstdc++/src/stl-inst.cc b/contrib/libstdc++/src/stl-inst.cc
new file mode 100644
index 0000000..d8879a7
--- /dev/null
+++ b/contrib/libstdc++/src/stl-inst.cc
@@ -0,0 +1,47 @@
+// Explicit instantiation file.
+
+// Copyright (C) 1999, 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
+// 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:
+//
+
+#include 
+#include 
+
+namespace std
+{
+  template class allocator;
+  template class allocator;
+
+#ifdef __USE_MALLOC
+  template class __malloc_alloc_template<0>;
+#else
+  template class __default_alloc_template;
+#endif
+} // namespace std
diff --git a/contrib/libstdc++/src/string-inst.cc b/contrib/libstdc++/src/string-inst.cc
new file mode 100644
index 0000000..e812aa0
--- /dev/null
+++ b/contrib/libstdc++/src/string-inst.cc
@@ -0,0 +1,135 @@
+// Components for manipulating sequences of characters -*- C++ -*-
+
+// Copyright (C) 1997, 1998, 1999, 2000, 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
+// terms of the GNU General Public License as published by the
+// Free Software Foundation; either version 2, or (at your option)
+// any later version.
+
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+// GNU General Public License for more details.
+
+// You should have received a copy of the GNU General Public License along
+// with this library; see the file COPYING.  If not, write to the Free
+// Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307,
+// USA.
+
+// As a special exception, you may use this file as part of a free software
+// library without restriction.  Specifically, if other files instantiate
+// templates or use macros or inline functions from this file, or you compile
+// this file and link it with other files to produce an executable, this// file does not by itself cause the resulting executable to be covered by
+// the GNU General Public License.  This exception does not however
+// invalidate any other reasons why the executable file might be covered by
+// the GNU General Public License.
+
+//
+// ISO C++ 14882: 21  Strings library
+//
+
+// Written by Jason Merrill based upon the specification by Takanori Adachi
+// in ANSI X3J16/94-0013R2.  Rewritten by Nathan Myers.
+
+#include 
+
+// Instantiation configuration.
+#ifndef C
+# define C char
+#endif
+
+namespace std 
+{
+  typedef basic_string S;
+
+  template class basic_string;
+  template S operator+(const C*, const S&);
+  template S operator+(C, const S&);
+} // namespace std
+
+namespace __gnu_cxx
+{
+  using std::S;
+  template bool operator==(const S::iterator&, const S::iterator&);
+  template bool operator==(const S::const_iterator&, const S::const_iterator&);
+}
+
+namespace std
+{
+  // Only one template keyword allowed here. 
+  // See core issue #46 (NAD)
+  // http://anubis.dkuug.dk/jtc1/sc22/wg21/docs/cwg_closed.html#46
+  template
+    S::basic_string(C*, C*, const allocator&);
+
+  template
+    S::basic_string(const C*, const C*, const allocator&);
+
+  template 
+    S::basic_string(S::iterator, S::iterator, const allocator&);
+
+  template 
+    S::basic_string(S::const_iterator, S::const_iterator, const allocator&);
+
+  template 
+    S& 
+    S::_M_replace(S::iterator, S::iterator, S::iterator, S::iterator, 
+		  input_iterator_tag);
+
+  template 
+    S& 
+    S::_M_replace(S::iterator, S::iterator, S::const_iterator, 
+		  S::const_iterator, input_iterator_tag);
+
+  template
+    S&
+    S::_M_replace(S::iterator, S::iterator, C*, C*, input_iterator_tag); 
+
+  template
+    S&
+    S::_M_replace(S::iterator, S::iterator, const C*, const C*, 
+		  input_iterator_tag);  
+
+  template 
+    S& 
+    S::_M_replace_safe(S::iterator, S::iterator, S::iterator, S::iterator);
+
+  template 
+    S& 
+    S::_M_replace_safe(S::iterator, S::iterator, S::const_iterator, 
+		  S::const_iterator);
+
+  template
+    S&
+    S::_M_replace_safe(S::iterator, S::iterator, C*, C*); 
+
+  template
+    S&
+    S::_M_replace_safe(S::iterator, S::iterator, const C*, const C*);  
+
+  template 
+    C* 
+    S::_S_construct(S::iterator, S::iterator, 
+		    const allocator&, forward_iterator_tag);
+
+  template 
+    C* 
+    S::_S_construct(S::const_iterator, S::const_iterator, 
+		    const allocator&, forward_iterator_tag);
+
+  template
+    C*
+    S::_S_construct(C*, C*, const allocator&, forward_iterator_tag);
+
+  template
+    C*
+    S::_S_construct(const C*, const C*, const allocator&,
+		    forward_iterator_tag);
+
+  template
+    void
+    __destroy_aux(S*, S*, __false_type);
+} // namespace std
diff --git a/contrib/libstdc++/src/strstream.cc b/contrib/libstdc++/src/strstream.cc
new file mode 100644
index 0000000..2160c44
--- /dev/null
+++ b/contrib/libstdc++/src/strstream.cc
@@ -0,0 +1,458 @@
+// strstream definitions -*- C++ -*-
+
+// Copyright (C) 2001 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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.
+
+/*
+ * Copyright (c) 1998
+ * Silicon Graphics Computer Systems, Inc.
+ *
+ * Permission to use, copy, modify, distribute and sell this software
+ * and its documentation for any purpose is hereby granted without fee,
+ * provided that the above copyright notice appear in all copies and
+ * that both that copyright notice and this permission notice appear
+ * in supporting documentation.  Silicon Graphics makes no
+ * representations about the suitability of this software for any
+ * purpose.  It is provided "as is" without express or implied warranty.
+ */
+
+// Implementation of the classes in header .
+// WARNING: The classes defined in  are DEPRECATED.  This
+// header is defined in section D.7.1 of the C++ standard, and it
+// MAY BE REMOVED in a future standard revision.  You should use the
+// header  instead.
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+namespace std
+{
+
+// strstreambuf constructor, destructor.
+
+strstreambuf::strstreambuf(streamsize initial_capacity)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(true), _M_frozen(false), _M_constant(false)
+{
+  streamsize n = max(initial_capacity, streamsize(16));
+
+  char* buf = _M_alloc(n);
+  if (buf) {
+    setp(buf, buf + n);
+    setg(buf, buf, buf);
+  }
+}
+
+strstreambuf::strstreambuf(void* (*alloc_f)(size_t), void (*free_f)(void*))
+  : _Base(),
+    _M_alloc_fun(alloc_f), _M_free_fun(free_f),
+    _M_dynamic(true), _M_frozen(false), _M_constant(false)
+{
+  streamsize n = 16;
+
+  char* buf = _M_alloc(n);
+  if (buf) {
+    setp(buf, buf + n);
+    setg(buf, buf, buf);
+  }
+}
+
+strstreambuf::strstreambuf(char* get, streamsize n, char* put)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(false), _M_frozen(false), _M_constant(false)
+{
+  _M_setup(get, put, n);
+}
+
+strstreambuf::strstreambuf(signed char* get, streamsize n, signed char* put)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(false), _M_frozen(false), _M_constant(false)
+{
+  _M_setup(reinterpret_cast(get), reinterpret_cast(put), n);
+}
+
+strstreambuf::strstreambuf(unsigned char* get, streamsize n,
+                           unsigned char* put)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(false), _M_frozen(false), _M_constant(false)
+{
+  _M_setup(reinterpret_cast(get), reinterpret_cast(put), n);
+}
+
+strstreambuf::strstreambuf(const char* get, streamsize n)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(false), _M_frozen(false), _M_constant(true)
+{
+  _M_setup(const_cast(get), 0, n);
+}
+
+strstreambuf::strstreambuf(const signed char* get, streamsize n)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(false), _M_frozen(false), _M_constant(true)
+{
+  _M_setup(reinterpret_cast(const_cast(get)), 0, n);
+}
+
+strstreambuf::strstreambuf(const unsigned char* get, streamsize n)
+  : _Base(),
+    _M_alloc_fun(0), _M_free_fun(0),
+    _M_dynamic(false), _M_frozen(false), _M_constant(true)
+{
+  _M_setup(reinterpret_cast(const_cast(get)), 0, n);
+}
+
+strstreambuf::~strstreambuf()
+{
+  if (_M_dynamic && !_M_frozen)
+    _M_free(eback());
+}
+
+void strstreambuf::freeze(bool frozenflag)
+{
+  if (_M_dynamic)
+    _M_frozen = frozenflag;
+}
+
+char* strstreambuf::str()
+{
+  freeze(true);
+  return eback();
+}
+
+int strstreambuf::pcount() const
+{
+  return pptr() ? pptr() - pbase() : 0;
+}
+
+strstreambuf::int_type strstreambuf::overflow(int_type c) {
+  if (c == traits_type::eof())
+    return traits_type::not_eof(c);
+
+  // Try to expand the buffer.
+  if (pptr() == epptr() && _M_dynamic && !_M_frozen && !_M_constant) {
+    ptrdiff_t old_size = epptr() - pbase();
+    ptrdiff_t new_size = max(2 * old_size, ptrdiff_t(1));
+
+    char* buf = _M_alloc(new_size);
+    if (buf) {
+      memcpy(buf, pbase(), old_size);
+
+      char* old_buffer = pbase();
+      bool reposition_get = false;
+      ptrdiff_t old_get_offset;
+      if (gptr() != 0) {
+        reposition_get = true;
+        old_get_offset = gptr() - eback();
+      }
+
+      setp(buf, buf + new_size);
+      pbump(old_size);
+
+      if (reposition_get)
+        setg(buf, buf + old_get_offset, buf + max(old_get_offset, old_size));
+
+      _M_free(old_buffer);
+    }
+  }
+
+  if (pptr() != epptr()) {
+    *pptr() = c;
+    pbump(1);
+    return c;
+  }
+  else
+    return traits_type::eof();
+}
+
+strstreambuf::int_type strstreambuf::pbackfail(int_type c)
+{
+  if (gptr() != eback()) {
+    if (c == _Traits::eof()) {
+      gbump(-1);
+      return _Traits::not_eof(c);
+    }
+    else if (c == static_cast(gptr()[-1])) {  // KLUDGE
+      gbump(-1);
+      return c;
+    }
+    else if (!_M_constant) {
+      gbump(-1);
+      *gptr() = c;
+      return c;
+    }
+  }
+
+  return _Traits::eof();
+}
+
+strstreambuf::int_type strstreambuf::underflow()
+{
+  if (gptr() == egptr() && pptr() && pptr() > egptr())
+    setg(eback(), gptr(), pptr());
+
+  if (gptr() != egptr())
+    return (unsigned char) *gptr();
+  else
+    return _Traits::eof();
+}
+
+basic_streambuf >*
+strstreambuf::setbuf(char*, streamsize)
+{
+  return this;
+}
+
+strstreambuf::pos_type
+strstreambuf::seekoff(off_type off,
+                      ios_base::seekdir dir, ios_base::openmode mode)
+{
+  bool do_get = false;
+  bool do_put = false;
+
+  if ((mode & (ios_base::in | ios_base::out)) ==
+          (ios_base::in | ios_base::out) &&
+      (dir == ios_base::beg || dir == ios_base::end))
+    do_get = do_put = true;
+  else if (mode & ios_base::in)
+    do_get = true;
+  else if (mode & ios_base::out)
+    do_put = true;
+
+  // !gptr() is here because, according to D.7.1 paragraph 4, the seekable
+  // area is undefined if there is no get area.
+  if ((!do_get && !do_put) || (do_put && !pptr()) || !gptr())
+    return pos_type(off_type(-1));
+
+  char* seeklow  = eback();
+  char* seekhigh = epptr() ? epptr() : egptr();
+
+  off_type newoff;
+  switch(dir) {
+  case ios_base::beg:
+    newoff = 0;
+    break;
+  case ios_base::end:
+    newoff = seekhigh - seeklow;
+    break;
+  case ios_base::cur:
+    newoff = do_put ? pptr() - seeklow : gptr() - seeklow;
+    break;
+  default:
+    return pos_type(off_type(-1));
+  }
+
+  off += newoff;
+  if (off < 0 || off > seekhigh - seeklow)
+    return pos_type(off_type(-1));
+
+  if (do_put) {
+    if (seeklow + off < pbase()) {
+      setp(seeklow, epptr());
+      pbump(off);
+    }
+    else {
+      setp(pbase(), epptr());
+      pbump(off - (pbase() - seeklow));
+    }
+  }
+  if (do_get) {
+    if (off <= egptr() - seeklow)
+      setg(seeklow, seeklow + off, egptr());
+    else if (off <= pptr() - seeklow)
+      setg(seeklow, seeklow + off, pptr());
+    else
+      setg(seeklow, seeklow + off, epptr());
+  }
+
+  return pos_type(newoff);
+}
+
+strstreambuf::pos_type
+strstreambuf::seekpos(pos_type pos, ios_base::openmode mode)
+{
+  return seekoff(pos - pos_type(off_type(0)), ios_base::beg, mode);
+}
+
+char* strstreambuf::_M_alloc(size_t n)
+{
+  if (_M_alloc_fun)
+    return static_cast(_M_alloc_fun(n));
+  else
+    return new char[n];
+}
+
+void strstreambuf::_M_free(char* p)
+{
+  if (p)
+    if (_M_free_fun)
+      _M_free_fun(p);
+    else
+      delete[] p;
+}
+
+void strstreambuf::_M_setup(char* get, char* put, streamsize n)
+{
+  if (get) {
+    size_t N = n > 0 ? size_t(n) : n == 0 ? strlen(get) : size_t(INT_MAX);
+
+    if (put) {
+      setg(get, get, put);
+      setp(put, put + N);
+    }
+    else {
+      setg(get, get, get + N);
+    }
+  }
+}
+
+//----------------------------------------------------------------------
+// Class istrstream
+
+istrstream::istrstream(char* s)
+  : basic_ios(), basic_istream(0), _M_buf(s, 0)
+{
+  basic_ios::init(&_M_buf);
+}
+
+istrstream::istrstream(const char* s)
+  : basic_ios(), basic_istream(0), _M_buf(s, 0)
+{
+  basic_ios::init(&_M_buf);
+}
+
+istrstream::istrstream(char* s, streamsize n)
+  : basic_ios(), basic_istream(0), _M_buf(s, n)
+{
+  basic_ios::init(&_M_buf);
+}
+
+istrstream::istrstream(const char* s, streamsize n)
+  : basic_ios(), basic_istream(0), _M_buf(s, n)
+{
+  basic_ios::init(&_M_buf);
+}
+
+istrstream::~istrstream() {}
+
+strstreambuf* istrstream::rdbuf() const {
+  return const_cast(&_M_buf);
+}
+
+char* istrstream::str() { return _M_buf.str(); }
+
+//----------------------------------------------------------------------
+// Class ostrstream
+
+ostrstream::ostrstream()
+  : basic_ios(), basic_ostream(0), _M_buf()
+{
+  basic_ios::init(&_M_buf);
+}
+
+ostrstream::ostrstream(char* s, int n, ios_base::openmode mode)
+  : basic_ios(), basic_ostream(0),
+    _M_buf(s, n, mode & ios_base::app ? s + strlen(s) : s)
+{
+  basic_ios::init(&_M_buf);
+}
+
+ostrstream::~ostrstream() {}
+
+strstreambuf* ostrstream::rdbuf() const
+{
+  return const_cast(&_M_buf);
+}
+
+void ostrstream::freeze(bool freezeflag)
+{
+  _M_buf.freeze(freezeflag);
+}
+
+char* ostrstream::str()
+{
+  return _M_buf.str();
+}
+
+int ostrstream::pcount() const
+{
+  return _M_buf.pcount();
+}
+
+//----------------------------------------------------------------------
+// Class strstream
+
+strstream::strstream()
+  : basic_ios(), basic_iostream(0), _M_buf()
+{
+  basic_ios::init(&_M_buf);
+}
+
+strstream::strstream(char* s, int n, ios_base::openmode mode)
+  : basic_ios(), basic_iostream(0),
+    _M_buf(s, n, mode & ios_base::app ? s + strlen(s) : s)
+{
+  basic_ios::init(&_M_buf);
+}
+
+strstream::~strstream() {}
+
+strstreambuf* strstream::rdbuf() const
+{
+  return const_cast(&_M_buf);
+}
+
+void strstream::freeze(bool freezeflag)
+{
+  _M_buf.freeze(freezeflag);
+}
+
+int strstream::pcount() const
+{
+  return _M_buf.pcount();
+}
+
+char* strstream::str()
+{
+  return _M_buf.str();
+}
+
+} // namespace std
+
+// Local Variables:
+// mode:C++
+// End:
diff --git a/contrib/libstdc++/src/valarray-inst.cc b/contrib/libstdc++/src/valarray-inst.cc
new file mode 100644
index 0000000..b56a911
--- /dev/null
+++ b/contrib/libstdc++/src/valarray-inst.cc
@@ -0,0 +1,118 @@
+// Explicit instantiation file.
+
+// Copyright (C) 2001 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:
+//
+
+#include 
+
+namespace std
+{
+  // Some explicit instanciations.
+  template void
+     __valarray_fill(size_t* __restrict__, size_t, const size_t&);
+  
+  template void
+     __valarray_copy(const size_t* __restrict__, size_t, size_t* __restrict__);
+  
+  template valarray::valarray(size_t);
+  template valarray::valarray(const valarray&);
+  template valarray::~valarray();
+  template size_t valarray::size() const;
+  template size_t& valarray::operator[](size_t);
+
+
+  inline size_t
+  __valarray_product(const valarray& __a)
+  {
+    typedef const size_t* __restrict__ _Tp;
+    const size_t __n = __a.size();
+    // XXX: This ugly cast is necessary because
+    //      valarray::operator[]() const return a VALUE!
+    //      Try to get the committee to correct that gross error.
+    valarray& __t = const_cast&>(__a);
+    return __valarray_product(&__t[0], &__t[0] + __n);
+  }
+  
+  // Map a gslice, described by its multidimensional LENGTHS
+  // and corresponding STRIDES, to a linear array of INDEXES
+  // for the purpose of indexing a flat, one-dimensional array
+  // representation of a gslice_array.
+  void
+  __gslice_to_index(size_t __o, const valarray& __l,
+                    const valarray& __s, valarray& __i)
+  {
+    // There are as much as dimensions as there are strides.
+    size_t __n = __l.size();
+
+    // Get a buffer to hold current multi-index as we go through
+    // the gslice for the purpose of computing its linear-image.
+    size_t* const __t = static_cast
+      (__builtin_alloca(__n * sizeof (size_t)));
+    __valarray_fill(__t, __n, size_t(0));
+
+    // Note that this should match the product of all numbers appearing
+    // in __l which describes the multidimensional sizes of the
+    // the generalized slice.
+    const size_t __z = __i.size();
+    
+    for (size_t __j = 0; __j < __z; ++__j)
+      {
+        // Compute the linear-index image of (t_0, ... t_{n-1}).
+        // Normaly, we should use inner_product<>(), but we do it the
+        // the hard way here to avoid link-time can of worms.
+        size_t __a = __o;
+        for (size_t __k = 0; __k < __n; ++__k)
+          __a += __s[__k] * __t[__k];
+
+        __i[__j] = __a;
+
+        // Process the next multi-index.  The loop ought to be
+        // backward since we're making a lexicagraphical visit.
+        ++__t[__n - 1];
+        for (size_t __k2 = __n - 1; __k2; --__k2)
+          {
+            if (__t[__k2] >= __l[__k2])
+              {
+                __t[__k2] = 0;
+                ++__t[__k2 - 1];
+              }
+          }
+      }
+  }
+  
+  gslice::_Indexer::_Indexer(size_t __o, const valarray& __l,
+                             const valarray& __s)
+      : _M_count(1), _M_start(__o), _M_size(__l), _M_stride(__s),
+        _M_index(__l.size() == 0 ? 0 : __valarray_product(__l))
+  { __gslice_to_index(__o, __l, __s, _M_index); }
+  
+} // namespace std
+
diff --git a/contrib/libstdc++/src/vterminate.cc b/contrib/libstdc++/src/vterminate.cc
new file mode 100644
index 0000000..a3543c9
--- /dev/null
+++ b/contrib/libstdc++/src/vterminate.cc
@@ -0,0 +1,83 @@
+// Verbose terminate_handler -*- C++ -*-
+
+// Copyright (C) 2001, 2002 Free Software Foundation
+//
+// This file is part of GNU CC.
+//
+// GNU CC 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.
+// 
+// GNU CC 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 GNU CC; 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 
+#include 
+#include 
+#include 
+#include 
+
+using namespace std;
+using namespace abi;
+
+namespace __gnu_cxx
+{
+  /* A replacement for the standard terminate_handler which prints
+   more information about the terminating exception (if any) on
+   stderr.  */
+  void __verbose_terminate_handler()
+  {
+    // Make sure there was an exception; terminate is also called for an
+    // attempt to rethrow when there is no suitable exception.
+    type_info *t = __cxa_current_exception_type();
+    if (t)
+      {
+	char const *name = t->name();
+	// Note that "name" is the mangled name.
+	
+	{
+	  int status = -1;
+	  char *dem = 0;
+	  
+	  // Disabled until __cxa_demangle gets the runtime GPL exception.
+	  dem = __cxa_demangle(name, 0, 0, &status);
+
+	  printf("terminate called after throwing a `%s'\n", 
+		 status == 0 ? dem : name);
+
+	  if (status == 0)
+	    free(dem);
+	}
+
+	// If the exception is derived from std::exception, we can give more
+	// information.
+	try { __throw_exception_again; }
+#ifdef __EXCEPTIONS
+	catch (exception &exc)
+	  { fprintf(stderr, "  what(): %s\n", exc.what()); }
+#endif
+	catch (...) { }
+      }
+    else
+      fprintf(stderr, "terminate called without an active exception\n");
+    
+    abort();
+  }
+} // namespace __gnu_cxx
diff --git a/contrib/libstdc++/src/wstring-inst.cc b/contrib/libstdc++/src/wstring-inst.cc
new file mode 100644
index 0000000..0200fd4
--- /dev/null
+++ b/contrib/libstdc++/src/wstring-inst.cc
@@ -0,0 +1,6 @@
+#include 
+
+#ifdef _GLIBCPP_USE_WCHAR_T
+#define C wchar_t
+#include "string-inst.cc"
+#endif
diff --git a/contrib/libstdc++/testsuite_flags.in b/contrib/libstdc++/testsuite_flags.in
new file mode 100755
index 0000000..1a24b5e
--- /dev/null
+++ b/contrib/libstdc++/testsuite_flags.in
@@ -0,0 +1,61 @@
+#!/bin/sh
+
+#
+# This script computes the various flags needed to run GNU C++ testsuites
+# (compiler specific as well as library specific). 
+#
+# Written by Benjamin Kosnik 
+#            Gabriel Dos Reis 
+#
+
+# Print a message saying how this script is intended to be invoked
+print_usage() {
+    cat <