The __WINE__ macro does not identify the Wine platform

Alexandre Julliard julliard at
Fri Jun 18 04:44:04 CDT 2010

"Alan W. Irwin" <irwin at> writes:

> Note also, my whole argument is based on the assumption that some standard
> means already exists for telling compilers running on Wine to #define
> __WINE__ at run time.  However, if such standard means do not already exist
> there is no way I would want to ask for changes in any compilers (as you
> incorrectly imply later in your post), and again I would just live with
> it.

It sounds like you are confusing compile time and run time. The __WINE__
define can be used at compile time to detect the Wine build
environment. If you are using a Windows compiler you have a Windows
build environment, not a Wine one, so __WINE__ is not defined. That the
Windows compiler is currently running under Wine is completely

If what you want is to add workarounds for Wine in your code, then
neither __WINE__ nor the build platform matter. What matters is the
platform your code is currently running on, which should be detected at

Alexandre Julliard
julliard at

More information about the wine-devel mailing list