You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/12/29 20:36:42 UTC
[GitHub] [arrow-adbc] kou commented on a diff in pull request #305: fix(c/driver/postgresql): define ntohll etc for macOS 10.9
kou commented on code in PR #305:
URL: https://github.com/apache/arrow-adbc/pull/305#discussion_r1059138964
##########
ci/scripts/glib_test.sh:
##########
@@ -63,7 +65,14 @@ test_subproject() {
env DYLD_LIBRARY_PATH="${DYLD_LIBRARY_PATH}" \
ruby test/run.rb
bundle exec rake build
- gem install --install-dir "${build_dir}/gems" pkg/*.gem
+
+ echo "Testing Gem"
+ local gem_flags=""
+ if [[ "$(uname)" = "Darwin" ]]; then
+ gem_flags='-- --with-cflags="-D_LIBCPP_DISABLE_AVAILABILITY" --with-cppflags="-D_LIBCPP_DISABLE_AVAILABILITY"'
+ fi
+
+ gem install --install-dir "${build_dir}/gems" pkg/*.gem -- ${gem_flags}
Review Comment:
```suggestion
gem install --install-dir "${build_dir}/gems" pkg/*.gem ${gem_flags}
```
##########
c/driver/postgresql/util.h:
##########
@@ -39,8 +41,11 @@ namespace adbcpq {
#define MAKE_NAME(x, y) CONCAT(x, y)
#if defined(__linux__)
-static inline uint64_t ntohll(uint64_t x) { return be64toh(x); }
-static inline uint64_t htonll(uint64_t x) { return htobe64(x); }
+static inline uint64_t SwapNetworkToHost(uint64_t x) { return be64toh(x); }
+static inline uint64_t SwapHostToNetwork(uint64_t x) { return htobe64(x); }
+#elif defined(__APPLE__)
+static inline uint64_t SwapNetworkToHost(uint64_t x) { return OSSwapBigToHostInt64(x); }
+static inline uint64_t SwapHostToNetwork(uint64_t x) { return OSSwapHostToBigInt64(x); }
Review Comment:
It seems that we need `#else` for Windows.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org