X-Spam-Check-By: sourceware.org Message-ID: <43F2002B.3090405@sh.cvut.cz> Date: Tue, 14 Feb 2006 17:07:07 +0100 From: =?UTF-8?B?VsOhY2xhdiBIYWlzbWFu?= User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: wrong macro definition in pthread.h References: <20060213 DOT 212717 DOT 193713030 DOT hasi AT cskk-sv DOT co DOT jp> <1139836005 DOT 8591 DOT 384 DOT camel AT rosella DOT wigram> In-Reply-To: <1139836005.8591.384.camel@rosella.wigram> OpenPGP: id=733031B4 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig6AF97E841C0A13B01FAE5E62" X-IsSubscribed: yes Reply-To: cygwin AT cygwin DOT com Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enig6AF97E841C0A13B01FAE5E62 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable skaller wrote: > On Mon, 2006-02-13 at 21:27 +0900, =E6=A9=8B =E5=AE=8F=E5=BD=B0 wrote: >> In cvs head. >> >> winsup/cygwin/include/pthread.h >> >> #define pthread_cleanup_push(_fn, _arg) { __pthread_cleanup_handler __= cleanup_handler =3D \ >> { _fn, _arg, NULL }; \ >> _pthread_cleanup_push( &__cle= anup_handler ); >> #define pthread_cleanup_pop(_execute) _pthread_cleanup_pop( _execute )= ; } >> >> incorrect '}' position. >> >=20 >>From my man pthread_cleanup_push: >=20 > Matching pairs of !pthread_cleanup_push! and !pthread_cleanup_pop! > must occur in the same function, at the same level of block nest=E2=80= =90 > 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=E2=80= =90 > duced by the expansion of the matching !pthread_cleanup_pop!. This is what SUSv3 says too. >=20 > SO if this is a bug .. it is shared by Linux..:) >=20 VH --------------enig6AF97E841C0A13B01FAE5E62 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (MingW32) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iQEVAwUBQ/IAMW56zbtzMDG0AQIS1QgAoTUvLPtCLCiS8ZCHhwrLHqL/6eXnmDwk QhNo+P0BMYYq4E939+mYYT+R1+eMvNRiqt/KnQpuFLTeN9wfjcn/IDQ0Ri9AgcqN K/kMlTlvfEoZvYo6I8E6W7twQgKeFvVXDnNgbxWJmjKMSmWUl2ikR9p2qW7H7KuL EFuJth+QkseylHZf6eg9AvHtw6mumuriFRKhfyjemi7me17HamsWoH/GrlIjbh0u XDzPo7aDeFStrOzVsTM/bmCF7Yl0j1UNy1kVZDjj/mfAZJ/AN8alcPQc1Nmh27zS 68DmnxwFIo0b/6jtw673JNgc2OyL+/REVK0D67USpGktolfNSOr1tw== =cTeR -----END PGP SIGNATURE----- --------------enig6AF97E841C0A13B01FAE5E62--