emacs-devel
[Top][All Lists]
Advanced

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

Re: /srv/bzr/emacs/trunk r109685: Rely on <unistd.h> to declare 'environ


From: Paul Eggert
Subject: Re: /srv/bzr/emacs/trunk r109685: Rely on <unistd.h> to declare 'environ'
Date: Sun, 19 Aug 2012 21:05:47 -0700
User-agent: Mozilla/5.0 (X11; Linux i686; rv:14.0) Gecko/20120714 Thunderbird/14.0

On 08/19/2012 07:54 PM, Eli Zaretskii wrote:
> These parts of your changes seem to be wrong, or at least
> under-documented in ChangeLog: the Windows build does not use
> lib/unistd.h.

On Windows, as I understand it, the system declares
'environ', so gnulib doesn't need to do anything special.

I'm getting this info from gnulib's unistd.h file.
It says that on Windows 'environ' is declared by
stdlib.h.  But Emacs's config.h includes stdlib.h, so
'environ' is always visible.

I tried to clarify this by editing the ChangeLog in
trunk bzr 109688.

If my understanding is wrong, my apologies, but the
point is that the main code should be able to assume that
"#include <config.h>" followed by "#include <unistd.h>"
declares 'environ', and if my analysis is incorrect and
that's not the case then I suggest adding
'extern char **environ;' to nt/inc/unistd.h.




reply via email to

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