From 042c735c81788cf3a89bd8fcd60111c93149de3b Mon Sep 17 00:00:00 2001 From: Tim Kientzle Date: Mon, 28 Dec 2009 02:45:56 +0000 Subject: [PATCH] Portability fixes. --- lib/libarchive/archive.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/lib/libarchive/archive.h b/lib/libarchive/archive.h index f438f22b3135..ee7e5abe5023 100644 --- a/lib/libarchive/archive.h +++ b/lib/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 * */ @@ -53,8 +57,13 @@ # else # define __LA_SSIZE_T long # endif -#define __LA_UID_T unsigned int -#define __LA_GID_T unsigned int +# if defined(__BORLANDC__) +# define __LA_UID_T uid_t +# define __LA_GID_T gid_t +# else +# define __LA_UID_T short +# define __LA_GID_T short +# endif #else #include /* ssize_t, uid_t, and gid_t */ #define __LA_INT64_T int64_t