[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
Re: /srv/bzr/emacs/trunk r109685: Rely on <unistd.h> to declare 'environ'
Mon, 20 Aug 2012 19:49:16 +0300
> Date: Sun, 19 Aug 2012 21:05:47 -0700
> From: Paul Eggert <address@hidden>
> CC: address@hidden
> 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.
No, your analysis is valid. I added some additional clarifications in
ChangeLog and conf_post.h.