This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Fox a MinGW warning in libiberty/setenv.c
- From: Ian Lance Taylor <iant at google dot com>
- To: Eli Zaretskii <eliz at gnu dot org>
- Cc: gdb-patches at sourceware dot org, dj at redhat dot com, gcc-patches at gcc dot gnu dot org
- Date: Wed, 13 Mar 2013 11:52:48 -0700
- Subject: Re: Fox a MinGW warning in libiberty/setenv.c
- References: <83txofi24i.fsf@gnu.org>
On 3/13/13, Eli Zaretskii <eliz@gnu.org> wrote:
>
> #ifdef __MSVCRT__
> extern _CRTIMP char *** __cdecl __MINGW_NOTHROW __p__environ(void);
> extern _CRTIMP wchar_t *** __cdecl __MINGW_NOTHROW
> __p__wenviron(void);
> # define _environ (*__p__environ())
> # define _wenviron (*__p__wenviron())
> #else /* ! __MSVCRT__ */
> #endif /* ! __MSVCRT__ */
>
> #define environ _environ
Cool.
> and setenv.c does this:
>
> #ifndef HAVE_ENVIRON_DECL
> extern char **environ;
> #endif
>
> Solution: Add a guard:
This is OK with a ChangeLog entry.
Thanks.
Ian