bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NULL environ?


From: Bruno Haible
Subject: Re: NULL environ?
Date: Mon, 27 Sep 2010 11:23:06 +0200
User-agent: KMail/1.9.9

Hi Simon,

> Does POSIX permit a NULL 'environ' variable?  I'd say no given what
> http://www.opengroup.org/onlinepubs/9699919799/functions/environ.html
> has to say:
> 
>    In addition, the following variable:
> 
>    extern char **environ;
> 
>    is initialized as a pointer to an array of character pointers to the
>    environment strings. The argv and environ arrays are each terminated
>    by a null pointer.
> 
> Strictly speaking, I don't think NULL is a valid array of character
> pointers terminated with a null pointer.

Your reading of the standard is also mine.

> I've noticed that Wine uses one:

Thanks for having reported it already [1]. Let's see how they handle it.

Bruno

[1] <http://bugs.winehq.org/show_bug.cgi?id=24536>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]