OPTION(CLR_CMAKE_WARNINGS_ARE_ERRORS "Warnings are errors" ON)
# Ensure that python is present
-find_program(PYTHON NAMES python3 python2 python)
+find_program(PYTHON NAMES python3 python2 python py)
if (PYTHON STREQUAL "PYTHON-NOTFOUND")
message(FATAL_ERROR "PYTHON not found: Please install Python 2.7.9 or later from https://www.python.org/downloads/")
endif()
# resolve python-version to use
if [ "$PYTHON" == "" ] ; then
- if ! PYTHON=$(command -v python3 || command -v python2 || command -v python)
+ if ! PYTHON=$(command -v python3 || command -v python2 || command -v python || command -v py)
then
echo "Unable to locate build-dependency python!" 1>&2
exit 1
# as x64 does. It has been causing issues in ARM (https://github.com/dotnet/coreclr/issues/4746)
add_compile_options(-fsigned-char)
+ # We mark the function which needs exporting with DLLEXPORT
+ add_compile_options(-fvisibility=hidden)
+
# Specify the minimum supported version of macOS
if(CLR_CMAKE_PLATFORM_DARWIN)
set(MACOS_VERSION_MIN_FLAGS "-mmacosx-version-min=10.12")
//
#undef DECLARE_API
+#ifndef DLLEXPORT
+#ifdef _MSC_VER
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT __attribute__ ((visibility ("default")))
+#endif // _MSC_VER
+#endif // DLLEXPORT
+
#define DECLARE_API(extension) \
-CPPMOD HRESULT CALLBACK extension(PDEBUG_CLIENT client, PCSTR args)
+CPPMOD DLLEXPORT HRESULT CALLBACK extension(PDEBUG_CLIENT client, PCSTR args)
class __ExtensionCleanUp
{
extern "C" {
#endif // __cplusplus
-HRESULT CALLBACK _EFN_StackTrace(
+DLLEXPORT HRESULT CALLBACK _EFN_StackTrace(
PDEBUG_CLIENT client,
__out_ecount(*puiTextLength) WCHAR wszTextOut[],
size_t *puiTextLength,
// cbString - number of characters available in the string buffer.
//
// The output will be truncated of cbString is not long enough for the full stack trace.
-HRESULT CALLBACK _EFN_GetManagedExcepStack(
+DLLEXPORT HRESULT CALLBACK _EFN_GetManagedExcepStack(
PDEBUG_CLIENT client,
ULONG64 StackObjAddr,
__out_ecount(cbString) PSTR szStackString,
// _EFN_GetManagedExcepStackW - same as _EFN_GetManagedExcepStack, but returns
// the stack as a wide string.
-HRESULT CALLBACK _EFN_GetManagedExcepStackW(
+DLLEXPORT HRESULT CALLBACK _EFN_GetManagedExcepStackW(
PDEBUG_CLIENT client,
ULONG64 StackObjAddr,
__out_ecount(cchString) PWSTR wszStackString,
// szName - a buffer to be filled with the full type name
// cbName - the number of characters available in the buffer
//
-HRESULT CALLBACK _EFN_GetManagedObjectName(
+DLLEXPORT HRESULT CALLBACK _EFN_GetManagedObjectName(
PDEBUG_CLIENT client,
ULONG64 objAddr,
__out_ecount(cbName) PSTR szName,
// pOffset - the offset from objAddr to the field. This parameter can be NULL.
//
// At least one of pValue and pOffset must be non-NULL.
-HRESULT CALLBACK _EFN_GetManagedObjectFieldInfo(
+DLLEXPORT HRESULT CALLBACK _EFN_GetManagedObjectFieldInfo(
PDEBUG_CLIENT client,
ULONG64 objAddr,
__out_ecount (mdNameLen) PSTR szFieldName,
// According to kksharma the Windows debuggers always sign-extend
// arguments when calling externally, therefore StackObjAddr
// conforms to CLRDATA_ADDRESS contract.
-HRESULT CALLBACK
+HRESULT CALLBACK
_EFN_GetManagedExcepStack(
PDEBUG_CLIENT client,
ULONG64 StackObjAddr,
// According to kksharma the Windows debuggers always sign-extend
// arguments when calling externally, therefore objAddr
// conforms to CLRDATA_ADDRESS contract.
-HRESULT CALLBACK
+HRESULT CALLBACK
_EFN_GetManagedObjectName(
PDEBUG_CLIENT client,
ULONG64 objAddr,
// According to kksharma the Windows debuggers always sign-extend
// arguments when calling externally, therefore objAddr
// conforms to CLRDATA_ADDRESS contract.
-HRESULT CALLBACK
+HRESULT CALLBACK
_EFN_GetManagedObjectFieldInfo(
PDEBUG_CLIENT client,
ULONG64 objAddr,
#include "sosplugin.h"
namespace lldb {
- bool PluginInitialize (lldb::SBDebugger debugger);
+ DLLEXPORT bool PluginInitialize (lldb::SBDebugger debugger);
}
bool
set(ICU_HOMEBREW_INC_PATH "/usr/local/opt/icu4c/include")
-# We mark the function which needs exporting with DLLEXPORT
-add_compile_options(-fvisibility=hidden)
-
find_path(UTYPES_H "unicode/utypes.h" PATHS ${ICU_HOMEBREW_INC_PATH})
if(UTYPES_H STREQUAL UTYPES_H-NOTFOUND)
message(FATAL_ERROR "Cannot find utypes.h, try installing libicu-dev (or the appropriate package for your platform)")
extern VOID STDMETHODCALLTYPE TLS_FreeMasterSlotIndex();
+DLLEXPORT
EXTERN_C BOOL WINAPI
DllMain(HANDLE instance, DWORD reason, LPVOID reserved)
{
// Prototype for creation function
STDAPI
+DLLEXPORT
DacDbiInterfaceInstance(
ICorDebugDataTarget * pTarget,
CORDB_ADDRESS baseAddress,
//
// This function gets the Dispenser interface given the CLSID and REFIID.
-STDAPI MetaDataGetDispenser(
+DLLEXPORT STDAPI MetaDataGetDispenser(
REFCLSID rclsid, // The class to desired.
REFIID riid, // Interface wanted on class factory.
LPVOID FAR * ppv) // Return interface pointer here.
// Notes:
// It's inconsistent that this takes a (handle, pid) but hands back an ICorDebug instead of an ICorDebugProcess.
// Callers will need to call *ppCordb->DebugActiveProcess(pid).
-STDAPI CoreCLRCreateCordbObjectEx(int iDebuggerVersion, DWORD pid, LPCWSTR lpApplicationGroupId, HMODULE hmodTargetCLR, IUnknown ** ppCordb)
+STDAPI DLLEXPORT CoreCLRCreateCordbObjectEx(int iDebuggerVersion, DWORD pid, LPCWSTR lpApplicationGroupId, HMODULE hmodTargetCLR, IUnknown ** ppCordb)
{
if (ppCordb == NULL)
{
// Notes:
// It's inconsistent that this takes a (handle, pid) but hands back an ICorDebug instead of an ICorDebugProcess.
// Callers will need to call *ppCordb->DebugActiveProcess(pid).
-STDAPI CoreCLRCreateCordbObject(int iDebuggerVersion, DWORD pid, HMODULE hmodTargetCLR, IUnknown ** ppCordb)
+STDAPI DLLEXPORT CoreCLRCreateCordbObject(int iDebuggerVersion, DWORD pid, HMODULE hmodTargetCLR, IUnknown ** ppCordb)
{
return CoreCLRCreateCordbObjectEx(iDebuggerVersion, pid, NULL, hmodTargetCLR, ppCordb);
}
// Called by COM to get a class factory for a given CLSID. If it is one we
// support, instantiate a class factory object and prepare for create instance.
//*****************************************************************************
-STDAPI DllGetClassObjectInternal( // Return code.
+STDAPI DLLEXPORT DllGetClassObjectInternal( // Return code.
REFCLSID rclsid, // The class to desired.
REFIID riid, // Interface wanted on class factory.
LPVOID FAR *ppv) // Return interface pointer here.
// (we went through the shim). CoreCLR doesn't have a shim and we go back to the COM model so we re-expose
// DllGetClassObject to make that work.
-STDAPI DllGetClassObject( // Return code.
+STDAPI DLLEXPORT DllGetClassObject( // Return code.
REFCLSID rclsid, // The class to desired.
REFIID riid, // Interface wanted on class factory.
LPVOID FAR *ppv) // Return interface pointer here.
// @dbgtodo attach-bit: need to determine fate of attach bit.
//
//---------------------------------------------------------------------------------------
-STDAPI OpenVirtualProcessImpl(
+STDAPI DLLEXPORT OpenVirtualProcessImpl(
ULONG64 clrInstanceId,
IUnknown * pDataTarget,
HMODULE hDacModule,
// Return Value:
// S_OK on success. Else failure
//---------------------------------------------------------------------------------------
-STDAPI OpenVirtualProcessImpl2(
+STDAPI DLLEXPORT OpenVirtualProcessImpl2(
ULONG64 clrInstanceId,
IUnknown * pDataTarget,
LPCWSTR pDacModulePath,
// We'd like a beta1 shim/VS to still be able to open dumps using a CLR v4 Beta2+ mscordbi.dll,
// so we'll leave this in place (at least until after Beta2 is in wide use).
//---------------------------------------------------------------------------------------
-STDAPI OpenVirtualProcess2(
+STDAPI DLLEXPORT OpenVirtualProcess2(
ULONG64 clrInstanceId,
IUnknown * pDataTarget,
HMODULE hDacModule,
// Public OpenVirtualProcess method to get an ICorDebugProcess4 instance
// Used directly in CLR v4 pre Beta1 - can probably be safely removed now
//---------------------------------------------------------------------------------------
-STDAPI OpenVirtualProcess(
+STDAPI DLLEXPORT OpenVirtualProcess(
ULONG64 clrInstanceId,
IUnknown * pDataTarget,
REFIID riid,
// that can be supported cross-platform.
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateProcessForLaunch(
__in LPWSTR lpCommandLine,
// ResumeProcess - to be used with the CreateProcessForLaunch resume handle
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
ResumeProcess(
__in HANDLE hResumeHandle)
// CloseResumeHandle - to be used with the CreateProcessForLaunch resume handle
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CloseResumeHandle(
__in HANDLE hResumeHandle)
// ppUnregisterToken -- pointer to put the UnregisterForRuntimeStartup token.
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
RegisterForRuntimeStartup(
__in DWORD dwProcessId,
// ppUnregisterToken -- pointer to put the UnregisterForRuntimeStartup token.
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
RegisterForRuntimeStartupEx(
__in DWORD dwProcessId,
//
// pUnregisterToken -- unregister token from RegisterForRuntimeStartup or NULL.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
UnregisterForRuntimeStartup(
__in PVOID pUnregisterToken)
+ 8 // + hex process id DWORD
+ 10 // + decimal session id DWORD
+ 1; // '\' after session id
-
-HRESULT
+
+DLLEXPORT
+HRESULT
GetStartupNotificationEvent(
__in DWORD debuggeePID,
__out HANDLE* phStartupEvent)
// Notes:
// Callers use code:CloseCLREnumeration to free the returned arrays.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
EnumerateCLRs(
DWORD debuggeePID,
// dwArrayLength -- array length originally returned by EnumerateCLRs
//
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CloseCLREnumeration(
__in HANDLE* pHandleArray,
// The version string is an opaque string that can only be passed back to other
// DbgShim APIs.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateVersionStringFromModule(
__in DWORD pidDebuggee,
// the right debug pack is not installed.
// else Error. (*ppCordb will be null)
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateDebuggingInterfaceFromVersionEx(
__in int iDebuggerVersion,
// the right debug pack is not installed.
// else Error. (*ppCordb will be null)
//-----------------------------------------------------------------------------
-HRESULT
+DLLEXPORT
+HRESULT
CreateDebuggingInterfaceFromVersion2(
__in int iDebuggerVersion,
__in LPCWSTR szDebuggeeVersion,
// the right debug pack is not installed.
// else Error. (*ppCordb will be null)
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CreateDebuggingInterfaceFromVersion(
__in LPCWSTR szDebuggeeVersion,
// Return:
// S_OK on success.
//-----------------------------------------------------------------------------
+DLLEXPORT
HRESULT
CLRCreateInstance(
REFCLSID clsid,
UnregisterForRuntimeStartup(
__in PVOID pUnregisterToken);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
GetStartupNotificationEvent(
__in DWORD debuggeePID,
__out HANDLE* phStartupEvent);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
EnumerateCLRs(DWORD debuggeePID,
__out HANDLE** ppHandleArrayOut,
__out LPWSTR** ppStringArrayOut,
__out DWORD* pdwArrayLengthOut);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CloseCLREnumeration(
__in HANDLE* pHandleArray,
__in LPWSTR* pStringArray,
__in DWORD dwArrayLength);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CreateVersionStringFromModule(
__in DWORD pidDebuggee,
__in LPCWSTR szModuleName,
__in DWORD cchBuffer,
__out DWORD* pdwLength);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CreateDebuggingInterfaceFromVersionEx(
__in int iDebuggerVersion,
__in LPCWSTR szDebuggeeVersion,
__out IUnknown ** ppCordb);
-EXTERN_C HRESULT
+EXTERN_C
+DLLEXPORT
+HRESULT
CreateDebuggingInterfaceFromVersion2(
__in int iDebuggerVersion,
__in LPCWSTR szDebuggeeVersion,
__in LPCWSTR szApplicationGroupId,
__out IUnknown ** ppCordb);
-EXTERN_C HRESULT
+EXTERN_C HRESULT
CreateDebuggingInterfaceFromVersion(
__in LPCWSTR szDebuggeeVersion,
__out IUnknown ** ppCordb);
// The main dll entry point for this module. This routine is called by the
// OS when the dll gets loaded. Control is simply deferred to the main code.
//*****************************************************************************
-extern "C"
+DLLEXPORT extern "C"
BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
// Defer to the main debugging code.
list(APPEND CORECLR_LIBRARIES
${START_WHOLE_ARCHIVE} # force all PAL objects to be included so all exports are available
coreclrpal
- tracepointprovider
${END_WHOLE_ARCHIVE}
mscorrc_debug
palrt
)
endif(WIN32)
+if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+ list(APPEND CORECLR_LIBRARIES
+ tracepointprovider
+ )
+endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
+
if(FEATURE_PERFTRACING)
list(APPEND CORECLR_LIBRARIES
eventpipe
extern "C" BOOL WINAPI _CRT_INIT(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
#endif
-extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
+extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved);
// For the CoreClr, this is the real DLL entrypoint. We make ourselves the first entrypoint as
// we need to capture coreclr's hInstance before the C runtime initializes. This function
// will capture hInstance, let the C runtime initialize and then invoke the "classic"
// DllMain that initializes everything else.
-extern "C" BOOL WINAPI CoreDllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
+extern "C" DLLEXPORT BOOL WINAPI CoreDllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
{
STATIC_CONTRACT_NOTHROW;
}
extern "C"
-BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
+DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID lpReserved)
{
STATIC_CONTRACT_NOTHROW;
// %%Function: MetaDataGetDispenser
// This function gets the Dispenser interface given the CLSID and REFIID.
// ---------------------------------------------------------------------------
-STDAPI MetaDataGetDispenser( // Return HRESULT
+DLLEXPORT STDAPI MetaDataGetDispenser( // Return HRESULT
REFCLSID rclsid, // The class to desired.
REFIID riid, // Interface wanted on class factory.
LPVOID FAR *ppv) // Return interface pointer here.
// %%Function: GetMetaDataInternalInterface
// This function gets the IMDInternalImport given the metadata on memory.
// ---------------------------------------------------------------------------
-STDAPI GetMetaDataInternalInterface(
+DLLEXPORT STDAPI GetMetaDataInternalInterface(
LPVOID pData, // [IN] in memory metadata section
ULONG cbData, // [IN] size of the metadata section
DWORD flags, // [IN] MDInternal_OpenForRead or MDInternal_OpenForENC
// This function gets the internal scopeless interface given the public
// scopeless interface.
// ---------------------------------------------------------------------------
-STDAPI GetMetaDataInternalInterfaceFromPublic(
+DLLEXPORT STDAPI GetMetaDataInternalInterfaceFromPublic(
IUnknown *pv, // [IN] Given interface.
REFIID riid, // [IN] desired interface
void **ppv) // [OUT] returned interface
// This function gets the public scopeless interface given the internal
// scopeless interface.
// ---------------------------------------------------------------------------
-STDAPI GetMetaDataPublicInterfaceFromInternal(
+DLLEXPORT STDAPI GetMetaDataPublicInterfaceFromInternal(
void *pv, // [IN] Given interface.
REFIID riid, // [IN] desired interface.
void **ppv) // [OUT] returned interface
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_initialize(
const char* exePath,
const char* appDomainFriendlyName,
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_shutdown(
void* hostHandle,
unsigned int domainId)
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_shutdown_2(
void* hostHandle,
unsigned int domainId,
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_create_delegate(
void* hostHandle,
unsigned int domainId,
// HRESULT indicating status of the operation. S_OK if the assembly was successfully executed
//
extern "C"
+DLLEXPORT
int coreclr_execute_assembly(
void* hostHandle,
unsigned int domainId,
#include "gcenv.h"
#include "gc.h"
+#ifndef DLLEXPORT
#ifdef _MSC_VER
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __attribute__ ((visibility ("default")))
#endif // _MSC_VER
+#endif // DLLEXPORT
#define GC_EXPORT extern "C" DLLEXPORT
#include <wchar.h>
#include <stdio.h>
-#ifndef PUB
-// PUB is defined to influence method visibility for some compilers.
-#define PUB
-#endif // !PUB
+#ifndef DLLEXPORT
+// DLLEXPORT is defined to influence method visibility for some compilers.
+#define DLLEXPORT
+#endif // !DLLEXPORT
#endif // __CrtWrap_h__
-
/*****************************************************************************/
-extern "C" void __stdcall jitStartup(ICorJitHost* jitHost)
+extern "C" DLLEXPORT void __stdcall jitStartup(ICorJitHost* jitHost)
{
if (g_jitInitialized)
{
#ifndef FEATURE_MERGE_JIT_AND_ENGINE
-extern "C" BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved)
+extern "C" DLLEXPORT BOOL WINAPI DllMain(HANDLE hInstance, DWORD dwReason, LPVOID pvReserved)
{
if (dwReason == DLL_PROCESS_ATTACH)
{
return (g_hInst);
}
-extern "C" void __stdcall sxsJitStartup(CoreClrCallbacks const& cccallbacks)
+extern "C" DLLEXPORT void __stdcall sxsJitStartup(CoreClrCallbacks const& cccallbacks)
{
#ifndef SELF_NO_HOST
InitUtilcode(cccallbacks);
ICorJitCompiler* g_realJitCompiler = nullptr;
-ICorJitCompiler* __stdcall getJit()
+DLLEXPORT ICorJitCompiler* __stdcall getJit()
{
if (ILJitter == nullptr)
{
print "};";
print "";
- print "const NativeStringResourceTable " tableName " = {";
+ print "const NativeStringResourceTable " tableName " __attribute__((visibility(\"default\"))) = {";
print numEntries ",";
print arrayName "};";
}
#define VOID void
-#define PUB __attribute__((visibility("default")))
-
#else // __GNUC__
typedef char * va_list;
PAL_INITIALIZE_ENSURE_STACK_SIZE | \
PAL_INITIALIZE_REGISTER_SIGNALS)
-typedef DWORD (PALAPI *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
+typedef DWORD (PALAPI_NOEXPORT *PTHREAD_START_ROUTINE)(LPVOID lpThreadParameter);
typedef PTHREAD_START_ROUTINE LPTHREAD_START_ROUTINE;
/******************* PAL-Specific Entrypoints *****************************/
ResumeThread(
IN HANDLE hThread);
-typedef VOID (PALAPI *PAPCFUNC)(ULONG_PTR dwParam);
+typedef VOID (PALAPI_NOEXPORT *PAPCFUNC)(ULONG_PTR dwParam);
PALIMPORT
DWORD
#define OpenFileMapping OpenFileMappingA
#endif
-typedef INT_PTR (PALAPI *FARPROC)();
+typedef INT_PTR (PALAPI_NOEXPORT *FARPROC)();
PALIMPORT
LPVOID
TRUE - success
FALSE - failure (incorrect ptr, etc.)
--*/
-BOOL
+BOOL
PALAPI
PAL_LOADUnloadPEFile(void * ptr);
#define GetModuleFileNameEx GetModuleFileNameExW
#endif
-// Get base address of the module containing a given symbol
+// Get base address of the module containing a given symbol
PALAPI
LPCVOID
PAL_GetSymbolModuleBase(void *symbol);
DWORDLONG ullAvailExtendedVirtual;
} MEMORYSTATUSEX, *LPMEMORYSTATUSEX;
-PALIMPORT
+PALIMPORT
BOOL
PALAPI
GlobalMemoryStatusEx(
#ifndef FEATURE_PAL_SXS
-typedef LONG (PALAPI *PTOP_LEVEL_EXCEPTION_FILTER)(
+typedef LONG (PALAPI_NOEXPORT *PTOP_LEVEL_EXCEPTION_FILTER)(
struct _EXCEPTION_POINTERS *ExceptionInfo);
typedef PTOP_LEVEL_EXCEPTION_FILTER LPTOP_LEVEL_EXCEPTION_FILTER;
#else // FEATURE_PAL_SXS
-typedef EXCEPTION_DISPOSITION (PALAPI *PVECTORED_EXCEPTION_HANDLER)(
+typedef EXCEPTION_DISPOSITION (PALAPI_NOEXPORT *PVECTORED_EXCEPTION_HANDLER)(
struct _EXCEPTION_POINTERS *ExceptionPointers);
#endif // FEATURE_PAL_SXS
#define _TRUNCATE ((size_t)-1)
#endif
-PALIMPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t) THROW_DECL;
+PALIMPORT DLLEXPORT errno_t __cdecl memcpy_s(void *, size_t, const void *, size_t) THROW_DECL;
PALIMPORT errno_t __cdecl memmove_s(void *, size_t, const void *, size_t);
PALIMPORT char * __cdecl _strlwr(char *);
-PALIMPORT int __cdecl _stricmp(const char *, const char *);
-PALIMPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
+PALIMPORT DLLEXPORT int __cdecl _stricmp(const char *, const char *);
+PALIMPORT DLLEXPORT int __cdecl vsprintf_s(char *, size_t, const char *, va_list);
PALIMPORT char * __cdecl _gcvt_s(char *, int, double, int);
PALIMPORT int __cdecl __iscsym(int);
PALIMPORT unsigned char * __cdecl _mbsinc(const unsigned char *);
PALIMPORT unsigned char * __cdecl _mbsninc(const unsigned char *, size_t);
PALIMPORT unsigned char * __cdecl _mbsdec(const unsigned char *, const unsigned char *);
-PALIMPORT int __cdecl _wcsicmp(const WCHAR *, const WCHAR*);
+PALIMPORT DLLEXPORT int __cdecl _wcsicmp(const WCHAR *, const WCHAR*);
PALIMPORT int __cdecl _wcsnicmp(const WCHAR *, const WCHAR *, size_t);
PALIMPORT int __cdecl _vsnprintf(char *, size_t, const char *, va_list);
-PALIMPORT int __cdecl _vsnprintf_s(char *, size_t, size_t, const char *, va_list);
-PALIMPORT int __cdecl _vsnwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, va_list);
-PALIMPORT int __cdecl _snwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, ...);
-PALIMPORT int __cdecl _snprintf_s(char *, size_t, size_t, const char *, ...);
-PALIMPORT int __cdecl sprintf_s(char *, size_t, const char *, ... );
-PALIMPORT int __cdecl swprintf_s(WCHAR *, size_t, const WCHAR *, ... );
+PALIMPORT DLLEXPORT int __cdecl _vsnprintf_s(char *, size_t, size_t, const char *, va_list);
+PALIMPORT DLLEXPORT int __cdecl _vsnwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, va_list);
+PALIMPORT DLLEXPORT int __cdecl _snwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, ...);
+PALIMPORT DLLEXPORT int __cdecl _snprintf_s(char *, size_t, size_t, const char *, ...);
+PALIMPORT DLLEXPORT int __cdecl sprintf_s(char *, size_t, const char *, ... );
+PALIMPORT DLLEXPORT int __cdecl swprintf_s(WCHAR *, size_t, const WCHAR *, ... );
PALIMPORT int __cdecl _snwprintf_s(WCHAR *, size_t, size_t, const WCHAR *, ...);
PALIMPORT int __cdecl vswprintf_s( WCHAR *, size_t, const WCHAR *, va_list);
-PALIMPORT int __cdecl sscanf_s(const char *, const char *, ...);
-PALIMPORT errno_t __cdecl _itow_s(int, WCHAR *, size_t, int);
+PALIMPORT DLLEXPORT int __cdecl sscanf_s(const char *, const char *, ...);
+PALIMPORT DLLEXPORT errno_t __cdecl _itow_s(int, WCHAR *, size_t, int);
-PALIMPORT size_t __cdecl PAL_wcslen(const WCHAR *);
-PALIMPORT int __cdecl PAL_wcscmp(const WCHAR*, const WCHAR*);
-PALIMPORT int __cdecl PAL_wcsncmp(const WCHAR *, const WCHAR *, size_t);
-PALIMPORT WCHAR * __cdecl PAL_wcscat(WCHAR *, const WCHAR *);
+PALIMPORT DLLEXPORT size_t __cdecl PAL_wcslen(const WCHAR *);
+PALIMPORT DLLEXPORT int __cdecl PAL_wcscmp(const WCHAR*, const WCHAR*);
+PALIMPORT DLLEXPORT int __cdecl PAL_wcsncmp(const WCHAR *, const WCHAR *, size_t);
+PALIMPORT DLLEXPORT WCHAR * __cdecl PAL_wcscat(WCHAR *, const WCHAR *);
PALIMPORT WCHAR * __cdecl PAL_wcsncat(WCHAR *, const WCHAR *, size_t);
PALIMPORT WCHAR * __cdecl PAL_wcscpy(WCHAR *, const WCHAR *);
PALIMPORT WCHAR * __cdecl PAL_wcsncpy(WCHAR *, const WCHAR *, size_t);
-PALIMPORT const WCHAR * __cdecl PAL_wcschr(const WCHAR *, WCHAR);
-PALIMPORT const WCHAR * __cdecl PAL_wcsrchr(const WCHAR *, WCHAR);
+PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcschr(const WCHAR *, WCHAR);
+PALIMPORT DLLEXPORT const WCHAR * __cdecl PAL_wcsrchr(const WCHAR *, WCHAR);
PALIMPORT WCHAR _WConst_return * __cdecl PAL_wcspbrk(const WCHAR *, const WCHAR *);
-PALIMPORT WCHAR _WConst_return * __cdecl PAL_wcsstr(const WCHAR *, const WCHAR *);
+PALIMPORT DLLEXPORT WCHAR _WConst_return * __cdecl PAL_wcsstr(const WCHAR *, const WCHAR *);
PALIMPORT WCHAR * __cdecl PAL_wcstok(WCHAR *, const WCHAR *);
-PALIMPORT size_t __cdecl PAL_wcscspn(const WCHAR *, const WCHAR *);
+PALIMPORT DLLEXPORT size_t __cdecl PAL_wcscspn(const WCHAR *, const WCHAR *);
PALIMPORT int __cdecl PAL_swprintf(WCHAR *, const WCHAR *, ...);
PALIMPORT int __cdecl PAL_vswprintf(WCHAR *, const WCHAR *, va_list);
PALIMPORT int __cdecl PAL_swscanf(const WCHAR *, const WCHAR *, ...);
PALIMPORT LONG __cdecl PAL_wcstol(const WCHAR *, WCHAR **, int);
-PALIMPORT ULONG __cdecl PAL_wcstoul(const WCHAR *, WCHAR **, int);
+PALIMPORT DLLEXPORT ULONG __cdecl PAL_wcstoul(const WCHAR *, WCHAR **, int);
PALIMPORT size_t __cdecl PAL_wcsspn (const WCHAR *, const WCHAR *);
PALIMPORT double __cdecl PAL_wcstod(const WCHAR *, WCHAR **);
PALIMPORT int __cdecl PAL_iswalpha(WCHAR);
-PALIMPORT int __cdecl PAL_iswprint(WCHAR);
+PALIMPORT DLLEXPORT int __cdecl PAL_iswprint(WCHAR);
PALIMPORT int __cdecl PAL_iswupper(WCHAR);
-PALIMPORT int __cdecl PAL_iswspace(WCHAR);
+PALIMPORT DLLEXPORT int __cdecl PAL_iswspace(WCHAR);
PALIMPORT int __cdecl PAL_iswdigit(WCHAR);
PALIMPORT int __cdecl PAL_iswxdigit(WCHAR);
PALIMPORT WCHAR __cdecl PAL_towlower(WCHAR);
PALIMPORT WCHAR __cdecl PAL_towupper(WCHAR);
PALIMPORT WCHAR * __cdecl _wcslwr(WCHAR *);
-PALIMPORT ULONGLONG _wcstoui64(const WCHAR *, WCHAR **, int);
-PALIMPORT errno_t __cdecl _i64tow_s(long long, WCHAR *, size_t, int);
+PALIMPORT DLLEXPORT ULONGLONG _wcstoui64(const WCHAR *, WCHAR **, int);
+PALIMPORT DLLEXPORT errno_t __cdecl _i64tow_s(long long, WCHAR *, size_t, int);
PALIMPORT int __cdecl _wtoi(const WCHAR *);
#ifdef __cplusplus
}
#endif
-PALIMPORT void * __cdecl malloc(size_t);
-PALIMPORT void __cdecl free(void *);
-PALIMPORT void * __cdecl realloc(void *, size_t);
+PALIMPORT DLLEXPORT void * __cdecl malloc(size_t);
+PALIMPORT DLLEXPORT void __cdecl free(void *);
+PALIMPORT DLLEXPORT void * __cdecl realloc(void *, size_t);
PALIMPORT char * __cdecl _strdup(const char *);
#if defined(_MSC_VER)
PALIMPORT PAL_NORETURN void __cdecl exit(int);
int __cdecl atexit(void (__cdecl *function)(void));
-PALIMPORT void __cdecl qsort(void *, size_t, size_t, int (__cdecl *)(const void *, const void *));
+PALIMPORT DLLEXPORT void __cdecl qsort(void *, size_t, size_t, int (__cdecl *)(const void *, const void *));
PALIMPORT void * __cdecl bsearch(const void *, const void *, size_t, size_t,
int (__cdecl *)(const void *, const void *));
PALIMPORT int __cdecl _open_osfhandle(INT_PTR, int);
PALIMPORT int __cdecl _close(int);
-PALIMPORT int __cdecl _flushall();
+PALIMPORT DLLEXPORT int __cdecl _flushall();
#ifdef PAL_STDCPP_COMPAT
PALIMPORT int __cdecl PAL_fclose(PAL_FILE *);
PALIMPORT void __cdecl PAL_setbuf(PAL_FILE *, char*);
-PALIMPORT int __cdecl PAL_fflush(PAL_FILE *);
+PALIMPORT DLLEXPORT int __cdecl PAL_fflush(PAL_FILE *);
PALIMPORT size_t __cdecl PAL_fwrite(const void *, size_t, size_t, PAL_FILE *);
PALIMPORT size_t __cdecl PAL_fread(void *, size_t, size_t, PAL_FILE *);
PALIMPORT char * __cdecl PAL_fgets(char *, int, PAL_FILE *);
PALIMPORT int __cdecl PAL_fputs(const char *, PAL_FILE *);
PALIMPORT int __cdecl PAL_fputc(int c, PAL_FILE *stream);
PALIMPORT int __cdecl PAL_putchar(int c);
-PALIMPORT int __cdecl PAL_fprintf(PAL_FILE *, const char *, ...);
+PALIMPORT DLLEXPORT int __cdecl PAL_fprintf(PAL_FILE *, const char *, ...);
PALIMPORT int __cdecl PAL_vfprintf(PAL_FILE *, const char *, va_list);
PALIMPORT int __cdecl PAL_fseek(PAL_FILE *, LONG, int);
PALIMPORT LONG __cdecl PAL_ftell(PAL_FILE *);
PALIMPORT int __cdecl PAL_ungetc(int c, PAL_FILE *stream);
PALIMPORT int __cdecl PAL_setvbuf(PAL_FILE *stream, char *, int, size_t);
PALIMPORT WCHAR * __cdecl PAL_fgetws(WCHAR *, int, PAL_FILE *);
-PALIMPORT int __cdecl PAL_fwprintf(PAL_FILE *, const WCHAR *, ...);
+PALIMPORT DLLEXPORT int __cdecl PAL_fwprintf(PAL_FILE *, const WCHAR *, ...);
PALIMPORT int __cdecl PAL_vfwprintf(PAL_FILE *, const WCHAR *, va_list);
PALIMPORT int __cdecl PAL_wprintf(const WCHAR*, ...);
PALIMPORT int __cdecl rand(void);
PALIMPORT void __cdecl srand(unsigned int);
-PALIMPORT int __cdecl printf(const char *, ...);
+PALIMPORT DLLEXPORT int __cdecl printf(const char *, ...);
PALIMPORT int __cdecl vprintf(const char *, va_list);
#ifdef _MSC_VER
#define PAL_get_caller 0
#endif
-PALIMPORT PAL_FILE * __cdecl PAL_get_stdout(int caller);
+PALIMPORT DLLEXPORT PAL_FILE * __cdecl PAL_get_stdout(int caller);
PALIMPORT PAL_FILE * __cdecl PAL_get_stdin(int caller);
-PALIMPORT PAL_FILE * __cdecl PAL_get_stderr(int caller);
-PALIMPORT int * __cdecl PAL_errno(int caller);
+PALIMPORT DLLEXPORT PAL_FILE * __cdecl PAL_get_stderr(int caller);
+PALIMPORT DLLEXPORT int * __cdecl PAL_errno(int caller);
#ifdef PAL_STDCPP_COMPAT
#define PAL_stdout (PAL_get_stdout(PAL_get_caller))
#else
#define PALIMPORT __declspec(dllimport)
#endif
+#define DLLEXPORT __declspec(dllexport)
#define PAL_NORETURN __declspec(noreturn)
#else
#define PALIMPORT
+#define DLLEXPORT __attribute__((visibility("default")))
#define PAL_NORETURN __attribute__((noreturn))
#endif
-#define PALAPI __cdecl
-#define PALAPIV __cdecl
+#define PALAPI DLLEXPORT __cdecl
+#define PALAPI_NOEXPORT __cdecl
+#define PALAPIV __cdecl
////////////////////////////////////////////////////////////////////////
// Type attribute stuff
#ifdef INITGUID
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
- EXTERN_C const GUID DECLSPEC_SELECTANY name \
+ EXTERN_C DLLEXPORT const GUID DECLSPEC_SELECTANY name \
= { l, w1, w2, { b1, b2, b3, b4, b5, b6, b7, b8 } }
#else
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8) \
STDAPI_(BSTR) SysAllocString(const OLECHAR*);
STDAPI_(BSTR) SysAllocStringLen(const OLECHAR*, UINT);
-STDAPI_(BSTR) SysAllocStringByteLen(const char *, UINT);
+DLLEXPORT STDAPI_(BSTR) SysAllocStringByteLen(const char *, UINT);
STDAPI_(void) SysFreeString(BSTR);
STDAPI_(UINT) SysStringLen(BSTR);
-STDAPI_(UINT) SysStringByteLen(BSTR);
+DLLEXPORT STDAPI_(UINT) SysStringByteLen(BSTR);
typedef double DATE;
${LIBUNWIND_OBJECTS}
)
-add_library(tracepointprovider
- STATIC
- misc/tracepointprovider.cpp
-)
+# There is only one function exported in 'tracepointprovider.cpp' namely 'PAL_InitializeTracing',
+# which is guarded with '#if defined(__linux__)'. On macOS, Xcode issues the following warning:
+#
+# > warning: /Applications/Xcode-9.4.1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ranlib:
+# > warning for library: libtracepointprovider.a the table of contents is empty (no object file members in the library define global symbols)
+#
+if(CMAKE_SYSTEM_NAME STREQUAL Linux)
+ add_library(tracepointprovider
+ STATIC
+ misc/tracepointprovider.cpp
+ )
+endif(CMAKE_SYSTEM_NAME STREQUAL Linux)
if(CMAKE_SYSTEM_NAME STREQUAL Darwin)
find_library(COREFOUNDATION CoreFoundation)
See MSDN for more details.
--*/
-
PAL_time_t
__cdecl
PAL_mktime(struct PAL_tm *tm)
return result;
}
-
PALIMPORT
void __cdecl
PAL_qsort(void *base, size_t nmemb, size_t size,
PERF_EXIT(qsort);
}
+DLLEXPORT
PALIMPORT
void * __cdecl
PAL_bsearch(const void *key, const void *base, size_t nmemb, size_t size,
Overlapping buffer-safe version of memcpy.
See MSDN doc for memcpy
--*/
+DLLEXPORT
EXTERN_C
PALIMPORT
void *PAL_memcpy (void *dest, const void *src, size_t count)
{
#endif // __cplusplus
-typedef BOOL (PALAPI *PDLLMAIN)(HINSTANCE, DWORD, LPVOID); /* entry point of module */
-typedef HINSTANCE (PALAPI *PREGISTER_MODULE)(LPCSTR); /* used to create the HINSTANCE for above DLLMain entry point */
-typedef VOID (PALAPI *PUNREGISTER_MODULE)(HINSTANCE); /* used to cleanup the HINSTANCE for above DLLMain entry point */
+typedef BOOL (PALAPI_NOEXPORT *PDLLMAIN)(HINSTANCE, DWORD, LPVOID); /* entry point of module */
+typedef HINSTANCE (PALAPI_NOEXPORT *PREGISTER_MODULE)(LPCSTR); /* used to create the HINSTANCE for above DLLMain entry point */
+typedef VOID (PALAPI_NOEXPORT *PUNREGISTER_MODULE)(HINSTANCE); /* used to cleanup the HINSTANCE for above DLLMain entry point */
typedef struct _MODSTRUCT
{
#if !HAVE_COREFOUNDATION
-CONST UnicodeDataRec UnicodeData[] = {
+CONST UnicodeDataRec UnicodeData[] DLLEXPORT = {
{ 0x0000, 0x0020, 0x0000, 0 },
{ 0xffe0, 0x0010, 0x0000, 13 },
};
-CONST UINT UNICODE_DATA_SIZE = sizeof(UnicodeData)/sizeof(UnicodeDataRec);
-CONST UINT UNICODE_DATA_DIRECT_ACCESS = 256;
+CONST UINT UNICODE_DATA_SIZE DLLEXPORT = sizeof(UnicodeData)/sizeof(UnicodeDataRec);
+CONST UINT UNICODE_DATA_DIRECT_ACCESS DLLEXPORT = 256;
#endif // !HAVE_COREFOUNDATION
Note: The BSD implementation can cause
memory leaks. See man pages for more details.
--*/
+DLLEXPORT
int
__cdecl
_putenv( const char * envstring )
See MSDN for more details.
--*/
-char * __cdecl PAL_getenv(const char *varname)
+DLLEXPORT char * __cdecl PAL_getenv(const char *varname)
{
char *retval;
#include "pal_char16.h"
#include "pal_mstypes.h"
+#ifndef DLLEXPORT
+#ifdef _MSC_VER
+#define DLLEXPORT __declspec(dllexport)
+#else
+#define DLLEXPORT __attribute__ ((visibility ("default")))
+#endif // _MSC_VER
+#endif // !DLLEXPORT
+
typedef __builtin_va_list va_list;
// The ifdef below are to accommodate Unix build
*
*******************************************************************************/
-errno_t __cdecl memcpy_s(
+DLLEXPORT errno_t __cdecl memcpy_s(
void * dst,
size_t sizeInBytes,
const void * src,
*Exceptions:
*
*******************************************************************************/
-
-int sprintf_s (
+DLLEXPORT int sprintf_s (
char *string,
size_t sizeInBytes,
const char *format,
return ret;
}
-int _snprintf_s (
+DLLEXPORT int _snprintf_s (
char *string,
size_t sizeInBytes,
size_t count,
*
*******************************************************************************/
-int __cdecl sscanf_s (
+DLLEXPORT int __cdecl sscanf_s (
const char *string,
const char *format,
...
*
*******************************************************************************/
-int __cdecl swprintf_s (
+DLLEXPORT int __cdecl swprintf_s (
wchar_t *string,
size_t sizeInWords,
const wchar_t *format,
return ret;
}
-int __cdecl _snwprintf_s (
+DLLEXPORT int __cdecl _snwprintf_s (
wchar_t *string,
size_t sizeInWords,
size_t count,
return -1;
}
-int __cdecl vsprintf_s (
+DLLEXPORT int __cdecl vsprintf_s (
char *string,
size_t sizeInBytes,
const char *format,
return retvalue;
}
-int __cdecl _vsnprintf_s (
+DLLEXPORT int __cdecl _vsnprintf_s (
char *string,
size_t sizeInBytes,
size_t count,
return -1;
}
-int __cdecl vswprintf_s (
+DLLEXPORT int __cdecl vswprintf_s (
wchar_t *string,
size_t sizeInWords,
const wchar_t *format,
return retvalue;
}
-int __cdecl _vsnwprintf_s (
+DLLEXPORT int __cdecl _vsnwprintf_s (
wchar_t *string,
size_t sizeInWords,
size_t count,
* via repeated calls.
*
*******************************************************************************/
-
+#include "pal/palinternal.h"
#include <string.h>
#include <errno.h>
#include <limits.h>
and return pointer to buffer. */
#ifdef _SECURE_ITOA
-errno_t __cdecl _itox_s (
+DLLEXPORT errno_t __cdecl _itox_s (
int val,
TCHAR *buf,
size_t sizeInTChars,
/* Actual functions just call conversion helper with neg flag set correctly,
and return pointer to buffer. */
-errno_t __cdecl _i64tox_s (
+DLLEXPORT errno_t __cdecl _i64tox_s (
long long val,
TCHAR *buf,
size_t sizeInTChars,
#include <palsuite.h>
extern "C"
-int InitializeDllTest1()
+int
+PALAPI
+InitializeDllTest1()
{
PAL_SetInitializeDLLFlags(PAL_INITIALIZE_DLL | PAL_INITIALIZE_REGISTER_SIGNALS);
return PAL_InitializeDLL();
BOOL bExcept = FALSE;
extern "C"
-int DllTest1()
+int
+PALAPI
+DllTest1()
{
Trace("Starting pal_sxs test1 DllTest1\n");
#include <palsuite.h>
extern "C"
-int InitializeDllTest2()
+int
+PALAPI
+InitializeDllTest2()
{
PAL_SetInitializeDLLFlags(PAL_INITIALIZE_DLL | PAL_INITIALIZE_REGISTER_SIGNALS);
return PAL_InitializeDLL();
BOOL bExcept = FALSE;
extern "C"
-int DllTest2()
+int
+PALAPI
+DllTest2()
{
Trace("Starting pal_sxs test1 DllTest2\n");
**===========================================================================*/
#include <palsuite.h>
-typedef int (PALAPI *SIMPLEFUNCTION)(int);
+typedef int (PALAPI_NOEXPORT *SIMPLEFUNCTION)(int);
/* SHLEXT is defined only for Unix variants */
#if defined(SHLEXT)
* return value = BSTR, NULL if the allocation failed.
*
***********************************************************************/
-STDAPI_(BSTR) SysAllocStringLen(const OLECHAR *psz, UINT len)
+DLLEXPORT STDAPI_(BSTR) SysAllocStringLen(const OLECHAR *psz, UINT len)
{
BSTR bstr;
* None
*
***********************************************************************/
-STDAPI_(void) SysFreeString(BSTR bstr)
+DLLEXPORT STDAPI_(void) SysFreeString(BSTR bstr)
{
if(bstr == NULL)
return;
* return value = unsigned int, length in characters.
*
***********************************************************************/
-STDAPI_(unsigned int)
+DLLEXPORT STDAPI_(unsigned int)
SysStringLen(BSTR bstr)
{
if(bstr == NULL)
#include "common.h"
-STDAPI_(LPVOID) CoTaskMemAlloc(SIZE_T cb)
+DLLEXPORT STDAPI_(LPVOID) CoTaskMemAlloc(SIZE_T cb)
{
return LocalAlloc(LMEM_FIXED, cb);
}
-STDAPI_(LPVOID) CoTaskMemRealloc(LPVOID pv, SIZE_T cb)
+DLLEXPORT STDAPI_(LPVOID) CoTaskMemRealloc(LPVOID pv, SIZE_T cb)
{
return LocalReAlloc(pv, cb, LMEM_MOVEABLE);
}
-STDAPI_(void) CoTaskMemFree(LPVOID pv)
+DLLEXPORT STDAPI_(void) CoTaskMemFree(LPVOID pv)
{
LocalFree(pv);
}
#ifdef FEATURE_PAL
#include "resourcestring.h"
#define NATIVE_STRING_RESOURCE_NAME mscorrc_debug
-DECLARE_NATIVE_STRING_RESOURCE_TABLE(NATIVE_STRING_RESOURCE_NAME);
+__attribute__((visibility("default"))) DECLARE_NATIVE_STRING_RESOURCE_TABLE(NATIVE_STRING_RESOURCE_NAME);
#endif
#include "sstring.h"
#include "stringarraylist.h"
}
#endif // DACCESS_COMPILE
- DEBUG_NOINLINE static void HolderEnter(PEFileListLock *pThis) PUB
+ DEBUG_NOINLINE static void HolderEnter(PEFileListLock *pThis)
{
WRAPPER_NO_CONTRACT;
ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT;
pThis->Enter();
}
- DEBUG_NOINLINE static void HolderLeave(PEFileListLock *pThis) PUB
+ DLLEXPORT DEBUG_NOINLINE static void HolderLeave(PEFileListLock *pThis)
{
WRAPPER_NO_CONTRACT;
ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT;
#endif // FEATURE_COMINTEROP
extern "C"
+DLLEXPORT
HRESULT GetCLRRuntimeHost(REFIID riid, IUnknown **ppUnk)
{
WRAPPER_NO_CONTRACT;
void SpinEnter();
#ifndef DACCESS_COMPILE
- DEBUG_NOINLINE static void AcquireLock(CrstBase *c) PUB {
+ DEBUG_NOINLINE static void AcquireLock(CrstBase *c) {
WRAPPER_NO_CONTRACT;
ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT;
c->Enter();
}
- DEBUG_NOINLINE static void ReleaseLock(CrstBase *c) PUB {
+ DLLEXPORT DEBUG_NOINLINE static void ReleaseLock(CrstBase *c) {
WRAPPER_NO_CONTRACT;
ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT;
c->Leave();
// Argument:
// input: c - the lock to be checked.
// Note: Throws
- static void AcquireLock(CrstBase * c) PUB
- {
+ DLLEXPORT static void AcquireLock(CrstBase * c)
+ {
SUPPORTS_DAC;
if (c->GetEnterCount() != 0)
{
}
};
- static void ReleaseLock(CrstBase *c) PUB
- {
+ DLLEXPORT static void ReleaseLock(CrstBase *c)
+ {
SUPPORTS_DAC;
};
#endif // DACCESS_COMPILE
void DebugTryCrst(CrstBase * pLock);
#endif
#endif // __crst_h__
-
-
// LockHolder holds the lock of the element, not the element itself
- DEBUG_NOINLINE static void LockHolderEnter(Entry_t *pThis) PUB
+ DLLEXPORT DEBUG_NOINLINE static void LockHolderEnter(Entry_t *pThis)
{
WRAPPER_NO_CONTRACT;
ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT;
pThis->Enter();
}
- DEBUG_NOINLINE static void LockHolderLeave(Entry_t *pThis) PUB
+ DLLEXPORT DEBUG_NOINLINE static void LockHolderLeave(Entry_t *pThis)
{
WRAPPER_NO_CONTRACT;
ANNOTATION_SPECIAL_HOLDER_CALLER_NEEDS_DYNAMIC_CONTRACT;