Index: /trunk/src/VBox/Runtime/common/string/strformatrt.cpp
===================================================================
--- /trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 40987)
+++ /trunk/src/VBox/Runtime/common/string/strformatrt.cpp	(revision 40988)
@@ -49,4 +49,5 @@
 #include <iprt/net.h>
 #include <iprt/path.h>
+#include <iprt/asm.h>
 #define STRFORMAT_WITH_X86
 #ifdef STRFORMAT_WITH_X86
@@ -517,7 +518,7 @@
                             return RTStrFormat(pfnOutput, pvArgOutput, NULL, 0,
                                                "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
-                                               u.pUuid->Gen.u32TimeLow,
-                                               u.pUuid->Gen.u16TimeMid,
-                                               u.pUuid->Gen.u16TimeHiAndVersion,
+                                               RT_H2LE_U32(u.pUuid->Gen.u32TimeLow),
+                                               RT_H2LE_U16(u.pUuid->Gen.u16TimeMid),
+                                               RT_H2LE_U16(u.pUuid->Gen.u16TimeHiAndVersion),
                                                u.pUuid->Gen.u8ClockSeqHiAndReserved,
                                                u.pUuid->Gen.u8ClockSeqLow,
Index: /trunk/src/VBox/Runtime/generic/uuid-generic.cpp
===================================================================
--- /trunk/src/VBox/Runtime/generic/uuid-generic.cpp	(revision 40987)
+++ /trunk/src/VBox/Runtime/generic/uuid-generic.cpp	(revision 40988)
@@ -34,4 +34,5 @@
 #include <iprt/assert.h>
 #include <iprt/err.h>
+#include <iprt/asm.h>
 
 
@@ -201,5 +202,5 @@
      *             pUuid->Gen.au8Node[5]);
      */
-    u32TimeLow = pUuid->Gen.u32TimeLow;
+    u32TimeLow = RT_H2LE_U32(pUuid->Gen.u32TimeLow);
     pszString[ 0] = g_achDigits[(u32TimeLow >> 28)/*& 0xf*/];
     pszString[ 1] = g_achDigits[(u32TimeLow >> 24) & 0xf];
@@ -211,5 +212,5 @@
     pszString[ 7] = g_achDigits[(u32TimeLow/*>>0*/)& 0xf];
     pszString[ 8] = '-';
-    u = pUuid->Gen.u16TimeMid;
+    u = RT_H2LE_U16(pUuid->Gen.u16TimeMid);
     pszString[ 9] = g_achDigits[(u >> 12)/*& 0xf*/];
     pszString[10] = g_achDigits[(u >>  8) & 0xf];
@@ -217,5 +218,5 @@
     pszString[12] = g_achDigits[(u/*>>0*/)& 0xf];
     pszString[13] = '-';
-    u = pUuid->Gen.u16TimeHiAndVersion;
+    u = RT_H2LE_U16(pUuid->Gen.u16TimeHiAndVersion);
     pszString[14] = g_achDigits[(u >> 12)/*& 0xf*/];
     pszString[15] = g_achDigits[(u >>  8) & 0xf];
@@ -308,5 +309,5 @@
      */
 #define MY_TONUM(ch) (g_au8Digits[(ch) & 0xff])
-    pUuid->Gen.u32TimeLow = (uint32_t)MY_TONUM(pszString[ 0]) << 28
+    pUuid->Gen.u32TimeLow = RT_LE2H_U32((uint32_t)MY_TONUM(pszString[ 0]) << 28
                           | (uint32_t)MY_TONUM(pszString[ 1]) << 24
                           | (uint32_t)MY_TONUM(pszString[ 2]) << 20
@@ -315,14 +316,14 @@
                           | (uint32_t)MY_TONUM(pszString[ 5]) <<  8
                           | (uint32_t)MY_TONUM(pszString[ 6]) <<  4
-                          | (uint32_t)MY_TONUM(pszString[ 7]);
-    pUuid->Gen.u16TimeMid = (uint16_t)MY_TONUM(pszString[ 9]) << 12
+                          | (uint32_t)MY_TONUM(pszString[ 7]));
+    pUuid->Gen.u16TimeMid = RT_LE2H_U16((uint16_t)MY_TONUM(pszString[ 9]) << 12
                           | (uint16_t)MY_TONUM(pszString[10]) << 8
                           | (uint16_t)MY_TONUM(pszString[11]) << 4
-                          | (uint16_t)MY_TONUM(pszString[12]);
-    pUuid->Gen.u16TimeHiAndVersion =
+                          | (uint16_t)MY_TONUM(pszString[12]));
+    pUuid->Gen.u16TimeHiAndVersion = RT_LE2H_U16(
                             (uint16_t)MY_TONUM(pszString[14]) << 12
                           | (uint16_t)MY_TONUM(pszString[15]) << 8
                           | (uint16_t)MY_TONUM(pszString[16]) << 4
-                          | (uint16_t)MY_TONUM(pszString[17]);
+                          | (uint16_t)MY_TONUM(pszString[17]));
     pUuid->Gen.u8ClockSeqHiAndReserved =
                             (uint16_t)MY_TONUM(pszString[19]) << 4
@@ -373,5 +374,5 @@
      *             pUuid->Gen.au8Node[5]);
      */
-    u32TimeLow = pUuid->Gen.u32TimeLow;
+    u32TimeLow = RT_H2LE_U32(pUuid->Gen.u32TimeLow);
     pwszString[ 0] = g_achDigits[(u32TimeLow >> 28)/*& 0xf*/];
     pwszString[ 1] = g_achDigits[(u32TimeLow >> 24) & 0xf];
@@ -383,5 +384,5 @@
     pwszString[ 7] = g_achDigits[(u32TimeLow/*>>0*/)& 0xf];
     pwszString[ 8] = '-';
-    u = pUuid->Gen.u16TimeMid;
+    u = RT_H2LE_U16(pUuid->Gen.u16TimeMid);
     pwszString[ 9] = g_achDigits[(u >> 12)/*& 0xf*/];
     pwszString[10] = g_achDigits[(u >>  8) & 0xf];
@@ -389,5 +390,5 @@
     pwszString[12] = g_achDigits[(u/*>>0*/)& 0xf];
     pwszString[13] = '-';
-    u = pUuid->Gen.u16TimeHiAndVersion;
+    u = RT_H2LE_U16(pUuid->Gen.u16TimeHiAndVersion);
     pwszString[14] = g_achDigits[(u >> 12)/*& 0xf*/];
     pwszString[15] = g_achDigits[(u >>  8) & 0xf];
@@ -480,5 +481,5 @@
      */
 #define MY_TONUM(ch) (g_au8Digits[(ch) & 0xff])
-    pUuid->Gen.u32TimeLow = (uint32_t)MY_TONUM(pwszString[ 0]) << 28
+    pUuid->Gen.u32TimeLow = RT_LE2H_U32((uint32_t)MY_TONUM(pwszString[ 0]) << 28
                           | (uint32_t)MY_TONUM(pwszString[ 1]) << 24
                           | (uint32_t)MY_TONUM(pwszString[ 2]) << 20
@@ -487,14 +488,14 @@
                           | (uint32_t)MY_TONUM(pwszString[ 5]) <<  8
                           | (uint32_t)MY_TONUM(pwszString[ 6]) <<  4
-                          | (uint32_t)MY_TONUM(pwszString[ 7]);
-    pUuid->Gen.u16TimeMid = (uint16_t)MY_TONUM(pwszString[ 9]) << 12
+                          | (uint32_t)MY_TONUM(pwszString[ 7]));
+    pUuid->Gen.u16TimeMid = RT_LE2H_U16((uint16_t)MY_TONUM(pwszString[ 9]) << 12
                           | (uint16_t)MY_TONUM(pwszString[10]) << 8
                           | (uint16_t)MY_TONUM(pwszString[11]) << 4
-                          | (uint16_t)MY_TONUM(pwszString[12]);
-    pUuid->Gen.u16TimeHiAndVersion =
+                          | (uint16_t)MY_TONUM(pwszString[12]));
+    pUuid->Gen.u16TimeHiAndVersion = RT_LE2H_U16(
                             (uint16_t)MY_TONUM(pwszString[14]) << 12
                           | (uint16_t)MY_TONUM(pwszString[15]) << 8
                           | (uint16_t)MY_TONUM(pwszString[16]) << 4
-                          | (uint16_t)MY_TONUM(pwszString[17]);
+                          | (uint16_t)MY_TONUM(pwszString[17]));
     pUuid->Gen.u8ClockSeqHiAndReserved =
                             (uint16_t)MY_TONUM(pwszString[19]) << 4
