X-Recipient: archive-cygwin@delorie.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:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type; q=dns; s=default; b=OQsH
	Vj0uMSCWr/JYq7IHjFi0KXKG3v1AB1tL2U7jhrpEHchtJtZP6AUj7+ioThkUXhji
	mAEMHN+S/zLQyyjB3wX2+foTbYojTKrT2nwp7hyWcCSKlSADumhnMa69fmHkVAbn
	tOEnV4GronnD0uuvG40mtikebKrewwM6rTlh/Qk=
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:mime-version:in-reply-to:references:from:date
	:message-id:subject:to:cc:content-type; s=default; bh=G+evVj8AAA
	4a6j9FZIuc8c79cAI=; b=GsLfbC82bx51cJsg0cfUZZC2+GGbjtdkENCaVUgRWf
	YVftkyPDcDt0tWvKtNrTj6+TchZ4MHsbVuXugurbHfBTppuUwYEP3Y43erlt5jAS
	AUUscw8wkkVbhZxbWR5ozDMSULZU1VcH8PfddVAvAYYzSLQ7q9vt8QV7DAtLm8L/
	I=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=blake, Blake, HTo:D*cornell.edu, HTo:U*kbrown
X-HELO: mail-wm0-f45.google.com
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=1e100.net; s=20161025;        h=x-gm-message-state:mime-version:in-reply-to:references:from:date         :message-id:subject:to:cc;        bh=945CStMmYycJlL7Wc9OOFItkYVgCV5RrIdLqXhm/Q2c=;        b=gXzO3FhZ2LNjEQk1ILwYUPeTCxblK6fKIDpDQk63/fHVyBU2pzjIFlSN0bpE2gzF2x         cAruX71jfos9Xw/0WgCxh1dOSVKaKpO4QSZ/sUVX9r/mW2r4tJS1zUN4FHJB9WVNfwWr         tGm52P+USQ7v94Z/jPaYXRyks7GnvqajgmpenruPV811bPp5nzjYD4Mm4K26oT3UrFBd         Nu5Luajsi8pE792DLc2dCHrv6WWea+8I8IPPx5S1OtKDJin1wfAa54eVbq/8+HA2pTGM         RGIyRF+dYvgXsZXe3QHQRsvlztfpNVfZK/q/RunWk4XHwh2V2ZYVWl/4TFbqxhtCtzbq         SfyA==
X-Gm-Message-State: APt69E1ReID7PCCzhdFODUbWzC/39onoIHs19zvUs0V4VqNspFEIB7O8	6w0fdEUEtQEvXPNN0sySbWaYXmRx4ryRf3wmC/I=
X-Google-Smtp-Source: ADUXVKJJK4lf/F8ONXxM7Cu/ghAjtPb4K2h9q1Mihx3e34VPMjN5oGdDxl0p0iycIwd2d37oB4+k82LjYDwK5d5Fze8=
X-Received: by 2002:a1c:992:: with SMTP id 140-v6mr1804335wmj.86.1528290150108; Wed, 06 Jun 2018 06:02:30 -0700 (PDT)
MIME-Version: 1.0
In-Reply-To: <CABHT960ssuKG9HQgwi=8R9qxFhmQTsieWbTKS1oZ9kTa-r=S4Q@mail.gmail.com>
References: <CABHT962nB5jK2sNP9jGaVEbWGrvD72hBVN_q6xX9TKuq3yQ0Gg@mail.gmail.com> <7df53a72-cf45-a5df-45dd-6ea2b7d8e0ed@redhat.com> <e029a690-11fa-ddb7-3702-9e513325b1bb@cornell.edu> <CABHT960ssuKG9HQgwi=8R9qxFhmQTsieWbTKS1oZ9kTa-r=S4Q@mail.gmail.com>
From: Sam Habiel <sam.habiel@gmail.com>
Date: Wed, 6 Jun 2018 09:02:29 -0400
Message-ID: <CABHT960qwZi24db2pN9MG2LABvSrrYOF77JNrv9Oorg2tHpeaQ@mail.gmail.com>
Subject: Re: Help with C clearenv and setenv
To: Ken Brown <kbrown@cornell.edu>
Cc: cygwin@cygwin.com, Eric Blake <eblake@redhat.com>
Content-Type: text/plain; charset="UTF-8"
X-IsSubscribed: yes

Eliot Moss,

This worked perfectly:

char *dummy = NULL;
environ = &dummy;

Thank you so much.

--Sam

On Mon, Jun 4, 2018 at 4:22 PM, Sam Habiel <sam.habiel@gmail.com> wrote:
> Thank you!
>
> On Mon, Jun 4, 2018 at 3:39 PM, Ken Brown <kbrown@cornell.edu> wrote:
>> 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

