stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r587712 - in /incubator/stdcxx/branches/4.2.x/tests/src: file.cpp locale.cpp
Date Wed, 24 Oct 2007 00:21:54 GMT
Author: sebor
Date: Tue Oct 23 17:21:53 2007
New Revision: 587712

URL: http://svn.apache.org/viewvc?rev=587712&view=rev
Log:
2007-10-23  Martin Sebor  <sebor@roguewave.com>

	* locale.cpp (_XOPEN_SOURCE): Avoided #defining macro when
	_RWSTD_NO_PURE_C_HEADERS is not #defined (e.g., EDG eccp).
	* file.cpp: Same.

Modified:
    incubator/stdcxx/branches/4.2.x/tests/src/file.cpp
    incubator/stdcxx/branches/4.2.x/tests/src/locale.cpp

Modified: incubator/stdcxx/branches/4.2.x/tests/src/file.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/tests/src/file.cpp?rev=587712&r1=587711&r2=587712&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/tests/src/file.cpp (original)
+++ incubator/stdcxx/branches/4.2.x/tests/src/file.cpp Tue Oct 23 17:21:53 2007
@@ -22,7 +22,7 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2004-2006 Rogue Wave Software.
+ * Copyright 2004-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
 
@@ -31,12 +31,16 @@
 
 #include <file.h>
 
-#if defined __linux__
-   // on Linux define _XOPEN_SOURCE to get CODESET defined in <langinfo.h>
-#  define _XOPEN_SOURCE   500   /* Single Unix conformance */
-   // bring __int32_t into scope (otherwise <wctype.h> fails to compile)
-#  include <sys/types.h>
-#endif   // __linux__
+#ifdef _RWSTD_OS_LINUX
+#  ifdef _RWSTD_NO_PURE_C_HEADERS
+     // on Linux define _XOPEN_SOURCE to get CODESET defined in <langinfo.h>
+     // (avoid this hackery when using pure "C' headers (i.e., with the EDG
+     // eccp demo)
+#    define _XOPEN_SOURCE   500   /* Single Unix conformance */
+     // bring __int32_t into scope (otherwise <wctype.h> fails to compile)
+#    include <sys/types.h>
+#  endif
+#endif   // Linux
 
 #include <fcntl.h>
 #include <sys/stat.h>

Modified: incubator/stdcxx/branches/4.2.x/tests/src/locale.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/branches/4.2.x/tests/src/locale.cpp?rev=587712&r1=587711&r2=587712&view=diff
==============================================================================
--- incubator/stdcxx/branches/4.2.x/tests/src/locale.cpp (original)
+++ incubator/stdcxx/branches/4.2.x/tests/src/locale.cpp Tue Oct 23 17:21:53 2007
@@ -37,11 +37,15 @@
 #include <rw_process.h>   // for rw_system()
 #include <driver.h>       // for rw_error()
 
-#if defined (_RWSTD_OS_LINUX) && !defined (_XOPEN_SOURCE)
-   // on Linux define _XOPEN_SOURCE to get CODESET defined in <langinfo.h>
-#  define _XOPEN_SOURCE   500   /* Single Unix conformance */
-   // bring __int32_t into scope (otherwise <wctype.h> fails to compile)
-#  include <sys/types.h>
+#ifdef _RWSTD_OS_LINUX
+#  ifdef _RWSTD_NO_PURE_C_HEADERS
+     // on Linux define _XOPEN_SOURCE to get CODESET defined in <langinfo.h>
+     // (avoid this hackery when using pure "C' headers (i.e., with the EDG
+     // eccp demo)
+#    define _XOPEN_SOURCE   500   /* Single Unix conformance */
+     // bring __int32_t into scope (otherwise <wctype.h> fails to compile)
+#    include <sys/types.h>
+#  endif
 #endif   // Linux
 
 #include <fcntl.h>



Mime
View raw message