mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
- 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. svn path=/trunk/; revision=42461
This commit is contained in:
parent
8a3b6b1983
commit
ac7daf7ccf
10 changed files with 15 additions and 42 deletions
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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>
|
||||
|
||||
|
@ -44,10 +39,6 @@ extern "C" {
|
|||
#define VER_PRODUCTBUILD 10000
|
||||
#endif
|
||||
|
||||
#ifndef NTSYSAPI
|
||||
#define NTSYSAPI
|
||||
#endif
|
||||
|
||||
#define EX_PUSH_LOCK ULONG_PTR
|
||||
#define PEX_PUSH_LOCK PULONG_PTR
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -67,18 +67,6 @@ extern "C" {
|
|||
# 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
|
||||
*/
|
||||
|
@ -2866,7 +2854,7 @@ typedef struct {
|
|||
} 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;
|
||||
|
|
|
@ -88,7 +88,9 @@
|
|||
#define CMLTRACE(x, ...) DPRINT(__VA_ARGS__)
|
||||
#endif
|
||||
|
||||
|
||||
#include <ntdef.h>
|
||||
#undef DECLSPEC_IMPORT
|
||||
#define DECLSPEC_IMPORT
|
||||
#include <ntddk.h>
|
||||
#endif
|
||||
|
||||
|
|
|
@ -25,11 +25,9 @@
|
|||
*/
|
||||
/* $Id$ */
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#include <ntdef.h>
|
||||
#undef DECLSPEC_IMPORT
|
||||
#define DECLSPEC_IMPORT
|
||||
#endif
|
||||
#include <ntifs.h>
|
||||
|
||||
|
||||
|
|
|
@ -7,7 +7,9 @@
|
|||
* 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"
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue