From: Andris Pavenis Date: Tue, 26 Jan 2016 16:07:33 +0000 (+0200) Subject: Fix build failure when wide character support is not available X-Git-Tag: basepoints/gcc-7~1320 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8964d2a090ffb96d822c8d3e5b533b5777285240;p=thirdparty%2Fgcc.git Fix build failure when wide character support is not available * include/c_compatibility/stdlib.h: Include wide character related definitions only when they are available in cstdlib. From-SVN: r232835 --- diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index bebe638edce3..b96afe6a8807 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,8 @@ +2016-01-26 Andris Pavenis + + * include/c_compatibility/stdlib.h: Include wide character related + definitions only when they are available in cstdlib. + 2016-01-25 Jonathan Wakely PR libstdc++/69464 diff --git a/libstdc++-v3/include/c_compatibility/stdlib.h b/libstdc++-v3/include/c_compatibility/stdlib.h index bd72580cffef..31e7e5ff1a69 100644 --- a/libstdc++-v3/include/c_compatibility/stdlib.h +++ b/libstdc++-v3/include/c_compatibility/stdlib.h @@ -62,9 +62,11 @@ using std::getenv; using std::labs; using std::ldiv; using std::malloc; +#ifdef _GLIBCXX_HAVE_MBSTATE_T using std::mblen; using std::mbstowcs; using std::mbtowc; +#endif // _GLIBCXX_HAVE_MBSTATE_T using std::qsort; using std::rand; using std::realloc; @@ -73,8 +75,10 @@ using std::strtod; using std::strtol; using std::strtoul; using std::system; +#ifdef _GLIBCXX_USE_WCHAR_T using std::wcstombs; using std::wctomb; +#endif // _GLIBCXX_USE_WCHAR_T #endif #endif