Commit Graph

185 Commits

Author SHA1 Message Date
Brad King 481c9003fa libarchive: Fix include order in xxhash.c
We need to include `archive_platform.h` before any system headers in
order to ensure that `_WIN32_WINNT` is defined early enough.
2016-08-17 10:48:28 -04:00
Brad King 9cb685505a Merge topic 'update-libarchive'
52f58267 Merge branch 'upstream-LibArchive' into update-libarchive
2b94d71d LibArchive 2016-06-19 (139d0576)
2016-06-21 13:57:07 -04:00
Brad King 52f58267c3 Merge branch 'upstream-LibArchive' into update-libarchive
* upstream-LibArchive:
  LibArchive 2016-06-19 (139d0576)
2016-06-20 10:50:13 -04:00
Brad King dbc9f73d0e libarchive: Restore OpenSSL include directory from upstream
In commit v3.6.0-rc1~100^2 (libarchive: Drop early use of crypto
library, 2016-05-03) we accidentally dropped the include directory for
OpenSSL as well as the library.  Without that, it works only
accidentally when CHECK_CRYPTO happens to choose the OpenSSL
implementation and add the include directory.

Reported-by: Bradley Lowekamp <blowekamp@mail.nih.gov>
2016-06-07 15:05:11 -04:00
Brad King 59d28b2849 libarchive: Drop early use of crypto library
We already add the crypto library after the ssl library when using
OpenSSL.  Do not add it to the list of libraries individually or we may
end up with the wrong order later.  Further investigation will be needed
to see how this change can be reconciled with the upstream need for the
original line.
2016-05-03 09:53:05 -04:00
Brad King e9bc469b2a Merge branch 'upstream-LibArchive' into update-libarchive
Resolve conflicts in C code by taking their side.  Resolve conflicts in
CMake code by integrating the changes.
2016-05-02 10:48:48 -04:00
Brad King b2675cde5f libarchive: Remove CMake-specific README
We will now manage the libarchive source tree updates using
the `Utilities/Scripts/update-libarchive.bash` script.  Drop
the README that covered the old method.
2016-05-02 10:46:57 -04:00
Felix Geyer 49e82c15d5 Fix spelling typos in comments and documentation (#16037)
The Debian package checker tool (lintian) detected several typos in
CMake.
2016-03-29 14:31:02 -04:00
Brad King c09acf4fdd libarchive: Update README-CMake.txt for new snapshot 2015-10-28 08:44:47 -04:00
Brad King 2f940f8995 libarchive: Drop use of pthread.h for CMake build
CMake does not use threads so we do not need this in our libarchive.
2015-10-28 08:44:47 -04:00
Brad King 1e47381730 libarchive: Do not use pthread.h API without header 2015-10-28 08:44:47 -04:00
Brad King 43d577dcb9 libarchive: Test for Clang builtin before using it
The __builtin_bswap16 builtin is not available on Clang 2.1.
2015-10-28 08:44:47 -04:00
Brad King 85e0bb84f5 libarchive: Avoid using 'uint8_t' as bitfield type
The IBM XL compiler does not like it.  Use plain 'unsigned' instead.
2015-10-22 10:18:27 -04:00
Brad King c70491d671 libarchive: Avoid using name 'hz'
AIX system headers define the symbol 'hz' as a preprocessor macro.
2015-10-22 10:18:27 -04:00
Brad King 1bbba477c7 libarchive: Drop outdated CMake portability snprintf
The archive_read_support_format_zip.c source no longer calls snprintf
directly so we do not need a portability macro for it.
2015-10-22 10:18:26 -04:00
Brad King 64bdf0b746 libarchive: Avoid non-portable u_int8_t
Use uint8_t that we prepare in config.h instead.
2015-10-22 10:18:26 -04:00
Brad King 8f837fc9a9 libarchive: Use CommonCrypto APIs on OS X only when available
Use each CommonCrypto API only when using an OS X SDK version new enough
to provide it.
2015-10-22 10:18:26 -04:00
Brad King 61a0251e82 libarchive: Define O_CLOEXEC when missing
Do this in archive_random.c as we do in several other sources already.
2015-10-22 10:18:26 -04:00
Brad King 832fe4b133 libarchive: Fix VS 7.1 Debug build
This version of the MS C runtime library forgets to export
_byteswap_ushort.
2015-10-21 11:34:28 -04:00
Brad King 0b82f51a30 libarchive: Guard bcyrpt.h with HAVE_BCRYPT_H 2015-10-21 11:18:50 -04:00
Brad King 5333c04cd0 libarchive: Drop CMake-specific Borland compiler workaround
We no longer build CMake with the Borland compiler.
2015-10-21 10:31:57 -04:00
Brad King e861e12f6e libarchive: Define version macro before first use 2015-10-21 10:30:29 -04:00
Brad King 932848f420 Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts by integrating changes from both sides.
2015-10-21 10:18:52 -04:00
Brad King 8b4c40155a Merge topic 'fix-libarchive-mktemp'
1f33b45d libarchive: Fix string concatentation in Windows mktemp implementation
2015-04-10 08:31:01 -04:00
Nils Gladitz ad194ae0b1 libarchive: Use base-256 encoding for UID/GID like GNU tar does 2015-04-09 14:27:16 -04:00
Tim Kientzle 1f33b45d5d libarchive: Fix string concatentation in Windows mktemp implementation
Port upstream LibArchive commit "compute string pointers after
concatenation" (2014-09-25) and commit "Move variables to top of
function for non-C99 compilers" (2014-11-15) to our CMake copy.
Otherwise we may compute a pointer to memory that is about to be freed
and then compute a bad size to give to CryptGenRandom.

Inspired-by: Tim Kientzle <kientzle@gmail.com>
2015-04-09 14:08:43 -04:00
Brad King 6b9a0e1797 libarchive: Constify internal __archive_get_date implementation
The caller of this API already re-declares it as const, so update the
implementation accordingly.
2015-01-15 11:48:10 -05:00
Brad King 95d84f76d9 Merge topic 'cmake-cmp0054-warnings'
29c3edb8 Avoid if() quoted auto-dereference
2014-10-21 15:08:07 -04:00
Ben Boeckel 29c3edb87a Avoid if() quoted auto-dereference
When testing CMAKE_<LANG>_COMPILER_ID values, do not explicitly
dereference or quote the variable. We want if() to auto-dereference the
variable and not its value. Also replace MATCHES with STREQUAL where
equivalent.
2014-10-20 11:49:16 -04:00
Stephen Kelly 2db55ffa56 Remove borland workarounds.
CMake 3.0 is the last release to require to be able to build with
Borland.
2014-10-15 23:16:44 +02:00
Geoff Viola bef23e8181 Fix some spelling errors in comments 2014-10-13 10:00:53 -04:00
Brad King cede5cbd53 libarchive: Avoid depending on if() to dereference a quoted variable 2014-09-11 21:23:24 +02:00
Daniel Pfeifer 8436d18115 CMake: Enable use of liblzma in libarchive (#14504)
Build liblzma as part of CMake or find one on the system.  Modify our
port of libarchive to use the liblzma configured for use with CMake.
2014-07-29 08:45:36 -04:00
Brad King f56e74ef56 Merge topic 'hpux-libarchive-compile'
c1ddd77d libarchive: Fix compilation on Tru64 with F_SETTIMES
2014-06-09 10:36:13 -04:00
Brad King c1ddd77d0c libarchive: Fix compilation on Tru64 with F_SETTIMES
The parent commit left a typo in the conditional code path for Tru64.
Add the missing '.'.
2014-06-09 10:36:41 -04:00
Brad King 8c29d8d1e7 Merge topic 'hpux-libarchive-compile'
478b1c8b libarchive: fix compilation on newer HP-UX versions
2014-06-09 10:28:40 -04:00
Rolf Eike Beer 478b1c8b36 libarchive: fix compilation on newer HP-UX versions
Newer HP-UX versions (e.g. 11.31) also offers F_SETTIMES, but with a different
struct for the timing information.

Suggested-by: Eric Berge <ericmberge@gmail.com>
2014-06-09 10:15:27 -04:00
Brad King fe27c993ff Merge topic 'update-libarchive'
67f5f0a9 libarchive: Use _snprintf on Windows, not snprintf
fcfbb0a9 libarchive: Drop LIBARCHIVE_ADDITIONAL_LIBS, CMake does not need it
61a649d9 libarchive: Update README-CMake.txt for new snapshot
4533560c Merge branch 'libarchive-upstream' into update-libarchive
44d6b82f libarchive: Disable all whitespace checks in third-party code
37f225b7 libarchive 3.1.2-246-ga5a5d28b (reduced)
6ab7c326 libarchive: Avoid left-shift overflow of signed integer
2014-04-17 09:11:06 -04:00
Brad King 67f5f0a9fd libarchive: Use _snprintf on Windows, not snprintf 2014-04-15 16:52:18 -04:00
Brad King fcfbb0a924 libarchive: Drop LIBARCHIVE_ADDITIONAL_LIBS, CMake does not need it 2014-04-15 16:37:52 -04:00
Brad King 61a649d974 libarchive: Update README-CMake.txt for new snapshot 2014-04-15 16:36:44 -04:00
Brad King 4533560c23 Merge branch 'libarchive-upstream' into update-libarchive
Resolve conflicts in Utilities/cmlibarchive/CMakeLists.txt as
appropriate.
2014-04-15 16:34:50 -04:00
Brad King 44d6b82f43 libarchive: Disable all whitespace checks in third-party code 2014-04-15 16:34:17 -04:00
Brad King 6ab7c32648 libarchive: Avoid left-shift overflow of signed integer
In libarchive/archive_write_set_format_zip.c there are two calls to
archive_le32enc whose second argument is of the form

 archive_entry_mode(zip->entry) << 16

However, the return type from archive_entry_mode may be a signed integer
so the shift may overflow.  Since the second argument of archive_le32enc
expects uint32_t anyway, simply cast to that prior to shifting.
2014-04-15 09:08:20 -04:00
Mike Crowe d9b591790e libarchive: Skip finding libacl.h when ENABLE_ACL is OFF (#14866) 2014-04-14 09:34:12 -04:00
Brad King 5a58efaac3 libarchive: Avoid using name 'u_long'
The system headers on some platforms define a 'u_long' type so we cannot
use the name.  Spell out 'unsigned long' instead.
2014-04-11 09:01:27 -04:00
Brad King 8088332178 libarchive: Do not require includers to have windows.h
In archive_entry.h refer to "BY_HANDLE_FILE_INFORMATION *" using
"struct _BY_HANDLE_FILE_INFORMATION *" to avoid requiring the
includer to already have <windows.h>.
2014-04-03 15:20:53 -04:00
Brad King dfb0458e5b libarchive: Convert literal LL suffix to ARCHIVE_LITERAL_LL 2014-04-03 15:20:53 -04:00
Brad King b0a9807f39 libarchive: Update archive_util.c to use CMake zlib and bzip2 headers 2014-04-03 15:20:53 -04:00
Brad King debe4decce libarchive: Drop options not present in reduced version
Drop ENABLE_TAR and ENABLE_CPIO related options because we do not build
these command-line tools.  Drop ENABLE_TEST and ENABLE_COVERAGE options
because we do not build the tests.
2014-04-03 15:03:48 -04:00