You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stdcxx.apache.org by se...@apache.org on 2007/09/20 18:49:53 UTC

svn commit: r577809 - in /incubator/stdcxx/trunk/tests: regress/18.limits.stdcxx-436.cpp self/0.printf.cpp self/0.process.cpp

Author: sebor
Date: Thu Sep 20 09:49:50 2007
New Revision: 577809

URL: http://svn.apache.org/viewvc?rev=577809&view=rev
Log:
2007-09-20  Martin Sebor  <se...@roguewave.com>

	* 0.printf.cpp (__PURE_CNAME): Undefined Compaq (now HP) C++ macro
	to bring in ENOMEM from <errno.h> otherwise guarded (and undefined)
	by the compiler's strict implementation of the C++ libc headers in
	response to the -std strict_ansi_errors command line option.
	* 0.process: Ditto for ENOENT, ECHILD, and ESRCH.
	* 18.limits.stdcxx-436.cpp: Same for popen().

Modified:
    incubator/stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp
    incubator/stdcxx/trunk/tests/self/0.printf.cpp
    incubator/stdcxx/trunk/tests/self/0.process.cpp

Modified: incubator/stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp?rev=577809&r1=577808&r2=577809&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp (original)
+++ incubator/stdcxx/trunk/tests/regress/18.limits.stdcxx-436.cpp Thu Sep 20 09:49:50 2007
@@ -24,8 +24,12 @@
  * 
  **************************************************************************/
 
-#include <limits.h>  // for MB_LEN_MAX
 #include <assert.h>  // for assert()
+#include <limits.h>  // for MB_LEN_MAX
+
+// tell Compaq C++ we need the declaration of the POSIX popen() function
+// that's guarded (not declared) in the compiler's pure C++ libc headers
+#undef __PURE_CNAME
 #include <stdio.h>   // for popen(), fscanf(), pclose(), ...
 
 #if defined(_WIN32) || defined(_WIN64)
@@ -55,4 +59,3 @@
 
     return 0;
 }
-

Modified: incubator/stdcxx/trunk/tests/self/0.printf.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/self/0.printf.cpp?rev=577809&r1=577808&r2=577809&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/self/0.printf.cpp (original)
+++ incubator/stdcxx/trunk/tests/self/0.printf.cpp Thu Sep 20 09:49:50 2007
@@ -22,9 +22,13 @@
  * implied.   See  the License  for  the  specific language  governing
  * permissions and limitations under the License.
  *
- * Copyright 2005-2006 Rogue Wave Software.
+ * Copyright 2005-2007 Rogue Wave Software, Inc.
  * 
  **************************************************************************/
+
+// tell Compaq C++ we need ENOMEM (defined by POSIX
+// but not in the compiler's pure C++ libc headers)
+#undef __PURE_CNAME
 
 #include <rw_printf.h>
 #include <rw_process.h> // for rw_pid_t

Modified: incubator/stdcxx/trunk/tests/self/0.process.cpp
URL: http://svn.apache.org/viewvc/incubator/stdcxx/trunk/tests/self/0.process.cpp?rev=577809&r1=577808&r2=577809&view=diff
==============================================================================
--- incubator/stdcxx/trunk/tests/self/0.process.cpp (original)
+++ incubator/stdcxx/trunk/tests/self/0.process.cpp Thu Sep 20 09:49:50 2007
@@ -25,8 +25,11 @@
 *
 **************************************************************************/
 
+// tell Compaq C++ we need POSIX errno constants that are otherwise
+// guarded (not defined) in the compiler's pure C++ libc headers
+#undef __PURE_CNAME
+#include <errno.h>          // for ENOENT, ECHILD, ESRCH, errno
 #include <string.h>         // for strcmp()
-#include <errno.h>          // for errno
 
 #include <rw_process.h>     // for rw_process_create(), rw_waitpid()
 #include <driver.h>         // for rw_test()