Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Kent <wjk@users.noreply.github.com>2017-08-25 20:13:17 +0300
committerJan Kotas <jkotas@microsoft.com>2017-08-25 20:13:17 +0300
commitb78e63acf1b6d4a7580419666715249820ba79bf (patch)
tree6a4835b8809d640aab404578d9cf67f584caad23 /src/Native
parenta63d71732d2e6d32ab6e5cb8d721aed13e87d120 (diff)
Fix compilation with Xcode 9 (#4383)
Diffstat (limited to 'src/Native')
-rw-r--r--src/Native/Runtime/MathHelpers.cpp2
-rw-r--r--src/Native/Runtime/unix/PalRedhawkUnix.cpp6
-rw-r--r--src/Native/gc/gc.cpp2
3 files changed, 9 insertions, 1 deletions
diff --git a/src/Native/Runtime/MathHelpers.cpp b/src/Native/Runtime/MathHelpers.cpp
index 2e4cfb1b9..e299c26bb 100644
--- a/src/Native/Runtime/MathHelpers.cpp
+++ b/src/Native/Runtime/MathHelpers.cpp
@@ -17,6 +17,8 @@ EXTERN_C REDHAWK_API UInt64 REDHAWK_CALLCONV RhpDbl2ULng(double val)
// CORERT Specific - on Project N the arguments to these helpers are inverted
#ifdef CORERT
+#undef min
+#undef max
#include <cmath>
EXTERN_C REDHAWK_API float REDHAWK_CALLCONV RhpFltRem(float dividend, float divisor)
diff --git a/src/Native/Runtime/unix/PalRedhawkUnix.cpp b/src/Native/Runtime/unix/PalRedhawkUnix.cpp
index a421c82b8..0357d6058 100644
--- a/src/Native/Runtime/unix/PalRedhawkUnix.cpp
+++ b/src/Native/Runtime/unix/PalRedhawkUnix.cpp
@@ -1106,6 +1106,11 @@ REDHAWK_PALEXPORT uint32_t REDHAWK_PALAPI PalCompatibleWaitAny(UInt32_BOOL alert
return WaitForSingleObjectEx(pHandles[0], timeout, alertable);
}
+#ifndef __has_builtin
+#define __has_builtin(x) 0
+#endif
+
+#if !__has_builtin(_mm_pause)
extern "C" void _mm_pause()
// Defined for implementing PalYieldProcessor in PalRedhawk.h
{
@@ -1113,6 +1118,7 @@ extern "C" void _mm_pause()
__asm__ volatile ("pause");
#endif
}
+#endif
extern "C" Int32 _stricmp(const char *string1, const char *string2)
{
diff --git a/src/Native/gc/gc.cpp b/src/Native/gc/gc.cpp
index ccb9ec4bd..e95ac1f93 100644
--- a/src/Native/gc/gc.cpp
+++ b/src/Native/gc/gc.cpp
@@ -20220,7 +20220,7 @@ size_t gc_heap::update_brick_table (uint8_t* tree, size_t current_brick,
dprintf (3, ("tree: %Ix, current b: %Ix, x: %Ix, plug_end: %Ix",
tree, current_brick, x, plug_end));
- if (tree > 0)
+ if (tree != NULL)
{
dprintf (3, ("b- %Ix->%Ix pointing to tree %Ix",
current_brick, (size_t)(tree - brick_address (current_brick)), tree));