summaryrefslogtreecommitdiffstats
path: root/Utilities/cmlibarchive/libarchive
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-18 20:50:24 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-18 20:50:24 (GMT)
commit8cb1f4b0a4c1acba3ce9c0b1ee981facf655f216 (patch)
tree06bbc8e3d3f9933fdcf01df3f922246a579ead19 /Utilities/cmlibarchive/libarchive
parentba216220485e16d4fb4fbb073462a57b16f87e54 (diff)
downloadCMake-8cb1f4b0a4c1acba3ce9c0b1ee981facf655f216.zip
CMake-8cb1f4b0a4c1acba3ce9c0b1ee981facf655f216.tar.gz
CMake-8cb1f4b0a4c1acba3ce9c0b1ee981facf655f216.tar.bz2
libarchive: Include integer types very early
In libarchive/archive_platform.h we should include <stdint.h> or <inttypes.h> immediately after "config.h" to define integer types referenced by configuration results. For example, on a non-conformant platform ssize_t might default to int64_t, so int64_t must be defined before ssize_t is used (and ssize_t is used in archive_windows.h).
Diffstat (limited to 'Utilities/cmlibarchive/libarchive')
-rw-r--r--Utilities/cmlibarchive/libarchive/archive_platform.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_platform.h b/Utilities/cmlibarchive/libarchive/archive_platform.h
index 8cd5015..c90057f 100644
--- a/Utilities/cmlibarchive/libarchive/archive_platform.h
+++ b/Utilities/cmlibarchive/libarchive/archive_platform.h
@@ -52,6 +52,14 @@
#error Oops: No config.h and no pre-built configuration in archive_platform.h.
#endif
+/* Try to get standard C99-style integer type definitions. */
+#if HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+#if HAVE_STDINT_H
+#include <stdint.h>
+#endif
+
/* It should be possible to get rid of this by extending the feature-test
* macros to cover Windows API functions, probably along with non-trivial
* refactoring of code to find structures that sit more cleanly on top of
@@ -78,14 +86,6 @@
#define __FBSDID(a) struct _undefined_hack
#endif
-/* Try to get standard C99-style integer type definitions. */
-#if HAVE_INTTYPES_H
-#include <inttypes.h>
-#endif
-#if HAVE_STDINT_H
-#include <stdint.h>
-#endif
-
/* Borland warns about its own constants! */
#if defined(__BORLANDC__)
# if HAVE_DECL_UINT64_MAX