gnustep-dev
[Top][All Lists]
Advanced

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

Re: Building patch for MSYS2/MINGW32


From: Roland Schwingel
Subject: Re: Building patch for MSYS2/MINGW32
Date: Wed, 02 Mar 2016 07:57:39 +0100
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

Hello Richard,

address@hidden wrote on 01.03.2016 16:00:21:

> Judging by what I can find with web searches, it seems that all the
> modern popular compilers define _WIN32 on ms-windows (and presumably
> _WIN64 if the system is 64bit).
> Have my searches told me wrong?

Your searches did not mislead you. When we created mingw-w64 back in 2007 we decided to define _WIN64 alongside with _WIN32 to be compliant to MSVC here.

There is also a define __WINNT__ but as far as I can overlook it is
common to check for WIN32,_WIN32,__WIN32 or __WIN32__ to detect to run
on windows itself and to check for WIN64,_WIN64,__WIN64 or __WIN64__ to
detect a 64bit build (if needed).

To be more convenient to use we set in our company own buildsystem
a certain define and supply it with -D to the buildprocess when we build
for a certain platform.

GNUStep could do something similiar... Like GNUSTEP_OS_WINDOWS or GNUSTEP_OS_LINUX or GNUSTEP_OS_MACOS. That way you are independant from
a certain compiler. The buildprocess knows for which platform a build
is scheduled and chooses the correct define to set.

Roland

PS: BTW... We createad mingw-w64 at first sight solely to be able
    to compile GNUStep applications with GCC for native
    64bit windows. ;-)
    Back in time there where no other compilers beside gcc around
    being able to compile ObjC code...




reply via email to

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