diff options
Diffstat (limited to 'libarchive/archive_platform.h')
-rw-r--r-- | libarchive/archive_platform.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/libarchive/archive_platform.h b/libarchive/archive_platform.h index ce2f482ba042..b06c3cd28fa6 100644 --- a/libarchive/archive_platform.h +++ b/libarchive/archive_platform.h @@ -66,15 +66,18 @@ * headers as required. */ -/* Get a real definition for __FBSDID if we can */ +/* Get a real definition for __FBSDID or __RCSID if we can */ #if HAVE_SYS_CDEFS_H #include <sys/cdefs.h> #endif -/* If not, define it so as to avoid dangling semicolons. */ +/* If not, define them so as to avoid dangling semicolons. */ #ifndef __FBSDID #define __FBSDID(a) struct _undefined_hack #endif +#ifndef __RCSID +#define __RCSID(a) struct _undefined_hack +#endif /* Try to get standard C99-style integer type definitions. */ #if HAVE_INTTYPES_H @@ -114,6 +117,12 @@ #if !HAVE_DECL_UINT32_MAX #define UINT32_MAX (~(uint32_t)0) #endif +#if !HAVE_DECL_INT32_MAX +#define INT32_MAX ((int32_t)(UINT32_MAX >> 1)) +#endif +#if !HAVE_DECL_INT32_MIN +#define INT32_MIN ((int32_t)(~INT32_MAX)) +#endif #if !HAVE_DECL_UINT64_MAX #define UINT64_MAX (~(uint64_t)0) #endif @@ -123,6 +132,15 @@ #if !HAVE_DECL_INT64_MIN #define INT64_MIN ((int64_t)(~INT64_MAX)) #endif +#if !HAVE_DECL_UINTMAX_MAX +#define UINTMAX_MAX (~(uintmax_t)0) +#endif +#if !HAVE_DECL_INTMAX_MAX +#define INTMAX_MAX ((intmax_t)(UINTMAX_MAX >> 1)) +#endif +#if !HAVE_DECL_INTMAX_MIN +#define INTMAX_MIN ((intmax_t)(~INTMAX_MAX)) +#endif /* * If this platform has <sys/acl.h>, acl_create(), acl_init(), |