]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Select stdint.h or inttypes.h in archive.h
authorBrad King <brad.king@kitware.com>
Wed, 11 Nov 2009 14:20:01 +0000 (09:20 -0500)
committerBrad King <brad.king@kitware.com>
Wed, 11 Nov 2009 14:20:01 +0000 (09:20 -0500)
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

index ce6edbb3f5693eae2a1a1aca64d80531c950011d..fa855f33e5a59c6c3677ba78aeb73ca5f562fc7d 100644 (file)
  * 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 * */