diff options
author | Brad King <brad.king@kitware.com> | 2009-11-04 18:10:11 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-11-04 18:10:11 (GMT) |
commit | c9a9c88634c98174d9fae712a31327cbd8d0963d (patch) | |
tree | 64eff28a03a5ca2992ca9d7b66d7c8c3be74416e /Utilities/cmlibarchive/libarchive/archive_platform.h | |
parent | 12baf7b7f18fcc13db5542c116d59bdc056595d8 (diff) | |
download | CMake-c9a9c88634c98174d9fae712a31327cbd8d0963d.zip CMake-c9a9c88634c98174d9fae712a31327cbd8d0963d.tar.gz CMake-c9a9c88634c98174d9fae712a31327cbd8d0963d.tar.bz2 |
libarchive: Fix Borland integer constants
Some versions of Borland provide <stdint.h>, so we use it when possible.
However, the 64-bit signed and unsigned integer min/max constants cause
overflow warnings from Borland itself! For these constants we fall back
on our default definitions.
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_platform.h')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_platform.h | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_platform.h b/Utilities/cmlibarchive/libarchive/archive_platform.h index 2c43a28..8cd5015 100644 --- a/Utilities/cmlibarchive/libarchive/archive_platform.h +++ b/Utilities/cmlibarchive/libarchive/archive_platform.h @@ -86,6 +86,30 @@ #include <stdint.h> #endif +/* Borland warns about its own constants! */ +#if defined(__BORLANDC__) +# if HAVE_DECL_UINT64_MAX +# undef UINT64_MAX +# undef HAVE_DECL_UINT64_MAX +# define HAVE_DECL_UINT64_MAX 0 +# endif +# if HAVE_DECL_UINT64_MIN +# undef UINT64_MIN +# undef HAVE_DECL_UINT64_MIN +# define HAVE_DECL_UINT64_MIN 0 +# endif +# if HAVE_DECL_INT64_MAX +# undef INT64_MAX +# undef HAVE_DECL_INT64_MAX +# define HAVE_DECL_INT64_MAX 0 +# endif +# if HAVE_DECL_INT64_MIN +# undef INT64_MIN +# undef HAVE_DECL_INT64_MIN +# define HAVE_DECL_INT64_MIN 0 +# endif +#endif + /* Some platforms lack the standard *_MAX definitions. */ #if !HAVE_DECL_SIZE_MAX #define SIZE_MAX (~(size_t)0) |