You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by ap...@apache.org on 2021/02/23 13:23:05 UTC
[arrow] branch master updated: ARROW-11737: [C++] Patch vendored
xxhash for Solaris
This is an automated email from the ASF dual-hosted git repository.
apitrou pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/arrow.git
The following commit(s) were added to refs/heads/master by this push:
new 9caca11 ARROW-11737: [C++] Patch vendored xxhash for Solaris
9caca11 is described below
commit 9caca11aecb9e9083b47bf2bdda2647afc48cee3
Author: Neal Richardson <ne...@gmail.com>
AuthorDate: Tue Feb 23 14:21:42 2021 +0100
ARROW-11737: [C++] Patch vendored xxhash for Solaris
cf. https://github.com/Cyan4973/xxHash/pull/498 and https://github.com/Cyan4973/xxHash/pull/502
Closes #9552 from nealrichardson/sun-xxhash
Authored-by: Neal Richardson <ne...@gmail.com>
Signed-off-by: Antoine Pitrou <an...@python.org>
---
cpp/src/arrow/vendored/xxhash/README.md | 1 +
cpp/src/arrow/vendored/xxhash/xxhash.h | 5 ++++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/cpp/src/arrow/vendored/xxhash/README.md b/cpp/src/arrow/vendored/xxhash/README.md
index a24fa68..6f942ed 100644
--- a/cpp/src/arrow/vendored/xxhash/README.md
+++ b/cpp/src/arrow/vendored/xxhash/README.md
@@ -19,3 +19,4 @@
The files in this directory are vendored from xxHash git tag v0.8.0
(https://github.com/Cyan4973/xxHash).
+Includes https://github.com/Cyan4973/xxHash/pull/502 for Solaris compatibility
\ No newline at end of file
diff --git a/cpp/src/arrow/vendored/xxhash/xxhash.h b/cpp/src/arrow/vendored/xxhash/xxhash.h
index 2d56d23..99b2b4b 100644
--- a/cpp/src/arrow/vendored/xxhash/xxhash.h
+++ b/cpp/src/arrow/vendored/xxhash/xxhash.h
@@ -2091,7 +2091,10 @@ XXH_PUBLIC_API XXH64_hash_t XXH64_hashFromCanonical(const XXH64_canonical_t* src
/* === Compiler specifics === */
-#if defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
+/* Patch from https://github.com/Cyan4973/xxHash/pull/498 */
+#if ((defined(sun) || defined(__sun)) && __cplusplus) /* Solaris includes __STDC_VERSION__ with C++. Tested with GCC 5.5 */
+# define XXH_RESTRICT /* disable */
+#elif defined (__STDC_VERSION__) && __STDC_VERSION__ >= 199901L /* >= C99 */
# define XXH_RESTRICT restrict
#else
/* Note: it might be useful to define __restrict or __restrict__ for some C++ compilers */