[Cmake-commits] CMake branch, next, updated. v3.4.0-rc2-905-g9a24d6a
Brad King
brad.king at kitware.com
Fri Oct 23 10:39:10 EDT 2015
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 9a24d6a269df453ce684bfe856b7a3570f5b141f (commit)
via 96a151398387fae00dde98c2a626f38b635e114c (commit)
from 786a5bbd1612a6da3487aae97ae99a88f20ea272 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9a24d6a269df453ce684bfe856b7a3570f5b141f
commit 9a24d6a269df453ce684bfe856b7a3570f5b141f
Merge: 786a5bb 96a1513
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 23 10:39:10 2015 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Oct 23 10:39:10 2015 -0400
Merge topic 'update-libarchive' into next
96a15139 libarchive: Test for Clang builtin before using it
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=96a151398387fae00dde98c2a626f38b635e114c
commit 96a151398387fae00dde98c2a626f38b635e114c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Oct 23 10:24:47 2015 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Oct 23 10:24:47 2015 -0400
libarchive: Test for Clang builtin before using it
The __builtin_bswap16 builtin is not available on Clang 2.1.
diff --git a/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c b/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
index c359d83..eff02d8 100644
--- a/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
+++ b/Utilities/cmlibarchive/libarchive/archive_read_support_format_lha.c
@@ -1712,10 +1712,13 @@ lha_crc16(uint16_t crc, const void *pp, size_t len)
for (;len >= 8; len -= 8) {
/* This if statement expects compiler optimization will
* remove the stament which will not be executed. */
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
#if defined(_MSC_VER) && _MSC_VER >= 1400 /* Visual Studio */
# define bswap16(x) _byteswap_ushort(x)
#elif (defined(__GNUC__) && __GNUC__ >= 4 && __GNUC_MINOR__ >= 8) \
- || defined(__clang__)
+ || (defined(__clang__) && __has_builtin(__builtin_bswap16))
# define bswap16(x) __builtin_bswap16(x)
#else
# define bswap16(x) ((((x) >> 8) & 0xff) | ((x) << 8))
-----------------------------------------------------------------------
Summary of changes:
.../cmlibarchive/libarchive/archive_read_support_format_lha.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list