Use ntstatus.h in dlls/ntdll/tests/error.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Using ntstatus.h makes it possible to compile this file on Windows.
There's just one hitch. Naively including ntstatus.h leads to duplicate
definitions of the some STATUS_* macros because winnt.h defines them
too. The solution is to include ntstatus.h first and then prevent
winnt.h from redefining them by defining WIN32_NO_STATUS.


Changelog:

 * dlls/ntdll/tests/error.c

   Use ntstatus.h to get the STATUS_* constants.
   Fix the #include order.
   This lets this file compile on Windows using Visual C++.



Index: dlls/ntdll/tests/error.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/tests/error.c,v
retrieving revision 1.2
diff -u -r1.2 error.c
--- dlls/ntdll/tests/error.c	12 Sep 2002 22:07:04 -0000	1.2
+++ dlls/ntdll/tests/error.c	16 Sep 2002 09:27:17 -0000
@@ -18,13 +18,17 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  */

+#include <stdio.h>
+
+#include "ntstatus.h"
+#define WIN32_NO_STATUS
+
+#include "wine/test.h"
+
 #include "winbase.h"
-#include "winerror.h"
 #include "rpcnterr.h"
 #include "winternl.h"
 #include "ntsecapi.h"
-#include "wine/test.h"
-#include <stdio.h>

 ULONG (*statustodoserror)(NTSTATUS Status);



-- 
Francois Gouget         fgouget@free.fr        http://fgouget.free.fr/
                     Avoid the Gates of Hell - use Linux.



[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux