From owner-freebsd-ports@FreeBSD.ORG Mon Aug 11 12:37:20 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8FFB1065685 for ; Mon, 11 Aug 2008 12:37:20 +0000 (UTC) (envelope-from jdc@parodius.com) Received: from mx01.sc1.parodius.com (mx01.sc1.parodius.com [72.20.106.3]) by mx1.freebsd.org (Postfix) with ESMTP id 1984A8FC18 for ; Mon, 11 Aug 2008 12:37:19 +0000 (UTC) (envelope-from jdc@parodius.com) Received: by mx01.sc1.parodius.com (Postfix, from userid 1000) id C95441CC0BC; Mon, 11 Aug 2008 05:37:19 -0700 (PDT) Date: Mon, 11 Aug 2008 05:37:19 -0700 From: Jeremy Chadwick To: Ashish Shukla ???????????? ??????????????? Message-ID: <20080811123719.GA23937@eos.sc1.parodius.com> References: <200808111538.09660.wahjava.ml@gmail.com> <20080811112119.GA20914@eos.sc1.parodius.com> <87ljz3sq02.fsf@chateau.d.lf> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87ljz3sq02.fsf@chateau.d.lf> User-Agent: Mutt/1.5.18 (2008-05-17) Cc: freebsd-ports@freebsd.org Subject: Re: Is _environ present in 7.0-RELEASE ? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Aug 2008 12:37:20 -0000 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. 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.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, USA | | Making life hard for others since 1977. PGP: 4BD6C0CB |