Merge pull request #5382 from kumpera/pedump_fix
authorRodrigo Kumpera <kumpera@users.noreply.github.com>
Wed, 16 Aug 2017 04:58:17 +0000 (21:58 -0700)
committerGitHub <noreply@github.com>
Wed, 16 Aug 2017 04:58:17 +0000 (21:58 -0700)
Address pedump issues from https://bugzilla.xamarin.com/show_bug.cgi?id=58168

89 files changed:
configure.ac
external/api-snapshot
external/bockbuild
libgc/include/private/gcconfig.h
libgc/include/private/pthread_support.h
libgc/pthread_stop_world.c
libgc/pthread_support.c
mcs/class/Facades/System.Data.SqlClient/TypeForwarders.cs
mcs/class/Facades/System.Security.Cryptography.Cng/TypeForwarders.cs
mcs/class/Facades/System.ServiceModel.Http/TypeForwarders.cs
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptHandle.cs
mcs/class/System.Core/Microsoft.Win32.SafeHandles/SafeNCryptKeyHandle.cs
mcs/class/System.Core/common_System.Core.dll.sources
mcs/class/System.Core/net_4_x_System.Core.dll.sources
mcs/class/System/Mono.AppleTls/AppleCertificateHelper.cs
mcs/class/System/Mono.AppleTls/AppleTlsContext.cs
mcs/class/System/Mono.AppleTls/Trust.cs
mcs/class/System/System.Net/WebConnection.cs
mcs/class/referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
mcs/tools/mkbundle/mkbundle.cs
mcs/tools/xbuild/Makefile
mcs/tools/xbuild/data/deniedAssembliesList.txt [new file with mode: 0644]
mono/dis/Makefile.am
mono/eglib/Makefile.am
mono/eglib/goutput.c
mono/metadata/Makefile.am
mono/metadata/assembly.c
mono/metadata/boehm-gc.c
mono/metadata/icall-def.h
mono/metadata/image.c
mono/metadata/loader.c
mono/metadata/metadata-cross-helpers.c
mono/metadata/mono-route.c
mono/metadata/mono-route.h
mono/metadata/threadpool-worker-default.c
mono/metadata/threads.c
mono/metadata/w32file-unix.c
mono/metadata/w32process-unix-default.c
mono/metadata/w32process-unix-internals.h
mono/metadata/w32process-unix.c
mono/metadata/w32socket-unix.c
mono/mini/Makefile.am.in
mono/mini/aot-runtime.c
mono/mini/debugger-agent.c
mono/mini/debugger-agent.h
mono/mini/exceptions-arm.c
mono/mini/iltests.il
mono/mini/method-to-ir.c
mono/mini/mini-arm.c
mono/mini/mini-exceptions.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-posix.c
mono/mini/mini-runtime.c
mono/mini/mini.c
mono/mini/mini.h
mono/mini/trace.c
mono/profiler/Makefile.am
mono/sgen/sgen-marksweep.c
mono/tests/Makefile.am
mono/unit-tests/Makefile.am
mono/utils/mono-compiler.h
mono/utils/mono-dl-posix.c
mono/utils/mono-hwcap-arm.c
mono/utils/mono-log-android.c
mono/utils/mono-logger-internals.h
mono/utils/mono-logger.c
mono/utils/mono-os-mutex.h
mono/utils/mono-path.c
mono/utils/mono-proclib.c
mono/utils/mono-sigcontext.h
mono/utils/mono-threads-android.c
mono/utils/mono-threads-linux.c
mono/utils/mono-threads-posix-signals.c
mono/utils/mono-threads-posix.c
mono/utils/mono-threads.c
mono/utils/mono-time.c
packaging/MacSDK/msbuild.py
scripts/.gitignore
support/errno.c
support/mph.h
support/sys-mman.c
support/sys-sendfile.c
support/unistd.c
tools/monograph/Makefile.am
tools/nuget-hash-extractor/Makefile
tools/nuget-hash-extractor/download.sh
tools/offsets-tool/MonoAotOffsetsDumper.cs
tools/pedump/Makefile.am
winconfig.h

index 0abf9ebb4695b9b1866e7d92408c193b547d1518..aa0111de8aec8119c31963c6433ac3f56a643e3e 100644 (file)
@@ -110,7 +110,7 @@ host_darwin=no
 case "$host" in
        *-mingw*|*-*-cygwin*)
                AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
-               AC_DEFINE(PLATFORM_NO_SYMLINKS,1,[This platform does not support symlinks])
+               AC_DEFINE(HOST_NO_SYMLINKS,1,[This platform does not support symlinks])
                host_win32=yes
                mono_cv_clang=no
                if test "x$cross_compiling" = "xno"; then
@@ -141,7 +141,7 @@ case "$host" in
                CPPFLAGS="$CPPFLAGS -D_REENTRANT -DGC_NETBSD_THREADS -D_GNU_SOURCE"
                libmono_cflags="-D_REENTRANT"
                LDFLAGS="$LDFLAGS -pthread"
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
+               CPPFLAGS="$CPPFLAGS -DHOST_BSD"
                libmono_ldflags="-pthread"
                need_link_unlink=yes
                libdl="-ldl"
@@ -176,7 +176,7 @@ case "$host" in
                        LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
                        libmono_ldflags="$PTHREAD_LIBS"
                fi
-               CPPFLAGS="$CPPFLAGS -DPLATFORM_BSD"
+               CPPFLAGS="$CPPFLAGS -DHOST_BSD"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
                libdl=
@@ -186,7 +186,7 @@ case "$host" in
                with_sgen_default_concurrent=yes
                ;;
        *-*-*openbsd*)
-               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DPLATFORM_BSD -D_REENTRANT -DUSE_MMAP"
+               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_OPENBSD_THREADS -DHOST_BSD -D_REENTRANT -DUSE_MMAP"
                if test "x$disable_munmap" != "xyes"; then
                CPPFLAGS="$CPPFLAGS -DUSE_MUNMAP"
                fi
@@ -202,7 +202,7 @@ case "$host" in
                ;;
        *-*-linux-android*)
                platform_android=yes
-               AC_DEFINE(PLATFORM_ANDROID,1,[Targeting the Android platform])
+               AC_DEFINE(HOST_ANDROID,1,[Targeting the Android platform])
                AC_DEFINE(TARGET_ANDROID,1,[Targeting the Android platform])
 
                CPPFLAGS="$CPPFLAGS -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP"
@@ -284,7 +284,7 @@ case "$host" in
                use_sigposix=yes
                ;;
        *-*-solaris*)
-               CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DPLATFORM_SOLARIS"
+               CPPFLAGS="$CPPFLAGS -DGC_SOLARIS_THREADS -DGC_SOLARIS_PTHREADS -D_REENTRANT -D_POSIX_PTHREAD_SEMANTICS -DUSE_MMAP -DUSE_MUNMAP -DHOST_SOLARIS"
                need_link_unlink=yes
                libmono_cflags="-D_REENTRANT"
                libgc_threads=pthreads
@@ -296,7 +296,7 @@ case "$host" in
                parallel_mark="Disabled_Currently_Hangs_On_MacOSX"
                host_darwin=yes
                target_mach=yes
-               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DPLATFORM_MACOSX -DUSE_MMAP -DUSE_MUNMAP"
+               CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE -DGC_MACOSX_THREADS -DUSE_MMAP -DUSE_MUNMAP"
                libmono_cflags="-D_THREAD_SAFE"
                need_link_unlink=yes
                AC_DEFINE(PTHREAD_POINTER_ID)
@@ -364,6 +364,10 @@ if test x$target_win32 = xyes; then
    AC_DEFINE(TARGET_WIN32, 1, [Target Platform is Win32])
 fi
 
+if test x$host_darwin = xyes; then
+   AC_DEFINE(HOST_DARWIN, 1, [Host Platform is Darwin])
+fi
+
 # Defined for all targets/platforms using classic Windows API support.
 AC_DEFINE(HAVE_CLASSIC_WINAPI_SUPPORT, 1, [Use classic Windows API support])
 AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
@@ -371,16 +375,16 @@ AC_DEFINE(HAVE_UWP_WINAPI_SUPPORT, 0, [Don't use UWP Windows API support])
 AC_SUBST(extra_runtime_ldflags)
 AM_CONDITIONAL(HOST_WIN32, test x$host_win32 = xyes)
 AM_CONDITIONAL(TARGET_WIN32, test x$target_win32 = xyes)
-AM_CONDITIONAL(PLATFORM_LINUX, echo x$target_os | grep -q linux)
-AM_CONDITIONAL(PLATFORM_DARWIN, test x$host_darwin = xyes)
-AM_CONDITIONAL(PLATFORM_SIGPOSIX, test x$use_sigposix = xyes)
-AM_CONDITIONAL(PLATFORM_ANDROID, test x$platform_android = xyes)
+AM_CONDITIONAL(HOST_LINUX, echo x$target_os | grep -q linux)
+AM_CONDITIONAL(HOST_DARWIN, test x$host_darwin = xyes)
+AM_CONDITIONAL(HOST_SIGPOSIX, test x$use_sigposix = xyes)
+AM_CONDITIONAL(HOST_ANDROID, test x$platform_android = xyes)
 
-if test -z "$PLATFORM_DARWIN_TRUE"; then :
+if test -z "$HOST_DARWIN_TRUE"; then :
 PLATFORM_AOT_SUFFIX=.dylib
 fi
 
-if test -z "$PLATFORM_LINUX_TRUE"; then :
+if test -z "$HOST_LINUX_TRUE"; then :
 PLATFORM_AOT_SUFFIX=.so
 fi
 
index 2563306d41f7f7fa30421c629d0f3b60b08b1169..bf03a7c5cf6b692fa662f1568ad66de35166b8ea 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 2563306d41f7f7fa30421c629d0f3b60b08b1169
+Subproject commit bf03a7c5cf6b692fa662f1568ad66de35166b8ea
index 47f82456814a05b077e31b58d66c1e4c640aac79..141e6a55feee9052e347c424aff09b156e0d5497 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 47f82456814a05b077e31b58d66c1e4c640aac79
+Subproject commit 141e6a55feee9052e347c424aff09b156e0d5497
index 3cbab919b940b448ad20511d686465ea2f261fe7..03305b61de01731151772653f01ed98a332076b9 100644 (file)
 #           if defined(__GLIBC__)&& __GLIBC__>=2
 #              define SEARCH_FOR_DATA_START
 #           else /* !GLIBC2 */
-#              if defined(PLATFORM_ANDROID)
+#              if defined(HOST_ANDROID)
 #                      define __environ environ
 #              endif
                extern char **__environ;
 #           include <features.h>
 #           if defined(__GLIBC__) && __GLIBC__ >= 2
 #               define SEARCH_FOR_DATA_START
-#           elif defined(PLATFORM_ANDROID)
+#           elif defined(HOST_ANDROID)
 #               define SEARCH_FOR_DATA_START
 #           else
                 extern char **__environ;
index bcb89b6a1982ab53a0ee338491c61a35997d0ba2..0abbd242a85632e6879d15210142c7b45dadc50e 100644 (file)
@@ -45,7 +45,7 @@ typedef struct GC_Thread_Rep {
                                  /* guaranteed to be dead, but we may  */
                                  /* not yet have registered the join.) */
     pthread_t id;
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
     pid_t kernel_id;
 #endif
     /* Extra bookkeeping information the stopping code uses */
index 3bfdfbf35eddc525cb5667d1e6a258babf555ea5..afa77dadfab52b020debb373f370f7b42c32fe21 100644 (file)
@@ -337,7 +337,7 @@ void GC_push_all_stacks()
 pthread_t GC_stopping_thread;
 int GC_stopping_pid;
 
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
 static
 int android_thread_kill(pid_t tid, int sig)
 {
@@ -379,7 +379,7 @@ int GC_suspend_all()
              GC_printf1("Sending suspend signal to 0x%lx\n", p -> id);
            #endif
 
-#ifndef PLATFORM_ANDROID
+#ifndef HOST_ANDROID
         result = pthread_kill(p -> id, SIG_SUSPEND);
 #else
         result = android_thread_kill(p -> kernel_id, SIG_SUSPEND);
@@ -658,7 +658,7 @@ static void pthread_start_world()
              GC_printf1("Sending restart signal to 0x%lx\n", p -> id);
            #endif
 
-#ifndef PLATFORM_ANDROID
+#ifndef HOST_ANDROID
         result = pthread_kill(p -> id, SIG_THR_RESTART);
 #else
         result = android_thread_kill(p -> kernel_id, SIG_THR_RESTART);
index cdca33252758a32a390a64e6fd275cc423071154..097d588a7b55fd77569d2def2b9e80348068085c 100644 (file)
@@ -764,7 +764,7 @@ GC_thread GC_new_thread(pthread_t id)
     }
     if (result == 0) return(0);
     result -> id = id;
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
     result -> kernel_id = gettid();
 #endif
     result -> next = GC_threads[hv];
index d8f7bb5be561ec55cdacd76549276d2ff8925382..fa807fa7aa2d587386e2335a188f5f0b295ff1f9 100644 (file)
@@ -30,6 +30,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyColumnMappingCollection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlBulkCopyOptions))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientFactory))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlClientMetaDataCollectionNames))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlCommand))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnection))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Data.SqlClient.SqlConnectionStringBuilder))]
index 309d6fb5ce34cb7bdd3c5fa7162cc29ab342bf77..ade174b59d5caa4caa116833c0aa976168c9e4c4 100644 (file)
@@ -41,6 +41,8 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngProvider))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIPolicy))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.CngUIProtectionLevels))]
+// TODO: [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.DSACng))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECDsaCng))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.ECKeyXmlFormat))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.RSACng))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.Security.Cryptography.TripleDESCng))]
index 4aa28e9e49f0bc660137f259cfe73a0b8d799c84..597267838d2f9cfe170d462411e6ed88ba60518a 100644 (file)
@@ -36,6 +36,7 @@
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.Channels.WebSocketTransportUsage))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpBindingBase))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpClientCredentialType))]
+[assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpProxyCredentialType))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.HttpTransportSecurity))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpBinding))]
 [assembly: System.Runtime.CompilerServices.TypeForwardedToAttribute(typeof(System.ServiceModel.NetHttpsBinding))]
index cbf1491612fcb12ef9a378c26e6cf214b0d30835..da4d7f36b9e769e5003eefda2ca57534f8862bf1 100644 (file)
@@ -37,6 +37,12 @@ namespace Microsoft.Win32.SafeHandles
                {
                }
 
+               protected SafeNCryptHandle (IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle)
+                       : base (false)
+               {
+                       throw new NotImplementedException ();
+               }
+
                public override bool IsInvalid { get { throw new NotImplementedException (); } }
 
                protected override bool ReleaseHandle ()
index 3dcbfae8d6d2728bf032b18b4e48108bd6bad687..06840259bf63c1222250deed9864449bd017d4c1 100644 (file)
@@ -26,6 +26,8 @@
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
+using System;
+
 namespace Microsoft.Win32.SafeHandles
 {
        public sealed class SafeNCryptKeyHandle : SafeNCryptHandle
@@ -34,6 +36,12 @@ namespace Microsoft.Win32.SafeHandles
                {
                }
 
+               public SafeNCryptKeyHandle (IntPtr handle, System.Runtime.InteropServices.SafeHandle parentHandle)
+                       : base (handle, parentHandle)
+               {
+
+               }
+
                protected override bool ReleaseNativeHandle ()
                {
                        return false;
index b521fe7b41c251c2dc89474990f179692f499c79..cfe271aeee0f79bab2d76540c229f345d706f046 100644 (file)
@@ -71,6 +71,7 @@ corefx/SR.missing.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellmanPublicKey.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDsa.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDsaCng.cs
+../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
 ../referencesource/System.Core/System/Security/Cryptography/NCryptNative.cs
 ../referencesource/System.Core/System/Security/Cryptography/RsaCng.cs
 
index 215215e76a2d7eb8b64eadeb1b8a0ba800294625..5cc42d8a3cf3be4a42c55d4f1d66778dee6eda00 100644 (file)
@@ -14,6 +14,5 @@ System.Security.Cryptography/SHA512Cng.cs
 
 ../referencesource/System.Core/System/Security/Cryptography/AesManaged.cs
 ../referencesource/System.Core/System/Security/Cryptography/ECDiffieHellman.cs
-../referencesource/System.Core/System/Security/Cryptography/ECKeyXmlFormat.cs
 
 ../referencesource/System.Core/System/threading/ReaderWriterLockSlim/LockRecursionException.cs
index d3b29fa2721179ad4337eff51a0b33239b3a3801..710433ef071619a21464d6a07c31f1eafc12cff0 100644 (file)
@@ -133,28 +133,28 @@ namespace Mono.AppleTls
                                        targetHost = targetHost.Substring (0, pos);
                        }
 
-                       var policy = SecPolicy.CreateSslPolicy (!serverMode, targetHost);
-                       var trust = new SecTrust (certificates, policy);
-
-                       if (validator.Settings.TrustAnchors != null) {
-                               var status = trust.SetAnchorCertificates (validator.Settings.TrustAnchors);
-                               if (status != SecStatusCode.Success)
-                                       throw new InvalidOperationException (status.ToString ());
-                               trust.SetAnchorCertificatesOnly (false);
-                       }
-
-                       if (validator.Settings.CertificateValidationTime != null) {
-                               var status = trust.SetVerifyDate (validator.Settings.CertificateValidationTime.Value);
-                               if (status != SecStatusCode.Success)
-                                       throw new InvalidOperationException (status.ToString ());
+                       using (var policy = SecPolicy.CreateSslPolicy (!serverMode, targetHost))
+                       using (var trust = new SecTrust (certificates, policy)) {
+                               if (validator.Settings.TrustAnchors != null) {
+                                       var status = trust.SetAnchorCertificates (validator.Settings.TrustAnchors);
+                                       if (status != SecStatusCode.Success)
+                                               throw new InvalidOperationException (status.ToString ());
+                                       trust.SetAnchorCertificatesOnly (false);
+                               }
+
+                               if (validator.Settings.CertificateValidationTime != null) {
+                                       var status = trust.SetVerifyDate (validator.Settings.CertificateValidationTime.Value);
+                                       if (status != SecStatusCode.Success)
+                                               throw new InvalidOperationException (status.ToString ());
+                               }
+
+                               var result = trust.Evaluate ();
+                               if (result == SecTrustResult.Unspecified)
+                                       return true;
+
+                               errors |= MonoSslPolicyErrors.RemoteCertificateChainErrors;
+                               return false;
                        }
-
-                       var result = trust.Evaluate ();
-                       if (result == SecTrustResult.Unspecified)
-                               return true;
-
-                       errors |= MonoSslPolicyErrors.RemoteCertificateChainErrors;
-                       return false;
                }
        }
 }
index 563e35f01d15e9f6583699ec2273c4a641919b82..1d53227f5e9777b78de91c2287cea8b2c5c8edf9 100644 (file)
@@ -234,32 +234,41 @@ namespace Mono.AppleTls
                         * 
                         */
 
-                       var trust = GetPeerTrust (!IsServer);
-                       X509CertificateCollection certificates;
+                       bool ok;
+                       SecTrust trust = null;
+                       X509CertificateCollection certificates = null;
 
-                       if (trust == null || trust.Count == 0) {
-                               remoteCertificate = null;
-                               if (!IsServer)
-                                       throw new TlsException (AlertDescription.CertificateUnknown);
-                               certificates = null;
-                       } else {
-                               if (trust.Count > 1)
-                                       Debug ("WARNING: Got multiple certificates in SecTrust!");
+                       try {
+                               trust = GetPeerTrust (!IsServer);
 
-                               certificates = new X509CertificateCollection ();
-                               for (int i = 0; i < trust.Count; i++)
-                                       certificates.Add (trust [(IntPtr)i].ToX509Certificate ());
+                               if (trust == null || trust.Count == 0) {
+                                       remoteCertificate = null;
+                                       if (!IsServer)
+                                               throw new TlsException (AlertDescription.CertificateUnknown);
+                                       certificates = null;
+                               } else {
+                                       if (trust.Count > 1)
+                                               Debug ("WARNING: Got multiple certificates in SecTrust!");
 
-                               remoteCertificate = certificates [0];
-                               Debug ("Got peer trust: {0}", remoteCertificate);
-                       }
+                                       certificates = new X509CertificateCollection ();
+                                       for (int i = 0; i < trust.Count; i++)
+                                               certificates.Add (trust.GetCertificate (i));
+
+                                       remoteCertificate = new X509Certificate (certificates [0]);
+                                       Debug ("Got peer trust: {0}", remoteCertificate);
+                               }
 
-                       bool ok;
-                       try {
                                ok = ValidateCertificate (certificates);
                        } catch (Exception ex) {
                                Debug ("Certificate validation failed: {0}", ex);
                                throw new TlsException (AlertDescription.CertificateUnknown, "Certificate validation threw exception.");
+                       } finally {
+                               if (trust != null)
+                                       trust.Dispose ();
+                               if (certificates != null) {
+                                       for (int i = 0; i < certificates.Count; i++)
+                                               certificates [i].Dispose ();
+                               }
                        }
 
                        if (!ok)
@@ -664,7 +673,7 @@ namespace Mono.AppleTls
                                if (value == IntPtr.Zero)
                                        throw new TlsException (AlertDescription.CertificateUnknown);
                        }
-                       return (value == IntPtr.Zero) ? null : new SecTrust (value);
+                       return (value == IntPtr.Zero) ? null : new SecTrust (value, true);
                }
 
                #endregion
index 33a505043e813768b24d5d970360d827dd3d21c2..3ec3c4dd608140a2f503c7d98fdbf338593a167f 100644 (file)
@@ -66,6 +66,8 @@ namespace Mono.AppleTls {
                        foreach (var certificate in certificates)
                                array [i++] = new SecCertificate (certificate);
                        Initialize (array, policy);
+                       for (i = 0; i < array.Length; i++)
+                               array [i].Dispose ();
                }
 
                void Initialize (SecCertificate[] array, SecPolicy policy)
@@ -122,6 +124,17 @@ namespace Mono.AppleTls {
                        }
                }
 
+               internal X509Certificate GetCertificate (int index)
+               {
+                       if (handle == IntPtr.Zero)
+                               throw new ObjectDisposedException ("SecTrust");
+                       if (index < 0 || index >= Count)
+                               throw new ArgumentOutOfRangeException ("index");
+
+                       var ptr = SecTrustGetCertificateAtIndex (handle, (IntPtr)index);
+                       return new X509Certificate (ptr);
+               }
+
                [DllImport (AppleTlsContext.SecurityLibrary)]
                extern static SecStatusCode /* OSStatus */ SecTrustSetAnchorCertificates (IntPtr /* SecTrustRef */ trust, IntPtr /* CFArrayRef */ anchorCertificates);
 
index e1435f84b643cbab403b80237bc8ebdf51ae121c..68c480fa86eb26acd2e517e0023975863b0f32a1 100644 (file)
@@ -56,7 +56,6 @@ namespace System.Net
                object socketLock = new object ();
                IWebConnectionState state;
                WebExceptionStatus status;
-               WaitCallback initConn;
                bool keepAlive;
                byte [] buffer;
                EventHandler abortHandler;
index cd8283a9f64a650ba537e8053d5ec1d951e0ce5d..39ad193190cc159a1f79e91ca9072a06511c6506 100644 (file)
@@ -35,6 +35,8 @@ namespace System.Security.Cryptography {
             throw new NotImplementedException ();
         }
 
+        public CngAlgorithm HashAlgorithm { get; set; }
+
         public CngKey Key {
             get {
                 throw new NotImplementedException ();
@@ -52,6 +54,38 @@ namespace System.Security.Cryptography {
         public override bool VerifyHash(byte[] hash, byte[] signature) {
             throw new NotImplementedException();
         }
+
+        public void FromXmlString (string xml, ECKeyXmlFormat format) {
+            throw new NotImplementedException();
+        }
+
+        public byte[] SignData (byte[] data) {
+            throw new NotImplementedException();
+        }
+
+        public byte[] SignData (System.IO.Stream data) {
+            throw new NotImplementedException();
+        }
+
+        public byte[] SignData (byte[] data, int offset, int count) {
+            throw new NotImplementedException();
+        }
+
+        public string ToXmlString (ECKeyXmlFormat format) {
+            throw new NotImplementedException();
+        }
+
+        public bool VerifyData (byte[] data, byte[] signature) {
+            throw new NotImplementedException();
+        }
+
+        public bool VerifyData (System.IO.Stream data, byte[] signature) {
+            throw new NotImplementedException();
+        }
+
+        public bool VerifyData (byte[] data, int offset, int count, byte[] signature) {
+            throw new NotImplementedException();
+        }
 #else
         private static KeySizes[] s_legalKeySizes = new KeySizes[] { new KeySizes(256, 384, 128), new KeySizes(521, 521, 0) };
 
index 4febb86c32014b1ea38858496f77a55cf301bbe2..97cf6c6a240c6521ec1a7d23a6a0f5f70365a443 100755 (executable)
@@ -1169,9 +1169,18 @@ void          mono_register_config_for_assembly (const char* assembly_name, cons
                        return true;
                try {
                        Assembly a = universe.LoadFile (path);
+                       if (a == null) {
+                               Error ("Unable to to load assembly `{0}'", path);
+                               return false;
+                       }
 
                        foreach (AssemblyName an in a.GetReferencedAssemblies ()) {
                                a = LoadAssembly (an.Name);
+                               if (a == null) {
+                                       Error ("Unable to load assembly `{0}' referenced by `{1}'", an.Name, path);
+                                       return false;
+                               }
+
                                if (!QueueAssembly (files, a.CodeBase))
                                        return false;
                        }
index 406829f8021e462580eb1fbdd272df99a1602f0f..20268929bff93d35118ce83778a464fe510710cc 100644 (file)
@@ -18,6 +18,7 @@ install-local: install-extras
 
 PORTABLE_TARGETS_SRC:=data/Portable/Targets
 PCL5_FX_SRC:=data/Portable/Frameworks/v5.0
+DENIED_ASSEMBLY_LIST_SRC=data/deniedAssembliesList.txt
 
 NETFRAMEWORK_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETFramework
 PCL5_FX_DIR=$(mono_libdir)/mono/xbuild-frameworks/.NETPortable/v5.0
@@ -35,7 +36,7 @@ endif
 install-versioned-files: install-bin-data install-nuget-imports
 
 #install files that are only installed once across all xbuild versions
-install-global-files: install-frameworks install-web-targets install-pcl-targets install-pcl5-framework install-nuget-targets
+install-global-files: install-frameworks install-web-targets install-pcl-targets install-pcl5-framework install-nuget-targets install-msbuild-specific-files
 
 install-bin-data:
        $(MKINSTALLDIRS) $(DESTDIR)$(XBUILD_BIN_DIR)/MSBuild
@@ -122,6 +123,10 @@ install-pcl5-framework:
        $(INSTALL_DATA) "$(PCL5_FX_SRC)/ASP.NET Core 1.0.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/ASP.NET Core 1.0.xml"
        $(INSTALL_DATA) "$(PCL5_FX_SRC)/Windows Universal 10.0.xml" "$(DESTDIR)$(PCL5_FX_DIR)/SupportedFrameworks/Windows Universal 10.0.xml"
 
+install-msbuild-specific-files:
+       $(MKINSTALLDIRS) $(DESTDIR)$(mono_libdir)/mono/xbuild
+       $(INSTALL_DATA) $(DENIED_ASSEMBLY_LIST_SRC) $(DESTDIR)$(mono_libdir)/mono/xbuild
+
 EXTRA_DISTFILES = \
        data/xbuild.rsp \
        data/xbuild.exe.config.in \
@@ -164,6 +169,7 @@ EXTRA_DISTFILES = \
        "data/Portable/Frameworks/v5.0/ASP.NET Core 1.0.xml" \
        "data/Portable/Frameworks/v5.0/FrameworkList.xml" \
        "data/Portable/Frameworks/v5.0/Windows Universal 10.0.xml" \
+       data/deniedAssembliesList.txt \
        frameworks/net_2.0.xml \
        frameworks/net_3.0.xml \
        frameworks/net_3.5.xml \
diff --git a/mcs/tools/xbuild/data/deniedAssembliesList.txt b/mcs/tools/xbuild/data/deniedAssembliesList.txt
new file mode 100644 (file)
index 0000000..7b653e1
--- /dev/null
@@ -0,0 +1,20 @@
+System.Globalization.Extensions.dll,475DBF02-9F68-44F1-8FB5-C9F69F1BD2B1,4,0,0,0
+System.Globalization.Extensions.dll,5FCD54F0-4B97-4259-875D-30E481F02EA2,4,0,1,0
+System.Globalization.Extensions.dll,E9FCFF5B-4DE1-4BDC-9CE8-08C640FC78CC,4,0,2,0
+System.IO.Compression.dll,44FCA06C-A510-4B3E-BDBF-D08D697EF65A,4,1,0,0
+System.IO.Compression.dll,3A58A219-266B-47C3-8BE8-4E4F394147AB,4,1,2,0
+System.Net.Http.dll,269B562C-CC15-4736-B1B1-68D4A43CAA98,4,1,0,0
+System.Net.Http.dll,EA2EC6DC-51DD-479C-BFC2-E713FB9E7E47,4,1,0,1
+System.Net.Http.dll,C0E04D9C-70CF-48A6-A179-FBFD8CE69FD0,4,1,1,0
+System.Net.Http.dll,817F01C3-4011-477D-890A-98232B85553D,4,1,1,0
+System.Net.Http.dll,09D4A140-061C-4884-9B63-22067E841931,4,1,1,1
+System.Reflection.DispatchProxy.dll,E40AFEB4-CABE-4124-8412-B46AB79C92FD,4,0,0,0
+System.Reflection.DispatchProxy.dll,2A69F0AD-B86B-40F2-8E4C-5B671E47479F,4,0,1,0
+System.Reflection.DispatchProxy.dll,D4E8D2DB-BD65-4168-99EA-D2C1BDEBF9CC,4,0,2,0
+System.Runtime.InteropServices.RuntimeInformation.dll,F13660F8-9D0D-419F-BA4E-315693DD26EA,4,0,0,0
+System.Runtime.InteropServices.RuntimeInformation.dll,DD91439F-3167-478E-BD2C-BF9C036A1395,4,0,1,0
+System.Text.Encoding.CodePages.dll,C142254F-DEB5-46A7-AE43-6F10320D1D1F,4,0,1,0
+System.Text.Encoding.CodePages.dll,FD178CD4-EF4F-44D5-9C3F-812B1E25126B,4,0,2,0
+System.Threading.Overlapped.dll,9F5D4F09-787A-458A-BA08-553AA71470F1,4,0,0,0
+System.Threading.Overlapped.dll,FCBD003B-2BB4-4940-BAEF-63AF520C2336,4,0,1,0
+System.Threading.Overlapped.dll,87697E71-D192-4F0B-BAD4-02BBC7793005,4,0,2,0
index 06085362c54484072e624443e2c11b6a9dc573c3..f1e79e317873425230b3eb0ff011313988852317 100644 (file)
@@ -54,7 +54,7 @@ monodis_LDADD =                       \
        $(GLIB_LIBS)                    \
        $(LIBICONV)
 
-if PLATFORM_DARWIN
+if HOST_DARWIN
 monodis_LDFLAGS=-framework CoreFoundation -framework Foundation
 endif
 
index 08cf40a763d7e399764231fb3f1bb7e6bd85a25f..87051a6be13320bd7e07a3a71baf14c5427d6c1c 100644 (file)
@@ -55,7 +55,7 @@ AM_CPPFLAGS = -I$(srcdir)
 if HOST_WIN32
 libeglib_la_LIBADD = -lm $(LIBICONV) -lpsapi
 else
-if PLATFORM_ANDROID
+if HOST_ANDROID
 libeglib_la_LIBADD = -llog
 endif
 endif
index 7b1627c0cd27b61955f820f5b20bbdc38e60144d..e785170621ca6ebfc2669c4d9bf2b866ed5c94ff 100644 (file)
@@ -137,7 +137,7 @@ g_assertion_message (const gchar *format, ...)
        exit (0);
 }
 
-#if PLATFORM_ANDROID
+#if HOST_ANDROID
 #include <android/log.h>
 
 static android_LogPriority
index 95867a3e4ca4fe233f645b950b6b8e59fbd8fac8..2fbf826ceece5a6338eadd77b1deb9d5267801e0 100644 (file)
@@ -59,7 +59,7 @@ unix_sources = \
 platform_sources = $(unix_sources)
 endif
 
-if PLATFORM_ANDROID
+if HOST_ANDROID
 platform_sources += ../../support/libm/complex.c
 endif
 
index 35896715ac6ead8cd6b48aa2b7cbff950f2f7832..adfab7def01de117ed63223b45e6b43fd32debd7 100644 (file)
@@ -50,7 +50,7 @@
 #include <sys/stat.h>
 #endif
 
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
 #include <mach-o/dyld.h>
 #endif
 
@@ -840,7 +840,7 @@ set_dirs (char *exe)
 void
 mono_set_rootdir (void)
 {
-#if defined(HOST_WIN32) || (defined(PLATFORM_MACOSX) && !defined(TARGET_ARM))
+#if defined(HOST_WIN32) || (defined(HOST_DARWIN) && !defined(TARGET_ARM))
        gchar *bindir, *installdir, *root, *name, *resolvedname, *config;
 
 #ifdef HOST_WIN32
index e642be65561d391bdbf0bccef417f6394b531c56..03d5147c782ecc2809913aca973126c229b59cac 100644 (file)
@@ -44,7 +44,7 @@
 #define THREAD_LOCAL_ALLOC 1
 #include "private/pthread_support.h"
 
-#if defined(PLATFORM_MACOSX) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
+#if defined(HOST_DARWIN) && defined(HAVE_PTHREAD_GET_STACKADDR_NP)
 void *pthread_get_stackaddr_np(pthread_t);
 #endif
 
@@ -179,7 +179,7 @@ mono_gc_base_init (void)
        default_push_other_roots = GC_push_other_roots;
        GC_push_other_roots = mono_push_other_roots;
 
-#if !defined(PLATFORM_ANDROID)
+#if !defined(HOST_ANDROID)
        /* If GC_no_dls is set to true, GC_find_limit is not called. This causes a seg fault on Android. */
        GC_no_dls = TRUE;
 #endif
index 2cc591e8c8c7d361548c07e02d52aa0763e43e36..ecd050a26e0469e29f4d71f42dce3c75fe5bdc7f 100644 (file)
@@ -447,7 +447,7 @@ HANDLES(ICALL(NDNS_1, "GetHostByAddr_internal(string,string&,string[]&,string[]&
 HANDLES(ICALL(NDNS_2, "GetHostByName_internal(string,string&,string[]&,string[]&,int)", ves_icall_System_Net_Dns_GetHostByName_internal))
 HANDLES(ICALL(NDNS_3, "GetHostName_internal(string&)", ves_icall_System_Net_Dns_GetHostName_internal))
 
-#if defined(PLATFORM_MACOSX) || defined(PLATFORM_BSD)
+#if defined(HOST_DARWIN) || defined(HOST_BSD)
 ICALL_TYPE(MAC_IFACE_PROPS, "System.Net.NetworkInformation.MacOsIPInterfaceProperties", MAC_IFACE_PROPS_1)
 ICALL(MAC_IFACE_PROPS_1, "ParseRouteInfo_internal", ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal)
 #endif
index 827ba841c3d5ec61836f1d62c42356499427340b..5c952efa4ac27f5d8ad2943c8a3a382781f58567 100644 (file)
@@ -1113,6 +1113,11 @@ Right now the list of nugets are the ones that provide the assemblies in $ignore
 
 This is to be removed once a proper fix is shipped through nuget.
 
+Please keep this in sync with mcs/tools/xbuild/data/deniedAssembliesList.txt
+If any assemblies are added/removed, then this should be regenerated with:
+
+  $ mono tools/nuget-hash-extractor/nuget-hash-extractor.exe nugets guids_for_msbuild > mcs/tools/xbuild/data/deniedAssembliesList.txt
+
 */
 
 typedef enum {
index 61a6f94146588d2f175fdc83e83e760e0ea9c805..bf35693b83b1990042ce89f93337fcc2f79b4325 100644 (file)
@@ -1143,7 +1143,7 @@ static MonoDl *internal_module;
 static gboolean
 is_absolute_path (const char *path)
 {
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
        if (!strncmp (path, "@executable_path/", 17) || !strncmp (path, "@loader_path/", 13) ||
            !strncmp (path, "@rpath/", 7))
            return TRUE;
index 119da77be3d79ea710a4b18889cf41eabe3d1dec..c4c81eaf32c8995a477773a8b60397189d5cf4d1 100644 (file)
@@ -36,11 +36,11 @@ dump_arch (void)
 static int
 dump_os (void)
 {
-#if defined (PLATFORM_WIN32)
+#if defined (HOST_WIN32)
        g_print ("#ifdef TARGET_WIN32\n");
-#elif defined (PLATFORM_ANDROID)
+#elif defined (HOST_ANDROID)
        g_print ("#ifdef TARGET_ANDROID\n");
-#elif defined (PLATFORM_MACOSX)
+#elif defined (HOST_DARWIN)
        g_print ("#ifdef TARGET_OSX\n");
 #elif defined (PLATFORM_IOS)
        g_print ("#ifdef TARGET_IOS\n");
index a35bd562743f5c334749fb692aaba4a99d149e64..c90af3cdfe33b8b89d1ce23f65a14e42046ff636 100644 (file)
@@ -7,9 +7,9 @@
  *   Ben Woods (woodsb02@gmail.com)
  */
 
-#if defined(PLATFORM_MACOSX) || defined(PLATFORM_BSD)
-
 #include <config.h>
+
+#if defined(HOST_DARWIN) || defined(HOST_BSD)
 #include <sys/socket.h>
 #include <net/if.h>
 #include <net/if_dl.h>
@@ -134,4 +134,4 @@ in_addr_t gateway_from_rtm(struct rt_msghdr *rtm)
        return 0;
 }
 
-#endif /* #if defined(PLATFORM_MACOSX) || defined(PLATFORM_BSD) */
+#endif /* #if defined(HOST_DARWIN) || defined(HOST_BSD) */
index 5086fbd3ef05f2d31dbd450cf44a2014ca016e77..03d179d71c6874255c6ee9a1f64976f4089af9d2 100644 (file)
@@ -5,7 +5,7 @@
 #ifndef __MONO_ROUTE_H__
 #define __MONO_ROUTE_H__
 
-#if defined(PLATFORM_MACOSX) || defined(PLATFORM_BSD)
+#if defined(HOST_DARWIN) || defined(HOST_BSD)
 
 #include <sys/socket.h>
 
@@ -23,5 +23,5 @@ in_addr_t gateway_from_rtm (struct rt_msghdr *rtm);
 /* Category icalls */
 extern MonoBoolean ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal (MonoString *iface, MonoArray **gw_addr_list);
 
-#endif /* #if defined(PLATFORM_MACOSX) || defined(PLATFORM_BSD) */
+#endif /* #if defined(HOST_DARWIN) || defined(HOST_BSD) */
 #endif /* __MONO_ROUTE_H__ */
index 87256b511873d728e0124cb92180551a3b3dc15b..724bfe81ff8d02caf3d171647a063baf7d2f3821 100644 (file)
@@ -286,7 +286,7 @@ mono_threadpool_worker_init (MonoThreadPoolWorkerCallback callback)
 
        worker.limit_worker_min = threads_count;
 
-#if defined (PLATFORM_ANDROID) || defined (HOST_IOS)
+#if defined (HOST_ANDROID) || defined (HOST_IOS)
        worker.limit_worker_max = CLAMP (threads_count * 100, MIN (threads_count, 200), MAX (threads_count, 200));
 #else
        worker.limit_worker_max = threads_count * 100;
index 97efd32c1cdac04e48296a738ee74cf9a8098346..120bd1a9458f7e94c26dedf9f03e4dd2b24a9ddf 100644 (file)
 #include <objbase.h>
 #endif
 
-#if defined(PLATFORM_ANDROID) && !defined(TARGET_ARM64) && !defined(TARGET_AMD64)
+#if defined(HOST_ANDROID) && !defined(TARGET_ARM64) && !defined(TARGET_AMD64)
 #define USE_TKILL_ON_ANDROID 1
 #endif
 
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
 #include <errno.h>
 
 #ifdef USE_TKILL_ON_ANDROID
index a3ac2264f6da7addaebd76807e466a43745ce499..65547135b3b11adacd09a7ed750c426e93d78f43 100644 (file)
@@ -1195,7 +1195,7 @@ static guint32 file_seek(FileHandle *filehandle, gint32 movedistance,
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: moving fd %d by %" G_GINT64_FORMAT " bytes from %d", __func__, ((MonoFDHandle*) filehandle)->fd, offset, whence);
 
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        /* bionic doesn't support -D_FILE_OFFSET_BITS=64 */
        MONO_ENTER_GC_SAFE;
        newpos=lseek64(((MonoFDHandle*) filehandle)->fd, offset, whence);
@@ -4245,7 +4245,7 @@ typedef struct {
 } _wapi_drive_type;
 
 static _wapi_drive_type _wapi_drive_types[] = {
-#if PLATFORM_MACOSX
+#if HOST_DARWIN
        { DRIVE_REMOTE, "afp" },
        { DRIVE_REMOTE, "autofs" },
        { DRIVE_CDROM, "cddafs" },
@@ -4402,7 +4402,7 @@ static guint32 _wapi_get_drive_type(const gchar* fstype)
 }
 #endif
 
-#if defined (PLATFORM_MACOSX) || defined (__linux__)
+#if defined (HOST_DARWIN) || defined (__linux__)
 static guint32
 GetDriveTypeFromPath (const gchar *utf8_root_path_name)
 {
@@ -4414,7 +4414,7 @@ GetDriveTypeFromPath (const gchar *utf8_root_path_name)
        MONO_EXIT_GC_SAFE;
        if (res == -1)
                return DRIVE_UNKNOWN;
-#if PLATFORM_MACOSX
+#if HOST_DARWIN
        return _wapi_get_drive_type (buf.f_fstypename);
 #else
        return _wapi_get_drive_type (buf.f_type);
@@ -4507,11 +4507,11 @@ mono_w32file_get_drive_type(const gunichar2 *root_path_name)
        return (drive_type);
 }
 
-#if defined (PLATFORM_MACOSX) || defined (__linux__) || defined(PLATFORM_BSD) || defined(__FreeBSD_kernel__) || defined(__HAIKU__)
+#if defined (HOST_DARWIN) || defined (__linux__) || defined(HOST_BSD) || defined(__FreeBSD_kernel__) || defined(__HAIKU__)
 static gchar*
 get_fstypename (gchar *utfpath)
 {
-#if defined (PLATFORM_MACOSX) || defined (__linux__)
+#if defined (HOST_DARWIN) || defined (__linux__)
        struct statfs stat;
 #if __linux__
        _wapi_drive_type *current;
@@ -4522,7 +4522,7 @@ get_fstypename (gchar *utfpath)
        MONO_EXIT_GC_SAFE;
        if (statfs_res == -1)
                return NULL;
-#if PLATFORM_MACOSX
+#if HOST_DARWIN
        return g_strdup (stat.f_fstypename);
 #else
        current = &_wapi_drive_types[0];
index 3bc10906b8cf008b7dfeac476ec147708730d5e7..91e1d218ad5dc60905cc1442759788ed2713e30d 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <unistd.h>
 
-#ifdef PLATFORM_SOLARIS
+#ifdef HOST_SOLARIS
 /* procfs.h cannot be included if this define is set, but it seems to work fine if it is undefined */
 #if _FILE_OFFSET_BITS == 64
 #undef _FILE_OFFSET_BITS
@@ -41,7 +41,7 @@ mono_w32process_get_name (pid_t pid)
        gchar buf[256];
        gchar *ret = NULL;
 
-#if defined(PLATFORM_SOLARIS)
+#if defined(HOST_SOLARIS)
        filename = g_strdup_printf ("/proc/%d/psinfo", pid);
        if ((fp = fopen (filename, "r")) != NULL) {
                struct psinfo info;
index 5db6bd49446d42a422be8c427b0ee3068c07eb0f..ecab6c5ae125393c9c41171672fe3ffe64df1cce 100644 (file)
@@ -12,7 +12,7 @@
  * FOR EXCLUSIVE USE BY w32process-unix.c
  */
 
-#if defined(PLATFORM_MACOSX)
+#if defined(HOST_DARWIN)
 #define USE_OSX_BACKEND
 #elif (defined(__OpenBSD__) || defined(__FreeBSD__)) && defined(HAVE_LINK_H)
 #define USE_BSD_BACKEND
index 280c3a9213d0a90fd528961ca4c14d878eba7d76..8a55844b6e08884068d95bb62ce3a0037eed9578 100644 (file)
@@ -544,7 +544,7 @@ process_is_alive (pid_t pid)
 {
 #if defined(HOST_WATCHOS)
        return TRUE; // TODO: Rewrite using sysctl
-#elif defined(PLATFORM_MACOSX) || defined(__OpenBSD__) || defined(__FreeBSD__)
+#elif defined(HOST_DARWIN) || defined(__OpenBSD__) || defined(__FreeBSD__)
        if (pid == 0)
                return FALSE;
        if (kill (pid, 0) == 0)
@@ -2105,7 +2105,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoW32ProcessStar
                        goto done;
                }
 
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
                handler = g_strdup ("/usr/bin/open");
 #else
                /*
index bc1b5ccd818d44f09bfa459f94156f2aaaae2b22..74e1fcceab52e3ea2d17a1eb0bdee60f2d4c98fc 100644 (file)
@@ -1373,7 +1373,7 @@ mono_w32socket_get_available (SOCKET sock, guint64 *amount)
                return SOCKET_ERROR;
        }
 
-#if defined (PLATFORM_MACOSX)
+#if defined (HOST_DARWIN)
        // ioctl (socket, FIONREAD, XXX) returns the size of
        // the UDP header as well on Darwin.
        //
index 848f75d3fe1544ed2dedbd459355d7c30a563280..e33441b6d35a4218910e493ff5375292217e37b7 100755 (executable)
@@ -87,7 +87,7 @@ monobinldflags=$(export_ldflags) $(extra_runtime_ldflags)
 if HOST_WIN32
 libmonoldflags=-no-undefined -avoid-version -Wl,--kill-at $(monoldflags)
 else
-if PLATFORM_ANDROID
+if HOST_ANDROID
 libmonoldflags= -avoid-version $(monoldflags)
 else
 libmonoldflags=$(monoldflags) -version-info 1:0:0
@@ -168,7 +168,7 @@ if LOADED_LLVM
 lib_LTLIBRARIES += libmono-llvm.la
 libmono_llvm_la_SOURCES = mini-llvm.c mini-llvm-cpp.cpp llvm-jit.cpp
 libmono_llvm_la_LIBADD = $(GLIB_LIBS) $(LLVM_LIBS) $(LLVM_LDFLAGS)
-if PLATFORM_DARWIN
+if HOST_DARWIN
 libmono_llvm_la_LDFLAGS=-Wl,-undefined -Wl,suppress -Wl,-flat_namespace
 else
 libmono_llvm_la_LIBADD += $(top_builddir)/mono/mini/libmonoboehm-$(API_VER).la $(boehm_libs)
@@ -609,12 +609,12 @@ os_sources = $(windows_sources)
 monobin_platform_ldflags=
 endif
 
-if PLATFORM_SIGPOSIX
+if HOST_SIGPOSIX
 os_sources = $(posix_sources)
 monobin_platform_ldflags=
 endif
 
-if PLATFORM_DARWIN
+if HOST_DARWIN
 os_sources = $(darwin_sources) $(posix_sources)
 #monobin_platform_ldflags=-sectcreate __TEXT __info_plist $(top_srcdir)/mono/mini/Info.plist -framework CoreFoundation -framework Foundation
 monobin_platform_ldflags=-framework CoreFoundation -framework Foundation
index 01c2fe883933e8922c563f7ba899d0e22c4de338..d6c2486414f3278b960ec7480d50137ea27e7cee 100644 (file)
@@ -5800,7 +5800,7 @@ mono_aot_is_pagefault (void *ptr)
 void
 mono_aot_handle_pagefault (void *ptr)
 {
-#ifndef PLATFORM_WIN32
+#ifndef HOST_WIN32
        guint8* start = (guint8*)ROUND_DOWN (((gssize)ptr), mono_pagesize ());
        int res;
 
index b625580c1fe4c347fedcc46b41f7473db085cc88..016423072bd74048996f6c85363e28b6c52d90d7 100644 (file)
@@ -47,7 +47,7 @@
 #include <ws2tcpip.h>
 #endif
 
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
 #include <linux/in.h>
 #include <linux/tcp.h>
 #include <sys/endian.h>
@@ -607,7 +607,7 @@ typedef struct ReplyPacket {
 
 #define DEBUG(level,s) do { if (G_UNLIKELY ((level) <= log_level)) { s; fflush (log_file); } } while (0)
 
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
 #define DEBUG_PRINTF(level, ...) do { if (G_UNLIKELY ((level) <= log_level)) { g_print (__VA_ARGS__); } } while (0)
 #else
 #define DEBUG_PRINTF(level, ...) do { if (G_UNLIKELY ((level) <= log_level)) { fprintf (log_file, __VA_ARGS__); fflush (log_file); } } while (0)
@@ -5941,7 +5941,7 @@ mono_debugger_agent_debug_log_is_enabled (void)
        return agent_config.enabled;
 }
 
-#if defined(PLATFORM_ANDROID) || defined(TARGET_ANDROID)
+#if defined(HOST_ANDROID) || defined(TARGET_ANDROID)
 void
 mono_debugger_agent_unhandled_exception (MonoException *exc)
 {
index 41fe82ea98ede8d2e3cca7dae2d7163358c875b4..3267f82740e77dc4428855ec8a8d75b64e978e78 100644 (file)
@@ -28,7 +28,7 @@ debugger_agent_breakpoint_from_context (MonoContext *ctx);
 void
 mono_debugger_agent_free_domain_info (MonoDomain *domain);
 
-#if defined(PLATFORM_ANDROID) || defined(TARGET_ANDROID)
+#if defined(HOST_ANDROID) || defined(TARGET_ANDROID)
 void
 mono_debugger_agent_unhandled_exception (MonoException *exc);
 #endif
index dac83f0bb43552682bc79bb91749fc6bc39f3940..de769c87fff8d41d8af7e149f6173e65d1568f8a 100644 (file)
@@ -15,9 +15,9 @@
 #include <string.h>
 
 #ifndef MONO_CROSS_COMPILE
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
 #include <asm/sigcontext.h>
-#endif  /* def PLATFORM_ANDROID */
+#endif  /* def HOST_ANDROID */
 #endif
 
 #ifdef HAVE_UCONTEXT_H
index 09c94309b70353d96b20dcc7a676d4e01665515b..b2d92af2cc6213805c3944fc37174168b125aa99 100644 (file)
@@ -2896,4 +2896,131 @@ END:
     IL_0018:  ldloc.0
        ret
        }
+
+    .field  private static  int32 byte_val
+    .field  private static  int32 short_val
+
+    .method static int32 widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d) cil managed noinlining
+    {
+               .maxstack 4
+               ldsfld int32 Tests::byte_val
+               starg.s 0
+               ldarg.0
+               ldc.i4 128 //0x80
+               beq L_0
+
+               ldc.i4.1
+               ret
+L_0:
+               ldsfld int32 Tests::byte_val
+               starg.s 1
+               ldarg.1
+               ldc.i4 -128 //-0x80
+               beq L_1
+
+               ldc.i4.2
+               ret
+
+L_1:
+               ldsfld int32 Tests::short_val
+               starg.s 2
+               ldarg.2
+               ldc.i4 -32768 //-0x8000
+               beq L_2
+
+               ldc.i4.3
+               ret
+
+L_2:
+               ldsfld int32 Tests::short_val
+               starg.s 3
+               ldarg.3
+               ldc.i4 32768 //0x8000
+               beq L_3
+
+               ldc.i4.4
+               ret
+
+L_3:
+               ldc.i4.0
+               ret
+    }
+
+       .method public static int32 test_0_implicit_widen_of_argument_stores () cil managed
+       {
+               .maxstack 5
+               /*
+               This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening.
+               The values are picked so storing them have different values depending on the sign'ness of the local variable.
+               */
+               ldc.i4 0x180
+               stsfld int32 Tests::byte_val
+               ldc.i4 0x18000
+               stsfld int32 Tests::short_val
+
+               ldc.i4.0
+               ldc.i4.0
+               ldc.i4.0
+               ldc.i4.0
+               call int32 Tests::widen_arguments (unsigned int8 a, int8 b, int16 c, unsigned int16 d)
+               ret
+       }
+
+    .method public static int32 test_0_implicit_widen_of_local_stores () cil managed
+    {
+               .maxstack 4
+               .locals init (
+                       unsigned int8   V_0,
+                       int8    V_1,
+                       int16   V_2,
+                       unsigned int16  V_3)
+
+               /*
+               This test verifies that storing an I4 value from the evail stack into a local variable triggers proper widening.
+               The values are picked so storing them have different values depending on the sign'ness of the local variable.
+               */
+               ldc.i4 0x180
+               stsfld int32 Tests::byte_val
+               ldc.i4 0x18000
+               stsfld int32 Tests::short_val
+
+               ldsfld int32 Tests::byte_val
+               stloc.0
+               ldloc.0
+               ldc.i4 128 //0x80
+               beq L_0
+
+               ldc.i4.1
+               ret
+L_0:
+               ldsfld int32 Tests::byte_val
+               stloc.1
+               ldloc.1
+               ldc.i4 -128 //-0x80
+               beq L_1
+
+               ldc.i4.2
+               ret
+L_1:
+               ldsfld int32 Tests::short_val
+               stloc.2
+               ldloc.2
+               ldc.i4 -32768 //-0x8000
+               beq L_2
+
+               ldc.i4.3
+               ret
+L_2:
+               ldsfld int32 Tests::short_val
+               stloc.3
+               ldloc.3
+               ldc.i4 32768 //0x8000
+               beq L_3
+
+               ldc.i4.4
+               ret
+L_3:
+               ldc.i4.0
+               ret
+    }
 }
index 07585ad2f82dcdddc969c2cd41242f620400b387..084730f031124c774d734470f315feee42a339f5 100644 (file)
@@ -6607,10 +6607,78 @@ set_exception_type_from_invalid_il (MonoCompile *cfg, MonoMethod *method, unsign
        cfg->headers_to_free = g_slist_prepend_mempool (cfg->mempool, cfg->headers_to_free, header);
 }
 
+static guint32
+mono_type_to_stloc_coerce (MonoType *type)
+{
+       if (type->byref)
+               return 0;
+
+       type = mini_get_underlying_type (type);
+handle_enum:
+       switch (type->type) {
+       case MONO_TYPE_I1:
+               return OP_ICONV_TO_I1;
+       case MONO_TYPE_U1:
+               return OP_ICONV_TO_U1;
+       case MONO_TYPE_I2:
+               return OP_ICONV_TO_I2;
+       case MONO_TYPE_U2:
+               return OP_ICONV_TO_U2;
+       case MONO_TYPE_I4:
+       case MONO_TYPE_U4:
+       case MONO_TYPE_I:
+       case MONO_TYPE_U:
+       case MONO_TYPE_PTR:
+       case MONO_TYPE_FNPTR:
+       case MONO_TYPE_CLASS:
+       case MONO_TYPE_STRING:
+       case MONO_TYPE_OBJECT:
+       case MONO_TYPE_SZARRAY:
+       case MONO_TYPE_ARRAY:
+       case MONO_TYPE_I8:
+       case MONO_TYPE_U8:
+       case MONO_TYPE_R4:
+       case MONO_TYPE_R8:
+       case MONO_TYPE_TYPEDBYREF:
+       case MONO_TYPE_GENERICINST:
+               return 0;
+       case MONO_TYPE_VALUETYPE:
+               if (type->data.klass->enumtype) {
+                       type = mono_class_enum_basetype (type->data.klass);
+                       goto handle_enum;
+               }
+               return 0;
+       case MONO_TYPE_VAR:
+       case MONO_TYPE_MVAR: //TODO I believe we don't need to handle gsharedvt as there won't be match and, for example, u1 is not covariant to u32
+               return 0;
+       default:
+               g_error ("unknown type 0x%02x in mono_type_to_stloc_coerce", type->type);
+       }
+       return -1;
+}
+
 static void
 emit_stloc_ir (MonoCompile *cfg, MonoInst **sp, MonoMethodHeader *header, int n)
 {
        MonoInst *ins;
+       guint32 coerce_op = mono_type_to_stloc_coerce (header->locals [n]);
+
+       if (coerce_op) {
+               if (cfg->cbb->last_ins == sp [0] && sp [0]->opcode == coerce_op) {
+                       if (cfg->verbose_level > 2)
+                               printf ("Found existing coercing is enough for stloc\n");
+               } else {
+                       MONO_INST_NEW (cfg, ins, coerce_op);
+                       ins->dreg = alloc_ireg (cfg);
+                       ins->sreg1 = sp [0]->dreg;
+                       ins->type = STACK_I4;
+                       ins->klass = mono_class_from_mono_type (header->locals [n]);
+                       MONO_ADD_INS (cfg->cbb, ins);
+                       *sp = mono_decompose_opcode (cfg, ins);
+               }
+       }
+
+
        guint32 opcode = mono_type_to_regmove (cfg, header->locals [n]);
        if ((opcode == OP_MOVE) && cfg->cbb->last_ins == sp [0]  &&
                        ((sp [0]->opcode == OP_ICONST) || (sp [0]->opcode == OP_I8CONST))) {
@@ -6625,6 +6693,30 @@ emit_stloc_ir (MonoCompile *cfg, MonoInst **sp, MonoMethodHeader *header, int n)
        }
 }
 
+static void
+emit_starg_ir (MonoCompile *cfg, MonoInst **sp, int n)
+{
+       MonoInst *ins;
+       guint32 coerce_op = mono_type_to_stloc_coerce (cfg->arg_types [n]);
+
+       if (coerce_op) {
+               if (cfg->cbb->last_ins == sp [0] && sp [0]->opcode == coerce_op) {
+                       if (cfg->verbose_level > 2)
+                               printf ("Found existing coercing is enough for starg\n");
+               } else {
+                       MONO_INST_NEW (cfg, ins, coerce_op);
+                       ins->dreg = alloc_ireg (cfg);
+                       ins->sreg1 = sp [0]->dreg;
+                       ins->type = STACK_I4;
+                       ins->klass = mono_class_from_mono_type (cfg->arg_types [n]);
+                       MONO_ADD_INS (cfg->cbb, ins);
+                       *sp = mono_decompose_opcode (cfg, ins);
+               }
+       }
+
+       EMIT_NEW_ARGSTORE (cfg, ins, n, *sp);
+}
+
 /*
  * ldloca inhibits many optimizations so try to get rid of it in common
  * cases.
@@ -7798,7 +7890,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                        CHECK_ARG (n);
                        if (!dont_verify_stloc && target_type_is_incompatible (cfg, param_types [ip [1]], *sp))
                                UNVERIFIED;
-                       EMIT_NEW_ARGSTORE (cfg, ins, n, *sp);
+                       emit_starg_ir (cfg, sp, n);
                        ip += 2;
                        break;
                case CEE_LDLOC_S:
@@ -12279,7 +12371,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                CHECK_ARG (n);
                                if (!dont_verify_stloc && target_type_is_incompatible (cfg, param_types [n], *sp))
                                        UNVERIFIED;
-                               EMIT_NEW_ARGSTORE (cfg, ins, n, *sp);
+                               emit_starg_ir (cfg, sp, n);
                                ip += 4;
                                break;
                        case CEE_LDLOC:
index 98bc4bf7ee5483d0c8cb6b25075ec150b3031e92..1f6b67f26fef0ad181435383e4e2127b56bb3161 100644 (file)
@@ -335,7 +335,7 @@ mono_arm_patchable_bl (guint8 *code, int cond)
        return code;
 }
 
-#if defined(__ARM_EABI__) && defined(__linux__) && !defined(PLATFORM_ANDROID) && !defined(MONO_CROSS_COMPILE)
+#if defined(__ARM_EABI__) && defined(__linux__) && !defined(HOST_ANDROID) && !defined(MONO_CROSS_COMPILE)
 #define HAVE_AEABI_READ_TP 1
 #endif
 
index 4f81d7c4c37c42793c25b489ae438325e5c68dd7..ad70319d7440f0646d323d62b9282caa26b4379d 100644 (file)
@@ -2709,12 +2709,12 @@ mono_handle_native_crash (const char *signal, void *ctx, MONO_SIG_HANDLER_INFO_T
                 * glibc fork acquires some locks, so if the crash happened inside malloc/free,
                 * it will deadlock. Call the syscall directly instead.
                 */
-#if defined(PLATFORM_ANDROID)
+#if defined(HOST_ANDROID)
                /* SYS_fork is defined to be __NR_fork which is not defined in some ndk versions */
                g_assert_not_reached ();
-#elif !defined(PLATFORM_MACOSX) && defined(SYS_fork)
+#elif !defined(HOST_DARWIN) && defined(SYS_fork)
                pid = (pid_t) syscall (SYS_fork);
-#elif defined(PLATFORM_MACOSX) && HAVE_FORK
+#elif defined(HOST_DARWIN) && HAVE_FORK
                pid = (pid_t) fork ();
 #else
                g_assert_not_reached ();
@@ -2742,7 +2742,7 @@ mono_handle_native_crash (const char *signal, void *ctx, MONO_SIG_HANDLER_INFO_T
 #endif
  }
 #else
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        /* set DUMPABLE for this process so debuggerd can attach with ptrace(2), see:
         * https://android.googlesource.com/platform/bionic/+/151da681000c07da3c24cd30a3279b1ca017f452/linker/debugger.cpp#206
         * this has changed on later versions of Android.  Also, we don't want to
@@ -2782,7 +2782,7 @@ mono_handle_native_crash (const char *signal, void *ctx, MONO_SIG_HANDLER_INFO_T
 
        if (!mono_do_crash_chaining) {
                /*Android abort is a fluke, it doesn't abort, it triggers another segv. */
-#if defined (PLATFORM_ANDROID)
+#if defined (HOST_ANDROID)
                exit (-1);
 #else
                abort ();
@@ -2845,7 +2845,7 @@ mono_print_thread_dump_internal (void *sigctx, MonoContext *start_ctx)
 
        mono_runtime_printf ("%s", text->str);
 
-#if PLATFORM_WIN32 && TARGET_WIN32 && _DEBUG
+#if HOST_WIN32 && TARGET_WIN32 && _DEBUG
        OutputDebugStringA(text->str);
 #endif
 
index 9943d883966e1b74b6be10e1b515c3fbe945e0ba..243c83cbe5d9cbbbe8e902d1d27ab72a043269e4 100644 (file)
@@ -390,7 +390,7 @@ info_has_identity (MonoRgctxInfoType info_type)
 /*
  * LOCKING: loader lock
  */
-#if defined(PLATFORM_ANDROID) && defined(TARGET_ARM)
+#if defined(HOST_ANDROID) && defined(TARGET_ARM)
 /* work around for HW bug on Nexus9 when running on armv7 */
 #ifdef __clang__
 static __attribute__ ((optnone)) void
index 8b17287a21a5aa0bd48fc9828176dda9ec1b255b..331b7ca3c02bff600ca6b3d5ae8e517824bf28c1 100644 (file)
@@ -68,7 +68,7 @@
 
 #include "jit-icalls.h"
 
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
 #include <mach/mach.h>
 #include <mach/mach_time.h>
 #include <mach/clock.h>
@@ -95,7 +95,7 @@ MONO_SIG_HANDLER_SIGNATURE (mono_chain_signal)
        return FALSE;
 }
 
-#ifndef PLATFORM_MACOSX
+#ifndef HOST_DARWIN
 void
 mono_runtime_install_handlers (void)
 {
@@ -302,7 +302,7 @@ add_signal_handler (int signo, gpointer handler, int flags)
 #ifdef MONO_ARCH_SIGSEGV_ON_ALTSTACK
 
 /*Apple likes to deliver SIGBUS for *0 */
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
        if (signo == SIGSEGV || signo == SIGBUS) {
 #else
        if (signo == SIGSEGV) {
@@ -396,7 +396,7 @@ mono_runtime_posix_install_handlers (void)
        add_signal_handler (SIGSEGV, mono_sigsegv_signal_handler, 0);
 }
 
-#ifndef PLATFORM_MACOSX
+#ifndef HOST_DARWIN
 void
 mono_runtime_install_handlers (void)
 {
@@ -428,7 +428,7 @@ mono_runtime_cleanup_handlers (void)
 
 static volatile gint32 sampling_thread_running;
 
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
 
 static clock_serv_t sampling_clock_service;
 
@@ -699,7 +699,7 @@ mono_runtime_shutdown_stat_profiler (void)
 
        mono_profiler_sampling_thread_post ();
 
-#ifndef PLATFORM_MACOSX
+#ifndef HOST_DARWIN
        /*
         * There is a slight problem when we're using CLOCK_PROCESS_CPUTIME_ID: If
         * we're shutting down and there's largely no activity in the process other
@@ -755,7 +755,7 @@ mono_runtime_setup_stat_profiler (void)
         * get us a 100% sampling rate. However, this may interfere with the GC's
         * STW logic. Could perhaps be solved by taking the suspend lock.
         */
-#if defined (USE_POSIX_BACKEND) && defined (SIGRTMIN) && !defined (PLATFORM_ANDROID)
+#if defined (USE_POSIX_BACKEND) && defined (SIGRTMIN) && !defined (HOST_ANDROID)
        /* Just take the first real-time signal we can get. */
        profiler_signal = mono_threads_suspend_search_alternative_signal ();
 #else
@@ -855,7 +855,7 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
 
        memset (argv, 0, sizeof (char*) * 10);
 
-#if defined(PLATFORM_MACOSX)
+#if defined(HOST_DARWIN)
        if (native_stack_with_lldb (crashed_pid, argv, commands, commands_filename))
                goto exec;
 #endif
@@ -863,7 +863,7 @@ mono_gdb_render_native_backtraces (pid_t crashed_pid)
        if (native_stack_with_gdb (crashed_pid, argv, commands, commands_filename))
                goto exec;
 
-#if !defined(PLATFORM_MACOSX)
+#if !defined(HOST_DARWIN)
        if (native_stack_with_lldb (crashed_pid, argv, commands, commands_filename))
                goto exec;
 #endif
index b839e49f09637e9d1314e10c13815ced0435d885..8f0f7dd5395b6471f9fec9ef9df7fdc9d688a124 100644 (file)
@@ -4045,7 +4045,7 @@ register_icalls (void)
        mono_add_internal_call ("Mono.Runtime::mono_runtime_cleanup_handlers",
                                mono_runtime_cleanup_handlers);
 
-#if defined(PLATFORM_ANDROID) || defined(TARGET_ANDROID)
+#if defined(HOST_ANDROID) || defined(TARGET_ANDROID)
        mono_add_internal_call ("System.Diagnostics.Debugger::Mono_UnhandledException_internal",
                                mono_debugger_agent_unhandled_exception);
 #endif
index 5e6e718486f8b7c29b519017b2acf237b41b8e58..ee3c3754ae28921d193ee88b106e5aac99f1447d 100644 (file)
@@ -3163,7 +3163,7 @@ mini_method_compile (MonoMethod *method, guint32 opts, MonoDomain *domain, JitFl
        cfg->llvm_only = (flags & JIT_FLAG_LLVM_ONLY) != 0;
        cfg->backend = current_backend;
 
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        if (cfg->method->wrapper_type != MONO_WRAPPER_NONE) {
                /* FIXME: Why is this needed */
                cfg->gen_seq_points = FALSE;
index 7ce873a38ce7b6bdb0f42d9830c4329fa4d4f844..d15e9ec7164d463be1523a2952495f9caf1d8c7c 100644 (file)
 #define mono_simd_shuffle_mask(a,b,c,d) ((a) | ((b) << 2) | ((c) << 4) | ((d) << 6))
 
 /* Remap printf to g_print (we use a mix of these in the mini code) */
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
 #define printf g_print
 #endif
 
index e5e36100f09575d94edbd0d24c29028a82ba949d..0e50ae550707597de0aee029b8dc9cdda3829405 100644 (file)
@@ -26,7 +26,7 @@
 #include <mono/utils/mono-memory-model.h>
 #include "trace.h"
 
-#if defined (PLATFORM_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
+#if defined (HOST_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
 #  undef printf
 #  define printf(...) g_log("mono", G_LOG_LEVEL_MESSAGE, __VA_ARGS__)
 #  undef fprintf
index f96c8a3fcccfba10337d1c2c3597139df56c46c5..88cd9d37a1a2851aa5944c04a5feb265f5651767 100644 (file)
@@ -30,7 +30,7 @@ lib_LTLIBRARIES = \
 suppressiondir = $(datadir)/mono-$(API_VER)/mono/profiler
 suppression_DATA = mono-profiler-log.suppression
 
-if PLATFORM_DARWIN
+if HOST_DARWIN
 if BITCODE
 prof_ldflags = -no-undefined
 else
@@ -44,7 +44,7 @@ else
 libmono_dep = $(monodir)/mono/mini/$(LIBMONO_LA)
 endif
 
-if PLATFORM_ANDROID
+if HOST_ANDROID
 prof_ldflags = -avoid-version
 endif
 
index 35e1195dbfbbfc27c96546a05684c22ad1b6fa3e..5f4185d4df70ec4f48a692aae3edfc46cfd3396b 100644 (file)
@@ -1220,7 +1220,7 @@ major_get_and_reset_num_major_objects_marked (void)
 #endif
 
 /* gcc 4.2.1 from xcode4 crashes on sgen_card_table_get_card_address () when this is enabled */
-#if defined(PLATFORM_MACOSX)
+#if defined(HOST_DARWIN)
 #if MONO_GNUC_VERSION <= 40300
 #undef PREFETCH_CARDS
 #endif
index e93fb7de81fe72e9473bece369a46c8fbe661770..aeec29b075f9b9c90070489bf9acf68033f4ed2f 100755 (executable)
@@ -1139,10 +1139,10 @@ tests: compile-tests
 #
 # Test that no symbols are missed in eglib-remap.h
 #
-if PLATFORM_LINUX
+if HOST_LINUX
 test-platform: test-eglib-remap
 else
-if PLATFORM_DARWIN
+if HOST_DARWIN
 test-platform: test-eglib-remap
 endif
 endif
index ec04c4d1c5f17f5df5dab43b834893dc048783f1..82eb31b21571823d17a3214ab19f413f590f2d49 100644 (file)
@@ -3,7 +3,7 @@ AM_CPPFLAGS = -I$(top_srcdir) -I$(top_srcdir)/mono $(LIBGC_CPPFLAGS) $(GLIB_CFLA
 test_cflags = $(AM_CFLAGS) $(SGEN_DEFINES)
 test_ldadd = libtestlib.la \
        $(LIBGC_LIBS) $(GLIB_LIBS) -lm $(LIBICONV)
-if PLATFORM_DARWIN
+if HOST_DARWIN
 test_ldflags = -framework CoreFoundation -framework Foundation
 endif
 
index 746c84fb5131455564551cf4186402cbf41820f0..3e1b4108b4e2a3c9e27df66843593c7fdea0aff4 100644 (file)
@@ -74,7 +74,7 @@ typedef SSIZE_T ssize_t;
 #define MONO_EMPTY_SOURCE_FILE(x)
 #endif
 
-#if !defined(_MSC_VER) && !defined(PLATFORM_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
+#if !defined(_MSC_VER) && !defined(HOST_SOLARIS) && !defined(_WIN32) && !defined(__CYGWIN__) && !defined(MONOTOUCH) && HAVE_VISIBILITY_HIDDEN
 #if MONO_LLVM_LOADED
 #define MONO_LLVM_INTERNAL MONO_API
 #else
index 0ade0d5414931c3bab348ef107cff8d3416fd3e2..c2b2b96d9d7419c0eea9d9400a84da27323b6d7a 100644 (file)
@@ -61,7 +61,7 @@ mono_dl_get_system_dir (void)
 void *
 mono_dl_open_file (const char *file, int flags)
 {
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        /* Bionic doesn't support NULL filenames */
        if (!file)
                return NULL;
index 4ab9cd7b05ecb8898fe3738ac3e21cf940e13049..a44f43ac9e74392c9b207f3a9def06d6ab40ee87 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "mono/utils/mono-hwcap.h"
 
-#if defined(HAVE_SYS_AUXV_H) && !defined(PLATFORM_ANDROID)
+#if defined(HAVE_SYS_AUXV_H) && !defined(HOST_ANDROID)
 #include <sys/auxv.h>
 #elif defined(__APPLE__)
 #include <mach/machine.h>
@@ -38,7 +38,7 @@
 void
 mono_hwcap_arch_init (void)
 {
-#if defined(HAVE_SYS_AUXV_H) && !defined(PLATFORM_ANDROID)
+#if defined(HAVE_SYS_AUXV_H) && !defined(HOST_ANDROID)
        unsigned long hwcap;
        unsigned long platform;
 
index 1072788a6f5165885bbb8d15ec265449325cbbde..fba61f760776ab8c4b173410cbe9459aaff2cb10 100644 (file)
@@ -10,7 +10,7 @@
  */
 #include <config.h>
 
-#if defined (PLATFORM_ANDROID)
+#if defined (HOST_ANDROID)
 
 #include <android/log.h>
 #include "mono-logger-internals.h"
index e28b3f361035b0c13167140acc67cad724d3da60..4a83afd5228feebe46deafcc847a97dd234a5de6 100644 (file)
@@ -134,7 +134,7 @@ mono_trace_message(MonoTraceMask mask, const char *format, ...)
 
 #endif /* !__GNUC__ */
 
-#if defined (PLATFORM_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
+#if defined (HOST_ANDROID) || (defined (TARGET_IOS) && defined (TARGET_IOS))
 
 #define mono_gc_printf(gc_log_file, format, ...) g_log ("mono-gc", G_LOG_LEVEL_MESSAGE, format, ##__VA_ARGS__)
 #define mono_runtime_printf(format, ...) g_log ("mono-rt", G_LOG_LEVEL_MESSAGE, format "\n", ##__VA_ARGS__)
@@ -184,7 +184,7 @@ void mono_log_open_logfile (const char *, void *);
 void mono_log_write_logfile (const char *, GLogLevelFlags, mono_bool, const char *);
 void mono_log_close_logfile (void);
 
-#if PLATFORM_ANDROID
+#if HOST_ANDROID
 void mono_log_open_logcat (const char *path, void *userData);
 void mono_log_write_logcat (const char *log_domain, GLogLevelFlags level, mono_bool hdr, const char *message);
 void mono_log_close_logcat (void);
index aeaa3f97ceefab0bc79fe685d042ade9a91d5368..d8d9e82ee44a2cb30bd060af3a51372a50001814 100644 (file)
@@ -154,7 +154,7 @@ mono_trace_set_logdest_string (const char *dest)
        if(level_stack == NULL)
                mono_trace_init();
 
-#if PLATFORM_ANDROID
+#if HOST_ANDROID
        logger.opener = mono_log_open_logcat;
        logger.writer = mono_log_write_logcat;
        logger.closer = mono_log_close_logcat;
index be1f64858863ba930c0340e6bfe44201e24b659f..eb7c4bb5b15377205e5b6e35705959d1b636ee66 100644 (file)
@@ -41,7 +41,7 @@ G_BEGIN_DECLS
 
 #if !defined(HOST_WIN32)
 
-#if !defined(CLOCK_MONOTONIC) || defined(PLATFORM_MACOSX) || defined(PLATFORM_ANDROID)
+#if !defined(CLOCK_MONOTONIC) || defined(HOST_DARWIN) || defined(HOST_ANDROID)
 #define BROKEN_CLOCK_SOURCE
 #endif
 
index e93eb7e53f0192a0249eae1d06a0ce1cf39a03fa..d0dd89b4c0da0525f0c71633119322b7bee8c7c6 100644 (file)
@@ -108,7 +108,7 @@ mono_path_canonicalize (const char *path)
  * This ensures that the path that we store points to the final file
  * not a path to a symlink.
  */
-#if !defined(PLATFORM_NO_SYMLINKS)
+#if !defined(HOST_NO_SYMLINKS)
 static gchar *
 resolve_symlink (const char *path)
 {
@@ -147,7 +147,7 @@ resolve_symlink (const char *path)
 gchar *
 mono_path_resolve_symlinks (const char *path)
 {
-#if defined(PLATFORM_NO_SYMLINKS)
+#if defined(HOST_NO_SYMLINKS)
        return mono_path_canonicalize (path);
 #else
        gchar **split = g_strsplit (path, G_DIR_SEPARATOR_S, -1);
index 5c5b891d607ab952d55bc3699d857566c6ce9c64..714d9eb7a245af19256c06d7629aa8be6609c950 100644 (file)
@@ -682,7 +682,7 @@ mono_process_current_pid ()
 int
 mono_cpu_count (void)
 {
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        /* Android tries really hard to save power by powering off CPUs on SMP phones which
         * means the normal way to query cpu count returns a wrong value with userspace API.
         * Instead we use /sys entries to query the actual hardware CPU count.
@@ -750,7 +750,7 @@ mono_cpu_count (void)
  * * use sched_getaffinity (+ fallback to _SC_NPROCESSORS_ONLN in case of error) on x86. This
  * ensures we're inline with what OpenJDK [4] and CoreCLR [5] do
  * * use _SC_NPROCESSORS_CONF exclusively on ARM (I think we could eventually even get rid of
- * the PLATFORM_ANDROID special case)
+ * the HOST_ANDROID special case)
  *
  * Helpful links:
  *
@@ -891,7 +891,7 @@ mono_cpu_get_data (int cpu_id, MonoCpuData data, MonoProcessError *error)
 int
 mono_atexit (void (*func)(void))
 {
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        /* Some versions of android libc doesn't define atexit () */
        return 0;
 #else
index c067ce22512786dd24cfea7715080b2355f48063..479b8d4bf012b35782f41bfaa79fe8e74f0cc682 100644 (file)
@@ -6,7 +6,7 @@
 #define __MONO_MONO_SIGCONTEXT_H__
 
 #include <config.h>
-#if defined(PLATFORM_ANDROID)
+#if defined(HOST_ANDROID)
 #include <asm/sigcontext.h>
 #endif
 
@@ -89,7 +89,7 @@
        #define UCONTEXT_REG_ESI(ctx) (((ucontext_t*)(ctx))->sc_esi)
        #define UCONTEXT_REG_EDI(ctx) (((ucontext_t*)(ctx))->sc_edi)
        #define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->sc_eip)
-#elif defined(PLATFORM_SOLARIS)
+#elif defined(HOST_SOLARIS)
        #define UCONTEXT_REG_EAX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EAX])
        #define UCONTEXT_REG_EBX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EBX])
        #define UCONTEXT_REG_ECX(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [ECX])
        #define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [EIP])
 #else
 
-#if defined(PLATFORM_ANDROID) && !defined(HAVE_UCONTEXT_H)
+#if defined(HOST_ANDROID) && !defined(HAVE_UCONTEXT_H)
 /* No ucontext.h as of NDK v6b */
 typedef int greg_t;
 #define NGREG 19
index c8c17a3d3cfc1cda13b0f7a25ce4d47340d2f14a..dd4307bca372d4e3158be6626852bf47395a802d 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <config.h>
 
-#if defined(PLATFORM_ANDROID)
+#if defined(HOST_ANDROID)
 
 #include <pthread.h>
 #include <stdio.h>
index d757cd66c318ec6e87a072d2597e2606909d8c3c..e73b86084fc2b9830eb8775db3ee65f5fce376af 100644 (file)
@@ -4,7 +4,7 @@
 
 #include <config.h>
 
-#if (defined(__linux__) && !defined(PLATFORM_ANDROID)) || defined(__FreeBSD_kernel__)
+#if (defined(__linux__) && !defined(HOST_ANDROID)) || defined(__FreeBSD_kernel__)
 
 #include <mono/utils/mono-threads.h>
 #include <pthread.h>
index 289bd98cd66e2faa8c61063213ce5aba2de7d38e..5f762c83abe784c9b66e1457287e3e34ea1a2ac1 100644 (file)
@@ -62,7 +62,7 @@ signal_add_handler (int signo, void (*handler)(int, siginfo_t *, void *), int fl
 static int
 abort_signal_get (void)
 {
-#if defined(PLATFORM_ANDROID)
+#if defined(HOST_ANDROID)
        return SIGTTIN;
 #elif defined (SIGRTMIN)
        static int abort_signum = -1;
@@ -79,7 +79,7 @@ abort_signal_get (void)
 static int
 suspend_signal_get (void)
 {
-#if defined(PLATFORM_ANDROID)
+#if defined(HOST_ANDROID)
        return SIGPWR;
 #elif defined (SIGRTMIN)
        static int suspend_signum = -1;
@@ -98,7 +98,7 @@ suspend_signal_get (void)
 static int
 restart_signal_get (void)
 {
-#if defined(PLATFORM_ANDROID)
+#if defined(HOST_ANDROID)
        return SIGXCPU;
 #elif defined (SIGRTMIN)
        static int restart_signum = -1;
@@ -244,7 +244,7 @@ mono_threads_suspend_init_signals (void)
        On 32bits arm Android, signals with values >=32 are not usable as their headers ship a broken sigset_t.
        See 5005c6f3fbc1da584c6a550281689cc23f59fe6d for more details.
        */
-#ifdef PLATFORM_ANDROID
+#ifdef HOST_ANDROID
        g_assert (suspend_signal_num < 32);
        g_assert (restart_signal_num < 32);
        g_assert (abort_signal_num < 32);
index 138cc9e4b6aebd411ea1e0f75b88ce42b1cb5176..22fcb674add26a94d235726f21a0a701afb40bc8 100644 (file)
@@ -22,7 +22,7 @@
 
 #include <errno.h>
 
-#if defined(PLATFORM_ANDROID) && !defined(TARGET_ARM64) && !defined(TARGET_AMD64)
+#if defined(HOST_ANDROID) && !defined(TARGET_ARM64) && !defined(TARGET_AMD64)
 #define USE_TKILL_ON_ANDROID 1
 #endif
 
@@ -295,7 +295,7 @@ mono_threads_suspend_abort_syscall (MonoThreadInfo *info)
 void
 mono_threads_suspend_register (MonoThreadInfo *info)
 {
-#if defined (PLATFORM_ANDROID)
+#if defined (HOST_ANDROID)
        info->native_handle = gettid ();
 #endif
 }
index e26ca1760c6fb49214c735925a064146b8005ec7..9ba005e01b5bd26800a8e5d16c9d7ababe8eeb43 100644 (file)
@@ -1313,7 +1313,7 @@ mono_thread_info_sleep (guint32 ms, gboolean *alerted)
                } while (1);
        } else {
                int ret;
-#if defined (__linux__) && !defined(PLATFORM_ANDROID)
+#if defined (__linux__) && !defined(HOST_ANDROID)
                struct timespec start, target;
 
                /* Use clock_nanosleep () to prevent time drifting problems when nanosleep () is interrupted by signals */
index ddca2c9ebb80d732c5697fdc97f2fa6858ddcdee..4a3b2705563e98068832db9c688e5267af79f0d6 100644 (file)
@@ -84,7 +84,7 @@ mono_100ns_datetime (void)
 #include <sys/sysctl.h>
 #endif
 
-#if defined(PLATFORM_MACOSX)
+#if defined(HOST_DARWIN)
 #include <mach/mach.h>
 #include <mach/mach_time.h>
 #endif
@@ -143,7 +143,7 @@ gint64
 mono_100ns_ticks (void)
 {
        struct timeval tv;
-#if defined(PLATFORM_MACOSX)
+#if defined(HOST_DARWIN)
        /* http://developer.apple.com/library/mac/#qa/qa1398/_index.html */
        static mach_timebase_info_data_t timebase;
        guint64 now = mach_absolute_time ();
index 751994f004eb36762e1de714cef3089f76835f15..0eb54930aa06a576dfb14e9f8f3d4317f847168f 100644 (file)
@@ -3,7 +3,7 @@ import fileinput
 class MSBuild (GitHubPackage):
        def __init__ (self):
                GitHubPackage.__init__ (self, 'mono', 'msbuild', '15.4',
-                       revision = 'e497ddc04f507d9d8b6db399c3cff975cd4529de')
+                       revision = 'c907a5182a101624eb58e73fb24f97666abf477a')
 
        def build (self):
                self.sh ('./cibuild.sh --scope Compile --target Mono --host Mono --config Release')
index f7f8b3fe0e2c0cfd7a429d6a2c01942b2407dc68..0c479324de92ea89389d6f4964173aebead542c1 100644 (file)
@@ -11,6 +11,7 @@
 /chktrust
 /cilc
 /crlupdate
+/csi
 /csharp
 /csharp2
 /disco
index b066d462b167c0a3121486d462612e3e050fb171..76b4b388e9862170e2647ed127d1bf71017f1fbd 100644 (file)
@@ -86,7 +86,7 @@ Mono_Posix_Syscall_strerror_r (int errnum, char *buf, mph_size_t n)
        mph_return_if_size_t_overflow (n);
 
        /* first, check for valid errnum */
-#if PLATFORM_ANDROID
+#if HOST_ANDROID
        /* Android NDK defines _GNU_SOURCE but strerror_r follows the XSI semantics
         * not the GNU one. XSI version returns an integer, as opposed to the GNU one
         * which returns pointer to the buffer.
index 141b675c01097f4e4e087756810cb5f5108bfa5c..e5992e5e71f03357080123ffb7a460016db8c488 100644 (file)
  * OS X doesn't define MAP_ANONYMOUS, but it does define MAP_ANON.
  * Alias them to fix: https://bugzilla.xamarin.com/show_bug.cgi?id=3419
  */
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
 #endif  /* ndef MAP_ANONYMOUS */
-#endif  /* ndef PLATFORM_MACOSX */
+#endif  /* ndef HOST_DARWIN */
 
 /*
  * XATTR_AUTO is a synonym for 0 within XattrFlags, but most systems don't
index afbe46624447d87a05a10d44e367427e0b45311d..143148f8ca3c0e345657eb62bd406252a157f935 100644 (file)
@@ -13,7 +13,7 @@
 #define _XOPEN_SOURCE 600
 #endif
 
-#ifdef PLATFORM_MACOSX
+#ifdef HOST_DARWIN
 /* For mincore () */
 #define _DARWIN_C_SOURCE
 #endif
index 3edf7be4163bac5febd12a6987d64dfbaa5d2b86..7b6797acb04160a9b17fdc038389dfaece9dae5a 100644 (file)
@@ -31,7 +31,7 @@ Mono_Posix_Syscall_sendfile (int out_fd, int in_fd, mph_off_t *offset, mph_size_
 
        _offset = *offset;
 
-#if defined(PLATFORM_MACOSX) || defined(PLATFORM_BSD)
+#if defined(HOST_DARWIN) || defined(HOST_BSD)
        /* The BSD version has 6 arguments */
        g_assert_not_reached ();
 #else
index 1123f2bc0fac9112b60e8f398e11b685eb59783c..0f560e28d00afcb0eaefd31c415b2ca018bdfc29 100644 (file)
@@ -230,7 +230,7 @@ Mono_Posix_Syscall_setdomainname (const char *name, mph_size_t len)
 /* Android implements truncate, but doesn't declare it.
  * Result is a warning during compilation, so skip it.
  */
-#ifndef PLATFORM_ANDROID
+#ifndef HOST_ANDROID
 gint32
 Mono_Posix_Syscall_truncate (const char *path, mph_off_t length)
 {
index 1a53e3772b7a01686881710930f90104034ccfda..b64d44c231e6de3172bc4c1c9a3ee79d5bec59e5 100644 (file)
@@ -38,7 +38,7 @@ monograph_LDADD = \
        $(LIBICONV)                     \
        -lm
 
-if PLATFORM_DARWIN
+if HOST_DARWIN
 monograph_LDFLAGS=-framework CoreFoundation
 endif
 
index 05b30f25975919693cfcac349c3fad47f9c08492..4df4d768ff470719ccc2cc23dcc2cbc0a586c797 100644 (file)
@@ -10,13 +10,16 @@ nuget-hash-extractor.exe: $(SOURCES)
 
 download: .download_stamp_file
 
-run: download nuget-hash-extractor.exe exec-ver exec-asm
+run: download nuget-hash-extractor.exe exec-ver exec-asm exec-msbuild
 
 run-asm: download nuget-hash-extractor.exe exec-asm
 
 exec-asm:
        mono nuget-hash-extractor.exe nugets asm
 
+exec-msbuild:
+       mono nuget-hash-extractor.exe nugets guids_for_msbuild
+
 run-ver: download nuget-hash-extractor.exe exec-ver
 
 exec-ver:
index aee4e36d21271fd6c9d0af819edcb1ca8a57bb57..3e413ea253107644245ceff1bfca38695d987e78 100755 (executable)
@@ -1,5 +1,20 @@
 mkdir nugets
 
+##
+## Following are nugets which have net4* implementation but that implementation is Windows specific and won’t work on Mono or
+## with any profile derived from Mono net_4_x profile like Xamarin.Mac. This is due to no TFM for Mono or Xamarin.Mac which
+## would allow us to customize the behaviors.
+##
+## We don’t want to fix all broken nugets we only focus on few system-like that are likely to be used by broad audience and
+## we have working implementation available in one of Mono assemblies.
+##
+## PLEASE keep this in sync with mcs/tools/xbuild/data/deniedAssembliesList.txt
+##
+## If any nugets are added or removed here, then make sure to regenerate the above file with:
+##
+##   $ mono nuget-hash-extractor.exe nugets guids_for_msbuild > ../../mcs/tools/xbuild/data/deniedAssembliesList.txt
+##
+
 #System.Runtime.InteropServices.RuntimeInformation
 wget https://www.nuget.org/api/v2/package/System.Runtime.InteropServices.RuntimeInformation/4.3.0 -O nugets/system.runtime.interopservices.runtimeinformation.4.3.0.nupkg
 wget https://www.nuget.org/api/v2/package/System.Runtime.InteropServices.RuntimeInformation/4.0.0 -O nugets/system.runtime.interopservices.runtimeinformation.4.0.0.nupkg
@@ -23,20 +38,14 @@ wget https://www.nuget.org/api/v2/package/System.Net.Http/4.1.0 -O nugets/system
 wget https://www.nuget.org/api/v2/package/System.Net.Http/4.0.0 -O nugets/system.net.http.4.0.0.nupkg
 
 #System.Text.Encoding.CodePages
+wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.4.0 -O nugets/system.text.encoding.codepages.4.4.0.nupkg
 wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.3.0 -O nugets/system.text.encoding.codepages.4.3.0.nupkg
 wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.0.1 -O nugets/system.text.encoding.codepages.4.0.1.nupkg
 wget https://www.nuget.org/api/v2/package/System.Text.Encoding.CodePages/4.0.0 -O nugets/system.text.encoding.codepages.4.0.0.nupkg
 
-#System.Reflection.DispatchProxy
-wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.3.0 -O nugets/system.reflection.dispatchproxy.4.3.0.nupkg
-wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.0.1 -O nugets/system.reflection.dispatchproxy.4.0.1.nupkg
-wget https://www.nuget.org/api/v2/package/System.Reflection.DispatchProxy/4.0.0 -O nugets/system.reflection.dispatchproxy.4.0.0.nupkg
-
 #System.Threading.Overlapped
 wget https://www.nuget.org/api/v2/package/System.Threading.Overlapped/4.3.0 -O nugets/system.threading.overlapped.4.3.0.nupkg
 wget https://www.nuget.org/api/v2/package/System.Threading.Overlapped/4.0.1 -O nugets/system.threading.overlapped.4.0.1.nupkg
 wget https://www.nuget.org/api/v2/package/System.Threading.Overlapped/4.0.0 -O nugets/system.threading.overlapped.4.0.0.nupkg
 
-#System.Security.Cryptography.OpenSsl when .net 4.6.2 + 1 is out
-
 touch .download_stamp_file
index 517cdbd0de4b786cb714fbd70a3de33f3d9eb366..81c438f810af4e969dfb95dccf4da9fc120f8f9f 100644 (file)
@@ -126,7 +126,7 @@ namespace CppSharp
                 });*/
 
             foreach (var target in AndroidTargets)
-                target.Defines.AddRange (new string[] { "PLATFORM_ANDROID",
+                target.Defines.AddRange (new string[] { "HOST_ANDROID",
                     "TARGET_ANDROID", "MONO_CROSS_COMPILE", "USE_MONO_CTX"
                 });
         }
@@ -148,7 +148,7 @@ namespace CppSharp
             });
 
             foreach (var target in iOSTargets) {
-                target.Defines.AddRange (new string[] { "PLATFORM_DARWIN",
+                target.Defines.AddRange (new string[] { "HOST_DARWIN",
                     "TARGET_IOS", "TARGET_MACH", "MONO_CROSS_COMPILE", "USE_MONO_CTX",
                     "_XOPEN_SOURCE"
                 });
@@ -162,7 +162,7 @@ namespace CppSharp
             });
 
             foreach (var target in DarwinTargets) {
-                target.Defines.AddRange (new string[] { "PLATFORM_DARWIN",
+                target.Defines.AddRange (new string[] { "HOST_DARWIN",
                     "TARGET_IOS", "TARGET_MACH", "MONO_CROSS_COMPILE", "USE_MONO_CTX",
                     "_XOPEN_SOURCE"
                 });
index 4fb8260abdb5eabf4910592d391487d1e3310721..7a2776c851421bcac377310c5bf2ac9627e7335c 100644 (file)
@@ -25,6 +25,6 @@ pedump_LDADD =                        \
        $(GLIB_LIBS)                    \
        $(LIBICONV)
 
-if PLATFORM_DARWIN
+if HOST_DARWIN
 pedump_LDFLAGS=-framework CoreFoundation -framework Foundation
 endif
index 97d9f4c433a1a6462c6e92f3b25e7bd83098f713..00edfeec2f7bd4b97fcf92d01db189f9e93b607e 100644 (file)
@@ -55,7 +55,7 @@
 #define DISABLE_PORTABILITY 1
 
 /* Windows does not have symlinks */
-#define PLATFORM_NO_SYMLINKS 1
+#define HOST_NO_SYMLINKS 1
 
 /* String of disabled features */
 #define DISABLED_FEATURES "none"