diff options
author | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-04 11:13:34 +0000 |
---|---|---|
committer | redi <redi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2015-09-04 11:13:34 +0000 |
commit | f8c2da4bf80217b11405d23ac893f5cfabc89708 (patch) | |
tree | 543c967eadc67a81024d62c14fb129147c039cb0 /libstdc++-v3/acinclude.m4 | |
parent | 19665740d336d4ee7d0cf92b5b0643fa1d7da14a (diff) |
Add C++11 header <cuchar>.
2015-09-04 Edward Smith-Rowland <3dw4rd@verizon.net>
Jonathan Wakely <jwakely@redhat.com>
* acinclude.m4 (GLIBCXX_CHECK_UCHAR_H): Define.
* config.h.in: Regenerate.
* configure: Regenerate.
* configure.ac: Check for <uchar.h>.
* include/Makefile.am: Add new headers.
* include/Makefile.in: Regenerate.
* include/c/cuchar: New.
* include/c_compatibility/uchar.h: New.
* include/c_global/cuchar: New.
* include/c_std/cuchar: New.
* include/precompiled/stdc++.h: Include <cuchar>.
* testsuite/17_intro/headers/c++200x/stdc++.cc: Include <uchar.h>.
* testsuite/17_intro/headers/c++200x/stdc++_multiple_inclusion.cc:
Include <uchar.h>.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227488 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
-rw-r--r-- | libstdc++-v3/acinclude.m4 | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index 789bc5894a0..64c9b7e32cf 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -1809,6 +1809,52 @@ AC_DEFUN([GLIBCXX_CHECK_C99_TR1], [ ]) dnl +dnl Check for uchar.h and usability. +dnl +AC_DEFUN([GLIBCXX_CHECK_UCHAR_H], [ + + # Test uchar.h. + AC_CHECK_HEADERS(uchar.h, ac_has_uchar_h=yes, ac_has_uchar_h=no) + + AC_LANG_SAVE + AC_LANG_CPLUSPLUS + ac_save_CXXFLAGS="$CXXFLAGS" + CXXFLAGS="$CXXFLAGS -std=c++11" + + if test x"$ac_has_uchar_h" = x"yes"; then + AC_MSG_CHECKING([for ISO C11 support for <uchar.h>]) + AC_TRY_COMPILE([#include <uchar.h> + #ifdef __STDC_UTF_16__ + long i = __STDC_UTF_16__; + #endif + #ifdef __STDC_UTF_32__ + long j = __STDC_UTF_32__; + #endif + namespace test + { + using ::c16rtomb; + using ::c32rtomb; + using ::mbrtoc16; + using ::mbrtoc32; + } + ], + [], [ac_c11_uchar_cxx11=yes], [ac_c11_uchar_cxx11=no]) + else + ac_c11_uchar_cxx11=no + fi + AC_MSG_RESULT($ac_c11_uchar_cxx11) + if test x"$ac_c11_uchar_cxx11" = x"yes"; then + AC_DEFINE(_GLIBCXX_USE_C11_UCHAR_CXX11, 1, + [Define if C11 functions in <uchar.h> should be imported into + namespace std in <cuchar>.]) + fi + + CXXFLAGS="$ac_save_CXXFLAGS" + AC_LANG_RESTORE +]) + + +dnl dnl Check whether "/dev/random" and "/dev/urandom" are available for the dnl random_device of "TR1" (Chapter 5.1, "Random number generation"). dnl |