Author: jcatena
Date: Wed Feb 3 14:23:05 2010
New Revision: 45391
URL:
http://svn.reactos.org/svn/reactos?rev=45391&view=rev
Log:
[REACTOS] platf.h update
Modified:
branches/jcatena-branch/include/reactos/msc/i386/platf.h
branches/jcatena-branch/include/reactos/msc/intrin2.h
Modified: branches/jcatena-branch/include/reactos/msc/i386/platf.h
URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
==============================================================================
--- branches/jcatena-branch/include/reactos/msc/i386/platf.h [iso-8859-1] (original)
+++ branches/jcatena-branch/include/reactos/msc/i386/platf.h [iso-8859-1] Wed Feb 3
14:23:05 2010
@@ -66,6 +66,30 @@
#define IN
#define OUT
+/*************************************************************************
+utility macros
+*************************************************************************/
+// token paste
+#define tokenpaste_(a1, a2) a1##a2
+#define tokenpaste(a1, a2) tokenpaste_(a1, a2)
+
+// stringfy
+#define sfy_(x) #x
+#define sfy(x) sfy_(x)
+
+// string literal macros
+// double definitions here are necessary because preprocessor behavior
+#define T16(x) tokenpaste(L, x)
+#define T8(x) x
+#ifdef _UNICODE
+#define TX(x) _T16(x)
+#else
+#define TX(x) _T8(x)
+#endif
+
+/*************************************************************************
+basic types
+*************************************************************************/
/* ptr size */
#define PTRSIZ 4
#define PTRSIZMIN 4
@@ -78,9 +102,6 @@
#define _SEGMENT _UNSUPPORTED
#define _SEGNAME _UNSUPPORTED
-/*************************************************************************
-basic types
-*************************************************************************/
typedef void *pvoid, _NEAR *npvoid, _FAR *lpvoid, _FARH *hpvoid;
/* chars */
@@ -125,21 +146,6 @@
typedef chrs *pchrs, _NEAR *npchrs, _FAR *lpchrs, _FARH hpchrs;
typedef chru *pchru, _NEAR *npchru, _FAR *lpchru, _FARH hpchru;
-// string literal macros
-// double definitions here are necessary because preprocessor behavior
-#define _T16(x) L ## x
-#define T16(x) _T16(x)
-#define _T8(x) x
-#define T8(x) _T8(x)
-#ifdef _UNICODE
-#define TX(x) _T16(x)
-#else
-#define TX(x) _T8(x)
-#endif
-// stringfy
-#define _sfy(x) #x
-#define sfy(x) _sfy(x)
-
/* integers */
#define INTSIZMIN 1
#define INTSIZMAX 8
@@ -202,12 +208,6 @@
#define _UNREACHABLE _ASSUME(0); _noreturn()
#define UNREACHABLE _UNREACHABLE
-pvoid _ReturnAddress(void);
-#pragma intrinsic(_ReturnAddress)
-#define ReturnAddress _ReturnAddress
-#define _ReturnAddressn(x) _ReturnAddress()
-#define ReturnAddressn _ReturnAddressn
-
_NOWARN_MSC(4146) // unary minus applied to unsigned
#include <platf2.h> // should not be needed if code uses above macros instead of
compiler dependent directives
Modified: branches/jcatena-branch/include/reactos/msc/intrin2.h
URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
==============================================================================
--- branches/jcatena-branch/include/reactos/msc/intrin2.h [iso-8859-1] (original)
+++ branches/jcatena-branch/include/reactos/msc/intrin2.h [iso-8859-1] Wed Feb 3 14:23:05
2010
@@ -9,6 +9,10 @@
void * _ReturnAddress(void);
void * _AddressOfReturnAddress(void);
unsigned int __getcallerseflags(void);
+
+#define ReturnAddress _ReturnAddress
+#define _ReturnAddressn(x) _ReturnAddress()
+#define ReturnAddressn _ReturnAddressn
/*** Atomic operations ***/
void _ReadWriteBarrier(void);