Author: tkreuzer
Date: Wed Jul 16 16:12:27 2008
New Revision: 34555
URL:
http://svn.reactos.org/svn/reactos?rev=34555&view=rev
Log:
FLOATOBJ is a structure only on x86 in kernelmode, for usermode drivers and other
architectures it's a FLOAT. Update winddi.h accordingly.
Modified:
trunk/reactos/include/ddk/winddi.h
Modified: trunk/reactos/include/ddk/winddi.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/winddi.h?rev=3…
==============================================================================
--- trunk/reactos/include/ddk/winddi.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/winddi.h [iso-8859-1] Wed Jul 16 16:12:27 2008
@@ -544,11 +544,15 @@
FWORD fwdKern;
} FD_KERNINGPAIR;
+#if defined(_X86_) && !defined(USERMODE_DRIVER)
typedef struct _FLOATOBJ
{
ULONG ul1;
ULONG ul2;
} FLOATOBJ, *PFLOATOBJ;
+#else
+typedef FLOAT FLOATOBJ, *PFLOATOBJ;
+#endif
typedef struct _FLOATOBJ_XFORM {
FLOATOBJ eM11;
@@ -2287,6 +2291,7 @@
IN DWORD cbBuf,
OUT LPDWORD pcWritten);
+#if defined(_X86_) && !defined(USERMODE_DRIVER)
WIN32KAPI
VOID
APIENTRY
@@ -2444,6 +2449,34 @@
FLOATOBJ_SubLong(
IN OUT PFLOATOBJ pf,
IN LONG l);
+
+#else
+
+#define FLOATOBJ_SetFloat(pf, f) {*(pf) = (f);}
+#define FLOATOBJ_SetLong(pf, l) {*(pf) = (FLOAT)(l);}
+#define FLOATOBJ_GetFloat(pf) (*(PULONG)(pf))
+#define FLOATOBJ_GetLong(pf) ((LONG)*(pf))
+#define FLOATOBJ_Add(pf, pf1) {*(pf) += *(pf1);}
+#define FLOATOBJ_AddFloat(pf, f) {*(pf) += (f);}
+#define FLOATOBJ_AddLong(pf, l) {*(pf) += (l);}
+#define FLOATOBJ_Sub(pf, pf1) {*(pf) -= *(pf1);}
+#define FLOATOBJ_SubFloat(pf, f) {*(pf) -= (f);}
+#define FLOATOBJ_SubLong(pf, l) {*(pf) -= (l);}
+#define FLOATOBJ_Mul(pf, pf1) {*(pf) *= *(pf1);}
+#define FLOATOBJ_MulFloat(pf, f) {*(pf) *= (f);}
+#define FLOATOBJ_MulLong(pf, l) {*(pf) *= (l);}
+#define FLOATOBJ_Div(pf, pf1) {*(pf) /= *(pf1);}
+#define FLOATOBJ_DivFloat(pf, f) {*(pf) /= (f);}
+#define FLOATOBJ_DivLong(pf, l) {*(pf) /= (l);}
+#define FLOATOBJ_Neg(pf) {*(pf) = -(*(pf));}
+#define FLOATOBJ_Equal(pf, pf1) (*(pf) == *(pf1))
+#define FLOATOBJ_GreaterThan(pf, pf1) (*(pf) > *(pf1))
+#define FLOATOBJ_LessThan(pf, pf1) (*(pf) < *(pf1))
+#define FLOATOBJ_EqualLong(pf, 1) (*(pf) == (FLOAT)(1))
+#define FLOATOBJ_GreaterThanLong(pf, 1) (*(pf) > (FLOAT)(1))
+#define FLOATOBJ_LessThanLong(pf, 1) (*(pf) < (FLOAT)(1))
+
+#endif
WIN32KAPI
ULONG