[Cmake-commits] [cmake-commits] king committed archive.h 1.5 1.6 archive_entry.h 1.4 1.5

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Nov 4 16:06:47 EST 2009


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

Modified Files:
	archive.h archive_entry.h 
Log Message:
libarchive: Fix unconfigured header logic

The commit "libarchive: Fix Borland integer constants" introduced use of
HAVE_* configured macros into archive.h and archive_entry.h where they
are not allowed.  This commit replaces the logic with something that
does not depend on the configured macros.


Index: archive.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -C 2 -d -r1.5 -r1.6
*** archive.h	4 Nov 2009 18:10:07 -0000	1.5
--- archive.h	4 Nov 2009 21:06:44 -0000	1.6
***************
*** 36,45 ****
   * platform macros.
   */
  
  #include <sys/stat.h>
  #include <sys/types.h>  /* Linux requires this for off_t */
! #if !defined(__WATCOMC__) && !defined(_MSC_VER) && !defined(__INTERIX) && !defined(__BORLANDC__)
! /* Header unavailable on Watcom C or MS Visual C++ or SFU. */
! #include <inttypes.h> /* int64_t, etc. */
  #endif
  #include <stdio.h> /* For FILE * */
--- 36,49 ----
   * 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 */
! #ifdef __LA_STDINT_H
! # include __LA_STDINT_H /* int64_t, etc. */
  #endif
  #include <stdio.h> /* For FILE * */
***************
*** 47,72 ****
  /* Get appropriate definitions of standard POSIX-style types. */
  /* These should match the types used in 'struct stat' */
! #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
  #define __LA_INT64_T    __int64
! # if    defined(_WIN64)
  #  define   __LA_SSIZE_T    __int64
  # else
  #  define   __LA_SSIZE_T    long
  # endif
! #define __LA_UID_T      short
! #define __LA_GID_T  short
! #else
! #if defined(__BORLANDC__)
! #include <sys/types.h>
  #else
  #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
- #else
  #define __LA_INT64_T    int64_t
  #define __LA_SSIZE_T    ssize_t
- #endif
  #define __LA_UID_T  uid_t
  #define __LA_GID_T  gid_t
--- 51,74 ----
  /* Get appropriate definitions of standard POSIX-style types. */
  /* These should match the types used in 'struct stat' */
! #if defined(_WIN32) && !defined(__CYGWIN__)
  #define __LA_INT64_T    __int64
! # if defined(_SSIZE_T_DEFINED)
! #  define __LA_SSIZE_T ssize_t
! # elif defined(_WIN64)
  #  define   __LA_SSIZE_T    __int64
  # else
  #  define   __LA_SSIZE_T    long
  # endif
! # if defined(__BORLANDC__)
! #  define __LA_UID_T uid_t
! #  define __LA_GID_T gid_t
! # else
! #  define __LA_UID_T short
! #  define __LA_GID_T short
! # endif
  #else
  #include <unistd.h>  /* ssize_t, uid_t, and gid_t */
  #define __LA_INT64_T    int64_t
  #define __LA_SSIZE_T    ssize_t
  #define __LA_UID_T  uid_t
  #define __LA_GID_T  gid_t

Index: archive_entry.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_entry.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -C 2 -d -r1.4 -r1.5
*** archive_entry.h	4 Nov 2009 18:10:08 -0000	1.4
--- archive_entry.h	4 Nov 2009 21:06:44 -0000	1.5
***************
*** 47,67 ****
  /* Get appropriate definitions of standard POSIX-style types. */
  /* These should match the types used in 'struct stat' */
! #if defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__)
  #define __LA_INT64_T    __int64
! #define __LA_UID_T  short
! #define __LA_GID_T  short
! #define __LA_DEV_T  unsigned int
! #define __LA_MODE_T unsigned short
! #else
! #ifdef __BORLANDC__
! # include <sys/types.h>
  #else
  # include <unistd.h>
- #endif
- #if defined(__BORLANDC__) && !defined(HAVE_SYS_TYPES_H)
- #define __LA_INT64_T    __int64
- #else
  #define __LA_INT64_T    int64_t
- #endif
  #define __LA_UID_T  uid_t
  #define __LA_GID_T  gid_t
--- 47,66 ----
  /* Get appropriate definitions of standard POSIX-style types. */
  /* These should match the types used in 'struct stat' */
! #if defined(_WIN32) && !defined(__CYGWIN__)
  #define __LA_INT64_T    __int64
! # if defined(__BORLANDC__)
! #  define __LA_UID_T  uid_t
! #  define __LA_GID_T  gid_t
! #  define __LA_DEV_T  dev_t
! #  define __LA_MODE_T mode_t
! # else
! #  define __LA_UID_T  short
! #  define __LA_GID_T  short
! #  define __LA_DEV_T  unsigned int
! #  define __LA_MODE_T unsigned short
! # endif
  #else
  # include <unistd.h>
  #define __LA_INT64_T    int64_t
  #define __LA_UID_T  uid_t
  #define __LA_GID_T  gid_t



More information about the Cmake-commits mailing list