Brian Dessent wrote: > This should be __CYGWIN__ and not __CYGWIN32__. Yes, you are right. My bad. Here is the corrected summary:
1) The compiler indicators: - Mingw, Cygwin: __GNUC__ - MSVC: _MSC_VER - Borland: __TURBOC__, __BORLANDC__ 2) The CPU indicators for x86: - Mingw, Cygwin: _X86_, __i386__ - MSVC, Borland: _M_IX86 The CPU indicators for x86_64: - Mingw, Cygwin: __x86_64__ - MSVC: _M_X64 3) Operating system: - Cygwin default: __CYGWIN__ - Cygwin when the installer wants to use native Woe32 API (option -mwin32): __CYGWIN__, _WIN32 - Mingw: _WIN32, __MINGW32__ - MSVC: _WIN32 - Borland: __WIN32__ So, to test whether native Woe32 API is available, use defined _WIN32 || defined __WIN32__ And to test whether native Woe32 API should be used when there is also an equivalent POSIX API, use (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ Bruno