From 30e97c7e7abe1bc6c1795e1b6353138a639ef623 Mon Sep 17 00:00:00 2001 From: Thomas Schmitt Date: Thu, 19 May 2011 11:13:07 +0000 Subject: [PATCH] Mentioned the need to define uint32_t when including libisoburn.h --- libisoburn/libisoburn.h | 36 +++++++++++++++++++++++++++++++----- xorriso/xorriso_timestamp.h | 2 +- 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a/libisoburn/libisoburn.h b/libisoburn/libisoburn.h index f3a887b2..8d40f408 100644 --- a/libisoburn/libisoburn.h +++ b/libisoburn/libisoburn.h @@ -136,15 +136,33 @@ file itself: libisoburn/libisoburn.h . They shall link with -lisofs -lburn -lisoburn or with the .o files emerging from building those libraries from their sources. -Applications must use 64 bit off_t, e.g. on 32-bit GNU/Linux by defining +Applications must use 64 bit off_t. +E.g. on 32-bit GNU/Linux by defining #define _LARGEFILE_SOURCE #define _FILE_OFFSET_BITS 64 -or take special precautions to interface with the library by 64 bit integers -where above .h files prescribe off_t. Not to use 64 bit file i/o will keep -the application from producing and processing ISO images of more than 2 GB -size. +The minimum requirement is to interface with the library by 64 bit signed +integers where libisofs.h or libisoburn.h prescribe off_t. +Failure to do so may result in surprising malfunction or memory faults. + +Application files which include libisofs/libisofs.h or libisoburn/libisoburn.h +must provide definitions for uint32_t and uint8_t. +This can be achieved either: +- by using autotools which will define HAVE_STDINT_H or HAVE_INTTYPES_H + according to its ./configure tests, +- or by defining the macros HAVE_STDINT_H resp. HAVE_INTTYPES_H according + to the local situation, +- or by appropriately defining uint32_t and uint8_t by other means, + e.g. by including inttypes.h before including libisofs.h and libisoburn.h */ +#ifdef HAVE_STDINT_H +#include +#else +#ifdef HAVE_INTTYPES_H +#include +#endif +#endif + /* Important: If you add a public API function then add its name to file libisoburn/libisoburn.ver @@ -878,6 +896,14 @@ int isoburn_ropt_set_displacement(struct isoburn_read_opts *o, int isoburn_ropt_get_displacement(struct isoburn_read_opts *o, uint32_t *displacement, int *displacement_sign); +/* If you get here because of a compilation error like + + /usr/include/libisoburn/libisoburn.h:895: error: + expected declaration specifiers or '...' before 'uint32_t' + + then see above paragraph "Application Constraints" about the definition + of uint32_t. +*/ /** After calling function isoburn_read_image() there are informations diff --git a/xorriso/xorriso_timestamp.h b/xorriso/xorriso_timestamp.h index f4f8f7c4..85f84f1a 100644 --- a/xorriso/xorriso_timestamp.h +++ b/xorriso/xorriso_timestamp.h @@ -1 +1 @@ -#define Xorriso_timestamP "2011.05.18.063511" +#define Xorriso_timestamP "2011.05.19.111229"