# HG changeset patch # User Carl Byington # Date 1217962349 25200 # Node ID 631d02d30a1c67079c871c95cc85ff56cf5636ed # Parent 156213d65958e462f117643800102c316b94a4f5 More fixes for 32/64 bit portability on big endian ppc. diff -r 156213d65958 -r 631d02d30a1c ChangeLog --- a/ChangeLog Tue Aug 05 10:11:41 2008 -0700 +++ b/ChangeLog Tue Aug 05 11:52:29 2008 -0700 @@ -1,3 +1,7 @@ +LibPST 0.6.17 (2008-08-05) +=============================== + * More fixes for 32/64 bit portability on big endian ppc. + LibPST 0.6.16 (2008-08-05) =============================== * Use inttypes.h for portable printing of 64 bit items. diff -r 156213d65958 -r 631d02d30a1c NEWS --- a/NEWS Tue Aug 05 10:11:41 2008 -0700 +++ b/NEWS Tue Aug 05 11:52:29 2008 -0700 @@ -1,3 +1,4 @@ +0.6.17 2008-08-05 More fixes for 32/64 bit portability on big endian ppc. 0.6.16 2008-08-05 Use inttypes.h for portable printing of 64 bit items. 0.6.15 2008-07-30 Fix file handle leak in error case, missing length on lz decompression. 0.6.14 2008-06-15 Fix my mistake in debian packaging. diff -r 156213d65958 -r 631d02d30a1c configure.in --- a/configure.in Tue Aug 05 10:11:41 2008 -0700 +++ b/configure.in Tue Aug 05 11:52:29 2008 -0700 @@ -1,5 +1,5 @@ AC_PREREQ(2.59) -AC_INIT(libpst,0.6.16,carl@five-ten-sg.com) +AC_INIT(libpst,0.6.17,carl@five-ten-sg.com) AC_CONFIG_SRCDIR([config.h.in]) AC_CONFIG_HEADER([config.h]) diff -r 156213d65958 -r 631d02d30a1c libpst.spec.in --- a/libpst.spec.in Tue Aug 05 10:11:41 2008 -0700 +++ b/libpst.spec.in Tue Aug 05 11:52:29 2008 -0700 @@ -47,6 +47,9 @@ %changelog +* Tue Aug 05 2008 Carl Byington - 0.6.17-1 +- More fixes for 32/64 bit portability on big endian ppc. + * Tue Aug 05 2008 Carl Byington - 0.6.16-1 - Use inttypes.h for portable printing of 64 bit items. diff -r 156213d65958 -r 631d02d30a1c src/debug.c --- a/src/debug.c Tue Aug 05 10:11:41 2008 -0700 +++ b/src/debug.c Tue Aug 05 11:52:29 2008 -0700 @@ -55,7 +55,7 @@ if (col == -1) col = NUM_COL; fprintf(out, "\n"); while (off < size) { - fprintf(out, "%06X\t:", off+delta); + fprintf(out, "%06"PRIx64"\t:", (uint64_t)(off+delta)); toff = off; while (count < col && off < size) { fprintf(out, "%02hhx ", (unsigned char)buf[off]); diff -r 156213d65958 -r 631d02d30a1c src/libpst.h --- a/src/libpst.h Tue Aug 05 10:11:41 2008 -0700 +++ b/src/libpst.h Tue Aug 05 11:52:29 2008 -0700 @@ -33,14 +33,14 @@ #if BYTE_ORDER == BIG_ENDIAN # define LE64_CPU(x) \ - x = ((((x) & 0xff00000000000000) >> 56) | \ - (((x) & 0x00ff000000000000) >> 40) | \ - (((x) & 0x0000ff0000000000) >> 24) | \ - (((x) & 0x000000ff00000000) >> 8 ) | \ - (((x) & 0x00000000ff000000) << 8 ) | \ - (((x) & 0x0000000000ff0000) << 24) | \ - (((x) & 0x000000000000ff00) << 40) | \ - (((x) & 0x00000000000000ff) << 56)); + x = ((((x) & UINT64_C(0xff00000000000000)) >> 56) | \ + (((x) & UINT64_C(0x00ff000000000000)) >> 40) | \ + (((x) & UINT64_C(0x0000ff0000000000)) >> 24) | \ + (((x) & UINT64_C(0x000000ff00000000)) >> 8 ) | \ + (((x) & UINT64_C(0x00000000ff000000)) << 8 ) | \ + (((x) & UINT64_C(0x0000000000ff0000)) << 24) | \ + (((x) & UINT64_C(0x000000000000ff00)) << 40) | \ + (((x) & UINT64_C(0x00000000000000ff)) << 56)); # define LE32_CPU(x) \ x = ((((x) & 0xff000000) >> 24) | \ (((x) & 0x00ff0000) >> 8 ) | \