Kaynağa Gözat

xplat: fix xcode9 build break

Oguz Bastemur 8 yıl önce
ebeveyn
işleme
7d654f3540
3 değiştirilmiş dosya ile 13 ekleme ve 23 silme
  1. 4 11
      bin/GCStress/stdafx.h
  2. 0 5
      pal/inc/pal.h
  3. 9 7
      pal/src/include/pal/palinternal.h

+ 4 - 11
bin/GCStress/stdafx.h

@@ -10,16 +10,10 @@
 #include <windows.h>
 #include <winbase.h>
 #include <oleauto.h>
-#else
-#include <CommonPal.h>
-#endif
 
-#ifdef _MSC_VER
 #pragma warning(disable:4985)
 #include <intrin.h>
-#endif
 
-#ifndef USING_PAL_STDLIB
 #include <wtypes.h>
 #include <stdio.h>
 #endif
@@ -30,11 +24,6 @@
 
 void DoVerify(bool value, const char * expr, const char * file, int line);
 
-inline unsigned int GetRandomInteger(unsigned int limit)
-{
-    return rand() % limit;
-}
-
 #include "WeightedTable.h"
 
 #include "Common.h"
@@ -45,3 +34,7 @@ extern Recycler * recyclerInstance;
 #include "GCStress.h"
 #include "RecyclerTestObject.h"
 
+inline unsigned int GetRandomInteger(unsigned int limit)
+{
+    return rand() % limit;
+}

+ 0 - 5
pal/inc/pal.h

@@ -6406,11 +6406,6 @@ PALIMPORT char * __cdecl _strdup(const char *);
 #define alloca  __builtin_alloca
 #endif // __GNUC__
 
-#ifndef NO_PAL_MINMAX
-#define max(a, b) (((a) > (b)) ? (a) : (b))
-#define min(a, b) (((a) < (b)) ? (a) : (b))
-#endif
-
 #endif // !PAL_STDCPP_COMPAT
 
 PALIMPORT PAL_NORETURN void __cdecl exit(int);

+ 9 - 7
pal/src/include/pal/palinternal.h

@@ -672,13 +672,6 @@ inline T* InterlockedCompareExchangePointerT(
 
 #endif // __cplusplus
 
-#ifndef max
-#define max(a,b)            (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b)            (((a) < (b)) ? (a) : (b))
-#endif
-
 #define StackOverflowMessage "Process is terminated due to StackOverflowException.\n"
 
 #ifdef __ANDROID__
@@ -693,4 +686,13 @@ inline T* InterlockedCompareExchangePointerT(
     __android_log_print(ANDROID_LOG_ERROR, CC_AND_TAG, __VA_ARGS__)
 #endif
 
+// do not change the location of the definitions below.
+// these defs should be always at the end
+#ifndef max
+#define max(a,b)            (((a) > (b)) ? (a) : (b))
+#endif
+#ifndef min
+#define min(a,b)            (((a) < (b)) ? (a) : (b))
+#endif
+
 #endif /* _PAL_INTERNAL_H_ */