incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov" <Farid_Zari...@epam.com>
Subject RE: svn commit: r548112 - /incubator/stdcxx/trunk/tests/support/18.exception.cpp
Date Wed, 20 Jun 2007 15:25:33 GMT
> -----Original Message-----
> From: sebor@apache.org [mailto:sebor@apache.org] 
> Sent: Monday, June 18, 2007 12:11 AM
> To: stdcxx-commits@incubator.apache.org
> Subject: svn commit: r548112 - 
> /incubator/stdcxx/trunk/tests/support/18.exception.cpp
> 
> Author: sebor
> Date: Sun Jun 17 14:10:51 2007
> New Revision: 548112

[...]

  The test fails to compile on MSVC after that patch.
The proposed patch below:

Index: 18.exception.cpp
===================================================================
--- 18.exception.cpp	(revision 549121)
+++ 18.exception.cpp	(working copy)
@@ -57,14 +57,18 @@
 #  include <setjmp.h>    // for siglongjmp(), sigsetjmp()
 
 #  define RW_JMP_BUF             jmp_buf
-#  define RW_SETJMP(env)         sigsetjmp (env, SIGABRT)
+#  define RW_SETJMP(env)         sigsetjmp (env, 0)
 #  define RW_LONGJMP(env, val)   siglongjmp (env, val)
 #else   // if !defined (_RWSTD_OS_LINUX)
 #  include <csetjmp>    // for longjmp(), setjmp()
 
 #  define RW_JMP_BUF             std::jmp_buf
-#  define RW_SETJMP(env)         std::sigsetjmp (env, SIGABRT)
-#  define RW_LONGJMP(env, val)   std::siglongjmp (env, val)
+#  ifdef setjmp
+#    define RW_SETJMP(env)       setjmp (env)
+#  else
+#    define RW_SETJMP(env)       std::setjmp (env)
+#  endif
+#  define RW_LONGJMP(env, val)   std::longjmp (env, val)
 #endif   // _RWSTD_OS_LINUX
 
 
/***********************************************************************
***/

  #ifdef setjmp is needed because of setjmp defined as macro on MSVC.
Or even better would be #include <setjmp.h> instead of <csetjmp> and
don't use the namespace std.

Farid.

Mime
View raw message