Fix build failure when wide character support is not available
authorAndris Pavenis <andris.pavenis@iki.fi>
Tue, 26 Jan 2016 16:07:33 +0000 (18:07 +0200)
committerAndris Pavenis <andris@gcc.gnu.org>
Tue, 26 Jan 2016 16:07:33 +0000 (18:07 +0200)
* include/c_compatibility/stdlib.h: Include wide character related
definitions only when they are available in cstdlib.

From-SVN: r232835

libstdc++-v3/ChangeLog
libstdc++-v3/include/c_compatibility/stdlib.h

index bebe638..b96afe6 100644 (file)
@@ -1,3 +1,8 @@
+2016-01-26  Andris Pavenis  <andris.pavenis@iki.fi>
+
+       * include/c_compatibility/stdlib.h: Include wide character related
+       definitions only when they are available in cstdlib.
+
 2016-01-25  Jonathan Wakely  <jwakely@redhat.com>
 
        PR libstdc++/69464
index bd72580..31e7e5f 100644 (file)
@@ -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