Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/gnu PR/29832: J.T. Conklin: libstdc++ missing std::wstring s...
details: https://anonhg.NetBSD.org/src/rev/c3e12c5bd88d
branches: trunk
changeset: 579893:c3e12c5bd88d
user: christos <christos%NetBSD.org@localhost>
date: Wed Mar 30 19:17:45 2005 +0000
description:
PR/29832: J.T. Conklin: libstdc++ missing std::wstring support
This wonderful patch together with yesterdays wcsftime addition, makes
us able to use wide strings in c++
diffstat:
gnu/dist/gcc/libstdc++-v3/acinclude.m4 | 18 +++-
gnu/dist/gcc/libstdc++-v3/include/c_std/std_cwchar.h | 78 ++++++++++++++++---
gnu/lib/libstdc++-v3/arch/i386/c++config.h | 4 +-
gnu/lib/libstdc++-v3/arch/i386/config.h | 4 +-
4 files changed, 81 insertions(+), 23 deletions(-)
diffs (223 lines):
diff -r bd99d8c2c21a -r c3e12c5bd88d gnu/dist/gcc/libstdc++-v3/acinclude.m4
--- a/gnu/dist/gcc/libstdc++-v3/acinclude.m4 Wed Mar 30 18:53:33 2005 +0000
+++ b/gnu/dist/gcc/libstdc++-v3/acinclude.m4 Wed Mar 30 19:17:45 2005 +0000
@@ -987,13 +987,19 @@
ac_wfuncs=no)
dnl 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 vfwscanf vswprintf vswscanf \
- vwprintf vwscanf wprintf wscanf getwc getwchar mbsinit mbrlen mbrtowc \
- mbsrtowcs wcsrtombs putwc putwchar ungetwc wcrtomb wcstod wcstof wcstol \
+ AC_CHECK_FUNCS([btowc wctob fgetwc fgetws fputwc fputws fwide \
+ 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)
+ wcscspn wcsspn wcstok wcsftime wcschr wcspbrk wcsrchr wcsstr,
+ [],[ac_wfuncs=no])
+
+ dnl Checks for wide character functions that are not required
+ dnl for basic wchar_t support. Don't disable support if they are missing.
+ dnl Injection of these is wrapped with guard macros.
+ AC_CHECK_FUNCS([fwprintf fwscanf swprintf swscanf vfwprintf vfwscanf \
+ vswprintf vswscanf vwprintf vwscanf wcstof wprintf wscanf \
+ iswblank],[],[])
AC_MSG_CHECKING([for ISO C99 wchar_t support])
if test x"$has_weof" = xyes &&
diff -r bd99d8c2c21a -r c3e12c5bd88d gnu/dist/gcc/libstdc++-v3/include/c_std/std_cwchar.h
--- a/gnu/dist/gcc/libstdc++-v3/include/c_std/std_cwchar.h Wed Mar 30 18:53:33 2005 +0000
+++ b/gnu/dist/gcc/libstdc++-v3/include/c_std/std_cwchar.h Wed Mar 30 19:17:45 2005 +0000
@@ -78,8 +78,12 @@
#undef fputwc
#undef fputws
#undef fwide
-#undef fwprintf
-#undef fwscanf
+#if _GLIBCXX_HAVE_FWPRINTF
+# undef fwprintf
+#endif
+#if _GLIBCXX_HAVE_FWSCANF
+# undef fwscanf
+#endif
#undef getwc
#undef getwchar
#undef mbrlen
@@ -88,15 +92,31 @@
#undef mbsrtowcs
#undef putwc
#undef putwchar
-#undef swprintf
-#undef swscanf
+#if _GLIBCXX_HAVE_SWPRINTF
+# undef swprintf
+#endif
+#if _GLIBCXX_HAVE_SWSCANF
+# undef swscanf
+#endif
#undef ungetwc
-#undef vfwprintf
-#undef vfwscanf
-#undef vswprintf
-#undef vswscanf
-#undef vwprintf
-#undef vwscanf
+#if _GLIBCXX_HAVE_VFWPRINTF
+# undef vfwprintf
+#endif
+#if _GLIBCXX_HAVE_VFWSCANF
+# undef vfwscanf
+#endif
+#if _GLIBCXX_HAVE_VSWPRINTF
+# undef vswprintf
+#endif
+#if _GLIBCXX_HAVE_VSWSCANF
+# undef vswscanf
+#endif
+#if _GLIBCXX_HAVE_VWPRINTF
+# undef vwprintf
+#endif
+#if _GLIBCXX_HAVE_VWSCANF
+# undef vwscanf
+#endif
#undef wcrtomb
#undef wcscat
#undef wcschr
@@ -115,7 +135,9 @@
#undef wcsspn
#undef wcsstr
#undef wcstod
-#undef wcstof
+#if _GLIBCXX_HAVE_WCSTOF
+# undef wcstof
+#endif
#undef wcstok
#undef wcstol
#undef wcstoul
@@ -126,8 +148,12 @@
#undef wmemcpy
#undef wmemmove
#undef wmemset
-#undef wprintf
-#undef wscanf
+#if _GLIBCXX_HAVE_WPRINTF
+# undef wprintf
+#endif
+#if _GLIBCXX_HAVE_WSCANF
+# undef wscanf
+#endif
#if _GLIBCPP_USE_WCHAR_T
namespace std
@@ -140,8 +166,12 @@
using ::fputwc;
using ::fputws;
using ::fwide;
+#if _GLIBCXX_HAVE_FWPRINTF
using ::fwprintf;
+#endif
+#if _GLIBCXX_HAVE_FWSCANF
using ::fwscanf;
+#endif
using ::getwc;
using ::getwchar;
using ::mbrlen;
@@ -150,15 +180,31 @@
using ::mbsrtowcs;
using ::putwc;
using ::putwchar;
+#if _GLIBCXX_HAVE_SWPRINTF
using ::swprintf;
+#endif
+#if _GLIBCXX_HAVE_SWSCANF
using ::swscanf;
+#endif
using ::ungetwc;
+#if _GLIBCXX_HAVE_VFWPRINTF
using ::vfwprintf;
+#endif
+#if _GLIBCXX_HAVE_VWSCANF
using ::vfwscanf;
+#endif
+#if _GLIBCXX_HAVE_VSWPRINTF
using ::vswprintf;
+#endif
+#if _GLIBCXX_HAVE_VSWSCANF
using ::vswscanf;
+#endif
+#if _GLIBCXX_HAVE_VWPRINTF
using ::vwprintf;
+#endif
+#if _GLIBCXX_HAVE_VWSCANF
using ::vwscanf;
+#endif
using ::wcrtomb;
using ::wcscat;
using ::wcscmp;
@@ -173,7 +219,9 @@
using ::wcsrtombs;
using ::wcsspn;
using ::wcstod;
+#if _GLIBCXX_HAVE_WCSTOF
using ::wcstof;
+#endif
using ::wcstok;
using ::wcstol;
using ::wcstoul;
@@ -183,8 +231,12 @@
using ::wmemcpy;
using ::wmemmove;
using ::wmemset;
+#if _GLIBCXX_HAVE_WPRINTF
using ::wprintf;
+#endif
+#if _GLIBCXX_HAVE_WSCANF
using ::wscanf;
+#endif
using ::wcschr;
diff -r bd99d8c2c21a -r c3e12c5bd88d gnu/lib/libstdc++-v3/arch/i386/c++config.h
--- a/gnu/lib/libstdc++-v3/arch/i386/c++config.h Wed Mar 30 18:53:33 2005 +0000
+++ b/gnu/lib/libstdc++-v3/arch/i386/c++config.h Wed Mar 30 19:17:45 2005 +0000
@@ -117,7 +117,7 @@
/* #undef _GLIBCPP_USE_C99 */
// Define if code specialized for wchar_t should be used.
-/* #undef _GLIBCPP_USE_WCHAR_T */
+#define _GLIBCPP_USE_WCHAR_T 1
// Define if using setrlimit to limit memory usage during 'make check'.
/* #undef _GLIBCPP_MEM_LIMITS */
@@ -749,7 +749,7 @@
#define _GLIBCPP_HAVE_WCSCSPN 1
/* Define if you have the wcsftime function. */
-/* #undef _GLIBCPP_HAVE_WCSFTIME */
+#define _GLIBCPP_HAVE_WCSFTIME 1
/* Define if you have the wcslen function. */
#define _GLIBCPP_HAVE_WCSLEN 1
diff -r bd99d8c2c21a -r c3e12c5bd88d gnu/lib/libstdc++-v3/arch/i386/config.h
--- a/gnu/lib/libstdc++-v3/arch/i386/config.h Wed Mar 30 18:53:33 2005 +0000
+++ b/gnu/lib/libstdc++-v3/arch/i386/config.h Wed Mar 30 19:17:45 2005 +0000
@@ -17,7 +17,7 @@
/* #undef _GLIBCPP_USE_C99 */
// Define if code specialized for wchar_t should be used.
-/* #undef _GLIBCPP_USE_WCHAR_T */
+#define _GLIBCPP_USE_WCHAR_T 1
// Define if using setrlimit to limit memory usage during 'make check'.
/* #undef _GLIBCPP_MEM_LIMITS */
@@ -649,7 +649,7 @@
#define HAVE_WCSCSPN 1
/* Define if you have the wcsftime function. */
-/* #undef HAVE_WCSFTIME */
+#define HAVE_WCSFTIME 1
/* Define if you have the wcslen function. */
#define HAVE_WCSLEN 1
Home |
Main Index |
Thread Index |
Old Index