From: Jan P. <pa...@pi...> - 2004-03-19 15:54:53
|
Joerg, unless you equip libexif with definitions of uint16_t, uint32_t and int32_t, this "simple" change will break compilability for many platforms. E.g. MSVC does not know such types (is it in some latest C++ standard?). --- Jan > On Thu, Mar 18, 2004 at 03:45:52PM +0100, Hans Ulrich Niedermann wrote: > > > > Definitely. For formats of a fixed size, one should always use > > u?int(8|16|32)_t. If required, ship a _stdint.h and do some automake > > and #ifdef magic. > > I've looked into exif-utils.h and did small changes to: > > typedef char ExifByte; /* 1 byte */ > typedef char * ExifAscii; > typedef uint16_t ExifShort; /* 2 bytes */ > typedef uint32_t ExifLong; /* 4 bytes */ > typedef struct {ExifLong numerator; ExifLong denominator;} ExifRational; > typedef char ExifUndefined; /* 1 byte */ > typedef int32_t ExifSLong; /* 4 bytes */ > typedef struct {ExifSLong numerator; ExifSLong denominator;} > ExifSRational; > > > Now, all problems should disappear. Only some printf-Statements, which > need format modifier for eg ExifLong, are throwing warnings. Are there > any specifier for uint32_t which can be used with printf and friends? > > Joerg |