- Some more MSDDK/IFS compatibility fixes.

svn path=/trunk/; revision=17687
This commit is contained in:
Alex Ionescu 2005-09-06 05:30:39 +00:00
parent 58f5ea229a
commit 66711d6344
8 changed files with 66 additions and 9 deletions

View file

@ -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 @@ RemoveTailList(
/* 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

View file

@ -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)

View file

@ -806,6 +806,7 @@ NtCreateTimer(
IN TIMER_TYPE TimerType
);
#ifdef NTOS_MODE_USER
NTSTATUS
NTAPI
ZwCreateTimer(
@ -814,6 +815,7 @@ ZwCreateTimer(
IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL,
IN TIMER_TYPE TimerType
);
#endif
NTSTATUS
NTAPI
@ -1147,6 +1149,7 @@ NtFlushBuffersFile(
OUT PIO_STATUS_BLOCK IoStatusBlock
);
#ifdef NTOS_MODE_USER
NTSYSAPI
NTSTATUS
NTAPI
@ -1154,6 +1157,7 @@ ZwFlushBuffersFile(
IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock
);
#endif
NTSTATUS
NTAPI
@ -1922,7 +1926,7 @@ NtOpenTimer(
IN POBJECT_ATTRIBUTES ObjectAttributes
);
NTSYSAPI
#ifdef NTOS_MODE_USER
NTSTATUS
NTAPI
ZwOpenTimer(
@ -1930,6 +1934,7 @@ ZwOpenTimer(
IN ACCESS_MASK DesiredAccess,
IN POBJECT_ATTRIBUTES ObjectAttributes
);
#endif
NTSTATUS
NTAPI
@ -2195,7 +2200,7 @@ NtQueryEaFile(
IN BOOLEAN RestartScan
);
NTSYSAPI
#ifdef NTOS_MODE_USER
NTSTATUS
NTAPI
ZwQueryEaFile(
@ -2209,6 +2214,7 @@ ZwQueryEaFile(
IN PULONG EaIndex OPTIONAL,
IN BOOLEAN RestartScan
);
#endif
NTSTATUS
NTAPI
@ -3275,7 +3281,7 @@ NtSetEaFile(
ULONG EaBufferSize
);
NTSYSAPI
#ifdef NTOS_MODE_USER
NTSTATUS
NTAPI
ZwSetEaFile(
@ -3284,6 +3290,7 @@ ZwSetEaFile(
PVOID EaBuffer,
ULONG EaBufferSize
);
#endif
NTSTATUS
NTAPI

View file

@ -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 ****************************************************************/

View file

@ -11,6 +11,7 @@
/* INCLUDES *****************************************************************/
#define NO_RTL_INLINES
#include <rtl.h>
#define NDEBUG

View file

@ -2540,12 +2540,8 @@ FsRtlIsNtstatusExpected (
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) ( \
@ -3696,6 +3692,15 @@ RtlDescribeChunk (
OUT PULONG ChunkSize
);
NTSYSAPI
NTSTATUS
NTAPI
RtlDowncaseUnicodeString(
IN OUT PUNICODE_STRING UniDest,
IN PCUNICODE_STRING UniSource,
IN BOOLEAN AllocateDestinationString
);
NTSYSAPI
BOOLEAN
NTAPI
@ -4346,6 +4351,14 @@ ZwFlushInstructionCache (
IN ULONG FlushSize
);
NTSYSAPI
NTSTATUS
NTAPI
ZwFlushBuffersFile(
IN HANDLE FileHandle,
OUT PIO_STATUS_BLOCK IoStatusBlock
);
#if (VER_PRODUCTBUILD >= 2195)
NTSYSAPI

View file

@ -4945,6 +4945,16 @@ RtlAssert(
#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

View file

@ -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