comparison src/libpst.h @ 122:bdb38b434c0a

more changes from Fridrich Strba to avoid installing our config.h
author Carl Byington <carl@five-ten-sg.com>
date Mon, 02 Feb 2009 21:55:48 -0800
parents 6395ced2b8b2
children ab2a11e72250
comparison
equal deleted inserted replaced
121:8399ef94c11b 122:bdb38b434c0a
8 // Dave Smith - davesmith@users.sourceforge.net 8 // Dave Smith - davesmith@users.sourceforge.net
9 9
10 #ifndef LIBPST_H 10 #ifndef LIBPST_H
11 #define LIBPST_H 11 #define LIBPST_H
12 12
13 // According to Jan Wolter, sys/param.h is the most portable source of endian
14 // information on UNIX systems. see http://www.unixpapa.com/incnote/byteorder.html
15 #ifdef _WIN32
16 #define BYTE_ORDER LITTLE_ENDIAN
17 #else
18 #ifdef HAVE_SYS_PARAM_H
19 #include <sys/param.h>
20 #endif
21 #endif // defined _WIN32
22 13
23 #if BYTE_ORDER == BIG_ENDIAN 14 #if BYTE_ORDER == BIG_ENDIAN
24 # define LE64_CPU(x) \ 15 # define LE64_CPU(x) \
25 x = ((((x) & UINT64_C(0xff00000000000000)) >> 56) | \ 16 x = ((((x) & UINT64_C(0xff00000000000000)) >> 56) | \
26 (((x) & UINT64_C(0x00ff000000000000)) >> 40) | \ 17 (((x) & UINT64_C(0x00ff000000000000)) >> 40) | \