You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@arrow.apache.org by uw...@apache.org on 2017/09/28 13:46:07 UTC

arrow git commit: ARROW-1609: [Plasma] Xcode 9 compilation workaround

Repository: arrow
Updated Branches:
  refs/heads/master b62f99a60 -> 78181d8ec


ARROW-1609: [Plasma] Xcode 9 compilation workaround

see https://github.com/apache/arrow/pull/1139

Author: Philipp Moritz <pc...@gmail.com>

Closes #1144 from pcmoritz/plasma-xcode-9-workaround and squashes the following commits:

7642499 [Philipp Moritz] fix on other platforms
c5cdddd [Philipp Moritz] xcode 9 compilation workaround


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/78181d8e
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/78181d8e
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/78181d8e

Branch: refs/heads/master
Commit: 78181d8ecfce3e658e143210adfc658d6259dec0
Parents: b62f99a
Author: Philipp Moritz <pc...@gmail.com>
Authored: Thu Sep 28 15:46:02 2017 +0200
Committer: Uwe L. Korn <uw...@xhochy.com>
Committed: Thu Sep 28 15:46:02 2017 +0200

----------------------------------------------------------------------
 cpp/src/plasma/CMakeLists.txt |  1 +
 cpp/src/plasma/common.h       |  2 ++
 cpp/src/plasma/compat.h       | 35 +++++++++++++++++++++++++++++++++++
 cpp/src/plasma/io.h           |  1 +
 cpp/src/plasma/plasma.h       |  2 ++
 5 files changed, 41 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/78181d8e/cpp/src/plasma/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/CMakeLists.txt b/cpp/src/plasma/CMakeLists.txt
index 7e91202..ed1762b 100644
--- a/cpp/src/plasma/CMakeLists.txt
+++ b/cpp/src/plasma/CMakeLists.txt
@@ -111,6 +111,7 @@ target_link_libraries(plasma_store plasma_static)
 install(FILES
   common.h
   common_generated.h
+  compat.h
   client.h
   events.h
   plasma.h

http://git-wip-us.apache.org/repos/asf/arrow/blob/78181d8e/cpp/src/plasma/common.h
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/common.h b/cpp/src/plasma/common.h
index 66d5f30..cc67ffe 100644
--- a/cpp/src/plasma/common.h
+++ b/cpp/src/plasma/common.h
@@ -26,6 +26,8 @@
 #define __STDC_FORMAT_MACROS
 #endif
 
+#include "plasma/compat.h"
+
 #include "arrow/status.h"
 #include "arrow/util/logging.h"
 

http://git-wip-us.apache.org/repos/asf/arrow/blob/78181d8e/cpp/src/plasma/compat.h
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/compat.h b/cpp/src/plasma/compat.h
new file mode 100644
index 0000000..ce751da
--- /dev/null
+++ b/cpp/src/plasma/compat.h
@@ -0,0 +1,35 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#ifndef PLASMA_COMPAT_H
+#define PLASMA_COMPAT_H
+
+// Workaround for multithreading on XCode 9, see
+// https://issues.apache.org/jira/browse/ARROW-1622 and
+// https://github.com/tensorflow/tensorflow/issues/13220#issuecomment-331579775
+// This should be a short-term fix until the problem is fixed upstream.
+#ifdef __APPLE__
+#ifndef _MACH_PORT_T
+#define _MACH_PORT_T
+#include <sys/_types.h> /* __darwin_mach_port_t */
+typedef __darwin_mach_port_t mach_port_t;
+#include <pthread.h>
+mach_port_t pthread_mach_thread_np(pthread_t);
+#endif /* _MACH_PORT_T */
+#endif /* __APPLE__ */
+
+#endif  // PLASMA_COMPAT_H

http://git-wip-us.apache.org/repos/asf/arrow/blob/78181d8e/cpp/src/plasma/io.h
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/io.h b/cpp/src/plasma/io.h
index ef96c06..4beb134 100644
--- a/cpp/src/plasma/io.h
+++ b/cpp/src/plasma/io.h
@@ -27,6 +27,7 @@
 #include <vector>
 
 #include "arrow/status.h"
+#include "plasma/compat.h"
 
 // TODO(pcm): Replace our own custom message header (message type,
 // message length, plasma protocol verion) with one that is serialized

http://git-wip-us.apache.org/repos/asf/arrow/blob/78181d8e/cpp/src/plasma/plasma.h
----------------------------------------------------------------------
diff --git a/cpp/src/plasma/plasma.h b/cpp/src/plasma/plasma.h
index 476002f..603ff8a 100644
--- a/cpp/src/plasma/plasma.h
+++ b/cpp/src/plasma/plasma.h
@@ -31,6 +31,8 @@
 #include <unordered_map>
 #include <unordered_set>
 
+#include "plasma/compat.h"
+
 #include "arrow/status.h"
 #include "arrow/util/logging.h"
 #include "plasma/common.h"