Fix ntdll/tests/atom.c compilation with the PSDK
Francois Gouget
fgouget at free.fr
Wed Aug 10 07:32:55 CDT 2005
With the PSDK and MSVC, including both ntstatus.h and winnt.h generates
duplicate macro errors. The solution is to define WIN32_NO_STATUS so
winnt.h does not redefine the STATUS_XXX macros.
atom.c also needs some types that are not defined by the Windows 2003
SP1 PSDK (which is the latest one AFAIK).
Changelog:
* dlls/ntdll/tests/atom.c
Francois Gouget <fgouget at free.fr>
Define WIN32_NO_STATUS so we don't get 'duplicate macro' errors when
compiling with the PSDK and MSVC.
Add some types that are not defined by the PSDK.
--
Francois Gouget fgouget at free.fr http://fgouget.free.fr/
You can have my guns when you pry them from my kids cold, dead hands.
-------------- next part --------------
Index: dlls/ntdll/tests/atom.c
===================================================================
RCS file: /var/cvs/wine/dlls/ntdll/tests/atom.c,v
retrieving revision 1.1
diff -u -p -r1.1 atom.c
--- dlls/ntdll/tests/atom.c 11 May 2005 15:56:09 -0000 1.1
+++ dlls/ntdll/tests/atom.c 28 Jul 2005 13:38:50 -0000
@@ -23,15 +23,26 @@
#include <stdio.h>
#include <stdarg.h>
+
+#include "ntstatus.h"
+/* Define WIN32_NO_STATUS so MSVC does not give us duplicate macro
+ * definition errors when we get to winnt.h
+ */
+#define WIN32_NO_STATUS
+
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winnls.h"
-#include "ntstatus.h"
#include "wine/test.h"
#include "wine/unicode.h"
#include "winternl.h"
+#ifndef __WINE_WINTERNL_H
+typedef unsigned short RTL_ATOM, *PRTL_ATOM;
+typedef struct atom_table *RTL_ATOM_TABLE, **PRTL_ATOM_TABLE;
+#endif
+
/* Function pointers for ntdll calls */
static HMODULE hntdll = 0;
static NTSTATUS (WINAPI *pRtlCreateAtomTable)(ULONG,PRTL_ATOM_TABLE);
More information about the wine-patches
mailing list