changeset 114:942e9ab50e9c

Towards portability of audioDB databases, step 1: explicitly request 32-bit fields, not just "unsigned".
author mas01cr
date Fri, 12 Oct 2007 09:16:43 +0000
parents 6735281de562
children 97f4ff699d7c fce73e4afa15
files audioDB.h
diffstat 1 files changed, 14 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/audioDB.h	Fri Oct 12 09:16:11 2007 +0000
+++ b/audioDB.h	Fri Oct 12 09:16:43 2007 +0000
@@ -86,22 +86,23 @@
 using namespace std;
 
 typedef struct dbTableHeader{
-  unsigned magic;
-  unsigned version;
-  unsigned numFiles;
-  unsigned dim;
-  unsigned flags;
+  uint32_t magic;
+  uint32_t version;
+  uint32_t numFiles;
+  uint32_t dim;
+  uint32_t flags;
   // 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;
+  // uint32_t isn't the real answer, as it means we won't be able to
+  // scale to really large collections easily but it works around the
+  // problem.  -- CSR, 2007-10-05
+  uint32_t length;
+  uint32_t fileTableOffset;
+  uint32_t trackTableOffset;
+  uint32_t dataOffset;
+  uint32_t l2normTableOffset;
+  uint32_t timesTableOffset;
 } dbTableHeaderT, *dbTableHeaderPtr;