From 48ea250887d4c60cadcf32c5706bf80b348a1845 Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Wed, 11 Aug 2004 19:36:17 +0000 Subject: [PATCH] Don't define __WINE_USE_MSVCRT in the Visual C++ project. It is not needed as it is defined by the Wine headers. Use __WINE_USE_MSVCRT to detect whether we are being compiled with the Wine MSVCRT headers or the Windows ones. In the latter case: - don't try to include the Wine-specific msvcrt headers - skip all the headers.c tests since there's no MSVCRT_* symbols to check --- dlls/msvcrt/tests/headers.c | 20 ++++++++++++-------- tools/winapi/msvcmaker | 1 - 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/dlls/msvcrt/tests/headers.c b/dlls/msvcrt/tests/headers.c index b5a89d70b54..509ec5bc870 100644 --- a/dlls/msvcrt/tests/headers.c +++ b/dlls/msvcrt/tests/headers.c @@ -15,19 +15,16 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * This file contains tests to ensure consystencies between symbols - * defined in the msvcrt headers, and corresponding duplciated + * This file contains tests to ensure the consistency between symbols + * defined in the regular msvcrt headers, and the corresponding duplicated * symbol defined in msvcrt.h (prefixed by MSVCRT_). */ -#define __WINE_MSVCRT_TEST #include "dos.h" #include "math.h" #include "stdlib.h" -#include "eh.h" #include "io.h" #include "errno.h" -#include "unistd.h" #include "fcntl.h" #include "malloc.h" #include "limits.h" @@ -42,7 +39,6 @@ #include "float.h" #include "stddef.h" #include "mbstring.h" -#include "sys/unistd.h" #include "sys/locking.h" #include "sys/utime.h" #include "sys/types.h" @@ -50,15 +46,19 @@ #include "sys/timeb.h" #include "direct.h" #include "conio.h" -#include "dirent.h" #include "process.h" #include "string.h" #include "time.h" #include "locale.h" #include "setjmp.h" -#include "msvcrt.h" #include "wine/test.h" +#ifdef __WINE_USE_MSVCRT +/* Wine-specific msvcrt headers */ +#define __WINE_MSVCRT_TEST +#include "eh.h" +#include "msvcrt.h" + #ifdef __GNUC__ #define TYPEOF(type) typeof(type) #else @@ -453,9 +453,13 @@ void test_defines() #endif } +#endif /* __WINE_USE_MSVCRT */ + START_TEST(headers) { +#ifdef __WINE_USE_MSVCRT test_types(); test_structs(); test_defines(); +#endif } diff --git a/tools/winapi/msvcmaker b/tools/winapi/msvcmaker index ede60c7790a..b40dac3cebf 100755 --- a/tools/winapi/msvcmaker +++ b/tools/winapi/msvcmaker @@ -673,7 +673,6 @@ sub _generate_dsp { if($wine) { push @defines2, "_\U${project}\E_"; push @defines2, qw(__WINESRC__) if $project !~ /^(?:wine(?:build|test)|.*?_test)$/; - push @defines2, qw(__WINE_USE_MSVCRT); if ($msvc_headers) { push @defines2, qw(__WINE_USE_NATIVE_HEADERS); } -- 2.11.4.GIT