Mercurial > hg > audiodb
changeset 398:443c2939e84b api-inversion
off_t in ABI structures is a bad thing.
Why? Because its size depends on the compile-time environment. It was
OK, ish, when the only off_t was at the end of the struct, because then
we only stomped on uninitialized bits of memory; it is terrible when
there is more than one off_t kind of field. Use uint64_t for those
fields instead.
author | mas01cr |
---|---|
date | Thu, 27 Nov 2008 15:19:47 +0000 |
parents | fb633cac9c3a |
children | a65b31660804 |
files | audioDB_API.h |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/audioDB_API.h Thu Nov 27 15:19:45 2008 +0000 +++ b/audioDB_API.h Thu Nov 27 15:19:47 2008 +0000 @@ -1,4 +1,6 @@ #include <stdbool.h> +#include <stdint.h> + /* for API questions contact * Christophe Rhodes c.rhodes@gold.ac.uk * Ian Knopke mas01ik@gold.ac.uk, ian.knopke@gmail.com */ @@ -40,11 +42,11 @@ struct adbstatus { unsigned int numFiles; unsigned int dim; - unsigned int length; unsigned int dudCount; unsigned int nullCount; unsigned int flags; - off_t data_region_size; + uint64_t length; + uint64_t data_region_size; }; typedef struct adbstatus adb_status_t, *adb_status_ptr;