]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Windows compilers don't support C99 int64_t. Use __int64 on Windows
authorTim Kientzle <kientzle@gmail.com>
Wed, 17 Sep 2008 21:03:33 +0000 (17:03 -0400)
committerTim Kientzle <kientzle@gmail.com>
Wed, 17 Sep 2008 21:03:33 +0000 (17:03 -0400)
instead of 'long long' to make the size assumptions clearer.

SVN-Revision: 205

libarchive/archive.h
libarchive/archive_entry.h
libarchive/config_windows.h

index 5d7819a5d8d4252f9e1d577d57d40f3ba48e8990..be423a3ad70e5fc1edba2f0962dfb7c0fe957c90 100644 (file)
 /* Get appropriate definitions of standard POSIX-style types. */
 /* These should match the types used in 'struct stat' */
 #ifdef _WIN32
+#define        __LA_INT64_T    __int64
 #define        __LA_SSIZE_T    long
 #define        __LA_UID_T      unsigned int
 #define        __LA_GID_T      unsigned int
 #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
@@ -273,6 +275,7 @@ __LA_DECL int                archive_read_support_compression_all(struct archive *);
 __LA_DECL int           archive_read_support_compression_bzip2(struct archive *);
 __LA_DECL int           archive_read_support_compression_compress(struct archive *);
 __LA_DECL int           archive_read_support_compression_gzip(struct archive *);
+__LA_DECL int           archive_read_support_compression_lzma(struct archive *);
 __LA_DECL int           archive_read_support_compression_none(struct archive *);
 __LA_DECL int           archive_read_support_compression_program(struct archive *,
                     const char *command);
@@ -328,7 +331,7 @@ __LA_DECL int                archive_read_next_header(struct archive *,
  * Retrieve the byte offset in UNCOMPRESSED data where last-read
  * header started.
  */
-__LA_DECL int64_t               archive_read_header_position(struct archive *);
+__LA_DECL __LA_INT64_T          archive_read_header_position(struct archive *);
 
 /* Read data from the body of an entry.  Similar to read(2). */
 __LA_DECL __LA_SSIZE_T          archive_read_data(struct archive *, void *, size_t);
@@ -565,9 +568,9 @@ __LA_DECL int        archive_write_disk_set_user_lookup(struct archive *,
  * the struct archive object:
  */
 /* Bytes written after compression or read before decompression. */
-__LA_DECL int64_t       archive_position_compressed(struct archive *);
+__LA_DECL __LA_INT64_T  archive_position_compressed(struct archive *);
 /* Bytes written to compressor or read from decompressor. */
-__LA_DECL int64_t       archive_position_uncompressed(struct archive *);
+__LA_DECL __LA_INT64_T  archive_position_uncompressed(struct archive *);
 
 __LA_DECL const char   *archive_compression_name(struct archive *);
 __LA_DECL int           archive_compression(struct archive *);
index f7cfd8599bd9504bbfc8293ae23c58f329b6212d..6ffc603fc42d605913f63d1fcc25f703f57e18b5 100644 (file)
 /* Get appropriate definitions of standard POSIX-style types. */
 /* These should match the types used in 'struct stat' */
 #ifdef _WIN32
+#define        __LA_INT64_T    __int64
 #define        __LA_UID_T      unsigned int
 #define        __LA_GID_T      unsigned int
 #define        __LA_DEV_T      unsigned int
 #define        __LA_MODE_T     unsigned short
 #else
 #include <unistd.h>
+#define        __LA_INT64_T    int64_t
 #define        __LA_UID_T      uid_t
 #define        __LA_GID_T      gid_t
 #define        __LA_DEV_T      dev_t
index 5afda4533ce42a20592535dfed2f157c2bf94da7..354b80aedc8b82d65a0f995541f345f93feacdc3 100644 (file)
 /* Define to the type of a signed integer type of width exactly 64 bits if
    such a type exists and the standard includes do not define it. */
 #if defined(_MSC_VER)
-#define        int64_t long long
+#define        int64_t __int64
 #else
 /* #undef int64_t */
 #endif
 /* Define to the type of an unsigned integer type of width exactly 64 bits if
    such a type exists and the standard includes do not define it. */
 #if defined(_MSC_VER)
-#define        uint64_t unsigned long long
+#define        uint64_t unsigned __int64
 #else
 /* #undef uint64_t */
 #endif