aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog9
-rw-r--r--libstdc++-v3/acinclude.m44
-rw-r--r--libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h39
-rwxr-xr-xlibstdc++-v3/configure6
4 files changed, 52 insertions, 6 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index a6f7935..c8de690 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,12 @@
+2005-01-25 Loren J. Rittle <ljrittle@acm.org>
+
+ * acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Map FreeBSD to darwin
+ instead of generic. Change autoconf report to "darwin or freebsd".
+ * configure: Regenerate.
+ * config/os/bsd/freebsd/ctype_inline.h (ctype<wchar_t>::do_is): Add.
+ (ctype<wchar_t>::do_scan_is): Likewise.
+ (ctype<wchar_t>::do_scan_not): Likewise.
+
2005-01-25 Benjamin Kosnik <bkoz@redhat.com>
* acinclude.m4 (GLIBCXX_ENABLE_C99): Test for complex math
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4
index 2a1c6e2..d7442f1 100644
--- a/libstdc++-v3/acinclude.m4
+++ b/libstdc++-v3/acinclude.m4
@@ -1163,7 +1163,7 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
# ... at some point put __strxfrm_l tests in as well.
;;
- darwin*)
+ darwin* | freebsd*)
enable_clocale_flag=darwin
;;
*)
@@ -1200,7 +1200,7 @@ AC_DEFUN([GLIBCXX_ENABLE_CLOCALE], [
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
darwin)
- AC_MSG_RESULT(darwin)
+ AC_MSG_RESULT(darwin or freebsd)
CLOCALE_H=config/locale/generic/c_locale.h
CLOCALE_CC=config/locale/generic/c_locale.cc
diff --git a/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h b/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h
index d69324a..37425b6 100644
--- a/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h
+++ b/libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h
@@ -1,6 +1,6 @@
// Locale support -*- C++ -*-
-// Copyright (C) 2000, 2003 Free Software Foundation, Inc.
+// Copyright (C) 2000, 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
@@ -104,3 +104,40 @@
++__low;
return __low;
}
+
+#ifdef _GLIBCXX_USE_WCHAR_T
+ inline bool
+ ctype<wchar_t>::
+ do_is(mask __m, wchar_t __c) const
+ {
+ return __istype (__c, __m);
+ }
+
+ inline const wchar_t*
+ ctype<wchar_t>::
+ do_is(const wchar_t* __lo, const wchar_t* __hi, mask* __vec) const
+ {
+ for (; __lo < __hi; ++__vec, ++__lo)
+ *__vec = __maskrune (*__lo, upper | lower | alpha | digit | xdigit
+ | space | print | graph | cntrl | punct | alnum);
+ return __hi;
+ }
+
+ inline const wchar_t*
+ ctype<wchar_t>::
+ do_scan_is(mask __m, const wchar_t* __lo, const wchar_t* __hi) const
+ {
+ while (__lo < __hi && ! __istype (*__lo, __m))
+ ++__lo;
+ return __lo;
+ }
+
+ inline const wchar_t*
+ ctype<wchar_t>::
+ do_scan_not(mask __m, const char_type* __lo, const char_type* __hi) const
+ {
+ while (__lo < __hi && __istype (*__lo, __m))
+ ++__lo;
+ return __lo;
+ }
+#endif
diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure
index e2a7f58..365e2fd 100755
--- a/libstdc++-v3/configure
+++ b/libstdc++-v3/configure
@@ -5782,7 +5782,7 @@ fi
# ... at some point put __strxfrm_l tests in as well.
;;
- darwin*)
+ darwin* | freebsd*)
enable_clocale_flag=darwin
;;
*)
@@ -5823,8 +5823,8 @@ echo "${ECHO_T}generic" >&6
CLOCALE_INTERNAL_H=config/locale/generic/c++locale_internal.h
;;
darwin)
- echo "$as_me:$LINENO: result: darwin" >&5
-echo "${ECHO_T}darwin" >&6
+ echo "$as_me:$LINENO: result: darwin or freebsd" >&5
+echo "${ECHO_T}darwin or freebsd" >&6
CLOCALE_H=config/locale/generic/c_locale.h
CLOCALE_CC=config/locale/generic/c_locale.cc