Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Aug 2008 18:43:56 +0530
From:      wahjava.ml@gmail.com (Ashish Shukla =?utf-8?B?4KSG4KS24KWA4KS3IA==?= =?utf-8?B?4KS24KWB4KSV4KWN4KSy?=)
To:        Jeremy Chadwick <koitsu@FreeBSD.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: Is _environ present in 7.0-RELEASE ?
Message-ID:  <87d4kfsnhn.fsf@chateau.d.lf>
In-Reply-To: <20080811123719.GA23937@eos.sc1.parodius.com> (Jeremy Chadwick's message of "Mon\, 11 Aug 2008 05\:37\:19 -0700")
References:  <200808111538.09660.wahjava.ml@gmail.com> <20080811112119.GA20914@eos.sc1.parodius.com> <87ljz3sq02.fsf@chateau.d.lf> <20080811123719.GA23937@eos.sc1.parodius.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--=-=-=
Content-Type: text/plain; charset=utf-8

Jeremy Chadwick writes:
> 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:
>> 
>> > http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/getenv.c
>> 
>> 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 1.12.2.2[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.

Yes, this is what I'm trying to say. But if you saw my libxine's
config.log, there is a check in its configure script for presence of
_environ variable, which is not present in 7.0-RELEASE at least. So,
I'm wondering, why no one else received this error while building
libxine port.

> 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.

nop, that is just a simple test case, and my aim of assigning NULL to
force compiler to generate code referencing 'environ' variable.

So, should I file a PR for this ?

Thanks for the reply,

Ashish
-- 
·-- ·- ···· ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --

--=-=-=
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkigOxgACgkQHy+EEHYuXnTcpACgqV29BDotXaf9TKfhaLT+2hJt
UzUAoIBU3kvLk9wK6FTJn0nxDQgoM6pQ
=kEGm
-----END PGP SIGNATURE-----
--=-=-=--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87d4kfsnhn.fsf>