[Cmake-commits] [cmake-commits] hoffman committed archive.h 1.2 1.3 archive_endian.h 1.2 1.3 archive_entry.h 1.1 1.2 archive_entry_copy_bhfi.c 1.1 1.2 archive_windows.c 1.2 1.3 archive_windows.h 1.1 1.2 archive_write_set_format_pax.c 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Sun Nov 1 12:41:19 EST 2009


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

Modified Files:
	archive.h archive_endian.h archive_entry.h 
	archive_entry_copy_bhfi.c archive_windows.c archive_windows.h 
	archive_write_set_format_pax.c 
Log Message:
Fixes for borland, compiles with lots of warnings, but compiles, might fix vs70 again too.


Index: archive_windows.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_windows.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive_windows.c	30 Oct 2009 20:36:46 -0000	1.2
--- archive_windows.c	1 Nov 2009 17:41:17 -0000	1.3
***************
*** 51,55 ****
--- 51,57 ----
  #include <errno.h>
  #include <stddef.h>
+ #ifndef __BORLANDC__
  #include <sys/utime.h>
+ #endif
  #include <sys/stat.h>
  #include <process.h>
***************
*** 57,61 ****
  #include <wchar.h>
  #include <windows.h>
! #if defined(_MSC_VER) &&  _MSC_VER <= 1300
  # define EPOC_TIME   (116444736000000000)
  #else
--- 59,63 ----
  #include <wchar.h>
  #include <windows.h>
! #if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
  # define EPOC_TIME   (116444736000000000)
  #else
***************
*** 377,381 ****
      return (0);
  }
- 
  #define WINTIME(sec, usec)  ((Int32x32To64(sec, 10000000) + EPOC_TIME) + (usec * 10))
  static int
--- 379,382 ----
***************
*** 624,628 ****
--- 625,633 ----
      }
      if (ws == NULL) {
+ #ifdef __BORLANDC__
+         r = _open(path, flags);
+ #else
          r = _open(path, flags, pmode);
+ #endif
          if (r < 0 && errno == EACCES && (flags & O_CREAT) != 0) {
              /* simular other POSIX system action to pass a test */

Index: archive.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive.h	31 Oct 2009 02:29:08 -0000	1.2
--- archive.h	1 Nov 2009 17:41:17 -0000	1.3
***************
*** 47,51 ****
  /* 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(_WIN64)
--- 47,51 ----
  /* 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)
***************
*** 57,61 ****
--- 57,65 ----
  #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
  #define __LA_INT64_T    int64_t
  #define __LA_SSIZE_T    ssize_t

Index: archive_entry_copy_bhfi.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_entry_copy_bhfi.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** archive_entry_copy_bhfi.c	30 Oct 2009 17:09:56 -0000	1.1
--- archive_entry_copy_bhfi.c	1 Nov 2009 17:41:17 -0000	1.2
***************
*** 29,35 ****
  #include "archive_entry.h"
  
! #if defined(_WIN32) && !defined(__CYGWIN__)
  
- #define EPOC_TIME   (116444736000000000ULL)
  
  __inline static void
--- 29,39 ----
  #include "archive_entry.h"
  
! #if defined(_WIN32) && !defined(__CYGWIN__) 
! #if defined(__BORLANDC__) || (defined(_MSC_VER) &&  _MSC_VER <= 1300)
! # define EPOC_TIME   (116444736000000000)
! #else
! # define EPOC_TIME   (116444736000000000ULL)
! #endif
  
  
  __inline static void

Index: archive_windows.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_windows.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** archive_windows.h	30 Oct 2009 17:09:59 -0000	1.1
--- archive_windows.h	1 Nov 2009 17:41:17 -0000	1.2
***************
*** 126,134 ****
  #define write       __la_write
  
! #define O_RDONLY    _O_RDONLY
! #define O_WRONLY    _O_WRONLY
! #define O_TRUNC     _O_TRUNC
! #define O_CREAT     _O_CREAT
! #define O_EXCL      _O_EXCL
  
  #ifndef _S_IFIFO
--- 126,136 ----
  #define write       __la_write
  
! #ifndef O_RDONLY
!  #define O_RDONLY    _O_RDONLY
!  #define O_WRONLY    _O_WRONLY
!  #define O_TRUNC     _O_TRUNC
!  #define O_CREAT     _O_CREAT
!  #define O_EXCL      _O_EXCL
! #endif
  
  #ifndef _S_IFIFO
***************
*** 156,174 ****
    #define   _S_IFMT         0170000   /* file type mask */
  #endif
! 
! #define S_IFIFO     _S_IFIFO
  //#define   S_IFCHR  _S_IFCHR
  //#define   S_IFDIR  _S_IFDIR
! #define S_IFBLK     _S_IFBLK
! #define S_IFLNK     _S_IFLNK
! #define S_IFSOCK    _S_IFSOCK
  //#define   S_IFREG  _S_IFREG
  //#define   S_IFMT   _S_IFMT
! 
! #define S_ISBLK(m)  (((m) & S_IFMT) == S_IFBLK) /* block special */
! #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) /* fifo or socket */
! #define S_ISCHR(m)  (((m) & S_IFMT) == S_IFCHR) /* char special */
! #define S_ISDIR(m)  (((m) & S_IFMT) == S_IFDIR) /* directory */
! #define S_ISREG(m)  (((m) & S_IFMT) == S_IFREG) /* regular file */
  #define S_ISLNK(m)  (((m) & S_IFMT) == S_IFLNK) /* Symbolic link */
  #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) /* Socket */
--- 158,184 ----
    #define   _S_IFMT         0170000   /* file type mask */
  #endif
! #ifndef S_IFIFO
!  #define S_IFIFO     _S_IFIFO
! #endif
  //#define   S_IFCHR  _S_IFCHR
  //#define   S_IFDIR  _S_IFDIR
! #ifndef S_IFBLK
!   #define S_IFBLK     _S_IFBLK
! #endif
! #ifndef S_IFLNK
!   #define S_IFLNK     _S_IFLNK
! #endif
! #ifndef S_IFSOCK
!   #define S_IFSOCK    _S_IFSOCK
! #endif
  //#define   S_IFREG  _S_IFREG
  //#define   S_IFMT   _S_IFMT
! #ifndef S_ISBLK
!  #define S_ISBLK(m)  (((m) & S_IFMT) == S_IFBLK) /* block special */
!  #define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) /* fifo or socket */
!  #define S_ISCHR(m)  (((m) & S_IFMT) == S_IFCHR) /* char special */
!  #define S_ISDIR(m)  (((m) & S_IFMT) == S_IFDIR) /* directory */
!  #define S_ISREG(m)  (((m) & S_IFMT) == S_IFREG) /* regular file */
! #endif
  #define S_ISLNK(m)  (((m) & S_IFMT) == S_IFLNK) /* Symbolic link */
  #define S_ISSOCK(m) (((m) & S_IFMT) == S_IFSOCK) /* Socket */
***************
*** 195,202 ****
  #define _S_IROTH        (_S_IRGRP  >> 3) /* execute/search permission, other */
  
! #define S_IRWXU      _S_IRWXU
! #define S_IXUSR      _S_IXUSR
! #define S_IWUSR      _S_IWUSR
! #define S_IRUSR      _S_IRUSR
  #define S_IRWXG        _S_IRWXG
  #define S_IXGRP        _S_IXGRP
--- 205,214 ----
  #define _S_IROTH        (_S_IRGRP  >> 3) /* execute/search permission, other */
  
! #ifndef S_IRWXU
!  #define S_IRWXU      _S_IRWXU
!  #define S_IXUSR      _S_IXUSR
!  #define S_IWUSR      _S_IWUSR
!  #define S_IRUSR      _S_IRUSR
! #endif
  #define S_IRWXG        _S_IRWXG
  #define S_IXGRP        _S_IXGRP

Index: archive_write_set_format_pax.c
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_write_set_format_pax.c,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** archive_write_set_format_pax.c	30 Oct 2009 17:10:01 -0000	1.1
--- archive_write_set_format_pax.c	1 Nov 2009 17:41:17 -0000	1.2
***************
*** 480,484 ****
      path_w = archive_entry_pathname_w(entry_main);
      if (path != NULL && path_w == NULL) {
!         archive_set_error(&a->archive, EILSEQ,
              "Can't translate pathname '%s' to UTF-8", path);
          ret = ARCHIVE_WARN;
--- 480,484 ----
      path_w = archive_entry_pathname_w(entry_main);
      if (path != NULL && path_w == NULL) {
!         archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
              "Can't translate pathname '%s' to UTF-8", path);
          ret = ARCHIVE_WARN;
***************
*** 488,492 ****
      uname_w = archive_entry_uname_w(entry_main);
      if (uname != NULL && uname_w == NULL) {
!         archive_set_error(&a->archive, EILSEQ,
              "Can't translate uname '%s' to UTF-8", uname);
          ret = ARCHIVE_WARN;
--- 488,492 ----
      uname_w = archive_entry_uname_w(entry_main);
      if (uname != NULL && uname_w == NULL) {
!         archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
              "Can't translate uname '%s' to UTF-8", uname);
          ret = ARCHIVE_WARN;
***************
*** 496,500 ****
      gname_w = archive_entry_gname_w(entry_main);
      if (gname != NULL && gname_w == NULL) {
!         archive_set_error(&a->archive, EILSEQ,
              "Can't translate gname '%s' to UTF-8", gname);
          ret = ARCHIVE_WARN;
--- 496,500 ----
      gname_w = archive_entry_gname_w(entry_main);
      if (gname != NULL && gname_w == NULL) {
!         archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
              "Can't translate gname '%s' to UTF-8", gname);
          ret = ARCHIVE_WARN;
***************
*** 510,514 ****
      }
      if (linkpath != NULL && linkpath_w == NULL) {
!         archive_set_error(&a->archive, EILSEQ,
              "Can't translate linkpath '%s' to UTF-8", linkpath);
          ret = ARCHIVE_WARN;
--- 510,514 ----
      }
      if (linkpath != NULL && linkpath_w == NULL) {
!         archive_set_error(&a->archive, ARCHIVE_ERRNO_FILE_FORMAT,
              "Can't translate linkpath '%s' to UTF-8", linkpath);
          ret = ARCHIVE_WARN;

Index: archive_endian.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_endian.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C 2 -d -r1.2 -r1.3
*** archive_endian.h	30 Oct 2009 22:07:45 -0000	1.2
--- archive_endian.h	1 Nov 2009 17:41:17 -0000	1.3
***************
*** 46,50 ****
   * - Microsoft Visual C++ 6.0 (supposedly newer versions too)
   */
! #if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux)
  #define inline
  #elif defined(_MSC_VER)
--- 46,50 ----
   * - Microsoft Visual C++ 6.0 (supposedly newer versions too)
   */
! #if defined(__WATCOMC__) || defined(__sgi) || defined(__hpux) || defined(__BORLANDC__)
  #define inline
  #elif defined(_MSC_VER)

Index: archive_entry.h
===================================================================
RCS file: /cvsroot/CMake/CMake/Utilities/cmlibarchive/libarchive/archive_entry.h,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** archive_entry.h	30 Oct 2009 17:09:56 -0000	1.1
--- archive_entry.h	1 Nov 2009 17:41:17 -0000	1.2
***************
*** 47,51 ****
  /* 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
  #define __LA_UID_T  short
--- 47,51 ----
  /* 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
***************
*** 54,58 ****
  #define __LA_MODE_T unsigned short
  #else
! #include <unistd.h>
  #define __LA_INT64_T    int64_t
  #define __LA_UID_T  uid_t
--- 54,62 ----
  #define __LA_MODE_T unsigned short
  #else
! #ifdef __BORLANDC__
! # include <sys/types.h>
! #else
! # include <unistd.h>
! #endif
  #define __LA_INT64_T    int64_t
  #define __LA_UID_T  uid_t



More information about the Cmake-commits mailing list