This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Help with C clearenv and setenv
- From: Sam Habiel <sam dot habiel at gmail dot com>
- To: Ken Brown <kbrown at cornell dot edu>
- Cc: cygwin at cygwin dot com, Eric Blake <eblake at redhat dot com>
- Date: Mon, 4 Jun 2018 16:22:52 -0400
- Subject: Re: Help with C clearenv and setenv
- References: <CABHT962nB5jK2sNP9jGaVEbWGrvD72hBVN_q6xX9TKuq3yQ0Gg@mail.gmail.com> <7df53a72-cf45-a5df-45dd-6ea2b7d8e0ed@redhat.com> <e029a690-11fa-ddb7-3702-9e513325b1bb@cornell.edu>
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