Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 4 additions & 11 deletions bin/GCStress/stdafx.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
Expand All @@ -45,3 +34,7 @@ extern Recycler * recyclerInstance;
#include "GCStress.h"
#include "RecyclerTestObject.h"

inline unsigned int GetRandomInteger(unsigned int limit)
{
return rand() % limit;
}
5 changes: 0 additions & 5 deletions pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
16 changes: 9 additions & 7 deletions pal/src/include/pal/palinternal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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__
Expand All @@ -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_ */