| 1 | --- src/libical/icaltz-util.c.orig 2009-01-08 08:50:21.000000000 -0800 |
| 2 | +++ src/libical/icaltz-util.c 2009-05-30 20:24:36.000000000 -0700 |
| 3 | @@ -41,26 +41,26 @@ |
| 4 | # endif |
| 5 | # ifdef HAVE_ENDIAN_H |
| 6 | # include <endian.h> |
| 7 | # endif |
| 8 | +# if !defined(HAVE_BYTESWAP_H) && !defined(HAVE_SYS_ENDIAN_H) && !defined(HAVE_ENDIAN_H) |
| 9 | +# define bswap_16(x) (((x) << 8) & 0xff00) | (((x) >> 8 ) & 0xff) |
| 10 | +# define bswap_32(x) (((x) << 24) & 0xff000000) \ |
| 11 | + | (((x) << 8) & 0xff0000) \ |
| 12 | + | (((x) >> 8) & 0xff00) \ |
| 13 | + | (((x) >> 24) & 0xff ) |
| 14 | +# define bswap_64(x) ((((x) & 0xff00000000000000ull) >> 56) \ |
| 15 | + | (((x) & 0x00ff000000000000ull) >> 40) \ |
| 16 | + | (((x) & 0x0000ff0000000000ull) >> 24) \ |
| 17 | + | (((x) & 0x000000ff00000000ull) >> 8) \ |
| 18 | + | (((x) & 0x00000000ff000000ull) << 8) \ |
| 19 | + | (((x) & 0x0000000000ff0000ull) << 24) \ |
| 20 | + | (((x) & 0x000000000000ff00ull) << 40) \ |
| 21 | + | (((x) & 0x00000000000000ffull) << 56)) |
| 22 | +# endif |
| 23 | #endif |
| 24 | |
| 25 | #ifdef WIN32 |
| 26 | -#if !defined(HAVE_BYTESWAP_H) && !defined(HAVE_SYS_ENDIAN_H) && !defined(HAVE_ENDIAN_H) |
| 27 | -#define bswap_16(x) (((x) << 8) & 0xff00) | (((x) >> 8 ) & 0xff) |
| 28 | -#define bswap_32(x) (((x) << 24) & 0xff000000) \ |
| 29 | - | (((x) << 8) & 0xff0000) \ |
| 30 | - | (((x) >> 8) & 0xff00) \ |
| 31 | - | (((x) >> 24) & 0xff ) |
| 32 | -#define bswap_64(x) ((((x) & 0xff00000000000000ull) >> 56) \ |
| 33 | - | (((x) & 0x00ff000000000000ull) >> 40) \ |
| 34 | - | (((x) & 0x0000ff0000000000ull) >> 24) \ |
| 35 | - | (((x) & 0x000000ff00000000ull) >> 8) \ |
| 36 | - | (((x) & 0x00000000ff000000ull) << 8) \ |
| 37 | - | (((x) & 0x0000000000ff0000ull) << 24) \ |
| 38 | - | (((x) & 0x000000000000ff00ull) << 40) \ |
| 39 | - | (((x) & 0x00000000000000ffull) << 56)) |
| 40 | -#endif |
| 41 | #include <io.h> |
| 42 | #endif |
| 43 | |
| 44 | #ifndef PATH_MAX |