# HG changeset patch # User mas01cr # Date 1191598714 0 # Node ID 43722a0ba717802980928903b68f361a3041cf6a # Parent 428c210cb9f482f6654ba4c0fca6084b92b6438c Attempt to make audioDB files 32/64 neutral. Doing so by turning all the (logically) size_t and off_t elements into unsigneds is a hack, it has to be admitted. There will still be endian dependencies too, but maybe this is enough to make audioDB files portable between x86 and x86-64. diff -r 428c210cb9f4 -r 43722a0ba717 audioDB.h --- a/audioDB.h Fri Oct 05 15:05:07 2007 +0000 +++ b/audioDB.h Fri Oct 05 15:38:34 2007 +0000 @@ -85,19 +85,23 @@ using namespace std; -// 64 byte header typedef struct dbTableHeader{ unsigned magic; unsigned version; unsigned numFiles; unsigned dim; unsigned flags; - size_t length; - size_t fileTableOffset; - size_t trackTableOffset; - size_t dataOffset; - size_t l2normTableOffset; - size_t timesTableOffset; + // FIXME: these lengths and offsets should be size_t or off_t, but + // that causes this header (and hence audioDB files) to be + // unportable between 32 and 64-bit architectures. Making them + // unsigned isn't the real answer, but it works around the problem. + // -- CSR, 2007-10-05 + unsigned length; + unsigned fileTableOffset; + unsigned trackTableOffset; + unsigned dataOffset; + unsigned l2normTableOffset; + unsigned timesTableOffset; } dbTableHeaderT, *dbTableHeaderPtr;