[Cmake-commits] [cmake-commits] king committed archive.h 1.4 1.5 archive_entry.h 1.3 1.4 archive_entry_copy_bhfi.c 1.2 1.3 archive_platform.h 1.2 1.3 archive_windows.c 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Nov 4 13:10:13 EST 2009


Update of /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive
In directory public:/mounts/ram/cvs-serv15106/Utilities/cmlibarchive/libarchive

Modified Files:
	archive.h archive_entry.h archive_entry_copy_bhfi.c 
	archive_platform.h archive_windows.c 
Log Message:
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.


Index: archive_windows.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_windows.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** archive_windows.c	4 Nov 2009 18:09:59 -0000	1.4
--- archive_windows.c	4 Nov 2009 18:10:11 -0000	1.5
***************
*** 61,65 ****
  #include <windows.h>
  #if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
! # define EPOC_TIME   (116444736000000000)
  #else
  # define EPOC_TIME   (116444736000000000ULL)
--- 61,65 ----
  #include <windows.h>
  #if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
! # define EPOC_TIME   (116444736000000000UI64)
  #else
  # define EPOC_TIME   (116444736000000000ULL)

Index: archive.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** archive.h	2 Nov 2009 15:51:27 -0000	1.4
--- archive.h	4 Nov 2009 18:10:07 -0000	1.5
***************
*** 62,66 ****
  #include <unistd.h>  /* ssize_t, uid_t, and gid_t */
  #endif
! #if defined(__BORLANDC__)
  #define __LA_INT64_T    __int64
  #define __LA_SSIZE_T  long
--- 62,66 ----
  #include <unistd.h>  /* ssize_t, uid_t, and gid_t */
  #endif
! #if defined(__BORLANDC__) && !defined(HAVE_SYS_TYPES_H)
  #define __LA_INT64_T    __int64
  #define __LA_SSIZE_T  long

Index: archive_platform.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_platform.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive_platform.h	31 Oct 2009 13:39:58 -0000	1.2
--- archive_platform.h	4 Nov 2009 18:10:10 -0000	1.3
***************
*** 87,90 ****
--- 87,114 ----
  #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

Index: archive_entry_copy_bhfi.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive_entry_copy_bhfi.c	1 Nov 2009 17:41:17 -0000	1.2
--- archive_entry_copy_bhfi.c	4 Nov 2009 18:10:09 -0000	1.3
***************
*** 31,35 ****
  #if defined(_WIN32) && !defined(__CYGWIN__) 
  #if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
! # define EPOC_TIME   (116444736000000000)
  #else
  # define EPOC_TIME   (116444736000000000ULL)
--- 31,35 ----
  #if defined(_WIN32) && !defined(__CYGWIN__) 
  #if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
! # define EPOC_TIME   (116444736000000000UI64)
  #else
  # define EPOC_TIME   (116444736000000000ULL)

Index: archive_entry.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_entry.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -C 2 -d -r1.3 -r1.4
*** archive_entry.h	2 Nov 2009 15:51:28 -0000	1.3
--- archive_entry.h	4 Nov 2009 18:10:08 -0000	1.4
***************
*** 59,63 ****
  # include <unistd.h>
  #endif
! #if defined(__BORLANDC__)
  #define __LA_INT64_T    __int64
  #else
--- 59,63 ----
  # include <unistd.h>
  #endif
! #if defined(__BORLANDC__) && !defined(HAVE_SYS_TYPES_H)
  #define __LA_INT64_T    __int64
  #else



More information about the Cmake-commits mailing list