Index: /trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VBoxBFE/HostUSBImpl.cpp	(revision 3701)
@@ -27,5 +27,5 @@
 #include <string>
 
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
 #include <sys/types.h>
 #include <sys/stat.h>
@@ -40,5 +40,5 @@
 #include <linux/cdrom.h>
 #include <errno.h>
-#endif /* __LINUX __ */
+#endif /* RT_OS_LINUX */
 
 #include "HostUSBImpl.h"
@@ -86,7 +86,7 @@
 
 /*
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
     mUSBProxyService = new USBProxyServiceLinux (this);
-#elif defined __WIN__
+#elif defined RT_OS_WINDOWS
     mUSBProxyService = new USBProxyServiceWin32 (this);
 */
Index: /trunk/src/VBox/Frontends/VBoxBFE/Logging.h
===================================================================
--- /trunk/src/VBox/Frontends/VBoxBFE/Logging.h	(revision 3700)
+++ /trunk/src/VBox/Frontends/VBoxBFE/Logging.h	(revision 3701)
@@ -39,58 +39,9 @@
  *  Helpful macro to trace execution.
  */
-#define LogTrace() \
-    LogFlow((">>>>> %s (%d): %s\n", __FILE__, __LINE__, __PRETTY_FUNCTION__))
-
-/**
- *  Helper macro to print the current reference count of the given COM object
- *  to the log file.
- *  @param obj  object in question (must be a pointer to an IUnknown subclass)
- */
-#define LogComRefCnt(obj) \
-    do { \
-        int refc = (obj)->AddRef(); refc --; \
-        LogFlow (("{%p} " #obj ".refcount=%d\n", (obj), refc)); \
-        (obj)->Release(); \
-    } while (0)
 
 #if defined(DEBUG) || defined(LOG_ENABLED)
-#   define V_DEBUG(m)           V_LOG(m)
-#if defined(__WIN__)
-#   define V_LOG(m)             \
-    do { Log (("[MAIN:%05u] ", GetCurrentThreadId())); Log (m); Log (("\n")); } while (0)
-#   define V_LOG2(m)            \
-    do { Log2 (("[MAIN:%05u] ", GetCurrentThreadId())); Log2 (m); Log2 (("\n")); } while (0)
-#   define V_LOGFLOW(m)         \
-    do { LogFlow (("[MAIN:%05u] ", GetCurrentThreadId())); LogFlow (m); LogFlow (("\n")); } while (0)
-#   define V_LOGFLOWMEMBER(m)   \
-    do { LogFlow (("[MAIN:%05u] {%p} ", GetCurrentThreadId(), this)); LogFlow (m); LogFlow (("\n")); } while (0)
-#   define V_ASSERTMSG(m, e)    \
-    AssertMsg(e, m)
-#   define V_ASSERTFAILED(m)    \
-    AssertMsgFailed(m)
-#else
-#   define V_LOG(m)             \
-    do { Log (("[MAIN:%RTnthrd] ", RTThreadNativeSelf())); Log (m); Log (("\n")); } while (0)
-#   define V_LOG2(m)            \
-    do { Log2 (("[MAIN:%RTnthrd] ", RTThreadNativeSelf())); Log2 (m); Log2 (("\n")); } while (0)
-#   define V_LOGFLOW(m)         \
-    do { LogFlow (("[MAIN:%RTnthrd] ", RTThreadNativeSelf())); LogFlow (m); LogFlow (("\n")); } while (0)
-#   define V_LOGFLOWMEMBER(m)   \
-    do { LogFlow (("[MAIN:%RTnthrd] {%p} ", RTThreadNativeSelf(), this)); LogFlow (m); LogFlow (("\n")); } while (0)
-#   define V_ASSERTMSG(m, e)    \
-    AssertMsg(e, m)
-#   define V_ASSERTFAILED(m)    \
-    AssertMsgFailed(m)
-#endif
 #   define LogFlowMember(m)     \
     do { LogFlow (("{%p} ", this)); LogFlow (m); } while (0)
 #else // if !DEBUG
-#   define V_DEBUG(m)           do {} while (0)
-#   define V_LOG(m)             do {} while (0)
-#   define V_LOG2(m)            do {} while (0)
-#   define V_LOGFLOW(m)         do {} while (0)
-#   define V_LOGFLOWMEMBER(m)   do {} while (0)
-#   define V_ASSERTMSG(m, e)    do {} while (0)
-#   define V_ASSERTFAILED(m)    do {} while (0)
 #   define LogFlowMember(m)     do {} while (0)
 #endif // !DEBUG
Index: /trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VBoxBFE/SDLFramebuffer.cpp	(revision 3701)
@@ -171,5 +171,5 @@
     *address = mScreen
              ? (uintptr_t)mScreen->pixels
-#ifdef __OS2__ /* Play safe for now - this is vital when we get a larger surface than requested. */
+#ifdef RT_OS_OS2 /* Play safe for now - this is vital when we get a larger surface than requested. */
                + mScreen->offset
 #endif
Index: /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VBoxManage/VBoxManage.cpp	(revision 3701)
@@ -69,5 +69,5 @@
 # define NS_GET_IID(I) IID_##I
 #endif
-#ifndef __WIN__
+#ifndef RT_OS_WINDOWS
 #define IUnknown nsISupports
 #endif
@@ -228,15 +228,15 @@
 static void printUsage(USAGECATEGORY u64Cmd)
 {
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
     bool fLinux = true;
 #else
     bool fLinux = false;
 #endif
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
     bool fWin = true;
 #else
     bool fWin = false;
 #endif
-#ifdef __DARWIN__
+#ifdef RT_OS_DARWIN
     bool fDarwin = true;
 #else
@@ -1704,5 +1704,5 @@
         }
     }
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
     else
     if (strcmp(argv[0], "hostifs") == 0)
@@ -1730,5 +1730,5 @@
         }
     }
-#endif /* __WIN__ */
+#endif /* RT_OS_WINDOWS */
     else
     if (strcmp(argv[0], "hdds") == 0)
@@ -2414,5 +2414,5 @@
 static int handleConvertDDImage(int argc, char *argv[])
 {
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
     const bool fReadFromStdIn = (argc >= 1) && !strcmp(argv[0], "stdin");
 #else
@@ -2823,5 +2823,5 @@
     std::vector <char *> hostifdev (NetworkAdapterCount, 0);
     std::vector <const char *> intnet (NetworkAdapterCount, 0);
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
     std::vector <char *> tapsetup (NetworkAdapterCount, 0);
     std::vector <char *> tapterm (NetworkAdapterCount, 0);
@@ -3160,5 +3160,5 @@
             i++;
         }
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
         else if (strncmp(argv[i], "-tapsetup", 9) == 0)
         {
@@ -3185,5 +3185,5 @@
             i++;
         }
-#endif /* __LINUX__ */
+#endif /* RT_OS_LINUX */
         else if (strncmp(argv[i], "-macaddress", 11) == 0)
         {
@@ -3307,5 +3307,5 @@
                 uarts_server[n - 1] = argv[i];
                 i++;
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
                 if (strncmp(argv[i], "\\\\.\\pipe\\", 9))
                     return errorArgument("Uart pipe must start with \\\\.\\pipe\\");
@@ -3796,5 +3796,5 @@
                 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
             }
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
 #ifdef VBOX_WITH_WINMM
             else if (strcmp(audio, "winmm") == 0)
@@ -3809,6 +3809,6 @@
                 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
             }
-#endif /* __WIN__ */
-#ifdef __LINUX__
+#endif /* RT_OS_WINDOWS */
+#ifdef RT_OS_LINUX
             else if (strcmp(audio, "oss") == 0)
             {
@@ -3823,6 +3823,6 @@
             }
 # endif
-#endif /* !__LINUX__ */
-#ifdef __DARWIN__
+#endif /* !RT_OS_LINUX */
+#ifdef RT_OS_DARWIN
             else if (strcmp(audio, "coreaudio") == 0)
             {
@@ -3830,5 +3830,5 @@
                 CHECK_ERROR(audioAdapter, COMSETTER(Enabled)(true));
             }
-#endif /* !__DARWIN__ */
+#endif /* !RT_OS_DARWIN */
             else
             {
@@ -4016,5 +4016,5 @@
             }
 
-#ifdef __LINUX__
+#ifdef RT_OS_LINUX
             /* the TAP setup application? */
             if (tapsetup[n])
@@ -4044,5 +4044,5 @@
                 }
             }
-#endif /* __LINUX__ */
+#endif /* RT_OS_LINUX */
 
         }
@@ -5191,5 +5191,5 @@
 }
 
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
 static int handleCreateHostIF(int argc, char *argv[],
                               ComPtr<IVirtualBox> virtualBox, ComPtr<ISession> session)
@@ -5277,5 +5277,5 @@
     return SUCCEEDED(rc) ? 0 : 1;
 }
-#endif /* __WIN__ */
+#endif /* RT_OS_WINDOWS */
 
 static int handleGetExtraData(int argc, char *argv[],
@@ -6422,5 +6422,5 @@
         { "unregisterimage",  handleUnregisterImage },
         { "showvdiinfo",      handleShowVDIInfo },
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
         { "createhostif",     handleCreateHostIF },
         { "removehostif",     handleRemoveHostIF },
Index: /trunk/src/VBox/Frontends/VirtualBox/include/XKeyboard.h
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/include/XKeyboard.h	(revision 3700)
+++ /trunk/src/VBox/Frontends/VirtualBox/include/XKeyboard.h	(revision 3701)
@@ -24,5 +24,5 @@
 #define __XKeyboard_h__
 
-#ifndef __LINUX__
+#ifndef RT_OS_LINUX
 #error This file is X11/Linux specific!
 #endif
Index: /trunk/src/VBox/Frontends/VirtualBox/src/COMDefs.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/COMDefs.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/COMDefs.cpp	(revision 3701)
@@ -109,5 +109,5 @@
 #if defined (VBOX_WITH_XPCOM)
 
-#if !defined (__DARWIN__) && !defined (__OS2__)
+#if !defined (RT_OS_DARWIN) && !defined (RT_OS_OS2)
 
     if (NS_SUCCEEDED (rc))
@@ -168,5 +168,5 @@
             if (NS_SUCCEEDED (rc) && isOnMainThread)
             {
-# if !defined (__DARWIN__) && !defined (__OS2__)
+# if !defined (RT_OS_DARWIN) && !defined (RT_OS_OS2)
                 if (sSocketListener)
                 {
Index: /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/VBoxConsoleView.cpp	(revision 3701)
@@ -1735,10 +1735,10 @@
     if (focus)
     {
-#ifdef __WIN__
+#ifdef RT_OS_WINDOWS
         if (   gs.autoCapture()
             && GetAncestor (winId(), GA_ROOT) == GetForegroundWindow())
 #else
         if (gs.autoCapture())
-#endif /* __WIN__ */
+#endif /* RT_OS_WINDOWS */
         {
             captureKbd (true);
Index: /trunk/src/VBox/Frontends/VirtualBox/src/darwin/DarwinCursor.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/darwin/DarwinCursor.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/darwin/DarwinCursor.cpp	(revision 3701)
@@ -876,5 +876,5 @@
 g++ -g \
     -framework IOKit -framework Carbon -framework QuickTime \
-    -D__DARWIN__ -DIN_RING3 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DTESTING \
+    -DRT_OS_DARWIN -DIN_RING3 -DQT_NO_DEBUG -DQT_THREAD_SUPPORT -DTESTING \
     -I include/ \
     -I ../../../../include \
Index: /trunk/src/VBox/Frontends/VirtualBox/src/main.cpp
===================================================================
--- /trunk/src/VBox/Frontends/VirtualBox/src/main.cpp	(revision 3700)
+++ /trunk/src/VBox/Frontends/VirtualBox/src/main.cpp	(revision 3701)
@@ -48,5 +48,5 @@
 #endif
 #include <ucontext.h>
-#ifdef __AMD64__
+#ifdef RT_ARCH_AMD64
 # define REG_PC REG_RIP
 #else
