Author: tkreuzer
Date: Thu Dec 17 00:39:20 2009
New Revision: 44632
URL:
http://svn.reactos.org/svn/reactos?rev=44632&view=rev
Log:
Merge from amd64 branch
37868 Add CONTEXT flags for x64.
39347 Move rtl byteswap functions to wdm.h and add intrinsic definitions.
41030 fix definition of 64bit SLIST_HEADER. winnt.h: add 64bit SLIST_HEADER.
41071 Fix definition of NdisQueryPacketLength.
43447 Fix MmSizeOfMdl prototype.
43777 Fix definition of KdDebuggerNotPresent for gcc, the MS definition is broken,
don't know if it's needed that way for msvc.
44178 Fix definition of _CONTEXT.
44491 Add LIST_ENTRY32/64, STRING32/64
44500 Add NT_TIB32/64.
44623 New definition of C_ASSERT and _STATIC_ASSERT using a function prototype. This way
we avoid duplicate definition errors like with a typedef and unused function warning like
with the extern.
44631 Fix C_ASSERT yet another time.
Modified:
trunk/reactos/include/crt/crtdbg.h
trunk/reactos/include/crt/malloc.h
trunk/reactos/include/ddk/ndis.h
trunk/reactos/include/ddk/ntdef.h
trunk/reactos/include/ddk/winddk.h
trunk/reactos/include/ndk/amd64/ (props changed)
trunk/reactos/include/ndk/amd64/asmmacro.S (props changed)
trunk/reactos/include/ndk/umtypes.h
trunk/reactos/include/psdk/winnt.h
Modified: trunk/reactos/include/crt/crtdbg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/crtdbg.h?rev=4…
==============================================================================
--- trunk/reactos/include/crt/crtdbg.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/crtdbg.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -90,7 +90,7 @@
} _CrtMemState;
#ifndef _STATIC_ASSERT
-#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1]
+#define _STATIC_ASSERT(expr) extern char (*static_assert(void)) [(expr) ? 1 : -1]
#endif
#ifndef _ASSERT
Modified: trunk/reactos/include/crt/malloc.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/crt/malloc.h?rev=4…
==============================================================================
--- trunk/reactos/include/crt/malloc.h [iso-8859-1] (original)
+++ trunk/reactos/include/crt/malloc.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -25,7 +25,7 @@
#endif
#ifndef _STATIC_ASSERT
-#define _STATIC_ASSERT(expr) typedef char __static_assert_t[(expr)?1:-1]
+#define _STATIC_ASSERT(expr) extern char (*static_assert(void)) [(expr) ? 1 : -1]
#endif
/* Return codes for _heapwalk() */
Modified: trunk/reactos/include/ddk/ndis.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ndis.h?rev=446…
==============================================================================
--- trunk/reactos/include/ddk/ndis.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ndis.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -2001,34 +2001,10 @@
IN PNDIS_PACKET Packet,
OUT PUINT TotalPacketLength OPTIONAL)
{
- if ((TotalPacketLength)) \
- { \
- if (!(Packet)->Private.ValidCounts) { \
- UINT _Offset; \
- UINT _PacketLength; \
- PNDIS_BUFFER _NdisBuffer; \
- UINT _PhysicalBufferCount = 0; \
- UINT _TotalPacketLength = 0; \
- UINT _Count = 0; \
- \
- for (_NdisBuffer = (Packet)->Private.Head; \
- _NdisBuffer != (PNDIS_BUFFER)NULL; \
- _NdisBuffer = _NdisBuffer->Next) \
- { \
- _PhysicalBufferCount += NDIS_BUFFER_TO_SPAN_PAGES(_NdisBuffer); \
- NdisQueryBufferOffset(_NdisBuffer, &_Offset, &_PacketLength); \
- _TotalPacketLength += _PacketLength; \
- _Count++; \
- } \
- (Packet)->Private.PhysicalCount = _PhysicalBufferCount; \
- (Packet)->Private.TotalLength = _TotalPacketLength; \
- (Packet)->Private.Count = _Count; \
- (Packet)->Private.ValidCounts = TRUE; \
- } \
- \
- if (TotalPacketLength) \
- *((PUINT)TotalPacketLength) = (Packet)->Private.TotalLength; \
- } \
+ if (!(Packet)->Private.ValidCounts) \
+ NdisQueryPacket(Packet, NULL, NULL, NULL, TotalPacketLength); \
+ else \
+ *(TotalPacketLength) = (Packet)->Private.TotalLength; \
}
Modified: trunk/reactos/include/ddk/ntdef.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntdef.h?rev=44…
==============================================================================
--- trunk/reactos/include/ddk/ntdef.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntdef.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -529,7 +529,21 @@
typedef STRING CANSI_STRING;
typedef PSTRING PCANSI_STRING;
-
+typedef struct _STRING32 {
+ USHORT Length;
+ USHORT MaximumLength;
+ ULONG Buffer;
+} STRING32, *PSTRING32,
+ UNICODE_STRING32, *PUNICODE_STRING32,
+ ANSI_STRING32, *PANSI_STRING32;
+
+typedef struct _STRING64 {
+ USHORT Length;
+ USHORT MaximumLength;
+ ULONGLONG Buffer;
+} STRING64, *PSTRING64,
+ UNICODE_STRING64, *PUNICODE_STRING64,
+ ANSI_STRING64, *PANSI_STRING64;
//
// LangID and NLS
@@ -679,10 +693,7 @@
//
// C_ASSERT Definition
//
-#define __C_ASSERT_JOIN(X, Y) __C_ASSERT_DO_JOIN(X, Y)
-#define __C_ASSERT_DO_JOIN(X, Y) __C_ASSERT_DO_JOIN2(X, Y)
-#define __C_ASSERT_DO_JOIN2(X, Y) X##Y
-#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1]
+#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
Modified: trunk/reactos/include/ddk/winddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddk.h?rev=4…
==============================================================================
--- trunk/reactos/include/ddk/winddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddk.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -4585,6 +4585,32 @@
struct _NT_TIB *Self;
} NT_TIB, *PNT_TIB;
+typedef struct _NT_TIB32 {
+ ULONG ExceptionList;
+ ULONG StackBase;
+ ULONG StackLimit;
+ ULONG SubSystemTib;
+ union {
+ ULONG FiberData;
+ ULONG Version;
+ };
+ ULONG ArbitraryUserPointer;
+ ULONG Self;
+} NT_TIB32,*PNT_TIB32;
+
+typedef struct _NT_TIB64 {
+ ULONG64 ExceptionList;
+ ULONG64 StackBase;
+ ULONG64 StackLimit;
+ ULONG64 SubSystemTib;
+ union {
+ ULONG64 FiberData;
+ ULONG Version;
+ };
+ ULONG64 ArbitraryUserPointer;
+ ULONG64 Self;
+} NT_TIB64,*PNT_TIB64;
+
typedef enum _PROCESSINFOCLASS {
ProcessBasicInformation,
ProcessQuotaLimits,
@@ -5236,7 +5262,7 @@
USHORT SegFs;
USHORT SegGs;
USHORT SegSs;
- USHORT EFlags;
+ ULONG EFlags;
/* Debug */
ULONG64 Dr0;
@@ -9364,7 +9390,7 @@
IN ULONG ProbeMode);
NTKERNELAPI
-ULONG
+SIZE_T
NTAPI
MmSizeOfMdl(
IN PVOID Base,
Propchange: trunk/reactos/include/ndk/amd64/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 17 00:39:20 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/include/ndk/amd64:34925,34967,34970,35323-35324,35347-35348,35361,35436,35509,35588,35683,35739,35762,35777,35823,35827,35952,35966,36172,36360,36445,36502-36503,36505,36899,36936,37323,37434,37472,37475,37536,37820-37821,37869,37990,38013-38014,38149-38150,38264,38355,39338,40088,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43426,43454,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/include/ndk/amd64:34925,34967,34970,35323-35324,35347-35348,35361,35436,35509,35588,35683,35739,35762,35777,35823,35827,35952,35966,36172,36360,36445,36502-36503,36505,36899,36936,37323,37434,37472,37475,37536,37820-37821,37868-37869,37990,38013-38014,38149-38150,38264,38355,39338,39347,40088,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029-41030,41044-41045,41047-41049,41071,41097-41098,41101,41449,41484,43426,43447,43454,43506,43777,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44178,44218,44294,44338,44389,44391,44460,44491,44500,44601,44623,44631
Propchange: trunk/reactos/include/ndk/amd64/asmmacro.S
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Dec 17 00:39:20 2009
@@ -1,1 +1,1 @@
-/branches/ros-amd64-bringup/reactos/include/ndk/amd64/asmmacro.S:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37475,37536,37820-37821,37869,37990,38013-38014,38149-38150,38264,38355,39338,40088,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029,41044-41045,41047-41049,41097-41098,41101,41449,41484,43426,43454,43506,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44294,44338,44389,44391,44460,44601
+/branches/ros-amd64-bringup/reactos/include/ndk/amd64/asmmacro.S:35683,35762,35777,35827,36172,36445,36502-36503,36505,36899,36936,37475,37536,37820-37821,37868-37869,37990,38013-38014,38149-38150,38264,38355,39338,39347,40088,40122-40123,40125,40128,40155,40753,40928,40986-40987,40989,40993,40995-40996,41001,41029-41030,41044-41045,41047-41049,41071,41097-41098,41101,41449,41484,43426,43447,43454,43506,43777,43839-43840,43857-43858,43860,43905-43907,44002,44037,44039-44040,44044-44045,44178,44218,44294,44338,44389,44391,44460,44491,44500,44601,44623,44631
Modified: trunk/reactos/include/ndk/umtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/umtypes.h?rev=…
==============================================================================
--- trunk/reactos/include/ndk/umtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/ndk/umtypes.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -151,6 +151,22 @@
CONST CHAR *Buffer;
} CSTRING, *PCSTRING;
+typedef struct _STRING32 {
+ USHORT Length;
+ USHORT MaximumLength;
+ ULONG Buffer;
+} STRING32, *PSTRING32,
+ UNICODE_STRING32, *PUNICODE_STRING32,
+ ANSI_STRING32, *PANSI_STRING32;
+
+typedef struct _STRING64 {
+ USHORT Length;
+ USHORT MaximumLength;
+ ULONGLONG Buffer;
+} STRING64, *PSTRING64,
+ UNICODE_STRING64, *PUNICODE_STRING64,
+ ANSI_STRING64, *PANSI_STRING64;
+
#endif
typedef struct _OBJECT_ATTRIBUTES
Modified: trunk/reactos/include/psdk/winnt.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/winnt.h?rev=4…
==============================================================================
--- trunk/reactos/include/psdk/winnt.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/winnt.h [iso-8859-1] Thu Dec 17 00:39:20 2009
@@ -226,12 +226,7 @@
typedef WORD FSHORT;
typedef DWORD FLONG;
-#define __C_ASSERT_JOIN(X, Y) __C_ASSERT_DO_JOIN(X, Y)
-#define __C_ASSERT_DO_JOIN(X, Y) __C_ASSERT_DO_JOIN2(X, Y)
-#define __C_ASSERT_DO_JOIN2(X, Y) X##Y
-
-#define C_ASSERT(e) typedef char __C_ASSERT_JOIN(__C_ASSERT__, __LINE__)[(e) ? 1 : -1]
-
+#define C_ASSERT(expr) extern char (*c_assert(void)) [(expr) ? 1 : -1]
#include "intrin.h"
@@ -3235,6 +3230,15 @@
struct _LIST_ENTRY *Flink;
struct _LIST_ENTRY *Blink;
} LIST_ENTRY,*PLIST_ENTRY;
+typedef struct _LIST_ENTRY32 {
+ DWORD Flink;
+ DWORD Blink;
+} LIST_ENTRY32,*PLIST_ENTRY32;
+typedef struct _LIST_ENTRY64 {
+ ULONGLONG Flink;
+ ULONGLONG Blink;
+} LIST_ENTRY64,*PLIST_ENTRY64;
+
typedef struct _SINGLE_LIST_ENTRY {
struct _SINGLE_LIST_ENTRY *Next;
} SINGLE_LIST_ENTRY,*PSINGLE_LIST_ENTRY;
@@ -4156,6 +4160,32 @@
PVOID ArbitraryUserPointer;
struct _NT_TIB *Self;
} NT_TIB,*PNT_TIB;
+
+typedef struct _NT_TIB32 {
+ DWORD ExceptionList;
+ DWORD StackBase;
+ DWORD StackLimit;
+ DWORD SubSystemTib;
+ union {
+ DWORD FiberData;
+ DWORD Version;
+ };
+ DWORD ArbitraryUserPointer;
+ DWORD Self;
+} NT_TIB32,*PNT_TIB32;
+
+typedef struct _NT_TIB64 {
+ DWORD64 ExceptionList;
+ DWORD64 StackBase;
+ DWORD64 StackLimit;
+ DWORD64 SubSystemTib;
+ union {
+ DWORD64 FiberData;
+ DWORD Version;
+ };
+ DWORD64 ArbitraryUserPointer;
+ DWORD64 Self;
+} NT_TIB64,*PNT_TIB64;
typedef struct _REPARSE_GUID_DATA_BUFFER {
DWORD ReparseTag;