stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Sebor <se...@roguewave.com>
Subject Re: svn commit: r548112 - /incubator/stdcxx/trunk/tests/support/18.exception.cpp
Date Fri, 22 Jun 2007 00:55:21 GMT
Since this was my mess I decided to go ahead and apply your
patch: http://svn.apache.org/viewvc?view=rev&rev=549653.

Thanks!
Martin

Martin Sebor wrote:
> Farid Zaripov wrote:
>>> -----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:
> 
> Darn! The #else branch is of course wrong. It should have been
> what you said. Sorry about that. Passing SIGABRT as the second
> argument to sigsetjmp() doesn't make sense since it's treated
> as just a Boolean flag so I also agree with that change. I see
> I messed up in all kinds of ways here...
> 
> Martin
> 
>>
>> 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