This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Why is __unix__ defined, and not __WINDOWS__ ?


I have noticed that the gcc and clang compilers have defined the preprocessing macro __unix__, but not __WINDOWS__, _WIN32, or _WIN64 when compiling a windows executable.

Why is this?

A C/C++ program will check for these macros if it wants to know which operating system you are compiling for, and this will give the wrong result.




--
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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]