Author: faridz
Date: Tue Oct 30 07:44:44 2007
New Revision: 590092
URL: http://svn.apache.org/viewvc?rev=590092&view=rev
Log:
2007-10-30 Farid Zaripov <[EMAIL PROTECTED]>
Merged r587712 from branches/4.2.x
* 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/trunk/tests/src/file.cpp
incubator/stdcxx/trunk/tests/src/locale.cpp
Modified: incubator/stdcxx/trunk/tests/src/file.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/file.cpp?rev=590092&r1=590091&r2=590092&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/file.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/file.cpp Tue Oct 30 07:44:44 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/trunk/tests/src/locale.cpp
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/src/locale.cpp?rev=590092&r1=590091&r2=590092&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/src/locale.cpp (original)
+++ incubator/stdcxx/trunk/tests/src/locale.cpp Tue Oct 30 07:44:44 2007
@@ -22,7 +22,7 @@
* implied. See the License for the specific language governing
* permissions and limitations under the License.
*
- * Copyright 2001-2007 Rogue Wave Software.
+ * Copyright 2001-2007 Rogue Wave Software, Inc.
*
**************************************************************************/
@@ -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>