From a7f7b3348c3abeddc55d218e7b555751b26f7957 Mon Sep 17 00:00:00 2001 From: "Loren J. Rittle" Date: Tue, 25 Jan 2005 23:44:03 +0000 Subject: [PATCH] acinclude.m4 (GLIBCXX_ENABLE_CLOCALE): Map FreeBSD to darwin instead of generic. * 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::do_is): Add. (ctype::do_scan_is): Likewise. (ctype::do_scan_not): Likewise. From-SVN: r94236 --- libstdc++-v3/ChangeLog | 9 ++++++ libstdc++-v3/acinclude.m4 | 4 +-- libstdc++-v3/config/os/bsd/freebsd/ctype_inline.h | 39 ++++++++++++++++++++++- libstdc++-v3/configure | 6 ++-- 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 + + * 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::do_is): Add. + (ctype::do_scan_is): Likewise. + (ctype::do_scan_not): Likewise. + 2005-01-25 Benjamin Kosnik * 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:: + do_is(mask __m, wchar_t __c) const + { + return __istype (__c, __m); + } + + inline const wchar_t* + ctype:: + 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:: + 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:: + 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 -- 2.7.4