summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configurecompiler.cmake1
-rw-r--r--src/corefx/System.Globalization.Native/CMakeLists.txt1
-rw-r--r--src/corefx/System.Globalization.Native/pal_calendarData.c12
-rw-r--r--src/corefx/System.Globalization.Native/pal_icushim.c12
-rw-r--r--src/inc/cor.h4
-rw-r--r--src/inc/corinfo.h4
-rw-r--r--src/inc/holder.h4
-rw-r--r--src/inc/palclr.h4
-rw-r--r--src/pal/inc/pal.h8
-rw-r--r--src/scripts/genEtwProvider.py4
-rw-r--r--src/vm/appdomain.cpp26
-rw-r--r--src/vm/appdomain.hpp3
12 files changed, 34 insertions, 49 deletions
diff --git a/configurecompiler.cmake b/configurecompiler.cmake
index dd0ee96a68..f5eb063453 100644
--- a/configurecompiler.cmake
+++ b/configurecompiler.cmake
@@ -477,6 +477,7 @@ if (CLR_CMAKE_PLATFORM_UNIX)
else()
add_compile_options(-Wno-unused-variable)
add_compile_options(-Wno-unused-but-set-variable)
+ add_compile_options(-fms-extensions)
endif()
# Some architectures (e.g., ARM) assume char type is unsigned while CoreCLR assumes char is signed
diff --git a/src/corefx/System.Globalization.Native/CMakeLists.txt b/src/corefx/System.Globalization.Native/CMakeLists.txt
index 5e38c6bd12..3d2518d45b 100644
--- a/src/corefx/System.Globalization.Native/CMakeLists.txt
+++ b/src/corefx/System.Globalization.Native/CMakeLists.txt
@@ -38,7 +38,6 @@ endif()
include(configure.cmake)
add_compile_options(-fPIC)
-add_compile_options(-Wno-incompatible-pointer-types-discards-qualifiers)
set(NATIVEGLOBALIZATION_SOURCES
pal_calendarData.c
diff --git a/src/corefx/System.Globalization.Native/pal_calendarData.c b/src/corefx/System.Globalization.Native/pal_calendarData.c
index be0cc9b6b8..07f8a6f290 100644
--- a/src/corefx/System.Globalization.Native/pal_calendarData.c
+++ b/src/corefx/System.Globalization.Native/pal_calendarData.c
@@ -377,11 +377,11 @@ static void EnumUResourceBundle(const UResourceBundle* bundle,
}
}
-static void CloseResBundle(const UResourceBundle* rootResBundle,
- const UResourceBundle* calResBundle,
- const UResourceBundle* targetCalResBundle,
- const UResourceBundle* erasColResBundle,
- const UResourceBundle* erasResBundle)
+static void CloseResBundle(UResourceBundle* rootResBundle,
+ UResourceBundle* calResBundle,
+ UResourceBundle* targetCalResBundle,
+ UResourceBundle* erasColResBundle,
+ UResourceBundle* erasResBundle)
{
ures_close(rootResBundle);
ures_close(calResBundle);
@@ -416,7 +416,7 @@ static int32_t EnumAbbrevEraNames(const char* locale,
while (TRUE)
{
UErrorCode status = U_ZERO_ERROR;
- char* name = GetCalendarName(calendarId);
+ const char* name = GetCalendarName(calendarId);
UResourceBundle* rootResBundle = ures_open(NULL, localeNamePtr, &status);
UResourceBundle* calResBundle = ures_getByKey(rootResBundle, "calendar", NULL, &status);
diff --git a/src/corefx/System.Globalization.Native/pal_icushim.c b/src/corefx/System.Globalization.Native/pal_icushim.c
index ce42af642f..04f73759cd 100644
--- a/src/corefx/System.Globalization.Native/pal_icushim.c
+++ b/src/corefx/System.Globalization.Native/pal_icushim.c
@@ -54,12 +54,12 @@ static int FindICULibs(const char* versionPrefix, char* symbolName, char* symbol
// equal to the version we are built against and less or equal to that version
// plus 20 to give us enough headspace. The ICU seems to version about twice
// a year.
-static const int MinICUVersion = U_ICU_VERSION_MAJOR_NUM;
-static const int MaxICUVersion = MinICUVersion + 20;
-static const int MinMinorICUVersion = 1;
-static const int MaxMinorICUVersion = 5;
-static const int MinSubICUVersion = 1;
-static const int MaxSubICUVersion = 5;
+#define MinICUVersion U_ICU_VERSION_MAJOR_NUM
+#define MaxICUVersion (MinICUVersion + 20)
+#define MinMinorICUVersion 1
+#define MaxMinorICUVersion 5
+#define MinSubICUVersion 1
+#define MaxSubICUVersion 5
// Get filename of an ICU library with the requested version in the name
// There are three possible cases of the version components values:
diff --git a/src/inc/cor.h b/src/inc/cor.h
index 31484f66b8..85ef14d8cb 100644
--- a/src/inc/cor.h
+++ b/src/inc/cor.h
@@ -2195,8 +2195,12 @@ inline ULONG CorSigUncompressData( // return number of bytes of that compre
#if !defined(SELECTANY)
+#if defined(__GNUC__)
+ #define SELECTANY extern __attribute__((weak))
+#else
#define SELECTANY extern __declspec(selectany)
#endif
+#endif
SELECTANY const mdToken g_tkCorEncodeToken[4] ={mdtTypeDef, mdtTypeRef, mdtTypeSpec, mdtBaseType};
diff --git a/src/inc/corinfo.h b/src/inc/corinfo.h
index 412a6cee78..ae6ee2050c 100644
--- a/src/inc/corinfo.h
+++ b/src/inc/corinfo.h
@@ -210,8 +210,12 @@ TODO: Talk about initializing strutures before use
//////////////////////////////////////////////////////////////////////////////////////////////////////////
#if !defined(SELECTANY)
+#if defined(__GNUC__)
+ #define SELECTANY extern __attribute__((weak))
+#else
#define SELECTANY extern __declspec(selectany)
#endif
+#endif
SELECTANY const GUID JITEEVersionIdentifier = { /* d609bed1-7831-49fc-bd49-b6f054dd4d46 */
0xd609bed1,
diff --git a/src/inc/holder.h b/src/inc/holder.h
index c346c736ac..204f807a08 100644
--- a/src/inc/holder.h
+++ b/src/inc/holder.h
@@ -608,7 +608,7 @@ class BaseWrapper : public BaseHolder<TYPE, BASE, DEFAULTVALUE, IS_NULL>
{
return !!(this->m_value != TYPE(value));
}
-#ifdef __llvm__
+#ifdef __GNUC__
// This handles the NULL value that is an int and clang
// doesn't want to convert int to a pointer
FORCEINLINE bool operator==(int value) const
@@ -619,7 +619,7 @@ class BaseWrapper : public BaseHolder<TYPE, BASE, DEFAULTVALUE, IS_NULL>
{
return !!(this->m_value != TYPE((void*)(SIZE_T)value));
}
-#endif // __llvm__
+#endif // __GNUC__
FORCEINLINE const TYPE &operator->() const
{
return this->m_value;
diff --git a/src/inc/palclr.h b/src/inc/palclr.h
index 77b547db56..60b97305eb 100644
--- a/src/inc/palclr.h
+++ b/src/inc/palclr.h
@@ -496,8 +496,12 @@
#if defined(SOURCE_FORMATTING)
#define SELECTANY extern
#else
+#if defined(__GNUC__)
+#define SELECTANY extern __attribute__((weak))
+#else
#define SELECTANY extern __declspec(selectany)
#endif
+#endif
#if defined(SOURCE_FORMATTING)
#define __annotation(x)
#endif
diff --git a/src/pal/inc/pal.h b/src/pal/inc/pal.h
index 0422a8886e..cdb376068e 100644
--- a/src/pal/inc/pal.h
+++ b/src/pal/inc/pal.h
@@ -160,7 +160,7 @@ typedef PVOID NATIVE_LIBRARY_HANDLE;
#endif // CORECLR
#endif // !_MSC_VER
-#if defined(_MSC_VER) || defined(__llvm__)
+#if defined(_MSC_VER)
#define DECLSPEC_ALIGN(x) __declspec(align(x))
#else
#define DECLSPEC_ALIGN(x) __attribute__ ((aligned(x)))
@@ -612,11 +612,11 @@ MessageBoxW(
// From win32.h
#ifndef _CRTIMP
-#ifdef __llvm__
+#ifdef __GNUC__
#define _CRTIMP
-#else // __llvm__
+#else // __GNUC__
#define _CRTIMP __declspec(dllimport)
-#endif // __llvm__
+#endif // __GNUC__
#endif // _CRTIMP
/******************* winbase.h Entrypoints and defines ************************/
diff --git a/src/scripts/genEtwProvider.py b/src/scripts/genEtwProvider.py
index 9f012bfaf0..79a286a501 100644
--- a/src/scripts/genEtwProvider.py
+++ b/src/scripts/genEtwProvider.py
@@ -234,7 +234,7 @@ def genEtwMacroHeader(manifest, exclusion_filename, intermediate):
header_file.write("#define NO_OF_ETW_PROVIDERS " + str(numOfProviders) + "\n")
header_file.write("#define MAX_BYTES_PER_ETW_PROVIDER " + str(nMaxEventBytesPerProvider) + "\n")
- header_file.write("EXTERN_C __declspec(selectany) const BYTE etwStackSupportedEvents[NO_OF_ETW_PROVIDERS][MAX_BYTES_PER_ETW_PROVIDER] = \n{\n")
+ header_file.write("EXTERN_C SELECTANY const BYTE etwStackSupportedEvents[NO_OF_ETW_PROVIDERS][MAX_BYTES_PER_ETW_PROVIDER] = \n{\n")
for providerNode in tree.getElementsByTagName('provider'):
stackSupportedEvents = [0]*nMaxEventBytesPerProvider
@@ -318,4 +318,4 @@ def main(argv):
if __name__ == '__main__':
return_code = main(sys.argv[1:])
- sys.exit(return_code) \ No newline at end of file
+ sys.exit(return_code)
diff --git a/src/vm/appdomain.cpp b/src/vm/appdomain.cpp
index 42e26c99d1..6d68dff1a3 100644
--- a/src/vm/appdomain.cpp
+++ b/src/vm/appdomain.cpp
@@ -3120,32 +3120,6 @@ Assembly* SystemDomain::GetCallersAssembly(StackCrawlMark *stackMark,
return NULL;
}
-/*static*/
-Module* SystemDomain::GetCallersModule(int skip)
-{
- CONTRACTL
- {
- THROWS;
- GC_TRIGGERS;
- MODE_ANY;
- INJECT_FAULT(COMPlusThrowOM(););
- }
- CONTRACTL_END;
-
- GCX_COOP();
-
- CallersData cdata;
- ZeroMemory(&cdata, sizeof(CallersData));
- cdata.skip = skip;
-
- StackWalkFunctions(GetThread(), CallersMethodCallback, &cdata);
-
- if(cdata.pMethod)
- return cdata.pMethod->GetModule();
- else
- return NULL;
-}
-
/*private static*/
StackWalkAction SystemDomain::CallersMethodCallbackWithStackMark(CrawlFrame* pCf, VOID* data)
{
diff --git a/src/vm/appdomain.hpp b/src/vm/appdomain.hpp
index b10ed26df2..6c88127c5b 100644
--- a/src/vm/appdomain.hpp
+++ b/src/vm/appdomain.hpp
@@ -3441,8 +3441,7 @@ public:
//****************************************************************************************
// Methods used to get the callers module and hence assembly and app domain.
- __declspec(deprecated("This method is deprecated, use the version that takes a StackCrawlMark instead"))
- static Module* GetCallersModule(int skip);
+
static MethodDesc* GetCallersMethod(StackCrawlMark* stackMark, AppDomain **ppAppDomain = NULL);
static MethodTable* GetCallersType(StackCrawlMark* stackMark, AppDomain **ppAppDomain = NULL);
static Module* GetCallersModule(StackCrawlMark* stackMark, AppDomain **ppAppDomain = NULL);