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
4 changes: 0 additions & 4 deletions src/coreclr/gc/env/gcenv.base.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,6 @@
#define SSIZE_T_MAX ((ptrdiff_t)(SIZE_T_MAX / 2))
#endif

#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

#ifndef _INC_WINDOWS
// -----------------------------------------------------------------------------------------------------------
//
Expand Down
1 change: 1 addition & 0 deletions src/coreclr/pal/inc/pal.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ extern "C" {

#include <pal_error.h>
#include <pal_mstypes.h>
#include <minipal/utils.h>

// Native system libray handle.
// On Unix systems, NATIVE_LIBRARY_HANDLE type represents a library handle not registered with the PAL.
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/vm/amd64/asmhelpers.S
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ LEAF_ENTRY GetTlsIndexObjectDescOffset, _TEXT
.byte 0x66
.byte 0x66
.byte 0x48 # rex.W prefix for padding
call __tls_get_addr # dummy call to have linker see the code pattern to replace the offset
call EXTERNAL_C_FUNC(__tls_get_addr) # dummy call to have linker see the code pattern to replace the offset
int 3
LEAF_END GetTlsIndexObjectDescOffset, _TEXT
#endif
3 changes: 3 additions & 0 deletions src/native/minipal/cpuid.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
#endif // HOST_WINDOWS

#if defined(HOST_UNIX)

#include <minipal/utils.h>

// MSVC directly defines intrinsics for __cpuid and __cpuidex matching the below signatures
// We define matching signatures for use on Unix platforms.
//
Expand Down
4 changes: 4 additions & 0 deletions src/native/minipal/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
// Number of characters in a string literal. Excludes terminating NULL.
#define STRING_LENGTH(str) (ARRAY_SIZE(str) - 1)

#ifndef __has_builtin
#define __has_builtin(x) 0
#endif

#if defined(_MSC_VER)
# if defined(__SANITIZE_ADDRESS__)
# define HAS_ADDRESS_SANITIZER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ HRESULT MetaDataGetDispenser::ModuleLoadStarted(ModuleID moduleId)
return E_FAIL;
}

WCHAR filePath[STRING_LENGTH];
WCHAR filePath[STR_LENGTH];
ULONG filePathLength;
hr = pCorProfilerInfo->GetModuleInfo2(moduleId,
NULL,
STRING_LENGTH,
STR_LENGTH,
&filePathLength,
filePath,
NULL,
Expand Down
8 changes: 4 additions & 4 deletions src/tests/profiler/native/profiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -625,11 +625,11 @@ String Profiler::GetFunctionIDName(FunctionID funcId)
return WCHAR("FuncNameLookupFailed");
}

WCHAR funcName[STRING_LENGTH];
WCHAR funcName[STR_LENGTH];
hr = pIMDImport->GetMethodProps(token,
NULL,
funcName,
STRING_LENGTH,
STR_LENGTH,
0,
0,
NULL,
Expand Down Expand Up @@ -753,7 +753,7 @@ String Profiler::GetClassIDName(ClassID classId)

String Profiler::GetModuleIDName(ModuleID modId)
{
WCHAR moduleName[STRING_LENGTH];
WCHAR moduleName[STR_LENGTH];
ULONG nameLength = 0;
AssemblyID assemID;

Expand All @@ -765,7 +765,7 @@ String Profiler::GetModuleIDName(ModuleID modId)

HRESULT hr = pCorProfilerInfo->GetModuleInfo(modId,
NULL,
STRING_LENGTH,
STR_LENGTH,
&nameLength,
moduleName,
&assemID);
Expand Down
2 changes: 1 addition & 1 deletion src/tests/profiler/native/profiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#endif // WIN32

#define SHORT_LENGTH 32
#define STRING_LENGTH 256
#define STR_LENGTH 256
#define LONG_LENGTH 1024

typedef void (*ProfilerCallback) (void);
Expand Down