summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandris <andris@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-26 16:07:33 +0000
committerandris <andris@138bc75d-0d04-0410-961f-82ee72b054a4>2016-01-26 16:07:33 +0000
commit7a3a29d0d81ad02727273aed6655166034d786e8 (patch)
treebaa284ffa39fca6b62c477fcb1090beb05d38517
parent88444ae25841207d634af5206d00fcb4f565ce39 (diff)
downloadgcc-7a3a29d0d81ad02727273aed6655166034d786e8.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@232835 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--libstdc++-v3/ChangeLog5
-rw-r--r--libstdc++-v3/include/c_compatibility/stdlib.h4
2 files changed, 9 insertions, 0 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index bebe638edce..b96afe6a880 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -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
diff --git a/libstdc++-v3/include/c_compatibility/stdlib.h b/libstdc++-v3/include/c_compatibility/stdlib.h
index bd72580cffe..31e7e5ff1a6 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