Ignore:
Timestamp:
Nov 10, 2005, 9:41:13 PM (18 years ago)
Author:
Sam Hocevar
Message:
  • absolute shitloads of 64 bit fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/net/include/endian.hpp

    r2 r17  
    1919
    2020#ifdef BIGUNS
    21 #define swap_short(x) (((((unsigned short) (x)))<<8)|((((unsigned short) (x)))>>8))
    22 #define swap_long(x) \
    23    ((( ((unsigned long)(x)) )>>24)|((( ((unsigned long)(x)) )&0x00ff0000)>>8)| \
    24    ((( ((unsigned long)(x)) )&0x0000ff00)<<8)|(( ((unsigned long)(x)) )<<24))
     21#define swap_uint16(x) (((((uint16_t) (x)))<<8)|((((uint16_t) (x)))>>8))
     22#define swap_uint32(x) \
     23   ((( ((uint32_t)(x)) )>>24)|((( ((uint32_t)(x)) )&0x00ff0000)>>8)| \
     24   ((( ((uint32_t)(x)) )&0x0000ff00)<<8)|(( ((uint32_t)(x)) )<<24))
    2525#else
    26 #define swap_short(x) (x)
    27 #define swap_long(x) (x)
     26#define swap_uint16(x) (x)
     27#define swap_uint32(x) (x)
    2828
    2929#endif
    30 
    31 #define uchar unsigned char
    3230
    3331#endif
Note: See TracChangeset for help on using the changeset viewer.