Fix mobile_static build.
authorAtsushi Eno <atsushieno@gmail.com>
Wed, 1 Apr 2015 14:03:33 +0000 (23:03 +0900)
committerMarek Safar <marek.safar@gmail.com>
Mon, 2 May 2016 22:08:08 +0000 (00:08 +0200)
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPool.cs
mcs/class/referencesource/System.Data/System/Data/ProviderBase/DbConnectionPoolIdentity.cs
mcs/class/referencesource/System.Data/System/Data/ProviderBase/WrappedIUnknown.cs
mcs/class/referencesource/System.Data/bid/inc/cs/bidPrivateBase.cs

index 50ef20b0f8e0d2d1f74136baa642ca5a8fcb0291..a12b68eab3436dc25504f731279cdacbd89c2b93 100644 (file)
@@ -1209,10 +1209,12 @@ namespace System.Data.ProviderBase {
                         finally {
                             waitResult = SafeNativeMethods.WaitForMultipleObjectsEx(waitHandleCount, _waitHandles.DangerousGetHandle(), false, waitForMultipleObjectsTimeout, false);
 
+#if !FULL_AOT_RUNTIME
                             // VSTFDEVDIV 479551 - call GetHRForLastWin32Error immediately after after the native call
                             if (waitResult == WAIT_FAILED) {
                                 waitForMultipleObjectsExHR = Marshal.GetHRForLastWin32Error();
                             }
+#endif
                         }
 
                         // From the WaitAny docs: "If more than one object became signaled during
@@ -1333,7 +1335,9 @@ namespace System.Data.ProviderBase {
                         if (CREATION_HANDLE == waitResult) {
                             int result = SafeNativeMethods.ReleaseSemaphore(_waitHandles.CreationHandle.DangerousGetHandle(), 1, IntPtr.Zero);
                             if (0 == result) { // failure case
+#if !FULL_AOT_RUNTIME
                                 releaseSemaphoreResult = Marshal.GetHRForLastWin32Error();
+#endif
                             }
                         }
                         if (mustRelease) {
index 330b89fba3ae889af45cbbed2bb9b9dbdcca08e5..846ff67f2c22b510f2ff40ddda65f70f8b9dc9ff 100644 (file)
@@ -198,12 +198,14 @@ namespace System.Data.ProviderBase {
         }
 
         static private void IntegratedSecurityError(int caller) {
+#if !FULL_AOT_RUNTIME
             // passing 1,2,3,4,5 instead of true/false so that with a debugger
             // we could determine more easily which Win32 method call failed
             int lastError = Marshal.GetHRForLastWin32Error();
             if ((Win32_CheckTokenMembership != caller) || (E_NotImpersonationToken != lastError)) {
                 Marshal.ThrowExceptionForHR(lastError); // will only throw if (hresult < 0)
             }
+#endif
         }
         
     }
index 298ed6091868ed2684ce35a5ffb90edf939f96d4..c1501a0d289bad44d11ea34818160b0b35dcbee8 100644 (file)
@@ -32,7 +32,9 @@ namespace System.Data.ProviderBase {
             if (null != unknown) {
                 RuntimeHelpers.PrepareConstrainedRegions();
                 try {} finally {
+#if !FULL_AOT_RUNTIME
                     base.handle = Marshal.GetIUnknownForObject(unknown);    // 
+#endif
                 }
             }
         }
index b064cdbff131c981d77e19627e1dd982c7c2a2ae..a2bf64dd4981d86ddef4cb5b671c852af066fe32 100644 (file)
@@ -892,12 +892,12 @@ internal static partial class Bid
         modID = NoData;
 
         string friendlyName = getAppDomainFriendlyName();
+#if !MONO
         BIDEXTINFO extInfo = new BIDEXTINFO(Marshal.GetHINSTANCE(mod),
                                             getModulePath(mod),
                                             friendlyName,
                                             hCookie.AddrOfPinnedObject());
 
-#if !MONO
         NativeMethods.DllBidEntryPoint( ref modID, BidVer, modIdentity,
                                         configFlags, ref modFlags, ctrlCallback,
                                         ref extInfo, IntPtr.Zero, IntPtr.Zero );