Proper way to access executable's "environment"?
David Wolfskill
david at catwhisker.org
Sun May 26 18:06:32 UTC 2013
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?...
>
> Should be fine. See environ(7) or
> http://pubs.opengroup.org/onlinepubs/9699919799/functions/environ.html:
>
> "In addition, the following variable, which must be declared by the user
> 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
--
David H. Wolfskill david at 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.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20130526/b9046683/attachment.sig>
More information about the freebsd-ports
mailing list