Show
Ignore:
Timestamp:
10/24/04 19:50:54 (9 years ago)
Author:
robert
Message:

From Fred Mammond, fixes for x86_64 build

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgPlugins/flt/ReaderWriterATTR.cpp

    r2501 r3527  
    5050typedef signed short    int16; 
    5151typedef unsigned short  uint16; 
    52 typedef signed long     int32; 
    53 typedef unsigned long   uint32; 
     52typedef signed int      int32; 
     53typedef unsigned int    uint32; 
    5454typedef float           float32; 
    5555typedef double          float64; 
     
    7676    else if (nSrc == 4) 
    7777    { 
    78         long tmp1; 
    79         tmp1 = *(long *)pSrc; 
     78        uint32 tmp1; 
     79        tmp1 = *(uint32 *)pSrc; 
    8080        tmp1 = (tmp1 << 24) | ((tmp1 << 8) & 0xff0000) | ((tmp1 >> 8) & 0xff00) | ((tmp1 >> 24) & 0xff); 
    81         *(long *)pDst = tmp1; 
     81        *(uint32 *)pDst = tmp1; 
    8282    } 
    8383    else if (nSrc == 8) 
    8484    { 
    85         long tmp1, tmp2; 
    86         tmp1 = *(long *)pSrc; 
    87         tmp2 = *(1 + (long *)pSrc); 
     85        uint32 tmp1, tmp2; 
     86        tmp1 = *(uint32 *)pSrc; 
     87        tmp2 = *(1 + (uint32 *)pSrc); 
    8888        tmp1 = (tmp1 << 24) | ((tmp1 << 8) & 0xff0000) | ((tmp1 >> 8) & 0xff00) | ((tmp1 >> 24) & 0xff); 
    8989        tmp2 = (tmp2 << 24) | ((tmp2 << 8) & 0xff0000) | ((tmp2 >> 8) & 0xff00) | ((tmp2 >> 24) & 0xff); 
    90         *(long *)pDst = tmp2; 
    91         *(1 + (long *)pDst) = tmp1; 
     90        *(uint32 *)pDst = tmp2; 
     91        *(1 + (uint32 *)pDst) = tmp1; 
    9292    } 
    9393}