Author: sginsberg
Date: Fri Aug 7 12:45:59 2009
New Revision: 42461
URL:
http://svn.reactos.org/svn/reactos?rev=42461&view=rev
Log:
- winddk.h: Don't define NTSYSAPI and NTSYSCALLAPI -- this is defined in ntdef.h. Use
NTSYSAPI for HalDispatchTable instead of DECLSPEC_IMPORT (see below).
- wdm.h: Properly define NTKERNELAPI.
- ntifs.h: Properly define NTKERNELAPI, and don't redefine NTSYSAPI.
- ntoskrnl: Apply the WDK hack for our headers (and gcc) too. Also redefine NTHALAPI for
NDK so we don't auto-import KdComPortInUse -- ld complains about this.
- Apply this for cmlib, csq and rossym too.
- Use this in HAL too, and redefine NTSYSAPI so we don't auto import some structures
from the kernel. Also, don't define __declspec(dllimport) to nothing -- this
doesn't work with gcc, and doesn't seem to be necessary. I tried building HAL with
the WDK and this wasn't an issue.
Modified:
trunk/reactos/hal/halarm/include/hal.h
trunk/reactos/hal/halppc/include/hal.h
trunk/reactos/hal/halx86/include/hal.h
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/ddk/winddk.h
trunk/reactos/lib/cmlib/cmlib.h
trunk/reactos/lib/drivers/csq/csq.c
trunk/reactos/lib/rossym/initkm.c
trunk/reactos/ntoskrnl/include/precomp.h
Modified: trunk/reactos/hal/halarm/include/hal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halarm/include/hal.h?r…
==============================================================================
--- trunk/reactos/hal/halarm/include/hal.h [iso-8859-1] (original)
+++ trunk/reactos/hal/halarm/include/hal.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -12,14 +12,13 @@
#include <stdio.h>
/* WDK HAL Compilation hack */
-#ifdef _MSC_VER
#include <excpt.h>
#include <ntdef.h>
#undef _NTHAL_
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
-#define __declspec(dllimport)
-#endif
+#undef NTSYSAPI
+#define NTSYSAPI __declspec(dllimport)
/* IFS/DDK/NDK Headers */
#include <ntifs.h>
Modified: trunk/reactos/hal/halppc/include/hal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halppc/include/hal.h?r…
==============================================================================
--- trunk/reactos/hal/halppc/include/hal.h [iso-8859-1] (original)
+++ trunk/reactos/hal/halppc/include/hal.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -12,14 +12,13 @@
#include <stdio.h>
/* WDK HAL Compilation hack */
-#ifdef _MSC_VER
#include <excpt.h>
#include <ntdef.h>
#undef _NTHAL_
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
-#define __declspec(dllimport)
-#endif
+#undef NTSYSAPI
+#define NTSYSAPI __declspec(dllimport)
/* IFS/DDK/NDK Headers */
#include <ntifs.h>
Modified: trunk/reactos/hal/halx86/include/hal.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/hal/halx86/include/hal.h?r…
==============================================================================
--- trunk/reactos/hal/halx86/include/hal.h [iso-8859-1] (original)
+++ trunk/reactos/hal/halx86/include/hal.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -12,14 +12,13 @@
#include <stdio.h>
/* WDK HAL Compilation hack */
-#ifdef _MSC_VER
#include <excpt.h>
#include <ntdef.h>
#undef _NTHAL_
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
-#define __declspec(dllimport)
-#endif
+#undef NTSYSAPI
+#define NTSYSAPI __declspec(dllimport)
/* IFS/DDK/NDK Headers */
#include <ntifs.h>
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=42…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -24,12 +24,7 @@
#define _NTIFS_
#define _GNU_NTIFS_
-#ifdef _NTOSKRNL_
-/* HACKHACKHACK!!! We shouldn't include this header from ntoskrnl! */
-#define NTKERNELAPI
-#else
#define NTKERNELAPI DECLSPEC_IMPORT
-#endif
#include <ntddk.h>
@@ -42,10 +37,6 @@
#ifndef VER_PRODUCTBUILD
#define VER_PRODUCTBUILD 10000
-#endif
-
-#ifndef NTSYSAPI
-#define NTSYSAPI
#endif
#define EX_PUSH_LOCK ULONG_PTR
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=4246…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -21,12 +21,7 @@
extern "C" {
#endif
-#ifdef _NTOSKRNL_
-/* HACKHACKHACK!!! We shouldn't include this header from ntoskrnl! */
-#define NTKERNELAPI
-#else
#define NTKERNELAPI DECLSPEC_IMPORT
-#endif
#ifdef _WIN64
#define PORT_MAXIMUM_MESSAGE_LENGTH 512
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -65,18 +65,6 @@
#else
# define _DDK_DUMMYUNION_MEMBER(name) name
# define _DDK_DUMMYUNION_N_MEMBER(n, name) name
-#endif
-
-#if !defined(_NTSYSTEM_)
-#define NTSYSAPI DECLSPEC_IMPORT
-#define NTSYSCALLAPI DECLSPEC_IMPORT
-#else
-#define NTSYSAPI
-#if defined(_NTDLLBUILD_)
-#define NTSYSCALLAPI
-#else
-#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
-#endif
#endif
/*
@@ -2866,7 +2854,7 @@
} HAL_DISPATCH, *PHAL_DISPATCH;
#if defined(_NTDRIVER_) || defined(_NTDDK_) || defined(_NTHAL_)
-extern DECLSPEC_IMPORT PHAL_DISPATCH HalDispatchTable;
+extern NTSYSAPI PHAL_DISPATCH HalDispatchTable;
#define HALDISPATCH ((PHAL_DISPATCH)&HalDispatchTable)
#else
extern DECLSPEC_EXPORT HAL_DISPATCH HalDispatchTable;
Modified: trunk/reactos/lib/cmlib/cmlib.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=4246…
==============================================================================
--- trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] (original)
+++ trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -88,7 +88,9 @@
#define CMLTRACE(x, ...) DPRINT(__VA_ARGS__)
#endif
-
+ #include <ntdef.h>
+ #undef DECLSPEC_IMPORT
+ #define DECLSPEC_IMPORT
#include <ntddk.h>
#endif
Modified: trunk/reactos/lib/drivers/csq/csq.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/csq/csq.c?rev=…
==============================================================================
--- trunk/reactos/lib/drivers/csq/csq.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/csq/csq.c [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -25,11 +25,9 @@
*/
/* $Id$ */
-#ifdef _MSC_VER
#include <ntdef.h>
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
-#endif
#include <ntifs.h>
Modified: trunk/reactos/lib/rossym/initkm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rossym/initkm.c?rev=42…
==============================================================================
--- trunk/reactos/lib/rossym/initkm.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rossym/initkm.c [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -7,7 +7,9 @@
* PROGRAMMERS: Ge van Geldorp (gvg(a)reactos.com)
*/
-#define _NTOSKRNL_
+#include <ntdef.h>
+#undef DECLSPEC_IMPORT
+#define DECLSPEC_IMPORT
#include <ntddk.h>
#include <reactos/rossym.h>
#include "rossympriv.h"
Modified: trunk/reactos/ntoskrnl/include/precomp.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/precomp.h…
==============================================================================
--- trunk/reactos/ntoskrnl/include/precomp.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/precomp.h [iso-8859-1] Fri Aug 7 12:45:59 2009
@@ -14,15 +14,15 @@
/* DDK/IFS/NDK Headers */
#define _REALLY_GET_CALLERS_CALLER
-#ifdef _MSC_VER
#include <excpt.h>
#include <ntdef.h>
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
-#endif
#include <ntifs.h>
#include <wdmguid.h>
#include <arc/arc.h>
+#undef NTHALAPI
+#define NTHALAPI __declspec(dllimport)
#include <ntndk.h>
#undef TEXT
#define TEXT(s) L##s