From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10889 invoked by alias); 31 Oct 2004 00:15:29 -0000 Mailing-List: contact pthreads-win32-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: pthreads-win32-owner@sources.redhat.com Received: (qmail 10882 invoked from network); 31 Oct 2004 00:15:28 -0000 Received: from unknown (HELO ps10.kent.dot.net.au) (202.147.78.201) by sourceware.org with SMTP; 31 Oct 2004 00:15:28 -0000 Received: from ip-83-82.dot.net.au ([202.147.83.82] helo=ise.canberra.edu.au) by ps10.kent.dot.net.au with esmtp (Exim 3.35 #4) id 1CO3Rj-0006cA-00; Sun, 31 Oct 2004 11:19:48 +1100 Message-ID: <41842E9C.3070908@ise.canberra.edu.au> Date: Sun, 31 Oct 2004 00:15:00 -0000 From: Ross Johnson User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421 MIME-Version: 1.0 To: Dany Joly , pthreads-win32@sources.redhat.com Subject: Re: PThread Win32 problem with pthread_cleanup_push / pop References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2004/txt/msg00122.txt.bz2 No no. These macros are supposed to form a pair, so that together they form the start and end of the same block. Ross Dany Joly wrote: > Hi, > > I am unable to compile a VC++project (with .NET 2003 and 6.0) that > uses the pthread_cleanup_push and pthread_cleanup_pop macro defined in > pthread.h without replacing the following code at line 686 of pthread.h: > > Previous ( '}' seems to be missing): > > #ifdef __CLEANUP_C > > /* > * C implementation of PThreads cancel cleanup > */ > > #define pthread_cleanup_push( _rout, _arg ) \ > { \ > ptw32_cleanup_t _cleanup; \ > \ > ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) > (_rout), (_arg) ); \ > > #define pthread_cleanup_pop( _execute ) \ > (void) ptw32_pop_cleanup( _execute ); \ > } > > #else /* __CLEANUP_C */ > > > New (only added '}' at the end of the macro): > > #ifdef __CLEANUP_C > > /* > * C implementation of PThreads cancel cleanup > */ > > #define pthread_cleanup_push( _rout, _arg ) \ > { \ > ptw32_cleanup_t _cleanup; \ > \ > ptw32_push_cleanup( &_cleanup, (ptw32_cleanup_callback_t) > (_rout), (_arg) ); \ > } > #define pthread_cleanup_pop( _execute ) \ > { \ > (void) ptw32_pop_cleanup( _execute ); \ > } > > #else /* __CLEANUP_C */ > > > I compared the header with older versions from 2002 and this has been > unchanged for 2 years. Is it really a bug or something I don't > understand? > > > Thank you, > Dany > >