Date: Sun, 26 May 2013 11:06:29 -0700 From: David Wolfskill <david@catwhisker.org> To: freebsd-ports@freebsd.org Subject: Re: Proper way to access executable's "environment"? Message-ID: <20130526180629.GB1334@albert.catwhisker.org> In-Reply-To: <51A24C77.6000108@gmx.net> References: <20130526172015.GA1334@albert.catwhisker.org> <51A24C77.6000108@gmx.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--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 <stdlib.h> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20130526180629.GB1334>