diff options
author | Aditya Mandaleeka <adityam@microsoft.com> | 2016-03-30 17:04:53 -0700 |
---|---|---|
committer | Aditya Mandaleeka <adityam@microsoft.com> | 2016-03-30 17:04:53 -0700 |
commit | 064744a23663cb0a34c6364618c3be308ee87933 (patch) | |
tree | e4868776bef6365e6e1044010788c47fe3b0dd19 /tests/src | |
parent | 77f4b171604a66b14e85f25be2167aaa09e4d5ba (diff) | |
download | coreclr-064744a23663cb0a34c6364618c3be308ee87933.tar.gz coreclr-064744a23663cb0a34c6364618c3be308ee87933.tar.bz2 coreclr-064744a23663cb0a34c6364618c3be308ee87933.zip |
Move dllexport to platformdefines.h.
Diffstat (limited to 'tests/src')
-rw-r--r-- | tests/src/Common/Platform/platformdefines.h | 8 | ||||
-rw-r--r-- | tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp | 15 |
2 files changed, 13 insertions, 10 deletions
diff --git a/tests/src/Common/Platform/platformdefines.h b/tests/src/Common/Platform/platformdefines.h index 7853a3b7c7..69561a0435 100644 --- a/tests/src/Common/Platform/platformdefines.h +++ b/tests/src/Common/Platform/platformdefines.h @@ -24,6 +24,8 @@ typedef unsigned error_t; typedef HANDLE THREAD_ID; +#define DLL_EXPORT __declspec(dllexport) + #else // !WINDOWS #include <pthread.h> @@ -52,6 +54,12 @@ typedef const WCHAR *LPCWSTR, *PCWSTR; #endif #endif +#if __GNUC__ >= 4 +#define DLL_EXPORT __attribute__ ((visibility ("default"))) +#else +#define DLL_EXPORT +#endif + LPWSTR HackyConvertToWSTR(char* pszInput); #define FS_SEPERATOR L("/") diff --git a/tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp b/tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp index 2d237b8a27..b6405975a9 100644 --- a/tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp +++ b/tests/src/Exceptions/ForeignThread/ForeignThreadExceptionsNative.cpp @@ -9,16 +9,11 @@ #include <thread> #pragma warning(pop) - -#if defined _WIN32 - #define DLL_EXPORT __declspec(dllexport) -#else - #if __GNUC__ >= 4 - #define DLL_EXPORT __attribute__ ((visibility ("default"))) - #else - #define DLL_EXPORT - #endif -#endif //_WIN32 +// Work around typedef redefinition: platformdefines.h defines error_t +// as unsigned while it's defined as int in errno.h. +#define error_t error_t_ignore +#include "platformdefines.h" +#undef error_t typedef void (*PFNACTION1)(); |