stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r366948 - /incubator/stdcxx/trunk/include/rw/_mbstate.h
Date Sun, 08 Jan 2006 00:12:24 GMT
Author: sebor
Date: Sat Jan  7 16:12:21 2006
New Revision: 366948

URL: http://svn.apache.org/viewcvs?rev=366948&view=rev
Log:
2006-01-07  Martin Sebor  <sebor@roguewave.com>

	* _mbstate.h (<cwchar>): Avoided #including on Solaris and instead
	defined struct __mbstate_t and mbstate_t directly in this header.

Modified:
    incubator/stdcxx/trunk/include/rw/_mbstate.h

Modified: incubator/stdcxx/trunk/include/rw/_mbstate.h
URL: http://svn.apache.org/viewcvs/incubator/stdcxx/trunk/include/rw/_mbstate.h?rev=366948&r1=366947&r2=366948&view=diff
==============================================================================
--- incubator/stdcxx/trunk/include/rw/_mbstate.h (original)
+++ incubator/stdcxx/trunk/include/rw/_mbstate.h Sat Jan  7 16:12:21 2006
@@ -5,7 +5,7 @@
  * This is an internal header file used to implement the C++ Standard
  * Library. It should never be #included directly by a program.
  *
- * $Id: //stdlib/dev/include/rw/_mbstate.h#11 $
+ * $Id$
  *
  ***************************************************************************
  *
@@ -85,17 +85,45 @@
 #  endif   // _MBSTATE_T
 
 #elif !defined (_RWSTD_NO_MBSTATE_T)
-#  include _RWSTD_CWCHAR
 
-#  ifndef _RWSTD_NO_USING_LIBC_IN_STD
+#  if defined (_RWSTD_OS_SUNOS)
+
+#    ifndef _MBSTATET_H
+#      define _MBSTATET_H
+
+extern "C" {
+
+// avoid namespace pollution on Solaris
+typedef struct __mbstate_t {
+
+#      ifdef _LP64
+    long __filler [4];
+#      else
+    int __filler [6];
+#      endif   // _LP64
+} __mbstate_t;
+
+}   // extern "C"
+
+#    endif   // _MBSTATET_H
+
+#    ifndef _RWSTD_NO_USING_LIBC_IN_STD
 
 namespace std {
 
-using ::mbstate_t;
+typedef __mbstate_t mbstate_t;
 
 }   // namespace std
 
-#  endif   // _RWSTD_NO_USING_LIBC_IN_STD
+#    else   // if defined (_RWSTD_NO_USING_LIBC_IN_STD)
+
+typedef __mbstate_t mbstate_t;
+
+#    endif   // _RWSTD_NO_USING_LIBC_IN_STD
+
+#  else   // if !defined (_RWSTD_OS_SUNOS)
+#    include _RWSTD_CWCHAR
+#  endif   // _RWSTD_OS_SUNOS
 
 #elif !defined (_RWSTD_MBSTATE_T_DEFINED)
 



Mime
View raw message