From owner-freebsd-current@FreeBSD.ORG Mon Apr 19 08:22:50 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6668716A4CE; Mon, 19 Apr 2004 08:22:50 -0700 (PDT) Received: from meitner.wh.uni-dortmund.de (meitner.wh.Uni-Dortmund.DE [129.217.129.133]) by mx1.FreeBSD.org (Postfix) with ESMTP id E683543D31; Mon, 19 Apr 2004 08:22:47 -0700 (PDT) (envelope-from michaelnottebrock@gmx.net) Received: from lofi.dyndns.org (pc2-105.intern.meitner [10.3.12.105]) by meitner.wh.uni-dortmund.de (Postfix) with ESMTP id 0A89016758C; Mon, 19 Apr 2004 17:22:47 +0200 (CEST) Received: from [192.168.8.4] (kiste.my.domain [192.168.8.4]) (authenticated bits=0) by lofi.dyndns.org (8.12.10/8.12.10) with ESMTP id i3JFMk8f039624 (version=TLSv1/SSLv3 cipher=RC4-MD5 bits=128 verify=NO); Mon, 19 Apr 2004 17:22:46 +0200 (CEST) (envelope-from michaelnottebrock@gmx.net) From: Michael Nottebrock Date: Mon, 19 Apr 2004 17:22:45 +0200 User-Agent: KMail/1.6.2 To: freebsd-current@freebsd.org MIME-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="Boundary-02=_G7+gAgoDqzZ/qFV"; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200404191722.46164.michaelnottebrock@gmx.net> X-Virus-Scanned: by amavisd-new cc: standards@freebsd.org Subject: Fwd: Re: libassuan troubles X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Apr 2004 15:22:50 -0000 --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 To: Michael Nottebrock Cc: gpa-dev@gnupg.org At Mon, 19 Apr 2004 16:54:37 +0200, Michael Nottebrock wrote: > [1 ] > > 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--