From: Brad King Date: Wed, 11 Nov 2009 17:13:34 +0000 (-0500) Subject: Fix Borland integer constants X-Git-Tag: v2.8.0~168 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0866bff009563915790bde1a42691c62f70f0f88;p=thirdparty%2Flibarchive.git Fix Borland integer constants Some versions of Borland provide , 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. SVN-Revision: 1647 --- diff --git a/libarchive/archive_platform.h b/libarchive/archive_platform.h index 6a4b08d21..c54073357 100644 --- a/libarchive/archive_platform.h +++ b/libarchive/archive_platform.h @@ -84,6 +84,26 @@ #include #endif +/* Borland warns about its own constants! */ +#if defined(__BORLANDC__) +# if HAVE_DECL_UINT64_MAX +# undef UINT64_MAX +# undef HAVE_DECL_UINT64_MAX +# endif +# if HAVE_DECL_UINT64_MIN +# undef UINT64_MIN +# undef HAVE_DECL_UINT64_MIN +# endif +# if HAVE_DECL_INT64_MAX +# undef INT64_MAX +# undef HAVE_DECL_INT64_MAX +# endif +# if HAVE_DECL_INT64_MIN +# undef INT64_MIN +# undef HAVE_DECL_INT64_MIN +# endif +#endif + /* Some platforms lack the standard *_MAX definitions. */ #if !HAVE_DECL_SIZE_MAX #define SIZE_MAX (~(size_t)0)