[Cmake-commits] CMake branch, next, updated. v3.7.0-rc3-977-g4e34731
Brad King
brad.king at kitware.com
Tue Nov 8 11:38:24 EST 2016
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 4e34731f14736e112ab6a0e40550d4ea9c6a3e80 (commit)
via 814a5d1548cf99dbb8ab4a40c3c7d05efac9bd1f (commit)
via 4f9f9b5f079987385cf25fd2d51cb5d64d8f558c (commit)
from 6b37f52ef8f55b687246c10e7eb72a894b429422 (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=4e34731f14736e112ab6a0e40550d4ea9c6a3e80
commit 4e34731f14736e112ab6a0e40550d4ea9c6a3e80
Merge: 6b37f52 814a5d1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 8 11:38:24 2016 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Nov 8 11:38:24 2016 -0500
Merge topic 'import-librhash' into next
814a5d15 librhash: Implement bswap_64 even in strict C90 mode
4f9f9b5f librhash: Use __builtin_bswap64 on Clang
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=814a5d1548cf99dbb8ab4a40c3c7d05efac9bd1f
commit 814a5d1548cf99dbb8ab4a40c3c7d05efac9bd1f
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 8 11:33:09 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 8 11:36:36 2016 -0500
librhash: Implement bswap_64 even in strict C90 mode
diff --git a/Utilities/cmlibrhash/librhash/byte_order.h b/Utilities/cmlibrhash/librhash/byte_order.h
index 3178807..fe49e26 100644
--- a/Utilities/cmlibrhash/librhash/byte_order.h
+++ b/Utilities/cmlibrhash/librhash/byte_order.h
@@ -104,8 +104,8 @@ static inline uint32_t bswap_32(uint32_t x) {
# define bswap_64(x) __builtin_bswap64(x)
#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */
# define bswap_64(x) _byteswap_uint64((__int64)x)
-#elif !defined(__STRICT_ANSI__)
-static inline uint64_t bswap_64(uint64_t x) {
+#else
+static uint64_t bswap_64(uint64_t x) {
union {
uint64_t ll;
uint32_t l[2];
@@ -115,8 +115,6 @@ static inline uint64_t bswap_64(uint64_t x) {
r.l[1] = bswap_32(w.l[0]);
return r.ll;
}
-#else
-#error "bswap_64 unsupported"
#endif
#ifdef CPU_BIG_ENDIAN
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4f9f9b5f079987385cf25fd2d51cb5d64d8f558c
commit 4f9f9b5f079987385cf25fd2d51cb5d64d8f558c
Author: Brad King <brad.king at kitware.com>
AuthorDate: Tue Nov 8 11:32:02 2016 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Tue Nov 8 11:32:02 2016 -0500
librhash: Use __builtin_bswap64 on Clang
diff --git a/Utilities/cmlibrhash/librhash/byte_order.h b/Utilities/cmlibrhash/librhash/byte_order.h
index f9a0fb8..3178807 100644
--- a/Utilities/cmlibrhash/librhash/byte_order.h
+++ b/Utilities/cmlibrhash/librhash/byte_order.h
@@ -94,8 +94,14 @@ static inline uint32_t bswap_32(uint32_t x) {
(((x) & 0x0000ff00) << 8) | (((x) & 0x000000ff) << 24))
#endif /* bswap_32 */
+#ifndef __has_builtin
+# define __has_builtin(x) 0
+#endif
+
#if defined(__GNUC__) && (__GNUC__ >= 4) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3)
# define bswap_64(x) __builtin_bswap64(x)
+#elif defined(__clang__) && __has_builtin(__builtin_bswap64)
+# define bswap_64(x) __builtin_bswap64(x)
#elif (_MSC_VER > 1300) && (defined(CPU_IA32) || defined(CPU_X64)) /* MS VC */
# define bswap_64(x) _byteswap_uint64((__int64)x)
#elif !defined(__STRICT_ANSI__)
-----------------------------------------------------------------------
Summary of changes:
Utilities/cmlibrhash/librhash/byte_order.h | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list