From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15336 invoked from network); 25 Jul 2007 17:59:52 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Jul 2007 17:59:52 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 43980 invoked from network); 25 Jul 2007 17:59:46 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Jul 2007 17:59:46 -0000 Received: (qmail 5468 invoked by alias); 25 Jul 2007 17:59:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23698 Received: (qmail 11276 invoked from network); 25 Jul 2007 15:09:31 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Jul 2007 15:09:31 -0000 Received: (qmail 57008 invoked from network); 25 Jul 2007 15:09:31 -0000 Received: from farley.org (HELO mail.farley.org) (67.64.95.201) by a.mx.sunsite.dk with SMTP; 25 Jul 2007 15:09:27 -0000 Received: from thor.farley.org (thor.farley.org [192.168.1.5]) by mail.farley.org (8.14.1/8.14.1) with ESMTP id l6PF9MAh030015 for ; Wed, 25 Jul 2007 10:09:22 -0500 (CDT) (envelope-from scf@FreeBSD.org) Date: Wed, 25 Jul 2007 10:09:22 -0500 (CDT) From: "Sean C. Farley" To: zsh-workers@sunsite.dk Subject: putenv()/environ bug Message-ID: <20070725093254.T20275@thor.farley.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed As noticed here[1] following a change[2] in FreeBSD's *env() functions, zsh is mixing *env() (putenv() in this case) functions with direct access to the environ variable's contents against the IEEE Std 1003.1 specification. For the FreeBSD port, there is an easy solution in the thread to tell configure that putenv() does not exist. I just wanted to let the zsh development team know about this issue. Regarding FreeBSD, if you replace the environ pointer, a call to setenv(), putenv() or unsetenv() will detect this and update itself internally. getenv() will use environ until one of the other *env() functions is called. If you manipulate environ values after a call to setenv(), putenv() or unsetenv() is made, then the change will go unnoticed. BTW, is there a particular reason the standard *env() functions cannot be used for all operations to environ if found? Sean 1. http://lists.freebsd.org/pipermail/freebsd-current/2007-July/075541.html 2. http://lists.freebsd.org/pipermail/freebsd-ports/2007-May/041577.html -- scf@FreeBSD.org