diff options
author | Sinan Kaya <41809318+franksinankaya@users.noreply.github.com> | 2019-02-26 05:55:05 -0500 |
---|---|---|
committer | Jan Vorlicek <janvorli@microsoft.com> | 2019-02-26 11:55:05 +0100 |
commit | cbd672eb2735d583ee6fa46aaf599241fdf6face (patch) | |
tree | 9ecf6c0a482c59b426d028a801106573e6f86e6b /tests/src | |
parent | 9901aa14bef2006f614d450ff0e45b6081262de7 (diff) | |
download | coreclr-cbd672eb2735d583ee6fa46aaf599241fdf6face.tar.gz coreclr-cbd672eb2735d583ee6fa46aaf599241fdf6face.tar.bz2 coreclr-cbd672eb2735d583ee6fa46aaf599241fdf6face.zip |
GCC compatibility fixes #7 (#22810)
* Use thread_local for thread local storage on non MSVC targets
* Use local copy of visitor rather than function parameter
* Remove extra class qualifier
* Replace hex number representation in ASM files
* Reorder STDAPI and DLLEXPORT
* Suppress conversion
Suppress warning during hash
add casting
* Remove anonymous struct
src/vm/codeversion.h:112:16: warning: ‘struct NativeCodeVersion::<anonymous union>::SyntheticStorage’ invalid; an anonymous union can only have non-static data members [-fpermissive]
struct SyntheticStorage
* Remove class declaration
Remove extra class declaration
* Remove extern C
* Add implicit paranthesis
src/vm/amd64/virtualcallstubcpu.hpp:735:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses]
resolveInit.toMiss1 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss1)+1) & 0xFF;
^
src/vm/amd64/virtualcallstubcpu.hpp:741:103: warning: suggest parentheses around ‘-’ in operand of ‘&’ [-Wparentheses]
resolveInit.toMiss2 = offsetof(ResolveStub,miss)-(offsetof(ResolveStub,toMiss2)+1) & 0xFF;
Add parenthesis
src/vm/dataimage.cpp:631:55: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
previousRvaInfo->rva == rvaInfo->rva && previousRvaInfo->size >= rvaInfo->size
Add parenthesis
src/debug/daccess/daccess.cpp:6871:29: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
_ASSERTE(peFile == NULL && reflectionModule != NULL || peFile != NULL && reflectionModule == NULL);
Add parenthesis
src/vm/dataimage.cpp:631:57: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
(previousRvaInfo->rva == rvaInfo->rva) && (previousRvaInfo->size >= rvaInfo->size)
* Initialize member 1
src/ilasm/method.cpp:35:36: warning: operation on ‘((Method*)this)->Method::m_ulColumns[0]’ may be undefined [-Wsequence-point]
m_ulColumns[0]=m_ulColumns[0]=0;
* Remove unknown compiler option
* Abstract DLLEXPORT
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/Interop/IJW/FakeMscoree/mscoree.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp b/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp index 49470d3865..99319ec28b 100644 --- a/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp +++ b/tests/src/Interop/IJW/FakeMscoree/mscoree.cpp @@ -4,8 +4,16 @@ #include <windows.h> +#ifndef DLLEXPORT +#ifdef _MSC_VER +#define DLLEXPORT __declspec(dllexport) +#else +#define DLLEXPORT __attribute__((visibility("default"))) +#endif +#endif + // Entrypoint jumped to by IJW dlls when their dllmain is called -extern "C" __declspec(dllexport) BOOL WINAPI _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved) +extern "C" DLLEXPORT BOOL WINAPI _CorDllMain(HINSTANCE hInst, DWORD dwReason, LPVOID lpReserved) { return TRUE; } |