Ignore:
Timestamp:
Nov 6, 2005, 7:07:59 PM (17 years ago)
Author:
Sam Hocevar
Message:
  • fixed int size issues here and there
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/imlib/include/system.h

    r2 r7  
    2626  // so apps can find unlink
    2727  #include <unistd.h>
     28  #include <stdint.h>
    2829#endif
    2930
    3031
    31 #define short_swap(x) (((((unsigned short) (x)))<<8)|((((unsigned short) (x)))>>8))
     32#define short_swap(x) (((((uint16_t) (x)))<<8)|((((uint16_t) (x)))>>8))
    3233#define long_swap(x) \
    33    ((( ((unsigned long)(x)) )>>24)|((( ((unsigned long)(x)) )&0x00ff0000)>>8)| \
    34    ((( ((unsigned long)(x)) )&0x0000ff00)<<8)|(( ((unsigned long)(x)) )<<24))
     34   ((( ((uint32_t)(x)) )>>24)|((( ((uint32_t)(x)) )&0x00ff0000)>>8)| \
     35   ((( ((uint32_t)(x)) )&0x0000ff00)<<8)|(( ((uint32_t)(x)) )<<24))
    3536
    3637#if defined BIG_ENDIANS
    37 #define LONG int
     38#define LONG int32_t
    3839#define int_to_intel(x) short_swap(x)
    3940#define int_to_local(x) int_to_intel(x)
     
    4344#define long_to_local(x) long_to_intel(x)
    4445#else
    45 #define LONG long
     46#define LONG int32_t
    4647#define int_to_intel(x) (x)
    4748#define int_to_local(x) (x)
Note: See TracChangeset for help on using the changeset viewer.