From ce09e564d71eec1633cdc8385d6f851f575ed5c9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Tue, 14 May 2019 13:57:06 +0200 Subject: [PATCH] configure: Don't allow using config.h when cross-compiling. Signed-off-by: Alexandre Julliard --- configure.ac | 7 ++++--- dlls/winecrt0/register.c | 1 - dlls/winecrt0/stub.c | 2 -- include/config.h.in | 5 +++-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 7509dc75158..10cef9c7b7a 100644 --- a/configure.ac +++ b/configure.ac @@ -2715,9 +2715,10 @@ dnl **** Generate output files **** AH_TOP([#ifndef __WINE_CONFIG_H #define __WINE_CONFIG_H -#ifndef WINE_CROSS_PE]) -AH_BOTTOM([#endif /* WINE_CROSS_PE */ -#endif /* __WINE_CONFIG_H */]) +#ifdef WINE_CROSS_PE +#error config.h should not be used when cross-compiling +#endif]) +AH_BOTTOM([#endif /* __WINE_CONFIG_H */]) AC_CONFIG_COMMANDS([include/stamp-h], [echo timestamp > include/stamp-h]) AS_ECHO_N("creating Makefile rules...") >&AS_MESSAGE_FD diff --git a/dlls/winecrt0/register.c b/dlls/winecrt0/register.c index 70a4a35dc92..8c15d1be721 100644 --- a/dlls/winecrt0/register.c +++ b/dlls/winecrt0/register.c @@ -18,7 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" #include #define COBJMACROS diff --git a/dlls/winecrt0/stub.c b/dlls/winecrt0/stub.c index 913181adb37..49e179ef7ed 100644 --- a/dlls/winecrt0/stub.c +++ b/dlls/winecrt0/stub.c @@ -18,8 +18,6 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA */ -#include "config.h" - #include #include "windef.h" #include "winbase.h" diff --git a/include/config.h.in b/include/config.h.in index 836008fa9ae..7998764075c 100644 --- a/include/config.h.in +++ b/include/config.h.in @@ -2,7 +2,9 @@ #ifndef __WINE_CONFIG_H #define __WINE_CONFIG_H -#ifndef WINE_CROSS_PE +#ifdef WINE_CROSS_PE +#error config.h should not be used when cross-compiling +#endif /* Define to the file extension for executables. */ #undef EXEEXT @@ -1475,5 +1477,4 @@ #undef inline #endif -#endif /* WINE_CROSS_PE */ #endif /* __WINE_CONFIG_H */