From: Stefan Ginsberg Date: Sun, 23 Aug 2009 15:14:13 +0000 (+0000) Subject: - wdm.h: Define ALLOC_PRAGMA and ALLOC_DATA_PRAGMA for MSVC. X-Git-Tag: ReactOS-0.3.11~1004 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=ccbdde948273d60328f6ca209e72fa2078ef6951 - wdm.h: Define ALLOC_PRAGMA and ALLOC_DATA_PRAGMA for MSVC. - marea.c: MmInitMemoryAreas doesn't exist anymore so don't try to put it in .INIT. svn path=/trunk/; revision=42883 --- diff --git a/reactos/include/ddk/wdm.h b/reactos/include/ddk/wdm.h index 61b906bbb7a..8a590a5c8e7 100644 --- a/reactos/include/ddk/wdm.h +++ b/reactos/include/ddk/wdm.h @@ -28,6 +28,25 @@ extern "C" { #endif +#if defined(_MSC_VER) + +// +// Indicate if #pragma alloc_text() is supported +// +#if defined(_M_IX86) || defined(_M_AMD64) || defined(_M_IA64) +#define ALLOC_PRAGMA 1 +#endif + +// +// Indicate if #pragma data_seg() is supported +// +#if defined(_M_IX86) || defined(_M_AMD64) +#define ALLOC_DATA_PRAGMA 1 +#endif + +#endif + + /* Simple types */ typedef UCHAR KPROCESSOR_MODE; typedef LONG KPRIORITY; diff --git a/reactos/ntoskrnl/mm/marea.c b/reactos/ntoskrnl/mm/marea.c index 5fe30972862..7ac02d87140 100644 --- a/reactos/ntoskrnl/mm/marea.c +++ b/reactos/ntoskrnl/mm/marea.c @@ -45,10 +45,6 @@ #define NDEBUG #include -#if defined (ALLOC_PRAGMA) -#pragma alloc_text(INIT, MmInitMemoryAreas) -#endif - MEMORY_AREA MiStaticMemoryAreas[MI_STATIC_MEMORY_AREAS]; ULONG MiStaticMemoryAreaCount;