Index: /trunk/src/recompiler/InnoTek/config-host.h
===================================================================
--- /trunk/src/recompiler/InnoTek/config-host.h	(revision 3725)
+++ /trunk/src/recompiler/InnoTek/config-host.h	(revision 3726)
@@ -21,5 +21,5 @@
 
 
-#if defined(__amd64__) || defined(HOST_X86_64) /* latter, for dyngen on win64. */
+#if defined(RT_ARCH_AMD64) || defined(HOST_X86_64) /* The latter, for dyngen when cross compiling (windows, l4, etc). */
 # define HOST_X86_64 1
 # define HOST_LONG_BITS 64
@@ -27,13 +27,13 @@
 # define HOST_I386 1
 # define HOST_LONG_BITS 32
-# ifdef __WIN32__
+# ifdef RT_OS_WINDOWS
 #  define CONFIG_WIN32 1
-# elif defined(__OS2__)
+# elif defined(RT_OS_OS2)
 #  define CONFIG_OS2
-# elif defined(__DARWIN__)
+# elif defined(RT_OS_DARWIN)
 #  define CONFIG_DARWIN
-# elif defined(__FREEBSD__) || defined(__NETBSD__) || defined(__OPENBSD__)
+# elif defined(RT_OS_FREEBSD) || defined(RT_OS_NETBSD) || defined(RT_OS_OPENBSD)
 /*#  define CONFIG_BSD*/
-# elif defined(__SOLARIS__)
+# elif defined(RT_OS_SOLARIS)
 /*#  define CONFIG_SUN*/
 # elif !defined(IPRT_NO_CRT)
Index: /trunk/src/recompiler/VBoxREMWrapper.cpp
===================================================================
--- /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 3725)
+++ /trunk/src/recompiler/VBoxREMWrapper.cpp	(revision 3726)
@@ -158,5 +158,5 @@
  * use calling convention wrappers.
  */
-#if (defined(__AMD64__) && defined(__WIN__)) || defined(__DOXYGEN__)
+#if (defined(RT_ARCH_AMD64) && defined(RT_OS_WINDOWS)) || defined(__DOXYGEN__)
 # define USE_REM_CALLING_CONVENTION_GLUE
 #endif
@@ -166,5 +166,5 @@
  * emit some jump glue to deal with big addresses.
  */
-#if (defined(__AMD64__) && !defined(USE_REM_CALLING_CONVENTION_GLUE) && !defined(__DARWIN__)) || defined(__DOXYGEN__)
+#if (defined(RT_ARCH_AMD64) && !defined(USE_REM_CALLING_CONVENTION_GLUE) && !defined(__DARWIN__)) || defined(__DOXYGEN__)
 # define USE_REM_IMPORT_JUMP_GLUE
 #endif
@@ -217,5 +217,5 @@
      * For REMPARMDESC_FLAGS_PFN this is a PREMFNDESC. */
     void       *pvExtra;
-    
+
 } REMPARMDESC, *PREMPARMDESC;
 /** Pointer to a constant parameter descriptor. */
@@ -486,5 +486,5 @@
     { REMPARMDESC_FLAGS_INT,        sizeof(CSAMTAG), NULL }
 };
-#if !(defined(__WIN__) && defined(__AMD64__)) /* the callbacks are problematic */
+#if !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */
 static const REMPARMDESC g_aArgsDBGCRegisterCommands[] =
 {
@@ -772,7 +772,7 @@
     { REMPARMDESC_FLAGS_INT,        sizeof(PSSMHANDLE), NULL },
 };
-static REMFNDESC g_SSMIntCallback = 
-{   
-    "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL 
+static REMFNDESC g_SSMIntCallback =
+{
+    "SSMIntCallback", NULL, &g_aArgsSSMIntCallback[0], ELEMENTS(g_aArgsSSMIntCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL
 };
 
@@ -783,7 +783,7 @@
     { REMPARMDESC_FLAGS_INT,        sizeof(uint32_t),           NULL },
 };
-static REMFNDESC g_SSMIntLoadExecCallback = 
-{   
-    "SSMIntLoadExecCallback", NULL, &g_aArgsSSMIntLoadExecCallback[0], ELEMENTS(g_aArgsSSMIntLoadExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL 
+static REMFNDESC g_SSMIntLoadExecCallback =
+{
+    "SSMIntLoadExecCallback", NULL, &g_aArgsSSMIntLoadExecCallback[0], ELEMENTS(g_aArgsSSMIntLoadExecCallback), REMFNDESC_FLAGS_RET_INT, sizeof(int),  NULL
 };
 static const REMPARMDESC g_aArgsSSMR3RegisterInternal[] =
@@ -987,5 +987,5 @@
     { "CPUMQueryGuestCtxPtr",                   (void *)(uintptr_t)&CPUMQueryGuestCtxPtr,           &g_aArgsCPUMQueryGuestCtxPtr[0],            ELEMENTS(g_aArgsCPUMQueryGuestCtxPtr),              REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
     { "CSAMR3MonitorPage",                      (void *)(uintptr_t)&CSAMR3MonitorPage,              &g_aArgsCSAMR3MonitorPage[0],               ELEMENTS(g_aArgsCSAMR3MonitorPage),                 REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
-#if !(defined(__WIN__) && defined(__AMD64__)) /* the callbacks are problematic */
+#if !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64)) /* the callbacks are problematic */
     { "DBGCRegisterCommands",                   (void *)(uintptr_t)&DBGCRegisterCommands,           &g_aArgsDBGCRegisterCommands[0],            ELEMENTS(g_aArgsDBGCRegisterCommands),              REMFNDESC_FLAGS_RET_INT,    sizeof(int),        NULL },
 #endif
@@ -1270,5 +1270,5 @@
 /**
  * Entry logger function.
- * 
+ *
  * @param   pDesc       The description.
  */
@@ -1281,5 +1281,5 @@
 /**
  * Exit logger function.
- * 
+ *
  * @param   pDesc       The description.
  * @param   pvRet       The return code.
@@ -1293,5 +1293,5 @@
 /**
  * Creates a wrapper for the specified callback function at run time.
- * 
+ *
  * @param   pDesc       The function descriptor.
  * @param   pValue      Upon entry *pValue contains the address of the function to be wrapped.
@@ -1305,5 +1305,5 @@
     AssertPtr(pValue);
 
-    /* 
+    /*
      * Simple?
      */
@@ -1311,5 +1311,5 @@
         return;
 
-    /* 
+    /*
      * Locate the right function descriptor.
      */
@@ -1328,9 +1328,9 @@
      * Create a new glue patch.
      */
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
     int rc = remGenerateExportGlue(pValue, pDesc);
 #else
 #error "port me"
-#endif 
+#endif
     AssertReleaseRC(rc);
 
@@ -1633,5 +1633,5 @@
         }
         else
-        {   
+        {
             /* custom hacks - it's simpler to make assembly templates than writing a more generic code generator... */
             static const struct { const char *pszName; PFNRT pvStart, pvEnd; } s_aTemplates[] =
@@ -1660,5 +1660,5 @@
          */
         uint8_t *pb;
-#   ifdef __AMD64__
+#   ifdef RT_ARCH_AMD64
         pDesc->pvWrapper = pb = (uint8_t *)remAllocGlue(32);
         AssertReturn(pDesc->pvWrapper, VERR_NO_MEMORY);
Index: /trunk/src/recompiler/VBoxREMWrapperA.asm
===================================================================
--- /trunk/src/recompiler/VBoxREMWrapperA.asm	(revision 3725)
+++ /trunk/src/recompiler/VBoxREMWrapperA.asm	(revision 3726)
@@ -33,5 +33,5 @@
 
 
-%ifdef __AMD64__
+%ifdef RT_ARCH_AMD64
  ;;
  ; 64-bit pushad
@@ -84,5 +84,5 @@
     sub     rsp, 20h                    ; shadow space
 
-   %ifdef __WIN__
+   %ifdef RT_OS_WINDOWS
     mov     rcx, REM_FIXUP_64_DESC
    %else
@@ -109,5 +109,5 @@
     sub     rsp, 20h                    ; shadow space
 
-   %ifdef __WIN__
+   %ifdef RT_OS_WINDOWS
     mov     rdx, rax
     mov     rcx, REM_FIXUP_64_DESC
@@ -134,6 +134,6 @@
 BEGINCODE
 
-%ifdef __WIN__
- %ifdef __AMD64__
+%ifdef RT_OS_WINDOWS
+ %ifdef RT_ARCH_AMD64
 
 
@@ -568,5 +568,5 @@
     mov     [rsp], rdi                  ; -> rcx
 
-    ; Now convert the function pointers. Have to setup a new shadow 
+    ; Now convert the function pointers. Have to setup a new shadow
     ; space here since the SSMR3RegisterInternal one is already in use.
     sub     rsp, 20h
@@ -878,5 +878,5 @@
 ENDPROC WrapMSC2GCC9Int
 
- %endif ; __AMD64__
-%endif ; __WIN__
-
+ %endif ; RT_ARCH_AMD64
+%endif ; RT_OS_WINDOWS
+
Index: /trunk/src/recompiler/VBoxRecompiler.c
===================================================================
--- /trunk/src/recompiler/VBoxRecompiler.c	(revision 3725)
+++ /trunk/src/recompiler/VBoxRecompiler.c	(revision 3726)
@@ -91,5 +91,5 @@
 DECLINLINE(target_ulong) remR3HCVirt2GCPhysInlined(PVM pVM, void *addr);
 DECLINLINE(void *) remR3GCPhys2HCVirtInlined(PVM pVM, target_ulong addr);
-#endif 
+#endif
 
 static uint32_t remR3MMIOReadU8(void *pvVM, target_phys_addr_t GCPhys);
@@ -127,9 +127,9 @@
 static STAMPROFILEADV gStatMemReadHCPtr;
 static STAMPROFILEADV gStatMemWriteHCPtr;
-#endif 
+#endif
 #ifdef PGM_DYNAMIC_RAM_ALLOC
 static STAMPROFILE    gStatGCPhys2HCVirt;
 static STAMPROFILE    gStatHCVirt2GCPhys;
-#endif 
+#endif
 static STAMCOUNTER    gStatCpuGetTSC;
 static STAMCOUNTER    gStatRefuseTFInhibit;
@@ -188,5 +188,5 @@
 
 
-#if defined(VBOX_WITH_DEBUGGER) && !(defined(__WIN__) && defined(__AMD64__))
+#if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDWS) && defined(RT_ARCH_AMD64))
 /*
  * Debugger commands.
@@ -235,5 +235,5 @@
 /* Put them here to avoid unused variable warning. */
 AssertCompile(RT_SIZEOFMEMB(VM, rem.padding) >= RT_SIZEOFMEMB(VM, rem.s));
-#if !defined(IPRT_NO_CRT) && (defined(__LINUX__) || defined(__DARWIN__) || defined(__WIN__))
+#if !defined(IPRT_NO_CRT) && (defined(RT_OS_LINUX) || defined(RT_OS_DARWIN) || defined(RT_OS_WINDOWS))
 AssertCompileMemberSize(REM, Env, REM_ENV_SIZE);
 #else
@@ -337,5 +337,5 @@
         return rc;
 
-#if defined(VBOX_WITH_DEBUGGER) && !(defined(__WIN__) && defined(__AMD64__))
+#if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64))
     /*
      * Debugger commands.
@@ -367,5 +367,5 @@
     STAM_REG(pVM, &gStatMemReadHCPtr,       STAMTYPE_PROFILE, "/PROF/REM/MemReadHCPtr", STAMUNIT_TICKS_PER_CALL, "Profiling memory access.");
     STAM_REG(pVM, &gStatMemWriteHCPtr,      STAMTYPE_PROFILE, "/PROF/REM/MemWriteHCPtr", STAMUNIT_TICKS_PER_CALL, "Profiling memory access.");
-#endif 
+#endif
 #ifdef PGM_DYNAMIC_RAM_ALLOC
     STAM_REG(pVM, &gStatHCVirt2GCPhys,      STAMTYPE_PROFILE, "/PROF/REM/HCVirt2GCPhys", STAMUNIT_TICKS_PER_CALL, "Profiling memory convertion.");
@@ -1386,5 +1386,5 @@
     if(!is_user && !(env->state & CPU_RAW_RING0))
         return; /* We are currently not interested in kernel pages */
-#endif 
+#endif
 
 #if !defined(PGM_DYNAMIC_RAM_ALLOC) && !defined(REM_PHYS_ADDR_IN_TLB)
@@ -1432,5 +1432,5 @@
 # else
             phys_addr = virt_addr - (uintptr_t)phys_ram_base + addend;
-# endif 
+# endif
         else
             phys_addr = addend;
@@ -2577,5 +2577,5 @@
 # ifndef REM_PHYS_ADDR_IN_TLB
         uint32_t i;
-# endif 
+# endif
 
         cpu_register_physical_memory(GCPhys, cb, GCPhys | (fFlags & MM_RAM_FLAGS_RESERVED ? IO_MEM_UNASSIGNED : 0));
@@ -2627,5 +2627,5 @@
 # ifndef REM_PHYS_ADDR_IN_TLB
     uint32_t idx;
-#endif 
+#endif
 
     Log(("REMR3NotifyPhysRamChunkRegister: GCPhys=%VGp cb=%d pvRam=%p fFlags=%d\n", GCPhys, cb, pvRam, fFlags));
@@ -2740,5 +2740,5 @@
     }
     pv = (void *)((uintptr_t)pv | (addr & PAGE_OFFSET_MASK));
-#endif 
+#endif
     return pv;
 }
@@ -3168,5 +3168,5 @@
 #else
 # define VBOX_CHECK_ADDR(GCPhys) do { } while (0)
-#endif 
+#endif
 
 /**
@@ -3857,5 +3857,5 @@
 
 
-#if defined(VBOX_WITH_DEBUGGER) && !(defined(__WIN__) && defined(__AMD64__))
+#if defined(VBOX_WITH_DEBUGGER) && !(defined(RT_OS_WINDOWS) && defined(RT_ARCH_AMD64))
 /**
  * External Debugger Command: .remstep [on|off|1|0]
@@ -5391,5 +5391,5 @@
 
 
-#if defined(IPRT_NO_CRT) && defined(__WIN__) && defined(__X86__)
+#if defined(IPRT_NO_CRT) && defined(RT_OS_WINDOWS) && defined(RT_ARCH_X86)
 /**
  * The Dll main entry point (stub).
