diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/common.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/common.h b/include/common.h index 88b67e5..d0c4146 100644 --- a/include/common.h +++ b/include/common.h @@ -25,6 +25,8 @@ #include <string.h> #include <fcntl.h> #include <errno.h> +#include <features.h> +#include <inttypes.h> #include "version.h" #ifndef PROGRAM_NAME @@ -48,6 +50,15 @@ extern "C" { #define O_CLOEXEC 0 #endif +/* define a print format specifier for off_t */ +#ifdef __USE_FILE_OFFSET64 +#define PRIxoff_t PRIx64 +#define PRIdoff_t PRId64 +#else +#define PRIxoff_t "l"PRIx32 +#define PRIdoff_t "l"PRId32 +#endif + /* Verbose messages */ #define bareverbose(verbose, fmt, ...) do { \ if (verbose) \ |