wrong macro definition in pthread.h
Václav Haisman
V.Haisman@sh.cvut.cz
Tue Feb 14 16:09:00 GMT 2006
skaller wrote:
> On Mon, 2006-02-13 at 21:27 +0900, 橋 宏彰 wrote:
>> In cvs head.
>>
>> winsup/cygwin/include/pthread.h
>>
>> #define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __cleanup_handler = \
>> { _fn, _arg, NULL }; \
>> _pthread_cleanup_push( &__cleanup_handler );
>> #define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute ); }
>>
>> incorrect '}' position.
>>
>
>>From my man pthread_cleanup_push:
>
> Matching pairs of !pthread_cleanup_push! and !pthread_cleanup_pop!
> must occur in the same function, at the same level of block nest‐
> ing. Actually, !pthread_cleanup_push! and !pthread_cleanup_pop!
> are macros, and the expansion of !pthread_cleanup_push! introduces
> an open brace !{! with the matching closing brace !}! being intro‐
> duced by the expansion of the matching !pthread_cleanup_pop!.
This is what SUSv3 says too.
>
> SO if this is a bug .. it is shared by Linux..:)
>
VH
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 542 bytes
Desc: OpenPGP digital signature
URL: <http://cygwin.com/pipermail/cygwin/attachments/20060214/03ea1c33/attachment.sig>
More information about the Cygwin
mailing list