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 wrote:
> Thank you!
>
> On Mon, Jun 4, 2018 at 3:39 PM, Ken Brown wrote:
>> On 5/31/2018 9:43 AM, Eric Blake wrote:
>>>
>>> On 05/30/2018 09:48 AM, Sam
Thank you!
On Mon, Jun 4, 2018 at 3:39 PM, Ken Brown 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 ifde
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 cle
You're welcome, Sam.
Keith
On Wed, May 30, 2018 at 8:22 PM, Sam Habiel wrote:
> Thank you Keith for you reply; but I am actually looking for the C APIs to
> manipulate the environment; esp. to clear it.
>
> On Wed, May 30, 2018 at 6:05 PM, Keith Christian
> wrote:
>
>> Sam,
>>
>> Here is a shor
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,
On 5/30/2018 11:56 PM, Marco Atzeri wrote:
> On 5/30/2018 4:48 PM, Sam Habiel wrote:
> environ = calloc(1, sizeof(*environ))
Indeed, this does not surprise me since environ is supposed
to be a pointer to an array of char *, whose last entry is
NULL. So the above line is the one needed. It *mig
On 5/30/2018 4:48 PM, 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 just sets
environ = NULL. Well--that really breaks setenv! It returns a "Bad
P
Thank you Keith for you reply; but I am actually looking for the C APIs to
manipulate the environment; esp. to clear it.
On Wed, May 30, 2018 at 6:05 PM, Keith Christian
wrote:
> Sam,
>
> Here is a short demonstration of how to detect unset (possibly null,
> too?) variables in BASH. Not sure if
Sam,
Here is a short demonstration of how to detect unset (possibly null,
too?) variables in BASH. Not sure if this is exactly what you are
looking for but presented for info.
set -x;A_VAR="${RANDOM}";echo "1. ${A_VAR}";echo "2.
${A_VAR:?IS_NOT_SET}";unset A_VAR;set +x
+ set -x
+ A_VAR=28641
+ e
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 just sets
environ = NULL. Well--that really breaks setenv! It returns a "Bad
Poniter" error (-1).
What is the correct w
10 matches
Mail list logo