stdcxx-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject svn commit: r662596 - /stdcxx/branches/4.2.x/tests/support/18.exception.cpp
Date Mon, 02 Jun 2008 22:54:47 GMT
Author: sebor
Date: Mon Jun  2 15:54:47 2008
New Revision: 662596

URL: http://svn.apache.org/viewvc?rev=662596&view=rev
Log:
2008-06-02  Martin Sebor  <sebor@roguewave.com>

	* tests/support/18.exception.cpp [!_RWSTD_NO_PURE_C_HEADERS &&
	_RWSTD_OS_LINUX](siglongjmp, sigsetjmp): Declared POSIX functions
	that aren't otherwise required or expected to be declared by
	strictly conforming standard C/C++ headers (such as those used
	when compiling with EDG eccp).
	(test_uncaught_exception): Silenced (bogus) EDG eccp remark 550
	about unused variable.

Modified:
    stdcxx/branches/4.2.x/tests/support/18.exception.cpp

Modified: stdcxx/branches/4.2.x/tests/support/18.exception.cpp
URL: http://svn.apache.org/viewvc/stdcxx/branches/4.2.x/tests/support/18.exception.cpp?rev=662596&r1=662595&r2=662596&view=diff
==============================================================================
--- stdcxx/branches/4.2.x/tests/support/18.exception.cpp (original)
+++ stdcxx/branches/4.2.x/tests/support/18.exception.cpp Mon Jun  2 15:54:47 2008
@@ -54,11 +54,40 @@
 #ifdef _RWSTD_OS_LINUX
    // use siglongjmp() and sigsetjmp() on Linux to avoid
    // http://sourceware.org/bugzilla/show_bug.cgi?id=2351
-#  include <setjmp.h>    // for siglongjmp(), sigsetjmp()
 
-#  define RW_JMP_BUF             jmp_buf
-#  define RW_SETJMP(env)         sigsetjmp (env, 0)
-#  define RW_LONGJMP(env, val)   siglongjmp (env, val)
+#  ifndef _RWSTD_NO_PURE_C_HEADERS
+#    include <csetjmp>    // for jmp_buf
+
+// when using "pure C headers" on Linux (i.e., with EDG eccp)
+// declare POSIX functions that aren't otherwise required or
+// expected to be declared by strictly conforming standard
+// C/C++ headers
+
+extern "C" {
+
+typedef std::jmp_buf sigjmp_buf;
+
+// Linux/glibc-specific:
+int __sigsetjmp (sigjmp_buf, int);
+
+#    define sigsetjmp(env, savemask)   __sigsetjmp (env, savemask)
+
+void siglongjmp (sigjmp_buf, int);
+
+}   // extern "C"
+
+#    define RW_JMP_BUF             std::jmp_buf
+#    define RW_SETJMP(env)         sigsetjmp (env, 0)
+#    define RW_LONGJMP(env, val)   siglongjmp (env, val)
+
+#  else   // if defined _RWSTD_NO_PURE_C_HEADERS
+#    include <setjmp.h>    // for siglongjmp(), sigsetjmp()
+
+#    define RW_JMP_BUF             jmp_buf
+#    define RW_SETJMP(env)         sigsetjmp (env, 0)
+#    define RW_LONGJMP(env, val)   siglongjmp (env, val)
+#  endif   // _RWSTD_NO_PURE_C_HEADERS
+
 #else   // if !defined (_RWSTD_OS_LINUX)
 #  include <csetjmp>    // for longjmp(), setjmp()
 
@@ -407,6 +436,9 @@
 
         chk.presult_ = &uncaught;
 
+        // silence (bogus) EDG eccp unused variable remark 550
+        _RWSTD_UNUSED (chk);
+
         throw 0;
     }
     catch (...) {



Mime
View raw message