svn commit: r201097 - head/lib/libarchive

Tim Kientzle kientzle at FreeBSD.org
Mon Dec 28 02:45:57 UTC 2009


Author: kientzle
Date: Mon Dec 28 02:45:56 2009
New Revision: 201097
URL: http://svn.freebsd.org/changeset/base/201097

Log:
  Portability fixes.

Modified:
  head/lib/libarchive/archive.h

Modified: head/lib/libarchive/archive.h
==============================================================================
--- head/lib/libarchive/archive.h	Mon Dec 28 02:41:27 2009	(r201096)
+++ head/lib/libarchive/archive.h	Mon Dec 28 02:45:56 2009	(r201097)
@@ -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


More information about the svn-src-all mailing list