Why is __unix__ defined, and not __WINDOWS__ ?

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Mon May 13 04:40:00 GMT 2019


On 2019-05-12 14:54, Houder wrote:
> On Sun, 12 May 2019 13:33:30, Mike Gran via cygwin"  wrote:

>> I think these days the canonical defines are (somebody correct me if
>> I'm wrong)
>>   __CYGWIN__ for Cygwin
>>   _WIN32 as 1 on MinGW when the compilation target is Windows 32-bit
>>   ARM, 64-bit ARM, x86, or x64. Otherwise, undefined.
>>   _WIN64 as 1 on MinGW when the compilation target is Windows 64-bit
>>   ARM or x64. Otherwise, undefined

> https://sourceforge.net/p/predef/wiki/Home/

That information is 15 years out of date, a lot of the platforms are dead or
obsolete, and compilers are gone or changed a lot. There is no attempt at
discrimination across clang or gcc platforms, and no mention of Cygwin or Mingw
platforms, newlib or musl libraries, nor mention of other feature test macros:
better do "man feature_test_macros" for currently useful information.

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list