[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [RFC] Correctly handling MinGW-w64
From: |
Óscar Fuentes |
Subject: |
Re: [RFC] Correctly handling MinGW-w64 |
Date: |
Mon, 17 Nov 2014 05:13:12 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
Paul Eggert <address@hidden> writes:
> Óscar Fuentes wrote:
>> +dnl We need to distinguish MinGW32 toolset from its spin-off
>> +dnl MinGW-w64. (This has nothing to do with word size.)
>> +MINGW_W64=no
>> +if test $opsys = mingw32; then
>> + AC_CHECK_DECL(__MINGW64_VERSION_MAJOR,
>> + MINGW_W64=yes,
>> + MINGW_W64=no,
>> + [#include <_mingw.h>])
>> + if test "$MINGW_W64" = "yes"; then
>> + AC_DEFINE([MINGW_W64], 1,
>> + [Define to 1 if you are using the MinGW-w64 toolset, regardless
>> of word size.])
>> + fi
>> +fi
>
> Why does the above need to be in configure.ac? Can the relevant code
> just inspect __MINGW64_VERSION_MAJOR instead of inspecting MINGW_W64?
The key here is that __MINGW64_VERSION_MAJOR is defined on a header
(_mingw.h) so we would need to do
#if __MINGW32__
#include <_mingw.h>
#if __MINGW64_VERSION_MAJOR
...
> Or, if we prefer to use our own symbol, can we just put something like
> this:
>
> #ifdef __MINGW64_VERSION_MAJOR
> # define MINGW_W64 1
> #endif
>
> into ms-w32.h or into some other header specific to Microsoft Windows?
We don't have a header that is included by all the .c files, right?
(apart from configure.h, of course.) The need to test for MINGW_W64 can
occur anywhere.
OTOH, I would be happy to use any practical solution that avoids
configure.ac.
- [RFC] Correctly handling MinGW-w64, Óscar Fuentes, 2014/11/16
- Re: [RFC] Correctly handling MinGW-w64, Paul Eggert, 2014/11/16
- Re: [RFC] Correctly handling MinGW-w64,
Óscar Fuentes <=
- Re: [RFC] Correctly handling MinGW-w64, Paul Eggert, 2014/11/16
- Re: [RFC] Correctly handling MinGW-w64, Óscar Fuentes, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Paul Eggert, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Óscar Fuentes, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Eli Zaretskii, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Óscar Fuentes, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Eli Zaretskii, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Óscar Fuentes, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Eli Zaretskii, 2014/11/17
- Re: [RFC] Correctly handling MinGW-w64, Óscar Fuentes, 2014/11/17