public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* wrong macro definition in pthread.h
@ 2006-02-13 13:06 橋 宏彰
  2006-02-13 13:47 ` skaller
  0 siblings, 1 reply; 4+ messages in thread
From: 橋 宏彰 @ 2006-02-13 13:06 UTC (permalink / raw)
  To: cygwin

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.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wrong macro definition in pthread.h
  2006-02-13 13:06 wrong macro definition in pthread.h 橋 宏彰
@ 2006-02-13 13:47 ` skaller
  2006-02-13 14:33   ` HASHI Hiroaki
  2006-02-14 16:09   ` Václav Haisman
  0 siblings, 2 replies; 4+ messages in thread
From: skaller @ 2006-02-13 13:47 UTC (permalink / raw)
  To: 橋 宏彰; +Cc: cygwin

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!.

SO if this is a bug .. it is shared by Linux..:)

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wrong macro definition in pthread.h
  2006-02-13 13:47 ` skaller
@ 2006-02-13 14:33   ` HASHI Hiroaki
  2006-02-14 16:09   ` Václav Haisman
  1 sibling, 0 replies; 4+ messages in thread
From: HASHI Hiroaki @ 2006-02-13 14:33 UTC (permalink / raw)
  To: skaller; +Cc: cygwin

> > 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!.

OK. I understand.
I will use '_pthread_cleanup_push'.

> SO if this is a bug .. it is shared by Linux..:)
> 
> -- 
> John Skaller <skaller at users dot sf dot net>
> Felix, successor to C++: http://felix.sf.net
> 
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Problem reports:       http://cygwin.com/problems.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/
> 

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: wrong macro definition in pthread.h
  2006-02-13 13:47 ` skaller
  2006-02-13 14:33   ` HASHI Hiroaki
@ 2006-02-14 16:09   ` Václav Haisman
  1 sibling, 0 replies; 4+ messages in thread
From: Václav Haisman @ 2006-02-14 16:09 UTC (permalink / raw)
  To: cygwin

[-- Attachment #1: Type: text/plain, Size: 1079 bytes --]



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


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 542 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-02-14 16:07 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-02-13 13:06 wrong macro definition in pthread.h 橋 宏彰
2006-02-13 13:47 ` skaller
2006-02-13 14:33   ` HASHI Hiroaki
2006-02-14 16:09   ` Václav Haisman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).