From f828fbc1e007368db820f439ec093e934f1b8618 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 Nov 2009 09:20:01 -0500 Subject: [PATCH] Select stdint.h or inttypes.h in archive.h Since archive.h cannot use try-compile results it must memorize the availability of integer type headers for every platform. We split the decision of which header to use out from the actual #include line by defining __LA_STDINT_H to the chosen header. SVN-Revision: 1639 --- libarchive/archive.h | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/libarchive/archive.h b/libarchive/archive.h index ce6edbb3f..fa855f33e 100644 --- a/libarchive/archive.h +++ b/libarchive/archive.h @@ -35,12 +35,16 @@ * this header! If you must conditionalize, use predefined compiler and/or * platform macros. */ +#if defined(__BORLANDC__) && __BORLANDC__ >= 0x560 +# define __LA_STDINT_H +#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__) +# define __LA_STDINT_H +#endif #include #include /* Linux requires this for off_t */ -#if !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) -/* Header unavailable on Watcom C or MS Visual C++ or SFU. */ -#include /* int64_t, etc. */ +#ifdef __LA_STDINT_H +# include __LA_STDINT_H /* int64_t, etc. */ #endif #include /* For FILE * */ -- 2.47.3