about summary refs log tree commit diff
path: root/wcsmbs
diff options
context:
space:
mode:
Diffstat (limited to 'wcsmbs')
-rw-r--r--wcsmbs/wchar.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/wcsmbs/wchar.h b/wcsmbs/wchar.h
index 8cdd79bb70..8bab0ddd7b 100644
--- a/wcsmbs/wchar.h
+++ b/wcsmbs/wchar.h
@@ -59,8 +59,13 @@
 # define _WINT_T
 typedef unsigned int wint_t;
 #else
-# ifdef __USE_GNU
-__USING_NAMESPACE_STD(wint_t)
+/* Work around problems with the <stddef.h> file which doesn't put
+   wint_t in the std namespace.  */
+# if defined __cplusplus && defined _GLIBCPP_USE_NAMESPACES \
+     && defined __WINT_TYPE__
+__BEGIN_NAMESPACE_STD
+typedef __WINT_TYPE__ wint_t;
+__END_NAMESPACE_STD
 # endif
 #endif