bug-libtool
[Top][All Lists]
Advanced

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

Re: msys/mingw warnings about string length and putenv absence with gcc


From: Roumen Petrov
Subject: Re: msys/mingw warnings about string length and putenv absence with gcc -Wall -ansi
Date: Tue, 30 Dec 2008 20:42:41 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.18) Gecko/20081114 SeaMonkey/1.1.13

If I compile my project on MSYS/MinGW with gcc -Wall -ansi (plus other
warning stuff that shouldn't matter here) I get two unexpected
warnings. Problem 1 is string lengths that are too long, problem 2 is
a missing putenv declaration.  Based on a previous bug report, it
seems the string lengths
[SNIP]

Problem #1 was fixed here:
[SNIP]
Problem #2 was fixed -- for CYGWIN -- here:
[SNIP]

It isn't difficult to extend this fix for the MINGW case, as well --
something like the following (around line 2840 in ltmain.m4sh):

 #ifdef _MSC_VER
 # include <direct.h>
 # include <process.h>
 # include <io.h>
 # define setmode _setmode
+# ifdef __STRICT_ANSI__
+int putenv (char *);
+# endif
 #else
[SNIP]
It is GCC(mingw) not MSVC compiler, i.e. __MINGW32__ vs _MSC_VER.


Roumen

P.S. Usually compile with -ansi for mingw host fail. There is some bugs in headers (as example inline instead __inline - I think fixed in repository).




reply via email to

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