Index: /trunk/include/iprt/types.h
===================================================================
--- /trunk/include/iprt/types.h	(revision 35524)
+++ /trunk/include/iprt/types.h	(revision 35525)
@@ -35,5 +35,13 @@
 #ifndef IPRT_NO_CRT
 
-# if defined(RT_OS_DARWIN) && defined(KERNEL)
+# if defined(IN_XF86_MODULE) && !defined(NO_ANSIC)
+    /*
+     * Kludge for xfree86 modules: size_t and other types are redefined.
+     */
+RT_C_DECLS_BEGIN
+#  include "xf86_ansic.h"
+RT_C_DECLS_END
+
+# elif defined(RT_OS_DARWIN) && defined(KERNEL)
     /*
      * Kludge for the darwin kernel:
@@ -462,5 +470,5 @@
 #ifdef RT_COMPILER_GROKS_64BIT_BITFIELDS
     /** Format using 64-bit bitfields.  */
-    RT_GCC_EXTENSION struct 
+    RT_GCC_EXTENSION struct
     {
 # ifdef RT_BIG_ENDIAN
Index: /trunk/src/VBox/Runtime/common/alloc/heapoffset.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/alloc/heapoffset.cpp	(revision 35524)
+++ /trunk/src/VBox/Runtime/common/alloc/heapoffset.cpp	(revision 35525)
@@ -30,7 +30,4 @@
 *******************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DEFAULT
-/* XXX this header must be included first as it re-defines some symbols
- * (e.g size_t) if IN_XF86_MODULE is defined. */
-#include <iprt/string.h>
 #include <iprt/heap.h>
 #include "internal/iprt.h"
@@ -41,4 +38,5 @@
 #include <iprt/log.h>
 #include <iprt/param.h>
+#include <iprt/string.h>
 
 #include "internal/magics.h"
Index: /trunk/src/VBox/Runtime/common/alloc/heapsimple.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/alloc/heapsimple.cpp	(revision 35524)
+++ /trunk/src/VBox/Runtime/common/alloc/heapsimple.cpp	(revision 35525)
@@ -30,7 +30,4 @@
 *******************************************************************************/
 #define LOG_GROUP RTLOGGROUP_DEFAULT
-/* XXX this header must be included first as it re-defines some symbols
- * (e.g size_t) if IN_XF86_MODULE is defined. */
-#include <iprt/string.h>
 #include <iprt/heap.h>
 #include "internal/iprt.h"
@@ -40,4 +37,5 @@
 #include <iprt/err.h>
 #include <iprt/log.h>
+#include <iprt/string.h>
 #include <iprt/param.h>
 
