diff options
author | Brad King <brad.king@kitware.com> | 2013-07-26 20:08:54 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2013-07-31 12:19:13 (GMT) |
commit | 102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6 (patch) | |
tree | db05ed527f04506957049a7b087be6c038d98435 /Utilities/cmlibarchive/libarchive/archive_entry.h | |
parent | 87402c995ed2460deb2f39e02acf77a0bb57f263 (diff) | |
parent | 35df7c8ba8854e97bd6994c4d1143f57535ed6f2 (diff) | |
download | CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.zip CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.gz CMake-102071f80cf4ad7aa97bf8a1618cfc6ee6689ab6.tar.bz2 |
Merge branch 'libarchive-upstream' into update-libarchive
Conflicts:
Utilities/cmlibarchive/CMakeLists.txt
Utilities/cmlibarchive/libarchive/archive.h
Utilities/cmlibarchive/libarchive/archive_entry.h
Utilities/cmlibarchive/libarchive/archive_read_disk_posix.c
Utilities/cmlibarchive/libarchive/archive_read_support_format_iso9660.c
Utilities/cmlibarchive/libarchive/archive_windows.h
Utilities/cmlibarchive/libarchive/archive_write_set_format_iso9660.c
Diffstat (limited to 'Utilities/cmlibarchive/libarchive/archive_entry.h')
-rw-r--r-- | Utilities/cmlibarchive/libarchive/archive_entry.h | 45 |
1 files changed, 20 insertions, 25 deletions
diff --git a/Utilities/cmlibarchive/libarchive/archive_entry.h b/Utilities/cmlibarchive/libarchive/archive_entry.h index 9c44e25..85ea885 100644 --- a/Utilities/cmlibarchive/libarchive/archive_entry.h +++ b/Utilities/cmlibarchive/libarchive/archive_entry.h @@ -29,7 +29,7 @@ #define ARCHIVE_ENTRY_H_INCLUDED /* Note: Compiler will complain if this does not match archive.h! */ -#define ARCHIVE_VERSION_NUMBER 3000002 +#define ARCHIVE_VERSION_NUMBER 3001002 /* * Note: archive_entry.h is for use outside of libarchive; the @@ -47,21 +47,9 @@ #include <windows.h> #endif -/* Get appropriate definitions of standard POSIX-style types. */ -/* These should match the types used in 'struct stat' */ +/* Get a suitable 64-bit integer type. */ #if defined(_WIN32) && !defined(__CYGWIN__) -#define __LA_INT64_T __int64 -# if defined(__BORLANDC__) -# define __LA_UID_T uid_t /* Remove in libarchive 3.2 */ -# define __LA_GID_T gid_t /* Remove in libarchive 3.2 */ -# define __LA_DEV_T dev_t -# define __LA_MODE_T mode_t -# else -# define __LA_UID_T short /* Remove in libarchive 3.2 */ -# define __LA_GID_T short /* Remove in libarchive 3.2 */ -# define __LA_DEV_T unsigned int -# define __LA_MODE_T unsigned short -# endif +# define __LA_INT64_T __int64 #else #include <unistd.h> # if defined(_SCO_DS) || defined(__osf__) @@ -69,17 +57,17 @@ # else # define __LA_INT64_T int64_t # endif -# define __LA_UID_T uid_t /* Remove in libarchive 3.2 */ -# define __LA_GID_T gid_t /* Remove in libarchive 3.2 */ -# define __LA_DEV_T dev_t -# define __LA_MODE_T mode_t #endif -/* - * Remove this for libarchive 3.2, since ino_t is no longer used. - */ -#define __LA_INO_T ino_t - +/* Get a suitable definition for mode_t */ +#if ARCHIVE_VERSION_NUMBER >= 3999000 +/* Switch to plain 'int' for libarchive 4.0. It's less broken than 'mode_t' */ +# define __LA_MODE_T int +#elif defined(_WIN32) && !defined(__CYGWIN__) && !defined(__BORLANDC__) +# define __LA_MODE_T unsigned short +#else +# define __LA_MODE_T mode_t +#endif /* * On Windows, define LIBARCHIVE_STATIC if you're building or using a @@ -149,6 +137,10 @@ struct archive_entry; * portable values to platform-native values when entries are read from * or written to disk. */ +/* + * In libarchive 4.0, we can drop the casts here. + * They're needed to work around Borland C's broken mode_t. + */ #define AE_IFMT ((__LA_MODE_T)0170000) #define AE_IFREG ((__LA_MODE_T)0100000) #define AE_IFLNK ((__LA_MODE_T)0120000) @@ -321,7 +313,10 @@ __LA_DECL int archive_entry_update_uname_utf8(struct archive_entry *, const char * manipulate archives on systems different than the ones they were * created on. * - * TODO: On Linux, provide both stat32 and stat64 versions of these functions. + * TODO: On Linux and other LFS systems, provide both stat32 and + * stat64 versions of these functions and all of the macro glue so + * that archive_entry_stat is magically defined to + * archive_entry_stat32 or archive_entry_stat64 as appropriate. */ __LA_DECL const struct stat *archive_entry_stat(struct archive_entry *); __LA_DECL void archive_entry_copy_stat(struct archive_entry *, const struct stat *); |