Re: Help with C clearenv and setenv
- Date: Wed, 6 Jun 2018 09:02:29 -0400
- From: Sam Habiel <sam.habiel@xxxxxxxxx>
- Subject: Re: Help with C clearenv and setenv
This worked perfectly:
char *dummy = NULL;
environ = &dummy;
Thank you so much.
On Mon, Jun 4, 2018 at 4:22 PM, Sam Habiel <sam.habiel@xxxxxxxxx> wrote:
> Thank you!
> On Mon, Jun 4, 2018 at 3:39 PM, Ken Brown <kbrown@xxxxxxxxxxx> 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:
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple