mirror of
https://github.com/reactos/reactos.git
synced 2024-08-07 19:58:21 +00:00
- Remove deprecated _NTDDK_ hacks from winnt.h -- these are no longer needed as ntddk.h no longer includes winnt.h. Also fix the way the PowerPC version of NtCurrentTeb was defined -- it was only defined if ntddk.h was included prior to winnt.h.
svn path=/trunk/; revision=42882
This commit is contained in:
parent
9e652d5604
commit
faf3bb5778
|
@ -472,12 +472,9 @@ typedef DWORD FLONG;
|
|||
#define FILE_SUPPORTS_ENCRYPTION 0x00020000
|
||||
#define FILE_NAMED_STREAMS 0x00040000
|
||||
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define IO_COMPLETION_QUERY_STATE 0x0001
|
||||
#define IO_COMPLETION_MODIFY_STATE 0x0002
|
||||
#define IO_COMPLETION_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3)
|
||||
#endif
|
||||
/* end ntifs.h */
|
||||
|
||||
/* also in ddk/winddk.h */
|
||||
|
@ -487,8 +484,6 @@ typedef DWORD FLONG;
|
|||
|
||||
#define MAILSLOT_NO_MESSAGE ((DWORD)-1)
|
||||
#define MAILSLOT_WAIT_FOREVER ((DWORD)-1)
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define PROCESS_TERMINATE 1
|
||||
#define PROCESS_CREATE_THREAD 2
|
||||
#define PROCESS_SET_SESSIONID 4
|
||||
|
@ -502,23 +497,17 @@ typedef DWORD FLONG;
|
|||
#define PROCESS_SUSPEND_RESUME 2048
|
||||
#define PROCESS_QUERY_LIMITED_INFORMATION 0x1000
|
||||
#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0xFFF)
|
||||
#endif
|
||||
#define PROCESS_DUP_HANDLE 64
|
||||
#define THREAD_TERMINATE 1
|
||||
#define THREAD_SUSPEND_RESUME 2
|
||||
#define THREAD_GET_CONTEXT 8
|
||||
#define THREAD_SET_CONTEXT 16
|
||||
#define THREAD_SET_INFORMATION 32
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define THREAD_QUERY_INFORMATION 64
|
||||
#define THREAD_SET_THREAD_TOKEN 128
|
||||
#define THREAD_IMPERSONATE 256
|
||||
#define THREAD_DIRECT_IMPERSONATION 0x200
|
||||
#endif
|
||||
#define THREAD_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|0x3FF)
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define MUTANT_QUERY_STATE 0x0001
|
||||
#define MUTANT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED|SYNCHRONIZE|MUTANT_QUERY_STATE)
|
||||
#define TIMER_QUERY_STATE 0x0001
|
||||
|
@ -528,7 +517,6 @@ typedef DWORD FLONG;
|
|||
#define THREAD_BASE_PRIORITY_MAX 2
|
||||
#define THREAD_BASE_PRIORITY_MIN (-2)
|
||||
#define THREAD_BASE_PRIORITY_IDLE (-15)
|
||||
#endif
|
||||
/*
|
||||
* To prevent gcc compiler warnings, bracket these defines when initialising
|
||||
* a SID_IDENTIFIER_AUTHORITY, eg.
|
||||
|
@ -746,8 +734,6 @@ typedef enum {
|
|||
#define SE_CHANGE_NOTIFY_NAME TEXT("SeChangeNotifyPrivilege")
|
||||
#define SE_REMOTE_SHUTDOWN_NAME TEXT("SeRemoteShutdownPrivilege")
|
||||
#define SE_CREATE_GLOBAL_NAME TEXT("SeCreateGlobalPrivilege")
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define SE_GROUP_MANDATORY 1
|
||||
#define SE_GROUP_ENABLED_BY_DEFAULT 2
|
||||
#define SE_GROUP_ENABLED 4
|
||||
|
@ -755,7 +741,6 @@ typedef enum {
|
|||
#define SE_GROUP_USE_FOR_DENY_ONLY 16
|
||||
#define SE_GROUP_LOGON_ID 3221225472U
|
||||
#define SE_GROUP_RESOURCE 536870912
|
||||
#endif
|
||||
#define LANG_NEUTRAL 0x00
|
||||
#define LANG_INVARIANT 0x7f
|
||||
#define LANG_AFRIKAANS 0x36
|
||||
|
@ -1277,8 +1262,6 @@ typedef enum {
|
|||
#define MEM_WRITE_WATCH 0x200000 /* 98/Me */
|
||||
#define MEM_PHYSICAL 0x400000
|
||||
#define MEM_4MB_PAGES 0x80000000
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define MEM_IMAGE SEC_IMAGE
|
||||
#define SEC_NO_CHANGE 0x00400000
|
||||
#define SEC_FILE 0x00800000
|
||||
|
@ -1287,7 +1270,6 @@ typedef enum {
|
|||
#define SEC_RESERVE 0x04000000
|
||||
#define SEC_COMMIT 0x08000000
|
||||
#define SEC_NOCACHE 0x10000000
|
||||
#endif
|
||||
#define SECTION_EXTEND_SIZE 16
|
||||
#define SECTION_MAP_READ 4
|
||||
#define SECTION_MAP_WRITE 2
|
||||
|
@ -1295,9 +1277,7 @@ typedef enum {
|
|||
#define SECTION_MAP_EXECUTE 8
|
||||
#define SECTION_ALL_ACCESS 0xf001f
|
||||
#define WRITE_WATCH_FLAG_RESET 0x01
|
||||
#ifndef _NTDDK_
|
||||
#define MESSAGE_RESOURCE_UNICODE 1
|
||||
#endif
|
||||
#define RTL_CRITSECT_TYPE 0
|
||||
#define RTL_RESOURCE_TYPE 1
|
||||
/* Also in winddk.h */
|
||||
|
@ -1927,8 +1907,6 @@ typedef struct _GENERIC_MAPPING {
|
|||
ACCESS_MASK GenericExecute;
|
||||
ACCESS_MASK GenericAll;
|
||||
} GENERIC_MAPPING, *PGENERIC_MAPPING;
|
||||
/* Sigh..when will they learn... */
|
||||
#ifndef _NTDDK_
|
||||
typedef struct _ACE_HEADER {
|
||||
BYTE AceType;
|
||||
BYTE AceFlags;
|
||||
|
@ -2049,7 +2027,6 @@ typedef struct _SYSTEM_ALARM_CALLBACK_OBJECT_ACE {
|
|||
GUID InheritedObjectType;
|
||||
DWORD SidStart;
|
||||
} SYSTEM_ALARM_CALLBACK_OBJECT_ACE, *PSYSTEM_ALARM_CALLBACK_OBJECT_ACE;
|
||||
#endif
|
||||
typedef struct _ACL {
|
||||
BYTE AclRevision;
|
||||
BYTE Sbz1;
|
||||
|
@ -3003,8 +2980,6 @@ typedef struct _SE_IMPERSONATION_STATE {
|
|||
BOOLEAN EffectiveOnly;
|
||||
SECURITY_IMPERSONATION_LEVEL Level;
|
||||
} SE_IMPERSONATION_STATE,*PSE_IMPERSONATION_STATE;
|
||||
/* Steven you are my hero when you fix the w32api ddk! */
|
||||
#if !defined(_NTDDK_)
|
||||
typedef struct _SID_IDENTIFIER_AUTHORITY {
|
||||
BYTE Value[6];
|
||||
} SID_IDENTIFIER_AUTHORITY,*PSID_IDENTIFIER_AUTHORITY,*LPSID_IDENTIFIER_AUTHORITY;
|
||||
|
@ -3146,7 +3121,6 @@ typedef enum _TOKEN_INFORMATION_CLASS {
|
|||
MaxTokenInfoClass
|
||||
} TOKEN_INFORMATION_CLASS;
|
||||
|
||||
#endif
|
||||
typedef enum _SID_NAME_USE {
|
||||
SidTypeUser=1,SidTypeGroup,SidTypeDomain,SidTypeAlias,
|
||||
SidTypeWellKnownGroup,SidTypeDeletedAccount,SidTypeInvalid,
|
||||
|
@ -3233,8 +3207,6 @@ typedef struct _TAPE_CREATE_PARTITION {
|
|||
DWORD Count;
|
||||
DWORD Size;
|
||||
} TAPE_CREATE_PARTITION,*PTAPE_CREATE_PARTITION;
|
||||
/* Sigh..when will they learn... */
|
||||
#ifndef _NTDDK_
|
||||
typedef struct _MEMORY_BASIC_INFORMATION {
|
||||
PVOID BaseAddress;
|
||||
PVOID AllocationBase;
|
||||
|
@ -3258,7 +3230,6 @@ typedef struct _MESSAGE_RESOURCE_DATA {
|
|||
DWORD NumberOfBlocks;
|
||||
MESSAGE_RESOURCE_BLOCK Blocks[1];
|
||||
} MESSAGE_RESOURCE_DATA,*PMESSAGE_RESOURCE_DATA;
|
||||
#endif
|
||||
typedef struct _LIST_ENTRY {
|
||||
struct _LIST_ENTRY *Flink;
|
||||
struct _LIST_ENTRY *Blink;
|
||||
|
@ -3325,8 +3296,6 @@ RtlQueryDepthSList (
|
|||
IN PSLIST_HEADER ListHead
|
||||
);
|
||||
|
||||
/* FIXME: Please oh please stop including winnt.h from the DDK... */
|
||||
#ifndef _NTDDK_
|
||||
typedef struct _RTL_CRITICAL_SECTION_DEBUG {
|
||||
WORD Type;
|
||||
WORD CreatorBackTraceIndex;
|
||||
|
@ -3346,7 +3315,6 @@ typedef struct _RTL_CRITICAL_SECTION {
|
|||
HANDLE LockSemaphore;
|
||||
ULONG_PTR SpinCount;
|
||||
} RTL_CRITICAL_SECTION,*PRTL_CRITICAL_SECTION;
|
||||
#endif
|
||||
|
||||
NTSYSAPI
|
||||
WORD
|
||||
|
@ -4217,8 +4185,6 @@ typedef union _FILE_SEGMENT_ELEMENT {
|
|||
#define JOB_OBJECT_MSG_PROCESS_MEMORY_LIMIT 9
|
||||
#define JOB_OBJECT_MSG_JOB_MEMORY_LIMIT 10
|
||||
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#define JOB_OBJECT_ASSIGN_PROCESS 1
|
||||
#define JOB_OBJECT_SET_ATTRIBUTES 2
|
||||
#define JOB_OBJECT_QUERY 4
|
||||
|
@ -4246,7 +4212,6 @@ typedef struct _JOB_SET_ARRAY
|
|||
DWORD MemberLevel;
|
||||
DWORD Flags;
|
||||
} JOB_SET_ARRAY, *PJOB_SET_ARRAY;
|
||||
#endif
|
||||
|
||||
typedef struct _JOBOBJECT_BASIC_ACCOUNTING_INFORMATION {
|
||||
LARGE_INTEGER TotalUserTime;
|
||||
|
@ -4280,8 +4245,6 @@ typedef struct _JOBOBJECT_BASIC_UI_RESTRICTIONS {
|
|||
DWORD UIRestrictionsClass;
|
||||
} JOBOBJECT_BASIC_UI_RESTRICTIONS,*PJOBOBJECT_BASIC_UI_RESTRICTIONS;
|
||||
|
||||
/* Steven you are my hero when you fix the w32api ddk! */
|
||||
#ifndef _NTDDK_
|
||||
typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
|
||||
DWORD SecurityLimitFlags;
|
||||
HANDLE JobToken;
|
||||
|
@ -4289,7 +4252,6 @@ typedef struct _JOBOBJECT_SECURITY_LIMIT_INFORMATION {
|
|||
PTOKEN_PRIVILEGES PrivilegesToDelete;
|
||||
PTOKEN_GROUPS RestrictedSids;
|
||||
} JOBOBJECT_SECURITY_LIMIT_INFORMATION,*PJOBOBJECT_SECURITY_LIMIT_INFORMATION;
|
||||
#endif
|
||||
|
||||
typedef struct _JOBOBJECT_END_OF_JOB_TIME_INFORMATION {
|
||||
DWORD EndOfJobTimeAction;
|
||||
|
@ -4485,7 +4447,6 @@ typedef struct _SYSTEM_BATTERY_STATE {
|
|||
ULONG DefaultAlert2;
|
||||
} SYSTEM_BATTERY_STATE, *PSYSTEM_BATTERY_STATE;
|
||||
|
||||
#ifndef _NTDDK_ /* HACK!!! ntddk.h shouldn't include winnt.h! */
|
||||
typedef struct _PROCESSOR_POWER_INFORMATION {
|
||||
ULONG Number;
|
||||
ULONG MaxMhz;
|
||||
|
@ -4494,7 +4455,6 @@ typedef struct _PROCESSOR_POWER_INFORMATION {
|
|||
ULONG MaxIdleState;
|
||||
ULONG CurrentIdleState;
|
||||
} PROCESSOR_POWER_INFORMATION, *PPROCESSOR_POWER_INFORMATION;
|
||||
#endif
|
||||
|
||||
typedef DWORD EXECUTION_STATE;
|
||||
typedef enum _POWER_INFORMATION_LEVEL {
|
||||
|
@ -4833,9 +4793,7 @@ static __inline__ PVOID GetCurrentFiber(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
/* FIXME: Oh how I wish, I wish the w32api DDK wouldn't include winnt.h... */
|
||||
#ifndef _NTDDK_
|
||||
#ifdef _M_IX86
|
||||
#if defined(_M_IX86)
|
||||
static __inline__ struct _TEB * NtCurrentTeb(void)
|
||||
{
|
||||
struct _TEB *ret;
|
||||
|
@ -4848,25 +4806,24 @@ static __inline__ struct _TEB * NtCurrentTeb(void)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#elif _M_ARM
|
||||
#elif defined(_M_ARM)
|
||||
|
||||
//
|
||||
// NT-ARM is not documented
|
||||
//
|
||||
#include <armddk.h>
|
||||
|
||||
#elif defined (_M_AMD64)
|
||||
#elif defined(_M_AMD64)
|
||||
FORCEINLINE struct _TEB * NtCurrentTeb(VOID)
|
||||
{
|
||||
return (struct _TEB *)__readgsqword(FIELD_OFFSET(NT_TIB, Self));
|
||||
}
|
||||
#else
|
||||
#elif defined(_M_PPC)
|
||||
static __inline__ struct _TEB * NtCurrentTeb(void)
|
||||
{
|
||||
return __readfsdword_winnt(0x18);
|
||||
}
|
||||
#endif
|
||||
#elif defined(_M_PPC)
|
||||
#else
|
||||
static __inline__ struct _TEB * NtCurrentTeb(void)
|
||||
{
|
||||
return __readfsdword_winnt(0x18);
|
||||
|
|
Loading…
Reference in a new issue