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.

diff --git a/dlls/ntdll/tests/env.c b/dlls/ntdll/tests/env.c
index fd51938..292f084 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 <stdarg.h>
 #include <stdio.h>
-#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 5893d7d..4e71717 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 e01b828..db48d1a 100644
--- a/dlls/ntdll/tests/large_int.c
+++ b/dlls/ntdll/tests/large_int.c
@@ -21,17 +21,11 @@
  * windows.
  */
 
-#include <stdarg.h>
 #include <stdlib.h>
 
-#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 0000000..d083729
--- /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 <stdarg.h>
+
+#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 e712a3a..05c4eb6 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 <stdarg.h>
-
-#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 c5a3dd8..8de7132 100644
--- a/dlls/ntdll/tests/rtl.c
+++ b/dlls/ntdll/tests/rtl.c
@@ -21,17 +21,10 @@
  * windows.
  */
 
-#include <stdarg.h>
 #include <stdlib.h>
 
-#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 1b0e5f3..02dfc06 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 <stdarg.h>
 
-#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 ad25849..98c3e25 100644
--- a/dlls/ntdll/tests/rtlstr.c
+++ b/dlls/ntdll/tests/rtlstr.c
@@ -22,18 +22,12 @@
  * windows.
  */
 
-#include <stdarg.h>
 #include <stdlib.h>
 
 #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 648a612..ac08ffa 100644
--- a/dlls/ntdll/tests/string.c
+++ b/dlls/ntdll/tests/string.c
@@ -21,17 +21,11 @@
  * windows.
  */
 
-#include <stdarg.h>
 #include <stdlib.h>
 
-#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 3c93516..8db6f63 100644
--- a/tools/winapi/tests.dat
+++ b/tools/winapi/tests.dat
@@ -628,8 +628,7 @@
 
 %include
 
-"ntstatus.h"
-"windows.h"
+"ntdll_test.h"
 
 %type