[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: alloca redeclaration warning on MinGW
From: |
Derek Price |
Subject: |
Re: alloca redeclaration warning on MinGW |
Date: |
Thu, 07 Jul 2005 12:28:29 -0400 |
User-agent: |
Mozilla Thunderbird 1.0.2 (Windows/20050317) |
Paul Eggert wrote:
>What's the story on alloca versus _alloca in <malloc.h>?
>
>
As near as I can tell, WOE32, when it decides to support POSIX at all,
hides the POSIX function under a name other than the POSIX name (always
_NAME, like alloca -> _alloca, when I've come across it), just to be as
confusing as possible.
>Also, what is the difference between _MSC_VER, __BORLANDC__, and
>__MINGW32__? Are these different compilers? If so, shouldn't we be
>testing for the presence of <malloc.h> rather than listing every
>compiler that could possibly be used on DOS-related platforms?
>
Unfortunately, only MinGW (Minimal GNU for Windows) and Cygwin provide
an open source shell capable of running a configure script under
Windows, as far as I know. There is at least one commercial tool out
there that would probably allow configure to run too, but it has been
years since I played with it.
>Is there a single symbol that all three define?
>
The gl_AC_DOS from m4/dos.m4 from GNULIB looks for _WIN32, __WIN32__,
__MSDOS__, & __CYGWIN__ to decide if a system is WOE32. I have no idea
if this list is exhaustive, and the macro only uses this to define some
C macros for dealing with detection of absolute path names and path
separators, but it could go on to #define WOE32 too, for ease of
reference. This idea was discussed previously on the bug-gnulib mailing
list, but nothing ever came of it that I know of:
<http://lists.gnu.org/archive/html/bug-gnulib/2003-06/msg00076.html>.
Hrvoje Niksic writes:
>However, it is quite possible to simply include a
>working "config.h-windows" with the distribution.
>
This is basically what CVS does. The window-NT/ directory contains a
config.h that gets used under windows and a few replacement .c files
which provide replacements for a few system dependant functions.
>In Wget's
>case I simplified things by having Windows Makefiles specify -DWINDOWS
>
CVS has its windows-NT/config.h #define WOE32.
Cheers,
Derek