- Some more MSDDK/IFS compatibility fixes.
Modified: trunk/reactos/include/ndk/rtltypes.h
Modified: trunk/reactos/include/ndk/umtypes.h
Modified: trunk/reactos/include/ndk/zwfuncs.h
Modified: trunk/reactos/lib/kernel32/misc/utils.c
Modified: trunk/reactos/lib/rtl/largeint.c
Modified: trunk/reactos/w32api/include/ddk/ntifs.h
Modified: trunk/reactos/w32api/include/ddk/winddk.h
Modified: trunk/reactos/w32api/include/ntdef.h

Modified: trunk/reactos/include/ndk/rtltypes.h
--- trunk/reactos/include/ndk/rtltypes.h	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/include/ndk/rtltypes.h	2005-09-06 05:30:39 UTC (rev 17687)
@@ -12,8 +12,6 @@
 /* DEPENDENCIES **************************************************************/
 #include "excpt.h"
 
-/* EXPORTED DATA *************************************************************/
-
 /* CONSTANTS *****************************************************************/
 #define MAXIMUM_LEADBYTES 12
 
@@ -104,6 +102,11 @@
 #define RTL_DUPLICATE_UNICODE_STRING_NULL_TERMINATE 1
 #define RTL_DUPLICATE_UNICODE_STRING_ALLOCATE_NULL_STRING 2
 
+/* For Size conversion macros */
+#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
+#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
+#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
+
 /* List Macros */
 static __inline
 VOID
@@ -236,6 +239,10 @@
 /* RTL Atom Flags */
 #define RTL_ATOM_IS_PINNED      0x1
 
+/* EXPORTED DATA *************************************************************/
+extern BOOLEAN NTSYSAPI NLS_MB_CODE_PAGE_TAG;
+extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG;
+
 /* ENUMERATIONS **************************************************************/
 
 #ifdef NTOS_MODE_USER

Modified: trunk/reactos/include/ndk/umtypes.h
--- trunk/reactos/include/ndk/umtypes.h	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/include/ndk/umtypes.h	2005-09-06 05:30:39 UTC (rev 17687)
@@ -79,6 +79,11 @@
 #define NTSYSCALLAPI DECLSPEC_ADDRSAFE
 #endif
 #endif
+#if !defined(_M_CEE_PURE)
+#define NTAPI_INLINE    NTAPI
+#else
+#define NTAPI_INLINE
+#endif
 
 /* Native API Return Value Macros */
 #define NT_SUCCESS(x) ((x)>=0)

Modified: trunk/reactos/include/ndk/zwfuncs.h
--- trunk/reactos/include/ndk/zwfuncs.h	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/include/ndk/zwfuncs.h	2005-09-06 05:30:39 UTC (rev 17687)
@@ -806,6 +806,7 @@
     IN TIMER_TYPE TimerType
 );
 
+#ifdef NTOS_MODE_USER
 NTSTATUS
 NTAPI
 ZwCreateTimer(
@@ -814,6 +815,7 @@
     IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
     IN TIMER_TYPE TimerType
 );
+#endif
 
 NTSTATUS
 NTAPI
@@ -1147,6 +1149,7 @@
     OUT PIO_STATUS_BLOCK IoStatusBlock
 );
 
+#ifdef NTOS_MODE_USER
 NTSYSAPI
 NTSTATUS
 NTAPI
@@ -1154,6 +1157,7 @@
     IN HANDLE FileHandle,
     OUT PIO_STATUS_BLOCK IoStatusBlock
 );
+#endif
 
 NTSTATUS
 NTAPI
@@ -1922,7 +1926,7 @@
     IN POBJECT_ATTRIBUTES ObjectAttributes
 );
 
-NTSYSAPI
+#ifdef NTOS_MODE_USER
 NTSTATUS
 NTAPI
 ZwOpenTimer(
@@ -1930,6 +1934,7 @@
     IN ACCESS_MASK DesiredAccess,
     IN POBJECT_ATTRIBUTES ObjectAttributes
 );
+#endif
 
 NTSTATUS
 NTAPI
@@ -2195,7 +2200,7 @@
     IN BOOLEAN RestartScan
 );
 
-NTSYSAPI
+#ifdef NTOS_MODE_USER
 NTSTATUS
 NTAPI
 ZwQueryEaFile(
@@ -2209,6 +2214,7 @@
     IN PULONG EaIndex OPTIONAL,
     IN BOOLEAN RestartScan
 );
+#endif
 
 NTSTATUS
 NTAPI
@@ -3275,7 +3281,7 @@
     ULONG EaBufferSize
 );
 
-NTSYSAPI
+#ifdef NTOS_MODE_USER
 NTSTATUS
 NTAPI
 ZwSetEaFile(
@@ -3284,6 +3290,7 @@
     PVOID EaBuffer,
     ULONG EaBufferSize
 );
+#endif
 
 NTSTATUS
 NTAPI

Modified: trunk/reactos/lib/kernel32/misc/utils.c
--- trunk/reactos/lib/kernel32/misc/utils.c	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/lib/kernel32/misc/utils.c	2005-09-06 05:30:39 UTC (rev 17687)
@@ -15,6 +15,15 @@
 
 /* GLOBALS ******************************************************************/
 
+/* GCC s^H can't handle static initializers to APIs, so we have to hack this */
+NTSTATUS
+NTAPI
+RtlAnsiStringToUnicodeString(
+    PUNICODE_STRING DestinationString,
+    PCANSI_STRING SourceString,
+    BOOLEAN AllocateDestinationString
+);
+
 PRTL_CONVERT_STRING Basep8BitStringToUnicodeString = RtlAnsiStringToUnicodeString;
 
 /* FUNCTIONS ****************************************************************/

Modified: trunk/reactos/lib/rtl/largeint.c
--- trunk/reactos/lib/rtl/largeint.c	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/lib/rtl/largeint.c	2005-09-06 05:30:39 UTC (rev 17687)
@@ -11,6 +11,7 @@
 
 /* INCLUDES *****************************************************************/
 
+#define NO_RTL_INLINES
 #include <rtl.h>
 
 #define NDEBUG

Modified: trunk/reactos/w32api/include/ddk/ntifs.h
--- trunk/reactos/w32api/include/ddk/ntifs.h	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/w32api/include/ddk/ntifs.h	2005-09-06 05:30:39 UTC (rev 17687)
@@ -2540,12 +2540,8 @@
     IN NTSTATUS Ntstatus
 );
 
-#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
-#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
 #define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
 
-extern BOOLEAN NlsMbCodePageTag;
-extern BOOLEAN NlsMbOemCodePageTag;
 extern PUSHORT NlsOemLeadByteInfo;
 
 #define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) (                               \
@@ -3697,6 +3693,15 @@
 );
 
 NTSYSAPI
+NTSTATUS
+NTAPI
+RtlDowncaseUnicodeString(
+    IN OUT PUNICODE_STRING UniDest,
+    IN PCUNICODE_STRING UniSource,
+    IN BOOLEAN AllocateDestinationString
+);
+
+NTSYSAPI
 BOOLEAN
 NTAPI
 RtlEqualSid (
@@ -4346,6 +4351,14 @@
     IN ULONG    FlushSize
 );
 
+NTSYSAPI
+NTSTATUS
+NTAPI
+ZwFlushBuffersFile(
+    IN HANDLE FileHandle,
+    OUT PIO_STATUS_BLOCK IoStatusBlock
+);
+
 #if (VER_PRODUCTBUILD >= 2195)
 
 NTSYSAPI

Modified: trunk/reactos/w32api/include/ddk/winddk.h
--- trunk/reactos/w32api/include/ddk/winddk.h	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/w32api/include/ddk/winddk.h	2005-09-06 05:30:39 UTC (rev 17687)
@@ -4945,6 +4945,16 @@
 
 #endif /* DBG */
 
+#ifdef _NTSYSTEM_
+#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
+#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
+#else
+#define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
+#define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
+#endif /* _NT_SYSTEM */
+ 
+extern BOOLEAN NTSYSAPI NLS_MB_CODE_PAGE_TAG;
+extern BOOLEAN NTSYSAPI NLS_MB_OEM_CODE_PAGE_TAG;
 
 /*
 ** Driver support routines

Modified: trunk/reactos/w32api/include/ntdef.h
--- trunk/reactos/w32api/include/ntdef.h	2005-09-06 00:34:23 UTC (rev 17686)
+++ trunk/reactos/w32api/include/ntdef.h	2005-09-06 05:30:39 UTC (rev 17687)
@@ -8,6 +8,11 @@
 #define RESTRICTED_POINTER
 
 #define NTAPI __stdcall
+#if !defined(_M_CEE_PURE)
+#define NTAPI_INLINE    NTAPI
+#else
+#define NTAPI_INLINE
+#endif
 
 #define OBJ_INHERIT          0x00000002
 #define OBJ_PERMANENT        0x00000010