2005-02-24 Benjamin Kosnik * acinclude.m4: Adjust so that _GLIBCXX_USE_C99 implies using _GLIBCXX_USE_C99_COMPLEX, _GLIBCXX_USE_C99_MATH, and _GLIBCXX_USE_C99_WCHAR. Remove GLIBCXX_ENABLE_C_MBCHAR, consolidate in GLIBCXX_ENABLE_C99. Take C99 bits from GLIBCXX_CHECK_WCHAR_T_SUPPORT and put in GLIBCXX_ENABLE_C99. Change GLIBCXX_CHECK_WCHAR_T_SUPPORT to GLIBCXX_CHECK_ICONV_SUPPORT. * configure.ac: Remove GLIBCXX_ENABLE_C_MBCHAR, use GLIBCXX_CHECK_ICONV_SUPPORT. * crossconfig.m4: Same. * docs/*: Cleanups. * acconfig.h: Same, adjust comments. * config.h.in: Regenerate. * configure: Regenerate. * config/locale/gnu/c++locale_internal.h: Guard wide functions with _GLIBCXX_USE_WCHAR_T. Index: acconfig.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/acconfig.h,v retrieving revision 1.47 diff -c -p -r1.47 acconfig.h *** acconfig.h 24 Feb 2005 18:55:16 -0000 1.47 --- acconfig.h 25 Feb 2005 23:07:31 -0000 *************** *** 13,25 **** // Include I/O support for 'long long' and 'unsigned long long'. #undef _GLIBCXX_USE_LONG_LONG ! // Define if C99 features such as lldiv_t, llabs, lldiv should be exposed. #undef _GLIBCXX_USE_C99 ! // Define if C99 math functions (like fpclassify) should be exposed. #undef _GLIBCXX_USE_C99_MATH ! // Define if C99 complex math functions should be used in std::complex. #undef _GLIBCXX_USE_C99_COMPLEX // Define if code specialized for wchar_t should be used. --- 13,31 ---- // Include I/O support for 'long long' and 'unsigned long long'. #undef _GLIBCXX_USE_LONG_LONG ! // Define if C99 functions or macros from , , ! // , , or should be used or exposed. ! // NB: Defining this implies _GLIBCXX_USE_C99_MATH and ! // _GLIBCXX_USE_C99_COMPLEX. #undef _GLIBCXX_USE_C99 ! // Define if C99 functions or macros in (like fpclassify) ! // should be imported in in namespace std. #undef _GLIBCXX_USE_C99_MATH ! // Define if C99 functions in should be used in ! // . NB: Using compiler builtins for these functions ! // requires corresponding C99 library functions to be present. #undef _GLIBCXX_USE_C99_COMPLEX // Define if code specialized for wchar_t should be used. Index: acinclude.m4 =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/acinclude.m4,v retrieving revision 1.307 diff -c -p -r1.307 acinclude.m4 *** acinclude.m4 24 Feb 2005 18:55:16 -0000 1.307 --- acinclude.m4 25 Feb 2005 23:07:32 -0000 *************** AC_DEFUN([GLIBCXX_CHECK_LINKER_FEATURES] *** 296,380 **** dnl ! dnl Check to see if this target can enable the wchar_t parts. ! dnl If --disable-c-mbchar was given, no wchar_t stuff is enabled. (This ! dnl must have been previously checked.) By default, wide characters are ! dnl disabled. dnl dnl Defines: ! dnl HAVE_MBSTATE_T if mbstate_t is not in wchar.h ! dnl _GLIBCXX_USE_WCHAR_T if all the bits are found. dnl Substs: dnl LIBICONV to a -l string containing the iconv library, if needed. dnl ! AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT], [ ! # Test wchar.h for mbstate_t, which is needed for char_traits and ! # 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 ! ! # 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) # 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 ! ! # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before ! # 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) ! ! # Test wchar.h for WEOF, which is what we use to determine whether ! # 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) ! ! # Tests for wide character functions used in char_traits. ! ac_wfuncs=yes ! AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset], ! [],[ac_wfuncs=no]) ! ! # Checks for names injected into std:: by the c_std headers. ! AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \ ! fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \ ! vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \ ! mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \ ! wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \ ! wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr], ! [],[ac_wfuncs=no]) ! ! # Checks for wide character functions that are not required ! # for basic wchar_t support. Don't disable support if they are missing. ! # Injection of these is wrapped with guard macros. ! AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[]) ! ! 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) # Use iconv for wchar_t to char conversions. As such, check for # X/Open Portability Guide, version 2 features (XPG2). --- 296,316 ---- dnl ! dnl Check to see if this target can enable the iconv specializations. ! dnl If --disable-c-mbchar was given, no wchar_t specialization is enabled. ! dnl (This must have been previously checked, along with the rest of C99 ! dnl support.) By default, iconv support is disabled. dnl dnl Defines: ! dnl _GLIBCXX_USE_ICONV if all the bits are found. dnl Substs: dnl LIBICONV to a -l string containing the iconv library, if needed. dnl ! AC_DEFUN([GLIBCXX_CHECK_ICONV_SUPPORT], [ + enable_iconv=no # Only continue checking if the ISO C99 headers exist and support is on. ! if test x"$enable_wchar_t" = xyes; then # Use iconv for wchar_t to char conversions. As such, check for # X/Open Portability Guide, version 2 features (XPG2). *************** AC_DEFUN([GLIBCXX_CHECK_WCHAR_T_SUPPORT] *** 392,419 **** 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) ! ! # At the moment, only enable wchar_t specializations if all the ! # above support is present. ! if test x"$ac_isoC99_wchar_t" = xyes && ! test x"$ac_XPG2_wchar_t" = xyes; ! then ! AC_DEFINE(_GLIBCXX_USE_WCHAR_T) ! enable_wchar_t=yes fi fi ! AC_MSG_CHECKING([for enabled wchar_t specializations]) ! AC_MSG_RESULT($enable_wchar_t) ]) --- 328,343 ---- LIBS="$ac_save_LIBS" if test x"$ac_has_iconv_h" = xyes && test x"$ac_has_langinfo_h" = xyes && test x"$ac_XPG2funcs" = xyes; then ! AC_DEFINE(_GLIBCXX_USE_ICONV) ! enable_iconv=yes fi fi ! AC_MSG_CHECKING([for enabled iconv specializations]) ! AC_MSG_RESULT($enable_iconv) ]) *************** dnl *** 844,849 **** --- 768,787 ---- AC_DEFUN([GLIBCXX_ENABLE_C99], [ GLIBCXX_ENABLE(c99,$1,,[turns on ISO/IEC 9899:1999 support]) + # Test wchar.h for mbstate_t, which is needed for char_traits and + # others even if wchar_t support is not on. + AC_CHECK_HEADERS(wchar.h, ac_has_wchar_h=yes, ac_has_wchar_h=no) + 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 + + if test x"$enable_c99" = x"yes"; then + AC_LANG_SAVE AC_LANG_CPLUSPLUS *************** AC_DEFUN([GLIBCXX_ENABLE_C99], [ *** 1019,1032 **** # 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]) --- 957,962 ---- *************** AC_DEFUN([GLIBCXX_ENABLE_C99], [ *** 1036,1059 **** 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_complex" = x"no" || test x"$ac_c99_stdio" = x"no" || --- 966,1052 ---- 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]) ! AC_CACHE_VAL(ac_c99_lldiv_t, [ ! AC_TRY_COMPILE([#include ], [ lldiv_t mydivt;],, ! [ac_c99_stdlib=no]) ! ]) AC_MSG_RESULT($ac_c99_stdlib) ! # Check for the existence in of wcstoull, WEOF, etc. ! # First, check to see if support for wchar and multibyte characters ! # was turned off at the top level of the gcc configury. If so, bail. ! ac_c99_wchar=no; ! GLIBCXX_ENABLE(c-mbchar,yes,,[enable multibyte (wide) characters]) ! ! # Sanity check for existence of ISO C99 headers for extended encoding. ! AC_CHECK_HEADERS(wctype.h, ac_has_wctype_h=yes, ac_has_wctype_h=no) ! ! # 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 ! ! ac_c99_wchar=yes; ! 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]) ! # Test wchar.h for WCHAR_MIN, WCHAR_MAX, which is needed before ! # 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) ! ! # Test wchar.h for WEOF, which is what we use to determine whether ! # to define specializations 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) ! ! # Tests for wide character functions used in char_traits. ! ac_wfuncs=yes ! AC_CHECK_FUNCS([wcslen wmemchr wmemcmp wmemcpy wmemmove wmemset], ! [],[ac_wfuncs=no]) ! ! # Checks for names injected into std:: by the c_std headers. ! AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \ ! fwprintf fwscanf swprintf swscanf vfwprintf vswprintf \ ! vwprintf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \ ! mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstol \ ! wcstoul wcscpy wcsncpy wcscat wcsncat wcscmp wcscoll wcsncmp wcsxfrm \ ! wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr], ! [],[ac_wfuncs=no]) ! ! # Checks for wide character functions that are not required ! # for basic wchar_t support. Don't disable support if they are missing. ! # Injection of these is wrapped with guard macros. ! AC_CHECK_FUNCS([vfwscanf vswscanf vwscanf wcstof iswblank],[],[]) ! ! if test x"$ac_c99_wchar" = xyes && ! test x"$has_weof" = xyes && ! test x"$has_wchar_minmax" = xyes && ! test x"$ac_wfuncs" = xyes; ! then ! AC_DEFINE(_GLIBCXX_USE_WCHAR_T) ! ac_c99_wchar=yes ! enable_wchar_t=yes ! else ! ac_c99_wchar=no ! fi ! ! AC_MSG_CHECKING([for ISO C99 support in ]) ! AC_MSG_RESULT($ac_c99_wchar) ! fi ! if test x"$ac_c99_math" = x"no" || test x"$ac_c99_complex" = x"no" || test x"$ac_c99_stdio" = x"no" || *************** AC_DEFUN([GLIBCXX_ENABLE_C99], [ *** 1061,1067 **** 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 --- 1054,1059 ---- *************** AC_DEFUN([GLIBCXX_ENABLE_C99], [ *** 1069,1074 **** --- 1061,1070 ---- fi AC_LANG_RESTORE + fi + + AC_MSG_CHECKING([for fully enabled ISO C99 support]) + AC_MSG_RESULT($enable_c99) ]) *************** AC_DEFUN([GLIBCXX_ENABLE_CXX_FLAGS], [dn *** 1451,1471 **** 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 --enable-c-mbchar requests all the wchar_t stuff. - dnl --disable-c-mbchar doesn't. - dnl + Usage: GLIBCXX_ENABLE_C_MBCHAR[(DEFAULT)] - dnl Where DEFAULT is either `yes' or `no'. - dnl - AC_DEFUN([GLIBCXX_ENABLE_C_MBCHAR], [ - GLIBCXX_ENABLE(c-mbchar,$1,,[enable multibyte (wide) characters]) - # Option parsed, now other scripts can test enable_c_mbchar for yes/no. - ]) - - - dnl dnl Check to see if debugging libraries are to be built. dnl dnl --enable-libstdcxx-debug --- 1447,1452 ---- Index: configure.ac =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/configure.ac,v retrieving revision 1.32 diff -c -p -r1.32 configure.ac *** configure.ac 3 Jan 2005 21:31:33 -0000 1.32 --- configure.ac 25 Feb 2005 23:07:32 -0000 *************** GLIBCXX_ENABLE_SJLJ_EXCEPTIONS *** 81,92 **** GLIBCXX_ENABLE_PCH($is_hosted) # Enable all the variable C++ runtime options. - # NB: C_MBCHAR must come early. GLIBCXX_ENABLE_CSTDIO GLIBCXX_ENABLE_CLOCALE GLIBCXX_ENABLE_ALLOCATOR GLIBCXX_ENABLE_CHEADERS($c_model) dnl c_model from configure.host - GLIBCXX_ENABLE_C_MBCHAR([yes]) GLIBCXX_ENABLE_C99([yes]) GLIBCXX_ENABLE_LONG_LONG([yes]) GLIBCXX_ENABLE_THREADS --- 81,90 ---- *************** if $GLIBCXX_IS_NATIVE; then *** 124,130 **** GLIBCXX_CHECK_MATH_SUPPORT GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT GLIBCXX_CHECK_STDLIB_SUPPORT # For showmanyc_helper(). --- 122,128 ---- GLIBCXX_CHECK_MATH_SUPPORT GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT GLIBCXX_CHECK_STDLIB_SUPPORT # For showmanyc_helper(). Index: crossconfig.m4 =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/crossconfig.m4,v retrieving revision 1.19 diff -c -p -r1.19 crossconfig.m4 *** crossconfig.m4 1 Feb 2005 06:56:19 -0000 1.19 --- crossconfig.m4 25 Feb 2005 23:07:32 -0000 *************** *** 1,5 **** dnl ! dnl This file contains stuff. dnl # Base decisions on target environment. --- 1,5 ---- dnl ! dnl This file contains details for non-natives builds. dnl # Base decisions on target environment. *************** case "${host}" in *** 21,27 **** GLIBCXX_CHECK_MATH_SUPPORT GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT GLIBCXX_CHECK_STDLIB_SUPPORT # For showmanyc_helper(). --- 21,27 ---- GLIBCXX_CHECK_MATH_SUPPORT GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT GLIBCXX_CHECK_STDLIB_SUPPORT # For showmanyc_helper(). *************** case "${host}" in *** 56,62 **** GLIBCXX_CHECK_MATH_SUPPORT GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT GLIBCXX_CHECK_STDLIB_SUPPORT GLIBCXX_CHECK_S_ISREG_OR_S_IFREG AC_DEFINE(HAVE_WRITEV) --- 56,62 ---- GLIBCXX_CHECK_MATH_SUPPORT GLIBCXX_CHECK_BUILTIN_MATH_SUPPORT GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT GLIBCXX_CHECK_STDLIB_SUPPORT GLIBCXX_CHECK_S_ISREG_OR_S_IFREG AC_DEFINE(HAVE_WRITEV) *************** case "${host}" in *** 71,77 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT AC_DEFINE(HAVE_LC_MESSAGES) AC_DEFINE(HAVE_GETPAGESIZE) AC_DEFINE(HAVE_SETENV) --- 71,77 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT AC_DEFINE(HAVE_LC_MESSAGES) AC_DEFINE(HAVE_GETPAGESIZE) AC_DEFINE(HAVE_SETENV) *************** case "${host}" in *** 126,132 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) AC_DEFINE(HAVE_FREXPF) --- 126,132 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) AC_DEFINE(HAVE_FREXPF) *************** case "${host}" in *** 150,156 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT # For LFS. AC_DEFINE(HAVE_INT64_T) --- 150,156 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT # For LFS. AC_DEFINE(HAVE_INT64_T) *************** case "${host}" in *** 237,243 **** AC_CHECK_HEADERS([sys/types.h locale.h float.h]) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT ;; *-netbsd*) AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ --- 237,243 ---- AC_CHECK_HEADERS([sys/types.h locale.h float.h]) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT ;; *-netbsd*) AC_CHECK_HEADERS([nan.h ieeefp.h endian.h sys/isa_defs.h \ *************** case "${host}" in *** 247,253 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) AC_DEFINE(HAVE_FINITEF) --- 247,253 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) AC_DEFINE(HAVE_FINITEF) *************** case "${host}" in *** 271,277 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT # For showmanyc_helper(). AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) --- 271,277 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT # For showmanyc_helper(). AC_CHECK_HEADERS(sys/ioctl.h sys/filio.h) *************** case "${host}" in *** 287,293 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT AC_DEFINE(HAVE_COSF) AC_DEFINE(HAVE_COSL) AC_DEFINE(HAVE_COSHF) --- 287,293 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT AC_DEFINE(HAVE_COSF) AC_DEFINE(HAVE_COSL) AC_DEFINE(HAVE_COSHF) *************** case "${host}" in *** 377,386 **** AC_DEFINE(HAVE_ICONV_OPEN) # Look for the pieces required for wchar_t support in order to # get all the right HAVE_* macros defined. ! GLIBCXX_CHECK_WCHAR_T_SUPPORT # All of the dependencies for wide character support are here, so # turn it on. This requires some syncronization with the ! # GLIBCXX_CHECK_WCHAR_T_SUPPORT in acinclude.m4 AC_DEFINE(_GLIBCXX_USE_WCHAR_T) # Are these tested for even when cross? AC_DEFINE(HAVE_FLOAT_H) --- 377,386 ---- AC_DEFINE(HAVE_ICONV_OPEN) # Look for the pieces required for wchar_t support in order to # get all the right HAVE_* macros defined. ! GLIBCXX_CHECK_ICONV_SUPPORT # All of the dependencies for wide character support are here, so # turn it on. This requires some syncronization with the ! # GLIBCXX_CHECK_ICONV_SUPPORT in acinclude.m4 AC_DEFINE(_GLIBCXX_USE_WCHAR_T) # Are these tested for even when cross? AC_DEFINE(HAVE_FLOAT_H) *************** case "${host}" in *** 435,441 **** AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_WCHAR_T_SUPPORT AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) AC_DEFINE(HAVE_FINITE) --- 435,441 ---- AC_SUBST(SECTION_FLAGS) GLIBCXX_CHECK_LINKER_FEATURES GLIBCXX_CHECK_COMPLEX_MATH_SUPPORT ! GLIBCXX_CHECK_ICONV_SUPPORT AC_DEFINE(HAVE_COPYSIGN) AC_DEFINE(HAVE_COPYSIGNF) AC_DEFINE(HAVE_FINITE) Index: config/locale/gnu/c_locale.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/gnu/c_locale.h,v retrieving revision 1.12 diff -c -p -r1.12 c_locale.h *** config/locale/gnu/c_locale.h 7 Aug 2004 13:48:31 -0000 1.12 --- config/locale/gnu/c_locale.h 25 Feb 2005 23:07:32 -0000 *************** *** 1,6 **** // Wrapper for underlying C-language localization -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the --- 1,6 ---- // Wrapper for underlying C-language localization -*- C++ -*- ! // Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the *************** namespace std *** 66,72 **** // be avoided. template int ! __convert_from_v(char* __out, const int __size, const char* __fmt, #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) _Tv __v, const __c_locale& __cloc, int __prec) { --- 66,74 ---- // be avoided. template int ! __convert_from_v(char* __out, ! const int __size __attribute__ ((__unused__)), ! const char* __fmt, #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) _Tv __v, const __c_locale& __cloc, int __prec) { Index: config/locale/gnu/c++locale_internal.h =================================================================== RCS file: /cvs/gcc/gcc/libstdc++-v3/config/locale/gnu/c++locale_internal.h,v retrieving revision 1.3 diff -c -p -r1.3 c++locale_internal.h *** config/locale/gnu/c++locale_internal.h 2 Feb 2004 23:45:34 -0000 1.3 --- config/locale/gnu/c++locale_internal.h 25 Feb 2005 23:07:32 -0000 *************** *** 1,6 **** // Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ! // Copyright (C) 2002, 2004 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the --- 1,6 ---- // Prototypes for GLIBC thread locale __-prefixed functions -*- C++ -*- ! // Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc. // // This file is part of the GNU ISO C++ Library. This library is free // software; you can redistribute it and/or modify it under the *************** *** 29,39 **** // Written by Jakub Jelinek #include #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) - extern "C" __typeof(iswctype_l) __iswctype_l; extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; extern "C" __typeof(strcoll_l) __strcoll_l; extern "C" __typeof(strftime_l) __strftime_l; --- 29,39 ---- // Written by Jakub Jelinek + #include #include #if __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) extern "C" __typeof(nl_langinfo_l) __nl_langinfo_l; extern "C" __typeof(strcoll_l) __strcoll_l; extern "C" __typeof(strftime_l) __strftime_l; *************** extern "C" __typeof(strtod_l) __strtod_l *** 41,55 **** extern "C" __typeof(strtof_l) __strtof_l; extern "C" __typeof(strtold_l) __strtold_l; extern "C" __typeof(strxfrm_l) __strxfrm_l; extern "C" __typeof(towlower_l) __towlower_l; extern "C" __typeof(towupper_l) __towupper_l; extern "C" __typeof(wcscoll_l) __wcscoll_l; extern "C" __typeof(wcsftime_l) __wcsftime_l; extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; extern "C" __typeof(wctype_l) __wctype_l; ! extern "C" __typeof(newlocale) __newlocale; ! extern "C" __typeof(freelocale) __freelocale; ! extern "C" __typeof(duplocale) __duplocale; ! extern "C" __typeof(uselocale) __uselocale; #endif // GLIBC 2.3 and later --- 41,59 ---- extern "C" __typeof(strtof_l) __strtof_l; extern "C" __typeof(strtold_l) __strtold_l; extern "C" __typeof(strxfrm_l) __strxfrm_l; + extern "C" __typeof(newlocale) __newlocale; + extern "C" __typeof(freelocale) __freelocale; + extern "C" __typeof(duplocale) __duplocale; + extern "C" __typeof(uselocale) __uselocale; + + #ifdef _GLIBCXX_USE_WCHAR_T + extern "C" __typeof(iswctype_l) __iswctype_l; extern "C" __typeof(towlower_l) __towlower_l; extern "C" __typeof(towupper_l) __towupper_l; extern "C" __typeof(wcscoll_l) __wcscoll_l; extern "C" __typeof(wcsftime_l) __wcsftime_l; extern "C" __typeof(wcsxfrm_l) __wcsxfrm_l; extern "C" __typeof(wctype_l) __wctype_l; ! #endif #endif // GLIBC 2.3 and later