Fix build issue
authorKoundinya Veluri <kouvel@microsoft.com>
Tue, 11 Oct 2016 04:10:31 +0000 (21:10 -0700)
committerKoundinya Veluri <kouvel@microsoft.com>
Wed, 12 Oct 2016 18:44:43 +0000 (11:44 -0700)
Commit migrated from https://github.com/dotnet/coreclr/commit/fbc2311dff2c2c32133ea47ec84e96fadf7ac2bb

src/coreclr/src/mscorlib/src/Internal/Runtime/Augments/RuntimeThread.cs
src/coreclr/src/mscorlib/src/System/Threading/Thread.cs
src/coreclr/src/vm/ecalllist.h

index fa05800..13e0b64 100644 (file)
@@ -137,6 +137,7 @@ namespace Internal.Runtime.Augments
 #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT
         }
 
+#if FEATURE_COMINTEROP_APARTMENT_SUPPORT
         [SecurityCritical]  // auto-generated
         protected bool SetApartmentStateHelper(ApartmentState state, bool fireMDAOnMismatch)
         {
@@ -162,6 +163,7 @@ namespace Internal.Runtime.Augments
         [SecurityCritical]  // auto-generated
         [MethodImplAttribute(MethodImplOptions.InternalCall)]
         protected extern int SetApartmentStateNative(int state, bool fireMDAOnMismatch);
+#endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT
 
         /*=========================================================================
         ** Interrupts a thread that is inside a Wait(), Sleep() or Join().  If that
index 274b026..a79fa3e 100644 (file)
@@ -785,9 +785,7 @@ namespace System.Threading {
                 SetApartmentStateNative((int)value, true);
             }
         }
-#endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT
 
-#if FEATURE_COMINTEROP_APARTMENT_SUPPORT
         [System.Security.SecuritySafeCritical]  // auto-generated
         [HostProtection(Synchronization=true, SelfAffectingThreading=true)]
         public void SetApartmentState(ApartmentState state)
index 5095b84..d0c315d 100644 (file)
@@ -1259,9 +1259,9 @@ FCFuncStart(gRuntimeThreadFuncs)
     FCFuncElement("GetPriorityNative", ThreadNative::GetPriority)
     FCFuncElement("SetPriorityNative", ThreadNative::SetPriority)
     FCFuncElement("GetThreadStateNative", ThreadNative::GetThreadState)
-#if !defined(FEATURE_COMINTEROP_APARTMENT_SUPPORT) && !defined(FEATURE_CORECLR)
-    FCFuncElement("SetApartmentStateNative", ThreadNative::SetApartmentState)
+#ifdef FEATURE_COMINTEROP_APARTMENT_SUPPORT
     FCFuncElement("GetApartmentStateNative", ThreadNative::GetApartmentState)
+    FCFuncElement("SetApartmentStateNative", ThreadNative::SetApartmentState)
 #endif // FEATURE_COMINTEROP_APARTMENT_SUPPORT
     FCFuncElement("InterruptInternal", ThreadNative::Interrupt)
     FCFuncElement("JoinInternal", ThreadNative::Join)