Date: Mon, 19 Apr 2004 17:22:45 +0200 From: Michael Nottebrock <michaelnottebrock@gmx.net> To: freebsd-current@freebsd.org Cc: standards@freebsd.org Subject: Fwd: Re: libassuan troubles Message-ID: <200404191722.46164.michaelnottebrock@gmx.net>
next in thread | raw e-mail | index | archive | help
--Boundary-02=_G7+gAgoDqzZ/qFV Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Standards issues like these are over my head, so I'm forwarding this here,= =20 hoping some experts can comment on it. =2D--------- Forwarded Message ---------- Subject: Re: libassuan troubles Date: Monday 19 April 2004 17:15 =46rom: Marcus Brinkmann <marcus.brinkmann@ruhr-uni-bochum.de> To: Michael Nottebrock <michaelnottebrock@gmx.net> Cc: gpa-dev@gnupg.org At Mon, 19 Apr 2004 16:54:37 +0200, Michael Nottebrock wrote: > [1 <text/plain; iso-8859-1 (quoted-printable)>] > > On Monday 19 April 2004 16:34, Marcus Brinkmann wrote: > > This seems spurious. Maybe putc_unlocked is only defined as a macro > > on BSD, and thus circumvents the autoconf tests? This would sound > > broken to me (it may be allowed to define it as a macro, but it should > > still be defined as a function in the library). > > Yes, it's a macro. However, I don't see what's wrong about that other than > making autoconf's life harder. putc_unlocked is specified as a function that may be defined as a macro. The fact that it is defined as a macro does not relief you from also declaring and defining it as a function. IE, the following must be possible in a program: #undef putc_unlocked putc_unlocked ('a'); At least this is my interpretation of the wording in POSIX. In fact, if you not only take into account the specification, but also the application usage, it becomes apparent: 16064 APPLICATION USAGE 16065 Since they may be implemented as macros, getc_unlocked( ) and putc_unlocked( ) may treat 16066 incorrectly a stream argument with side effects. In particular, getc_unlocked(*f++) and 16067 = =20 putc_unlocked(*f++) do not necessarily work as expected. Therefor= e, use of these functions in 16068 such situations should be preceded by the following statement as appropriate: 16069 =20 #undef getc_unlocked 16070 #undef putc_unlocked The autoconf test relies on the function in the library object file. This will work for almost all functions, except those for which POSIX explicitely allows the lack of a function definition (like setjmp, =46D_CLR, etc). Thanks, Marcus =2D------------------------------------------------------ =2D-=20 ,_, | Michael Nottebrock | lofi@freebsd.org (/^ ^\) | FreeBSD - The Power to Serve | http://www.freebsd.org \u/ | K Desktop Environment on FreeBSD | http://freebsd.kde.org --Boundary-02=_G7+gAgoDqzZ/qFV Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQBAg+7GXhc68WspdLARAgqhAKCXKK5nwDF3uFLATRKFLUfroUzxsgCdEvEV cTzpfolQbyGcuVa3l2dm1oY= =9s8D -----END PGP SIGNATURE----- --Boundary-02=_G7+gAgoDqzZ/qFV--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200404191722.46164.michaelnottebrock>