From owner-svn-src-all@FreeBSD.ORG Wed Jan 20 07:04:11 2010 Return-Path: Delivered-To: svn-src-all@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2B77B106566B; Wed, 20 Jan 2010 07:04:11 +0000 (UTC) (envelope-from ed@hoeg.nl) Received: from palm.hoeg.nl (mx0.hoeg.nl [IPv6:2001:7b8:613:100::211]) by mx1.freebsd.org (Postfix) with ESMTP id C30B88FC08; Wed, 20 Jan 2010 07:04:10 +0000 (UTC) Received: by palm.hoeg.nl (Postfix, from userid 1000) id DA91D1CE54; Wed, 20 Jan 2010 08:04:09 +0100 (CET) Date: Wed, 20 Jan 2010 08:04:09 +0100 From: Ed Schouten To: Bruce Evans Message-ID: <20100120070409.GJ64905@hoeg.nl> References: <201001192307.o0JN7CKu034318@svn.freebsd.org> <20100120163243.A68431@delplex.bde.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ab67L9H6qvgO+k5w" Content-Disposition: inline In-Reply-To: <20100120163243.A68431@delplex.bde.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: svn-src-head@FreeBSD.org, svn-src-all@FreeBSD.org, src-committers@FreeBSD.org Subject: Re: svn commit: r202661 - head/lib/libc/gen X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2010 07:04:11 -0000 --ab67L9H6qvgO+k5w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Bruce Evans wrote: > Of course it is against standards. This is implicit for most functions, > and the part of the standard that you quoted says it explicitly for > uname(): >=20 > > | The following shall be declared as a function and may also be defined > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^ > > | as a macro: > > | > > | int uname(struct utsname *); >=20 > Examples of use of the function when it is also defined as a macro: >=20 > It turned out I slightly misinterpreted the sentence. It should declared as a function *and* may also be defined as a macro. When I read this at first, I interpreted the word "and" as an "or", which in my mind makes sense when you try to keep things simple. But yes, if uname wouldn't be provided as a real function, there are many constructs that could of course break. The most confusing part about this, is that the uname function we provide in libc doesn't match the one in , which uses 128 bytes instead of 32. Fortunately it's not possible to #undef the inline function, but it still sounds quite scary to me. --=20 Ed Schouten WWW: http://80386.nl/ --ab67L9H6qvgO+k5w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (FreeBSD) iEYEARECAAYFAktWqukACgkQ52SDGA2eCwVPhgCcCNfSxAbD8K/4tEGKtFMOnqss AhEAn2WYvmLQLnzyJQGgZcR9JRBuQ37Q =oFLc -----END PGP SIGNATURE----- --ab67L9H6qvgO+k5w--