cwchar: New.
2006-02-03 Paolo Carlini <pcarlini@suse.de> * include/tr1/cwchar: New. * include/tr1/cwctype: Likewise. * include/tr1/wchar.h: Likewise. * include/tr1/wctype.h: Likewise. * include/Makefile.am: Add. * testsuite/tr1/8_c_compatibility/cinttypes/functions: New. * testsuite/tr1/8_c_compatibility/cwctype/functions.cc: Likewise. * testsuite/tr1/headers.cc: Update. * acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Add <wchar.h> and <wctype.h> checks. * docs/html/ext/tr1.html: Update. * include/Makefile.in: Regenerate. * config.h.in: Likewise. * configure: Likewise. * testsuite/tr1/8_c_compatibility/cctype/functions.cc: Cosmetic tweak. From-SVN: r110562
This commit is contained in:
parent
c37db700bc
commit
af66a43e88
@ -1,3 +1,22 @@
|
||||
2006-02-03 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/tr1/cwchar: New.
|
||||
* include/tr1/cwctype: Likewise.
|
||||
* include/tr1/wchar.h: Likewise.
|
||||
* include/tr1/wctype.h: Likewise.
|
||||
* include/Makefile.am: Add.
|
||||
* testsuite/tr1/8_c_compatibility/cinttypes/functions: New.
|
||||
* testsuite/tr1/8_c_compatibility/cwctype/functions.cc: Likewise.
|
||||
* testsuite/tr1/headers.cc: Update.
|
||||
* acinclude.m4 ([GLIBCXX_CHECK_C99_TR1]): Add <wchar.h> and
|
||||
<wctype.h> checks.
|
||||
* docs/html/ext/tr1.html: Update.
|
||||
* include/Makefile.in: Regenerate.
|
||||
* config.h.in: Likewise.
|
||||
* configure: Likewise.
|
||||
|
||||
* testsuite/tr1/8_c_compatibility/cctype/functions.cc: Cosmetic tweak.
|
||||
|
||||
2006-02-02 Paolo Carlini <pcarlini@suse.de>
|
||||
|
||||
* include/tr1/cfloat: New.
|
||||
|
@ -1190,13 +1190,10 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
|
||||
[intmax_t i, numer, denom, base;
|
||||
const char* s;
|
||||
char** endptr;
|
||||
intmax_t ret;
|
||||
uintmax_t uret;
|
||||
imaxdiv_t dret;
|
||||
ret = imaxabs(i);
|
||||
dret = imaxdiv(numer, denom);
|
||||
intmax_t ret = imaxabs(i);
|
||||
imaxdiv_t dret = imaxdiv(numer, denom);
|
||||
ret = strtoimax(s, endptr, base);
|
||||
uret = strtoumax(s, endptr, base);
|
||||
uintmax_t uret = strtoumax(s, endptr, base);
|
||||
],[ac_c99_inttypes_tr1=yes], [ac_c99_inttypes_tr1=no])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_c99_inttypes_tr1)
|
||||
@ -1206,6 +1203,50 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [
|
||||
<tr1/cinttypes> in namespace std::tr1.])
|
||||
fi
|
||||
|
||||
# Check for the existence of <wchar.h> functions.
|
||||
AC_MSG_CHECKING([for ISO C99 support to TR1 in <wchar.h>])
|
||||
AC_CACHE_VAL(ac_c99_wchar_tr1, [
|
||||
AC_TRY_COMPILE([#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>],
|
||||
[const wchar_t* nptr;
|
||||
const wchar_t* format;
|
||||
const wchar_t* s;
|
||||
wchar_t** endptr;
|
||||
FILE* stream;
|
||||
va_list arg;
|
||||
int base;
|
||||
float fret = wcstof(nptr, endptr);
|
||||
long double ldret = wcstold(nptr, endptr);
|
||||
int ret = vfwscanf(stream, format, arg);
|
||||
ret = vswscanf(s, format, arg);
|
||||
ret = vwscanf(format, arg);
|
||||
long long llret = wcstoll(nptr, endptr, base);
|
||||
unsigned long long ullret = wcstoull(nptr, endptr, base);
|
||||
],[ac_c99_wchar_tr1=yes], [ac_c99_wchar_tr1=no])
|
||||
])
|
||||
AC_MSG_RESULT($ac_c99_wchar_tr1)
|
||||
if test x"$ac_c99_wchar_tr1" = x"yes"; then
|
||||
AC_DEFINE(_GLIBCXX_USE_C99_WCHAR_TR1, 1,
|
||||
[Define if C99 functions in <wchar.h> should be imported in
|
||||
<tr1/cwchar> in namespace std::tr1.])
|
||||
fi
|
||||
|
||||
# Check for the existence of <wctype.h> functions.
|
||||
AC_MSG_CHECKING([for ISO C99 support to TR1 in <wctype.h>])
|
||||
AC_CACHE_VAL(ac_c99_wctype_tr1, [
|
||||
AC_TRY_COMPILE([#include <wctype.h>],
|
||||
[wint_t ch;
|
||||
int ret = iswblank(ch);
|
||||
],[ac_c99_wctype_tr1=yes], [ac_c99_wctype_tr1=no])
|
||||
])
|
||||
AC_MSG_RESULT($ac_c99_wctype_tr1)
|
||||
if test x"$ac_c99_wctype_tr1" = x"yes"; then
|
||||
AC_DEFINE(_GLIBCXX_USE_C99_WCTYPE_TR1, 1,
|
||||
[Define if C99 functions in <wctype.h> should be imported in
|
||||
<tr1/cwctype> in namespace std::tr1.])
|
||||
fi
|
||||
|
||||
AC_LANG_RESTORE
|
||||
])
|
||||
|
||||
|
@ -719,6 +719,14 @@
|
||||
namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_STDINT_TR1
|
||||
|
||||
/* Define if C99 functions in <wchar.h> should be imported in <tr1/cwchar> in
|
||||
namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_WCHAR_TR1
|
||||
|
||||
/* Define if C99 functions in <wctype.h> should be imported in <tr1/cwctype>
|
||||
in namespace std::tr1. */
|
||||
#undef _GLIBCXX_USE_C99_WCTYPE_TR1
|
||||
|
||||
/* Define if iconv and related functions exist and are usable. */
|
||||
#undef _GLIBCXX_USE_ICONV
|
||||
|
||||
|
157
libstdc++-v3/configure
vendored
157
libstdc++-v3/configure
vendored
@ -30629,13 +30629,10 @@ main ()
|
||||
intmax_t i, numer, denom, base;
|
||||
const char* s;
|
||||
char** endptr;
|
||||
intmax_t ret;
|
||||
uintmax_t uret;
|
||||
imaxdiv_t dret;
|
||||
ret = imaxabs(i);
|
||||
dret = imaxdiv(numer, denom);
|
||||
intmax_t ret = imaxabs(i);
|
||||
imaxdiv_t dret = imaxdiv(numer, denom);
|
||||
ret = strtoimax(s, endptr, base);
|
||||
uret = strtoumax(s, endptr, base);
|
||||
uintmax_t uret = strtoumax(s, endptr, base);
|
||||
|
||||
;
|
||||
return 0;
|
||||
@ -30682,6 +30679,154 @@ _ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# Check for the existence of <wchar.h> functions.
|
||||
echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <wchar.h>" >&5
|
||||
echo $ECHO_N "checking for ISO C99 support to TR1 in <wchar.h>... $ECHO_C" >&6
|
||||
if test "${ac_c99_wchar_tr1+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <wchar.h>
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
const wchar_t* nptr;
|
||||
const wchar_t* format;
|
||||
const wchar_t* s;
|
||||
wchar_t** endptr;
|
||||
FILE* stream;
|
||||
va_list arg;
|
||||
int base;
|
||||
float fret = wcstof(nptr, endptr);
|
||||
long double ldret = wcstold(nptr, endptr);
|
||||
int ret = vfwscanf(stream, format, arg);
|
||||
ret = vswscanf(s, format, arg);
|
||||
ret = vwscanf(format, arg);
|
||||
long long llret = wcstoll(nptr, endptr, base);
|
||||
unsigned long long ullret = wcstoull(nptr, endptr, base);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_cxx_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_c99_wchar_tr1=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_c99_wchar_tr1=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: result: $ac_c99_wchar_tr1" >&5
|
||||
echo "${ECHO_T}$ac_c99_wchar_tr1" >&6
|
||||
if test x"$ac_c99_wchar_tr1" = x"yes"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _GLIBCXX_USE_C99_WCHAR_TR1 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
# Check for the existence of <wctype.h> functions.
|
||||
echo "$as_me:$LINENO: checking for ISO C99 support to TR1 in <wctype.h>" >&5
|
||||
echo $ECHO_N "checking for ISO C99 support to TR1 in <wctype.h>... $ECHO_C" >&6
|
||||
if test "${ac_c99_wctype_tr1+set}" = set; then
|
||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||
else
|
||||
|
||||
cat >conftest.$ac_ext <<_ACEOF
|
||||
/* confdefs.h. */
|
||||
_ACEOF
|
||||
cat confdefs.h >>conftest.$ac_ext
|
||||
cat >>conftest.$ac_ext <<_ACEOF
|
||||
/* end confdefs.h. */
|
||||
#include <wctype.h>
|
||||
int
|
||||
main ()
|
||||
{
|
||||
wint_t ch;
|
||||
int ret = iswblank(ch);
|
||||
|
||||
;
|
||||
return 0;
|
||||
}
|
||||
_ACEOF
|
||||
rm -f conftest.$ac_objext
|
||||
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||
(eval $ac_compile) 2>conftest.er1
|
||||
ac_status=$?
|
||||
grep -v '^ *+' conftest.er1 >conftest.err
|
||||
rm -f conftest.er1
|
||||
cat conftest.err >&5
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); } &&
|
||||
{ ac_try='test -z "$ac_cxx_werror_flag"
|
||||
|| test ! -s conftest.err'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; } &&
|
||||
{ ac_try='test -s conftest.$ac_objext'
|
||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||
(eval $ac_try) 2>&5
|
||||
ac_status=$?
|
||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||
(exit $ac_status); }; }; then
|
||||
ac_c99_wctype_tr1=yes
|
||||
else
|
||||
echo "$as_me: failed program was:" >&5
|
||||
sed 's/^/| /' conftest.$ac_ext >&5
|
||||
|
||||
ac_c99_wctype_tr1=no
|
||||
fi
|
||||
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||
|
||||
fi
|
||||
|
||||
echo "$as_me:$LINENO: result: $ac_c99_wctype_tr1" >&5
|
||||
echo "${ECHO_T}$ac_c99_wctype_tr1" >&6
|
||||
if test x"$ac_c99_wctype_tr1" = x"yes"; then
|
||||
|
||||
cat >>confdefs.h <<\_ACEOF
|
||||
#define _GLIBCXX_USE_C99_WCTYPE_TR1 1
|
||||
_ACEOF
|
||||
|
||||
fi
|
||||
|
||||
ac_ext=c
|
||||
ac_cpp='$CPP $CPPFLAGS'
|
||||
ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
|
||||
|
@ -2187,73 +2187,73 @@ release.
|
||||
<tr>
|
||||
<td>8.30</td>
|
||||
<td>Additions to header <code><cwchar></code></td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.30.1</td>
|
||||
<td>Synopsis</td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.30.2</td>
|
||||
<td>Definitions</td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.30.3</td>
|
||||
<td>Additional wide format specifiers</td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.31</td>
|
||||
<td>Additions to header <code><wchar.h></code></td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.32</td>
|
||||
<td>Additions to header <code><cwctype></code></td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.32.1</td>
|
||||
<td>Synopsis</td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.32.2</td>
|
||||
<td>Function <code>iswblank</code></td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>8.33</td>
|
||||
<td>Additions to header <code><wctype.h></code></td>
|
||||
<td>done</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td>missing</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
@ -2307,7 +2307,7 @@ permitted in any medium, provided this notice is preserved.
|
||||
<table width="100%" border="0">
|
||||
<tr>
|
||||
<td>
|
||||
<!-- IGNORE DIFF -->Last modified 2006-02-02
|
||||
<!-- IGNORE DIFF -->Last modified 2006-02-03
|
||||
</td>
|
||||
<td align="right" valign="bottom">
|
||||
<a href="http://validator.w3.org/check/referer">
|
||||
|
@ -494,6 +494,8 @@ tr1_headers = \
|
||||
${tr1_srcdir}/cstdarg \
|
||||
${tr1_srcdir}/cstdint \
|
||||
${tr1_srcdir}/ctype.h \
|
||||
${tr1_srcdir}/cwchar \
|
||||
${tr1_srcdir}/cwctype \
|
||||
${tr1_srcdir}/fenv.h \
|
||||
${tr1_srcdir}/float.h \
|
||||
${tr1_srcdir}/functional \
|
||||
@ -514,7 +516,9 @@ tr1_headers = \
|
||||
${tr1_srcdir}/type_traits_fwd.h \
|
||||
${tr1_srcdir}/unordered_set \
|
||||
${tr1_srcdir}/unordered_map \
|
||||
${tr1_srcdir}/utility
|
||||
${tr1_srcdir}/utility \
|
||||
${tr1_srcdir}/wchar.h \
|
||||
${tr1_srcdir}/wctype.h
|
||||
|
||||
|
||||
# This is the common subset of files that all three "C" header models use.
|
||||
|
@ -711,6 +711,8 @@ tr1_headers = \
|
||||
${tr1_srcdir}/cstdarg \
|
||||
${tr1_srcdir}/cstdint \
|
||||
${tr1_srcdir}/ctype.h \
|
||||
${tr1_srcdir}/cwchar \
|
||||
${tr1_srcdir}/cwctype \
|
||||
${tr1_srcdir}/fenv.h \
|
||||
${tr1_srcdir}/float.h \
|
||||
${tr1_srcdir}/functional \
|
||||
@ -731,7 +733,9 @@ tr1_headers = \
|
||||
${tr1_srcdir}/type_traits_fwd.h \
|
||||
${tr1_srcdir}/unordered_set \
|
||||
${tr1_srcdir}/unordered_map \
|
||||
${tr1_srcdir}/utility
|
||||
${tr1_srcdir}/utility \
|
||||
${tr1_srcdir}/wchar.h \
|
||||
${tr1_srcdir}/wctype.h
|
||||
|
||||
|
||||
# This is the common subset of files that all three "C" header models use.
|
||||
|
96
libstdc++-v3/include/tr1/cwchar
Normal file
96
libstdc++-v3/include/tr1/cwchar
Normal file
@ -0,0 +1,96 @@
|
||||
// TR1 cwchar -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General 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
|
||||
* This is a TR1 C++ Library header.
|
||||
*/
|
||||
|
||||
#ifndef _TR1_CWCHAR
|
||||
#define _TR1_CWCHAR 1
|
||||
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#if _GLIBCXX_USE_WCHAR_T
|
||||
|
||||
#include <cwchar>
|
||||
|
||||
#if _GLIBCXX_USE_C99_WCHAR_TR1
|
||||
|
||||
#undef wcstof
|
||||
#undef wcstold
|
||||
#undef wcstoll
|
||||
#undef wcstoull
|
||||
#undef vfwscanf
|
||||
#undef vswscanf
|
||||
#undef vwscanf
|
||||
|
||||
_GLIBCXX_BEGIN_NAMESPACE(__gnu_cxx)
|
||||
|
||||
#if _GLIBCXX_USE_C99_CHECK || _GLIBCXX_USE_C99_DYNAMIC
|
||||
extern "C" long double
|
||||
(wcstold)(const wchar_t * restrict, wchar_t ** restrict);
|
||||
#endif
|
||||
#if !_GLIBCXX_USE_C99_DYNAMIC
|
||||
using ::wcstold;
|
||||
#endif
|
||||
#if _GLIBCXX_USE_C99_LONG_LONG_CHECK || _GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
||||
extern "C" long long int
|
||||
(wcstoll)(const wchar_t * restrict, wchar_t ** restrict, int);
|
||||
extern "C" unsigned long long int
|
||||
(wcstoull)(const wchar_t * restrict, wchar_t ** restrict, int);
|
||||
#endif
|
||||
#if !_GLIBCXX_USE_C99_LONG_LONG_DYNAMIC
|
||||
using ::wcstoll;
|
||||
using ::wcstoull;
|
||||
#endif
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
|
||||
// namespace std::tr1
|
||||
namespace std
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE(tr1)
|
||||
|
||||
using ::wcstof;
|
||||
using ::__gnu_cxx::wcstold;
|
||||
using ::__gnu_cxx::wcstoll;
|
||||
using ::__gnu_cxx::wcstoull;
|
||||
|
||||
using ::vfwscanf;
|
||||
using ::vswscanf;
|
||||
using ::vwscanf;
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
61
libstdc++-v3/include/tr1/cwctype
Normal file
61
libstdc++-v3/include/tr1/cwctype
Normal file
@ -0,0 +1,61 @@
|
||||
// TR1 cwctype -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General 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
|
||||
* This is a TR1 C++ Library header.
|
||||
*/
|
||||
|
||||
#ifndef _TR1_CWCTYPE
|
||||
#define _TR1_CWCTYPE 1
|
||||
|
||||
#include <bits/c++config.h>
|
||||
|
||||
#if _GLIBCXX_USE_WCHAR_T
|
||||
|
||||
#include <cwctype>
|
||||
|
||||
#if _GLIBCXX_USE_C99_WCTYPE_TR1
|
||||
|
||||
#undef iswblank
|
||||
|
||||
// namespace std::tr1
|
||||
namespace std
|
||||
{
|
||||
_GLIBCXX_BEGIN_NAMESPACE(tr1)
|
||||
|
||||
using ::iswblank;
|
||||
|
||||
_GLIBCXX_END_NAMESPACE
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
39
libstdc++-v3/include/tr1/wchar.h
Normal file
39
libstdc++-v3/include/tr1/wchar.h
Normal file
@ -0,0 +1,39 @@
|
||||
// TR1 wchar.h -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General 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
|
||||
* This is a TR1 C++ Library header.
|
||||
*/
|
||||
|
||||
#ifndef _TR1_WCHAR_H
|
||||
#define _TR1_WCHAR_H 1
|
||||
|
||||
#include <tr1/cwchar>
|
||||
|
||||
#endif
|
39
libstdc++-v3/include/tr1/wctype.h
Normal file
39
libstdc++-v3/include/tr1/wctype.h
Normal file
@ -0,0 +1,39 @@
|
||||
// TR1 wctype.h -*- C++ -*-
|
||||
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// As a special exception, you may use this file as part of a free software
|
||||
// library without restriction. Specifically, if other files instantiate
|
||||
// templates or use macros or inline functions from this file, or you compile
|
||||
// this file and link it with other files to produce an executable, this
|
||||
// file does not by itself cause the resulting executable to be covered by
|
||||
// the GNU General 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
|
||||
* This is a TR1 C++ Library header.
|
||||
*/
|
||||
|
||||
#ifndef _TR1_WCTYPE_H
|
||||
#define _TR1_WCTYPE_H 1
|
||||
|
||||
#include <tr1/cwctype>
|
||||
|
||||
#endif
|
@ -28,8 +28,8 @@ void test01()
|
||||
{
|
||||
#if _GLIBCXX_USE_C99_CTYPE_TR1
|
||||
|
||||
int ch = 0, r;
|
||||
r = std::tr1::isblank(ch);
|
||||
int ch = 0, ret;
|
||||
ret = std::tr1::isblank(ch);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
@ -0,0 +1,63 @@
|
||||
// { dg-do compile }
|
||||
|
||||
// 2006-02-03 Paolo Carlini <pcarlini@suse.de>
|
||||
//
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// 8.6 Additions to header <cwchar>
|
||||
|
||||
#include <tr1/cwchar>
|
||||
#include <cstdio>
|
||||
#include <cstdarg>
|
||||
|
||||
#if _GLIBCXX_USE_WCHAR_T
|
||||
|
||||
void test01()
|
||||
{
|
||||
#if _GLIBCXX_USE_C99_WCHAR_TR1
|
||||
|
||||
const wchar_t* nptr = 0;
|
||||
const wchar_t* format = 0;
|
||||
const wchar_t* s = 0;
|
||||
wchar_t** endptr = 0;
|
||||
FILE* stream = 0;
|
||||
std::va_list arg = 0;
|
||||
|
||||
float fret;
|
||||
long double ldret;
|
||||
int ret;
|
||||
|
||||
fret = std::tr1::wcstof(nptr, endptr);
|
||||
ldret = std::tr1::wcstold(nptr, endptr);
|
||||
ret = std::tr1::vfwscanf(stream, format, arg);
|
||||
ret = std::tr1::vswscanf(s, format, arg);
|
||||
ret = std::tr1::vwscanf(format, arg);
|
||||
|
||||
#ifdef _GLIBCXX_USE_LONG_LONG
|
||||
int base = 0;
|
||||
long long llret;
|
||||
unsigned long long ullret;
|
||||
llret = std::tr1::wcstoll(nptr, endptr, base);
|
||||
ullret = std::tr1::wcstoull(nptr, endptr, base);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
@ -0,0 +1,40 @@
|
||||
// { dg-do compile }
|
||||
|
||||
// 2006-02-03 Paolo Carlini <pcarlini@suse.de>
|
||||
//
|
||||
// Copyright (C) 2006 Free Software Foundation, Inc.
|
||||
//
|
||||
// This file is part of the GNU ISO C++ Library. This library is free
|
||||
// software; you can redistribute it and/or modify it under the
|
||||
// terms of the GNU General Public License as published by the
|
||||
// Free Software Foundation; either version 2, or (at your option)
|
||||
// any later version.
|
||||
//
|
||||
// This library is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License along
|
||||
// with this library; see the file COPYING. If not, write to the Free
|
||||
// Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
|
||||
// USA.
|
||||
|
||||
// 8.32 Additions to header <cwctype>
|
||||
|
||||
#include <tr1/cwctype>
|
||||
|
||||
#if _GLIBCXX_USE_WCHAR_T
|
||||
|
||||
void test01()
|
||||
{
|
||||
#if _GLIBCXX_USE_C99_WCTYPE_TR1
|
||||
|
||||
std::wint_t ch = 0;
|
||||
int ret;
|
||||
ret = std::tr1::iswblank(ch);
|
||||
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
@ -30,6 +30,8 @@
|
||||
#include <tr1/cstdarg>
|
||||
#include <tr1/cstdint>
|
||||
#include <tr1/ctype.h>
|
||||
#include <tr1/cwchar>
|
||||
#include <tr1/cwctype>
|
||||
#include <tr1/fenv.h>
|
||||
#include <tr1/float.h>
|
||||
#include <tr1/functional>
|
||||
@ -44,3 +46,5 @@
|
||||
#include <tr1/unordered_set>
|
||||
#include <tr1/unordered_map>
|
||||
#include <tr1/utility>
|
||||
#include <tr1/wchar.h>
|
||||
#include <tr1/wctype.h>
|
||||
|
Loading…
Reference in New Issue
Block a user