- Improve _MSC_VER related conditions.
- Comment on #endif (for readability).
- DECLSPEC_ALIGN : moar underscores !
- Apply a consistent formatting.

svn path=/trunk/; revision=48590
This commit is contained in:
Amine Khaldi 2010-08-22 13:25:10 +00:00
parent 7f865763fa
commit f8199cb9e0

View file

@ -194,7 +194,7 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) #if defined(_MSC_VER) && (_MSC_VER >= 1300)
#define TYPE_ALIGNMENT(t) __alignof(t) #define TYPE_ALIGNMENT(t) __alignof(t)
#else #else
#define TYPE_ALIGNMENT(t) FIELD_OFFSET( struct { char x; t test; }, test ) #define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
#endif #endif
/* Calling Conventions */ /* Calling Conventions */
@ -219,7 +219,7 @@
#else #else
#define DECLSPEC_ADDRSAFE #define DECLSPEC_ADDRSAFE
#endif #endif
#endif #endif /* DECLSPEC_ADDRSAFE */
#if !defined(_NTSYSTEM_) #if !defined(_NTSYSTEM_)
#define NTSYSAPI DECLSPEC_IMPORT #define NTSYSAPI DECLSPEC_IMPORT
@ -235,14 +235,14 @@
/* Inlines */ /* Inlines */
#ifndef FORCEINLINE #ifndef FORCEINLINE
#if (_MSC_VER >= 1200) #if defined(_MSC_VER) && (_MSC_VER >= 1200)
#define FORCEINLINE __forceinline #define FORCEINLINE __forceinline
#elif (_MSC_VER) #elif defined(_MSC_VER)
#define FORCEINLINE __inline #define FORCEINLINE __inline
#else #else /* __GNUC__ */
#define FORCEINLINE extern __inline__ __attribute__((always_inline)) #define FORCEINLINE extern __inline__ __attribute__((always_inline))
#endif #endif
#endif #endif /* FORCEINLINE */
#ifndef DECLSPEC_NOINLINE #ifndef DECLSPEC_NOINLINE
#if (_MSC_VER >= 1300) #if (_MSC_VER >= 1300)
@ -252,7 +252,7 @@
#else #else
#define DECLSPEC_NOINLINE #define DECLSPEC_NOINLINE
#endif #endif
#endif #endif /* DECLSPEC_NOINLINE */
#if !defined(_M_CEE_PURE) #if !defined(_M_CEE_PURE)
#define NTAPI_INLINE NTAPI #define NTAPI_INLINE NTAPI
@ -265,11 +265,11 @@
#if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS) #if defined(_MSC_VER) && (_MSC_VER >= 1300) && !defined(MIDL_PASS)
#define DECLSPEC_ALIGN(x) __declspec(align(x)) #define DECLSPEC_ALIGN(x) __declspec(align(x))
#elif defined(__GNUC__) #elif defined(__GNUC__)
#define DECLSPEC_ALIGN(x) __attribute__((aligned(x))) #define DECLSPEC_ALIGN(x) __attribute__ ((__aligned__ (x)))
#else #else
#define DECLSPEC_ALIGN(x) #define DECLSPEC_ALIGN(x)
#endif #endif
#endif #endif /* DECLSPEC_ALIGN */
/* Use to silence unused variable warnings when it is intentional */ /* Use to silence unused variable warnings when it is intentional */
#define UNREFERENCED_PARAMETER(P) {(P)=(P);} #define UNREFERENCED_PARAMETER(P) {(P)=(P);}
@ -575,14 +575,12 @@ typedef struct _LIST_ENTRY {
struct _LIST_ENTRY *Blink; struct _LIST_ENTRY *Blink;
} LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY; } LIST_ENTRY, *PLIST_ENTRY, *RESTRICTED_POINTER PRLIST_ENTRY;
typedef struct LIST_ENTRY32 typedef struct LIST_ENTRY32 {
{
ULONG Flink; ULONG Flink;
ULONG Blink; ULONG Blink;
} LIST_ENTRY32, *PLIST_ENTRY32; } LIST_ENTRY32, *PLIST_ENTRY32;
typedef struct LIST_ENTRY64 typedef struct LIST_ENTRY64 {
{
ULONGLONG Flink; ULONGLONG Flink;
ULONGLONG Blink; ULONGLONG Blink;
} LIST_ENTRY64, *PLIST_ENTRY64; } LIST_ENTRY64, *PLIST_ENTRY64;
@ -603,10 +601,10 @@ struct _EXCEPTION_RECORD;
typedef EXCEPTION_DISPOSITION typedef EXCEPTION_DISPOSITION
(NTAPI *PEXCEPTION_ROUTINE)( (NTAPI *PEXCEPTION_ROUTINE)(
IN struct _EXCEPTION_RECORD *ExceptionRecord, struct _EXCEPTION_RECORD *ExceptionRecord,
IN PVOID EstablisherFrame, PVOID EstablisherFrame,
IN OUT struct _CONTEXT *ContextRecord, struct _CONTEXT *ContextRecord,
IN OUT PVOID DispatcherContext); PVOID DispatcherContext);
typedef struct _GROUP_AFFINITY { typedef struct _GROUP_AFFINITY {
KAFFINITY Mask; KAFFINITY Mask;
@ -650,6 +648,25 @@ typedef struct _GROUP_AFFINITY {
/* C_ASSERT Definition */ /* C_ASSERT Definition */
#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1] #define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
#define VER_WORKSTATION_NT 0x40000000
#define VER_SERVER_NT 0x80000000
#define VER_SUITE_SMALLBUSINESS 0x00000001
#define VER_SUITE_ENTERPRISE 0x00000002
#define VER_SUITE_BACKOFFICE 0x00000004
#define VER_SUITE_COMMUNICATIONS 0x00000008
#define VER_SUITE_TERMINAL 0x00000010
#define VER_SUITE_SMALLBUSINESS_RESTRICTED 0x00000020
#define VER_SUITE_EMBEDDEDNT 0x00000040
#define VER_SUITE_DATACENTER 0x00000080
#define VER_SUITE_SINGLEUSERTS 0x00000100
#define VER_SUITE_PERSONAL 0x00000200
#define VER_SUITE_BLADE 0x00000400
#define VER_SUITE_EMBEDDED_RESTRICTED 0x00000800
#define VER_SUITE_SECURITY_APPLIANCE 0x00001000
#define VER_SUITE_STORAGE_SERVER 0x00002000
#define VER_SUITE_COMPUTE_SERVER 0x00004000
#define VER_SUITE_WH_SERVER 0x00008000
/* Primary language IDs. */ /* Primary language IDs. */
#define LANG_NEUTRAL 0x00 #define LANG_NEUTRAL 0x00
#define LANG_INVARIANT 0x7f #define LANG_INVARIANT 0x7f
@ -781,24 +798,4 @@ typedef struct _GROUP_AFFINITY {
#define LANG_YORUBA 0x6a #define LANG_YORUBA 0x6a
#define LANG_ZULU 0x35 #define LANG_ZULU 0x35
#define VER_WORKSTATION_NT 0x40000000
#define VER_SERVER_NT 0x80000000
#define VER_SUITE_SMALLBUSINESS 1
#define VER_SUITE_ENTERPRISE 2
#define VER_SUITE_BACKOFFICE 4
#define VER_SUITE_COMMUNICATIONS 8
#define VER_SUITE_TERMINAL 16
#define VER_SUITE_SMALLBUSINESS_RESTRICTED 32
#define VER_SUITE_EMBEDDEDNT 64
#define VER_SUITE_DATACENTER 128
#define VER_SUITE_SINGLEUSERTS 256
#define VER_SUITE_PERSONAL 512
#define VER_SUITE_BLADE 1024
#define VER_SUITE_EMBEDDED_RESTRICTED 2048
#define VER_SUITE_SECURITY_APPLIANCE 4096
#define VER_SUITE_STORAGE_SERVER 8192
#define VER_SUITE_COMPUTE_SERVER 16384
#define VER_SUITE_WH_SERVER 32768
#endif /* _NTDEF_ */ #endif /* _NTDEF_ */