arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject [08/18] arrow git commit: ARROW-1609: [Plasma] Xcode 9 compilation workaround
Date Tue, 03 Oct 2017 12:59:50 GMT
ARROW-1609: [Plasma] Xcode 9 compilation workaround

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

Author: Philipp Moritz <pcmoritz@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/c3581547
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/c3581547
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/c3581547

Branch: refs/heads/master
Commit: c35815474ef6f1674fb1f5fcba0cda7986edeffb
Parents: 686a8f7
Author: Philipp Moritz <pcmoritz@gmail.com>
Authored: Thu Sep 28 15:46:02 2017 +0200
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Tue Oct 3 08:59:22 2017 -0400

----------------------------------------------------------------------
 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/c3581547/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/c3581547/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/c3581547/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/c3581547/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/c3581547/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"


Mime
View raw message