diff --git a/configure b/configure index fc78d87aebf..bbdf04b67d5 100755 --- a/configure +++ b/configure @@ -23023,7 +23023,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 wine_fn_output_makedep () { as_dir=tools; as_fn_mkdir_p - $CC -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep$ac_exeext ${wine_srcdir}tools/makedep.c $LDFLAGS + $CC -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ -DWINE_UNIX_LIB $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep$ac_exeext ${wine_srcdir}tools/makedep.c $LDFLAGS } wine_fn_output_makefile () { diff --git a/configure.ac b/configure.ac index e571c32bcdf..58efc37296c 100644 --- a/configure.ac +++ b/configure.ac @@ -3462,7 +3462,7 @@ then [wine_fn_output_makedep () { AS_MKDIR_P(tools) - $CC -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep$ac_exeext ${wine_srcdir}tools/makedep.c $LDFLAGS + $CC -I${wine_srcdir}tools -Iinclude -I${wine_srcdir}include -D__WINESRC__ -DWINE_UNIX_LIB $EXTRACFLAGS $CPPFLAGS $CFLAGS -o tools/makedep$ac_exeext ${wine_srcdir}tools/makedep.c $LDFLAGS }]) fi diff --git a/include/windef.h b/include/windef.h index 28aa7d6a237..b5f8f3d0b4c 100644 --- a/include/windef.h +++ b/include/windef.h @@ -54,11 +54,13 @@ extern "C" { # endif #endif +#if !defined(_MSC_VER) && !defined(__MINGW32__) + #ifdef WINE_UNIX_LIB # define __stdcall # define __cdecl # define __fastcall -#elif !defined(_MSC_VER) && !defined(__MINGW32__) +#else # undef __stdcall # ifdef __i386__ # ifdef __GNUC__ @@ -99,6 +101,8 @@ extern "C" { # ifndef __thiscall # define __thiscall __stdcall # endif +#endif /* WINE_UNIX_LIB */ + #endif /* _MSC_VER || __MINGW32__ */ #ifndef __ms_va_list diff --git a/tools/makedep.c b/tools/makedep.c index 00ebfa27e8f..3322e825617 100644 --- a/tools/makedep.c +++ b/tools/makedep.c @@ -2351,7 +2351,6 @@ static struct strarray get_source_defines( struct makefile *make, struct incl_fi } strarray_addall( &ret, make->define_args ); strarray_addall( &ret, get_expanded_file_local_var( make, obj, "EXTRADEFS" )); - if (source->file->flags & FLAG_C_UNIX) strarray_add( &ret, "-DWINE_UNIX_LIB" ); return ret; } @@ -4247,6 +4246,7 @@ static void load_sources( struct makefile *make ) make->define_args = empty_strarray; make->unix_cflags = empty_strarray; if (!make->extlib) strarray_add( &make->define_args, "-D__WINESRC__" ); + strarray_add( &make->unix_cflags, "-DWINE_UNIX_LIB" ); value = get_expanded_make_var_array( make, "EXTRAINCL" ); for (i = 0; i < value.count; i++)