- 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.
svn path=/trunk/; revision=42461
#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>
#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>
#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>
#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>
#define VER_PRODUCTBUILD 10000
#endif
-#ifndef NTSYSAPI
-#define NTSYSAPI
-#endif
-
#define EX_PUSH_LOCK ULONG_PTR
#define PEX_PUSH_LOCK PULONG_PTR
extern "C" {\r
#endif\r
\r
-#ifdef _NTOSKRNL_\r
-/* HACKHACKHACK!!! We shouldn't include this header from ntoskrnl! */\r
-#define NTKERNELAPI\r
-#else\r
#define NTKERNELAPI DECLSPEC_IMPORT\r
-#endif\r
\r
#ifdef _WIN64\r
#define PORT_MAXIMUM_MESSAGE_LENGTH 512\r
# 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
-
/*
* Alignment Macros
*/
} 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;
#define CMLTRACE(x, ...) DPRINT(__VA_ARGS__)
#endif
-
+ #include <ntdef.h>
+ #undef DECLSPEC_IMPORT
+ #define DECLSPEC_IMPORT
#include <ntddk.h>
#endif
*/
/* $Id$ */
-#ifdef _MSC_VER
#include <ntdef.h>
#undef DECLSPEC_IMPORT
#define DECLSPEC_IMPORT
-#endif
#include <ntifs.h>
\f
* PROGRAMMERS: Ge van Geldorp (gvg@reactos.com)
*/
-#define _NTOSKRNL_
+#include <ntdef.h>
+#undef DECLSPEC_IMPORT
+#define DECLSPEC_IMPORT
#include <ntddk.h>
#include <reactos/rossym.h>
#include "rossympriv.h"
/* 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