The __WINE__ macro does not identify the Wine platform

Hin-Tak Leung hintak_leung at yahoo.co.uk
Thu Jun 17 19:23:23 CDT 2010


Alan W. Irwin wrote:
> Thus, is there not some standard means that could be used
> for wine to tell the various MinGW compilers built on Microsoft Windows but
> run under wine to always #define __WINE__?

I am quite sure AJ will object to any such things - as far as the various 
compilers (and windows applications in general) are concerned, they should just 
believe they are running under windows. If a compiler (or a windows application) 
behaves differently under Microsoft Windows vs under wine, it is a bug for wine.

AFAIK, the only "recommended/supported" way for an application to tell that it 
is running under wine vs under windows is by querying the presence of one of 
wine-specific registry entries. It is quite "evil" for a compiler to query the 
registry. Microsoft compilers probably try to probe the host about which 
versions of windows it is running in to work around "silently" various bugs in 
different/older versions of OSes which are fixed later, but I doubt any mingw 
people or GNU people for that matter, want to go down that path.

In other words, don't even think about it.



More information about the wine-devel mailing list