Hello Richard,

gnustep-dev-bounces+roland.schwingel=onevision...@gnu.org 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...


_______________________________________________
Gnustep-dev mailing list
Gnustep-dev@gnu.org
https://lists.gnu.org/mailman/listinfo/gnustep-dev

Reply via email to