From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 109688 invoked by alias); 4 Jun 2018 19:39:50 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 109329 invoked by uid 89); 4 Jun 2018 19:39:49 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.8 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS autolearn=ham version=3.3.2 spammy=Hx-languages-length:708, cygwin-patches, cygwinpatches, attempted X-HELO: limerock04.mail.cornell.edu Received: from limerock04.mail.cornell.edu (HELO limerock04.mail.cornell.edu) (128.84.13.244) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Jun 2018 19:39:48 +0000 X-CornellRouted: This message has been Routed already. Received: from authusersmtp.mail.cornell.edu (granite4.serverfarm.cornell.edu [10.16.197.9]) by limerock04.mail.cornell.edu (8.14.4/8.14.4_cu) with ESMTP id w54JdkNW001680; Mon, 4 Jun 2018 15:39:46 -0400 Received: from [192.168.0.4] (mta-68-175-129-7.twcny.rr.com [68.175.129.7] (may be forged)) (authenticated bits=0) by authusersmtp.mail.cornell.edu (8.14.4/8.12.10) with ESMTP id w54JdiKC029286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES128-SHA bits=128 verify=NOT); Mon, 4 Jun 2018 15:39:45 -0400 Subject: Re: Help with C clearenv and setenv To: cygwin@cygwin.com References: <7df53a72-cf45-a5df-45dd-6ea2b7d8e0ed@redhat.com> Cc: Eric Blake , sam.habiel@gmail.com From: Ken Brown Message-ID: Date: Mon, 04 Jun 2018 19:39:00 -0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.8.0 MIME-Version: 1.0 In-Reply-To: <7df53a72-cf45-a5df-45dd-6ea2b7d8e0ed@redhat.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-PMX-Cornell-Gauge: Gauge=XXXXX X-PMX-CORNELL-AUTH-RESULTS: dkim-out=none; X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00016.txt.bz2 On 5/31/2018 9:43 AM, Eric Blake wrote: > On 05/30/2018 09:48 AM, Sam Habiel wrote: >> I have code for a database I am porting to Cygwin. >> >> Part of that code is a clearenv() then a couple of setenvs. There is >> an ifdef for Cygwin, as it doesn't implement clearenv. > > It wouldn't be hard to implement clearenv() for a future release of > Cygwin, at least for a version that leaves environ pointing to a > 1-element array containing NULL.  A bit more effort and we could > probably also support glibc's notion of environ==NULL being shorthand > for an empty environment; I've attempted to do this: https://cygwin.com/ml/cygwin-patches/2018-q2/msg00024.html Ken -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple