summaryrefslogtreecommitdiffstats
path: root/lib/libarchive
diff options
context:
space:
mode:
authorkientzle <kientzle@FreeBSD.org>2009-12-28 02:45:56 +0000
committerkientzle <kientzle@FreeBSD.org>2009-12-28 02:45:56 +0000
commitcd7df27c58c7c91d2f890a7ed45bb6f9db3ea5ca (patch)
treedfbfd5f14e632ed888e526f4a2bfbb063000c01c /lib/libarchive
parent5b4a30a49068635371c5ad99110590ac6c7a54c0 (diff)
downloadFreeBSD-src-cd7df27c58c7c91d2f890a7ed45bb6f9db3ea5ca.zip
FreeBSD-src-cd7df27c58c7c91d2f890a7ed45bb6f9db3ea5ca.tar.gz
Portability fixes.
Diffstat (limited to 'lib/libarchive')
-rw-r--r--lib/libarchive/archive.h19
1 files changed, 14 insertions, 5 deletions
diff --git a/lib/libarchive/archive.h b/lib/libarchive/archive.h
index f438f22..ee7e5ab 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 <stdint.h>
+#elif !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__)
+# define __LA_STDINT_H <inttypes.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h> /* 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 <inttypes.h> /* int64_t, etc. */
+#ifdef __LA_STDINT_H
+# include __LA_STDINT_H /* int64_t, etc. */
#endif
#include <stdio.h> /* 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 <unistd.h> /* ssize_t, uid_t, and gid_t */
#define __LA_INT64_T int64_t
OpenPOWER on IntegriCloud