Index: /OpenSceneGraph/trunk/src/osg/dxtctool.cpp
===================================================================
--- /OpenSceneGraph/trunk/src/osg/dxtctool.cpp (revision 3300)
+++ /OpenSceneGraph/trunk/src/osg/dxtctool.cpp (revision 3301)
@@ -79,5 +79,5 @@
 {
     // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT1;
-    __int8 * const pPixels = (__int8 * const) m_pPixels;
+    dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels;
 
     if (m_Height == 2)
@@ -102,16 +102,16 @@
 {
     // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT3;
-    // __int8 * const pPixels = (__int8 * const) m_pPixels;
+    // dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels;
 
     if (m_Height == 2)
         for (size_t j = 0; j < (m_Width + 3) / 4; ++j) {
-            BVF_Alpha_DXT3_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3));
-            BVF_Color_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3));
+            BVF_Alpha_DXT3_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3));
+            BVF_Color_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3));
         }
 
     if (m_Height == 4)
         for (size_t j = 0; j < (m_Width + 3) / 4; ++j) {
-            BVF_Alpha_DXT3_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3));
-            BVF_Color_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3));
+            BVF_Alpha_DXT3_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3));
+            BVF_Color_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT3 + BSIZE_ALPHA_DXT3));
         }
 
@@ -121,6 +121,6 @@
                 const size_t TargetRow = ((m_Height + 3) / 4) - (i + 1);
                 BVF_Alpha_DXT3(GetBlock(i, j, BSIZE_DXT3), GetBlock(TargetRow, j, BSIZE_DXT3));
-                BVF_Color(((__int8 * const) GetBlock(i, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3, 
-                          ((__int8 * const) GetBlock(TargetRow, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3);
+                BVF_Color(((dxtc_int8 * const) GetBlock(i, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3, 
+                          ((dxtc_int8 * const) GetBlock(TargetRow, j, BSIZE_DXT3)) + BSIZE_ALPHA_DXT3);
             }
 }
@@ -131,16 +131,16 @@
 {
     // const size_t Size = ((m_Width + 3) / 4) * ((m_Height + 3) / 4) * BSIZE_DXT5;
-    // __int8 * const pPixels = (__int8 * const) m_pPixels;
+    // dxtc_int8 * const pPixels = (dxtc_int8 * const) m_pPixels;
 
     if (m_Height == 2)
         for (size_t j = 0; j < (m_Width + 3) / 4; ++j) {
-            BVF_Alpha_DXT5_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5));
-            BVF_Color_H2(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5));
+            BVF_Alpha_DXT5_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5));
+            BVF_Color_H2(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5));
         }
 
     if (m_Height == 4)
         for (size_t j = 0; j < (m_Width + 3) / 4; ++j) {
-            BVF_Alpha_DXT5_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5));
-            BVF_Color_H4(((__int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5));
+            BVF_Alpha_DXT5_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5));
+            BVF_Color_H4(((dxtc_int8 * const) m_pPixels) + (j * BSIZE_DXT5 + BSIZE_ALPHA_DXT5));
         }
 
@@ -150,6 +150,6 @@
                 const size_t TargetRow = ((m_Height + 3) / 4) - (i + 1);
                 BVF_Alpha_DXT5(GetBlock(i, j, BSIZE_DXT5), GetBlock(TargetRow, j, BSIZE_DXT5));
-                BVF_Color(((__int8 * const) GetBlock(i, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5, 
-                          ((__int8 * const) GetBlock(TargetRow, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5);
+                BVF_Color(((dxtc_int8 * const) GetBlock(i, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5, 
+                          ((dxtc_int8 * const) GetBlock(TargetRow, j, BSIZE_DXT5)) + BSIZE_ALPHA_DXT5);
             }
 }
Index: /OpenSceneGraph/trunk/src/osg/dxtctool.h
===================================================================
--- /OpenSceneGraph/trunk/src/osg/dxtctool.h (revision 3300)
+++ /OpenSceneGraph/trunk/src/osg/dxtctool.h (revision 3301)
@@ -44,10 +44,23 @@
 #include <osg/Texture>
 
-#if !defined(_MSC_VER)
-
-    typedef char        __int8;
-    typedef short       __int16;
-    typedef int         __int32;
-    typedef long long   __int64;
+#if defined(_MSC_VER)
+
+    typedef __int8  dxtc_int8;
+    typedef __int16 dxtc_int16;
+    typedef __int32 dxtc_int32;
+    typedef __int64 dxtc_int64;
+
+    #define HEX_0x000000000000FFFF 0x000000000000FFFF
+    #define HEX_0x000000000FFF0000 0x000000000FFF0000
+    #define HEX_0x000000FFF0000000 0x000000FFF0000000
+    #define HEX_0x000FFF0000000000 0x000FFF0000000000
+    #define HEX_0xFFF0000000000000 0xFFF0000000000000
+
+#else
+
+    typedef char        dxtc_int8;
+    typedef short       dxtc_int16;
+    typedef int         dxtc_int32;
+    typedef long long   dxtc_int64;
 
     #define HEX_0x000000000000FFFF 0x000000000000FFFFll
@@ -56,12 +69,4 @@
     #define HEX_0x000FFF0000000000 0x000FFF0000000000ll
     #define HEX_0xFFF0000000000000 0xFFF0000000000000ll
-
-#else
-
-    #define HEX_0x000000000000FFFF 0x000000000000FFFF
-    #define HEX_0x000000000FFF0000 0x000000000FFF0000
-    #define HEX_0x000000FFF0000000 0x000000FFF0000000
-    #define HEX_0x000FFF0000000000 0x000FFF0000000000
-    #define HEX_0xFFF0000000000000 0xFFF0000000000000
 
 #endif
@@ -170,5 +175,5 @@
 inline void dxtc_pixels::BVF_Color_H2(void * const pBlock) const {
     // Swap the two first row of pixels
-    __int8 * const pP = ((__int8 * const) pBlock) + 4;
+    dxtc_int8 * const pP = ((dxtc_int8 * const) pBlock) + 4;
 
     std::swap(pP[0], pP[1]);
@@ -178,5 +183,5 @@
 inline void dxtc_pixels::BVF_Color_H4(void * const pBlock) const {
     // Swap the the first row of pixels with the last one, then the 2 middle row of pixels
-    __int8 * const pP = ((__int8 * const) pBlock) + 4;
+    dxtc_int8 * const pP = ((dxtc_int8 * const) pBlock) + 4;
 
     std::swap(pP[0], pP[3]);
@@ -187,12 +192,12 @@
 inline void dxtc_pixels::BVF_Color(void * const pBlock1, void * const pBlock2) const {
     // Swap the "2 colors" header (32bits each header)
-    __int32 * const pHdr1 = (__int32 * const) pBlock1;
-    __int32 * const pHdr2 = (__int32 * const) pBlock2;
+    dxtc_int32 * const pHdr1 = (dxtc_int32 * const) pBlock1;
+    dxtc_int32 * const pHdr2 = (dxtc_int32 * const) pBlock2;
 
     std::swap(* pHdr1, * pHdr2);
 
     // Now swap the pixel values
-    __int8 * const pP1 = ((__int8 * const) pBlock1) + 4;
-    __int8 * const pP2 = ((__int8 * const) pBlock2) + 4;
+    dxtc_int8 * const pP1 = ((dxtc_int8 * const) pBlock1) + 4;
+    dxtc_int8 * const pP2 = ((dxtc_int8 * const) pBlock2) + 4;
 
     std::swap(pP1[0], pP2[3]);
@@ -205,5 +210,5 @@
 inline void dxtc_pixels::BVF_Alpha_DXT3_H2(void * const pBlock) const {
     // Swap the two first row of pixels
-    __int16 * const pP = (__int16 * const) pBlock;
+    dxtc_int16 * const pP = (dxtc_int16 * const) pBlock;
 
     std::swap(pP[0], pP[1]);
@@ -213,5 +218,5 @@
 inline void dxtc_pixels::BVF_Alpha_DXT3_H4(void * const pBlock) const {
     // Swap the the first row of pixels with the last one, then the 2 middle row of pixels
-    __int16 * const pP = (__int16 * const) pBlock;
+    dxtc_int16 * const pP = (dxtc_int16 * const) pBlock;
 
     std::swap(pP[0], pP[3]);
@@ -222,6 +227,6 @@
 inline void dxtc_pixels::BVF_Alpha_DXT3(void * const pBlock1, void * const pBlock2) const {
     // Swap all the pixel values
-    __int16 * const pP1 = (__int16 * const) pBlock1;
-    __int16 * const pP2 = (__int16 * const) pBlock2;
+    dxtc_int16 * const pP1 = (dxtc_int16 * const) pBlock1;
+    dxtc_int16 * const pP2 = (dxtc_int16 * const) pBlock2;
 
     std::swap(pP1[0], pP2[3]);
@@ -234,7 +239,7 @@
 inline void dxtc_pixels::BVF_Alpha_DXT5_H2(void * const pBlock) const {
     // Swap the two first row of pixels (kinda tricky with DXT5 unaligned encoding)
-    __int32 * const pP = (__int32 * const) (((__int8 * const) pBlock) + 2);
-
-    __int32 TmpDWord = (pP[0] & 0xFF000000);
+    dxtc_int32 * const pP = (dxtc_int32 * const) (((dxtc_int8 * const) pBlock) + 2);
+
+    dxtc_int32 TmpDWord = (pP[0] & 0xFF000000);
     TmpDWord |=    (pP[0] & 0x00000FFF) << 12;
     TmpDWord |= (pP[0] & 0x00FFF000) >> 12;
@@ -249,7 +254,7 @@
 inline void dxtc_pixels::BVF_Alpha_DXT5_H4(void * const pBlock) const {
     // Swap the the first row of pixels with the last one, then the 2 middle row of pixels (tricky again)
-    __int64 * const pB = (__int64 * const) pBlock;
-
-    __int64 TmpQWord = (pB[0] & HEX_0x000000000000FFFF);
+    dxtc_int64 * const pB = (dxtc_int64 * const) pBlock;
+
+    dxtc_int64 TmpQWord = (pB[0] & HEX_0x000000000000FFFF);
     TmpQWord |= (pB[0] & HEX_0x000000000FFF0000) << 36;
     TmpQWord |= (pB[0] & HEX_0x000000FFF0000000) << 12;
@@ -262,8 +267,8 @@
 inline void dxtc_pixels::BVF_Alpha_DXT5(void * const pBlock1, void * const pBlock2) const {
     // Swap all the pixel values (same trick for DXT5)
-    __int64 * const pB1 = (__int64 * const) pBlock1;
-    __int64 * const pB2 = (__int64 * const) pBlock2;
-
-    __int64 TmpQWord1 = (pB1[0] & HEX_0x000000000000FFFF);
+    dxtc_int64 * const pB1 = (dxtc_int64 * const) pBlock1;
+    dxtc_int64 * const pB2 = (dxtc_int64 * const) pBlock2;
+
+    dxtc_int64 TmpQWord1 = (pB1[0] & HEX_0x000000000000FFFF);
     TmpQWord1 |= (pB1[0] & HEX_0x000000000FFF0000) << 36;
     TmpQWord1 |= (pB1[0] & HEX_0x000000FFF0000000) << 12;
@@ -271,5 +276,5 @@
     TmpQWord1 |= (pB1[0] & HEX_0xFFF0000000000000) >> 36;
 
-    __int64 TmpQWord2 = (pB2[0] & HEX_0x000000000000FFFF);
+    dxtc_int64 TmpQWord2 = (pB2[0] & HEX_0x000000000000FFFF);
     TmpQWord2 |= (pB2[0] & HEX_0x000000000FFF0000) << 36;
     TmpQWord2 |= (pB2[0] & HEX_0x000000FFF0000000) << 12;
@@ -283,5 +288,5 @@
 
 inline void * dxtc_pixels::GetBlock(size_t i, size_t j, size_t BlockSize) const {
-    const __int8 * pPixels = (const __int8 *) m_pPixels;
+    const dxtc_int8 * pPixels = (const dxtc_int8 *) m_pPixels;
 
     return (void *) (pPixels + i * ((m_Width + 3) / 4) * BlockSize + j * BlockSize);
