2002-06-21 22:21:03 +02:00
|
|
|
// -*- C++ -*- compatibility header.
|
|
|
|
|
2015-01-05 13:33:28 +01:00
|
|
|
// Copyright (C) 2002-2015 Free Software Foundation, Inc.
|
2002-06-21 22:21:03 +02:00
|
|
|
//
|
|
|
|
// 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
|
2009-04-09 17:00:19 +02:00
|
|
|
// Free Software Foundation; either version 3, or (at your option)
|
2002-06-21 22:21:03 +02:00
|
|
|
// 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.
|
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// Under Section 7 of GPL version 3, you are granted additional
|
|
|
|
// permissions described in the GCC Runtime Library Exception, version
|
|
|
|
// 3.1, as published by the Free Software Foundation.
|
2002-06-21 22:21:03 +02:00
|
|
|
|
2009-04-09 17:00:19 +02:00
|
|
|
// You should have received a copy of the GNU General Public License and
|
|
|
|
// a copy of the GCC Runtime Library Exception along with this program;
|
|
|
|
// see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
|
|
|
|
// <http://www.gnu.org/licenses/>.
|
2002-06-21 22:21:03 +02:00
|
|
|
|
2007-03-04 23:59:49 +01:00
|
|
|
/** @file wchar.h
|
|
|
|
* This is a Standard C++ Library header.
|
|
|
|
*/
|
2002-06-21 22:21:03 +02:00
|
|
|
|
|
|
|
#include <cwchar>
|
|
|
|
|
2007-03-04 23:59:49 +01:00
|
|
|
#ifndef _GLIBCXX_WCHAR_H
|
|
|
|
#define _GLIBCXX_WCHAR_H 1
|
|
|
|
|
|
|
|
#ifdef _GLIBCXX_NAMESPACE_C
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::mbstate_t;
|
|
|
|
|
2003-07-05 06:05:45 +02:00
|
|
|
#if _GLIBCXX_USE_WCHAR_T
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::wint_t;
|
|
|
|
|
|
|
|
using std::btowc;
|
|
|
|
using std::wctob;
|
|
|
|
using std::fgetwc;
|
|
|
|
using std::fgetwc;
|
|
|
|
using std::fgetws;
|
|
|
|
using std::fputwc;
|
|
|
|
using std::fputws;
|
|
|
|
using std::fwide;
|
|
|
|
using std::fwprintf;
|
|
|
|
using std::fwscanf;
|
|
|
|
using std::swprintf;
|
|
|
|
using std::swscanf;
|
|
|
|
using std::vfwprintf;
|
2003-09-25 22:30:20 +02:00
|
|
|
#if _GLIBCXX_HAVE_VFWSCANF
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::vfwscanf;
|
2003-12-09 04:51:46 +01:00
|
|
|
#endif
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::vswprintf;
|
2003-09-25 22:30:20 +02:00
|
|
|
#if _GLIBCXX_HAVE_VSWSCANF
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::vswscanf;
|
2003-12-09 04:51:46 +01:00
|
|
|
#endif
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::vwprintf;
|
2003-09-25 22:30:20 +02:00
|
|
|
#if _GLIBCXX_HAVE_VWSCANF
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::vwscanf;
|
2003-12-09 04:51:46 +01:00
|
|
|
#endif
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::wprintf;
|
|
|
|
using std::wscanf;
|
|
|
|
using std::getwc;
|
|
|
|
using std::getwchar;
|
|
|
|
using std::mbsinit;
|
|
|
|
using std::mbrlen;
|
|
|
|
using std::mbrtowc;
|
|
|
|
using std::mbsrtowcs;
|
|
|
|
using std::wcsrtombs;
|
|
|
|
using std::putwc;
|
|
|
|
using std::putwchar;
|
|
|
|
using std::ungetwc;
|
|
|
|
using std::wcrtomb;
|
|
|
|
using std::wcstod;
|
2003-09-25 22:30:20 +02:00
|
|
|
#if _GLIBCXX_HAVE_WCSTOF
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::wcstof;
|
2003-12-09 04:51:46 +01:00
|
|
|
#endif
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::wcstol;
|
|
|
|
using std::wcstoul;
|
|
|
|
using std::wcscpy;
|
|
|
|
using std::wcsncpy;
|
|
|
|
using std::wcscat;
|
|
|
|
using std::wcsncat;
|
|
|
|
using std::wcscmp;
|
|
|
|
using std::wcscoll;
|
|
|
|
using std::wcsncmmp;
|
|
|
|
using std::wcsxfrm;
|
|
|
|
using std::wcschr;
|
|
|
|
using std::wcscspn;
|
|
|
|
using std::wcslen;
|
|
|
|
using std::wcspbrk;
|
|
|
|
using std::wcsrchr;
|
|
|
|
using std::wcsspn;
|
|
|
|
using std::wcsstr;
|
|
|
|
using std::wcstok;
|
|
|
|
using std::wmemchr;
|
|
|
|
using std::wmemcmp;
|
|
|
|
using std::wmemcpy;
|
|
|
|
using std::wmemmove;
|
|
|
|
using std::wmemset;
|
|
|
|
using std::wcsftime;
|
|
|
|
|
More fine-grained autoconf checks for C99 library
2015-11-13 Jennifer Yao <jenny.hyphen.fa@gmail.com>
Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/58393
PR libstdc++/61580
* acinclude.m4 (GLIBCXX_ENABLE_C99): Perform tests twice, with
-std=c++11 as well as -std=c++98, and define separate macros for each.
Cache the results of checking for complex math and wide character
functions. Reformat for readability.
* config.h.in: Regenerate.
* include/bits/c++config: Define _GLIBCXX_USE_C99_XXX macros to
either _GLIBCXX98_USE_C99_XXX or _GLIBCXX11_USE_C99_XXX according to
language standard in use.
* config/locale/dragonfly/c_locale.h (std::__convert_from_v): Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* config/locale/generic/c_locale.h (std::__convert_from_v): Likewise.
* config/locale/gnu/c_locale.h (std::__convert_from_v): Likewise.
* config/os/bsd/dragonfly/os_defines.h: Define _GLIBCXX_USE_C99_STDIO,
_GLIBCXX_USE_C99_STDLIB, and _GLIBCXX_USE_C99_WCHAR.
* configure: Regenerate.
* include/bits/basic_string.h: Make numeric conversion functions
depend on _GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, or
_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
* include/ext/vstring.h: Likewise.
* include/bits/locale_facets.tcc (std::num_put::_M_insert_float):
Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* include/bits/locale_facets_nonio.tcc (std::money_put::do_put):
Likewise.
* include/c_compatibility/math.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_MATH.
* include/c_compatibility/wchar.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/c_global/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/c_global/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/c_global/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/c_std/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/c_std/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/c_std/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/tr1/cstdio: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
* include/tr1/cstdlib: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* include/tr1/cwchar: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_WCHAR.
* include/tr1/stdlib.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDLIB.
* src/c++98/locale_facets.cc (std::__num_base::_S_format_float):
Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* testsuite/18_support/exception_ptr/60612-terminate.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/18_support/exception_ptr/60612-unexpected.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc
(test01): Replace _GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stof.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoi.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stol.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stold.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoll.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoul.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
stoull.cc: Likewise.
* testsuite/21_strings/basic_string/numeric_conversions/wchar_t/
to_wstring.cc: Likewise.
* testsuite/26_numerics/headers/cstdlib/13943.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc: Likewise.
* testsuite/lib/libstdc++.exp (check_v3_target_string_conversions):
Change preprocessor #if conditional so that it uses
_GLIBCXX_USE_C99_STDIO, _GLIBCXX_USE_C99_STDLIB, and
_GLIBCXX_USE_C99_WCHAR, instead of _GLIBCXX_USE_C99.
* testsuite/tr1/8_c_compatibility/cmath/templates.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_MATH.
* testsuite/tr1/8_c_compatibility/cstdio/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDIO.
* testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_STDLIB.
* testsuite/tr1/8_c_compatibility/cstdlib/types_std_tr1.cc: Likewise.
* testsuite/tr1/8_c_compatibility/cwchar/functions.cc: Replace
_GLIBCXX_USE_C99 with _GLIBCXX_USE_C99_WCHAR.
* testsuite/util/testsuite_fs.h: Replace _GLIBCXX_USE_C99 with
_GLIBCXX_USE_C99_STDIO.
Co-Authored-By: Jonathan Wakely <jwakely@redhat.com>
From-SVN: r230324
2015-11-13 15:51:25 +01:00
|
|
|
#if _GLIBCXX_USE_C99_WCHAR
|
2002-06-21 22:21:03 +02:00
|
|
|
using std::wcstold;
|
|
|
|
using std::wcstoll;
|
|
|
|
using std::wcstoull;
|
|
|
|
#endif
|
|
|
|
|
2003-07-05 06:05:45 +02:00
|
|
|
#endif //_GLIBCXX_USE_WCHAR_T
|
2002-06-21 22:21:03 +02:00
|
|
|
|
2007-03-04 23:59:49 +01:00
|
|
|
#endif
|
|
|
|
|
2002-06-21 22:21:03 +02:00
|
|
|
#endif
|