flags defined under the various windows OS'es ,cygwins,mingw's and other's?

1,992 views
Skip to first unread message

Jason

unread,
Sep 21, 2010, 8:43:27 PM9/21/10
to mpir-...@googlegroups.com
MSCV32 defines _MSC_VER _WIN32
MSCV64 defines _MSC_VER _WIN32 _WIN64
cygwin defines nothing
MINGW32 defines _WIN32 __MINGW32__
MINGW64 defines _WIN32 __MINGW32__ _WIN64 __MINGW64___

note: the mingw32 and mingw64 also define the obviously redundant WIN32 __WIN32
__WIN32__ and of course the same win 64 in it ,these add nothing.

In case another system comes out or we want to back some existing system , I
suggest we dont use the __MINGW32__ and 64bit varient , we dont need them
(yet)

Jason

Jason

unread,
Sep 22, 2010, 2:35:04 PM9/22/10
to mpir-...@googlegroups.com

Most code will run on any platform , but for code that is platform specific(for
any reason) then I think we should assume this

Default is linux/unix/cygwin/bsd/Darwin ( I dont think we have any code that
needs to distinguish these)

Windows only code #if defined(_WIN32)

MSVC only code #if defined(_MSC_VER)

WIn64 only code #if defined(_WIN64)

Mingw only code #if defined(_WIN32) && ! defined(_MSC_VER)

and any combination can be got by boolean logic

I manly posted this so we have a record of what the switches should be for
each OS.

Jason

Reply all
Reply to author
Forward
0 new messages