From a625761eb9a1af31548a1abfdff175d91932f9be Mon Sep 17 00:00:00 2001 From: Francois Gouget Date: Sat, 14 Aug 2004 00:42:12 +0000 Subject: [PATCH] Avoid annoying 'macro redefinition' warnings by defining WIN32_NO_STATUS at the right time. Define _WIN32_WINNT otherwise we are missing some symbols with the Windows headers. --- dlls/ntdll/tests/env.c | 10 ++-------- dlls/ntdll/tests/generated.c | 3 +-- dlls/ntdll/tests/large_int.c | 10 ++-------- dlls/ntdll/tests/ntdll_test.h | 35 +++++++++++++++++++++++++++++++++++ dlls/ntdll/tests/path.c | 10 +--------- dlls/ntdll/tests/rtl.c | 9 +-------- dlls/ntdll/tests/rtlbitmap.c | 11 ++--------- dlls/ntdll/tests/rtlstr.c | 10 ++-------- dlls/ntdll/tests/string.c | 10 ++-------- tools/winapi/tests.dat | 3 +-- 10 files changed, 49 insertions(+), 62 deletions(-) create mode 100644 dlls/ntdll/tests/ntdll_test.h diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c index fd51938b11d..292f084f69e 100644 --- a/dlls/ntdll/tests/env.c +++ b/dlls/ntdll/tests/env.c @@ -18,15 +18,9 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include #include -#include "wine/test.h" -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "winnt.h" -#include "winreg.h" -#include "winternl.h" + +#include "ntdll_test.h" #include "wine/unicode.h" static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, diff --git a/dlls/ntdll/tests/generated.c b/dlls/ntdll/tests/generated.c index 5893d7d5713..4e717177466 100644 --- a/dlls/ntdll/tests/generated.c +++ b/dlls/ntdll/tests/generated.c @@ -11,8 +11,7 @@ #define WINE_NOWINSOCK -#include "ntstatus.h" -#include "windows.h" +#include "ntdll_test.h" #include "wine/test.h" diff --git a/dlls/ntdll/tests/large_int.c b/dlls/ntdll/tests/large_int.c index e01b8289cd9..db48d1adeb4 100644 --- a/dlls/ntdll/tests/large_int.c +++ b/dlls/ntdll/tests/large_int.c @@ -21,17 +21,11 @@ * windows. */ -#include #include -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "wine/test.h" -#include "winnt.h" +#include "ntdll_test.h" + #include "winnls.h" -#include "winreg.h" -#include "winternl.h" /* Function ptrs for ntdll calls */ static HMODULE hntdll = 0; diff --git a/dlls/ntdll/tests/ntdll_test.h b/dlls/ntdll/tests/ntdll_test.h new file mode 100644 index 00000000000..d083729c03f --- /dev/null +++ b/dlls/ntdll/tests/ntdll_test.h @@ -0,0 +1,35 @@ +/* + * Unit test suite for ntdll path functions + * + * Copyright 2003 Eric Pouech + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +#include + +#ifndef _WIN32_WINNT +#define _WIN32_WINNT 0x500 /* For NTSTATUS */ +#endif + +#include "ntstatus.h" +#define WIN32_NO_STATUS +#include "windef.h" +#include "winbase.h" +#include "winnt.h" +#include "winreg.h" +#include "winternl.h" + +#include "wine/test.h" diff --git a/dlls/ntdll/tests/path.c b/dlls/ntdll/tests/path.c index e712a3a83b0..05c4eb637c0 100644 --- a/dlls/ntdll/tests/path.c +++ b/dlls/ntdll/tests/path.c @@ -18,15 +18,7 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -#include - -#include "wine/test.h" -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "winnt.h" -#include "winreg.h" -#include "winternl.h" +#include "ntdll_test.h" static NTSTATUS (WINAPI *pRtlMultiByteToUnicodeN)( LPWSTR dst, DWORD dstlen, LPDWORD reslen, LPCSTR src, DWORD srclen ); diff --git a/dlls/ntdll/tests/rtl.c b/dlls/ntdll/tests/rtl.c index c5a3dd885fb..8de7132e0db 100644 --- a/dlls/ntdll/tests/rtl.c +++ b/dlls/ntdll/tests/rtl.c @@ -21,17 +21,10 @@ * windows. */ -#include #include -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "wine/test.h" -#include "winnt.h" +#include "ntdll_test.h" #include "winnls.h" -#include "winreg.h" -#include "winternl.h" /* Function ptrs for ntdll calls */ static HMODULE hntdll = 0; diff --git a/dlls/ntdll/tests/rtlbitmap.c b/dlls/ntdll/tests/rtlbitmap.c index 1b0e5f343d4..02dfc06b0bb 100644 --- a/dlls/ntdll/tests/rtlbitmap.c +++ b/dlls/ntdll/tests/rtlbitmap.c @@ -20,15 +20,8 @@ * We use function pointers here as some of the bitmap functions exist only * in later versions of ntdll. */ -#include - -#include "wine/test.h" -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "winnt.h" -#include "winreg.h" -#include "winternl.h" + +#include "ntdll_test.h" /* Function ptrs for ordinal calls */ static HMODULE hntdll = 0; diff --git a/dlls/ntdll/tests/rtlstr.c b/dlls/ntdll/tests/rtlstr.c index ad2584999d6..98c3e258c25 100644 --- a/dlls/ntdll/tests/rtlstr.c +++ b/dlls/ntdll/tests/rtlstr.c @@ -22,18 +22,12 @@ * windows. */ -#include #include #define INITGUID -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "wine/test.h" -#include "winnt.h" + +#include "ntdll_test.h" #include "winnls.h" -#include "winreg.h" -#include "winternl.h" #include "guiddef.h" /* Function ptrs for ntdll calls */ diff --git a/dlls/ntdll/tests/string.c b/dlls/ntdll/tests/string.c index 648a612320c..ac08ffab38c 100644 --- a/dlls/ntdll/tests/string.c +++ b/dlls/ntdll/tests/string.c @@ -21,17 +21,11 @@ * windows. */ -#include #include -#include "ntstatus.h" -#include "windef.h" -#include "winbase.h" -#include "wine/test.h" -#include "winnt.h" +#include "ntdll_test.h" + #include "winnls.h" -#include "winreg.h" -#include "winternl.h" /* Function ptrs for ntdll calls */ static HMODULE hntdll = 0; diff --git a/tools/winapi/tests.dat b/tools/winapi/tests.dat index 3c935160c87..8db6f63b00d 100644 --- a/tools/winapi/tests.dat +++ b/tools/winapi/tests.dat @@ -628,8 +628,7 @@ windef.h %include -"ntstatus.h" -"windows.h" +"ntdll_test.h" %type -- 2.11.4.GIT