This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: MinGW compilation warnings in libiberty's include/environ.h
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org, gdb-patches at sourceware dot org
- Date: Fri, 19 May 2017 20:31:35 +0300
- Subject: Re: MinGW compilation warnings in libiberty's include/environ.h
- Authentication-results: sourceware.org; auth=none
- References: <83k25rcqw2.fsf@gnu.org> <e7743e9f-2081-c730-bc57-144224690b1c@redhat.com>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Fri, 19 May 2017 16:51:30 +0100
>
> So again there's a system header that defines the symbol
> but for some reason libiberty still wants to declare/define
> it is if it weren't?
Yes. AFAICS, libiberty's configure script doesn't check the
declaration, it only probes the setenv function itself. You can see
that the cpp directives around the environ declarations are
OS-dependent rather than based on autoconf tests.
> That sounds to me like the root issue that should be fixed,
> so that these fallback definitions don't come into into play at all.
> I.e., why isn't HAVE_ENVIRON_DECL defined on mingw when
> setenv.o is built? Sounds like a decl check is missing
> in configure.ac.
Most probably, yes.