X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; q=dns; s=default; b=sfKop08j2y6zq5XX OemBWxE2iBSZPNdAyAb6uHeA4YaM9QDNn3Y8LdXwbWHO/oXLkKrCVgi6/9FrNEvP mkKNM0vJnrLGtFCHLLm0w89tvRWvpAvw8ixhOwGCK7Lhv/NZr1w5EGmQNLzzsbdN RlWXgt55RixKV2V3+8dmDqp1zWo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:subject:to:references:cc:from:message-id:date :mime-version:in-reply-to:content-type :content-transfer-encoding; s=default; bh=OZaTmyIpehfUSU2pByoB1q KjAbo=; b=trXuESZoVf0QCrNZH8SX2mhlLXhn0I12rXt1cHaHyVHk3PSVONHpgG 4Bb5wWWaLnUHsaVZdoZzCJxtrhMttD7V+MR3t3Pdjhe0Y4aViR4F4FJYmaDBOu4Q g/KmYHS1GGl52+mhTO9CaGKDMm0GtiJhli1uHvjg7Dzmah4ea7uXk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 X-CornellRouted: This message has been Routed already. Subject: Re: Help with C clearenv and setenv To: cygwin AT cygwin DOT com References: <7df53a72-cf45-a5df-45dd-6ea2b7d8e0ed AT redhat DOT com> Cc: Eric Blake , sam DOT habiel AT gmail DOT com From: Ken Brown Message-ID: Date: Mon, 4 Jun 2018 15:39:44 -0400 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 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