The __WINE__ macro does not identify the Wine platform

Vitaliy Margolen wine-devel at
Thu Jun 17 20:46:35 CDT 2010

On 06/17/2010 02:56 PM, Alan W. Irwin wrote:
> However, that doesn't appear to work for Windows native MinGW on wine.
Correct. Programs running under Wine should not and are not aware of the
fact they are running on Wine and not the real Windows. This aspect 100%
analogous to a software running under virtual machine.

The whole notion of "Wine detectability" was brought up multiple times and
all conversions concluded with the answer "No, Wine will not provide a
specific "blessed" mechanism of detecting Wine". However such means do exist.

> I was aware of __WINE__ being defined for winegcc, but from the man page
> it appears to me that winegcc is a cross-compiler which is a technique I
> want to avoid.
Winegcc is not a "cross-compiler". It's nothing more then a thin wrapper
around system's compiler (be it gcc or something else). Winegcc can not
create WinPE binaries, but only ELF winelib binaries, that can only run
under Wine. I'm sure that's not what you are looking for.


More information about the wine-devel mailing list