From owner-freebsd-ports@FreeBSD.ORG Sun May 26 18:06:32 2013 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id D7D196A0 for ; Sun, 26 May 2013 18:06:32 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id B733B687 for ; Sun, 26 May 2013 18:06:32 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.7/8.14.7) with ESMTP id r4QI6Tst003976 for ; Sun, 26 May 2013 11:06:29 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.7/8.14.7/Submit) id r4QI6TEx003975 for freebsd-ports@freebsd.org; Sun, 26 May 2013 11:06:29 -0700 (PDT) (envelope-from david) Date: Sun, 26 May 2013 11:06:29 -0700 From: David Wolfskill To: freebsd-ports@freebsd.org Subject: Re: Proper way to access executable's "environment"? Message-ID: <20130526180629.GB1334@albert.catwhisker.org> References: <20130526172015.GA1334@albert.catwhisker.org> <51A24C77.6000108@gmx.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="98e8jtXdkpgskNou" Content-Disposition: inline In-Reply-To: <51A24C77.6000108@gmx.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 May 2013 18:06:32 -0000 --98e8jtXdkpgskNou Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 26, 2013 at 07:55:03PM +0200, Stefan Ehmann wrote: > ... > > So I have a couple of questions related to the above: > > * Is the patch correct?... >=20 > Should be fine. See environ(7) or > http://pubs.opengroup.org/onlinepubs/9699919799/functions/environ.html: >=20 > "In addition, the following variable, which must be declared by the user= =20 > if it is to be used directly: extern char **environ; " Cool; thanks. (Aside: I'd be happy to hear of plausible reasons the earlier approach does not appear to fail in i386. I'm suspecting some sort of compatibilty shim -- which was jettisoned for amd64, probably quite intentionally.) > Including is not necessary to access the environ variable. OK; I'll elide that from the patch (& re-test), then. I'd rather not add things gratuitously. Thanks! Peace, david --=20 David H. Wolfskill david@catwhisker.org Taliban: Evil men with guns afraid of truth from a 14-year old girl. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --98e8jtXdkpgskNou Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.20 (FreeBSD) iEYEARECAAYFAlGiTyQACgkQmprOCmdXAD0hYACeIdYNQRFYLN7vTlXlyIQvNo3c ecwAn0CGctwevmpFQ2bT4nrjPlPHql4s =sXes -----END PGP SIGNATURE----- --98e8jtXdkpgskNou--