Revert 45697:
[reactos.git] / lib / cmlib / cmlib.h
index ff780d1..fae0495 100644 (file)
@@ -5,8 +5,7 @@
  *            Copyright 2001 - 2005 Eric Kohl
  */
 
-#ifndef CMLIB_H
-#define CMLIB_H
+#pragma once
 
 //
 // Debug support switch
@@ -59,6 +58,7 @@
         IN PRTL_BITMAP BitMapHeader);
 
     #define RtlCheckBit(BMH,BP) (((((PLONG)(BMH)->Buffer)[(BP) / 32]) >> ((BP) % 32)) & 0x1)
+    #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
 
     #define PKTHREAD PVOID
     #define PKGUARDED_MUTEX PVOID
@@ -87,7 +87,9 @@
     #define CMLTRACE(x, ...) DPRINT(__VA_ARGS__)
     #endif
 
-
+    #include <ntdef.h>
+    #undef DECLSPEC_IMPORT
+    #define DECLSPEC_IMPORT
     #include <ntddk.h>
 #endif
 
 #define ROUND_DOWN(a,b)      (((a)/(b))*(b))
 #endif
 
+//
+// PAGE_SIZE definition
+//
+#ifndef PAGE_SIZE
+#if defined(TARGET_i386) || defined(TARGET_amd64) || defined(TARGET_arm)
+#define PAGE_SIZE 0x1000
+#else
+#error Local PAGE_SIZE definition required when built as host
+#endif
+#endif
+
 #define TAG_CM 0x68742020
 
 #define CMAPI NTAPI
@@ -293,5 +306,3 @@ HvpCreateHiveFreeCellList(
 ULONG CMAPI
 HvpHiveHeaderChecksum(
    PHBASE_BLOCK HiveHeader);
-
-#endif /* CMLIB_H */