libtool-patches
[Top][All Lists]
Advanced

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

Re: [PATCH] Include _CRTIMP in _putenv() declaration in EXE wrapper sour


From: Charles Wilson
Subject: Re: [PATCH] Include _CRTIMP in _putenv() declaration in EXE wrapper sources.
Date: Thu, 23 Jun 2011 12:32:32 -0400
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.18) Gecko/20110616 Thunderbird/3.1.11

On 6/23/2011 5:34 AM, Vadim Zeitlin wrote:
> Re-declaring _putenv() without _CRTIMP in strict ANSI mode when using MinGW
> resulted in a warning because of a conflict with the previous declaration that
> did use _CRTIMP.
> 
> Simply add _CRTIMP to our declaration to avoid it.

> -int _putenv (const char *);
> +_CRTIMP int _putenv (const char *);

Probably should also add __cdecl (for correctness, not warning
suppression) in case the user has done a -mrtd.

_CRTIMP int __cdecl _putenv (const char*);

However, no need for __MINGW_NOTHROW, I think, because gcc does not
appear to give this warning when "redeclarations" only differ by missing
attributes (in this case, __attribute__ ((__nothrow__)) ).

The larger issue, of course, is that we need to implement
LT_WRAPPER_CFLAGS variable (*), that strips out warning flags and
especially -Werror and its other-compiler analogues from the user's
C[,PP,XX]FLAGS -- otherwise, we will continue to hit this "problem" over
and over.

This is the third or fourth time we've had to update the c-wrapper code
for similar issues.

(*) Dunno what the correct name should be.  LT_CFLAGS_FOR_BUILD or
similar is /wrong/, because the wrapper is actually built for $host.

--
Chuck



reply via email to

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