Is _environ present in 7.0-RELEASE ?

Jeremy Chadwick koitsu at
Mon Aug 11 12:37:20 UTC 2008

On Mon, Aug 11, 2008 at 05:49:41PM +0530, Ashish Shukla ???????????? ??????????????? wrote:
> Jeremy Chadwick writes:
> > On Mon, Aug 11, 2008 at 03:38:04PM +0530, Ashish Shukla wrote:
> [snip]
> >> The '__environ' symbol is also not defined. Can anyone hint me, what is misconfigured on my box ?
> > Something tells me this might interest you.  See the most recent commit:
> >
> Sorry, but I'm not able to figure out, what relevant stuff there is
> relevant here. I checked out the diff[1] (with the previous commit) and
> the recent commit[2], but not able to find anything
> relevant. Could you please elaborate, what are you trying to say ?

1) The only variable exported to a process from libc is "environ",
not __environ or _environ.  Look at src/lib/libc/stdlib/getenv.c for
an example, and confirmation.

2) Your code assigns environ = NULL, which is why I felt the above
commit has relevancy to you.  You should be aware that there are many
different conditions where clearing environ on FreeBSD behaves
differently compared to other OSes; the commit makes it compatible with
pretty much everything.

| Jeremy Chadwick                                jdc at |
| Parodius Networking              |
| UNIX Systems Administrator                  Mountain View, CA, USA |
| Making life hard for others since 1977.              PGP: 4BD6C0CB |

More information about the freebsd-ports mailing list