Merge pull request #3057 from BrzVlad/fix-major-log3
authorVlad Brezae <brezaevlad@gmail.com>
Mon, 30 May 2016 16:04:28 +0000 (19:04 +0300)
committerVlad Brezae <brezaevlad@gmail.com>
Mon, 30 May 2016 16:04:28 +0000 (19:04 +0300)
[sgen] Refactor collection logging

496 files changed:
Makefile.am
README.md
build-libs.bat [new file with mode: 0644]
build-libs.sh [new file with mode: 0755]
configure.ac
eglib/configure.ac
eglib/src/eglib-config.h.in
eglib/src/eglib-config.hw
eglib/src/glib.h
eglib/src/gunicode.c
libgc/win32_threads.c
mcs/class/Accessibility/Accessibility-net_4_x.csproj
mcs/class/Commons.Xml.Relaxng/Commons.Xml.Relaxng-net_4_x.csproj
mcs/class/Cscompmgd/Cscompmgd-net_4_x.csproj
mcs/class/CustomMarshalers/CustomMarshalers-net_4_x.csproj
mcs/class/Facades/Microsoft.Win32.Primitives/Facades_Microsoft.Win32.Primitives-net_4_x.csproj
mcs/class/Facades/Microsoft.Win32.Registry.AccessControl/Facades_Microsoft.Win32.Registry.AccessControl-net_4_x.csproj
mcs/class/Facades/Microsoft.Win32.Registry/Facades_Microsoft.Win32.Registry-net_4_x.csproj
mcs/class/Facades/System.AppContext/Facades_System.AppContext-net_4_x.csproj
mcs/class/Facades/System.Collections.Concurrent/Facades_System.Collections.Concurrent-net_4_x.csproj
mcs/class/Facades/System.Collections.NonGeneric/Facades_System.Collections.NonGeneric-net_4_x.csproj
mcs/class/Facades/System.Collections.Specialized/Facades_System.Collections.Specialized-net_4_x.csproj
mcs/class/Facades/System.Collections/Facades_System.Collections-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.Annotations/Facades_System.ComponentModel.Annotations-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.EventBasedAsync/Facades_System.ComponentModel.EventBasedAsync-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.Primitives/Facades_System.ComponentModel.Primitives-net_4_x.csproj
mcs/class/Facades/System.ComponentModel.TypeConverter/Facades_System.ComponentModel.TypeConverter-net_4_x.csproj
mcs/class/Facades/System.ComponentModel/Facades_System.ComponentModel-net_4_x.csproj
mcs/class/Facades/System.Console/Facades_System.Console-net_4_x.csproj
mcs/class/Facades/System.Data.Common/Facades_System.Data.Common-net_4_x.csproj
mcs/class/Facades/System.Data.SqlClient/Facades_System.Data.SqlClient-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Contracts/Facades_System.Diagnostics.Contracts-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Debug/Facades_System.Diagnostics.Debug-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.FileVersionInfo/Facades_System.Diagnostics.FileVersionInfo-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.PerformanceCounter/Facades_System.Diagnostics.PerformanceCounter-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Process/Facades_System.Diagnostics.Process-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.StackTrace/Facades_System.Diagnostics.StackTrace-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.TextWriterTraceListener/Facades_System.Diagnostics.TextWriterTraceListener-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Tools/Facades_System.Diagnostics.Tools-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.TraceEvent/Facades_System.Diagnostics.TraceEvent-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.TraceSource/Facades_System.Diagnostics.TraceSource-net_4_x.csproj
mcs/class/Facades/System.Diagnostics.Tracing/Facades_System.Diagnostics.Tracing-net_4_x.csproj
mcs/class/Facades/System.Dynamic.Runtime/Facades_System.Dynamic.Runtime-net_4_x.csproj
mcs/class/Facades/System.Globalization.Calendars/Facades_System.Globalization.Calendars-net_4_x.csproj
mcs/class/Facades/System.Globalization.Extensions/Facades_System.Globalization.Extensions-net_4_x.csproj
mcs/class/Facades/System.Globalization/Facades_System.Globalization-net_4_x.csproj
mcs/class/Facades/System.IO.Compression.ZipFile/Facades_System.IO.Compression.ZipFile-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.AccessControl/Facades_System.IO.FileSystem.AccessControl-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.DriveInfo/Facades_System.IO.FileSystem.DriveInfo-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.Primitives/Facades_System.IO.FileSystem.Primitives-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem.Watcher/Facades_System.IO.FileSystem.Watcher-net_4_x.csproj
mcs/class/Facades/System.IO.FileSystem/Facades_System.IO.FileSystem-net_4_x.csproj
mcs/class/Facades/System.IO.IsolatedStorage/Facades_System.IO.IsolatedStorage-net_4_x.csproj
mcs/class/Facades/System.IO.MemoryMappedFiles/Facades_System.IO.MemoryMappedFiles-net_4_x.csproj
mcs/class/Facades/System.IO.Pipes/Facades_System.IO.Pipes-net_4_x.csproj
mcs/class/Facades/System.IO.UnmanagedMemoryStream/Facades_System.IO.UnmanagedMemoryStream-net_4_x.csproj
mcs/class/Facades/System.IO/Facades_System.IO-net_4_x.csproj
mcs/class/Facades/System.Linq.Expressions/Facades_System.Linq.Expressions-net_4_x.csproj
mcs/class/Facades/System.Linq.Parallel/Facades_System.Linq.Parallel-net_4_x.csproj
mcs/class/Facades/System.Linq.Queryable/Facades_System.Linq.Queryable-net_4_x.csproj
mcs/class/Facades/System.Linq/Facades_System.Linq-net_4_x.csproj
mcs/class/Facades/System.Net.AuthenticationManager/Facades_System.Net.AuthenticationManager-net_4_x.csproj
mcs/class/Facades/System.Net.Cache/Facades_System.Net.Cache-net_4_x.csproj
mcs/class/Facades/System.Net.Http.WebRequestHandler/Facades_System.Net.Http.WebRequestHandler-net_4_x.csproj
mcs/class/Facades/System.Net.HttpListener/Facades_System.Net.HttpListener-net_4_x.csproj
mcs/class/Facades/System.Net.Mail/Facades_System.Net.Mail-net_4_x.csproj
mcs/class/Facades/System.Net.NameResolution/Facades_System.Net.NameResolution-net_4_x.csproj
mcs/class/Facades/System.Net.NetworkInformation/Facades_System.Net.NetworkInformation-net_4_x.csproj
mcs/class/Facades/System.Net.Primitives/Facades_System.Net.Primitives-net_4_x.csproj
mcs/class/Facades/System.Net.Requests/Facades_System.Net.Requests-net_4_x.csproj
mcs/class/Facades/System.Net.Security/Facades_System.Net.Security-net_4_x.csproj
mcs/class/Facades/System.Net.ServicePoint/Facades_System.Net.ServicePoint-net_4_x.csproj
mcs/class/Facades/System.Net.Sockets/Facades_System.Net.Sockets-net_4_x.csproj
mcs/class/Facades/System.Net.Utilities/Facades_System.Net.Utilities-net_4_x.csproj
mcs/class/Facades/System.Net.WebHeaderCollection/Facades_System.Net.WebHeaderCollection-net_4_x.csproj
mcs/class/Facades/System.Net.WebSockets.Client/Facades_System.Net.WebSockets.Client-net_4_x.csproj
mcs/class/Facades/System.Net.WebSockets/Facades_System.Net.WebSockets-net_4_x.csproj
mcs/class/Facades/System.ObjectModel/Facades_System.ObjectModel-net_4_x.csproj
mcs/class/Facades/System.Private.CoreLib.InteropServices/Facades_System.Private.CoreLib.InteropServices-net_4_x.csproj
mcs/class/Facades/System.Private.CoreLib.Threading/Facades_System.Private.CoreLib.Threading-net_4_x.csproj
mcs/class/Facades/System.Reflection.Emit.ILGeneration/Facades_System.Reflection.Emit.ILGeneration-net_4_x.csproj
mcs/class/Facades/System.Reflection.Emit.Lightweight/Facades_System.Reflection.Emit.Lightweight-net_4_x.csproj
mcs/class/Facades/System.Reflection.Emit/Facades_System.Reflection.Emit-net_4_x.csproj
mcs/class/Facades/System.Reflection.Extensions/Facades_System.Reflection.Extensions-net_4_x.csproj
mcs/class/Facades/System.Reflection.Primitives/Facades_System.Reflection.Primitives-net_4_x.csproj
mcs/class/Facades/System.Reflection.TypeExtensions/Facades_System.Reflection.TypeExtensions-net_4_x.csproj
mcs/class/Facades/System.Reflection/Facades_System.Reflection-net_4_x.csproj
mcs/class/Facades/System.Resources.ReaderWriter/Facades_System.Resources.ReaderWriter-net_4_x.csproj
mcs/class/Facades/System.Resources.ResourceManager/Facades_System.Resources.ResourceManager-net_4_x.csproj
mcs/class/Facades/System.Runtime.CompilerServices.VisualC/Facades_System.Runtime.CompilerServices.VisualC-net_4_x.csproj
mcs/class/Facades/System.Runtime.Extensions/Facades_System.Runtime.Extensions-net_4_x.csproj
mcs/class/Facades/System.Runtime.Handles/Facades_System.Runtime.Handles-net_4_x.csproj
mcs/class/Facades/System.Runtime.InteropServices.WindowsRuntime/Facades_System.Runtime.InteropServices.WindowsRuntime-net_4_x.csproj
mcs/class/Facades/System.Runtime.InteropServices/Facades_System.Runtime.InteropServices-net_4_x.csproj
mcs/class/Facades/System.Runtime.Numerics/Facades_System.Runtime.Numerics-net_4_x.csproj
mcs/class/Facades/System.Runtime.Serialization.Json/Facades_System.Runtime.Serialization.Json-net_4_x.csproj
mcs/class/Facades/System.Runtime.Serialization.Primitives/Facades_System.Runtime.Serialization.Primitives-net_4_x.csproj
mcs/class/Facades/System.Runtime.Serialization.Xml/Facades_System.Runtime.Serialization.Xml-net_4_x.csproj
mcs/class/Facades/System.Runtime/Facades_System.Runtime-net_4_x.csproj
mcs/class/Facades/System.Security.AccessControl/Facades_System.Security.AccessControl-net_4_x.csproj
mcs/class/Facades/System.Security.Claims/Facades_System.Security.Claims-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.DeriveBytes/Facades_System.Security.Cryptography.DeriveBytes-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encoding/Facades_System.Security.Cryptography.Encoding-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption.Aes/Facades_System.Security.Cryptography.Encryption.Aes-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption.ECDiffieHellman/Facades_System.Security.Cryptography.Encryption.ECDiffieHellman-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption.ECDsa/Facades_System.Security.Cryptography.Encryption.ECDsa-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Encryption/Facades_System.Security.Cryptography.Encryption-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Hashing.Algorithms/Facades_System.Security.Cryptography.Hashing.Algorithms-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.Hashing/Facades_System.Security.Cryptography.Hashing-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.ProtectedData/Facades_System.Security.Cryptography.ProtectedData-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.RSA/Facades_System.Security.Cryptography.RSA-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.RandomNumberGenerator/Facades_System.Security.Cryptography.RandomNumberGenerator-net_4_x.csproj
mcs/class/Facades/System.Security.Cryptography.X509Certificates/Facades_System.Security.Cryptography.X509Certificates-net_4_x.csproj
mcs/class/Facades/System.Security.Principal.Windows/Facades_System.Security.Principal.Windows-net_4_x.csproj
mcs/class/Facades/System.Security.Principal/Facades_System.Security.Principal-net_4_x.csproj
mcs/class/Facades/System.Security.SecureString/Facades_System.Security.SecureString-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Duplex/Facades_System.ServiceModel.Duplex-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Http/Facades_System.ServiceModel.Http-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.NetTcp/Facades_System.ServiceModel.NetTcp-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Primitives/Facades_System.ServiceModel.Primitives-net_4_x.csproj
mcs/class/Facades/System.ServiceModel.Security/Facades_System.ServiceModel.Security-net_4_x.csproj
mcs/class/Facades/System.ServiceProcess.ServiceController/Facades_System.ServiceProcess.ServiceController-net_4_x.csproj
mcs/class/Facades/System.Text.Encoding.Extensions/Facades_System.Text.Encoding.Extensions-net_4_x.csproj
mcs/class/Facades/System.Text.Encoding/Facades_System.Text.Encoding-net_4_x.csproj
mcs/class/Facades/System.Text.RegularExpressions/Facades_System.Text.RegularExpressions-net_4_x.csproj
mcs/class/Facades/System.Threading.AccessControl/Facades_System.Threading.AccessControl-net_4_x.csproj
mcs/class/Facades/System.Threading.Overlapped/Facades_System.Threading.Overlapped-net_4_x.csproj
mcs/class/Facades/System.Threading.Tasks.Parallel/Facades_System.Threading.Tasks.Parallel-net_4_x.csproj
mcs/class/Facades/System.Threading.Tasks/Facades_System.Threading.Tasks-net_4_x.csproj
mcs/class/Facades/System.Threading.Thread/Facades_System.Threading.Thread-net_4_x.csproj
mcs/class/Facades/System.Threading.ThreadPool/Facades_System.Threading.ThreadPool-net_4_x.csproj
mcs/class/Facades/System.Threading.Timer/Facades_System.Threading.Timer-net_4_x.csproj
mcs/class/Facades/System.Threading/Facades_System.Threading-net_4_x.csproj
mcs/class/Facades/System.Xml.ReaderWriter/Facades_System.Xml.ReaderWriter-net_4_x.csproj
mcs/class/Facades/System.Xml.XDocument/Facades_System.Xml.XDocument-net_4_x.csproj
mcs/class/Facades/System.Xml.XPath.XDocument/Facades_System.Xml.XPath.XDocument-net_4_x.csproj
mcs/class/Facades/System.Xml.XPath/Facades_System.Xml.XPath-net_4_x.csproj
mcs/class/Facades/System.Xml.XmlDocument/Facades_System.Xml.XmlDocument-net_4_x.csproj
mcs/class/Facades/System.Xml.XmlSerializer/Facades_System.Xml.XmlSerializer-net_4_x.csproj
mcs/class/Facades/System.Xml.Xsl.Primitives/Facades_System.Xml.Xsl.Primitives-net_4_x.csproj
mcs/class/I18N/CJK/I18N.CJK-net_4_x.csproj
mcs/class/I18N/Common/I18N-net_4_x.csproj
mcs/class/I18N/MidEast/I18N.MidEast-net_4_x.csproj
mcs/class/I18N/Other/I18N.Other-net_4_x.csproj
mcs/class/I18N/Rare/I18N.Rare-net_4_x.csproj
mcs/class/I18N/West/I18N.West-net_4_x.csproj
mcs/class/IBM.Data.DB2/IBM.Data.DB2-net_4_x.csproj
mcs/class/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib-net_4_x.csproj
mcs/class/Microsoft.Build.Engine/Microsoft.Build.BuildEngine/Project.cs
mcs/class/Microsoft.Build.Engine/Microsoft.Build.Engine-net_4_x.csproj
mcs/class/Microsoft.Build.Framework/Microsoft.Build.Framework-net_4_x.csproj
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks-net_4_x.csproj
mcs/class/Microsoft.Build.Tasks/Microsoft.Build.Tasks/ResolveAssemblyReference.cs
mcs/class/Microsoft.Build.Utilities/Microsoft.Build.Utilities-net_4_x.csproj
mcs/class/Microsoft.Build/Microsoft.Build-net_4_x.csproj
mcs/class/Microsoft.CSharp/Microsoft.CSharp-net_4_x.csproj
mcs/class/Microsoft.VisualC/Microsoft.VisualC-net_4_x.csproj
mcs/class/Microsoft.Web.Infrastructure/Microsoft.Web.Infrastructure-net_4_x.csproj
mcs/class/Mono.C5/Mono.C5-net_4_x.csproj
mcs/class/Mono.CSharp/Mono.CSharp-net_4_x.csproj
mcs/class/Mono.Cairo/Mono.Cairo-net_4_x.csproj
mcs/class/Mono.Cecil.Mdb/Mono.Cecil.Mdb-net_4_x.csproj
mcs/class/Mono.Cecil/Mono.Cecil-net_4_x.csproj
mcs/class/Mono.CodeContracts/Mono.CodeContracts-net_4_x.csproj
mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_x.csproj
mcs/class/Mono.Data.Sqlite/Mono.Data.Sqlite-net_4_x.csproj
mcs/class/Mono.Data.Tds/Mono.Data.Tds-net_4_x.csproj
mcs/class/Mono.Debugger.Soft/Mono.Debugger.Soft-net_4_x.csproj
mcs/class/Mono.Debugger.Soft/Test/dtest.cs
mcs/class/Mono.Http/Mono.Http-net_4_x.csproj
mcs/class/Mono.Management/Mono.Management-net_4_x.csproj
mcs/class/Mono.Messaging.RabbitMQ/Mono.Messaging.RabbitMQ-net_4_x.csproj
mcs/class/Mono.Messaging/Mono.Messaging-net_4_x.csproj
mcs/class/Mono.Options/Mono.Options-net_4_x.csproj
mcs/class/Mono.Parallel/Mono.Parallel-net_4_x.csproj
mcs/class/Mono.Posix/Mono.Posix-net_4_x.csproj
mcs/class/Mono.Security.Providers.DotNet/Mono.Security.Providers.DotNet-net_4_x.csproj
mcs/class/Mono.Security.Providers.NewSystemSource/Mono.Security.Providers.NewSystemSource-net_4_x.csproj
mcs/class/Mono.Security.Providers.NewTls/Mono.Security.Providers.NewTls-net_4_x.csproj
mcs/class/Mono.Security.Providers.OldTls/Mono.Security.Providers.OldTls-net_4_x.csproj
mcs/class/Mono.Security.Win32/Mono.Security.Win32-net_4_x.csproj
mcs/class/Mono.Security/Mono.Security-net_4_x.csproj
mcs/class/Mono.Security/Mono.Security.Cryptography/RSAManaged.cs
mcs/class/Mono.Simd/Mono.Simd-net_4_x.csproj
mcs/class/Mono.Tasklets/Mono.Tasklets-net_4_x.csproj
mcs/class/Mono.WebBrowser/Mono.WebBrowser-net_4_x.csproj
mcs/class/Mono.XBuild.Tasks/Mono.XBuild.Tasks-net_4_x.csproj
mcs/class/Novell.Directory.Ldap/Novell.Directory.Ldap-net_4_x.csproj
mcs/class/PEAPI/PEAPI-net_4_x.csproj
mcs/class/RabbitMQ.Client/src/apigen/Apigen.cs
mcs/class/RabbitMQ.Client/src/apigen/RabbitMQ.Client.Apigen-net_4_x.csproj
mcs/class/RabbitMQ.Client/src/client/RabbitMQ.Client-net_4_x.csproj
mcs/class/SMDiagnostics/SMDiagnostics-net_4_x.csproj
mcs/class/System.ComponentModel.Composition.4.5/System.ComponentModel.Composition-net_4_x.csproj
mcs/class/System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations-net_4_x.csproj
mcs/class/System.Configuration.Install/System.Configuration.Install-net_4_x.csproj
mcs/class/System.Configuration/System.Configuration-net_4_x.csproj
mcs/class/System.Core/System.Core-net_4_x.csproj
mcs/class/System.Core/System.Core-plaincore-net_4_x.csproj
mcs/class/System.Data.DataSetExtensions/System.Data.DataSetExtensions-net_4_x.csproj
mcs/class/System.Data.Entity/System.Data.Entity-net_4_x.csproj
mcs/class/System.Data.Linq/System.Data.Linq-net_4_x.csproj
mcs/class/System.Data.OracleClient/System.Data.OracleClient-net_4_x.csproj
mcs/class/System.Data.Services.Client/System.Data.Services.Client-net_4_x.csproj
mcs/class/System.Data.Services/System.Data.Services-net_4_x.csproj
mcs/class/System.Data/System.Data-net_4_x.csproj
mcs/class/System.Deployment/System.Deployment-net_4_x.csproj
mcs/class/System.Design/System.Design-net_4_x.csproj
mcs/class/System.Design/System.Design-plaindesign-net_4_x.csproj
mcs/class/System.DirectoryServices.Protocols/System.DirectoryServices.Protocols-net_4_x.csproj
mcs/class/System.DirectoryServices/System.DirectoryServices-net_4_x.csproj
mcs/class/System.Drawing.Design/System.Drawing.Design-net_4_x.csproj
mcs/class/System.Drawing/System.Drawing-net_4_x.csproj
mcs/class/System.Dynamic/System.Dynamic-net_4_x.csproj
mcs/class/System.EnterpriseServices/System.EnterpriseServices-net_4_x.csproj
mcs/class/System.IO.Compression.FileSystem/System.IO.Compression.FileSystem-net_4_x.csproj
mcs/class/System.IO.Compression.FileSystem/Test/System.IO.Compression.FileSystem/ZipTest.cs
mcs/class/System.IO.Compression.FileSystem/ZipFileExtensions.cs
mcs/class/System.IO.Compression/SharpCompress/Archive/Zip/ZipWritableArchiveEntry.cs
mcs/class/System.IO.Compression/System.IO.Compression-net_4_x.csproj
mcs/class/System.IO.Compression/Test/System.IO.Compression/ZipTest.cs
mcs/class/System.IdentityModel.Selectors/System.IdentityModel.Selectors-net_4_x.csproj
mcs/class/System.IdentityModel/System.IdentityModel-net_4_x.csproj
mcs/class/System.Json.Microsoft/System.Json.Microsoft-net_4_x.csproj
mcs/class/System.Json/System.Json-net_4_x.csproj
mcs/class/System.Management/System.Management-net_4_x.csproj
mcs/class/System.Messaging/System.Messaging-net_4_x.csproj
mcs/class/System.Net.Http.Formatting/System.Net.Http.Formatting-net_4_x.csproj
mcs/class/System.Net.Http.WebRequest/System.Net.Http.WebRequest-net_4_x.csproj
mcs/class/System.Net.Http/CFNetworkHandler.cs
mcs/class/System.Net.Http/System.Net.Http-net_4_x.csproj
mcs/class/System.Net.Http/System.Net.Http/HttpClientHandler.cs
mcs/class/System.Net.Http/Test/System.Net.Http/HttpClientTest.cs
mcs/class/System.Net/System.Net-net_4_x.csproj
mcs/class/System.Numerics.Vectors/System.Numerics.Vectors-net_4_x.csproj
mcs/class/System.Numerics/System.Numerics-net_4_x.csproj
mcs/class/System.Reactive.Core/System.Reactive.Core-net_4_x.csproj
mcs/class/System.Reactive.Debugger/System.Reactive.Debugger-net_4_x.csproj
mcs/class/System.Reactive.Experimental/System.Reactive.Experimental-net_4_x.csproj
mcs/class/System.Reactive.Interfaces/System.Reactive.Interfaces-net_4_x.csproj
mcs/class/System.Reactive.Linq/System.Reactive.Linq-net_4_x.csproj
mcs/class/System.Reactive.Observable.Aliases/System.Reactive.Observable.Aliases-net_4_x.csproj
mcs/class/System.Reactive.PlatformServices/System.Reactive.PlatformServices-net_4_x.csproj
mcs/class/System.Reactive.Providers/System.Reactive.Providers-net_4_x.csproj
mcs/class/System.Reactive.Runtime.Remoting/System.Reactive.Runtime.Remoting-net_4_x.csproj
mcs/class/System.Reactive.Windows.Forms/System.Reactive.Windows.Forms-net_4_x.csproj
mcs/class/System.Reactive.Windows.Threading/System.Reactive.Windows.Threading-net_4_x.csproj
mcs/class/System.Runtime.Caching/System.Runtime.Caching-net_4_x.csproj
mcs/class/System.Runtime.DurableInstancing/System.Runtime.DurableInstancing-net_4_x.csproj
mcs/class/System.Runtime.Remoting/System.Runtime.Remoting-net_4_x.csproj
mcs/class/System.Runtime.Serialization.Formatters.Soap/System.Runtime.Serialization.Formatters.Soap-net_4_x.csproj
mcs/class/System.Runtime.Serialization/System.Runtime.Serialization-net_4_x.csproj
mcs/class/System.Security/System.Security-net_4_x.csproj
mcs/class/System.ServiceModel.Activation/System.ServiceModel.Activation-net_4_x.csproj
mcs/class/System.ServiceModel.Discovery/System.ServiceModel.Discovery-net_4_x.csproj
mcs/class/System.ServiceModel.Internals/System.ServiceModel.Internals-net_4_x.csproj
mcs/class/System.ServiceModel.Routing/System.ServiceModel.Routing-net_4_x.csproj
mcs/class/System.ServiceModel.Web/System.ServiceModel.Web-net_4_x.csproj
mcs/class/System.ServiceModel/System.ServiceModel-net_4_x.csproj
mcs/class/System.ServiceModel/System.ServiceModel-plainservice-net_4_x.csproj
mcs/class/System.ServiceProcess/System.ServiceProcess-net_4_x.csproj
mcs/class/System.Threading.Tasks.Dataflow/System.Threading.Tasks.Dataflow-net_4_x.csproj
mcs/class/System.Transactions/System.Transactions-net_4_x.csproj
mcs/class/System.Transactions/System.Transactions.dll.sources
mcs/class/System.Transactions/System.Transactions/TransactionScope.cs
mcs/class/System.Transactions/System.Transactions/TransactionScopeAsyncFlowOption.cs [new file with mode: 0644]
mcs/class/System.Web.Abstractions/System.Web.Abstractions-net_4_x.csproj
mcs/class/System.Web.ApplicationServices/System.Web.ApplicationServices-net_4_x.csproj
mcs/class/System.Web.DynamicData/System.Web.DynamicData-net_4_x.csproj
mcs/class/System.Web.Extensions.Design/System.Web.Extensions.Design-net_4_x.csproj
mcs/class/System.Web.Extensions/System.Web.Extensions-net_4_x.csproj
mcs/class/System.Web.Http.SelfHost/System.Web.Http.SelfHost-net_4_x.csproj
mcs/class/System.Web.Http.WebHost/System.Web.Http.WebHost-net_4_x.csproj
mcs/class/System.Web.Http/System.Web.Http-net_4_x.csproj
mcs/class/System.Web.Mobile/System.Web.Mobile-net_4_x.csproj
mcs/class/System.Web.Mvc3/System.Web.Mvc3-net_4_x.csproj
mcs/class/System.Web.Razor/System.Web.Razor-net_4_x.csproj
mcs/class/System.Web.RegularExpressions/System.Web.RegularExpressions-net_4_x.csproj
mcs/class/System.Web.Routing/System.Web.Routing-net_4_x.csproj
mcs/class/System.Web.Services/System.Web.Services-net_4_x.csproj
mcs/class/System.Web.WebPages.Deployment/System.Web.WebPages.Deployment-net_4_x.csproj
mcs/class/System.Web.WebPages.Razor/System.Web.WebPages.Razor-net_4_x.csproj
mcs/class/System.Web.WebPages/System.Web.WebPages-net_4_x.csproj
mcs/class/System.Web/System.Web-net_4_x.csproj
mcs/class/System.Web/System.Web-plainweb-net_4_x.csproj
mcs/class/System.Windows.Forms.DataVisualization/System.Windows.Forms.DataVisualization-net_4_x.csproj
mcs/class/System.Windows.Forms/System.Windows.Forms-net_4_x.csproj
mcs/class/System.Windows/System.Windows-net_4_x.csproj
mcs/class/System.Workflow.Activities/System.Workflow.Activities-net_4_x.csproj
mcs/class/System.Workflow.ComponentModel/System.Workflow.ComponentModel-net_4_x.csproj
mcs/class/System.Workflow.Runtime/System.Workflow.Runtime-net_4_x.csproj
mcs/class/System.XML/System.Xml-bare-net_4_x.csproj
mcs/class/System.XML/System.Xml-net_4_x.csproj
mcs/class/System.Xaml/System.Xaml-net_4_x.csproj
mcs/class/System.Xml.Linq/System.Xml.Linq-net_4_x.csproj
mcs/class/System.Xml.Serialization/System.Xml.Serialization-net_4_x.csproj
mcs/class/System/System-bare-net_4_x.csproj
mcs/class/System/System-net_4_x.csproj
mcs/class/System/System-secxml-net_4_x.csproj
mcs/class/SystemWebTestShim/SystemWebTestShim-net_4_x.csproj
mcs/class/WebMatrix.Data/WebMatrix.Data-net_4_x.csproj
mcs/class/WindowsBase/Makefile
mcs/class/WindowsBase/System.IO.Packaging/Package.cs
mcs/class/WindowsBase/System.IO.Packaging/ZipPackage.cs
mcs/class/WindowsBase/Test/System.IO.Packaging/PackageRelationshipTests.cs
mcs/class/WindowsBase/Test/System.IO.Packaging/PackageTest.cs
mcs/class/WindowsBase/WindowsBase-net_4_x.csproj
mcs/class/WindowsBase/ZipSharp/ZipFileInfo.cs
mcs/class/corlib/ReferenceSources/RuntimeType.cs
mcs/class/corlib/System.Reflection/MonoMethod.cs
mcs/class/corlib/System.Runtime.InteropServices/ArrayWithOffset.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/COMException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/CurrencyWrapper.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/DispatchWrapper.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ErrorWrapper.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/HandleRef.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/InvalidComObjectException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/InvalidOleVariantTypeException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/Marshal.cs
mcs/class/corlib/System.Runtime.InteropServices/MarshalDirectiveException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/ObjectCreationDelegate.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/SEHException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/SafeArrayRankMismatchException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/SafeArrayTypeMismatchException.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/SafeHandle.cs
mcs/class/corlib/System.Runtime.InteropServices/UnknownWrapper.cs [deleted file]
mcs/class/corlib/System.Runtime.InteropServices/VariantWrapper.cs [deleted file]
mcs/class/corlib/System.Runtime.Remoting/RemotingServices.cs
mcs/class/corlib/System/Environment.cs
mcs/class/corlib/System/MonoCustomAttrs.cs
mcs/class/corlib/System/MonoType.cs
mcs/class/corlib/System/RuntimeTypeHandle.cs
mcs/class/corlib/Test/System.Threading/ThreadTest.cs
mcs/class/corlib/corlib-net_4_x.csproj
mcs/class/corlib/corlib.dll.sources
mcs/class/monodoc/monodoc-net_4_x.csproj
mcs/class/referencesource/mscorlib/system/rttype.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/arraywithoffset.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/criticalhandle.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/dispatchwrapper.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/errorwrapper.cs
mcs/class/referencesource/mscorlib/system/runtime/interopservices/safehandle.cs
mcs/ilasm/ilasm-net_4_x.csproj
mcs/mcs/mcs-net_4_x.csproj
mcs/nunit24/ClientUtilities/util/nunit.util-net_4_x.csproj
mcs/nunit24/ConsoleRunner/nunit-console-exe/nunit-console-net_4_x.csproj
mcs/nunit24/ConsoleRunner/nunit-console/nunit-console-runner-net_4_x.csproj
mcs/nunit24/NUnitCore/core/nunit.core-net_4_x.csproj
mcs/nunit24/NUnitCore/interfaces/nunit.core.interfaces-net_4_x.csproj
mcs/nunit24/NUnitExtensions/core/nunit.core.extensions-net_4_x.csproj
mcs/nunit24/NUnitExtensions/framework/nunit.framework.extensions-net_4_x.csproj
mcs/nunit24/NUnitFramework/framework/NUnit.Framework-net_4_x.csproj
mcs/nunit24/NUnitMocks/mocks/nunit.mocks-net_4_x.csproj
mcs/tools/al/al-net_4_x.csproj
mcs/tools/browsercaps-updater/browsercaps-updater-net_4_x.csproj
mcs/tools/cccheck/cccheck-net_4_x.csproj
mcs/tools/ccrewrite/ccrewrite-net_4_x.csproj
mcs/tools/cil-stringreplacer/cil-stringreplacer-net_4_x.csproj
mcs/tools/cil-strip/mono-cil-strip-net_4_x.csproj
mcs/tools/commoncryptogenerator/commoncryptogenerator-net_4_x.csproj
mcs/tools/compiler-tester/compiler-tester-net_4_x.csproj
mcs/tools/corcompare/mono-api-info-net_4_x.csproj
mcs/tools/csharp/csharp-net_4_x.csproj
mcs/tools/culevel/culevel-net_4_x.csproj
mcs/tools/disco/disco-net_4_x.csproj
mcs/tools/dtd2rng/dtd2rng-net_4_x.csproj
mcs/tools/dtd2xsd/dtd2xsd-net_4_x.csproj
mcs/tools/gacutil/gacutil-net_4_x.csproj
mcs/tools/genxs/genxs-net_4_x.csproj
mcs/tools/ictool/ictool-net_4_x.csproj
mcs/tools/ikdasm/ikdasm-net_4_x.csproj
mcs/tools/installutil/installutil-net_4_x.csproj
mcs/tools/installvst/installvst-net_4_x.csproj
mcs/tools/lc/lc-net_4_x.csproj
mcs/tools/linker-analyzer/linkeranalyzer-net_4_x.csproj
mcs/tools/linker/monolinker-net_4_x.csproj
mcs/tools/macpack/macpack-net_4_x.csproj
mcs/tools/mconfig/mconfig-net_4_x.csproj
mcs/tools/mdbrebase/mdbrebase-net_4_x.csproj
mcs/tools/mdoc/mdoc-net_4_x.csproj
mcs/tools/mkbundle/mkbundle-net_4_x.csproj
mcs/tools/mod/mod-net_4_x.csproj
mcs/tools/mono-api-html/mono-api-html-net_4_x.csproj
mcs/tools/mono-configuration-crypto/cli/mono-configuration-crypto-net_4_x.csproj
mcs/tools/mono-configuration-crypto/lib/Mono.Configuration.Crypto-net_4_x.csproj
mcs/tools/mono-service/mono-service-net_4_x.csproj
mcs/tools/mono-shlib-cop/mono-shlib-cop-net_4_x.csproj
mcs/tools/mono-symbolicate/mono-symbolicate-net_4_x.csproj
mcs/tools/mono-xmltool/mono-xmltool-net_4_x.csproj
mcs/tools/mono-xsd/xsd-net_4_x.csproj
mcs/tools/monop/monop-net_4_x.csproj
mcs/tools/nunitreport/nunitreport-net_4_x.csproj
mcs/tools/pdb2mdb/pdb2mdb-net_4_x.csproj
mcs/tools/resgen/resgen-net_4_x.csproj
mcs/tools/sgen/sgen-net_4_x.csproj
mcs/tools/soapsuds/soapsuds-net_4_x.csproj
mcs/tools/sqlmetal/sqlmetal-net_4_x.csproj
mcs/tools/sqlsharp/sqlsharp-net_4_x.csproj
mcs/tools/svcutil/svcutil-net_4_x.csproj
mcs/tools/tuner/Mono.Tuner-net_4_x.csproj
mcs/tools/wsdl/wsdl-net_4_x.csproj
mcs/tools/xbuild/data/14.0/Microsoft.Common.targets
mcs/tools/xbuild/data/14.0/Microsoft.Common.tasks
mono/cil/cil-opcodes.xml
mono/cil/opcode.def
mono/metadata/appdomain.c
mono/metadata/assembly.c
mono/metadata/class-internals.h
mono/metadata/cominterop.c
mono/metadata/console-unix.c
mono/metadata/debug-helpers.c
mono/metadata/domain.c
mono/metadata/file-io.c
mono/metadata/file-mmap-posix.c
mono/metadata/filewatcher.c
mono/metadata/gc-internals.h
mono/metadata/gc.c
mono/metadata/icall-def.h
mono/metadata/icall.c
mono/metadata/locales.c
mono/metadata/marshal.c
mono/metadata/monitor.c
mono/metadata/mono-perfcounters.c
mono/metadata/mono-route.c
mono/metadata/object-internals.h
mono/metadata/object.c
mono/metadata/object.h
mono/metadata/process.c
mono/metadata/reflection.c
mono/metadata/remoting.c
mono/metadata/security-core-clr.c
mono/metadata/sgen-mono.c
mono/metadata/socket-io.c
mono/metadata/threadpool-ms-io.c
mono/metadata/threadpool-ms.c
mono/metadata/threadpool-ms.h
mono/metadata/threads-types.h
mono/metadata/threads.c
mono/metadata/threads.h
mono/mini/Makefile.am.in
mono/mini/aot-compiler.c
mono/mini/aot-runtime.c
mono/mini/cfgdump.c
mono/mini/debugger-agent.c
mono/mini/driver.c
mono/mini/ir-emit.h
mono/mini/jit-icalls.c
mono/mini/jit-icalls.h
mono/mini/jit.h
mono/mini/local-propagation.c
mono/mini/method-to-ir.c
mono/mini/mini-amd64-gsharedvt.c
mono/mini/mini-amd64.h
mono/mini/mini-arm.c
mono/mini/mini-codegen.c
mono/mini/mini-exceptions.c
mono/mini/mini-generic-sharing.c
mono/mini/mini-ia64.c
mono/mini/mini-llvm.c
mono/mini/mini-mips.c
mono/mini/mini-ops.h
mono/mini/mini-ppc.c
mono/mini/mini-runtime.c
mono/mini/mini-s390x.c
mono/mini/mini-sparc.c
mono/mini/mini-trampolines.c
mono/mini/mini.c
mono/mini/mini.h
mono/mini/trace.c
mono/mini/tramp-amd64.c
mono/profiler/mono-profiler-iomap.c
mono/sgen/sgen-debug.c
mono/tests/libtest.c
mono/utils/mono-error.c
mono/utils/mono-error.h
mono/utils/mono-io-portability.c
msvc/mono.def
msvc/monosgen.def
msvc/scripts/Commons.Xml.Relaxng.pre [new file with mode: 0644]
msvc/scripts/RabbitMQ.Client.Apigen.post [new file with mode: 0644]
msvc/scripts/genproj.cs
msvc/scripts/prepare.cs
net_4_x.sln
tools/offsets-tool/Makefile

index e2e1dfefa46338710c852617b3d1ae688d31a13a..5afacfa7fcc0ddbba6dd7cd91bf7df6f5f9a475c 100644 (file)
@@ -32,7 +32,8 @@ EXTRA_DIST= \
        mono-uninstalled.pc.in  \
        winconfig.h             \
        code_of_conduct.md      \
-       external
+       external                \
+       mcs/class/referencesource
 
 DISTCHECK_CONFIGURE_FLAGS = EXTERNAL_MCS=false EXTERNAL_RUNTIME=false
 
index 52580fdb4232acb157abd620aa3945e85829747e..2b583e599be14ae9ab3139c7a11d55e7a1ab574a 100644 (file)
--- a/README.md
+++ b/README.md
@@ -19,28 +19,30 @@ The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.or
 
 Officially supported architectures:
 
-| debian-amd64            | debian-i386            | debian-armel            | debian-armhf            | windows-amd64             |
-|-------------------------|------------------------|-------------------------|-------------------------|---------------------------|
-| [![debian-amd64][1]][2] | [![debian-i386][3]][4] | [![debian-armel][5]][6] | [![debian-armhf][7]][8] | [![windows-amd64][9]][10] |
+| ubuntu-1404-amd64            | ubuntu-1404-i386            | debian-8-armel            | debian-8-armhf            | debian-8-arm64              | windows-amd64              |
+|------------------------------|-----------------------------|---------------------------|---------------------------|-----------------------------|----------------------------|
+| [![ubuntu-1404-amd64][1]][2] | [![ubuntu-1404-i386][3]][4] | [![debian-8-armel][5]][6] | [![debian-8-armhf][7]][8] | [![debian-8-arm64][9]][10]  | [![windows-amd64][11]][12] |
 
 Community supported architectures:
 
 | centos-s390x              |
 |---------------------------|
-| [![centos-s390x][11]][12] |
-
-[1]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/badge/icon
-[2]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-amd64/
-[3]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/badge/icon
-[4]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-i386/
-[5]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/badge/icon
-[6]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armel/
-[7]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/badge/icon
-[8]: http://jenkins.mono-project.com/job/test-mono-mainline/label=debian-armhf/
-[9]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
-[10]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
-[11]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
-[12]: https://jenkins.mono-project.com/job/z/label=centos-s390x
+| [![centos-s390x][13]][14] |
+
+[1]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64/badge/icon
+[2]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-amd64
+[3]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/badge/icon
+[4]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=ubuntu-1404-i386/
+[5]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/badge/icon
+[6]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armel/
+[7]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/badge/icon
+[8]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-armhf/
+[9]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/badge/icon
+[10]: https://jenkins.mono-project.com/job/test-mono-mainline-linux/label=debian-8-arm64/
+[11]: https://ci.appveyor.com/api/projects/status/1e61ebdfpbiei58v/branch/master?svg=true
+[12]: https://ci.appveyor.com/project/ajlennon/mono-817/branch/master
+[13]: https://jenkins.mono-project.com/job/z/label=centos-s390x/badge/icon
+[14]: https://jenkins.mono-project.com/job/z/label=centos-s390x
 
 Compilation and Installation
 ============================
diff --git a/build-libs.bat b/build-libs.bat
new file mode 100644 (file)
index 0000000..df0d978
--- /dev/null
@@ -0,0 +1,4 @@
+@echo off
+cd mcs\jay
+vcbuild jay.vcxproj
+msbuild net_4_x.sln
diff --git a/build-libs.sh b/build-libs.sh
new file mode 100755 (executable)
index 0000000..1b33976
--- /dev/null
@@ -0,0 +1,4 @@
+#!/bin/sh
+(cd mcs/jay; make)
+(cd msvc/scripts/; make prepare.exe; mono prepare.exe `pwd`/mcs core)
+msbuild net_4_x.sln
index 59107bef5755e06e5703d90ef0992c1b5ed6011f..cff61275963b3e8a01df250650ea8cd0d47666b5 100644 (file)
@@ -2906,6 +2906,7 @@ case "$host" in
                TARGET=ARM64
                arch_target=arm64
                boehm_supported=false
+               AOT_SUPPORTED="yes"
                ;;
        s390x-*-linux*)
                TARGET=S390X;
index 2197c6f9c96605404f19ee9bc6b0b038f94986fb..7622701ef455e81d8ce977db10503d84da267ba9 100644 (file)
@@ -181,7 +181,7 @@ if test "x$have_iso_varargs" = "xyes"; then
 fi
 AC_SUBST(G_HAVE_ISO_VARARGS)
 
-AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h langinfo.h iconv.h localcharset.h sys/types.h sys/resource.h)
+AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h localcharset.h sys/types.h sys/resource.h)
 AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+="-liconv -lcharset"])])
 AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
 AC_SUBST(HAVE_ALLOCA_H)
@@ -193,10 +193,6 @@ if test $ac_cv_sizeof_void_p = $ac_cv_sizeof_int; then
    GUINT_TO_POINTER="((gpointer) (v))"
    GSIZE="int"
    GSIZE_FORMAT='"u"'
-   G_GUINT64_FORMAT='"llu"'
-   G_GINT64_FORMAT='"lld"'
-   G_GUINT32_FORMAT='"lu"'
-   G_GINT32_FORMAT='"ld"'
 elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
    GPOINTER_TO_INT="((gint)(long) (ptr))"
    GPOINTER_TO_UINT="((guint)(long) (ptr))"
@@ -204,10 +200,6 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long; then
    GUINT_TO_POINTER="((gpointer)(gulong) (v))"
    GSIZE="long"
    GSIZE_FORMAT='"lu"'
-   G_GUINT64_FORMAT='"lu"'
-   G_GINT64_FORMAT='"ld"'
-   G_GUINT32_FORMAT='"u"'
-   G_GINT32_FORMAT='"d"'
 elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
    GPOINTER_TO_INT="((gint)(long long) (ptr))"
    GPOINTER_TO_UINT="((guint)(unsigned long long) (ptr))"
@@ -215,10 +207,6 @@ elif test $ac_cv_sizeof_void_p = $ac_cv_sizeof_long_long; then
    GUINT_TO_POINTER="((gpointer)(unsigned long long) (v))"
    GSIZE="long long"
    GSIZE_FORMAT='"I64u"'
-   G_GUINT64_FORMAT='"I64u"'
-   G_GINT64_FORMAT='"I64i"'
-   G_GUINT32_FORMAT='"I32u"'
-   G_GINT32_FORMAT='"I32i"'
 else
    AC_MSG_ERROR([unsupported pointer size])
 fi
index 8f5a245cfebac07514f809750e28dd8210685183..ae7b6d45337183fb48d52b2593f26b7d0c0de28f 100644 (file)
@@ -27,10 +27,6 @@ typedef unsigned @GSIZE@ gsize;
 typedef signed   @GSIZE@ gssize;
 
 #define G_GSIZE_FORMAT   @GSIZE_FORMAT@
-#define G_GUINT64_FORMAT @G_GUINT64_FORMAT@
-#define G_GINT64_FORMAT @G_GINT64_FORMAT@
-#define G_GUINT32_FORMAT @G_GUINT32_FORMAT@
-#define G_GINT32_FORMAT @G_GINT32_FORMAT@
 
 #if @G_HAVE_ISO_VARARGS@ == 1
 #define G_HAVE_ISO_VARARGS
index 192d39367b60c1a7c2433fb19b5f095c6fcb1881..cc7bd44a8ca25c8938a2d7a28b7335a24c5fda72 100644 (file)
@@ -26,27 +26,14 @@ typedef int pid_t;
 #define G_SEARCHPATH_SEPARATOR_S ";"
 #define G_SEARCHPATH_SEPARATOR   ';'
 #define G_GSIZE_FORMAT   "d"
-#define G_GUINT64_FORMAT "d"
-#define G_GINT64_FORMAT "d"
 #define GPOINTER_TO_INT(ptr)   ((gint)(intptr_t) (ptr))
 #define GPOINTER_TO_UINT(ptr)  ((guint)(intptr_t) (ptr))
 #define GINT_TO_POINTER(v)     ((gpointer)(intptr_t) (v))
 #define GUINT_TO_POINTER(v)    ((gpointer)(intptr_t) (v))
 
-/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-#define INT32_MAX 2147483647
-#define INT32_MIN (~ INT32_MAX)
-#define INT64_MAX 9223372036854775807i64
-#define INT64_MIN (~INT64_MAX)
-#define UINT32_MAX 0xffffffffU
-#define UINT64_MAX 0xffffffffffffffffULL
-#endif
-
 #define STDOUT_FILENO (int)(intptr_t)stdout
 #define STDERR_FILENO (int)(intptr_t)stderr
 
-
 /* FIXME: what should this be ?*/
 #define X_OK 4 /* This is really read */
 #define WNOHANG 1
index f5473bd2a5c0ee172cffe5de50d491768dfaa498..72770b2f44fab3fae7b0a5312b83d802df98524e 100644 (file)
 #pragma include_alias(<eglib-config.h>, <eglib-config.hw>)
 #endif
 
-/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-#else
 #include <stdint.h>
-#endif
 
 #include <eglib-config.h>
 #ifndef EGLIB_NO_REMAP
@@ -63,21 +59,6 @@ typedef const void *   gconstpointer;
 typedef char           gchar;
 typedef unsigned char  guchar;
 
-#if !G_TYPES_DEFINED
-/* VS 2010 and later have stdint.h */
-#if defined(_MSC_VER) && _MSC_VER < 1600
-typedef __int8                 gint8;
-typedef unsigned __int8                guint8;
-typedef __int16                        gint16;
-typedef unsigned __int16       guint16;
-typedef __int32                        gint32;
-typedef unsigned __int32       guint32;
-typedef __int64                        gint64;
-typedef unsigned __int64       guint64;
-typedef float                  gfloat;
-typedef double                 gdouble;
-typedef int                    gboolean;
-#else
 /* Types defined in terms of the stdint.h */
 typedef int8_t         gint8;
 typedef uint8_t        guint8;
@@ -90,8 +71,6 @@ typedef uint64_t       guint64;
 typedef float          gfloat;
 typedef double         gdouble;
 typedef int32_t        gboolean;
-#endif
-#endif
 
 typedef guint16 gunichar2;
 typedef guint32 gunichar;
@@ -135,6 +114,11 @@ typedef guint32 gunichar;
 
 #define G_CONST_RETURN const
 
+#define G_GUINT64_FORMAT PRIu64
+#define G_GINT64_FORMAT PRIi64
+#define G_GUINT32_FORMAT PRIu32
+#define G_GINT32_FORMAT PRIi32
+
 /*
  * Allocation
  */
index e6f4b925b61c0eeb2b063a5c686ca7941fd0d0d5..36d6d4acfb76ad52a1bca0da47bbcd6def49b9cd 100644 (file)
@@ -44,9 +44,6 @@
 #  define CODESET 1
 #  include <windows.h>
 #else
-#    ifdef HAVE_LANGINFO_H
-#       include <langinfo.h>
-#    endif
 #    ifdef HAVE_LOCALCHARSET_H
 #       include <localcharset.h>
 #    endif
@@ -219,9 +216,7 @@ g_get_charset (G_CONST_RETURN char **charset)
                is_utf8 = FALSE;
 #else
                /* These shouldn't be heap allocated */
-#if defined(HAVE_LANGINFO_H)
-               my_charset = nl_langinfo (CODESET);
-#elif defined(HAVE_LOCALCHARSET_H)
+#if defined(HAVE_LOCALCHARSET_H)
                my_charset = locale_charset ();
 #else
                my_charset = "UTF-8";
index 16a6fb6d003a0bdd7091fe7001b114482fdb826a..5533b8f2e252bf750dba873d24aeecf78b79facd 100644 (file)
@@ -184,7 +184,7 @@ static GC_thread GC_new_thread(void) {
 #ifdef __GNUC__
 __inline__
 #endif
-LONG GC_get_max_thread_index()
+static LONG GC_get_max_thread_index()
 {
   LONG my_max = GC_max_thread_index;
 
index fe042b78d9eb9a92e5b6fb482e1d6abea3494b2b..50cdfcf6868455e673ebabebbce2a6bd2463a192 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3b0863d250127098bde4ac814aaa9a8cd7a80ff0..3d8430294067191c48a165e460c4435327689cc3 100644 (file)
   -->\r
   <PropertyGroup>\r
     <PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+$(ProjectDir)\..\..\jay\jay -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
 
     </PreBuildEvent>\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
+$(ProjectDir)\..\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f8a3fc8a6688559fce3b091b0d29aa98a49a1a52..2c40504aa6351c064685cbf3d0d647b459cbb9cd 100644 (file)
@@ -69,9 +69,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 31596a05830c30860ea5600f5e156090626a643a..bf2bc3fb53392e1f95933a009cfc1a73be4c197e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e91787108f233ab4e538da8822295556136fcc58..ef4329f1ed1651b063c7f75433942c7f959ce4a0 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4bda4a30149bb76c6b64b827266f38e88080cfcd..1bca67282f6da67a9c265b87180d2efbb76f547e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e3653b06c7128478fab8265032b39653c183e376..5189fe3c1ad9dd1b256172b9821afac1c19b2e51 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 404133181847b88b617091cf217e398d3dc5b4d2..3980a552ddc2b8aad35c6f6b533ca7f019923a42 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 18f3771df2ab9b37faacfaec45a928e4d4df24d5..eee52ccc352be132c97668daafbb3fbd176c2ea5 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c785979caa62380b263bfa8908774b840a4e54f0..a7e0139702fdfc1c2599e014ec02f09cb20f2c67 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 64804aa22792ae6b9f259a05b30114eecea02bb0..44e2fc91c581000f5af83d4984d4b4d716973e38 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8eb38f8fdaadcf803a771d098e9eb7a7757ed9d2..c3eb239218a40ec2208cdeb378f65f310e98a374 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 88039f2a2c12840cb98b8407cc1a8fad6fa015d1..a0d3c1b52b02f21e168a7871db5f31aaccc61e61 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b05f36a44b901fa254dca51380711ed62493bb8a..cbeca4b58869d333c35ad5c78d317c77197cde0e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 823e2a490064ead1268c0d22b46b0a0b16a58dcc..65e0f7e3271c205df13572d6cb203facb29c5da2 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 12024f41601dc639046b3b5f48076ed9d0ec3190..aea55676326c0896383a095f4852dc473700df10 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 669a788a88697346c915b0218a0ee3c2e3d7243e..a1a92d79df8d9f62075d6b1b450c79195c3e54b7 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 30ac0d6e81e282d5269e5be0f80ffe6a5dbffa5e..c42832bf3a4d159a9ea9693cae7237c78bb1ca87 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 97f02ce9cf51ada183bbb86933a02e93a8b924f9..493303cc15ec906a14e54fd18a2a621dca26c829 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cfdfcff5f893032656474fcaf8f3e3bb7458e8c3..3427bb006e938667d4256e9f89bd02b1f0edb79b 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index eb5c0b6f344dd50adaeeebaa92be80907863d0c9..72f03e89c83d80eb417a326407f379f37fd6dc70 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f8a292eb56154afdd9de59d33688f37d22caa66b..5de4c3cd3b7d68d8a5bb956c5c51402433673693 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f77e81bc7d72ec9f5cf3732cb09615540895a008..e8db26624c340b0cfba90efec96e360f6e42b63f 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3665399efe8d0508a8f94c5787dfa8540341b54a..a9534e3cb63ad497812e6b34676e33c2e75b2f8d 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a238cf76cedd018f551ad67f08baaf22ad9da649..210e44530fa073ab5bed443ad33164754fe40355 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a0c7b944aa5287308c6600cd804b88b97109f964..9d1c6f14752dc35a0aa108f1e177babe420c7c13 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 18df440f1d9257502bd83321b19a5d940e7ea420..fb2f1485d876758afc65cc09e5a0fe04af71134c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 37b0d96a90aee4bcb781151b01780dfbf93628eb..5d1e6d7135dd47eb1965187f8dca67af1d32e018 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 93382ad2369290054cf00b1f64ce1d710bba54af..f31a1fc6a5541755ec858f3e0752eede938708f8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 751871faeaf6516d8848ca53a984b598352e34fc..7003052edfdd6c45faa21a9a8a8f64e3a26510cc 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 45b8e0b23a3f5a56cc3d4f164ce10be97427a428..73d08a19bd1819928c7ae99f008a6d699c23233a 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f31b7e6f6caea3f41c33c11a26993227ac27ec2d..076b4d9bfa0ac93bb6e08f71c0df53ec3147817f 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 049ad18d0badbeafe94e80a42765a84a9daf6aba..d0aa63ef3cf82da9c7fbdbdead442cc5046b8624 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 583f24adc18dadb0d6819c0757c30970d22d7023..662128772641f3cae697a1b0e728c7a50f989730 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bc883eef2dedd6728010ec9759f2694e0b313e6a..d3117287fbca38b224d4bbde00967369ca809b1d 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 7884a6f07d2723aa34147e60c64a1e34e6249d5f..4423a9dc9a4a3e09e7c691b45227bd865b208534 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f982829ca26c24179ed5ffc0e7cebc0eefc2949c..0f9d44c9cd40cfedd6a28e42d52331d02236ab24 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cac30d3107c3b862b16c31ae941e480def4fe009..5edbbbb80347b137bb83e2bfa0bb985e0f6b4778 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 05a309998f8302761923743e0b48d6c831c9ab7b..98c67e82710ef515ea18f601007b1f30b55739b6 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 35ecc8c825adb6afc45c3444bd1bcf3d190e08db..75fe3913f4ea3c52cf87189bce48b0eb0dcbf514 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2115e2a1819c1416746dff7676891a2c65a30c5c..34784bd92b7419b5f5f20fe63b98f17b4c193629 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4b72e6e6743b0e4749f262dfe77aa83c7057853b..866e14f1a16e3734c92652ccfdecc6c8452b1038 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d0436d3cd0c4c2703aaa4889d8be7215d66ff66f..3e44aef460638d8aab34147679adde227599c33f 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index fb4b372f7747b44d313a0dcbfe9b696f72533093..71c4350a6e7c20e1867e6b1c32d3e493203dce84 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index dffbb755dde83d1f291337569479967d4645446b..c65751b53886e1c32a582901ec424f35bcb32a40 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6b2d1701172454bc0e11218eda514eeb35d2a306..da00e74eff75fba850356d516f3af781c8ae6393 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 04d08cfac845a12193c0cca20d60274cd5cbb84d..e7c6951666baa12a800cd06d961ab12adff0494b 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e31923ed30837754ec011cd0d59fc05a625797d2..de83417856b9f6a86c74409a9e3593229836fee9 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a0165835986cf98e5f62c355d581de5076d22165..3aa8b75ec1f4a81648903dd966e7597d03515777 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9eef05ec8115dbe8e45401d1585b1bea7504972f..9c29c3428fd68336d93598fd0569b8380e8e362d 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 678be54e88cae06a953e9c1397320e75c863dc69..b14fcb89dc591150f40b0a66591ab7577805e667 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a4545552c09f725d2d016741079b1369ce898dbf..5ff7c8612a0e4c6dcaa84b6cac0aec52ae9b4db7 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index be6a541ac566d2cd05f9414a082f78ae79d2d352..c49aa56c8a26fbbcf85e38776db1a75037820310 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b817004afcc199d43c6ac1f7f99b701ed57d97b6..9c59776987caa43f66a7f1c1c3aee48e8ef81b1c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1a2d4da6f6d7d38eb455c8a151fa992fe98b307e..f38a0d52aa5f3b3fd1a258a33a0d841b853fdbf9 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6e6c5368560662e5008b3405264228d63214055e..35e6e9a6d32a27560d162550ad17fe3b9fd8f17b 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1ac9b975ecb2a23b2b54d3d2181eb9e299a2985b..042d7ace4fc259801e1e0d1e056b62d2e27945e5 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d5492795622b66da2728047c8aa3370c2ff4f6f0..aa3200543918b9cb6a55550d132bb9d3b2c2f53c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a3dd89f3364977ffdf3531a4beedc9069f1e7186..9d81ac997087f150a62f9d42bccfac4d5b726cfe 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c7c729cadd51781d340d85b4a68e7b09b374a0ea..346a8c821b9f9c189769e64550ad854b165d39d7 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 39c5dea1e109cc8cd1178583ec80ad5491b37c94..db14b8d3b4ab3e27cfb1afbaf89bc9ceda6bb7d8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 5f2ea156ae6e7d2167d6f751b8679d212e5221b1..ca762d98f2d89af49aca3509a01130414874deb1 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index dbe8b443eb452308419fcfe5ae367ed8f0f04eea..1372878cd18e26f69a40c9b714ab02246bad444f 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8e011bfa064683320d77543c37a7fa1454a034ec..3a298830e16696ccb3f84527a9d06e4359c8e1f5 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4dddea9fb941172d600819c0c834f9e3cc4299a6..11199656414794790d3704a3de44e000cb6f5678 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 08290fef52e3f8541cf79b53d781f7ac833200dd..0103faa7236152f7c62878f87d936f7d827eadf0 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 21c1be45a9ada0f684095ce2d6f5442daa99c2c7..e1230f83e0f2c966e13a586da2ea81e0def0128d 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d108c9f5106886434810d8dc3eef99879196aeb4..c81a0356846024fc1b0324bc480b4793e4c8ada1 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 14bc25b185430b99ade250a9dc9281d79184de10..df6c913f466d3dd7d2d68c31a482a8f6a08775b8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 778e101d05aa26581785c14e035279aa91e578ad..3f6502b6e7a2a0b44463be2802fa3f28cba52435 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ff0029b6c886c97f53fbac18e6b32a824d810e5a..28c20187cf4de525314baba44a38b3038b95b352 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 49e318e9f20c0367b9a27b7a50ab2d49a0f39bb0..e407d0fd9c7825ed41de42d80017ed782c091421 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bcd5b04de6d5f550a107b4730b577666af66e539..5a41690bc62c94b1d919e03c4bdd86bd62659cd3 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bcb2fd210e2497874f24dbf23ce56e787d24c17d..9b883b5f9d788d085bd3b52391f97219fa8d1639 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8cee015433cc417e2aacaae8912d1f3ab7d8c7ca..2030414734b675bdfeb4fbb1663f37b26627f3c8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c6be45f39bd325a894e9c0231056fb050c6354e7..98be695bc274eb11047cf63ab7f9861d1b9b23d7 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0e39fb11b5cdc80338eb8aa4968aa1d88d6fd974..eaafdd2b4b60df04720d5c3cc0219f3a3f57d62e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ee028cc459990165a4e9feeaa6cfc62911b62026..e40ceea68096b110e6bb3d8161e0332df38c6979 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2c09193847d5a70660cf4cf51d38c3d5a82882d0..f3b9b2dadbd3ad659e09c6be1c2d81b126e38473 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8a2d565c855197cc3d0115d56c24a0a481c35f25..f00748c40fa8d979c416ac6c6e50035daaa7aa4e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2c8d4f179e73da8b351087a1a38d64b631aa7e46..d29f79f2d6c8e204bf6c5573ec3f0ad87e7056aa 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 614fefbdfc8ed2d8e6af6aeb423cf382f3bceda1..0dddc7ef0a7454024c3cbf7b414273c5251f14cc 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e706e5d1bd013192c6101505a7a48faa098c0efe..7011c5559d7f022611bd5624ed2e031b8bde1fa9 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4ecd5a17f67e6927b02f7be055f141858a6566d5..a82e8d24fb4044a30ef7abf9fd234442fef0677c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 73660f68e932fcadc88110458a0517efd7fd6829..18a14af836bc321c47cad65d8369c6108487e2a9 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3f64cd1ae6db7d891072dfcf36d78172e8b7d14b..71204dcabbd6d8c4fedbfefd37151f115e604e24 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e6dd355cac1175f4480adc545ac5b25ac2df6ddd..058a3e642197a0027dbc590b7f7898153ed7bc0c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 87bf277b76f735b5f55b4d4cb4d631bb30b0e96f..d88f7bba8c654ad01ac494b7162266ef99e0b6b1 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b5970422fae59a12f3d1377da1c7d683d982b959..546f03f9c7cae8fb50b05f134b3d4842b75d270a 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d8c0b4bd733d400a7f09bc4be1ef3ae8d73150bf..341cad800eeca907e8e10c79816f45aa604b1aa0 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 5f495500681d7543d781fdb4c8434e34c2da8843..3c274abb796468105212f8566dee5b779a2f9265 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 56d78a94f266fa553636ff59627d5344c27e4c57..20640b091c8888c9489aa5ad2cf58a93ff690333 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 36753e6f836ee2c20828d0f660c0240bc88ecb51..a523ca9926323bed1c24e3effba3d27267e8b100 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e4995f585bb7e869bd136036e88c182f7c1d71d0..268dc0f5926ea92f5d2e498cf743b6f5c5f15a00 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1ac4f8c2021c73457ccd3be663ff948948e537e9..1608821c77b2d9b41022fc531da38740b488857f 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e705ce1cd58ce9bf7531f3a5280aa2492f9383ce..c331d66a40ad313a1e43c98144bd36f3646541be 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index da43a4677337866375e0e249f0f1ec6e601eb435..098c162409a25d264746403cf24419c03911e7d7 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 68d195c4c142fa4bd4f16e1aecdaf070ff63ab53..9865a1540f82d5bc5d30bbc1f357e09a704d6e67 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4b2091d8f9a643ef4b23e4319c65f514fed404ce..53e18fa4825430406654467d66ebad8c7e6b10c5 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 66f866878b46fe9760c5ea9c9f196b8065bbed94..1f6584376e92e39c2beeef060ba893551b9d8a57 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 59a03ac1b7845aa67fb45f2eae4332ae91587e65..3b0e5112389c7a70d1472def7c0607361b91e6f2 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 852ecb327428ec654a55f4c6612cd6b3f05689b3..0a126a61c73191792605cae1074dc858ae86c585 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bf79d8e04eeda6d5bf53598486ae2fc3e01099a1..18aa2ae6185a6f3555e3adb5d3cbe0dce8787f23 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c25ad143f7932e0dfef89a3882011f4916486230..53c26f634d146ebf9a68534fe703b1392394c8f0 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 795d52ea63d85f7757c4f73aee575b336d733296..7e2fc1e0a8656368b91f77aa3c19870a3f1e256d 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8a9b0025d4754462efdddfb3937ae5b5a812fa8d..3a098dcdfc2955aef7c0233e4f6cb3677e850e3a 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e309a12b5465522ad88e6028fd4a5b18a38c0d2b..d830d0e08438a3f08c2fcf4a49b25eab9970c16e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 60c9fb3af477e3c3838299a69c17506220d28721..0b25b6be19eae86a64166ae03e541be4605577e3 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 424fd80ff89ae45de111e75ccad0e1b2969c307d..1508ff5d41a0377da44a29f08a847320b0e0020a 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b69440c764bdfa4a332f3bed45c966e84a3d9b83..05cafee86eb8ba471b1c6bdae82d8aeb0ab39ddf 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 89ba9387077c64812469d166e4b1ddd47b429176..4eedc26e62d9278328420893a73a086f1eb276c8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 85e39ae33185082f9a2f2bb0261cac5e9735b06d..c478e7918cc0bd00a5c685aa9c30498d09920245 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8d4e04ba544388878d5b68266c6fe2f81af9b722..5c8474d8caad113ca876be256d22aec472740b39 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4da5a0a148095b5fded8b7e2a4576f6dda0b6263..3128965240d2d2d6bd1f35d26360020cc2070ba0 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b37b915f6cef382b3e0566c30452a88bf19e36c2..2a7daad7c162cfa1c8b571bfc765b8df962fe590 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index df89b024ef41b5911b8a4b71334c34ba5b4d99ac..00de778e120b2fa500fd917abe1d97fd470f7d31 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 64dbf1302bc2c6ddfaa531e3094f3f17b489fc94..70915d9a5db74507e4e1ad50ba48451568b9604c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 52ce89592a8edfabc215b069445a72483d13fd35..3052af6fdcda1c56f16b62edf9910f37515451f8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 60c01acc019d3670ad7366912b79a69bfe56106a..58a1e3e48a417a439a086bcf394eca62ab7543d5 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9cf45b4906f5e56b943a7c0eb52632a0e3223b66..081c415cfe00443197dcaa8ff6ec74964e36e379 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d6f877ad1aec9852436d19e690c63a651a0f4655..a0450e1ff2dfaa1fc408b1fcea24bdd6d8407002 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d04b3246aa46b11cd4bd1e63b1bab3bfd9f705a6..0b49733d39b11782b4f2fd48e757bd1605962f4c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 70535c2db71ae8cf873b7bac3d9fab55ed96e006..b607038b511e0fe542bebe205afaaa179cee4e49 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index acb4e8bd98a24b71a9c60502a6a65ce75825ab59..6dfebc018ae02420221c9c095442e0c1c33a5d99 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cf1d0001be051deffb58524adcc2c3a4ba39a6f6..6fe69f7e13d2aeae84d4380ff3b5524f378cf38b 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0ab008df580b8c38936c08f0a6077916ced20090..fcddfd588d8195554f4d748308c03f20950e2cf1 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 06e6af0ab879c03d6e2919e868162785f84ea890..adc60f7e829ec651563d4bf04398919481e86a1c 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1e85fdac4de660571cd0632bb44a80060baf16e7..c4df512148f9c4e53aacb716b68e6919ea28aea0 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 7fcab78e23e664c8bda09ae9788ce36ab8cdea05..3e95b77fbd1dcc6768e8932cd82530805f5aa20b 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ca42405d866c31f8841b90b45df705dd9b2e1c88..c6c9d3a44bbdbdd5d6c99d427b5324e5189a971c 100644 (file)
@@ -76,9 +76,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 20cbed96fe641ea44cf29e5b2f2484d891ac1e4a..75ff7a5aac9dd7024ece9f556a05afada47ca3d9 100644 (file)
@@ -72,9 +72,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8c24b1422ff2ceea9c93c54c8ff7285f4be1e543..1afa51aef32e08d5690f8dc840d75402083ec000 100644 (file)
@@ -71,9 +71,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 67f92d8072bb3bc4126276b2471bdb08dc9ce1ec..824b31774d50af80a8d219eab82d3afd32429f82 100644 (file)
@@ -73,9 +73,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9ddf914a9903a56ca94d9fe86d7d96a525090587..abde280e27d6cde0c6e9ad52bd88b3bd5f04aca2 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f167be2df6b77311f4e409cf8cf435bfae5423f6..95900687116613c4d2697c497dc7e03c1e6fa99c 100644 (file)
@@ -79,9 +79,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a79376597b3b466022ef85cda01cd4dcc784c7b4..1479ae7ddb88a683c3f18a83ee9faca50f18f7a9 100644 (file)
@@ -87,9 +87,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cbe4eb3538f1c4c31a90a546b04f370f9271cb67..6f7047f15c02021fe96fad22b955d68d35ebe3f8 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 005752baf98e12f541683c8aa9f258b6a7d03354..fb545562ffa288a2925e7e71c876bcf5d72d8a32 100644 (file)
@@ -1035,7 +1035,7 @@ namespace Microsoft.Build.BuildEngine {
                        evaluatedProperties.AddProperty (new BuildProperty ("OS", OS, PropertyType.Environment));
 #if XBUILD_12
                        // see http://msdn.microsoft.com/en-us/library/vstudio/hh162058(v=vs.120).aspx
-                       if (effective_tools_version == "12.0") {
+                       if (effective_tools_version == "12.0" || effective_tools_version == "14.0") {
                                evaluatedProperties.AddProperty (new BuildProperty ("MSBuildToolsPath32", toolsPath, PropertyType.Reserved));
 
                                var frameworkToolsPath = ToolLocationHelper.GetPathToDotNetFramework (TargetDotNetFrameworkVersion.Version451);
index c8d7b22dc39306e77aebce44751a168143633174..652aab45f53431245fbb367815ea1c81734aee21 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9409e5c66c7ea7518d1e63c877083f44b0704570..ad57c7d514e57e4c05ea4c58c2535ef61eb95b60 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cc2253eefd035ba7bcd6f0d476d7d129d789aae8..d051dbefb947465da844bc655be2a7017172f4dd 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f5758df8e1fbc239e6fb15b585ce7776acd987ab..3bdf7111df8b3295f5f37cd50d92238d846128e5 100644 (file)
@@ -128,6 +128,10 @@ namespace Microsoft.Build.Tasks {
                        relatedFiles = tempRelatedFiles.Values.ToArray ();
                        resolvedDependencyFiles = tempResolvedDepFiles.Values.ToArray ();
 
+#if XBUILD_14
+                       DependsOnSystemRuntime = resolvedDependencyFiles.Any (x => Path.GetFileName (x.ItemSpec) == "System.Runtime.dll").ToString ();
+#endif
+
                        tempResolvedFiles.Clear ();
                        tempCopyLocalFiles.Clear ();
                        tempSatelliteFiles.Clear ();
index ff6a2479edac45bfe7a7220eaefa26ec1169165d..1e5e1913b4342c0b271bca55f4a260bff1a4288f 100644 (file)
@@ -84,9 +84,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1d9ee21e1b21b889c42eed3ee52e627b971368fc..5c8625482862a1226106901042b315a3cff8c42d 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c5651873dc2264c984379a5b290b16d735e35be6..4b2bc7d98a77bfc48a27217a80408c71ab94ffbe 100644 (file)
@@ -88,9 +88,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bd1bddb86956c84af66f235f63cb30f7f97b828c..8fe58e637bdc6d3f943942127a89a8afa7c899d0 100644 (file)
@@ -75,9 +75,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3fac18c05e5ff23f26e4a755a1b4ae0cae8e6b9a..e68b8bf4ab61403e253de8e4cd805fcebe1ee00b 100644 (file)
@@ -71,9 +71,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8537f08132a9e46c3edd167540ad3d379753b660..1f86305857f2d743b5a753a20afa9bad286bde69 100644 (file)
@@ -95,9 +95,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f31ba902cb5b9a7e1cdd7aa9b538f4630bbade93..36c99153b4962d85f4f9e3620e29543ed07348e4 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2c77520eeaf45be187da7cfabf433c9f323fd7dd..51868debb9ffd59aa543ab0c2aa416e90a5278ae 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 06ae851bec52c41d1fc0a78af73e86b107a77a5c..c4aee220b49858a4c6b34793604d5c0f575932a9 100644 (file)
@@ -74,9 +74,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index af9b3bf3463e35b950bc9f792cd7b47dae9fa881..f1cbfb1d8fe0ac5002cadaf05368ae0cb073866a 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2401be1b4051a46c81aceb485079709f8dcfeb88..e2169fc9aeb7aadfad157975d8e8201a44ad1ff9 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f12bbdb430464b76447504f330601f54423ddf23..0b59fa3d3c91b2a45090c2f6ec514b969f00d954 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9b5e7d736ab0d0040f4eb5d5c4d6240129125861..2b722aaff49d9c9feaa9a84a9495827c537e3655 100644 (file)
@@ -94,9 +94,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="resources/SR.resources">\r
+    <EmbeddedResource Include="resources/SR.resx">\r
       <LogicalName>SR.resources</LogicalName>\r
     </EmbeddedResource>\r
     <EmbeddedResource Include="resources/SQLiteCommand.bmp">\r
index 441381cf68acfe7c9dc7fa2bed08f415efa95b31..a1b59026c1d47d9fb1fb80625a395623579d1e80 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0f152a10f8b25779942aa9b15012b1e21770e1c6..51d78f17c2fbf656c1dbb7b1a121a458e6ad6bfb 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 086c6f5f9aa92214c1c9e00bf2ee9d8b98968484..cd0b6ae51ba33ef260f685dae6b0930e66c324ee 100644 (file)
@@ -1424,7 +1424,7 @@ public class DebuggerTests
 
                TypeMirror t = o.Type;
 
-               Assert.AreEqual ("MonoType", t.GetTypeObject ().Type.Name);
+               Assert.AreEqual ("RuntimeType", t.GetTypeObject ().Type.Name);
        }
 
        [Test]
index f6b2d8c99554f2e1d499942307670e8d13ef025a..781affa962a70637a5b24e3271886ad1ec55044f 100644 (file)
@@ -75,9 +75,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 89229ea42e82ca7e7ea9ae7e6628c46c2d28e9a0..9aa0a5dffaf85f310ce84f3c8828737d2dc8699a 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 16916e2a3a9795eac98bef2193da4f0f765816de..40771592cda08379045b3013d8644da60516962d 100644 (file)
@@ -73,9 +73,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d4c8d51e6407df80579580794a155bbb62a4023e..8b83f6323907e479ef4c20d46a86603b246a5c8b 100644 (file)
@@ -90,9 +90,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a918de5b62b9c76231ecf4504af976af59f3f923..d8f8685ff498a07648df1afe0ae3ba96eb694e45 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 446ec7b71c39c9b608c9dd0fad9392273f1cb9a6..f5de89dfdd4753428e3242c3e3ddbd21c02f9cf3 100644 (file)
@@ -75,9 +75,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ebdb1e1da80aff782b0afc0dda40e9355f355a30..51e6db7e1d820b7e97deff2aa6f6370cd2ec5978 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e0b6f9c061fb5bebbce65bee5d27866bba84b758..115c3f25a7f79679d268d265a7c4e9bf231da541 100644 (file)
@@ -73,9 +73,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f762d6a064be2cef3482c0738e58ab3ca059794a..771d99fc965243f0dede1b257dcaf3a1f3cecc62 100644 (file)
@@ -98,9 +98,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index add67691adc43b9956969e1659ff722d9f3c8413..158b09579821b0b2ed821f1a9031247f702456af 100644 (file)
@@ -79,9 +79,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 58f7ddb2fefdddc490c3a9191d8eef51f3013116..32ceb3003558fdfd3269122131eef77d414889c4 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 21890259a3a66c82d7a83f3b6187bb3f2e98aa9c..6eb3f05da224a9b1b444b7156f27f34b432d7c08 100644 (file)
@@ -76,9 +76,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 178cbe01eb8affd24eb6ec64d81d4262938374f3..e6e48767bf6173f7e82fe65dc206f5ef05123932 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 7240fa548094b57bcb9c7068fc616ff4423ef8d0..17648d708696c16f28d08ab397cfdd81dbdd7eae 100644 (file)
@@ -93,7 +93,7 @@ namespace Mono.Security.Cryptography {
                        // p and q values should have a length of half the strength in bits
                        int pbitlength = ((KeySize + 1) >> 1);
                        int qbitlength = (KeySize - pbitlength);
-                       const uint uint_e = 17;
+                       const uint uint_e = 65537;
                        e = uint_e; // fixed
        
                        // generate p, prime and (p-1) relatively prime to e
index 5523b3f17fee6abe8b4660d7dc85d07bbf0ff97a..6c2e89d188014cbb752cd53ab70afa79703f3ab0 100644 (file)
@@ -80,9 +80,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0b59432a9339b3dff7703655b30252aaac0bdf25..2549142742184addc6e9678cd7f24e1ca9575fa4 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6314d439a68a7ebad2204c51565007f8ea4bd5e9..7184cb7c2e5fcdb2f8d140c0e8cf06e22714adcb 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 86ca84d096781ac609a1401eb49f715e5a169ef0..88bcc5bf2e1db6c177a74ae2a768f039d4ea15b7 100644 (file)
@@ -69,9 +69,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 096323d61e7327d62a23dc12797b0fa167827c47..fe6669ed6c34fcffe0df07861a45cf5a996ce975 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resources">\r
+    <EmbeddedResource Include="Novell.Directory.Ldap.Utilclass/ResultCodeMessages.resx">\r
       <LogicalName>ResultCodeMessages.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 4fc45700db1a7411dd18f8dc063f824b1a0c599a..dd4b88112dd7d1bac281c6ff8fd7c9c6d6a275e9 100644 (file)
@@ -68,9 +68,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 5539fea58542a651bacf83c80fae6f99cd4f8978..79d7d285b098821fedc2af32b2487ee860625bde 100644 (file)
@@ -197,7 +197,7 @@ namespace RabbitMQ.Client.Apigen {
            m_primitiveTypeFlagMap[amqpType] = isReference;
        }
 
-        public void HandleOption(string opt) {
+        public bool HandleOption(string opt) {
             if (opt.StartsWith("/n:")) {
                 m_framingSubnamespace = opt.Substring(3);
             } else if (opt.StartsWith("/apiName:")) {
@@ -210,9 +210,9 @@ namespace RabbitMQ.Client.Apigen {
             } else if (opt == "/c") {
                 m_emitComments = true;
             } else {
-                Console.Error.WriteLine("Unsupported command-line option: " + opt);
-                Usage();
+               return false;
             }
+           return true;
         }
 
         public void Usage() {
@@ -227,7 +227,8 @@ namespace RabbitMQ.Client.Apigen {
 
         public Apigen(ArrayList args) {
             while (args.Count > 0 && ((string) args[0]).StartsWith("/")) {
-                HandleOption((string) args[0]);
+               if (!HandleOption((string) args[0]))
+                 break;
                 args.RemoveAt(0);
             }
             if ((args.Count < 2)
index e9f3774767e80535635ff4c5f54afef846a3b5b6..774bd89e35cbaf42a517229146f7243dde3e5038 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+mono RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-9.cs
+mono RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-8.cs
+mono RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-qpid-0-8.cs
+
+
+
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
+ RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-9.cs
+ RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-8.cs
+ RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-qpid-0-8.cs
+
+
+
 \r
     </PostBuildEvent>\r
   </PropertyGroup>\r
index 8a2044d1cf6c8be1c273ba8902e2d14d1f486a7c..e062f5481634cc77b9baf72a0bfdbcad31debe1f 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 81528bcc98637b2a35d09368077cc9a228d4d09a..d20c1ba9eb9fa5fa8ce54dd469a5be393197e23c 100644 (file)
@@ -85,9 +85,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8ae3cfccffd8ad7aaf56793aa8528ee6490a716b..7f8014de96be2c404d1e2fb33ce5db5de55df652 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Microsoft.Internal.Strings.resources">\r
+    <EmbeddedResource Include="Microsoft.Internal.Strings.resx">\r
       <LogicalName>Microsoft.Internal.Strings.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 0bcf3ec7b1935598f7c2ca0a1d7fe74d1a778469..69eacf9c62079cd72bb359dc9ff3a731ee6b72c7 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ae8c371bc76dfbec4a98efab622678f5b6c0ed29..d830e4f80397d064a3b6f160b934ee9328036c69 100644 (file)
@@ -80,9 +80,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9fa49adeb72bbe2abb4479c48ee67650a54309d0..61bfe7fa885569ab3c0bfd7be709fa77954791c2 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 26ca3e53d01118438c0e84e1c134f1dff8607029..2f65fc4c3bec1a546f3eb5e5eac62f4bef381221 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 39af607e632a4e81975cc45a60e06ac441efd457..110a22b1b29efd2295f370df532da13da5bba1ee 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index fa35aa1ef77dc77e56ad9eca744d91599937b32c..8d845d576bfdb841b95a8725dad1639f3457a468 100644 (file)
@@ -76,9 +76,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a56b7ce0245bdd4223744abc5528761e662cf2eb..25275651f16facb771430c017c4c282435c06060 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 150ac4787883073da9d8a1e555ee42d458cf8238..02e0b4aba48b76bfea5950cb7ce2047824976016 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 56dfa9b6e40a55c4af6f1fedf9faf50ccef7f1b2..e569ce44aadc5670c18fb99983c1862d418eb8d4 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3d0f0ea86a53a47c4c7d96a1713b86e9287e80ec..86f2abd37b1638c00c0730e3b4a28e6667890b35 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Client/System.Data.Services.Client.resources">\r
+    <EmbeddedResource Include="Client/System.Data.Services.Client.resx">\r
       <LogicalName>System.Data.Services.Client.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 86a92590271d6566b4b0bb7bf5657d5ef76a8621..6a4ef89e6c8bf13b70136105c1fa71096935b7c4 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 89436ad2550d4f57fbc82801b3a39e2a59141387..552ec452530cb80208bf70b344bf1986735968df 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 165e72bf93d14b7bbfbe9ad3bda5b0c6b8a9e357..bd40ae2f3a7c56941ed90529dd97837e421f365b 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 5189367706ab75a4b87bd671ca2fb4877e1a21f3..4750c28d29fd9972de0daaeb2c9f2953b2a77d46 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6ae492ff5efe81d1933348707ecc9bb5afd78e6f..1248aef2a74f2e9efc3b889b2ace8dc482c994fe 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c74b662d42a47381c3432299db9e3933acf358a5..f00cf92ef4e5efd6ec28760c9ff4d9341a24662d 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b990b51a001cd8dece8839dfe1e2639f06c4895c..31cfc603485e3bc1bda074c53dc138df526d7e12 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4b21dcdd6d2a95cb8aa1b996de4b80339ef8b8df..cd5243850061ff0556e89678951c9837a4f8029a 100644 (file)
@@ -78,9 +78,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bc6476a9e8f8e69749a3a4a3ec3ad8e89bf752e8..00f54219c78c3923f771a72924af6a13a7a73d15 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f192dd6472b490a4efd7be15fc419d146006dbb5..788104cabe5d626d6e7c3fdc72a29bf1ca6d531a 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 07ecf54a6eda5591a8c41cf0550f0f7a6b6f1804..d0a7c52ddb6c39b21351b577a2544d7981f80b20 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0db2bc7fd5400b158e74868d81d7b6924e0e8642..63bf1dbfbf12cd0ba5c75e5ad8f71ead09a12a7c 100644 (file)
@@ -67,9 +67,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0354311b478478a834c847ac9c3a44f88cfb2887..4321db8534e30833c490da4c67df46455d1b29cb 100644 (file)
@@ -105,5 +105,31 @@ namespace MonoTests.System.IO.Compression.FileSystem
 
                        Directory.Delete ("extract", true);
                }
+
+               [Test]
+               public void ZipCreateFromEntryChangeTimestamp()
+               {
+                       if (File.Exists ("foo.zip"))
+                               File.Delete ("foo.zip");
+
+                       var file = "foo/foo.txt";
+                       using (var archive = new ZipArchive(File.Open("foo.zip", FileMode.Create),
+                               ZipArchiveMode.Update))
+                       {
+                               archive.CreateEntryFromFile(file, file);
+                       }
+
+                       var date = File.GetLastWriteTimeUtc(file);
+
+                       using (var archive = new ZipArchive (File.Open ("foo.zip", FileMode.Open),
+                               ZipArchiveMode.Read))
+                       {
+                               var entry = archive.GetEntry (file);
+                               Assert.IsNotNull (entry);
+                               Assert.AreEqual(entry.LastWriteTime.Year, date.Year);
+                               Assert.AreEqual(entry.LastWriteTime.Month, date.Month);
+                               Assert.AreEqual(entry.LastWriteTime.Day, date.Day);
+                       }
+               }
        }
 }
index 07a8448171ed51a1723c1d989ee53ddd071de7f2..36c4146b485139d4725bb0918abe8cf65ef919d8 100644 (file)
@@ -56,6 +56,7 @@ namespace System.IO.Compression
                                FileAccess.Read, FileShare.Read))
                        {
                                var zipArchiveEntry = destination.CreateEntry (entryName, compressionLevel);
+                               zipArchiveEntry.LastWriteTime = File.GetLastWriteTimeUtc(sourceFileName);
 
                                using (Stream entryStream = zipArchiveEntry.Open ())
                                        stream.CopyTo (entryStream);
index acb5e2ddc293f37845aa6dd4235dedef3175c7a1..f19a9c27647921fb0c277f4b8f5edfe8e8ffa7fc 100644 (file)
@@ -10,7 +10,6 @@ namespace SharpCompress.Archive.Zip
     {
         private readonly string path;
         private readonly long size;
-        private readonly DateTime? lastModified;
         private readonly bool closeStream;
         private readonly Stream stream;
         private bool isDisposed;
@@ -22,7 +21,7 @@ namespace SharpCompress.Archive.Zip
             this.stream = stream;
             this.path = path;
             this.size = size;
-            this.lastModified = lastModified;
+            this.LastModifiedTime = lastModified;
             this.closeStream = closeStream;
         }
 
@@ -46,11 +45,6 @@ namespace SharpCompress.Archive.Zip
             get { return size; }
         }
 
-        public override DateTime? LastModifiedTime
-        {
-            get { return lastModified; }
-        }
-
         public override DateTime? CreatedTime
         {
             get { return null; }
index 9f520b0fae872af4662d5ea964c2349f6048a5f8..48529c618dd8e62177cf11e211a4375d7d39ca09 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 36903c675b4858391d77cc4354732ce4a12a8501..d461600299ffbbb1ee8e883897fd10787bd22ff9 100644 (file)
@@ -238,6 +238,31 @@ namespace MonoTests.System.IO.Compression
                        File.Delete ("create.zip");
                }
 
+               [Test]
+               public void ZipEnumerateEntriesModifiedTime()
+               {
+                       File.Copy("archive.zip", "test.zip", overwrite: true);
+                       var date = DateTimeOffset.Now;
+                       using (var archive = new ZipArchive(File.Open("test.zip", FileMode.Open),
+                               ZipArchiveMode.Update))
+                       {
+                               var entry = archive.GetEntry("foo.txt");
+                               entry.LastWriteTime = date;
+                       }
+
+                       using (var archive = new ZipArchive(File.Open("test.zip", FileMode.Open),
+                               ZipArchiveMode.Read))
+                       {
+                               var entry = archive.GetEntry("foo.txt");
+                               Assert.AreEqual(entry.LastWriteTime.Year, date.Year);
+                               Assert.AreEqual(entry.LastWriteTime.Month, date.Month);
+                               Assert.AreEqual(entry.LastWriteTime.Day, date.Day);
+
+                       }
+
+                       File.Delete ("test.zip");
+               }               
+
                [Test]
                public void ZipEnumerateEntriesReadMode()
                {
index c74ef71b636234fca997711e86b02b876c02823b..e834a58af15ca7366fb3e520c06c9523fa2a7495 100644 (file)
@@ -77,9 +77,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ca041e4297e048551cc9ba38c3a7e65309710f1b..ea349ebcc43a57fd85ffff74bf19184035f5fb7f 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 08caf0b68652349aeb8d60b0db49784dc7b68f54..3496fd33365732f90db076316a6ea3918008e631 100644 (file)
@@ -88,9 +88,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Json.Properties.Resources.resources">\r
+    <EmbeddedResource Include="System.Json.Properties.Resources.resx">\r
       <LogicalName>System.Json.Properties.Resources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 257f0571dd0ef8a4f872e3e7e3d4ee102dca3262..5a5dadfa168d8e4a3328de5149864d95cd1a2e2e 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8f7650e5572085a9be6e0badbb4a7f692e95d5e0..7d9b5c4017292ec9fffd36c9d7cee45d52d3182e 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8d86d8f27110eacb4ddcf2d4133875e5fe91503f..939068bd6f7a40d3d1d00ee3d31952ba2adbaeeb 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 78ccedb9aa29d1c884734ae8049d5f1e9cabdeaf..519672e1ef01005c87165f0e8027614cb91b9497 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resources">\r
+    <EmbeddedResource Include="System.Net.Http.Properties.CommonWebApiResources.resx">\r
       <LogicalName>System.Net.Http.Properties.CommonWebApiResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Net.Http.Properties.Resources.resources">\r
+    <EmbeddedResource Include="System.Net.Http.Properties.Resources.resx">\r
       <LogicalName>System.Net.Http.Properties.Resources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 43ceea089ce127db745f2ebfa28d50c8c593f971..519b2833cba57777ffc6909578023f34fc0c4af8 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 5723acb0b1cce0f3d80837d87010b6e2f01769a3..2b9a54d7fdc0000eddd99e1658c42c983ed26a63 100644 (file)
@@ -61,7 +61,9 @@ namespace System.Net.Http
                        public void Close ()
                        {
                                CancellationTokenRegistration.Dispose ();
-                               ContentStream.Close ();
+                                if (ContentStream != null) {
+                                    ContentStream.Close ();
+                                }
                        }
                }
 
index 741d32f594c4d61d809fbb72cb86a4d882eeb842..e6e2d68457e26d135f2b8691238a53d4daf7357e 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 37833bc67086e6b96cbf74f99025feb188174496..94ad2ffb2742945f1914a1a127bd8542367a395e 100644 (file)
@@ -245,8 +245,6 @@ namespace System.Net.Http
                                wr.KeepAlive = request.Headers.ConnectionClose != true;
                        }
 
-                       wr.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
-
                        if (allowAutoRedirect) {
                                wr.AllowAutoRedirect = true;
                                wr.MaximumAutomaticRedirections = maxAutomaticRedirections;
@@ -270,8 +268,13 @@ namespace System.Net.Http
 
                        if (useProxy) {
                                wr.Proxy = proxy;
+                       } else {
+                               // Disables default WebRequest.DefaultWebProxy value
+                               wr.Proxy = null;
                        }
 
+                       wr.ServicePoint.Expect100Continue = request.Headers.ExpectContinue == true;
+
                        // Add request headers
                        var headers = wr.Headers;
                        foreach (var header in request.Headers) {
index 4d9265a6ac76f8e3640e82e2e75e1fa6189b8ee6..aa678a036e6d2f8219e3d89a55695dba90dfdffa 100644 (file)
@@ -150,6 +150,29 @@ namespace MonoTests.System.Net.Http
                        }
                }
 
+               class ThrowOnlyProxy : IWebProxy
+               {
+                       public ICredentials Credentials {
+                               get {
+                                       throw new NotImplementedException ();
+                               }
+
+                               set {
+                                       throw new NotImplementedException ();
+                               }
+                       }
+
+                       public Uri GetProxy (Uri destination)
+                       {
+                               throw new NotImplementedException ();
+                       }
+
+                       public bool IsBypassed (Uri host)
+                       {
+                               throw new NotImplementedException ();
+                       }
+               }
+
                const int WaitTimeout = 5000;
 
                string TestHost, LocalServer;
@@ -297,6 +320,25 @@ namespace MonoTests.System.Net.Http
                        }
                }
 
+               [Test]
+               public void Proxy_Disabled ()
+               {
+                       var pp = WebRequest.DefaultWebProxy;
+
+                       try {
+                               WebRequest.DefaultWebProxy = new ThrowOnlyProxy ();
+
+                               var request = new HttpClientHandler {
+                                       UseProxy = false
+                               };
+
+                               var client = new HttpClient (request);
+                               Assert.IsTrue (client.GetAsync ("http://google.com").Wait (5000), "needs internet access");
+                       } finally {
+                               WebRequest.DefaultWebProxy = pp;
+                       }
+               }
+
                [Test]
                public void Send ()
                {
index ffe0d78a15167c74fedc6ac0ddcd1d1f685b748b..ac5858d1adb7fb2e77bd7ffb1f18c9db0aedf559 100644 (file)
@@ -67,9 +67,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 16bb9e6d90c06dd7f7312cd7175190ff0db1a032..f782c91e5cdece5a45361cd240173ebd832cb362 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3a271868314604aca2fe804d85e1cfd4f9d620d6..6fe1d3aa59a18d18af49651d7566b8caf2e1edca 100644 (file)
@@ -72,9 +72,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ebdde2de08b82c530025f7b770d7ede01177ca19..0a372455e9cdebcadb0ec219c9349e5b4d47263c 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Strings_Core.resources">\r
+    <EmbeddedResource Include="Strings_Core.resx">\r
       <LogicalName>System.Reactive.Strings_Core.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index d8b972bae4db81c79886534d5337e4b430dc08b3..0fef571313a78994b8dd281b71353315ac4602ef 100644 (file)
@@ -71,9 +71,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index dd239180f60a729c4a1785c4a8143fde501e8cc6..55e768b3fa4272cb3b755836b19dbdcc238f2f88 100644 (file)
@@ -79,9 +79,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f9b47ccf591862dcb4aaba00cb03b2bb4a3eaabd..f0057b389b23ddf9bd27deccf199f90d5b71bfa8 100644 (file)
@@ -93,9 +93,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b4ea1eed3cf1eab2db7f5f145e41d05b6f0eb0d5..cd90704cc90c9fc098e3b348e57b6ffdd5f7e291 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Strings_Linq.resources">\r
+    <EmbeddedResource Include="Strings_Linq.resx">\r
       <LogicalName>System.Reactive.Strings_Linq.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 6aa6d5a9aa737dc0a843c6bb15a3362d9710a5d5..fcff09f9daf815ddac9f5f1b5199b28bb053b0ab 100644 (file)
@@ -71,9 +71,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 64ed969e3c7745224246000839aeca28f51f2bc2..6b5d1cfbe8318344512ef82ab964bea5e98e9596 100644 (file)
@@ -88,9 +88,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Strings_PlatformServices.resources">\r
+    <EmbeddedResource Include="Strings_PlatformServices.resx">\r
       <LogicalName>System.Reactive.Strings_PlatformServices.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 6edf8555781cc195fdd1ab8bf2e2f1813225ad2d..3fd5344a43b50e3714e68197661d0640f50bcc9a 100644 (file)
@@ -81,9 +81,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Strings_Providers.resources">\r
+    <EmbeddedResource Include="Strings_Providers.resx">\r
       <LogicalName>System.Reactive.Strings_Providers.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 61c230ab10ef469540933c01edd1909d152265dd..2802930f4d4ca978a4218700062546d9b54c76da 100644 (file)
@@ -73,9 +73,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 61999a36fea0fcdaf1618126fe0ca04c2082b9b8..6aacf0d324f2c8fdd73912eaab23c142523f3287 100644 (file)
@@ -73,9 +73,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8f7843093771312d715ee553f2a07fa6704523ee..abb30575708aa4226193b6ba5477e9344a96feb7 100644 (file)
@@ -77,9 +77,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Strings_WindowsThreading.resources">\r
+    <EmbeddedResource Include="Strings_WindowsThreading.resx">\r
       <LogicalName>System.Reactive.Strings_WindowsThreading.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 7242a9e1fad09fda245ca5f90c71d437394ee659..3089b404bdf517604d7f302d2fc44182f6ac7e4c 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 761f9088e7489056b818cb5248c82432d8c6f378..480589216b314108be5f2287752892126350686b 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b7f31943b54cee2e6c2f18eb59fe112315e9a5fc..5601f7c47a15cf354274bdf16b14caf1f3f81306 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0874c590124e89c571ce6ff8e3c743f38434e7cf..d5192c051b056e3b62ef93bccd3533541c3a95ce 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6176f5337e25e4dde7a7d3a23078d2f5aeb74069..f5de8b68d7f091c236651c67a4557732dffa711c 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cce8ef1a9ff08506b810a9f45a56c5071bf84b63..c272c83959de1942c83c6adbfd1dce692475b279 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index eeef7dcc234d943a6a36cabaedd22a90c4be70d5..e959175b7337b33974be70ec92e7506991727fd4 100644 (file)
@@ -67,9 +67,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d9e8d873bd225632e099ac6b9759ffefb2b7e123..3f021276d449fd7fe9e12d6d8b883358c8b1328c 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index fcad8e84430643246f0555d198588342ef7468f3..39e5a6128f2c71bb77153b2b7cc99392b8504400 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6923f01842b2f6b7441fcf96aabbc7ab9c798c31..35714061b5b859fc3855c3028d79876331eceba9 100644 (file)
@@ -91,9 +91,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c57e5807b8c480048b8829552cd6dab06b5b37a9..6724c3786315a574fd46d4351ab2bb65fa561edf 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d51725c1cbf9dca6b1182f695ef29c2273637f7b..e986534126d2fbd8661da2b2f4ffe1acc5eb2a41 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d8664c529dd3eff35d3071bf32484c905f0e2ed8..4608b887c5e188ac2bf80cecbc1120f93056a827 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9f20d9bee52df8e371a93049d398581713ff8350..ade3d4333395f267221663d4154f8c734a33f6aa 100644 (file)
@@ -90,9 +90,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 3ffa27d003d4d2847a687918e317bc3555131b53..a793bf739fc8c9d0daf85ee11da99df0082176aa 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9b0b192e2d6ed3b7d1e48d1e5d96fd5630808569..0040fd6840b17b446d8eaca8e51b434d279d5b46 100644 (file)
@@ -84,6 +84,7 @@
     <Compile Include="System.Transactions\TransactionOptions.cs" />\r
     <Compile Include="System.Transactions\TransactionPromotionException.cs" />\r
     <Compile Include="System.Transactions\TransactionScope.cs" />\r
+    <Compile Include="System.Transactions\TransactionScopeAsyncFlowOption.cs" />\r
     <Compile Include="System.Transactions\TransactionScopeOption.cs" />\r
     <Compile Include="System.Transactions\TransactionStatus.cs" />\r  </ItemGroup>\r
   <!-- To modify your build process, add your task inside one of the targets below and uncomment it. \r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 36d981ebe951bb5e44c41551e5a5fb73cd2aab50..4c5394f957bb36702e1d9ffb67534bdef8449232 100644 (file)
@@ -31,6 +31,7 @@ System.Transactions/TransactionManagerCommunicationException.cs
 System.Transactions/TransactionOptions.cs
 System.Transactions/TransactionPromotionException.cs
 System.Transactions/TransactionScope.cs
+System.Transactions/TransactionScopeAsyncFlowOption.cs
 System.Transactions/TransactionScopeOption.cs
 System.Transactions/TransactionStatus.cs
 System.Transactions/Configuration/DefaultSettingsSection.cs
index 129967d9e27817a140dcc077745d6c5828158e58..167d47e8d3a70e0a84be852e860f0e84c2bd10d0 100644 (file)
@@ -31,12 +31,20 @@ namespace System.Transactions
                bool completed;
                bool isRoot;
 
+               bool asyncFlowEnabled;
+
                public TransactionScope ()
                        : this (TransactionScopeOption.Required,
                                TransactionManager.DefaultTimeout)
                {
                }
 
+               public TransactionScope(TransactionScopeAsyncFlowOption asyncFlow)
+                       : this(TransactionScopeOption.Required,
+                               TransactionManager.DefaultTimeout, asyncFlow)
+               {
+               }
+
                public TransactionScope (Transaction transaction)
                        : this (transaction, TransactionManager.DefaultTimeout)
                {
@@ -53,7 +61,7 @@ namespace System.Transactions
                        TimeSpan timeout, DTCOption opt)
                {
                        Initialize (TransactionScopeOption.Required,
-                               transaction, defaultOptions, opt, timeout);
+                               transaction, defaultOptions, opt, timeout, TransactionScopeAsyncFlowOption.Suppress);
                }
 
                public TransactionScope (TransactionScopeOption option)
@@ -62,10 +70,21 @@ namespace System.Transactions
                }
 
                public TransactionScope (TransactionScopeOption option,
-                       TimeSpan timeout)
+                       TimeSpan timeout)
+                       : this (option, timeout, TransactionScopeAsyncFlowOption.Suppress)
+               {
+               }
+
+               public TransactionScope(TransactionScopeOption option, TransactionScopeAsyncFlowOption asyncFlow)
+                       : this(option, TransactionManager.DefaultTimeout, asyncFlow)
+               {
+               }
+
+       public TransactionScope (TransactionScopeOption option,
+                       TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
                {
                        Initialize (option, null, defaultOptions,
-                               DTCOption.None, timeout);
+                               DTCOption.None, timeout, asyncFlow);
                }
 
                public TransactionScope (TransactionScopeOption scopeOption,
@@ -80,16 +99,17 @@ namespace System.Transactions
                        DTCOption opt)
                {
                        Initialize (scopeOption, null, options, opt,
-                               TransactionManager.DefaultTimeout);
+                               TransactionManager.DefaultTimeout, TransactionScopeAsyncFlowOption.Suppress);
                }
 
                void Initialize (TransactionScopeOption scopeOption,
                        Transaction tx, TransactionOptions options,
-                       DTCOption interop, TimeSpan timeout)
+                       DTCOption interop, TimeSpan timeout, TransactionScopeAsyncFlowOption asyncFlow)
                {
                        completed = false;
                        isRoot = false;
                        nested = 0;
+                       asyncFlowEnabled = asyncFlow == TransactionScopeAsyncFlowOption.Enabled;
 
                        if (timeout < TimeSpan.Zero)
                                throw new ArgumentOutOfRangeException ("timeout");
@@ -165,36 +185,67 @@ namespace System.Transactions
                                throw new InvalidOperationException ("TransactionScope nested incorrectly");
                        }
 
-                       if (Transaction.CurrentInternal != transaction) {
+                       if (Transaction.CurrentInternal != transaction && !asyncFlowEnabled) {
                                if (transaction != null)
                                        transaction.Rollback ();
                                if (Transaction.CurrentInternal != null)
                                        Transaction.CurrentInternal.Rollback ();
 
                                throw new InvalidOperationException ("Transaction.Current has changed inside of the TransactionScope");
-                       }
+                       } 
 
-                       if (Transaction.CurrentInternal == oldTransaction && oldTransaction != null)
-                               oldTransaction.Scope = parentScope;
+                       if (asyncFlowEnabled) {
+                               if (oldTransaction != null)
+                                       oldTransaction.Scope = parentScope;
 
-                       Transaction.CurrentInternal = oldTransaction;
+                               var variedTransaction = Transaction.CurrentInternal;
 
-                       if (transaction == null)
-                               /* scope was not in a transaction, (Suppress) */
-                               return;
+                               if (transaction == null && variedTransaction == null)
+                                       /* scope was not in a transaction, (Suppress) */
+                                       return;
 
-                       transaction.Scope = null;
+                               variedTransaction.Scope = parentScope;
+                               Transaction.CurrentInternal = oldTransaction;
 
-                       if (!IsComplete) {
-                               transaction.Rollback ();
-                               return;
-                       }
+                               transaction.Scope = null;
 
-                       if (!isRoot)
-                               /* Non-root scope has completed+ended */
-                               return;
+                               if (!IsComplete) {
+                                       transaction.Rollback ();
+                                       variedTransaction.Rollback();
+                                       return;
+                               }
+
+                               if (!isRoot)
+                                       /* Non-root scope has completed+ended */
+                                       return;
+
+                               variedTransaction.CommitInternal();
+                               transaction.CommitInternal();
+                       } else {
+                               if (Transaction.CurrentInternal == oldTransaction && oldTransaction != null)
+                                       oldTransaction.Scope = parentScope;
+
+                               Transaction.CurrentInternal = oldTransaction;
 
-                       transaction.CommitInternal ();
+                               if (transaction == null)
+                                       /* scope was not in a transaction, (Suppress) */
+                                       return;
+
+                               transaction.Scope = null;
+
+                               if (!IsComplete)
+                               {
+                                       transaction.Rollback();
+                                       return;
+                               }
+
+                               if (!isRoot)
+                                       /* Non-root scope has completed+ended */
+                                       return;
+
+                               transaction.CommitInternal();
+
+                       }
                }
 
 
diff --git a/mcs/class/System.Transactions/System.Transactions/TransactionScopeAsyncFlowOption.cs b/mcs/class/System.Transactions/System.Transactions/TransactionScopeAsyncFlowOption.cs
new file mode 100644 (file)
index 0000000..5285fe5
--- /dev/null
@@ -0,0 +1,9 @@
+
+namespace System.Transactions
+{
+       public enum TransactionScopeAsyncFlowOption
+       {
+               Suppress,
+               Enabled
+       }
+}
index f3a6660fbbfb16c7a2b5879c93eddf7b3e75392e..b7bfc3e76b57a1ebd6138fa56004e6ad47b2fc75 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 437087ae74b9c35432c1001186a6e8686b8d00d0..461643c497be3fb04509e909a0f06f17c22cc2cb 100644 (file)
@@ -82,9 +82,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 7ad4e02b9fbb6bde7c4de84f1fb34e76a4b9627a..84781bfe0b9fd06b4142c3fbf9493afc157f18b4 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 24d48cc2167e125556639d9bd08d15f551647211..a812da1666512c6952fa26671fee20c038ae41f5 100644 (file)
@@ -78,9 +78,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e63e29964ffd43679248d8f269c7a8350638a0c5..d008409de93ceb62724eb093777654e53c135be9 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 5fcfdabbac448fe11f737f777df039cf06b52ef4..1260d005c16b064c8c871a8c2b1c6f3e9d7794fe 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 241b96bcbc4370d1cbdc26df673c124699ccfcc2..2a4f661c3b7ee29a4ae690b3b5edb69055402873 100644 (file)
@@ -97,9 +97,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 31e60bb0b175dccb9e57e732bc7f044cb7871da6..0f303359778863a701f5c3e2f823739e8f393984 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resources">\r
+    <EmbeddedResource Include="System.Web.Http.Properties.CommonWebApiResources.resx">\r
       <LogicalName>System.Web.Http.Properties.CommonWebApiResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resources">\r
+    <EmbeddedResource Include="System.Web.Http.Properties.SRResources.resx">\r
       <LogicalName>System.Web.Http.Properties.SRResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index eea91028ecaa251f07e79bd1ba42dbafc5777ffa..bc1337a2a49b2e6f2567798e58a082117311f748 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 73d5328f89889d7098f5c1cd053d01167dcd82b7..3b76937bb6285bddab64b7752f01287a29760775 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Mvc/Resources/MvcResources.resources">\r
+    <EmbeddedResource Include="Mvc/Resources/MvcResources.resx">\r
       <LogicalName>System.Web.Mvc.Resources.MvcResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index fd459922df14da9f76e268815a902093cb905d1f..495234806c5aeb054e9d7462b682a03cba6485c8 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resources">\r
+    <EmbeddedResource Include="System.Web.Razor.Resources.RazorResources.resx">\r
       <LogicalName>System.Web.Razor.Resources.RazorResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resources">\r
+    <EmbeddedResource Include="System.Web.Razor.Common.CommonResources.resx">\r
       <LogicalName>System.Web.Razor.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 78ef2022b993016affbe840265eb0b038e6f892d..be101eaa2a8a51643a79d308a6c3f2ec594b2908 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 10bdf1f69e1912aac0df5d25375e25e24f179165..4f47b14286db28704527e8d43ee27a23b454260c 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 657348b4289d8ae48cf036087b4bafb852ba719a..0dfc8236d4b1c71de2ee476616b03e9501c3b146 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 16282251ad42b04695d57660ea952730d9d13a46..ac6617f5e2adbb68541ab9749ae949c96ccfc538 100644 (file)
@@ -86,9 +86,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resources">\r
+    <EmbeddedResource Include="System.Web.WebPages.Deployment.Common.CommonResources.resx">\r
       <LogicalName>System.Web.WebPages.Deployment.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources">\r
+    <EmbeddedResource Include="System.Web.WebPages.Deployment.Resources.ConfigurationResources.resx">\r
       <LogicalName>System.Web.WebPages.Deployment.Resources.ConfigurationResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 6df147742b1dcbf6d98c3574feafbeae524a9a2e..d6ffdf0d747e53e2c86341149972cf05ecd47cfe 100644 (file)
@@ -89,9 +89,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resources">\r
+    <EmbeddedResource Include="System.Web.WebPages.Razor.Resources.RazorWebResources.resx">\r
       <LogicalName>System.Web.WebPages.Razor.Resources.RazorWebResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resources">\r
+    <EmbeddedResource Include="System.Web.WebPages.Razor.Common.CommonResources.resx">\r
       <LogicalName>System.Web.WebPages.Razor.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 6bb28d4513fa8413a8b17c41a96ac9d6d3669ea5..16d66dd9b1171e0d14673ca5e07756d4572751d2 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resources">\r
+    <EmbeddedResource Include="System.Web.WebPages.Resources.WebPageResources.resx">\r
       <LogicalName>System.Web.WebPages.Resources.WebPageResources.resources</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resources">\r
+    <EmbeddedResource Include="System.Web.WebPages.Common.CommonResources.resx">\r
       <LogicalName>System.Web.WebPages.Common.CommonResources.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 1c4ef9bb5bf6c4f34a26ed2a04943558763ef7a7..c3cd7cc5262760c37a0f5f22aeed89da1c81bf3c 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="resources/TranslationResources.resources">\r
+    <EmbeddedResource Include="resources/TranslationResources.resx">\r
       <LogicalName>TranslationResources.resources</LogicalName>\r
     </EmbeddedResource>\r
     <EmbeddedResource Include="resources/WebUIValidation.js">\r
index 52bfd6d852c655d1b4546896475619cf393ef8bf..1cff71822308af45d45c170da6acfc5aa0d7bff6 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="resources/TranslationResources.resources">\r
+    <EmbeddedResource Include="resources/TranslationResources.resx">\r
       <LogicalName>TranslationResources.resources</LogicalName>\r
     </EmbeddedResource>\r
     <EmbeddedResource Include="resources/WebUIValidation.js">\r
index 84baaa18d96599d8b0cd86f609499a07d3b3b2fd..9064929de012eb685ebf71f8563c19b332e3c076 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c3ca632b42c9c75b5022255e99e282910c6748bb..52e2326bdce8362c55bf0f232c115db28e5b1c18 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <EmbeddedResource Include="resources/DnDMove.cur">\r
       <LogicalName>System.Windows.Forms.DnDMove.cur</LogicalName>\r
     </EmbeddedResource>\r
-    <EmbeddedResource Include="resources/keyboards.resources">\r
+    <EmbeddedResource Include="resources/keyboards.resx">\r
       <LogicalName>keyboards.resources</LogicalName>\r
     </EmbeddedResource>\r
     <EmbeddedResource Include="resources/16_computer.png">\r
index 592cd494c7714d25c4596e736a03dd107a03ecc8..59ba68253f7678d90e83373cafbee8397a1bced5 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index fe50251b98b12cd7731eeda9d062b3c7746c503e..c4285270bae308c734bd1136297b0373fad48b71 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6b91b26ed786ac9608d4dd4bd6c5d3e9a5a898d9..32d268ac86e9ff227b087e84e8a504c558b56f74 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8cb1de855b41197dcaa8e3e48fa485602ef65e2e..ecceeff1d25ab131fedbf915563dc943f5d41b32 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 60cf0112f21668c7052a97f260a3a718387a2b06..7eacb3ddd76186652336c001a6d305daf646eb96 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8a42daaad119ea85b20fd33aed5d9d4391630577..753fdd5bbb8f23a12b369415577b1624e2dfae04 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2af43ce95c2299f5658c913e05dd0b97350a8ec9..a5d11aeffb1c16f590397c74502c490045f6e757 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f44e4cd7e27ec02cfeb52f6e7a494a6167e89717..e3988ed811ffcb03d826fec78c7a4b1d4fbb96d8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 7dd6b67b782f76741ef78fbc3d736daed701c493..5168c310d8608d21d54db0c43b9d10c90567c014 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index deb1d4cdb2b91625a080472b475dc82ad1ee9e87..3419b1ba3ada43d1da8920fe76950b33d065b0b6 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 96325e477f02f4c01efcf731e37d9b48aadfaf56..757869a3165e88a36667fb9b1e13f20b0f681056 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 12e35ada5e73ba899216fbed4194ad9339eae6ec..ebfc1d0cc3ad7464e3eb20240169c99827487924 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1be22471e607fc0a148c3ec3b00b16387a7a44d5..cff36539f3bee4d78e7a34495ad889df5509b2bd 100644 (file)
@@ -69,9 +69,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b975e41343291172d96ee901727e81b0c21512d3..ed37cbc38ad5a2b1f4ca4ae9b79219d53b750ec1 100644 (file)
@@ -68,9 +68,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 842c1ed0ebe00b59e48bc1392671abaa8d8fb563..d3eaf78bc820a95b976ea944eaf6115929fe57d1 100644 (file)
@@ -6,7 +6,7 @@ LIBRARY = WindowsBase.dll
 LIB_REFS = System System.Xml
 LIB_MCS_FLAGS = -unsafe
 TEST_MCS_FLAGS = -unsafe
-TEST_LIB_REFS = WindowsBase System System.Xml System.Core
+TEST_LIB_REFS = WindowsBase System System.Xml System.Core System.IO.Compression
 
 ifeq (2.0, $(FRAMEWORK_VERSION))
 LIB_MCS_FLAGS += -d:NET_3_0
index 96ea9a5403b45bdae370068ca187d7763be6b3d8..e4b4ae11d2a1633aea6487a63fab392315db1c22 100644 (file)
@@ -457,6 +457,8 @@ namespace System.IO.Packaging {
 
                internal static void WriteRelationships (Dictionary <string, PackageRelationship> relationships, Stream stream)
                {
+                       stream.SetLength(0);
+
                        XmlDocument doc = new XmlDocument ();
                        XmlNamespaceManager manager = new XmlNamespaceManager (doc.NameTable);
                        manager.AddNamespace ("rel", RelationshipNamespace);
index 435e1d5ab7cfe656c637725b4d4c9739d3f5dfa3..783350b09344a6943326be5ae5eafa28a5e589b3 100644 (file)
@@ -95,8 +95,10 @@ namespace System.IO.Packaging {
                {
                        // Ensure that all the data has been read out of the package
                        // stream already. Otherwise we'll lose data when we recreate the zip
-                       foreach (ZipPackagePart part in Parts.Values)
-                               part.GetStream ().Dispose ();
+                       foreach (ZipPackagePart part in Parts.Values) {
+                               if (part.Package != null)
+                                       part.GetStream ().Dispose ();
+                       }
                        
                        // Empty the package stream
                        PackageStream.Position = 0;
@@ -107,6 +109,9 @@ namespace System.IO.Packaging {
 
                                // Write all the part streams
                                foreach (ZipPackagePart part in Parts.Values) {
+                                       if (part.Package == null)
+                                               continue;
+
                                        Stream partStream = part.GetStream ();
                                        partStream.Seek (0, SeekOrigin.Begin);
                                        
index 6ce92d31e57dddeea54db7eac175339197aa5b64..ade937eea58027764bfe61d863d9054b68346adf 100644 (file)
@@ -184,5 +184,33 @@ namespace MonoTests.System.IO.Packaging {
                                                         d.RelationshipType == node.Attributes["Type"].InnerText));\r
             }\r
         }\r
+\r
+        [Test]\r
+        public void CheckRelationshipDeletion ()\r
+        {\r
+            AddThreeRelationShips ();\r
+            package.Flush ();\r
+\r
+            foreach (PackageRelationship p in new List<PackageRelationship> (package.GetRelationships ()).Skip(1))\r
+                package.DeleteRelationship (p.Id);\r
+\r
+            PackagePart part = package.GetPart (new Uri ("/_rels/.rels", UriKind.Relative));\r
+            Assert.IsNotNull (package.GetPart (new Uri ("/_RELS/.RELS", UriKind.Relative)), "#0");\r
+            package.Flush ();\r
+            Assert.IsNotNull (part, "#1");\r
+\r
+            Stream stream = part.GetStream ();\r
+            Assert.IsTrue (stream.Length > 0, "#2a");\r
+\r
+            XmlDocument doc = new XmlDocument ();\r
+            XmlNamespaceManager manager = new XmlNamespaceManager (doc.NameTable);\r
+            manager.AddNamespace("rel", "http://schemas.openxmlformats.org/package/2006/relationships");\r
+            doc.Load (new StreamReader (stream));\r
+\r
+            Assert.IsNotNull (doc.SelectSingleNode ("/rel:Relationships", manager), "#2b");\r
+\r
+            XmlNodeList list = doc.SelectNodes ("/rel:Relationships/*", manager);\r
+            Assert.AreEqual (1, list.Count);\r
+        }\r
     }\r
 }\r
index 933449052f315ffeeae6104c5434135423bf1793..808aa468d38c0c57dd66a8e8ed838363444ed153 100644 (file)
@@ -27,6 +27,7 @@
 using System;\r
 using System.Collections.Generic;\r
 using System.IO;\r
+using System.IO.Compression;\r
 using System.IO.Packaging;\r
 using System.Linq;\r
 using System.Text;\r
@@ -116,7 +117,7 @@ namespace MonoTests.System.IO.Packaging {
             package = Package.Open (path);\r
             package.Close ();\r
             package = Package.Open (path);\r
-        }\r
+        } \r
                \r
                [Test]\r
                public void Close_FileStreamNotClosed ()\r
@@ -416,5 +417,23 @@ namespace MonoTests.System.IO.Packaging {
             File.Create (path).Close ();\r
             package = Package.Open (path, FileMode.OpenOrCreate, FileAccess.Write);\r
         }\r
+\r
+        [Test]\r
+        public void Check_ZipDateTime ()\r
+        {\r
+            using (var zipStream = new FileStream (path, FileMode.OpenOrCreate, FileAccess.ReadWrite))\r
+            using (package = Package.Open (zipStream, FileMode.OpenOrCreate)) {\r
+                var part = package.CreatePart (new Uri ("/test", UriKind.Relative), "test/type");\r
+                using (var stream = part.GetStream ())\r
+                    stream.Write (new byte [1024 * 1024], 0, 1024 * 1024);\r
+            }\r
+\r
+            using (var stream = new FileStream (path, FileMode.Open, FileAccess.Read))\r
+            using (var archive = new ZipArchive(stream))\r
+            {                \r
+                foreach (var entry in archive.Entries)\r
+                    Assert.AreEqual (entry.LastWriteTime.Year, DateTime.Now.Year);\r
+            }\r
+        }           \r
     }\r
 }\r
index 5f4a244dce868f8f638ca22580f9693720c23b70..5ac7164723c0f5473c203026edc0d7e2748e3e89 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2cbea32a40ce4174ddd8a89b55f8975cf11584f9..2a81a73959bba6ddcf3595874bb9651989261160 100644 (file)
@@ -5,9 +5,11 @@
 //
 
 using System;
+using System.Runtime.InteropServices;
 
 namespace zipsharp
 {
+       [StructLayoutAttribute (LayoutKind.Sequential)]
        struct ZipFileInfo
        {
                ZipTime date;
@@ -38,7 +40,7 @@ namespace zipsharp
                public ZipFileInfo (DateTime fileTime)
                {
                        date = new ZipTime (fileTime);
-                       dosDate = new IntPtr ((int)fileTime.ToFileTime ());
+                       dosDate = IntPtr.Zero;
                        internalFileAttributes = IntPtr.Zero;
                        externalFileAttributes = IntPtr.Zero;
                }
index bedcf1af0c14a5bb94af6c4dc4bfc29dc8fc19a8..f577efcd5ca871464b7ed8ca65b028a35086fd98 100644 (file)
@@ -41,14 +41,78 @@ using System.Runtime.Serialization;
 
 namespace System
 {
+       // Contains information about the type which is expensive to compute
+       [StructLayout (LayoutKind.Sequential)]
+       internal class MonoTypeInfo {
+               // this is the displayed form: special characters
+               // ,+*&*[]\ in the identifier portions of the names
+               // have been escaped with a leading backslash (\)
+               public string full_name;
+               public MonoCMethod default_ctor;
+       }
+
+       [StructLayout (LayoutKind.Sequential)]
        partial class RuntimeType
        {
+               [NonSerialized]
+               MonoTypeInfo type_info;
+
                internal Object GenericCache;
 
-               internal virtual MonoCMethod GetDefaultConstructor ()
+               internal RuntimeType (Object obj)
+               {
+                       throw new NotImplementedException ();
+               }
+
+               internal MonoCMethod GetDefaultConstructor ()
+               {
+                       MonoCMethod ctor = null;
+
+                       if (type_info == null)
+                               type_info = new MonoTypeInfo ();
+                       else
+                               ctor = type_info.default_ctor;
+
+                       if (ctor == null) {
+                               var ctors = GetConstructors (BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
+
+                               for (int i = 0; i < ctors.Length; ++i) {
+                                       if (ctors [i].GetParametersCount () == 0) {
+                                               type_info.default_ctor = ctor = (MonoCMethod) ctors [i];
+                                               break;
+                                       }
+                               }
+                       }
+
+                       return ctor;
+               }
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
+
+               [MethodImplAttribute(MethodImplOptions.InternalCall)]
+               extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
+
+               internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
+                {
+                       if (fromNoninstanciated == null)
+                               throw new ArgumentNullException ("fromNoninstanciated");
+                        return GetCorrespondingInflatedMethod (fromNoninstanciated);
+                }
+
+               internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
                {
-                       // TODO: Requires MonoType
-                       throw new NotSupportedException ();
+                       if (fromNoninstanciated == null)
+                               throw new ArgumentNullException ("fromNoninstanciated");
+                        return GetCorrespondingInflatedConstructor (fromNoninstanciated);
+               }
+
+               internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
+               {
+                       /* create sensible flags from given FieldInfo */
+                       BindingFlags flags = fromNoninstanciated.IsStatic ? BindingFlags.Static : BindingFlags.Instance;
+                       flags |= fromNoninstanciated.IsPublic ? BindingFlags.Public : BindingFlags.NonPublic;
+                       return GetField (fromNoninstanciated.Name, flags);
                }
 
                string GetDefaultMemberName ()
@@ -586,12 +650,6 @@ namespace System
                        get;
                }
 
-               public override string FullName {
-                       get {
-                               throw new NotImplementedException ();
-                       }
-               }
-
                public extern override string Name {
                        [MethodImplAttribute(MethodImplOptions.InternalCall)]
                        get;
@@ -624,5 +682,32 @@ namespace System
                        get { return get_core_clr_security_level () == 1; }
                }
 #endif
+
+               public override int GetHashCode()
+               {
+                       Type t = UnderlyingSystemType;
+                       if (t != null && t != this)
+                               return t.GetHashCode ();
+                       return (int)_impl.Value;
+               }
+
+               public override string FullName {
+                       get {
+                               string fullName;
+                               // This doesn't need locking
+                               if (type_info == null)
+                                       type_info = new MonoTypeInfo ();
+                               if ((fullName = type_info.full_name) == null)
+                                       fullName = type_info.full_name = getFullName (true, false);
+
+                               return fullName;
+                       }
+               }
+
+               internal override bool IsUserType {
+                       get {
+                               return false;
+                       }
+               }
        }
 }
index 04c0c5670863215cc7f35d8bec6d2db80fca9b72..c93233dfffb57af19d0eaa9cc7092a2125e01739 100644 (file)
@@ -438,7 +438,7 @@ namespace System.Reflection {
                        foreach (Type type in methodInstantiation) {
                                if (type == null)
                                        throw new ArgumentNullException ();
-                               if (!(type is MonoType))
+                               if (!(type is RuntimeType))
                                        hasUserType = true;
                        }
 
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ArrayWithOffset.cs b/mcs/class/corlib/System.Runtime.InteropServices/ArrayWithOffset.cs
deleted file mode 100644 (file)
index 1ad70d3..0000000
+++ /dev/null
@@ -1,89 +0,0 @@
-//
-// System.Runtime.InteropServices.ArrayWithOffset.cs
-//
-// Author:
-//   Miguel de Icaza (miguel@ximian.com)
-//
-// (C) Novell, Inc.  http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Runtime.InteropServices {
-
-       [Serializable]
-       [ComVisible (true)]
-       public struct ArrayWithOffset {
-               object array;
-               int offset;
-
-               public ArrayWithOffset (object array, int offset)
-               {
-                       this.array = array;
-                       this.offset = offset;
-               }
-
-               public override bool Equals (object obj)
-               {
-                       if (obj == null)
-                               return false;
-                       if (!(obj is ArrayWithOffset))
-                               return false;
-                       ArrayWithOffset other = (ArrayWithOffset) obj;
-
-                       return (other.array == array && other.offset == offset);
-               }
-
-               public bool Equals (ArrayWithOffset obj)
-               {
-                       return obj.array == array && obj.offset == offset;
-               }
-
-               public static bool operator == (ArrayWithOffset a, ArrayWithOffset b)
-               {
-                       return a.Equals (b);
-               }
-
-               public static bool operator != (ArrayWithOffset a, ArrayWithOffset b)
-               {
-                       return !a.Equals (b);
-               }
-
-               public override int GetHashCode ()
-               {
-                       return offset;
-               }
-
-               public object GetArray ()
-               {
-                       return array;
-               }                               
-
-               public int GetOffset ()
-               {
-                       return offset;
-               }                               
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs b/mcs/class/corlib/System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
deleted file mode 100644 (file)
index 244e727..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-//
-// System.Runtime.InteropServices.AssemblyRegistrationFlags.cs
-//
-// Author:
-//   Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Runtime.InteropServices
-{
-       [Flags]
-       [ComVisible(true)]
-       public enum AssemblyRegistrationFlags {
-               None = 0,
-               SetCodeBase,
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/BStrWrapper.cs
deleted file mode 100644 (file)
index 5f392b8..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-//
-// System.Runtime.InteropServices.BStrWrapper
-//
-// Author:
-//   Kazuki Oikawa  (kazuki@panicode.com)
-//
-
-using System;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       [ComVisible (true)]
-       public sealed class BStrWrapper
-       {
-               string _value;
-
-               public BStrWrapper (string value)
-               {
-                       _value = value;
-               }
-               
-               public BStrWrapper (object value)
-               {
-                       _value = (string)value;
-               }
-
-               public string WrappedObject { get { return _value; } }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/COMException.cs b/mcs/class/corlib/System.Runtime.InteropServices/COMException.cs
deleted file mode 100644 (file)
index f7ad9af..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// COMException.cs - COM Exception
-//
-// Author:
-//     Sebastien Pouliot  <sebastien@ximian.com>
-//
-// (C) 2002 Motus Technologies Inc. (http://www.motus.com)
-// Copyright (C) 2004, 2008 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices {
-
-[Serializable]
-[ComVisible (true)]
-public class COMException : ExternalException {
-
-       public COMException () 
-               : base () {}
-
-       public COMException (string message) 
-               : base (message) {}
-
-       public COMException (string message, Exception inner) 
-               : base (message, inner) {}
-
-       public COMException (string message, int errorCode) 
-               : base (message, errorCode) {}
-
-       protected COMException (SerializationInfo info, StreamingContext context) 
-               : base (info, context) {}
-
-       public override string ToString ()
-       {
-               return String.Format (
-                       "{0} (0x{1:x}): {2} {3}{4}{5}",
-                       GetType (), HResult, Message, InnerException == null ? String.Empty : InnerException.ToString (),
-                       Environment.NewLine, StackTrace != null ? StackTrace : String.Empty);
-       }
-} 
-
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs b/mcs/class/corlib/System.Runtime.InteropServices/CallingConvention.cs
deleted file mode 100644 (file)
index 4dab193..0000000
+++ /dev/null
@@ -1,48 +0,0 @@
-// CallingConvention.cs
-//
-// This code was automatically generated from
-// ECMA CLI XML Library Specification.
-// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
-// Created: Fri, 7 Sep 2001 16:33:29 UTC
-// Source file: AllTypes.xml
-// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
-//
-// (C) 2001 Ximian, Inc.  http://www.ximian.com
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Runtime.InteropServices {
-
-       [Serializable]
-       [ComVisible (true)]
-       public enum CallingConvention {
-               Winapi = 1,
-               Cdecl = 2,
-               StdCall = 3,
-               ThisCall = 4,
-               FastCall = 5,
-       } 
-
-} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs b/mcs/class/corlib/System.Runtime.InteropServices/CharSet.cs
deleted file mode 100644 (file)
index 565380a..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-// CharSet.cs
-//
-// This code was automatically generated from
-// ECMA CLI XML Library Specification.
-// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
-// Created: Fri, 7 Sep 2001 16:33:35 UTC
-// Source file: AllTypes.xml
-// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
-//
-// (C) 2001 Ximian, Inc.  http://www.ximian.com
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Runtime.InteropServices {
-
-       [Serializable]
-       [ComVisible (true)]
-       public enum CharSet {
-               None = 1,
-               Ansi = 2,
-               Unicode = 3,
-               Auto = 4,
-       } 
-
-} // System.Runtime.InteropServices
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs b/mcs/class/corlib/System.Runtime.InteropServices/ComMemberType.cs
deleted file mode 100644 (file)
index 480d18a..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-// System.Runtime.InteropServices/ComMemberType.cs
-//
-// Paolo Molaro (lupus@ximian.com)
-//
-// (C) 2002 Ximian, Inc.
-
-using System;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       [ComVisible (true)]
-       public enum ComMemberType {
-               Method  = 0,
-               PropGet = 1,
-               PropSet = 2
-       }
-}
-
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs b/mcs/class/corlib/System.Runtime.InteropServices/CriticalHandle.cs
deleted file mode 100644 (file)
index ce50aff..0000000
+++ /dev/null
@@ -1,85 +0,0 @@
-//
-// System.Runtime.InteropServices.CriticalHandle
-//
-// Author:
-//   Kazuki Oikawa  (kazuki@panicode.com)
-//
-
-
-using System;
-using System.Runtime.ConstrainedExecution;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       public abstract class CriticalHandle : CriticalFinalizerObject, IDisposable
-       {
-               protected IntPtr handle;
-               bool _disposed = false;
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.MayFail)]
-               protected CriticalHandle (IntPtr invalidHandleValue)
-               {
-                       handle = invalidHandleValue;
-               }
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               ~CriticalHandle ()
-               {
-                       Dispose (false);
-               }
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               public void Close ()
-               {
-                       Dispose (true);
-               }
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               public void Dispose ()
-               {
-                       Dispose (true);
-               }
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               protected virtual void Dispose (bool disposing)
-               {
-                       if (_disposed)
-                               return;
-
-                       if (!IsInvalid){
-                               if (!_disposed && !ReleaseHandle ()) {
-                                       GC.SuppressFinalize (this);
-                               } else {
-                                       // Failed in release...
-                               }
-                       }
-                       _disposed = true;
-               }
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               protected abstract bool ReleaseHandle ();
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               protected void SetHandle (IntPtr handle)
-               {
-                       this.handle = handle;
-               }
-
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               public void SetHandleAsInvalid()
-               {
-                       _disposed = true;
-               }
-
-               public bool IsClosed {
-                       [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-                       get { return _disposed; }
-               }
-
-               public abstract bool IsInvalid {
-                       [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-                       get;
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/CurrencyWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/CurrencyWrapper.cs
deleted file mode 100644 (file)
index 5460b16..0000000
+++ /dev/null
@@ -1,57 +0,0 @@
-//
-// System.Runtime.InteropServices.CurrencyWrapper.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       [ComVisible (true)]
-       public sealed class CurrencyWrapper
-       {
-               Decimal currency;
-
-               public CurrencyWrapper (decimal obj)
-               {
-                       currency = obj;
-               }
-
-               public CurrencyWrapper (object obj)
-               {
-                       if (obj.GetType() != typeof(Decimal))
-                               throw new ArgumentException ("obj has to be a Decimal type");
-                       currency = (Decimal)obj;
-               }
-
-               public decimal WrappedObject {
-                       get { return currency; }
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/DispatchWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/DispatchWrapper.cs
deleted file mode 100644 (file)
index dfc5a2a..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-//
-// System.Runtime.InteropServices.DispatchWrapper.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if !FULL_AOT_RUNTIME
-using System;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       [ComVisible (true)]
-       public sealed class DispatchWrapper
-       {
-               object wrappedObject;
-
-               public DispatchWrapper (object obj)
-               {
-                       Marshal.GetIDispatchForObject (obj);
-                       wrappedObject = obj;
-               }
-
-               public object WrappedObject {
-                       get { return wrappedObject; }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ErrorWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/ErrorWrapper.cs
deleted file mode 100644 (file)
index 4bf947a..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-//
-// System.Runtime.InteropServices.ErrorWrapper.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-#if !FULL_AOT_RUNTIME
-using System;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       [ComVisible (true)]
-       public sealed class ErrorWrapper
-       {
-               int errorCode;
-
-               public ErrorWrapper (Exception e)
-               {
-                       this.errorCode = Marshal.GetHRForException (e);
-               }
-
-               public ErrorWrapper (int errorCode)
-               {
-                       this.errorCode = errorCode;
-               }
-
-               public ErrorWrapper (object errorCode)
-               {
-                       if (errorCode.GetType() != typeof(int))
-                               throw new ArgumentException ("errorCode has to be an int type");
-                       this.errorCode = (int)errorCode;
-               }
-
-               public int ErrorCode {
-                       get { return errorCode; }
-               }
-       }
-}
-#endif
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs b/mcs/class/corlib/System.Runtime.InteropServices/ExternalException.cs
deleted file mode 100644 (file)
index f149ed3..0000000
+++ /dev/null
@@ -1,76 +0,0 @@
-//
-// System.Runtime.InteropServices.ExternalException.cs
-//
-// Author:
-//   Miguel De Icaza (miguel@ximian.com)
-//
-// (C) 2001 Ximian, Inc.  http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Runtime.Serialization;
-using System.Globalization;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       [ComVisible (true)]
-       public class ExternalException : SystemException
-       {
-               public ExternalException ()
-                       : base (Locale.GetText ("External exception"))
-               {
-                       HResult = -2147467259;
-               }
-
-               public ExternalException (string message)
-                       : base (message)
-               {
-                       HResult = -2147467259;
-               }
-
-               protected ExternalException(SerializationInfo info, StreamingContext context)
-                       : base (info, context) {
-               }
-
-               public ExternalException (string message, Exception inner)
-                       : base (message, inner)
-               {
-                       HResult = -2147467259;
-               }
-
-               public ExternalException (string message, int errorCode)
-                       : base (message)
-               {
-                       HResult = errorCode;
-               }
-
-               public virtual int ErrorCode {
-                       get {
-                               return HResult;
-                       }
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/HandleRef.cs b/mcs/class/corlib/System.Runtime.InteropServices/HandleRef.cs
deleted file mode 100644 (file)
index d61d3bc..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-//
-// System.Runtime.InteropServices.HandleRef
-//
-// Author:
-//   Tim Coleman (tim@timcoleman.com)
-//
-// Copyright (C) 2003 Tim Coleman
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Runtime.InteropServices {
-       [ComVisible (true)]
-       public struct HandleRef {
-
-               #region Fields
-
-               object wrapper;
-               IntPtr handle;
-
-               #endregion // Fields
-
-               #region Constructors
-
-               public HandleRef (object wrapper, IntPtr handle)
-               {
-                       this.wrapper = wrapper;
-                       this.handle = handle;
-               }
-
-               #endregion // Constructors
-
-               #region Properties
-
-               public IntPtr Handle {
-                       get { return handle; }
-               }
-
-               public object Wrapper {
-                       get { return wrapper; }
-               }
-
-               #endregion // Properties
-
-               #region Type Conversions
-
-               public static explicit operator IntPtr (HandleRef value)
-               {
-                       return value.Handle;
-               }
-               
-               #endregion // Type Conversions
-               public static IntPtr ToIntPtr(HandleRef value)
-               {
-                       return value.Handle; 
-                       // Why did MS add a function for this?
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs b/mcs/class/corlib/System.Runtime.InteropServices/ICustomAdapter.cs
deleted file mode 100644 (file)
index 6ad1e35..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-//
-// System.Runtime.InteropServices.ICustomAdapter.cs
-//
-// Author:
-//   Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Runtime.InteropServices {
-
-       [ComVisible (true)]
-       public interface ICustomAdapter {
-               [return: MarshalAs (UnmanagedType.IUnknown)]
-               object GetUnderlyingObject ();
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs b/mcs/class/corlib/System.Runtime.InteropServices/ICustomFactory.cs
deleted file mode 100644 (file)
index 2f22d28..0000000
+++ /dev/null
@@ -1,39 +0,0 @@
-//
-// System.Runtime.InteropServices.ICustomFactory.cs
-//
-// Author:
-//   Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Runtime.InteropServices {
-
-       [ComVisible (true)]
-       public interface ICustomFactory {
-               MarshalByRefObject CreateInstance (Type serverType);
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs b/mcs/class/corlib/System.Runtime.InteropServices/ICustomMarshaler.cs
deleted file mode 100644 (file)
index 629a976..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-//
-// System.Runtime.InteropServices.ICustomMarshaler.cs
-//
-// Author:
-//   Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Runtime.InteropServices {
-
-       [ComVisible (true)]
-       public interface ICustomMarshaler {
-               void CleanUpManagedData (object ManagedObj);
-               void CleanUpNativeData (IntPtr pNativeData);
-               int GetNativeDataSize ();
-               IntPtr MarshalManagedToNative (object ManagedObj);
-               object MarshalNativeToManaged (IntPtr pNativeData);
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs b/mcs/class/corlib/System.Runtime.InteropServices/IRegistrationServices.cs
deleted file mode 100644 (file)
index 415f2a9..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
-//
-// System.Runtime.InteropServices.IRegistrationServices.cs
-//
-// Author:
-//   Kevin Winchester (kwin@ns.sympatico.ca)
-//
-// (C) 2002 Kevin Winchester
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Reflection;
-using System.Security.Permissions;
-namespace System.Runtime.InteropServices {
-
-       [ComVisible(true)]
-       [Guid("CCBD682C-73A5-4568-B8B0-C7007E11ABA2")]
-       public interface IRegistrationServices {
-               Guid GetManagedCategoryGuid ();
-               [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
-               string GetProgIdForType (Type type);
-
-               [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
-               Type[] GetRegistrableTypesInAssembly (Assembly assembly);
-
-               [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
-               bool RegisterAssembly (Assembly assembly, AssemblyRegistrationFlags flags);
-
-               [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
-               void RegisterTypeForComClients (Type type, ref Guid g);
-               
-               bool TypeRepresentsComType (Type type);
-               
-               [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
-               bool TypeRequiresRegistration (Type type);
-
-               [SecurityPermission(SecurityAction.LinkDemand, Flags=SecurityPermissionFlag.UnmanagedCode)]
-               bool UnregisterAssembly (Assembly assembly);
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/InvalidComObjectException.cs b/mcs/class/corlib/System.Runtime.InteropServices/InvalidComObjectException.cs
deleted file mode 100644 (file)
index c484ed7..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// System.Runtime.InteropServices.InvalidComObjectException.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       [ComVisible(true)]
-       [Serializable]
-       public class InvalidComObjectException : SystemException
-       {
-               private const int ErrorCode = -2146233049; // = 0x80131527
-
-               public InvalidComObjectException ()
-                       : base (Locale.GetText ("Invalid COM object is used"))
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public InvalidComObjectException (string message)
-                       : base (message)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public InvalidComObjectException (string message, Exception inner)
-                       : base (message, inner)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               protected InvalidComObjectException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/InvalidOleVariantTypeException.cs b/mcs/class/corlib/System.Runtime.InteropServices/InvalidOleVariantTypeException.cs
deleted file mode 100644 (file)
index d280bf4..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// System.Runtime.InteropServices.InvalidOleVariantTypeException.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       [ComVisible(true)]
-       [Serializable]
-       public class InvalidOleVariantTypeException : SystemException
-       {
-               private const int ErrorCode = -2146233039; // = 0x80131531
-
-               public InvalidOleVariantTypeException ()
-                       : base (Locale.GetText ("Found native variant type cannot be marshalled to managed code"))
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public InvalidOleVariantTypeException (string message)
-                       : base (message)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public InvalidOleVariantTypeException (string message, Exception inner)
-                       : base (message, inner)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               protected InvalidOleVariantTypeException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs b/mcs/class/corlib/System.Runtime.InteropServices/LayoutKind.cs
deleted file mode 100644 (file)
index 25fe51b..0000000
+++ /dev/null
@@ -1,46 +0,0 @@
-// LayoutKind.cs
-//
-// This code was automatically generated from
-// ECMA CLI XML Library Specification.
-// Generator: libgen.xsl [1.0; (C) Sergey Chaban (serge@wildwestsoftware.com)]
-// Created: Fri, 7 Sep 2001 16:33:48 UTC
-// Source file: AllTypes.xml
-// URL: http://msdn.microsoft.com/net/ecma/AllTypes.xml
-//
-// (C) 2001 Ximian, Inc.  http://www.ximian.com
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-
-namespace System.Runtime.InteropServices {
-
-       [ComVisible(true)]
-       [Serializable]
-       public enum LayoutKind {
-               Sequential = 0,
-               Explicit = 2,
-               Auto = 3
-       }
-       
-} 
index 24f15e3f980437e7877e372bf84a63afb6220ffb..a1b028b08c17a975da156186da5cb736e74ed47d 100644 (file)
@@ -1664,5 +1664,9 @@ namespace System.Runtime.InteropServices
                        
                        return GetFunctionPointerForDelegateInternal ((Delegate)(object)d);
                }
+
+               internal static void SetLastWin32Error (int error)
+               {
+               }
        }
 }
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/MarshalDirectiveException.cs b/mcs/class/corlib/System.Runtime.InteropServices/MarshalDirectiveException.cs
deleted file mode 100644 (file)
index 13c9c15..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// System.Runtime.InteropServices.MarshalDirectiveException.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       [ComVisible(true)]
-       [Serializable]
-       public class MarshalDirectiveException : SystemException
-       {
-               private const int ErrorCode = -2146233035; // = 0x80131535
-
-               public MarshalDirectiveException ()
-                       : base (Locale.GetText ("Unsupported MarshalAsAttribute found"))
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public MarshalDirectiveException (string message)
-                       : base (message)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public MarshalDirectiveException (string message, Exception inner)
-                       : base (message, inner)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               protected MarshalDirectiveException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/ObjectCreationDelegate.cs b/mcs/class/corlib/System.Runtime.InteropServices/ObjectCreationDelegate.cs
deleted file mode 100644 (file)
index 92dbc2f..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-//
-// System.Runtime.InteropServices.ObjectCreationDelegate.cs
-//
-// Author:
-//   Miguel de Icaza (miguel@ximian.com)
-//
-// (C) Novell, Inc.  http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-using System;
-
-namespace System.Runtime.InteropServices {
-
-       [ComVisible(true)]
-       public delegate IntPtr ObjectCreationDelegate (IntPtr aggregator);
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/SEHException.cs b/mcs/class/corlib/System.Runtime.InteropServices/SEHException.cs
deleted file mode 100644 (file)
index e3547cb..0000000
+++ /dev/null
@@ -1,66 +0,0 @@
-//
-// System.Runtime.InteropServices.SEHException.cs
-//
-// Authors:
-//    Gonzalo Paniagua Javier <gonzalo@ximian.com>
-//
-// (c) 2003 Ximian, Inc. http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       [ComVisible(true)]      
-       [Serializable]
-       public class SEHException : ExternalException
-       {
-               public SEHException ()
-               {
-               }
-
-               public SEHException (string message)
-                       : base (message)
-               {
-               }
-
-               public SEHException (string message, Exception inner)
-                       : base (message, inner)
-               {
-               }
-
-               protected SEHException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-               }
-
-               public virtual bool CanResume ()
-               {
-                       return false;
-               }
-       }
-}
-
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/SafeArrayRankMismatchException.cs b/mcs/class/corlib/System.Runtime.InteropServices/SafeArrayRankMismatchException.cs
deleted file mode 100644 (file)
index c712d91..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// System.Runtime.InteropServices.SafeArrayRankMismatchException.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       [ComVisible(true)]
-       [Serializable]
-       public class SafeArrayRankMismatchException : SystemException
-       {
-               private const int ErrorCode = -2146233032; // = 0x80131538
-
-               public SafeArrayRankMismatchException ()
-                       : base (Locale.GetText ("The incoming SAVEARRAY does not match the rank of the expected managed signature"))
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public SafeArrayRankMismatchException (string message)
-                       : base (message)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public SafeArrayRankMismatchException (string message, Exception inner)
-                       : base (message, inner)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               protected SafeArrayRankMismatchException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/SafeArrayTypeMismatchException.cs b/mcs/class/corlib/System.Runtime.InteropServices/SafeArrayTypeMismatchException.cs
deleted file mode 100644 (file)
index e23c5f6..0000000
+++ /dev/null
@@ -1,65 +0,0 @@
-//
-// System.Runtime.InteropServices.SafeArrayTypeMismatchException.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
-       [ComVisible(true)]
-       [Serializable]
-       public class SafeArrayTypeMismatchException : SystemException
-       {
-               private const int ErrorCode = -2146233037; // = 0x80131533
-
-               public SafeArrayTypeMismatchException ()
-                       : base (Locale.GetText ("The incoming SAVEARRAY does not match the expected managed signature"))
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public SafeArrayTypeMismatchException (string message)
-                       : base (message)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               public SafeArrayTypeMismatchException (string message, Exception inner)
-                       : base (message, inner)
-               {
-                       this.HResult = ErrorCode;
-               }
-
-               protected SafeArrayTypeMismatchException (SerializationInfo info, StreamingContext context)
-                       : base (info, context)
-               {
-               }
-       }
-}
index 305c087a70237b42be089727c7f74099d3cdc16c..b5b59a1ae81ffb3f37822fd47ba5619f08d7469a 100644 (file)
@@ -227,18 +227,5 @@ namespace System.Runtime.InteropServices
                                        ReleaseHandle ();
                        }
                }
-
-               /*
-                * Implement this abstract method in your derived class to specify how to
-                * free the handle. Be careful not write any code that's subject to faults
-                * in this method (the runtime will prepare the infrastructure for you so
-                * that no jit allocations etc. will occur, but don't allocate memory unless
-                * you can deal with the failure and still free the handle).
-                * The boolean returned should be true for success and false if the runtime
-                * should fire a SafeHandleCriticalFailure MDA (CustomerDebugProbe) if that
-                * MDA is enabled.
-                */
-               [ReliabilityContract (Consistency.WillNotCorruptState, Cer.Success)]
-               protected abstract bool ReleaseHandle ();
        }
 }
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/UnknownWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/UnknownWrapper.cs
deleted file mode 100644 (file)
index ae5dda0..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-//
-// System.Runtime.InteropServices.UnknownWrapper.cs
-//
-// Author:
-//   Andreas Nahr (ClassDevelopment@A-SoftTech.com)
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable, ComVisible(true)]
-       public sealed class UnknownWrapper
-       {
-               private object InternalObject;
-
-               public UnknownWrapper (object obj)
-               {
-                       InternalObject = obj;
-               }
-
-               public object WrappedObject {
-                       get { return InternalObject; } 
-               }
-       }
-}
diff --git a/mcs/class/corlib/System.Runtime.InteropServices/VariantWrapper.cs b/mcs/class/corlib/System.Runtime.InteropServices/VariantWrapper.cs
deleted file mode 100644 (file)
index 984cd37..0000000
+++ /dev/null
@@ -1,55 +0,0 @@
-//
-// System.Runtime.InteropServices.VariantWrapper.cs
-//
-// Author:
-//   Gert Driesen (drieseng@users.sourceforge.net)
-//
-// (C) Novell, Inc.  http://www.ximian.com
-//
-
-//
-// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
-//
-// Permission is hereby granted, free of charge, to any person obtaining
-// a copy of this software and associated documentation files (the
-// "Software"), to deal in the Software without restriction, including
-// without limitation the rights to use, copy, modify, merge, publish,
-// distribute, sublicense, and/or sell copies of the Software, and to
-// permit persons to whom the Software is furnished to do so, subject to
-// the following conditions:
-// 
-// The above copyright notice and this permission notice shall be
-// included in all copies or substantial portions of the Software.
-// 
-// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-//
-
-using System;
-
-namespace System.Runtime.InteropServices
-{
-       [Serializable]
-       public sealed class VariantWrapper
-       {
-               private object _wrappedObject;
-
-               public VariantWrapper (object obj)
-               {
-                       _wrappedObject = obj;
-               }
-
-               public object WrappedObject
-               {
-                       get
-                       {
-                               return _wrappedObject;
-                       }
-               }
-       }
-}
index bc424ce5e2d7d40c6d6a12cc4aa88eec2f7eb76f..1b35fe1ee90b75337e05ce72f68a2e9017a9bc7f 100644 (file)
@@ -477,7 +477,7 @@ namespace System.Runtime.Remoting
                public static bool IsMethodOverloaded(IMethodMessage msg)
                {
                        const BindingFlags bfinst = BindingFlags.NonPublic | BindingFlags.Public | BindingFlags.Instance;
-                       MonoType type = (MonoType) msg.MethodBase.DeclaringType;
+                       RuntimeType type = (RuntimeType) msg.MethodBase.DeclaringType;
                        return type.GetMethodsByName (msg.MethodName, bfinst, false, type).Length > 1;
                }
 
index 0952e5528fc7a39b92ed8a268c67f53bd94fc6f6..1db3482d019ccc57b6e6278a032da87be42b94f8 100644 (file)
@@ -57,7 +57,7 @@ namespace System {
                 * of icalls, do not require an increment.
                 */
 #pragma warning disable 169
-               private const int mono_corlib_version = 147;
+               private const int mono_corlib_version = 148;
 #pragma warning restore 169
 
                [ComVisible (true)]
index 76b5b15e0417f6caa8d12149a8569c9e83d6eca3..8894ec98c98a6508329ec496e6dd3248269c1208 100644 (file)
@@ -49,14 +49,14 @@ namespace System
                [ThreadStatic]
                static Dictionary<Type, AttributeUsageAttribute> usage_cache;
 
-               /* Treat as user types all corlib types extending System.Type that are not MonoType and TypeBuilder */
+               /* Treat as user types all corlib types extending System.Type that are not RuntimeType and TypeBuilder */
                static bool IsUserCattrProvider (object obj)
                {
                        Type type = obj as Type;
 #if !FULL_AOT_RUNTIME
-                       if ((type is MonoType) || (type is TypeBuilder))
+                       if ((type is RuntimeType) || (type is TypeBuilder))
 #else
-                       if (type is MonoType)
+                       if (type is RuntimeType)
 #endif
                                return false;
                        if ((obj is Type))
index 0fd8fa7ec75a560f46db6323a72c2fb252bb92d3..f99efb2b7b5b524483c62255adea1614d940676e 100644 (file)
 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 //
 
-using System.Collections.Generic;
-using System.Globalization;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Runtime.CompilerServices;
-using System.Runtime.Serialization;
-using System.Security;
-using System.Diagnostics.Contracts;
-using System.Threading;
-using System.Diagnostics;
-using System.Security.Permissions;
-using System.Runtime.Remoting.Activation;
-using System.Runtime;
-
 namespace System
 {
-       // Contains information about the type which is expensive to compute
-       [StructLayout (LayoutKind.Sequential)]
-       internal class MonoTypeInfo {
-               // this is the displayed form: special characters
-               // ,+*&*[]\ in the identifier portions of the names
-               // have been escaped with a leading backslash (\)
-               public string full_name;
-               public MonoCMethod default_ctor;
-       }
-
-       [Serializable]
-       [StructLayout (LayoutKind.Sequential)]
-       class MonoType : RuntimeType, ISerializable
+       // Dummy type kept because lots of external code uses
+       // this to check whenever it is running on mono.
+       sealed class MonoType : RuntimeType
        {
-               [NonSerialized]
-               MonoTypeInfo type_info;
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               private static extern void type_from_obj (MonoType type, Object obj);
-               
-               internal MonoType (Object obj)
-               {
-                       // this should not be used - lupus
-                       type_from_obj (this, obj);
-                       
-                       throw new NotImplementedException ();
-               }
-
-               internal override MonoCMethod GetDefaultConstructor ()
+               private MonoType ()
                {
-                       MonoCMethod ctor = null;
-                       
-                       if (type_info == null)
-                               type_info = new MonoTypeInfo ();
-                       else
-                               ctor = type_info.default_ctor;
-
-                       if (ctor == null) {
-                               var ctors = GetConstructors (BindingFlags.Public | BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly);
-
-                               for (int i = 0; i < ctors.Length; ++i) {
-                                       if (ctors [i].GetParametersCount () == 0) {
-                                               type_info.default_ctor = ctor = (MonoCMethod) ctors [i];
-                                               break;
-                                       }
-                               }
-                       }
-
-                       return ctor;
-               }
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern MethodInfo GetCorrespondingInflatedMethod (MethodInfo generic);
-
-               [MethodImplAttribute(MethodImplOptions.InternalCall)]
-               extern ConstructorInfo GetCorrespondingInflatedConstructor (ConstructorInfo generic);
-
-               internal override MethodInfo GetMethod (MethodInfo fromNoninstanciated)
-                {
-                       if (fromNoninstanciated == null)
-                               throw new ArgumentNullException ("fromNoninstanciated");
-                        return GetCorrespondingInflatedMethod (fromNoninstanciated);
-                }
-
-               internal override ConstructorInfo GetConstructor (ConstructorInfo fromNoninstanciated)
-               {
-                       if (fromNoninstanciated == null)
-                               throw new ArgumentNullException ("fromNoninstanciated");
-                        return GetCorrespondingInflatedConstructor (fromNoninstanciated);
-               }
-
-               internal override FieldInfo GetField (FieldInfo fromNoninstanciated)
-               {
-                       /* create sensible flags from given FieldInfo */
-                       BindingFlags flags = fromNoninstanciated.IsStatic ? BindingFlags.Static : BindingFlags.Instance;
-                       flags |= fromNoninstanciated.IsPublic ? BindingFlags.Public : BindingFlags.NonPublic;
-                       return GetField (fromNoninstanciated.Name, flags);
-               }
-
-               public override int GetHashCode()
-               {
-                       Type t = UnderlyingSystemType;
-                       if (t != null && t != this)
-                               return t.GetHashCode ();
-                       return (int)_impl.Value;
-               }
-
-               public override string FullName {
-                       get {
-                               string fullName;
-                               // This doesn't need locking
-                               if (type_info == null)
-                                       type_info = new MonoTypeInfo ();
-                               if ((fullName = type_info.full_name) == null)
-                                       fullName = type_info.full_name = getFullName (true, false);
-
-                               return fullName;
-                       }
-               }
-
-               internal override bool IsUserType {
-                       get {
-                               return false;
-                       }
                }
        }
 }
index 479e867f5016a6fb66aca5ba7fb37274cd0fcc88..eb6c42f097648ff77d290c66f24e2a600768da87 100644 (file)
@@ -62,7 +62,7 @@ namespace System
                        if (info == null)
                                throw new ArgumentNullException ("info");
 
-                       MonoType mt = ((MonoType) info.GetValue ("TypeObj", typeof (MonoType)));
+                       RuntimeType mt = ((RuntimeType) info.GetValue ("TypeObj", typeof (RuntimeType)));
                        value = mt.TypeHandle.Value;
                        if (value == IntPtr.Zero)
                                throw new SerializationException (Locale.GetText ("Insufficient state."));
@@ -82,7 +82,7 @@ namespace System
                        if (value == IntPtr.Zero)
                                throw new SerializationException ("Object fields may not be properly initialized");
 
-                       info.AddValue ("TypeObj", Type.GetTypeHandle (this), typeof (MonoType));
+                       info.AddValue ("TypeObj", Type.GetTypeHandle (this), typeof (RuntimeType));
                }
 
                [ReliabilityContractAttribute (Consistency.WillNotCorruptState, Cer.Success)]
index e532913ff24a2632ef221276cea3ef03e1d96367..a869f7191f7daf9d8ba55795b459e8f909b117a2 100644 (file)
@@ -109,7 +109,7 @@ namespace MonoTests.System.Threading
                        }
 
                        // check a class in mscorlib to determine if we're running on Mono
-                       if (Type.GetType ("System.MonoType", false) != null)
+                       if (Type.GetType ("Mono.Runtime", false) != null)
                                is_mono = true;
                }
 
index edf04b13b37720e748afdb0405e91024901f87f2..95f0db7329cb36a446b037c41d2f4f6a1347bf06 100644 (file)
     <Compile Include="..\referencesource\mscorlib\system\runtime\exceptionservices\corruptingexceptioncommon.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\exceptionservices\exceptionnotification.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\exceptionservices\exceptionservicescommon.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\arraywithoffset.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\attributes.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\bstrwrapper.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\callingconvention.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\charset.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\comexception.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\commembertype.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\ibindctx.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\iconnectionpoint.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\iconnectionpointcontainer.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\itypeinfo2.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\itypelib.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ComTypes\itypelib2.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\criticalhandle.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\currencywrapper.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\dispatchwrapper.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\errorwrapper.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\expando\iexpando.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\externalexception.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\handleref.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustomadapter.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustomfactory.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustommarshaler.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\icustomqueryinterface.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\invalidcomobjectexception.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\invalidolevarianttypeexception.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\iregistrationservices.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\layoutkind.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\marshaldirectiveexception.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\objectcreationdelegate.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\runtimeenvironment.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\safearrayrankmismatchexception.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\safearraytypemismatchexception.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\safehandle.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\sehexception.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\ucomienumconnections.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\unknownwrapper.cs" />\r
+    <Compile Include="..\referencesource\mscorlib\system\runtime\interopservices\variantWrapper.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\NgenServicingAttributes.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\remoting\callcontext.cs" />\r
     <Compile Include="..\referencesource\mscorlib\system\runtime\serialization\deserializationeventhandler.cs" />\r
     <Compile Include="System.Runtime.InteropServices\_Thread.cs" />\r
     <Compile Include="System.Runtime.InteropServices\_Type.cs" />\r
     <Compile Include="System.Runtime.InteropServices\_TypeBuilder.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ArrayWithOffset.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\AssemblyRegistrationFlags.cs" />\r
     <Compile Include="System.Runtime.InteropServices\BIND_OPTS.cs" />\r
     <Compile Include="System.Runtime.InteropServices\BINDPTR.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\BStrWrapper.cs" />\r
     <Compile Include="System.Runtime.InteropServices\CALLCONV.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\CallingConvention.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\CharSet.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\COMException.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ComMemberType.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\CriticalHandle.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\CurrencyWrapper.cs" />\r
     <Compile Include="System.Runtime.InteropServices\DESCKIND.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\DispatchWrapper.cs" />\r
     <Compile Include="System.Runtime.InteropServices\DISPPARAMS.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ELEMDESC.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ErrorWrapper.cs" />\r
     <Compile Include="System.Runtime.InteropServices\EXCEPINFO.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ExporterEventKind.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ExtensibleClassFactory.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ExternalException.cs" />\r
     <Compile Include="System.Runtime.InteropServices\FILETIME.cs" />\r
     <Compile Include="System.Runtime.InteropServices\FUNCDESC.cs" />\r
     <Compile Include="System.Runtime.InteropServices\FUNCFLAGS.cs" />\r
     <Compile Include="System.Runtime.InteropServices\FUNCKIND.cs" />\r
     <Compile Include="System.Runtime.InteropServices\GCHandle.cs" />\r
     <Compile Include="System.Runtime.InteropServices\GCHandleType.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\HandleRef.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ICustomAdapter.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ICustomFactory.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ICustomMarshaler.cs" />\r
     <Compile Include="System.Runtime.InteropServices\IDLDESC.cs" />\r
     <Compile Include="System.Runtime.InteropServices\IDLFLAG.cs" />\r
     <Compile Include="System.Runtime.InteropServices\IErrorInfo.cs" />\r
     <Compile Include="System.Runtime.InteropServices\IMPLTYPEFLAGS.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ImporterEventKind.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\InvalidComObjectException.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\InvalidOleVariantTypeException.cs" />\r
     <Compile Include="System.Runtime.InteropServices\INVOKEKIND.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\IRegistrationServices.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ITypeLibConverter.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ITypeLibExporterNameProvider.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ITypeLibExporterNotifySink.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ITypeLibImporterNotifySink.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\LayoutKind.cs" />\r
     <Compile Include="System.Runtime.InteropServices\LIBFLAGS.cs" />\r
     <Compile Include="System.Runtime.InteropServices\ManagedErrorInfo.cs" />\r
     <Compile Include="System.Runtime.InteropServices\Marshal.cs" />\r
     <Compile Include="System.Runtime.InteropServices\MarshalAsAttribute.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\MarshalDirectiveException.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\ObjectCreationDelegate.cs" />\r
     <Compile Include="System.Runtime.InteropServices\PARAMDESC.cs" />\r
     <Compile Include="System.Runtime.InteropServices\PARAMFLAG.cs" />\r
     <Compile Include="System.Runtime.InteropServices\RegistrationClassContext.cs" />\r
     <Compile Include="System.Runtime.InteropServices\RegistrationConnectionType.cs" />\r
     <Compile Include="System.Runtime.InteropServices\RegistrationServices.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\SafeArrayRankMismatchException.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\SafeArrayTypeMismatchException.cs" />\r
     <Compile Include="System.Runtime.InteropServices\SafeBuffer.cs" />\r
     <Compile Include="System.Runtime.InteropServices\SafeHandle.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\SEHException.cs" />\r
     <Compile Include="System.Runtime.InteropServices\STATSTG.cs" />\r
     <Compile Include="System.Runtime.InteropServices\SYSKIND.cs" />\r
     <Compile Include="System.Runtime.InteropServices\TYPEATTR.cs" />\r
     <Compile Include="System.Runtime.InteropServices\UCOMITypeComp.cs" />\r
     <Compile Include="System.Runtime.InteropServices\UCOMITypeInfo.cs" />\r
     <Compile Include="System.Runtime.InteropServices\UCOMITypeLib.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\UnknownWrapper.cs" />\r
     <Compile Include="System.Runtime.InteropServices\VARDESC.cs" />\r
     <Compile Include="System.Runtime.InteropServices\VARFLAGS.cs" />\r
-    <Compile Include="System.Runtime.InteropServices\VariantWrapper.cs" />\r
     <Compile Include="System.Runtime.Remoting.Activation\ActivationServices.cs" />\r
     <Compile Include="System.Runtime.Remoting.Activation\ActivatorLevel.cs" />\r
     <Compile Include="System.Runtime.Remoting.Activation\AppDomainLevelActivator.cs" />\r
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 76f25a22e35de24c0879a6f022c921f3828eda03..a3a002f7cb0cd43effe25a5dd82308730850de6d 100644 (file)
@@ -338,66 +338,41 @@ System.Runtime.InteropServices/_SignatureHelper.cs
 System.Runtime.InteropServices/_Thread.cs
 System.Runtime.InteropServices/_Type.cs
 System.Runtime.InteropServices/_TypeBuilder.cs
-System.Runtime.InteropServices/ArrayWithOffset.cs
-System.Runtime.InteropServices/AssemblyRegistrationFlags.cs
 System.Runtime.InteropServices/BIND_OPTS.cs
 System.Runtime.InteropServices/BINDPTR.cs
-System.Runtime.InteropServices/BStrWrapper.cs
 System.Runtime.InteropServices/CALLCONV.cs
-System.Runtime.InteropServices/CallingConvention.cs
-System.Runtime.InteropServices/CharSet.cs
-System.Runtime.InteropServices/COMException.cs
-System.Runtime.InteropServices/ComMemberType.cs
-System.Runtime.InteropServices/CriticalHandle.cs
-System.Runtime.InteropServices/CurrencyWrapper.cs
 System.Runtime.InteropServices/DESCKIND.cs
-System.Runtime.InteropServices/DispatchWrapper.cs
 System.Runtime.InteropServices/DISPPARAMS.cs
 System.Runtime.InteropServices/ELEMDESC.cs
-System.Runtime.InteropServices/ErrorWrapper.cs
 System.Runtime.InteropServices/EXCEPINFO.cs
 System.Runtime.InteropServices/ExporterEventKind.cs
 System.Runtime.InteropServices/ExtensibleClassFactory.cs
-System.Runtime.InteropServices/ExternalException.cs
 System.Runtime.InteropServices/FILETIME.cs
 System.Runtime.InteropServices/FUNCDESC.cs
 System.Runtime.InteropServices/FUNCFLAGS.cs
 System.Runtime.InteropServices/FUNCKIND.cs
 System.Runtime.InteropServices/GCHandle.cs
 System.Runtime.InteropServices/GCHandleType.cs
-System.Runtime.InteropServices/HandleRef.cs
-System.Runtime.InteropServices/ICustomAdapter.cs
-System.Runtime.InteropServices/ICustomFactory.cs
-System.Runtime.InteropServices/ICustomMarshaler.cs
 System.Runtime.InteropServices/IDLDESC.cs
 System.Runtime.InteropServices/IDLFLAG.cs
 System.Runtime.InteropServices/IErrorInfo.cs
 System.Runtime.InteropServices/IMPLTYPEFLAGS.cs
 System.Runtime.InteropServices/INVOKEKIND.cs
-System.Runtime.InteropServices/IRegistrationServices.cs
 System.Runtime.InteropServices/ITypeLibConverter.cs
 System.Runtime.InteropServices/ITypeLibExporterNameProvider.cs
 System.Runtime.InteropServices/ITypeLibExporterNotifySink.cs
 System.Runtime.InteropServices/ITypeLibImporterNotifySink.cs
 System.Runtime.InteropServices/ImporterEventKind.cs
-System.Runtime.InteropServices/InvalidComObjectException.cs
-System.Runtime.InteropServices/InvalidOleVariantTypeException.cs
 System.Runtime.InteropServices/LIBFLAGS.cs
-System.Runtime.InteropServices/LayoutKind.cs
 System.Runtime.InteropServices/ManagedErrorInfo.cs
 System.Runtime.InteropServices/Marshal.cs
 System.Runtime.InteropServices/MarshalAsAttribute.cs
-System.Runtime.InteropServices/MarshalDirectiveException.cs
-System.Runtime.InteropServices/ObjectCreationDelegate.cs
 System.Runtime.InteropServices/PARAMDESC.cs
 System.Runtime.InteropServices/PARAMFLAG.cs
 System.Runtime.InteropServices/RegistrationClassContext.cs
 System.Runtime.InteropServices/RegistrationConnectionType.cs
-System.Runtime.InteropServices/SEHException.cs
 System.Runtime.InteropServices/STATSTG.cs
 System.Runtime.InteropServices/RegistrationServices.cs
-System.Runtime.InteropServices/SafeArrayRankMismatchException.cs
-System.Runtime.InteropServices/SafeArrayTypeMismatchException.cs
 System.Runtime.InteropServices/SafeBuffer.cs
 System.Runtime.InteropServices/SafeHandle.cs
 System.Runtime.InteropServices/SYSKIND.cs
@@ -423,10 +398,8 @@ System.Runtime.InteropServices/UCOMIStream.cs
 System.Runtime.InteropServices/UCOMITypeComp.cs
 System.Runtime.InteropServices/UCOMITypeInfo.cs
 System.Runtime.InteropServices/UCOMITypeLib.cs
-System.Runtime.InteropServices/UnknownWrapper.cs
 System.Runtime.InteropServices/VARDESC.cs
 System.Runtime.InteropServices/VARFLAGS.cs
-System.Runtime.InteropServices/VariantWrapper.cs
 
 System.Runtime.InteropServices.WindowsRuntime/DefaultInterfaceAttribute.cs
 System.Runtime.InteropServices.WindowsRuntime/DesignerNamespaceResolveEventArgs.cs
@@ -1287,10 +1260,37 @@ ReferenceSources/SecurityContext.cs
 ../referencesource/mscorlib/system/runtime/exceptionservices/exceptionnotification.cs
 ../referencesource/mscorlib/system/runtime/exceptionservices/exceptionservicescommon.cs
 
+../referencesource/mscorlib/system/runtime/interopservices/arraywithoffset.cs
 ../referencesource/mscorlib/system/runtime/interopservices/attributes.cs
+../referencesource/mscorlib/system/runtime/interopservices/bstrwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/callingconvention.cs
+../referencesource/mscorlib/system/runtime/interopservices/charset.cs
+../referencesource/mscorlib/system/runtime/interopservices/comexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/commembertype.cs
+../referencesource/mscorlib/system/runtime/interopservices/criticalhandle.cs
+../referencesource/mscorlib/system/runtime/interopservices/currencywrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/dispatchwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/errorwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/externalexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/handleref.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustomadapter.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustomfactory.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustommarshaler.cs
+../referencesource/mscorlib/system/runtime/interopservices/icustomqueryinterface.cs
+../referencesource/mscorlib/system/runtime/interopservices/invalidcomobjectexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/invalidolevarianttypeexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/iregistrationservices.cs
+../referencesource/mscorlib/system/runtime/interopservices/layoutkind.cs
+../referencesource/mscorlib/system/runtime/interopservices/marshaldirectiveexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/objectcreationdelegate.cs
 ../referencesource/mscorlib/system/runtime/interopservices/runtimeenvironment.cs
+../referencesource/mscorlib/system/runtime/interopservices/safearrayrankmismatchexception.cs
+../referencesource/mscorlib/system/runtime/interopservices/safearraytypemismatchexception.cs
 ../referencesource/mscorlib/system/runtime/interopservices/safehandle.cs
+../referencesource/mscorlib/system/runtime/interopservices/sehexception.cs
 ../referencesource/mscorlib/system/runtime/interopservices/ucomienumconnections.cs
+../referencesource/mscorlib/system/runtime/interopservices/unknownwrapper.cs
+../referencesource/mscorlib/system/runtime/interopservices/variantWrapper.cs
 
 ../referencesource/mscorlib/system/runtime/interopservices/ComTypes/ibindctx.cs
 ../referencesource/mscorlib/system/runtime/interopservices/ComTypes/iconnectionpoint.cs
index 773229202a0bf3d85a8c0cba432f098cfd8f809d..4413f8ae0f791e302a3d0722932ee24dd4019c9c 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 176fef96c62f09214d81dfd1d262182e3f8501a0..5e3d732b8e237f2a3852d83b798ff2b15eb6bea3 100644 (file)
@@ -5028,10 +5028,12 @@ namespace System
             return obj == (object)this;
         }
 
+#if !MONO
         public override int GetHashCode() 
         {
             return RuntimeHelpers.GetHashCode(this);
         }
+#endif
 
 #if !FEATURE_CORECLR
         public static bool operator ==(RuntimeType left, RuntimeType right)
index d6e858960bacb34dc2967830bc6cc2ffac59f49c..73778f3f4b142bf427734ef93fc793657594113e 100644 (file)
@@ -65,10 +65,22 @@ namespace System.Runtime.InteropServices {
             return !(a == b);
         }
 
+#if MONO
+        int CalculateCount()
+        {
+            Array a = m_array as Array;
+            if (a == null)
+                throw new ArgumentException ();
+
+            var total = a.Rank * a.Length;
+            return total - m_offset;
+        }
+#else
         [System.Security.SecurityCritical]  // auto-generated
         [ResourceExposure(ResourceScope.None)]
         [MethodImplAttribute(MethodImplOptions.InternalCall)]
         private extern int CalculateCount();
+#endif
     
         private Object m_array;
         private int    m_offset;
index 308fa38c8402310674d4975f921b155f0bb13651..2c6793f0d15d829aa75937612390bf595ff8e12d 100644 (file)
@@ -206,10 +206,16 @@ public abstract class CriticalHandle : CriticalFinalizerObject, IDisposable
         GC.SuppressFinalize(this);
     }
 
+#if MONO
+    static void FireCustomerDebugProbe()
+    {
+    }
+#else
     [ResourceExposure(ResourceScope.None)]
     [MethodImplAttribute(MethodImplOptions.InternalCall)]
     [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
     private extern void FireCustomerDebugProbe();
+#endif
 
     [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
     protected void SetHandle(IntPtr handle) {
index 3f9b3d38879c29f281cbb8c4b9f71aea6bd577f5..50740031b6196b51f4c4a4759f13bea1b1674cd7 100644 (file)
@@ -12,7 +12,7 @@
 **
 **
 =============================================================================*/
-
+#if !FULL_AOT_RUNTIME
 namespace System.Runtime.InteropServices {
    
     using System;
@@ -51,3 +51,4 @@ namespace System.Runtime.InteropServices {
         private Object m_WrappedObject;
     }
 }
+#endif
\ No newline at end of file
index 694412fd471faf0fd6eb03a415363e7e944e1393..0cf3823868c81c51fd13aeeb4f37ca1b889574ca 100644 (file)
@@ -12,7 +12,7 @@
 **
 **
 =============================================================================*/
-
+#if !FULL_AOT_RUNTIME
 namespace System.Runtime.InteropServices {
    
     using System;
@@ -54,3 +54,4 @@ namespace System.Runtime.InteropServices {
         private int m_ErrorCode;
     }
 }
+#endif
\ No newline at end of file
index 6536f3c77d2dc5806656871a48c6a1d35d654b26..c7610dc3687bf40644b2c6e3645a7ecdb5398ae9 100644 (file)
@@ -276,7 +276,7 @@ public abstract partial class SafeHandle : CriticalFinalizerObject, IDisposable
     [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
     [MethodImplAttribute(MethodImplOptions.InternalCall)]
     public extern void SetHandleAsInvalid();
-
+#endif
     // Implement this abstract method in your derived class to specify how to
     // free the handle. Be careful not write any code that's subject to faults
     // in this method (the runtime will prepare the infrastructure for you so
@@ -287,7 +287,7 @@ public abstract partial class SafeHandle : CriticalFinalizerObject, IDisposable
     // MDA is enabled.
     [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
     protected abstract bool ReleaseHandle();
-
+#if !MONO
     // Add a reason why this handle should not be relinquished (i.e. have
     // ReleaseHandle called on it). This method has dangerous in the name since
     // it must always be used carefully (e.g. called within a CER) to avoid
index 3cb5f677d4b26dc517d32b85672fe3461ef733a2..bb3643e628c59f0dd487f109dd28294b2533aef7 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8ccdc6048167d21446df9c1c1f4bc5e1ecd055e3..e36e17bc2d089ba95f507452f1eb4476e42fba06 100644 (file)
@@ -130,9 +130,8 @@ $(ProjectDir)\..\jay\jay -ct &lt; $(ProjectDir)\..\jay\skeleton.cs $(ProjectDir)
 $(ProjectDir)\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\jay\skeleton.cs $(ProjectDir)\cs-parser.jay > $(ProjectDir)\cs-parser.cs\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 92c8f57f6f221950a8892cad3244819fc2aa6369..23eed1ddb29e9f237ace718da60a5a71f6db7c75 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     <Folder Include="Properties\" />\r
   </ItemGroup>\r
   <ItemGroup>\r
-    <EmbeddedResource Include="Transform.resources">\r
+    <EmbeddedResource Include="Transform.resx">\r
       <LogicalName>NUnit.Util.Transform.resources</LogicalName>\r
     </EmbeddedResource>\r
   </ItemGroup>\r
index 1c6b9d347850882f6bd6db0e76f3e4090d20b090..83cb5607a2e41b979e4c805593641f4627d2554b 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 17c30aa701d09d590e93a149d6607278854a4374..ed6ee53d3849be09e094d8c8987e8eb0c8c562b1 100644 (file)
@@ -68,9 +68,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 1f10b1f1dbd995c0b8b9326b297e83c86ad88b1b..e6b70afdcba4369a7a4ecdb09baea2eb89a16d2d 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0acf13bae72a51f946136a837feec2c7912dd219..93d549db2a077a0030573e6f8cf9f82419d68074 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index af6fe461fb017091bb76e25379ef88d56edbb779..c7352101e5e015f53e45d6a9c4cbc9ed08e20c03 100644 (file)
@@ -72,9 +72,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 283425fdcba98b54cc3d6e07ac31c951c2b40a39..dc02b28ebcb10437a80bcda33a0ca7f9a55aeec7 100644 (file)
@@ -71,9 +71,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 93524351c73e2a528baf6ee2f22d228c3e768e45..fae60ac6a975c31f1e5b200ff265de11e6803773 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index de8e0e938b714a086a902c07c6fbc32a8547f3df..a032cb9bf230fadf6355f10ee48e6ac07f57003e 100644 (file)
@@ -75,9 +75,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 13b211ef6f82a6e579f356d1fa57d435dbf46043..2657ba32963f0bd34039d77c93976da8c731b50f 100644 (file)
@@ -71,9 +71,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 2e65b25556599b0164792ab96164f8e8b5f562b3..40cc077a60fe2237de9af9afc8975635a5f449a8 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a68ba2c6e93071d2f4d9df208a93beb3bbca4006..ef7c94e26a1775d6b45fec208903de06233f35a6 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f32acbaf025ee58108dc1b0d4999f3606c0f9026..69b39b8665abe053fd1ce5a29c940a3e20918f0b 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d1ad68ece44401d5d9882ce0492767e3281ec1dd..fcac823667655241540db30c26a85efff866f638 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9aecb586ec20f4eaf61579621a11fcf9df48afe7..7a24a4cd46a1863b4142b92f75ab495efdde10d2 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 75fa9f231dc941b5c85525b89ee1df08646c0faa..f33343cf5e6ebf08b04253e00df407d6df093393 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 85124b57703556d86bbd485acee9f2e3e0f48af4..22ebee6b91de23e5fedadfe4aca0d5bd1b3f156b 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 95e678069b123c261649fdd60f34f8bfb4ee7462..5fcf051eccfd77fdf17f66ecda420adea0893e56 100644 (file)
@@ -67,9 +67,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 71c7097d0077661b012d0dcb7c1244f2b60a3363..1da92c6446f91a190544a38785d58861cbee36a1 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 54549acb43e4aed4c5973b8032c245dffa70483d..c28f23987fcefec757b937845481b8ebe524463c 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f846bfba6fc9764572804f67287cca003a08fb60..28c7350a7c95ef0f55ade2a1a785e2cfc2a900cd 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ae747a2deb1afc40f01454d678f20a5c0f3964eb..4d15a18b0e9200cfd4431aba39e22241984a82ce 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index cbad50967717b22005207f8ec1e69aaf7f6bea79..01da80aef2a12309fc8c123653817e9414e96448 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 20db328a8af770f21de63e10fa40cf34b6092414..fb1472e31a3e280e4fd0c6ad4daeff130b542f04 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 84ac75ad8a9a338aedd7b785ed27002557a61266..508aee2f63b8809b1a3c395b65e24bdff7352d26 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bbde4e73c934f2501b20ba361b7b7fe478c4c41d..7c3ce2b390a7111af0811ec2649f88d0bdaacc23 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8be8be14c97f9f5e9a8c4ad7e02c0411fec9912f..f8aa6becff009e0dcfece71045761a8231257b6a 100644 (file)
@@ -80,9 +80,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bcc2fae33aec5795fbd2d8c09f6ea106c92cc8ad..2dfe29a9fa23cf5c6f99f7ddfc90143b2f319f12 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d836e6dcf5dcfb744784d863aa8d4b52dc15caab..01cd3e394e3ef1f9be3fe5423bc3377b20729234 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ce1500aa710b86ebefa2e6851fcb33b41d7d543e..2c8b983ec80361220d93fd99f10066c3bc2a28fe 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 24bb7435759cd7d3990c9cce6f609653a111b2d4..c417ab01240d00cfaf6f12f99339d9df3647f10f 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 80d259a2355f7068d273bf819cb95ff380249cad..cfff038a83180de83a050e8ef3cf71352ff92d37 100644 (file)
@@ -89,9 +89,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index e8c7b70322c6845f98fc71aa5598e185cd465a34..7d1897587fe4b05a0060720fa1fd32666d7ed0fd 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 975f95d5aa1a3e89632be2f8cc137d472ea9c366..fe3428355ae091f27df07fb1a0b24cb74d35ec41 100644 (file)
@@ -83,9 +83,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index ccc17d9e157696cdf1440fb46639d54ee4eb81ac..31f5f4795db9f1253db4ca688d58a0fdec746ba6 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index eb05940a7b4f533cabb7c6ae3721cb91325698c3..17a06f060891da064887df3eab273b3662e1a723 100644 (file)
@@ -82,9 +82,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6b0488a8b380ccd71cea3789eb036e9580d4ffeb..d8ea3865287329a901f2ff209de6d760d85386d8 100644 (file)
@@ -70,9 +70,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f49fdf37419d7f50ad42375219994af690da941a..ad6b3cdb6f7f042af085c6259ebd40c197137980 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index bbfb5b190ba17dbf90685bb262f147013b45aca4..904e60cd013cd2e206b5ccb682ce0a64e63c3df7 100644 (file)
@@ -77,9 +77,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 597190e44212e53b76578ef90342f6ad131fbfde..30aa8d24d05f25349eee168088262798ed01b5ac 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a8ea4d074e282c48e3976319a13f5886fbfb15c6..53a205e88542fdfec979d9744923fcccc960b7fc 100644 (file)
@@ -68,9 +68,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index afc722ab8fdef0227a0ab0393cfd172076ab9603..0969190f2e3e149e4e77fee92128084a5bd20ea2 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index fea8988e6e64ecda3fb48cc1d8c203f53e6f81ac..7c9c21434c0c1521b12622537999ccd1bd938b38 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 0eff964f908ff7cae22103937faf3bd25648d0e7..b147f4866415d828e994703500372f05b750025a 100644 (file)
@@ -65,9 +65,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index eff49f6ab7c8f2a5e42ca6f69206cf77807ccbe9..6aa1cc35a1226279787c4bf35fa2a93e9d5e2302 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f17ba300947c5ebb1cf9e934dc8ee7db04f0d53c..d5f58360be6ba77590a8d426cc0c61e728e66d78 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index b04f7e843679569ba439c48cac87d4038bd3a231..35ca4e79637f49eeaacf88c7c9cc3ce0ebc4fef9 100644 (file)
@@ -77,9 +77,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index a061ad02ba8c1ecbf89d389da6f97b67d5fa6e20..4228feb10cfc9dd4400cf2c0304ed7f8d6c455dd 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index c36ec5380c2832efbf022494dd64e2e6e688f9e0..94a03d663e6e02df1c869f91a0869c4cbed95537 100644 (file)
@@ -88,9 +88,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 316457af6d6591602614bc5f570cfb9bf9edd59c..fef287ac0901dbf844782504e03650b799b5e022 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 4b2c3e3c88dac1fcc3b21d12ce7300e79c28c446..90679a7418624d880f598b0c654a0da6304c0095 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 8953d634d61df56dbc2f6e3a06fb05d19302ac80..117a92802b906d3fab1af01815789b0619d9390e 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index d582f68a05325d02d108b85887d647031fedd1c7..048153eee248817194fc46d37b367b48fd2a386d 100644 (file)
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 9725c1a22789e2790ebd3659fbe2b8e5c90c6e84..81e68230553252a3bfb7b98a1ac9bc6b3aa9ed0e 100644 (file)
@@ -63,9 +63,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 6c917d61156da13d6b022d36506b18f2dbef90d0..ad7320b3108770e61cd4f605cd11d7d2c597f715 100644 (file)
@@ -66,9 +66,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 98345781be95a1380a5d8ade9c40fe770fdea155..0afcefa783ca784755c8749329a4bfe58c15d520 100644 (file)
@@ -75,9 +75,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index 947efba7ba0f05336ce413131b82a84b06591973..72659db89401563655154dfe935af7591ab178d6 100644 (file)
@@ -64,9 +64,8 @@
     <PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
     </PreBuildEvent>\r
-\r
-    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">\r
-\r
+    <PostBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">
+
     </PostBuildEvent>\r
     <PostBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">\r
 \r
index f9d5ca86615b98d6dadce36fe88ce46dbd7f43cd..bea93366ec988a3bffd8a9cc9d7ed18049147b22 100644 (file)
                        Text="OutDir property must end with a slash."/>
        </Target>
 
-       <Target Name="PrepareForBuild">
+       <PropertyGroup>
+               <PrepareForBuildDependsOn>AssignLinkMetadata</PrepareForBuildDependsOn>
+       </PropertyGroup>
+       <Target Name="PrepareForBuild" DependsOnTargets="$(PrepareForBuildDependsOn)">
                <Message Importance="High" Text="Configuration: $(Configuration) Platform: $(Platform)"/>
 
                <!-- Look for app.config, if $(AppConfig) is specified, then use that. Else look in
                />
        </Target>
 
+       <Target Name="AssignLinkMetadata">
+           <AssignLinkMetadata Items="@(EmbeddedResource)" Condition="'@(EmbeddedResource)' != '' and '%(EmbeddedResource.DefiningProjectFullPath)' != '$(MSBuildProjectFullPath)'">
+             <Output TaskParameter="OutputItems" ItemName="_EmbeddedResourceWithLinkAssigned" />
+           </AssignLinkMetadata>
+
+           <ItemGroup>
+               <EmbeddedResource Remove="@(_EmbeddedResourceWithLinkAssigned)" />
+               <EmbeddedResource Include="@(_EmbeddedResourceWithLinkAssigned)" />
+               <_EmbeddedResourceWithLinkAssigned Remove="@(_EmbeddedResourceWithLinkAssigned)" />
+           </ItemGroup>
+       </Target>
+
        <PropertyGroup>
                <GetFrameworkPathsDependsOn />
        </PropertyGroup>
index 192b8dabad308835480287a1f379517897fac766..54d9caab7776019ecd1d560fa414a52bb97c7f2f 100644 (file)
@@ -1,6 +1,7 @@
 <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" >
        <UsingTask TaskName="Microsoft.Build.Tasks.AL"                  AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <UsingTask TaskName="Microsoft.Build.Tasks.AssignTargetPath"    AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
+       <UsingTask TaskName="Microsoft.Build.Tasks.AssignLinkMetadata"  AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <UsingTask TaskName="Microsoft.Build.Tasks.AssignCulture"       AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <UsingTask TaskName="Microsoft.Build.Tasks.AssignProjectConfiguration"  AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
        <UsingTask TaskName="Microsoft.Build.Tasks.CallTarget"          AssemblyName="Microsoft.Build.Tasks.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
index a86b2be374115316ab024a42aec3dcc8d91de75a..6cf7a6ee4849095e487731d457a148da72f361af 100644 (file)
 <opcode name="mono_ldptr_nursery_start" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x16" flow="next" />
 <opcode name="mono_ldptr_nursery_bits" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x17" flow="next" />
 <opcode name="mono_calli_extra_arg" input="VarPop" output="VarPush" args="InlineSig" o1="0xF0" o2="0x18" flow="call" />
+<opcode name="mono_lddomain" input="Pop0" output="PushI" args="InlineNone" o1="0xF0" o2="0x19" flow="next" />
 </opdesc>
index ad89c95e46c2245750c5c2d275fcce1c671f12ab..620289b0595658678f712e042e0a1ccde5f23e84 100644 (file)
@@ -317,6 +317,7 @@ OPDEF(CEE_MONO_LDPTR_CARD_TABLE, "mono_ldptr_card_table", Pop0, PushI, InlineNon
 OPDEF(CEE_MONO_LDPTR_NURSERY_START, "mono_ldptr_nursery_start", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x16, NEXT)
 OPDEF(CEE_MONO_LDPTR_NURSERY_BITS, "mono_ldptr_nursery_bits", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x17, NEXT)
 OPDEF(CEE_MONO_CALLI_EXTRA_ARG, "mono_calli_extra_arg", VarPop, VarPush, InlineSig, X, 2, 0xF0, 0x18, CALL)
+OPDEF(CEE_MONO_LDDOMAIN, "mono_lddomain", Pop0, PushI, InlineNone, X, 2, 0xF0, 0x19, NEXT)
 #ifndef OPALIAS
 #define _MONO_CIL_OPALIAS_DEFINED_
 #define OPALIAS(a,s,r)
index 774151fa5b94ec1f68243e0de603818e873a8064..26096cb1e6f27187bccbeb3a17b3e07a0eb54d01 100644 (file)
@@ -81,7 +81,7 @@
  * Changes which are already detected at runtime, like the addition
  * of icalls, do not require an increment.
  */
-#define MONO_CORLIB_VERSION 147
+#define MONO_CORLIB_VERSION 148
 
 typedef struct
 {
@@ -706,6 +706,7 @@ mono_domain_set (MonoDomain *domain, gboolean force)
 MonoObject *
 ves_icall_System_AppDomain_GetData (MonoAppDomain *ad, MonoString *name)
 {
+       MonoError error;
        MonoDomain *add;
        MonoObject *o;
        char *str;
@@ -716,7 +717,9 @@ ves_icall_System_AppDomain_GetData (MonoAppDomain *ad, MonoString *name)
        add = ad->data;
        g_assert (add);
 
-       str = mono_string_to_utf8 (name);
+       str = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
 
        mono_domain_lock (add);
 
@@ -959,7 +962,9 @@ ves_icall_System_AppDomain_createDomain (MonoString *friendly_name, MonoAppDomai
 #else
        char *fname;
 
-       fname = mono_string_to_utf8 (friendly_name);
+       fname = mono_string_to_utf8_checked (friendly_name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        ad = mono_domain_create_appdomain_internal (fname, setup, &error);
 
        g_free (fname);
@@ -2029,7 +2034,9 @@ ves_icall_System_Reflection_Assembly_LoadFrom (MonoString *fname, MonoBoolean re
                return NULL;
        }
                
-       name = filename = mono_string_to_utf8 (fname);
+       name = filename = mono_string_to_utf8_checked (fname, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        
        ass = mono_assembly_open_full (filename, &status, refOnly);
        
@@ -2106,7 +2113,9 @@ ves_icall_System_AppDomain_LoadAssembly (MonoAppDomain *ad,  MonoString *assRef,
 
        g_assert (assRef);
 
-       name = mono_string_to_utf8 (assRef);
+       name = mono_string_to_utf8_checked (assRef, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        parsed = mono_assembly_name_parse (name, &aname);
        g_free (name);
 
@@ -2439,12 +2448,8 @@ unload_thread_main (void *arg)
 
        /* Have to attach to the runtime so shutdown can wait for this thread */
        /* Force it to be attached to avoid racing during shutdown. */
-       thread = mono_thread_attach_full (mono_get_root_domain (), TRUE, &error);
-       if (!is_ok (&error)) {
-               data->failure_reason = g_strdup (mono_error_get_message (&error));
-               mono_error_cleanup (&error);
-               goto failure;
-       }
+       thread = mono_thread_attach_full (mono_get_root_domain (), TRUE);
+
        mono_thread_set_name_internal (thread->internal_thread, mono_string_new (mono_get_root_domain (), "Domain unloader"), TRUE, &error);
        if (!is_ok (&error)) {
                data->failure_reason = g_strdup (mono_error_get_message (&error));
index 7f2b5fdb6a62e11741c63c09f4ba5098835219de..57ce86ba71f257f532f6f5a9572d276764acf685 100644 (file)
@@ -2888,6 +2888,7 @@ get_per_domain_assembly_binding_info (MonoDomain *domain, MonoAssemblyName *anam
 static MonoAssemblyName*
 mono_assembly_apply_binding (MonoAssemblyName *aname, MonoAssemblyName *dest_name)
 {
+       MonoError error;
        MonoAssemblyBindingInfo *info, *info2;
        MonoImage *ppimage;
        MonoDomain *domain;
@@ -2918,7 +2919,9 @@ mono_assembly_apply_binding (MonoAssemblyName *aname, MonoAssemblyName *dest_nam
        if (domain && domain->setup && domain->setup->configuration_file) {
                mono_domain_lock (domain);
                if (!domain->assembly_bindings_parsed) {
-                       gchar *domain_config_file_name = mono_string_to_utf8 (domain->setup->configuration_file);
+                       gchar *domain_config_file_name = mono_string_to_utf8_checked (domain->setup->configuration_file, &error);
+                       mono_error_raise_exception (&error); /* FIXME don't raise here */
+
                        gchar *domain_config_file_path = mono_portability_find_file (domain_config_file_name, TRUE);
 
                        if (!domain_config_file_path)
index 1e7404d4e0ca4f35fa84f5ce47c475a9b3694ef0..b8f4aca8f8e091ad0aad3cd9c60628a61c5a5327 100644 (file)
@@ -905,7 +905,7 @@ typedef struct {
 
 extern MonoStats mono_stats;
 
-typedef gpointer (*MonoRemotingTrampoline)       (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target);
+typedef gpointer (*MonoRemotingTrampoline)       (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target, MonoError *error);
 typedef gpointer (*MonoDelegateTrampoline)       (MonoDomain *domain, MonoClass *klass);
 
 typedef gboolean (*MonoGetCachedClassInfo) (MonoClass *klass, MonoCachedClassInfo *res);
@@ -1097,7 +1097,6 @@ typedef struct {
        MonoClass *fieldhandle_class;
        MonoClass *methodhandle_class;
        MonoClass *systemtype_class;
-       MonoClass *monotype_class;
        MonoClass *runtimetype_class;
        MonoClass *exception_class;
        MonoClass *threadabortexception_class;
index d500fb626ce2a66029d2687aa1ffbd3888ed6f88..889c19ece4f786221a020fc365cebe41983b7734 100644 (file)
@@ -1984,8 +1984,7 @@ cominterop_get_ccw_checked (MonoObject* object, MonoClass* itf, MonoError *error
                g_hash_table_insert (ccw_hash, GINT_TO_POINTER (mono_object_hash (object)), ccw_list);
                mono_cominterop_unlock ();
                /* register for finalization to clean up ccw */
-               mono_object_register_finalizer (object, error);
-               return_val_if_nok (error, NULL);
+               mono_object_register_finalizer (object);
        }
 
        cinfo = mono_custom_attrs_from_class_checked (itf, error);
index 6123396fa8d4b94af71c605ba1102cfcdeeb5f49..38a82c92e957f3cb76cde6f66bd2031f6009c881 100644 (file)
@@ -498,13 +498,21 @@ ves_icall_System_ConsoleDriver_TtySetup (MonoString *keypad, MonoString *teardow
        if (setup_finished)
                return TRUE;
 
-       keypad_xmit_str = keypad != NULL ? mono_string_to_utf8 (keypad) : NULL;
+       keypad_xmit_str = NULL;
+       if (keypad != NULL) {
+               keypad_xmit_str = mono_string_to_utf8_checked (keypad, &error);
+               if (mono_error_set_pending_exception (&error))
+                       return FALSE;
+       }
        
        console_set_signal_handlers ();
        setup_finished = TRUE;
        if (!atexit_called) {
-               if (teardown != NULL)
-                       teardown_str = mono_string_to_utf8 (teardown);
+               if (teardown != NULL) {
+                       teardown_str = mono_string_to_utf8_checked (teardown, &error);
+                       if (mono_error_set_pending_exception (&error))
+                               return FALSE;
+               }
 
                mono_atexit (tty_teardown);
        }
index baf79f6be9709502aa442df5fe76f9570e73719a..9e933a64bb4b6605e3d8134042d10f6f9c5bea82 100644 (file)
@@ -444,10 +444,6 @@ mono_method_desc_match (MonoMethodDesc *desc, MonoMethod *method)
        gboolean name_match;
 
        name_match = strcmp (desc->name, method->name) == 0;
-#ifndef _EGLIB_MAJOR
-       if (!name_match && desc->name_glob)
-               name_match = g_pattern_match_simple (desc->name, method->name);
-#endif
        if (!name_match)
                return FALSE;
        if (!desc->args)
@@ -922,6 +918,7 @@ print_name_space (MonoClass *klass)
 void
 mono_object_describe (MonoObject *obj)
 {
+       MonoError error;
        MonoClass* klass;
        const char* sep;
        if (!obj) {
@@ -930,7 +927,8 @@ mono_object_describe (MonoObject *obj)
        }
        klass = mono_object_class (obj);
        if (klass == mono_defaults.string_class) {
-               char *utf8 = mono_string_to_utf8 ((MonoString*)obj);
+               char *utf8 = mono_string_to_utf8_checked ((MonoString*)obj, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                if (strlen (utf8) > 60) {
                        utf8 [57] = '.';
                        utf8 [58] = '.';
index 26ab2d2d9b55a1d96d1d3360ecb4c6c484779824..a3ba4a76e0492b35533b95791df77c3eab1a235c 100644 (file)
@@ -707,9 +707,6 @@ mono_init_internal (const char *filename, const char *exe_filename, const char *
        mono_defaults.systemtype_class = mono_class_load_from_name (
                 mono_defaults.corlib, "System", "Type");
 
-       mono_defaults.monotype_class = mono_class_load_from_name (
-                mono_defaults.corlib, "System", "MonoType");
-
        mono_defaults.runtimetype_class = mono_class_load_from_name (
                 mono_defaults.corlib, "System", "RuntimeType");
 
@@ -1054,7 +1051,7 @@ unregister_vtable_reflection_type (MonoVTable *vtable)
 {
        MonoObject *type = (MonoObject *)vtable->type;
 
-       if (type->vtable->klass != mono_defaults.monotype_class)
+       if (type->vtable->klass != mono_defaults.runtimetype_class)
                MONO_GC_UNREGISTER_ROOT_IF_MOVING (vtable->type);
 }
 
index 0ee01d806d2675dcbed94d83deefe255c12820ff..df5cbe2acfbc3f195310d92628751ae354f8c865 100644 (file)
@@ -461,15 +461,16 @@ incremental_find_check_match (IncrementalFind *handle, WIN32_FIND_DATA *data, Mo
 MonoString *
 ves_icall_System_IO_MonoIO_FindFirst (MonoString *path,
                                      MonoString *path_with_pattern,
-                                     gint32 *result_attr, gint32 *error,
+                                     gint32 *result_attr, gint32 *ioerror,
                                      gpointer *handle)
 {
+       MonoError error;
        WIN32_FIND_DATA data;
        HANDLE find_handle;
        IncrementalFind *ifh;
        MonoString *result;
        
-       *error = ERROR_SUCCESS;
+       *ioerror = ERROR_SUCCESS;
        
        find_handle = FindFirstFile (mono_string_chars (path_with_pattern), &data);
        
@@ -480,13 +481,15 @@ ves_icall_System_IO_MonoIO_FindFirst (MonoString *path,
                if (find_error == ERROR_FILE_NOT_FOUND) 
                        return NULL;
                
-               *error = find_error;
+               *ioerror = find_error;
                return NULL;
        }
 
        ifh = g_new (IncrementalFind, 1);
        ifh->find_handle = find_handle;
-       ifh->utf8_path = mono_string_to_utf8 (path);
+       ifh->utf8_path = mono_string_to_utf8_checked (path, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        ifh->domain = mono_domain_get ();
        *handle = ifh;
 
@@ -494,7 +497,7 @@ ves_icall_System_IO_MonoIO_FindFirst (MonoString *path,
                if (FindNextFile (find_handle, &data) == FALSE){
                        int e = GetLastError ();
                        if (e != ERROR_NO_MORE_FILES)
-                               *error = e;
+                               *ioerror = e;
                        return NULL;
                }
        }
@@ -1233,9 +1236,11 @@ void ves_icall_System_IO_MonoIO_Unlock (HANDLE handle, gint64 position,
 gint64
 mono_filesize_from_path (MonoString *string)
 {
+       MonoError error;
        struct stat buf;
        gint64 res;
-       char *path = mono_string_to_utf8 (string);
+       char *path = mono_string_to_utf8_checked (string, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
 
        MONO_ENTER_GC_SAFE;
        if (stat (path, &buf) == -1)
index efa5547f6e485fa3a5f81522dc9fddc2153194c9..201c724a8f5d32a8a2c63c85b702f92d03762cd7 100644 (file)
@@ -227,13 +227,19 @@ is_special_zero_size_file (struct stat *buf)
 XXX implement options
 */
 static void*
-open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int access, int options, int *error)
+open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int access, int options, int *ioerror)
 {
+       MonoError error;
        struct stat buf;
-       char *c_path = path ? mono_string_to_utf8 (path) : NULL;
+       char *c_path = NULL;
        MmapHandle *handle = NULL;
        int result, fd;
 
+       if (path) {
+               c_path = mono_string_to_utf8_checked (path, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
+       }
+
        if (path)
                result = stat (c_path, &buf);
        else
@@ -241,13 +247,13 @@ open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int a
 
        if (mode == FILE_MODE_TRUNCATE || mode == FILE_MODE_APPEND || mode == FILE_MODE_OPEN) {
                if (result == -1) { //XXX translate errno?
-                       *error = FILE_NOT_FOUND;
+                       *ioerror = FILE_NOT_FOUND;
                        goto done;
                }
        }
 
        if (mode == FILE_MODE_CREATE_NEW && result == 0) {
-               *error = FILE_ALREADY_EXISTS;
+               *ioerror = FILE_ALREADY_EXISTS;
                goto done;
        }
 
@@ -258,17 +264,17 @@ open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int a
                         * also makes little sense, so don't do the check if th file is one of these.
                         */
                        if (buf.st_size == 0 && !is_special_zero_size_file (&buf)) {
-                               *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+                               *ioerror = CAPACITY_SMALLER_THAN_FILE_SIZE;
                                goto done;
                        }
                        *capacity = buf.st_size;
                } else if (*capacity < buf.st_size) {
-                       *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+                       *ioerror = CAPACITY_SMALLER_THAN_FILE_SIZE;
                        goto done;
                }
        } else {
                if (mode == FILE_MODE_CREATE_NEW && *capacity == 0) {
-                       *error = CAPACITY_SMALLER_THAN_FILE_SIZE;
+                       *ioerror = CAPACITY_SMALLER_THAN_FILE_SIZE;
                        goto done;
                }
        }
@@ -279,7 +285,7 @@ open_file_map (MonoString *path, int input_fd, int mode, gint64 *capacity, int a
                fd = dup (input_fd);
 
        if (fd == -1) { //XXX translate errno?
-               *error = COULD_NOT_OPEN;
+               *ioerror = COULD_NOT_OPEN;
                goto done;
        }
 
@@ -299,27 +305,29 @@ done:
 
 #define MONO_ANON_FILE_TEMPLATE "/mono.anonmap.XXXXXXXXX"
 static void*
-open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *error)
+open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, int options, int *ioerror)
 {
+       MonoError error;
        char *c_mapName;
        MmapHandle *handle;
        if (*capacity <= 1) {
-               *error = CAPACITY_MUST_BE_POSITIVE;
+               *ioerror = CAPACITY_MUST_BE_POSITIVE;
                return NULL;
        }
 
        if (!(mode == FILE_MODE_CREATE_NEW || mode == FILE_MODE_OPEN_OR_CREATE || mode == FILE_MODE_OPEN)) {
-               *error = INVALID_FILE_MODE;
+               *ioerror = INVALID_FILE_MODE;
                return NULL;
        }
 
-       c_mapName = mono_string_to_utf8 (mapName);
+       c_mapName = mono_string_to_utf8_checked (mapName, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
 
        named_regions_lock ();
        handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
        if (handle) {
                if (mode == FILE_MODE_CREATE_NEW) {
-                       *error = FILE_ALREADY_EXISTS;
+                       *ioerror = FILE_ALREADY_EXISTS;
                        goto done;
                }
 
@@ -332,7 +340,7 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in
                int unused G_GNUC_UNUSED, alloc_size;
 
                if (mode == FILE_MODE_OPEN) {
-                       *error = FILE_NOT_FOUND;
+                       *ioerror = FILE_NOT_FOUND;
                        goto done;
                }
                *capacity = align_up_to_page_size (*capacity);
@@ -340,7 +348,7 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in
                tmp_dir = g_get_tmp_dir ();
                alloc_size = strlen (tmp_dir) + strlen (MONO_ANON_FILE_TEMPLATE) + 1;
                if (alloc_size > 1024) {//rather fail that stack overflow
-                       *error = COULD_NOT_MAP_MEMORY;
+                       *ioerror = COULD_NOT_MAP_MEMORY;
                        goto done;
                }
                file_name = (char *)alloca (alloc_size);
@@ -349,7 +357,7 @@ open_memory_map (MonoString *mapName, int mode, gint64 *capacity, int access, in
 
                fd = mkstemp (file_name);
                if (fd == -1) {
-                       *error = COULD_NOT_MAP_MEMORY;
+                       *ioerror = COULD_NOT_MAP_MEMORY;
                        goto done;
                }
 
@@ -375,24 +383,26 @@ done:
 
 
 void *
-mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *capacity, int access, int options, int *ioerror)
 {
+       MonoError error;
        g_assert (path || mapName);
 
        if (!mapName)
-               return open_file_map (path, -1, mode, capacity, access, options, error);
+               return open_file_map (path, -1, mode, capacity, access, options, ioerror);
 
        if (path) {
                MmapHandle *handle;
-               char *c_mapName = mono_string_to_utf8 (mapName);
+               char *c_mapName = mono_string_to_utf8_checked (mapName, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
 
                named_regions_lock ();
                handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
                if (handle) {
-                       *error = FILE_ALREADY_EXISTS;
+                       *ioerror = FILE_ALREADY_EXISTS;
                        handle = NULL;
                } else {
-                       handle = (MmapHandle *)open_file_map (path, -1, mode, capacity, access, options, error);
+                       handle = (MmapHandle *)open_file_map (path, -1, mode, capacity, access, options, ioerror);
                        if (handle) {
                                handle->name = g_strdup (c_mapName);
                                g_hash_table_insert (named_regions, handle->name, handle);
@@ -404,26 +414,28 @@ mono_mmap_open_file (MonoString *path, int mode, MonoString *mapName, gint64 *ca
                return handle;
        }
 
-       return open_memory_map (mapName, mode, capacity, access, options, error);
+       return open_memory_map (mapName, mode, capacity, access, options, ioerror);
 }
 
 void *
-mono_mmap_open_handle (void *input_fd, MonoString *mapName, gint64 *capacity, int access, int options, int *error)
+mono_mmap_open_handle (void *input_fd, MonoString *mapName, gint64 *capacity, int access, int options, int *ioerror)
 {
+       MonoError error;
        MmapHandle *handle;
        if (!mapName) {
-               handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
+               handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, ioerror);
        } else {
-               char *c_mapName = mono_string_to_utf8 (mapName);
+               char *c_mapName = mono_string_to_utf8_checked (mapName, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
 
                named_regions_lock ();
                handle = (MmapHandle*)g_hash_table_lookup (named_regions, c_mapName);
                if (handle) {
-                       *error = FILE_ALREADY_EXISTS;
+                       *ioerror = FILE_ALREADY_EXISTS;
                        handle = NULL;
                } else {
                        //XXX we're exploiting wapi HANDLE == FD equivalence. THIS IS FRAGILE, create a _wapi_handle_to_fd call
-                       handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, error);
+                       handle = (MmapHandle *)open_file_map (NULL, GPOINTER_TO_INT (input_fd), FILE_MODE_OPEN, capacity, access, options, ioerror);
                        handle->name = g_strdup (c_mapName);
                        g_hash_table_insert (named_regions, handle->name, handle);
                }
index d87e158776704977c890c70bbce699ab8854ff53..e6902c6caa394157f7ec2c223980bc84f42df8cd 100644 (file)
@@ -149,13 +149,16 @@ ves_icall_System_IO_InotifyWatcher_GetInotifyInstance ()
 int
 ves_icall_System_IO_InotifyWatcher_AddWatch (int fd, MonoString *name, gint32 mask)
 {
+       MonoError error;
        char *str, *path;
        int retval;
 
        if (name == NULL)
                return -1;
 
-       str = mono_string_to_utf8 (name);
+       str = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return -1;
        path = mono_portability_find_file (str, TRUE);
        if (!path)
                path = str;
index 52d950d8cca7b8469db99a3f95dcd751d6a24f4b..ff44969a81de215b72e081ea7567b8a3fdcda1f7 100644 (file)
@@ -66,7 +66,7 @@
 /* useful until we keep track of gc-references in corlib etc. */
 #define IS_GC_REFERENCE(class,t) (mono_gc_is_moving () ? FALSE : ((t)->type == MONO_TYPE_U && (class)->image == mono_defaults.corlib))
 
-void   mono_object_register_finalizer               (MonoObject  *obj, MonoError *error);
+void   mono_object_register_finalizer               (MonoObject  *obj);
 void   ves_icall_System_GC_InternalCollect          (int          generation);
 gint64 ves_icall_System_GC_GetTotalMemory           (MonoBoolean  forceCollection);
 void   ves_icall_System_GC_KeepAlive                (MonoObject  *obj);
index 51b9306fc67c984693ab0f09f7a2499ef55ca3a6..79293d97b9910f8440b5d69e627551a27a031c2a 100644 (file)
@@ -73,7 +73,7 @@ static MonoCoopCond exited_cond;
 
 static MonoInternalThread *gc_thread;
 
-static void object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*), MonoError *error);
+static void object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*));
 
 static void reference_queue_proccess_all (void);
 static void mono_reference_queue_cleanup (void);
@@ -92,16 +92,16 @@ guarded_wait (HANDLE handle, guint32 timeout, gboolean alertable)
        return result;
 }
 
-static void
-add_thread_to_finalize (MonoInternalThread *thread)
+static gboolean
+add_thread_to_finalize (MonoInternalThread *thread, MonoError *error)
 {
-       MonoError error;
+       mono_error_init (error);
        mono_finalizer_lock ();
        if (!threads_to_finalize)
                MONO_GC_REGISTER_ROOT_SINGLE (threads_to_finalize, MONO_ROOT_SOURCE_FINALIZER_QUEUE, "finalizable threads list");
-       threads_to_finalize = mono_mlist_append_checked (threads_to_finalize, (MonoObject*)thread, &error);
+       threads_to_finalize = mono_mlist_append_checked (threads_to_finalize, (MonoObject*)thread, error);
        mono_finalizer_unlock ();
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       return is_ok (error);
 }
 
 static gboolean suspend_finalizers = FALSE;
@@ -166,8 +166,7 @@ mono_gc_run_finalize (void *obj, void *data)
 #endif
 
        /* make sure the finalizer is not called again if the object is resurrected */
-       object_register_finalizer ((MonoObject *)obj, NULL, &error);
-       mono_error_assert_ok (&error); /* FIXME don't swallow the error */
+       object_register_finalizer ((MonoObject *)obj, NULL);
 
        if (log_finalizers)
                g_log ("mono-gc-finalizers", G_LOG_LEVEL_MESSAGE, "<%s at %p> Registered finalizer as processed.", o->vtable->klass->name, o);
@@ -183,7 +182,8 @@ mono_gc_run_finalize (void *obj, void *data)
                        /* Don't finalize threadpool threads when
                           shutting down - they're finalized when the
                           threadpool shuts down. */
-                       add_thread_to_finalize (t);
+                       if (!add_thread_to_finalize (t, &error))
+                               goto unhandled_error;
                        return;
                }
        }
@@ -251,7 +251,8 @@ mono_gc_run_finalize (void *obj, void *data)
        runtime_invoke = (RuntimeInvokeFunction)domain->finalize_runtime_invoke;
 
        mono_runtime_class_init_full (o->vtable, &error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       if (!is_ok (&error))
+               goto unhandled_error;
 
        if (G_UNLIKELY (MONO_GC_FINALIZE_INVOKE_ENABLED ())) {
                MONO_GC_FINALIZE_INVOKE ((unsigned long)o, mono_object_get_size (o),
@@ -266,6 +267,9 @@ mono_gc_run_finalize (void *obj, void *data)
        if (log_finalizers)
                g_log ("mono-gc-finalizers", G_LOG_LEVEL_MESSAGE, "<%s at %p> Returned from finalizer.", o->vtable->klass->name, o);
 
+unhandled_error:
+       if (!is_ok (&error))
+               exc = (MonoObject*)mono_error_convert_to_exception (&error);
        if (exc)
                mono_thread_internal_unhandled_exception (exc);
 
@@ -275,14 +279,12 @@ mono_gc_run_finalize (void *obj, void *data)
 void
 mono_gc_finalize_threadpool_threads (void)
 {
-       MonoError error;
        while (threads_to_finalize) {
                MonoInternalThread *thread = (MonoInternalThread*) mono_mlist_get_data (threads_to_finalize);
 
                /* Force finalization of the thread. */
                thread->threadpool_thread = FALSE;
-               mono_object_register_finalizer ((MonoObject*)thread, &error);
-               mono_error_assert_ok (&error); /* FIXME don't swallow the error */
+               mono_object_register_finalizer ((MonoObject*)thread);
 
                mono_gc_run_finalize (thread, NULL);
 
@@ -312,16 +314,11 @@ mono_gc_out_of_memory (size_t size)
  * since that, too, can cause the underlying pointer to be offset.
  */
 static void
-object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*), MonoError *error)
+object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*))
 {
        MonoDomain *domain;
 
-       mono_error_init (error);
-
-       if (obj == NULL) {
-               mono_error_set_argument_null (error, "obj", "");
-               return;
-       }
+       g_assert (obj != NULL);
 
        domain = obj->vtable->domain;
 
@@ -363,10 +360,10 @@ object_register_finalizer (MonoObject *obj, void (*callback)(void *, void*), Mon
  * 
  */
 void
-mono_object_register_finalizer (MonoObject *obj, MonoError *error)
+mono_object_register_finalizer (MonoObject *obj)
 {
        /* g_print ("Registered finalizer on %p %s.%s\n", obj, mono_object_class (obj)->name_space, mono_object_class (obj)->name); */
-       object_register_finalizer (obj, mono_gc_run_finalize, error);
+       object_register_finalizer (obj, mono_gc_run_finalize);
 }
 
 /**
@@ -486,19 +483,14 @@ ves_icall_System_GC_KeepAlive (MonoObject *obj)
 void
 ves_icall_System_GC_ReRegisterForFinalize (MonoObject *obj)
 {
-       MonoError error;
-
        MONO_CHECK_ARG_NULL (obj,);
 
-       object_register_finalizer (obj, mono_gc_run_finalize, &error);
-       mono_error_set_pending_exception (&error);
+       object_register_finalizer (obj, mono_gc_run_finalize);
 }
 
 void
 ves_icall_System_GC_SuppressFinalize (MonoObject *obj)
 {
-       MonoError error;
-
        MONO_CHECK_ARG_NULL (obj,);
 
        /* delegates have no finalizers, but we register them to deal with the
@@ -512,8 +504,7 @@ ves_icall_System_GC_SuppressFinalize (MonoObject *obj)
         * generated for it that needs cleaned up, but user wants to suppress
         * their derived object finalizer. */
 
-       object_register_finalizer (obj, NULL, &error);
-       mono_error_set_pending_exception (&error);
+       object_register_finalizer (obj, NULL);
 }
 
 void
@@ -1122,18 +1113,18 @@ mono_gc_reference_queue_new (mono_reference_queue_callback callback)
 gboolean
 mono_gc_reference_queue_add (MonoReferenceQueue *queue, MonoObject *obj, void *user_data)
 {
-       MonoError error;
        RefQueueEntry *entry;
        if (queue->should_be_deleted)
                return FALSE;
 
+       g_assert (obj != NULL);
+
        entry = g_new0 (RefQueueEntry, 1);
        entry->user_data = user_data;
        entry->domain = mono_object_domain (obj);
 
        entry->gchandle = mono_gchandle_new_weakref (obj, TRUE);
-       mono_object_register_finalizer (obj, &error);
-       mono_error_assert_ok (&error);
+       mono_object_register_finalizer (obj);
 
        ref_list_push (&queue->queue, entry);
        return TRUE;
index c659b843ce27cddc9d068c12de977128c45fef2d..e50dae52ae78539cc9d84b980d53eaad8c026f8f 100644 (file)
@@ -398,11 +398,6 @@ ICALL(MCATTR_1, "GetCustomAttributesDataInternal", ves_icall_MonoCustomAttrs_Get
 ICALL(MCATTR_2, "GetCustomAttributesInternal", custom_attrs_get_by_type)
 ICALL(MCATTR_3, "IsDefinedInternal", custom_attrs_defined_internal)
 
-ICALL_TYPE(MTYPE, "System.MonoType", MTYPE_1)
-ICALL(MTYPE_1, "GetCorrespondingInflatedConstructor", ves_icall_MonoType_GetCorrespondingInflatedMethod)
-ICALL(MTYPE_2, "GetCorrespondingInflatedMethod", ves_icall_MonoType_GetCorrespondingInflatedMethod)
-ICALL(MTYPE_3, "type_from_obj", ves_icall_MonoType_type_from_obj)
-
 #ifndef DISABLE_SOCKETS
 ICALL_TYPE(NDNS, "System.Net.Dns", NDNS_1)
 ICALL(NDNS_1, "GetHostByAddr_internal(string,string&,string[]&,string[]&)", ves_icall_System_Net_Dns_GetHostByAddr_internal)
@@ -737,32 +732,34 @@ ICALL(MHAN_1, "GetFunctionPointer", ves_icall_RuntimeMethodHandle_GetFunctionPoi
 
 ICALL_TYPE(RT, "System.RuntimeType", RT_1)
 ICALL(RT_1, "CreateInstanceInternal", ves_icall_System_Activator_CreateInstanceInternal)
-ICALL(RT_2, "GetConstructors_internal", ves_icall_Type_GetConstructors_internal)
-ICALL(RT_3, "GetEvents_internal", ves_icall_Type_GetEvents_internal)
-ICALL(RT_5, "GetFields_internal", ves_icall_Type_GetFields_internal)
-ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_MonoType_GetGenericArguments)
-ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_Type_GetGenericParameterAttributes)
-ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_Type_GetGenericParameterConstraints)
-ICALL(RT_9, "GetGenericParameterPosition", ves_icall_Type_GetGenericParameterPosition)
-ICALL(RT_10, "GetInterfaceMapData", ves_icall_Type_GetInterfaceMapData)
-ICALL(RT_11, "GetInterfaces", ves_icall_Type_GetInterfaces)
-ICALL(RT_12, "GetMethodsByName", ves_icall_Type_GetMethodsByName)
-ICALL(RT_13, "GetNestedTypes_internal", ves_icall_Type_GetNestedTypes)
-ICALL(RT_14, "GetPacking", ves_icall_Type_GetPacking)
-ICALL(RT_15, "GetPropertiesByName", ves_icall_Type_GetPropertiesByName)
+ICALL(RT_2, "GetConstructors_internal", ves_icall_RuntimeType_GetConstructors_internal)
+ICALL(RT_30, "GetCorrespondingInflatedConstructor", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
+ICALL(RT_31, "GetCorrespondingInflatedMethod", ves_icall_RuntimeType_GetCorrespondingInflatedMethod)
+ICALL(RT_3, "GetEvents_internal", ves_icall_RuntimeType_GetEvents_internal)
+ICALL(RT_5, "GetFields_internal", ves_icall_RuntimeType_GetFields_internal)
+ICALL(RT_6, "GetGenericArgumentsInternal", ves_icall_RuntimeType_GetGenericArguments)
+ICALL(RT_7, "GetGenericParameterAttributes", ves_icall_RuntimeType_GetGenericParameterAttributes)
+ICALL(RT_8, "GetGenericParameterConstraints_impl", ves_icall_RuntimeType_GetGenericParameterConstraints)
+ICALL(RT_9, "GetGenericParameterPosition", ves_icall_RuntimeType_GetGenericParameterPosition)
+ICALL(RT_10, "GetInterfaceMapData", ves_icall_RuntimeType_GetInterfaceMapData)
+ICALL(RT_11, "GetInterfaces", ves_icall_RuntimeType_GetInterfaces)
+ICALL(RT_12, "GetMethodsByName", ves_icall_RuntimeType_GetMethodsByName)
+ICALL(RT_13, "GetNestedTypes_internal", ves_icall_RuntimeType_GetNestedTypes)
+ICALL(RT_14, "GetPacking", ves_icall_RuntimeType_GetPacking)
+ICALL(RT_15, "GetPropertiesByName", ves_icall_RuntimeType_GetPropertiesByName)
 ICALL(RT_16, "GetTypeCodeImplInternal", ves_icall_type_GetTypeCodeInternal)
 ICALL(RT_28, "IsTypeExportedToWindowsRuntime", ves_icall_System_RuntimeType_IsTypeExportedToWindowsRuntime)
 ICALL(RT_29, "IsWindowsRuntimeObjectType", ves_icall_System_RuntimeType_IsWindowsRuntimeObjectType)
-ICALL(RT_17, "MakeGenericType", ves_icall_Type_MakeGenericType)
-ICALL(RT_18, "MakePointerType", ves_icall_Type_MakePointerType)
+ICALL(RT_17, "MakeGenericType", ves_icall_RuntimeType_MakeGenericType)
+ICALL(RT_18, "MakePointerType", ves_icall_RuntimeType_MakePointerType)
 ICALL(RT_19, "getFullName", ves_icall_System_MonoType_getFullName)
-ICALL(RT_21, "get_DeclaringMethod", ves_icall_MonoType_get_DeclaringMethod)
-ICALL(RT_22, "get_DeclaringType", ves_icall_MonoType_get_DeclaringType)
-ICALL(RT_23, "get_Name", ves_icall_MonoType_get_Name)
-ICALL(RT_24, "get_Namespace", ves_icall_MonoType_get_Namespace)
-ICALL(RT_25, "get_core_clr_security_level", vell_icall_MonoType_get_core_clr_security_level)
-ICALL(RT_26, "make_array_type", ves_icall_Type_make_array_type)
-ICALL(RT_27, "make_byref_type", ves_icall_Type_make_byref_type)
+ICALL(RT_21, "get_DeclaringMethod", ves_icall_RuntimeType_get_DeclaringMethod)
+ICALL(RT_22, "get_DeclaringType", ves_icall_RuntimeType_get_DeclaringType)
+ICALL(RT_23, "get_Name", ves_icall_RuntimeType_get_Name)
+ICALL(RT_24, "get_Namespace", ves_icall_RuntimeType_get_Namespace)
+ICALL(RT_25, "get_core_clr_security_level", vell_icall_RuntimeType_get_core_clr_security_level)
+ICALL(RT_26, "make_array_type", ves_icall_RuntimeType_make_array_type)
+ICALL(RT_27, "make_byref_type", ves_icall_RuntimeType_make_byref_type)
 
 ICALL_TYPE(RTH, "System.RuntimeTypeHandle", RTH_1)
 ICALL(RTH_1, "GetArrayRank", ves_icall_RuntimeTypeHandle_GetArrayRank)
index e60d9b3b27e47902c30d162e3c08e9c429dfdaca..e8ab22e843ba4d407624233854a7ae7a191bbc64 100644 (file)
@@ -1210,13 +1210,6 @@ ves_icall_System_Object_GetType (MonoObject *obj)
        return ret;
 }
 
-ICALL_EXPORT void
-ves_icall_MonoType_type_from_obj (MonoReflectionType *mtype, MonoObject *obj)
-{
-       mtype->type = &obj->vtable->klass->byval_arg;
-       g_assert (mtype->type->type);
-}
-
 ICALL_EXPORT gint32
 ves_icall_ModuleBuilder_getToken (MonoReflectionModuleBuilder *mb, MonoObject *obj, gboolean create_open_instance)
 {
@@ -1477,31 +1470,41 @@ ves_icall_System_Type_internal_from_name (MonoString *name,
                                                                                  MonoBoolean ignoreCase)
 {
        MonoError error;
-       char *str = mono_string_to_utf8 (name);
        MonoTypeNameParse info;
-       MonoReflectionType *type;
+       MonoReflectionType *type = NULL;
        gboolean parsedOk;
 
+       char *str = mono_string_to_utf8_checked (name, &error);
+       if (!is_ok (&error))
+               goto leave;
+
        parsedOk = mono_reflection_parse_type (str, &info);
 
        /* mono_reflection_parse_type() mangles the string */
        if (!parsedOk) {
                mono_reflection_free_type_info (&info);
-               if (throwOnError) {
-                       mono_error_init (&error);
+               if (throwOnError)
                        mono_error_set_argument (&error, "typeName", "failed parse: %s", str);
-                       mono_error_set_pending_exception (&error);
-               }
-               g_free (str);
-               return NULL;
+               goto leave;
        }
 
        type = type_from_parsed_name (&info, ignoreCase, &error);
 
        mono_reflection_free_type_info (&info);
-       g_free (str);
 
-       if (!mono_error_ok (&error)) {
+       if (!is_ok (&error))
+               goto leave;
+
+       if (type == NULL){
+               if (throwOnError) {
+                       mono_error_set_type_load_name (&error, g_strdup (str), NULL, "");
+                       goto leave;
+               }
+       }
+       
+leave:
+       g_free (str);
+       if (!is_ok (&error)) {
                if (throwOnError)
                        mono_error_set_pending_exception (&error);
                else
@@ -1509,18 +1512,6 @@ ves_icall_System_Type_internal_from_name (MonoString *name,
                return NULL;
        }
 
-       if (type == NULL){
-               MonoException *e = NULL;
-               
-               if (throwOnError)
-                       e = mono_get_exception_type_load (name, NULL);
-
-               if (e) {
-                       mono_set_pending_exception (e);
-                       return NULL;
-               }
-       }
-       
        return type;
 }
 
@@ -2401,7 +2392,7 @@ get_interfaces_hash (gconstpointer v1)
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetInterfaces (MonoReflectionType* type)
+ves_icall_RuntimeType_GetInterfaces (MonoReflectionType* type)
 {
        MonoError error;
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2432,14 +2423,14 @@ ves_icall_Type_GetInterfaces (MonoReflectionType* type)
        if (len == 0) {
                g_hash_table_destroy (iface_hash);
                if (!data.domain->empty_types) {
-                       data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.monotype_class, 0, &error);
+                       data.domain->empty_types = mono_array_new_cached (data.domain, mono_defaults.runtimetype_class, 0, &error);
                        if (!is_ok (&error))
                                goto fail;
                }
                return data.domain->empty_types;
        }
 
-       data.iface_array = mono_array_new_cached (data.domain, mono_defaults.monotype_class, len, &error);
+       data.iface_array = mono_array_new_cached (data.domain, mono_defaults.runtimetype_class, len, &error);
        if (!is_ok (&error))
                goto fail;
        g_hash_table_foreach (iface_hash, fill_iface_array, &data);
@@ -2456,7 +2447,7 @@ fail:
 }
 
 ICALL_EXPORT void
-ves_icall_Type_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType *iface, MonoArray **targets, MonoArray **methods)
+ves_icall_RuntimeType_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType *iface, MonoArray **targets, MonoArray **methods)
 {
        gboolean variance_used;
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2507,7 +2498,7 @@ ves_icall_Type_GetInterfaceMapData (MonoReflectionType *type, MonoReflectionType
 }
 
 ICALL_EXPORT void
-ves_icall_Type_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *size)
+ves_icall_RuntimeType_GetPacking (MonoReflectionType *type, guint32 *packing, guint32 *size)
 {
        MonoError error;
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2641,7 +2632,7 @@ ves_icall_RuntimeTypeHandle_GetAssembly (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoReflectionType*
-ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
+ves_icall_RuntimeType_get_DeclaringType (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -2670,7 +2661,7 @@ ves_icall_MonoType_get_DeclaringType (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoString*
-ves_icall_MonoType_get_Name (MonoReflectionType *type)
+ves_icall_RuntimeType_get_Name (MonoReflectionType *type)
 {
        MonoDomain *domain = mono_domain_get (); 
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2688,7 +2679,7 @@ ves_icall_MonoType_get_Name (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoString*
-ves_icall_MonoType_get_Namespace (MonoReflectionType *type)
+ves_icall_RuntimeType_get_Namespace (MonoReflectionType *type)
 {
        MonoDomain *domain = mono_domain_get (); 
        MonoClass *klass = mono_class_from_mono_type (type->type);
@@ -2724,7 +2715,7 @@ create_type_array (MonoDomain *domain, MonoBoolean runtimeTypeArray, int count,
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_MonoType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
+ves_icall_RuntimeType_GetGenericArguments (MonoReflectionType *type, MonoBoolean runtimeTypeArray)
 {
        MonoError error;
        MonoReflectionType *rt;
@@ -2816,7 +2807,7 @@ ves_icall_RuntimeTypeHandle_GetGenericTypeDefinition_impl (MonoReflectionType *t
 }
 
 ICALL_EXPORT MonoReflectionType*
-ves_icall_Type_MakeGenericType (MonoReflectionType *type, MonoArray *type_array)
+ves_icall_RuntimeType_MakeGenericType (MonoReflectionType *type, MonoArray *type_array)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -2874,7 +2865,7 @@ ves_icall_RuntimeTypeHandle_HasInstantiation (MonoReflectionType *type)
 }
 
 ICALL_EXPORT gint32
-ves_icall_Type_GetGenericParameterPosition (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterPosition (MonoReflectionType *type)
 {
        if (!IS_MONOTYPE (type))
                return -1;
@@ -2885,7 +2876,7 @@ ves_icall_Type_GetGenericParameterPosition (MonoReflectionType *type)
 }
 
 ICALL_EXPORT GenericParameterAttributes
-ves_icall_Type_GetGenericParameterAttributes (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterAttributes (MonoReflectionType *type)
 {
        g_assert (IS_MONOTYPE (type));
        g_assert (is_generic_parameter (type->type));
@@ -2893,7 +2884,7 @@ ves_icall_Type_GetGenericParameterAttributes (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoArray *
-ves_icall_Type_GetGenericParameterConstraints (MonoReflectionType *type)
+ves_icall_RuntimeType_GetGenericParameterConstraints (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *rt;
@@ -2910,7 +2901,7 @@ ves_icall_Type_GetGenericParameterConstraints (MonoReflectionType *type)
        for (count = 0, ptr = param_info->constraints; ptr && *ptr; ptr++, count++)
                ;
 
-       res = mono_array_new_checked (domain, mono_defaults.monotype_class, count, &error);
+       res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, &error);
        if (mono_error_set_pending_exception (&error))
                return NULL;
        for (i = 0; i < count; i++) {
@@ -2945,7 +2936,7 @@ ves_icall_EnumBuilder_setup_enum_type (MonoReflectionType *enumtype,
 }
 
 ICALL_EXPORT MonoReflectionMethod*
-ves_icall_MonoType_GetCorrespondingInflatedMethod (MonoReflectionType *type, 
+ves_icall_RuntimeType_GetCorrespondingInflatedMethod (MonoReflectionType *type, 
                                                    MonoReflectionMethod* generic)
 {
        MonoDomain *domain; 
@@ -2975,7 +2966,7 @@ ves_icall_MonoType_GetCorrespondingInflatedMethod (MonoReflectionType *type,
 }
 
 ICALL_EXPORT MonoReflectionMethod *
-ves_icall_MonoType_get_DeclaringMethod (MonoReflectionType *ref_type)
+ves_icall_RuntimeType_get_DeclaringMethod (MonoReflectionType *ref_type)
 {
        MonoMethod *method;
        MonoType *type = ref_type->type;
@@ -3345,7 +3336,9 @@ ves_icall_InternalExecute (MonoReflectionMethod *method, MonoObject *this_arg, M
                        }
                        
                        name = mono_array_get (params, MonoString *, 1);
-                       str = mono_string_to_utf8 (name);
+                       str = mono_string_to_utf8_checked (name, &error);
+                       if (mono_error_set_pending_exception (&error))
+                               return NULL;
                
                        do {
                                MonoClassField* field = mono_class_get_field_from_name (k, str);
@@ -3388,7 +3381,9 @@ ves_icall_InternalExecute (MonoReflectionMethod *method, MonoObject *this_arg, M
                        }
                        
                        name = mono_array_get (params, MonoString *, 1);
-                       str = mono_string_to_utf8 (name);
+                       str = mono_string_to_utf8_checked (name, &error);
+                       if (mono_error_set_pending_exception (&error))
+                               return NULL;
                
                        do {
                                MonoClassField* field = mono_class_get_field_from_name (k, str);
@@ -3776,7 +3771,7 @@ enum {
 };
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetFields_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
 {
        MonoError error;
        MonoDomain *domain; 
@@ -3840,7 +3835,9 @@ handle_parent:
 
                if (name != NULL) {
                        if (utf8_name == NULL) {
-                               utf8_name = mono_string_to_utf8 (name);
+                               utf8_name = mono_string_to_utf8_checked (name, &error);
+                               if (!is_ok (&error))
+                                       goto fail;
                                compare_func = (bflags & BFLAGS_IgnoreCase) ? mono_utf8_strcasecmp : strcmp;
                        }
 
@@ -4003,7 +4000,7 @@ loader_error:
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetMethodsByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
 {
        static MonoClass *MethodInfo_array;
        MonoError error;
@@ -4039,8 +4036,11 @@ ves_icall_Type_GetMethodsByName (MonoReflectionType *type, MonoString *name, gui
                return res;
        }
 
-       if (name)
-               mname = mono_string_to_utf8 (name);
+       if (name) {
+               mname = mono_string_to_utf8_checked (name, &error);
+               if (mono_error_set_pending_exception (&error))
+                   return NULL;
+       }
 
        method_array = mono_class_get_methods_by_name (klass, mname, bflags, ignore_case, FALSE, &ex);
        g_free ((char*)mname);
@@ -4071,7 +4071,7 @@ failure:
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetConstructors_internal (MonoReflectionType *type, guint32 bflags, MonoReflectionType *reftype)
 {
        MonoDomain *domain; 
        MonoClass *startklass, *klass, *refklass;
@@ -4207,7 +4207,7 @@ property_accessor_nonpublic (MonoMethod* accessor, gboolean start_klass)
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetPropertiesByName (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoBoolean ignore_case, MonoReflectionType *reftype)
 {
        MonoError error;
        MonoDomain *domain; 
@@ -4237,7 +4237,9 @@ ves_icall_Type_GetPropertiesByName (MonoReflectionType *type, MonoString *name,
        klass = startklass = mono_class_from_mono_type (type->type);
 
        if (name != NULL) {
-               propname = mono_string_to_utf8 (name);
+               propname = mono_string_to_utf8_checked (name, &error);
+               if (mono_error_set_pending_exception (&error))
+                       return NULL;
                compare_func = (ignore_case) ? mono_utf8_strcasecmp : strcmp;
        }
 
@@ -4350,7 +4352,7 @@ event_equal (MonoEvent *event1, MonoEvent *event2)
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
+ves_icall_RuntimeType_GetEvents_internal (MonoReflectionType *type, MonoString *name, guint32 bflags, MonoReflectionType *reftype)
 {
        MonoError error;
        MonoDomain *domain; 
@@ -4426,7 +4428,9 @@ handle_parent:
 
                if (name != NULL) {
                        if (utf8_name == NULL) {
-                               utf8_name = mono_string_to_utf8 (name);
+                               utf8_name = mono_string_to_utf8_checked (name, &error);
+                               if (!is_ok (&error))
+                                       goto failure;
                                compare_func = (bflags & BFLAGS_IgnoreCase) ? mono_utf8_strcasecmp : strcmp;
                        }
 
@@ -4483,7 +4487,7 @@ failure:
 }
 
 ICALL_EXPORT MonoArray*
-ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint32 bflags)
+ves_icall_RuntimeType_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint32 bflags)
 {
        MonoError error;
        MonoReflectionType *rt;
@@ -4500,7 +4504,7 @@ ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint
 
        domain = ((MonoObject *)type)->vtable->domain;
        if (type->type->byref) {
-               MonoArray *result = mono_array_new_cached (domain, mono_defaults.monotype_class, 0, &error);
+               MonoArray *result = mono_array_new_cached (domain, mono_defaults.runtimetype_class, 0, &error);
                mono_error_set_pending_exception (&error);
                return result;
        }
@@ -4534,7 +4538,9 @@ ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint
 
                if (name != NULL) {
                        if (str == NULL) {
-                               str = mono_string_to_utf8 (name);
+                               str = mono_string_to_utf8_checked (name, &error);
+                               if (!is_ok (&error))
+                                       goto leave;
                                mono_identifier_unescape_type_name_chars (str);
                        }
 
@@ -4549,7 +4555,7 @@ ves_icall_Type_GetNestedTypes (MonoReflectionType *type, MonoString *name, guint
                mono_ptr_array_append (tmp_array, (MonoObject*) rt);
        }
 
-       res = mono_array_new_cached (domain, mono_defaults.monotype_class, mono_ptr_array_size (tmp_array), &error);
+       res = mono_array_new_cached (domain, mono_defaults.runtimetype_class, mono_ptr_array_size (tmp_array), &error);
        if (!is_ok (&error))
                goto leave;
 
@@ -4577,7 +4583,9 @@ ves_icall_System_Reflection_Assembly_InternalGetType (MonoReflectionAssembly *as
 
        /* On MS.NET, this does not fire a TypeResolve event */
        type_resolve = TRUE;
-       str = mono_string_to_utf8 (name);
+       str = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        /*g_print ("requested type %s in %s\n", str, assembly->assembly->aname.name);*/
        if (!mono_reflection_parse_type (str, &info)) {
                g_free (str);
@@ -4790,7 +4798,9 @@ ves_icall_System_Reflection_Assembly_load_with_partial_name (MonoString *mname,
        MonoImageOpenStatus status;
        MonoReflectionAssembly* result = NULL;
        
-       name = mono_string_to_utf8 (mname);
+       name = mono_string_to_utf8_checked (mname, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        res = mono_assembly_load_with_partial_name (name, &status);
 
        g_free (name);
@@ -5037,7 +5047,6 @@ ICALL_EXPORT void *
 ves_icall_System_Reflection_Assembly_GetManifestResourceInternal (MonoReflectionAssembly *assembly, MonoString *name, gint32 *size, MonoReflectionModule **ref_module) 
 {
        MonoError error;
-       char *n = mono_string_to_utf8 (name);
        MonoTableInfo *table = &assembly->assembly->image->tables [MONO_TABLE_MANIFESTRESOURCE];
        guint32 i;
        guint32 cols [MONO_MANIFEST_SIZE];
@@ -5045,6 +5054,10 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceInternal (MonoReflection
        const char *val;
        MonoImage *module;
 
+       char *n = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
+
        for (i = 0; i < table->rows; ++i) {
                mono_metadata_decode_row (table, i, cols, MONO_MANIFEST_SIZE);
                val = mono_metadata_string_heap (assembly->assembly->image, cols [MONO_MANIFEST_NAME]);
@@ -5091,7 +5104,9 @@ ves_icall_System_Reflection_Assembly_GetManifestResourceInfoInternal (MonoReflec
        const char *val;
        char *n;
 
-       n = mono_string_to_utf8 (name);
+       n = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
        for (i = 0; i < table->rows; ++i) {
                mono_metadata_decode_row (table, i, cols, MONO_MANIFEST_SIZE);
                val = mono_metadata_string_heap (assembly->assembly->image, cols [MONO_MANIFEST_NAME]);
@@ -5163,7 +5178,10 @@ ves_icall_System_Reflection_Assembly_GetFilesInternal (MonoReflectionAssembly *a
 
        /* check hash if needed */
        if (name) {
-               n = mono_string_to_utf8 (name);
+               n = mono_string_to_utf8_checked (name, &error);
+               if (mono_error_set_pending_exception (&error))
+                       return NULL;
+
                for (i = 0; i < table->rows; ++i) {
                        val = mono_metadata_string_heap (assembly->assembly->image, mono_metadata_decode_row_col (table, i, MONO_FILE_NAME));
                        if (strcmp (val, n) == 0) {
@@ -5454,7 +5472,7 @@ ves_icall_System_MonoType_getFullName (MonoReflectionType *object, gboolean full
 }
 
 ICALL_EXPORT int
-vell_icall_MonoType_get_core_clr_security_level (MonoReflectionType *rfield)
+vell_icall_RuntimeType_get_core_clr_security_level (MonoReflectionType *rfield)
 {
        MonoError error;
        MonoClass *klass = mono_class_from_mono_type (rfield->type);
@@ -5643,7 +5661,9 @@ ves_icall_System_Reflection_Assembly_InternalGetAssemblyName (MonoString *fname,
        MonoAssemblyName name;
        char *dirname;
 
-       filename = mono_string_to_utf8 (fname);
+       filename = mono_string_to_utf8_checked (fname, &error);
+       if (mono_error_set_pending_exception (&error))
+               return;
 
        dirname = g_path_get_dirname (filename);
        replace_shadow_path (mono_domain_get (), dirname, &filename);
@@ -5743,7 +5763,7 @@ mono_module_get_types (MonoDomain *domain, MonoImage *image, MonoArray **excepti
        } else {
                count = tdef->rows - 1;
        }
-       res = mono_array_new_checked (domain, mono_defaults.monotype_class, count, error);
+       res = mono_array_new_checked (domain, mono_defaults.runtimetype_class, count, error);
        return_val_if_nok (error, NULL);
        *exceptions = mono_array_new_checked (domain, mono_defaults.exception_class, count, error);
        return_val_if_nok (error, NULL);
@@ -5810,14 +5830,14 @@ ves_icall_System_Reflection_Assembly_GetTypes (MonoReflectionAssembly *assembly,
                                        len1 = mono_array_length (res);
                                        len2 = mono_array_length (res2);
 
-                                       res3 = mono_array_new_checked (domain, mono_defaults.monotype_class, len1 + len2, &error);
+                                       res3 = mono_array_new_checked (domain, mono_defaults.runtimetype_class, len1 + len2, &error);
                                        if (mono_error_set_pending_exception (&error))
                                                return NULL;
                                        mono_array_memcpy_refs (res3, 0, res, 0, len1);
                                        mono_array_memcpy_refs (res3, len1, res2, 0, len2);
                                        res = res3;
 
-                                       ex3 = mono_array_new_checked (domain, mono_defaults.monotype_class, len1 + len2, &error);
+                                       ex3 = mono_array_new_checked (domain, mono_defaults.runtimetype_class, len1 + len2, &error);
                                        if (mono_error_set_pending_exception (&error))
                                                return NULL;
                                        mono_array_memcpy_refs (ex3, 0, exceptions, 0, len1);
@@ -5904,7 +5924,10 @@ ves_icall_System_Reflection_AssemblyName_ParseName (MonoReflectionAssemblyName *
        gboolean is_token_defined;
 
        aname.public_key = NULL;
-       val = mono_string_to_utf8 (assname);
+       val = mono_string_to_utf8_checked (assname, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
+
        if (!mono_assembly_name_parse_full (val, &aname, TRUE, &is_version_defined, &is_token_defined)) {
                g_free ((guint8*) aname.public_key);
                g_free (val);
@@ -6005,7 +6028,7 @@ ves_icall_System_Reflection_Module_InternalGetTypes (MonoReflectionModule *modul
        int i;
 
        if (!module->image) {
-               MonoArray *arr = mono_array_new_checked (mono_object_domain (module), mono_defaults.monotype_class, 0, &error);
+               MonoArray *arr = mono_array_new_checked (mono_object_domain (module), mono_defaults.runtimetype_class, 0, &error);
                mono_error_set_pending_exception (&error);
                return arr;
        } else {
@@ -6368,8 +6391,10 @@ ves_icall_ModuleBuilder_create_modified_type (MonoReflectionTypeBuilder *tb, Mon
        MonoReflectionType *ret;
        MonoClass *klass;
        int isbyref = 0, rank;
-       char *str = mono_string_to_utf8 (smodifiers);
        char *p;
+       char *str = mono_string_to_utf8_checked (smodifiers, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
 
        klass = mono_class_from_mono_type (tb->type.type);
        p = str;
@@ -6460,7 +6485,7 @@ check_for_invalid_type (MonoClass *klass, MonoError *error)
 
 }
 ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_make_array_type (MonoReflectionType *type, int rank)
+ves_icall_RuntimeType_make_array_type (MonoReflectionType *type, int rank)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -6482,7 +6507,7 @@ ves_icall_Type_make_array_type (MonoReflectionType *type, int rank)
 }
 
 ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_make_byref_type (MonoReflectionType *type)
+ves_icall_RuntimeType_make_byref_type (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -6504,7 +6529,7 @@ ves_icall_Type_make_byref_type (MonoReflectionType *type)
 }
 
 ICALL_EXPORT MonoReflectionType *
-ves_icall_Type_MakePointerType (MonoReflectionType *type)
+ves_icall_RuntimeType_MakePointerType (MonoReflectionType *type)
 {
        MonoError error;
        MonoReflectionType *ret;
@@ -6733,17 +6758,15 @@ ves_icall_Remoting_RealProxy_GetTransparentProxy (MonoObject *this_obj, MonoStri
        }
 
        tp->custom_type_info = (mono_object_isinst_checked (this_obj, mono_defaults.iremotingtypeinfo_class, &error) != NULL);
-       if (!is_ok (&error)) {
-               mono_error_set_pending_exception (&error);
+       if (mono_error_set_pending_exception (&error))
                return NULL;
-       }
        tp->remote_class = mono_remote_class (domain, class_name, klass, &error);
-       if (!is_ok (&error)) {
-               mono_error_set_pending_exception (&error);
+       if (mono_error_set_pending_exception (&error))
                return NULL;
-       }
 
-       res->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tp->remote_class, rp);
+       res->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tp->remote_class, rp, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        return res;
 }
 
@@ -6869,13 +6892,16 @@ ves_icall_System_Environment_GetIs64BitOperatingSystem (void)
 ICALL_EXPORT MonoString *
 ves_icall_System_Environment_GetEnvironmentVariable (MonoString *name)
 {
+       MonoError error;
        const gchar *value;
        gchar *utf8_name;
 
        if (name == NULL)
                return NULL;
 
-       utf8_name = mono_string_to_utf8 (name); /* FIXME: this should be ascii */
+       utf8_name = mono_string_to_utf8_checked (name, &error); /* FIXME: this should be ascii */
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        value = g_getenv (utf8_name);
 
        g_free (utf8_name);
@@ -7011,14 +7037,6 @@ ves_icall_System_Environment_GetEnvironmentVariableNames (void)
 #endif
 }
 
-/*
- * If your platform lacks setenv/unsetenv, you must upgrade your glib.
- */
-#if !GLIB_CHECK_VERSION(2,4,0)
-#define g_setenv(a,b,c)   setenv(a,b,c)
-#define g_unsetenv(a) unsetenv(a)
-#endif
-
 ICALL_EXPORT void
 ves_icall_System_Environment_InternalSetEnvironmentVariable (MonoString *name, MonoString *value)
 {
@@ -7044,7 +7062,9 @@ ves_icall_System_Environment_InternalSetEnvironmentVariable (MonoString *name, M
        g_free (utf16_name);
        g_free (utf16_value);
 #else
-       utf8_name = mono_string_to_utf8 (name); /* FIXME: this should be ascii */
+       utf8_name = mono_string_to_utf8_checked (name, &error); /* FIXME: this should be ascii */
+       if (mono_error_set_pending_exception (&error))
+               return;
 
        if ((value == NULL) || (mono_string_length (value) == 0) || (mono_string_chars (value)[0] == 0)) {
                g_unsetenv (utf8_name);
@@ -7532,6 +7552,7 @@ ves_icall_System_Configuration_DefaultConfig_get_machine_config_path (void)
 static MonoString *
 get_bundled_app_config (void)
 {
+       MonoError error;
        const gchar *app_config;
        MonoDomain *domain;
        MonoString *file;
@@ -7545,7 +7566,8 @@ get_bundled_app_config (void)
                return NULL;
 
        // Retrieve config file and remove the extension
-       config_file_name = mono_string_to_utf8 (file);
+       config_file_name = mono_string_to_utf8_checked (file, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
        config_file_path = mono_portability_find_file (config_file_name, TRUE);
        if (!config_file_path)
                config_file_path = config_file_name;
index e01f8be31d67a836e5f8c9e0b7bcffb725de557f..bcb0dc3c0146748719a55c6a9002fc609a2c61b4 100644 (file)
@@ -177,7 +177,9 @@ ves_icall_System_Globalization_CalendarData_fill_calendar_data (MonoCalendarData
        const CultureInfoEntry *ci;
        char *n;
 
-       n = mono_string_to_utf8 (name);
+       n = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
        ne = (const CultureInfoNameEntry *)mono_binary_search (n, culture_name_entries, NUM_CULTURE_ENTRIES,
                        sizeof (CultureInfoNameEntry), culture_name_locator);
        g_free (n);
@@ -574,7 +576,9 @@ ves_icall_System_Globalization_CultureInfo_construct_internal_locale_from_name (
        const CultureInfoNameEntry *ne;
        char *n;
        
-       n = mono_string_to_utf8 (name);
+       n = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
        ne = (const CultureInfoNameEntry *)mono_binary_search (n, culture_name_entries, NUM_CULTURE_ENTRIES,
                        sizeof (CultureInfoNameEntry), culture_name_locator);
 
@@ -623,10 +627,13 @@ MonoBoolean
 ves_icall_System_Globalization_RegionInfo_construct_internal_region_from_name (MonoRegionInfo *this_obj,
                MonoString *name)
 {
+       MonoError error;
        const RegionInfoNameEntry *ne;
        char *n;
        
-       n = mono_string_to_utf8 (name);
+       n = mono_string_to_utf8_checked (name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
        ne = (const RegionInfoNameEntry *)mono_binary_search (n, region_name_entries, NUM_REGION_ENTRIES,
                sizeof (RegionInfoNameEntry), region_name_locator);
 
index 966c331b8fc7ac8e78b53180958bc3db7b476b08..ceb5367974b80a15489cef2f71c72bd26c72687f 100644 (file)
@@ -266,6 +266,15 @@ ves_icall_mono_string_from_utf16 (gunichar2 *data)
        return result;
 }
 
+static char*
+ves_icall_mono_string_to_utf8 (MonoString *str)
+{
+       MonoError error;
+       char *result = mono_string_to_utf8_checked (str, &error);
+       mono_error_set_pending_exception (&error);
+       return result;
+}
+
 void
 mono_marshal_init (void)
 {
@@ -285,7 +294,7 @@ mono_marshal_init (void)
                register_icall (mono_string_from_byvalwstr, "mono_string_from_byvalwstr", "obj ptr int", FALSE);
                register_icall (mono_string_new_wrapper, "mono_string_new_wrapper", "obj ptr", FALSE);
                register_icall (mono_string_new_len_wrapper, "mono_string_new_len_wrapper", "obj ptr int", FALSE);
-               register_icall (mono_string_to_utf8, "mono_string_to_utf8", "ptr obj", FALSE);
+               register_icall (ves_icall_mono_string_to_utf8, "ves_icall_mono_string_to_utf8", "ptr obj", FALSE);
                register_icall (mono_string_to_lpstr, "mono_string_to_lpstr", "ptr obj", FALSE);
                register_icall (mono_string_to_ansibstr, "mono_string_to_ansibstr", "ptr object", FALSE);
                register_icall (mono_string_builder_to_utf8, "mono_string_builder_to_utf8", "ptr object", FALSE);
@@ -326,6 +335,8 @@ mono_marshal_init (void)
                register_icall (mono_marshal_ftnptr_eh_callback, "mono_marshal_ftnptr_eh_callback", "void uint32", TRUE);
                register_icall (mono_threads_enter_gc_safe_region_unbalanced, "mono_threads_enter_gc_safe_region_unbalanced", "ptr ptr", TRUE);
                register_icall (mono_threads_exit_gc_safe_region_unbalanced, "mono_threads_exit_gc_safe_region_unbalanced", "void ptr ptr", TRUE);
+               register_icall (mono_threads_attach_coop, "mono_threads_attach_coop", "ptr ptr ptr", TRUE);
+               register_icall (mono_threads_detach_coop, "mono_threads_detach_coop", "void ptr ptr", TRUE);
 
                mono_cominterop_init ();
                mono_remoting_init ();
@@ -405,14 +416,10 @@ mono_delegate_to_ftnptr (MonoDelegate *delegate)
        delegate_hash_table_add (delegate);
 
        /* when the object is collected, collect the dynamic method, too */
-       mono_object_register_finalizer ((MonoObject*)delegate, &error);
-       if (!is_ok (&error))
-               goto fail2;
+       mono_object_register_finalizer ((MonoObject*)delegate);
 
        return delegate->delegate_trampoline;
 
-fail2:
-       delegate_hash_table_remove (delegate);
 fail:
        mono_gchandle_free (target_handle);
        mono_error_set_pending_exception (&error);
@@ -1086,7 +1093,10 @@ mono_string_to_lpstr (MonoString *s)
                return as;
        }
 #else
-       return mono_string_to_utf8 (s);
+       MonoError error;
+       char *result = mono_string_to_utf8_checked (s, &error);
+       mono_error_set_pending_exception (&error);
+       return result;
 #endif
 }      
 
@@ -1109,6 +1119,7 @@ mono_string_to_ansibstr (MonoString *string_obj)
 void
 mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
 {
+       MonoError error;
        char *s;
        int len;
 
@@ -1119,7 +1130,9 @@ mono_string_to_byvalstr (gpointer dst, MonoString *src, int size)
        if (!src)
                return;
 
-       s = mono_string_to_utf8 (src);
+       s = mono_string_to_utf8_checked (src, &error);
+       if (mono_error_set_pending_exception (&error))
+               return;
        len = MIN (size, strlen (s));
        if (len >= size)
                len--;
@@ -3007,17 +3020,23 @@ mono_delegate_end_invoke (MonoDelegate *delegate, gpointer *params)
        } else
 #endif
        {
-               res = mono_threadpool_ms_end_invoke (ares, &out_args, &exc);
+               res = mono_threadpool_ms_end_invoke (ares, &out_args, &exc, &error);
+               if (mono_error_set_pending_exception (&error))
+                       return NULL;
        }
 
        if (exc) {
                if (((MonoException*)exc)->stack_trace) {
-                       char *strace = mono_string_to_utf8 (((MonoException*)exc)->stack_trace);
-                       char  *tmp;
-                       tmp = g_strdup_printf ("%s\nException Rethrown at:\n", strace);
-                       g_free (strace);        
-                       MONO_OBJECT_SETREF (((MonoException*)exc), stack_trace, mono_string_new (domain, tmp));
-                       g_free (tmp);
+                       MonoError inner_error;
+                       char *strace = mono_string_to_utf8_checked (((MonoException*)exc)->stack_trace, &inner_error);
+                       if (is_ok (&inner_error)) {
+                               char  *tmp;
+                               tmp = g_strdup_printf ("%s\nException Rethrown at:\n", strace);
+                               g_free (strace);        
+                               MONO_OBJECT_SETREF (((MonoException*)exc), stack_trace, mono_string_new (domain, tmp));
+                               g_free (tmp);
+                       } else
+                               mono_error_cleanup (&inner_error); /* no stack trace, but at least throw the original exception */
                }
                mono_set_pending_exception ((MonoException*)exc);
        }
@@ -7965,7 +7984,7 @@ mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *i
 #else
        MonoMethodSignature *sig, *csig;
        MonoExceptionClause *clauses, *clause_finally, *clause_catch;
-       int i, *tmp_locals, ex_local, e_local;
+       int i, *tmp_locals, ex_local, e_local, attach_cookie_local, attach_dummy_local;
        int leave_try_pos, leave_catch_pos, ex_m1_pos;
        gboolean closed = FALSE;
 
@@ -8000,10 +8019,14 @@ mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *i
        ex_local = mono_mb_add_local (mb, &mono_defaults.uint32_class->byval_arg);
        e_local = mono_mb_add_local (mb, &mono_defaults.exception_class->byval_arg);
 
+       attach_cookie_local = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
+       attach_dummy_local = mono_mb_add_local (mb, &mono_defaults.int_class->byval_arg);
+
        /*
         * guint32 ex = -1;
         * try {
-        *   mono_jit_attach ();
+        *   // does (STARTING|RUNNING|BLOCKING) -> RUNNING + set/switch domain
+        *   mono_threads_attach_coop ();
         *
         *   <interrupt check>
         *
@@ -8011,7 +8034,8 @@ mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *i
         * } catch (Exception e) {
         *   ex = mono_gchandle_new (e, false);
         * } finally {
-        *   mono_jit_detach ();
+        *   // does RUNNING -> (RUNNING|BLOCKING) + unset/switch domain
+        *   mono_threads_detach_coop ();
         *
         *   if (ex != -1)
         *     mono_marshal_ftnptr_eh_callback (ex);
@@ -8039,16 +8063,17 @@ mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *i
        /* try { */
        clause_catch->try_offset = clause_finally->try_offset = mono_mb_get_label (mb);
 
-       /*
-        * Might need to attach the thread to the JIT or change the
-        * domain for the callback.
-        *
-        * Also does the (STARTING|BLOCKING|RUNNING) -> RUNNING thread state transtion
-        *
-        * mono_jit_attach ();
-        */
-       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
-       mono_mb_emit_byte (mb, CEE_MONO_JIT_ATTACH);
+       if (!mono_threads_is_coop_enabled ()) {
+               mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+               mono_mb_emit_byte (mb, CEE_MONO_JIT_ATTACH);
+       } else {
+               /* mono_threads_attach_coop (); */
+               mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+               mono_mb_emit_byte (mb, CEE_MONO_LDDOMAIN);
+               mono_mb_emit_ldloc_addr (mb, attach_dummy_local);
+               mono_mb_emit_icall (mb, mono_threads_attach_coop);
+               mono_mb_emit_stloc (mb, attach_cookie_local);
+       }
 
        /* <interrupt check> */
        emit_thread_interrupt_checkpoint (mb);
@@ -8216,13 +8241,15 @@ mono_marshal_emit_managed_wrapper (MonoMethodBuilder *mb, MonoMethodSignature *i
        clause_finally->try_len = mono_mb_get_label (mb) - clause_finally->try_offset;
        clause_finally->handler_offset = mono_mb_get_label (mb);
 
-       /*
-        * Also does the RUNNING -> (BLOCKING|RUNNING) thread state transition
-        *
-        * mono_jit_detach ();
-        */
-       mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
-       mono_mb_emit_byte (mb, CEE_MONO_JIT_DETACH);
+       if (!mono_threads_is_coop_enabled ()) {
+               mono_mb_emit_byte (mb, MONO_CUSTOM_PREFIX);
+               mono_mb_emit_byte (mb, CEE_MONO_JIT_DETACH);
+       } else {
+               /* mono_threads_detach_coop (); */
+               mono_mb_emit_ldloc (mb, attach_cookie_local);
+               mono_mb_emit_ldloc_addr (mb, attach_dummy_local);
+               mono_mb_emit_icall (mb, mono_threads_detach_coop);
+       }
 
        /* if (ex != -1) */
        mono_mb_emit_ldloc (mb, ex_local);
@@ -10766,6 +10793,7 @@ ves_icall_System_Runtime_InteropServices_Marshal_PtrToStructure_type (gpointer s
 int
 ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf (MonoReflectionType *type, MonoString *field_name)
 {
+       MonoError error;
        MonoMarshalType *info;
        MonoClass *klass;
        char *fname;
@@ -10774,7 +10802,9 @@ ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf (MonoReflectionType *t
        MONO_CHECK_ARG_NULL (type, 0);
        MONO_CHECK_ARG_NULL (field_name, 0);
 
-       fname = mono_string_to_utf8 (field_name);
+       fname = mono_string_to_utf8_checked (field_name, &error);
+       if (mono_error_set_pending_exception (&error))
+               return 0;
        klass = mono_class_from_mono_type (type->type);
        if (!mono_class_init (klass)) {
                mono_set_pending_exception (mono_class_get_exception_for_failure (klass));
@@ -10823,10 +10853,13 @@ ves_icall_System_Runtime_InteropServices_Marshal_OffsetOf (MonoReflectionType *t
 gpointer
 ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (MonoString *string)
 {
+       MonoError error;
 #ifdef HOST_WIN32
        char* tres, *ret;
        size_t len;
-       tres = mono_string_to_utf8 (string);
+       tres = mono_string_to_utf8_checked (string, &error);
+       if (mono_error_set_pending_exception (&error))
+               return NULL;
        if (!tres)
                return tres;
 
@@ -10837,7 +10870,9 @@ ves_icall_System_Runtime_InteropServices_Marshal_StringToHGlobalAnsi (MonoString
        return ret;
 
 #else
-       return mono_string_to_utf8 (string);
+       char *ret = mono_string_to_utf8_checked (string, &error);
+       mono_error_set_pending_exception (&error);
+       return ret;
 #endif
 }
 
index 6cf9691777ea783631f39c7cac24c239cd180a7f..b9a305121641975286467b84392ceba8856a4111 100644 (file)
@@ -1250,7 +1250,8 @@ ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms)
        mon = lock_word_get_inflated_lock (lw);
 
        /* Do this WaitSleepJoin check before creating the event handle */
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return FALSE;
        
        event = CreateEvent (NULL, FALSE, FALSE, NULL);
        if (event == NULL) {
@@ -1260,7 +1261,11 @@ ves_icall_System_Threading_Monitor_Monitor_wait (MonoObject *obj, guint32 ms)
        
        LOCK_DEBUG (g_message ("%s: (%d) queuing handle %p", __func__, mono_thread_info_get_small_id (), event));
 
-       mono_thread_current_check_pending_interrupt ();
+       /* This looks superfluous */
+       if (mono_thread_current_check_pending_interrupt ()) {
+               CloseHandle (event);
+               return FALSE;
+       }
        
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
 
index fb205e80eaff2781966cdb448262ac85e9bac19f..44872a4dcf745d0fbaa9e2df22920f67bc72d12e 100644 (file)
@@ -804,9 +804,11 @@ fill_sample (MonoCounterSample *sample)
 static int
 id_from_string (MonoString *instance, gboolean is_process)
 {
+       MonoError error;
        int id = -1;
        if (mono_string_length (instance)) {
-               char *id_str = mono_string_to_utf8 (instance);
+               char *id_str = mono_string_to_utf8_checked (instance, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                char *end;
                id = strtol (id_str, &end, 0);
                if (end == id_str && !is_process)
@@ -912,6 +914,7 @@ network_cleanup (ImplVtable *vtable)
 static void*
 network_get_impl (MonoString* counter, MonoString* instance, int *type, MonoBoolean *custom)
 {
+       MonoError error;
        const CounterDesc *cdesc;
        NetworkVtableArg *narg;
        ImplVtable *vtable;
@@ -919,7 +922,8 @@ network_get_impl (MonoString* counter, MonoString* instance, int *type, MonoBool
 
        *custom = FALSE;
        if ((cdesc = get_counter_in_category (&predef_categories [CATEGORY_NETWORK], counter))) {
-               instance_name = mono_string_to_utf8 (instance);
+               instance_name = mono_string_to_utf8_checked (instance, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                narg = g_new0 (NetworkVtableArg, 1);
                narg->id = cdesc->id;
                narg->name = instance_name;
@@ -1043,9 +1047,11 @@ predef_readonly_counter (ImplVtable *vtable, MonoBoolean only_value, MonoCounter
 static ImplVtable*
 predef_vtable (void *arg, MonoString *instance)
 {
+       MonoError error;
        MonoSharedArea *area;
        PredefVtable *vtable;
-       char *pids = mono_string_to_utf8 (instance);
+       char *pids = mono_string_to_utf8_checked (instance, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
        int pid;
 
        pid = atoi (pids);
@@ -1300,6 +1306,7 @@ custom_get_value_address (SharedCounter *scounter, SharedInstance* sinst)
 static void*
 custom_get_impl (SharedCategory *cat, MonoString* counter, MonoString* instance, int *type)
 {
+       MonoError error;
        SharedCounter *scounter;
        SharedInstance* inst;
        char *name;
@@ -1308,7 +1315,8 @@ custom_get_impl (SharedCategory *cat, MonoString* counter, MonoString* instance,
        if (!scounter)
                return NULL;
        *type = simple_type_to_type [scounter->type];
-       name = mono_string_to_utf8 (counter);
+       name = mono_string_to_utf8_checked (counter, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
        inst = custom_get_instance (cat, scounter, name);
        g_free (name);
        if (!inst)
@@ -1490,7 +1498,6 @@ mono_perfcounter_create (MonoString *category, MonoString *help, int type, MonoA
        SharedCategory *cat;
 
        /* FIXME: ensure there isn't a category created already */
-       mono_error_init (&error);
        name = mono_string_to_utf8_checked (category, &error);
        if (!mono_error_ok (&error))
                goto failure;
@@ -1563,6 +1570,7 @@ failure:
 int
 mono_perfcounter_instance_exists (MonoString *instance, MonoString *category, MonoString *machine)
 {
+       MonoError error;
        const CategoryDesc *cdesc;
        SharedInstance *sinst;
        char *name;
@@ -1576,7 +1584,8 @@ mono_perfcounter_instance_exists (MonoString *instance, MonoString *category, Mo
                scat = find_custom_category (category);
                if (!scat)
                        return FALSE;
-               name = mono_string_to_utf8 (instance);
+               name = mono_string_to_utf8_checked (instance, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                sinst = find_custom_instance (scat, name);
                g_free (name);
                if (sinst)
index 4b5ca588056df60fcb60404b58fee9d8bd18fd79..d651b0e5b08387b9b4829e0ce74b612e1fc3cc54 100644 (file)
@@ -21,6 +21,7 @@
 
 extern MonoBoolean ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal(MonoString *iface, MonoArray **gw_addr_list)
 {
+       MonoError error;
        size_t needed;
        in_addr_t in;
        int mib[6];
@@ -31,7 +32,10 @@ extern MonoBoolean ves_icall_System_Net_NetworkInformation_MacOsIPInterfacePrope
 
        MonoDomain *domain = mono_domain_get ();
 
-       ifacename = mono_string_to_utf8(iface);
+       ifacename = mono_string_to_utf8_checked(iface, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
+
        if ((ifindex = if_nametoindex(ifacename)) == 0)
                return FALSE;
        g_free(ifacename);
index 659bd648289bce6e49f27ff059b02e2462019ee5..69769c496e34ebcf39f86047ae1617fba137b0c1 100644 (file)
@@ -263,6 +263,7 @@ struct _MonoReflectionType {
        MonoType  *type;
 };
 
+/* This corresponds to System.RuntimeType */
 typedef struct {
        MonoReflectionType type;
        MonoObject *type_info;
@@ -1447,10 +1448,10 @@ MonoObject *
 mono_remoting_invoke (MonoObject *real_proxy, MonoMethodMessage *msg, MonoObject **exc, MonoArray **out_args, MonoError *error);
 
 gpointer
-mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *real_proxy);
+mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *real_proxy, MonoError *error);
 
-void
-mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *klass);
+gboolean
+mono_upgrade_remote_class (MonoDomain *domain, MonoObject *tproxy, MonoClass *klass, MonoError *error);
 
 void*
 mono_load_remote_field_checked (MonoObject *this_obj, MonoClass *klass, MonoClassField *field, void **res, MonoError *error);
index c5fa20e1bb1e83f5c4010016c514e5ba4de3fe46..149b25f653a208cb52476904ff9ee752c245a854 100644 (file)
@@ -457,6 +457,7 @@ mono_runtime_class_init_full (MonoVTable *vtable, MonoError *error)
                        MonoException *exc_to_store = mono_error_convert_to_exception (error);
                        /* What we really want to do here is clone the error object and store one copy in the
                         * domain's exception hash and use the other one to error out here. */
+                       mono_error_init (error);
                        mono_error_set_exception_instance (error, exc_to_store);
                        /*
                         * Store the exception object so it could be thrown on subsequent
@@ -541,7 +542,7 @@ mono_release_type_locks (MonoInternalThread *thread)
 #ifndef DISABLE_REMOTING
 
 static gpointer
-default_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target)
+default_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target, MonoError *error)
 {
        g_error ("remoting not installed");
        return NULL;
@@ -2215,7 +2216,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
         * re-acquire them and check if another thread has created the vtable in the meantime.
         */
        /* Special case System.MonoType to avoid infinite recursion */
-       if (klass != mono_defaults.monotype_class) {
+       if (klass != mono_defaults.runtimetype_class) {
                vt->type = mono_type_get_object_checked (domain, &klass->byval_arg, error);
                if (!is_ok (error)) {
                        mono_domain_unlock (domain);
@@ -2223,7 +2224,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                        return NULL;
                }
 
-               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.monotype_class)
+               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.runtimetype_class)
                        /* This is unregistered in
                           unregister_vtable_reflection_type() in
                           domain.c. */
@@ -2274,7 +2275,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                klass->runtime_info = runtime_info;
        }
 
-       if (klass == mono_defaults.monotype_class) {
+       if (klass == mono_defaults.runtimetype_class) {
                vt->type = mono_type_get_object_checked (domain, &klass->byval_arg, error);
                if (!is_ok (error)) {
                        mono_domain_unlock (domain);
@@ -2282,7 +2283,7 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
                        return NULL;
                }
 
-               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.monotype_class)
+               if (mono_object_get_class ((MonoObject *)vt->type) != mono_defaults.runtimetype_class)
                        /* This is unregistered in
                           unregister_vtable_reflection_type() in
                           domain.c. */
@@ -2305,25 +2306,27 @@ mono_class_create_runtime_vtable (MonoDomain *domain, MonoClass *klass, MonoErro
  * mono_class_proxy_vtable:
  * @domain: the application domain
  * @remove_class: the remote class
+ * @error: set on error
  *
  * Creates a vtable for transparent proxies. It is basically
  * a copy of the real vtable of the class wrapped in @remote_class,
  * but all function pointers invoke the remoting functions, and
  * vtable->klass points to the transparent proxy class, and not to @class.
+ *
+ * On failure returns NULL and sets @error
  */
 static MonoVTable *
-mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRemotingTarget target_type)
+mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRemotingTarget target_type, MonoError *error)
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
-       MonoError error;
        MonoVTable *vt, *pvt;
        int i, j, vtsize, max_interface_id, extra_interface_vtsize = 0;
        MonoClass *k;
        GSList *extra_interfaces = NULL;
        MonoClass *klass = remote_class->proxy_class;
        gpointer *interface_offsets;
-       uint8_t *bitmap;
+       uint8_t *bitmap = NULL;
        int bsize;
        size_t imt_table_bytes;
        
@@ -2331,6 +2334,8 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
        int bcsize;
 #endif
 
+       mono_error_init (error);
+
        vt = mono_class_vtable (domain, klass);
        g_assert (vt); /*FIXME property handle failure*/
        max_interface_id = vt->max_interface_id;
@@ -2351,8 +2356,9 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
                
                method_count = mono_class_num_methods (iclass);
        
-               ifaces = mono_class_get_implemented_interfaces (iclass, &error);
-               g_assert (mono_error_ok (&error)); /*FIXME do proper error handling*/
+               ifaces = mono_class_get_implemented_interfaces (iclass, error);
+               if (!is_ok (error))
+                       goto failure;
                if (ifaces) {
                        for (i = 0; i < ifaces->len; ++i) {
                                MonoClass *ic = (MonoClass *)g_ptr_array_index (ifaces, i);
@@ -2365,6 +2371,7 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
                                method_count += mono_class_num_methods (ic);
                        }
                        g_ptr_array_free (ifaces, TRUE);
+                       ifaces = NULL;
                }
 
                extra_interface_vtsize += method_count * sizeof (gpointer);
@@ -2394,9 +2401,11 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
        for (i = 0; i < klass->vtable_size; ++i) {
                MonoMethod *cm;
                    
-               if ((cm = klass->vtable [i]))
-                       pvt->vtable [i] = arch_create_remoting_trampoline (domain, cm, target_type);
-               else
+               if ((cm = klass->vtable [i])) {
+                       pvt->vtable [i] = arch_create_remoting_trampoline (domain, cm, target_type, error);
+                       if (!is_ok (error))
+                               goto failure;
+               } else
                        pvt->vtable [i] = NULL;
        }
 
@@ -2406,8 +2415,11 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
                        MonoMethod* m;
                        gpointer iter = NULL;
                        while ((m = mono_class_get_methods (k, &iter)))
-                               if (!pvt->vtable [m->slot])
-                                       pvt->vtable [m->slot] = arch_create_remoting_trampoline (domain, m, target_type);
+                               if (!pvt->vtable [m->slot]) {
+                                       pvt->vtable [m->slot] = arch_create_remoting_trampoline (domain, m, target_type, error);
+                                       if (!is_ok (error))
+                                               goto failure;
+                               }
                }
        }
 
@@ -2439,8 +2451,11 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
 
                        iter = NULL;
                        j = 0;
-                       while ((cm = mono_class_get_methods (interf, &iter)))
-                               pvt->vtable [slot + j++] = arch_create_remoting_trampoline (domain, cm, target_type);
+                       while ((cm = mono_class_get_methods (interf, &iter))) {
+                               pvt->vtable [slot + j++] = arch_create_remoting_trampoline (domain, cm, target_type, error);
+                               if (!is_ok (error))
+                                       goto failure;
+                       }
                        
                        slot += mono_class_num_methods (interf);
                }
@@ -2461,6 +2476,13 @@ mono_class_proxy_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mono
        pvt->interface_bitmap = bitmap;
 #endif
        return pvt;
+failure:
+       if (extra_interfaces)
+               g_slist_free (extra_interfaces);
+#ifdef COMPRESSED_INTERFACE_BITMAP
+       g_free (bitmap);
+#endif
+       return NULL;
 }
 
 #endif /* DISABLE_REMOTING */
@@ -2726,17 +2748,20 @@ clone_remote_class (MonoDomain *domain, MonoRemoteClass* remote_class, MonoClass
 }
 
 gpointer
-mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *rp)
+mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, MonoRealProxy *rp, MonoError *error)
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
+       mono_error_init (error);
+
        mono_loader_lock (); /*FIXME mono_class_from_mono_type and mono_class_proxy_vtable take it*/
        mono_domain_lock (domain);
        if (rp->target_domain_id != -1) {
                if (remote_class->xdomain_vtable == NULL)
-                       remote_class->xdomain_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_APPDOMAIN);
+                       remote_class->xdomain_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_APPDOMAIN, error);
                mono_domain_unlock (domain);
                mono_loader_unlock ();
+               return_val_if_nok (error, NULL);
                return remote_class->xdomain_vtable;
        }
        if (remote_class->default_vtable == NULL) {
@@ -2746,10 +2771,16 @@ mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mon
                klass = mono_class_from_mono_type (type);
 #ifndef DISABLE_COM
                if ((mono_class_is_com_object (klass) || (mono_class_get_com_object_class () && klass == mono_class_get_com_object_class ())) && !mono_vtable_is_remote (mono_class_vtable (mono_domain_get (), klass)))
-                       remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP);
+                       remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_COMINTEROP, error);
                else
 #endif
-                       remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_UNKNOWN);
+                       remote_class->default_vtable = mono_class_proxy_vtable (domain, remote_class, MONO_REMOTING_TARGET_UNKNOWN, error);
+               /* N.B. both branches of the if modify error */
+               if (!is_ok (error)) {
+                       mono_domain_unlock (domain);
+                       mono_loader_unlock ();
+                       return NULL;
+               }
        }
        
        mono_domain_unlock (domain);
@@ -2762,13 +2793,14 @@ mono_remote_class_vtable (MonoDomain *domain, MonoRemoteClass *remote_class, Mon
  * @domain: the application domain
  * @tproxy: the proxy whose remote class has to be upgraded.
  * @klass: class to which the remote class can be casted.
+ * @error: set on error
  *
  * Updates the vtable of the remote class by adding the necessary method slots
  * and interface offsets so it can be safely casted to klass. klass can be a
- * class or an interface.
+ * class or an interface.  On success returns TRUE, on failure returns FALSE and sets @error.
  */
-void
-mono_upgrade_remote_class (MonoDomain *domain, MonoObject *proxy_object, MonoClass *klass)
+gboolean
+mono_upgrade_remote_class (MonoDomain *domain, MonoObject *proxy_object, MonoClass *klass, MonoError *error)
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
@@ -2776,6 +2808,7 @@ mono_upgrade_remote_class (MonoDomain *domain, MonoObject *proxy_object, MonoCla
        MonoRemoteClass *remote_class;
        gboolean redo_vtable;
 
+       mono_error_init (error);
        mono_loader_lock (); /*FIXME mono_remote_class_vtable requires it.*/
        mono_domain_lock (domain);
 
@@ -2795,11 +2828,15 @@ mono_upgrade_remote_class (MonoDomain *domain, MonoObject *proxy_object, MonoCla
 
        if (redo_vtable) {
                tproxy->remote_class = clone_remote_class (domain, remote_class, klass);
-               proxy_object->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tproxy->remote_class, tproxy->rp);
+               proxy_object->vtable = (MonoVTable *)mono_remote_class_vtable (domain, tproxy->remote_class, tproxy->rp, error);
+               if (!is_ok (error))
+                       goto leave;
        }
        
+leave:
        mono_domain_unlock (domain);
        mono_loader_unlock ();
+       return is_ok (error);
 }
 #endif /* DISABLE_REMOTING */
 
@@ -5156,7 +5193,7 @@ mono_object_new_pinned (MonoDomain *domain, MonoClass *klass, MonoError *error)
        if (G_UNLIKELY (!o))
                mono_error_set_out_of_memory (error, "Could not allocate %i bytes", mono_class_instance_size (klass));
        else if (G_UNLIKELY (vtable->klass->has_finalize))
-               mono_object_register_finalizer (o, error);
+               mono_object_register_finalizer (o);
 
        return o;
 }
@@ -5286,7 +5323,7 @@ mono_object_new_alloc_specific_checked (MonoVTable *vtable, MonoError *error)
        if (G_UNLIKELY (!o))
                mono_error_set_out_of_memory (error, "Could not allocate %i bytes", vtable->klass->instance_size);
        else if (G_UNLIKELY (vtable->klass->has_finalize))
-               mono_object_register_finalizer (o, error);
+               mono_object_register_finalizer (o);
 
        return o;
 }
@@ -5374,7 +5411,7 @@ mono_object_new_mature (MonoVTable *vtable, MonoError *error)
        if (G_UNLIKELY (!o))
                mono_error_set_out_of_memory (error, "Could not allocate %i bytes", vtable->klass->instance_size);
        else if (G_UNLIKELY (vtable->klass->has_finalize))
-               mono_object_register_finalizer (o, error);
+               mono_object_register_finalizer (o);
 
        return o;
 }
@@ -5489,7 +5526,7 @@ mono_object_clone_checked (MonoObject *obj, MonoError *error)
        mono_gc_wbarrier_object_copy (o, obj);
 
        if (obj->vtable->klass->has_finalize)
-               mono_object_register_finalizer (o, error);
+               mono_object_register_finalizer (o);
        return o;
 }
 
@@ -6264,7 +6301,7 @@ mono_value_box_checked (MonoDomain *domain, MonoClass *klass, gpointer value, Mo
 #endif
 #endif
        if (klass->has_finalize) {
-               mono_object_register_finalizer (res, error);
+               mono_object_register_finalizer (res);
                return_val_if_nok (error, NULL);
        }
        return res;
@@ -6505,7 +6542,8 @@ mono_object_isinst_mbyref_checked (MonoObject *obj, MonoClass *klass, MonoError
 
                if (*(MonoBoolean *) mono_object_unbox(res)) {
                        /* Update the vtable of the remote type, so it can safely cast to this new type */
-                       mono_upgrade_remote_class (domain, obj, klass);
+                       mono_upgrade_remote_class (domain, obj, klass, error);
+                       return_val_if_nok (error, NULL);
                        return obj;
                }
        }
@@ -6795,8 +6833,10 @@ mono_string_to_utf8 (MonoString *s)
        MonoError error;
        char *result = mono_string_to_utf8_checked (s, &error);
        
-       if (!mono_error_ok (&error))
-               mono_error_raise_exception (&error);
+       if (!is_ok (&error)) {
+               mono_error_cleanup (&error);
+               return NULL;
+       }
        return result;
 }
 
index 4956917e16620845645aba047a3af4b564fa144d..6f31d121910dbed69f9e49cd8e12962ff46ff458 100644 (file)
@@ -145,6 +145,7 @@ MONO_RT_EXTERNAL_ONLY
 MONO_API MonoString*
 mono_string_new_utf32      (MonoDomain *domain, const mono_unichar4 *text, int32_t len);
 
+MONO_RT_EXTERNAL_ONLY
 MONO_API char *
 mono_string_to_utf8        (MonoString *string_obj);
 
index d74ca084f10e586c0521ee9d848db9c1dcf42fbf..138bd98553b4a5d2434edbf760af5e32602f5fb5 100644 (file)
@@ -693,6 +693,7 @@ ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal (MonoProcessStartIn
 MonoBoolean
 ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoProcessStartInfo *proc_start_info, HANDLE stdin_handle, HANDLE stdout_handle, HANDLE stderr_handle, MonoProcInfo *process_info)
 {
+       MonoError error G_GNUC_UNUSED;
        gboolean ret;
        gunichar2 *dir;
        STARTUPINFO startinfo={0};
@@ -727,7 +728,11 @@ ves_icall_System_Diagnostics_Process_CreateProcess_internal (MonoProcessStartInf
        free_shell_path = FALSE;
        if (cmd) {
                gchar *newcmd, *tmp;
-               tmp = mono_string_to_utf8 (cmd);
+               tmp = mono_string_to_utf8_checked (cmd, &error);
+               if (mono_error_set_pending_exception (&error)) {
+                       g_free (spath);
+                       return NULL;
+               }
                newcmd = g_strdup_printf ("%s %s", spath, tmp);
                cmd = mono_string_new_wrapper (newcmd);
                g_free (tmp);
index 4a651b09f18df10603a8e3e6b20011f145f75a5d..86ddead705be331233d7cfe59820943b3583a497 100644 (file)
@@ -531,7 +531,9 @@ string_heap_insert_mstring (MonoDynamicStream *sh, MonoString *str)
 {
        MONO_REQ_GC_UNSAFE_MODE;
 
-       char *name = mono_string_to_utf8 (str);
+       MonoError error;
+       char *name = mono_string_to_utf8_checked (str, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
        guint32 idx;
        idx = string_heap_insert (sh, name);
        g_free (name);
@@ -1264,7 +1266,12 @@ method_encode_code (MonoDynamicImage *assembly, ReflectionMethodBuilder *mb, Mon
        } else {
                code = mb->code;
                if (code == NULL){
-                       char *name = mono_string_to_utf8 (mb->name);
+                       MonoError inner_error;
+                       char *name = mono_string_to_utf8_checked (mb->name, &inner_error);
+                       if (!is_ok (&inner_error)) {
+                               name = g_strdup ("");
+                               mono_error_cleanup (&inner_error);
+                       }
                        char *str = g_strdup_printf ("Method %s does not have any IL associated", name);
                        mono_error_set_argument (error, NULL, "a method does not have any IL associated");
                        g_free (str);
@@ -2233,7 +2240,11 @@ encode_marshal_blob (MonoDynamicImage *assembly, MonoReflectionMarshal *minfo, M
                break;
        case MONO_NATIVE_CUSTOM:
                if (minfo->guid) {
-                       str = mono_string_to_utf8 (minfo->guid);
+                       str = mono_string_to_utf8_checked (minfo->guid, error);
+                       if (!is_ok (error)) {
+                               sigbuffer_free (&buf);
+                               return 0;
+                       }
                        len = strlen (str);
                        sigbuffer_add_value (&buf, len);
                        sigbuffer_add_mem (&buf, str, len);
@@ -2252,8 +2263,13 @@ encode_marshal_blob (MonoDynamicImage *assembly, MonoReflectionMarshal *minfo, M
                                        return 0;
                                }
                                str = type_get_fully_qualified_name (marshaltype);
-                       } else
-                               str = mono_string_to_utf8 (minfo->marshaltype);
+                       } else {
+                               str = mono_string_to_utf8_checked (minfo->marshaltype, error);
+                               if (!is_ok (error)) {
+                                       sigbuffer_free (&buf);
+                                       return 0;
+                               }
+                       }
                        len = strlen (str);
                        sigbuffer_add_value (&buf, len);
                        sigbuffer_add_mem (&buf, str, len);
@@ -2263,7 +2279,11 @@ encode_marshal_blob (MonoDynamicImage *assembly, MonoReflectionMarshal *minfo, M
                        sigbuffer_add_value (&buf, 0);
                }
                if (minfo->mcookie) {
-                       str = mono_string_to_utf8 (minfo->mcookie);
+                       str = mono_string_to_utf8_checked (minfo->mcookie, error);
+                       if (!is_ok (error)) {
+                               sigbuffer_free (&buf);
+                               return 0;
+                       }
                        len = strlen (str);
                        sigbuffer_add_value (&buf, len);
                        sigbuffer_add_mem (&buf, str, len);
@@ -2977,7 +2997,8 @@ mono_image_get_methodref_token_for_methodbuilder (MonoDynamicImage *assembly, Mo
                parent = mono_image_typedef_or_ref (assembly, t);
        }
 
-       char *name = mono_string_to_utf8 (method->name);
+       char *name = mono_string_to_utf8_checked (method->name, error);
+       return_val_if_nok (error, 0);
 
        token = mono_image_add_memberef_row (assembly, parent, name, sig);
        g_free (name);
@@ -3127,7 +3148,8 @@ mono_image_get_ctorbuilder_token (MonoDynamicImage *assembly, MonoReflectionCtor
                parent = mono_image_typedef_or_ref (assembly, type);
        }
        
-       name = mono_string_to_utf8 (rmb.name);
+       name = mono_string_to_utf8_checked (rmb.name, error);
+       return_val_if_nok (error, 0);
        sig = method_builder_encode_signature (assembly, &rmb, error);
        return_val_if_nok (error, 0);
 
@@ -3228,7 +3250,8 @@ mono_image_get_field_on_inst_token (MonoDynamicImage *assembly, MonoReflectionFi
 
                guint32 sig_token = field_encode_signature (assembly, fb, error);
                return_val_if_nok (error, 0);
-               name = mono_string_to_utf8 (fb->name);
+               name = mono_string_to_utf8_checked (fb->name, error);
+               return_val_if_nok (error, 0);
                token = mono_image_get_memberref_token (assembly, &klass->byval_arg, name, sig_token);
                g_free (name);          
        } else if (is_sr_mono_field (mono_object_class (f->fb))) {
@@ -3284,7 +3307,8 @@ mono_image_get_ctor_on_inst_token (MonoDynamicImage *assembly, MonoReflectionCto
                sig = method_builder_encode_signature (assembly, &rmb, error);
                return_val_if_nok (error, 0);
 
-               name = mono_string_to_utf8 (rmb.name);
+               name = mono_string_to_utf8_checked (rmb.name, error);
+               return_val_if_nok (error, 0);
 
                token = mono_image_get_memberref_token (assembly, &klass->byval_arg, name, sig);
                g_free (name);
@@ -3396,7 +3420,8 @@ mono_image_get_method_on_inst_token (MonoDynamicImage *assembly, MonoReflectionM
                sig = method_builder_encode_signature (assembly, &rmb, error);
                return_val_if_nok (error, 0);
 
-               name = mono_string_to_utf8 (rmb.name);
+               name = mono_string_to_utf8_checked (rmb.name, error);
+               return_val_if_nok (error, 0);
 
                token = mono_image_get_memberref_token (assembly, &klass->byval_arg, name, sig);
                g_free (name);          
@@ -3713,7 +3738,8 @@ mono_image_get_generic_field_token (MonoDynamicImage *assembly, MonoReflectionFi
 
        table = &assembly->tables [MONO_TABLE_MEMBERREF];
 
-       name = mono_string_to_utf8 (fb->name);
+       name = mono_string_to_utf8_checked (fb->name, error);
+       return_val_if_nok (error, 0);
 
        if (assembly->save) {
                alloc_table (table, table->rows + 1);
@@ -3879,7 +3905,9 @@ mono_image_get_array_token (MonoDynamicImage *assembly, MonoReflectionArrayMetho
                        goto fail;
        }
 
-       name = mono_string_to_utf8 (m->name);
+       name = mono_string_to_utf8_checked (m->name, error);
+       if (!is_ok (error))
+               goto fail;
        for (tmp = assembly->array_methods; tmp; tmp = tmp->next) {
                am = (ArrayMethod *)tmp->data;
                if (strcmp (name, am->name) == 0 && 
@@ -3925,12 +3953,14 @@ mono_image_get_type_info (MonoDomain *domain, MonoReflectionTypeBuilder *tb, Mon
        table = &assembly->tables [MONO_TABLE_TYPEDEF];
        values = table->values + tb->table_idx * MONO_TYPEDEF_SIZE;
        values [MONO_TYPEDEF_FLAGS] = tb->attrs;
-       n = mono_string_to_utf8 (tb->name);
+       n = mono_string_to_utf8_checked (tb->name, error);
+       return_val_if_nok (error, FALSE);
        if (strcmp (n, "Object") == 0)
                is_object++;
        values [MONO_TYPEDEF_NAME] = string_heap_insert (&assembly->sheap, n);
        g_free (n);
-       n = mono_string_to_utf8 (tb->nspace);
+       n = mono_string_to_utf8_checked (tb->nspace, error);
+       return_val_if_nok (error, FALSE);
        if (strcmp (n, "System") == 0)
                is_system++;
        values [MONO_TYPEDEF_NAMESPACE] = string_heap_insert (&assembly->sheap, n);
@@ -4240,6 +4270,7 @@ module_add_cattrs (MonoDynamicImage *assembly, MonoReflectionModuleBuilder *modu
 static void
 mono_image_fill_file_table (MonoDomain *domain, MonoReflectionModule *module, MonoDynamicImage *assembly)
 {
+       MonoError error;
        MonoDynamicTable *table;
        guint32 *values;
        char blob_size [6];
@@ -4255,7 +4286,8 @@ mono_image_fill_file_table (MonoDomain *domain, MonoReflectionModule *module, Mo
        values [MONO_FILE_NAME] = string_heap_insert (&assembly->sheap, module->image->module_name);
        if (image_is_dynamic (module->image)) {
                /* This depends on the fact that the main module is emitted last */
-               dir = mono_string_to_utf8 (((MonoReflectionModuleBuilder*)module)->assemblyb->dir);
+               dir = mono_string_to_utf8_checked (((MonoReflectionModuleBuilder*)module)->assemblyb->dir, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                path = g_strdup_printf ("%s%c%s", dir, G_DIR_SEPARATOR, module->image->module_name);
        } else {
                dir = NULL;
@@ -4957,6 +4989,7 @@ assembly_add_resource_manifest (MonoReflectionModuleBuilder *mb, MonoDynamicImag
 static void
 assembly_add_resource (MonoReflectionModuleBuilder *mb, MonoDynamicImage *assembly, MonoReflectionResource *rsrc)
 {
+       MonoError error;
        MonoDynamicTable *table;
        guint32 *values;
        char blob_size [6];
@@ -4966,7 +4999,8 @@ assembly_add_resource (MonoReflectionModuleBuilder *mb, MonoDynamicImage *assemb
        guint32 idx, offset;
 
        if (rsrc->filename) {
-               name = mono_string_to_utf8 (rsrc->filename);
+               name = mono_string_to_utf8_checked (rsrc->filename, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                sname = g_path_get_basename (name);
        
                table = &assembly->tables [MONO_TABLE_FILE];
@@ -5019,6 +5053,7 @@ assembly_add_resource (MonoReflectionModuleBuilder *mb, MonoDynamicImage *assemb
 static void
 set_version_from_string (MonoString *version, guint32 *values)
 {
+       MonoError error;
        gchar *ver, *p, *str;
        guint32 i;
        
@@ -5028,7 +5063,8 @@ set_version_from_string (MonoString *version, guint32 *values)
        values [MONO_ASSEMBLY_BUILD_NUMBER] = 0;
        if (!version)
                return;
-       ver = str = mono_string_to_utf8 (version);
+       ver = str = mono_string_to_utf8_checked (version, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
        for (i = 0; i < 4; ++i) {
                values [MONO_ASSEMBLY_MAJOR_VERSION + i] = strtol (ver, &p, 10);
                switch (*p) {
@@ -5501,7 +5537,8 @@ mono_image_create_method_token (MonoDynamicImage *assembly, MonoObject *obj, Mon
                parent = mono_metadata_token_index (parent) << MONO_MEMBERREF_PARENT_BITS;
                parent |= MONO_MEMBERREF_PARENT_METHODDEF;
 
-               char *name = mono_string_to_utf8 (rmb.name);
+               char *name = mono_string_to_utf8_checked (rmb.name, error);
+               if (!is_ok (error)) goto fail;
                token = mono_image_get_varargs_method_token (
                        assembly, parent, name, sig_token);
                g_free (name);
@@ -5602,7 +5639,7 @@ mono_image_create_token (MonoDynamicImage *assembly, MonoObject *obj,
                        return_val_if_nok (error, 0);
                        token = mono_metadata_token_from_dor (mono_image_typedef_or_ref (assembly, type));
                }
-       } else if (strcmp (klass->name, "MonoType") == 0) {
+       } else if (strcmp (klass->name, "RuntimeType") == 0) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj, error);
                return_val_if_nok (error, 0);
                MonoClass *mc = mono_class_from_mono_type (type);
@@ -5950,6 +5987,7 @@ mono_dynamic_image_free_image (MonoDynamicImage *image)
 void
 mono_image_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
 {
+       MonoError error;
        MonoDynamicAssembly *assembly;
        MonoDynamicImage *image;
        MonoDomain *domain = mono_object_domain (assemblyb);
@@ -5970,14 +6008,17 @@ mono_image_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
        assembly->assembly.dynamic = TRUE;
        assembly->assembly.corlib_internal = assemblyb->corlib_internal;
        assemblyb->assembly.assembly = (MonoAssembly*)assembly;
-       assembly->assembly.basedir = mono_string_to_utf8 (assemblyb->dir);
-       if (assemblyb->culture)
-               assembly->assembly.aname.culture = mono_string_to_utf8 (assemblyb->culture);
-       else
+       assembly->assembly.basedir = mono_string_to_utf8_checked (assemblyb->dir, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       if (assemblyb->culture) {
+               assembly->assembly.aname.culture = mono_string_to_utf8_checked (assemblyb->culture, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
+       } else
                assembly->assembly.aname.culture = g_strdup ("");
 
         if (assemblyb->version) {
-                       char *vstr = mono_string_to_utf8 (assemblyb->version);
+                       char *vstr = mono_string_to_utf8_checked (assemblyb->version, &error);
+                       mono_error_raise_exception (&error); /* FIXME don't raise here */
                        char **version = g_strsplit (vstr, ".", 4);
                        char **parts = version;
                        assembly->assembly.aname.major = atoi (*parts++);
@@ -5998,7 +6039,9 @@ mono_image_basic_init (MonoReflectionAssemblyBuilder *assemblyb)
        assembly->save = assemblyb->access != 1;
        assembly->domain = domain;
 
-       image = create_dynamic_mono_image (assembly, mono_string_to_utf8 (assemblyb->name), g_strdup ("RefEmit_YouForgotToDefineAModule"));
+       char *assembly_name = mono_string_to_utf8_checked (assemblyb->name, &error);
+       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       image = create_dynamic_mono_image (assembly, assembly_name, g_strdup ("RefEmit_YouForgotToDefineAModule"));
        image->initial_image = TRUE;
        assembly->assembly.aname.name = image->image.name;
        assembly->assembly.image = &image->image;
@@ -6691,7 +6734,8 @@ mono_image_load_module_dynamic (MonoReflectionAssemblyBuilder *ab, MonoString *f
        
        mono_error_init (error);
        
-       name = mono_string_to_utf8 (fileName);
+       name = mono_string_to_utf8_checked (fileName, error);
+       return_val_if_nok (error, NULL);
 
        image = mono_image_open (name, &status);
        if (!image) {
@@ -6879,7 +6923,8 @@ image_module_basic_init (MonoReflectionModuleBuilder *moduleb, MonoError *error)
                 * determined at assembly save time.
                 */
                /*image = (MonoDynamicImage*)ab->dynamic_assembly->assembly.image; */
-               name = mono_string_to_utf8 (ab->name);
+               name = mono_string_to_utf8_checked (ab->name, error);
+               return_val_if_nok (error, FALSE);
                fqname = mono_string_to_utf8_checked (moduleb->module.fqname, error);
                if (!is_ok (error)) {
                        g_free (name);
@@ -7269,7 +7314,7 @@ mono_type_get_object_checked (MonoDomain *domain, MonoType *type, MonoError *err
                }
        }
        /* This is stored in vtables/JITted code so it has to be pinned */
-       res = (MonoReflectionType *)mono_object_new_pinned (domain, mono_defaults.monotype_class, error);
+       res = (MonoReflectionType *)mono_object_new_pinned (domain, mono_defaults.runtimetype_class, error);
        if (!mono_error_ok (error))
                return NULL;
 
@@ -8492,7 +8537,9 @@ _mono_reflection_get_type_from_info (MonoTypeNameParse *info, MonoImage *image,
 
        type = mono_reflection_get_type_with_rootimage (rootimage, image, info, ignorecase, &type_resolve, error);
        if (type == NULL && !info->assembly.name && image != mono_defaults.corlib) {
+               /* ignore the error and try again */
                mono_error_cleanup (error);
+               mono_error_init (error);
                image = mono_defaults.corlib;
                type = mono_reflection_get_type_with_rootimage (rootimage, image, info, ignorecase, &type_resolve, error);
        }
@@ -8895,7 +8942,7 @@ mono_reflection_get_token_checked (MonoObject *obj, MonoError *error)
        } else if (strcmp (klass->name, "TypeBuilder") == 0) {
                MonoReflectionTypeBuilder *tb = (MonoReflectionTypeBuilder *)obj;
                token = tb->table_idx | MONO_TOKEN_TYPE_DEF;
-       } else if (strcmp (klass->name, "MonoType") == 0) {
+       } else if (strcmp (klass->name, "RuntimeType") == 0) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType*)obj, error);
                return_val_if_nok (error, 0);
                MonoClass *mc = mono_class_from_mono_type (type);
@@ -8961,6 +9008,27 @@ mono_reflection_get_token_checked (MonoObject *obj, MonoError *error)
        return token;
 }
 
+/*
+ * Load the type with name @n on behalf of image @image.  On failure sets @error and returns NULL.
+ * The @is_enum flag only affects the error message that's displayed on failure.
+ */
+static MonoType*
+cattr_type_from_name (char *n, MonoImage *image, gboolean is_enum, MonoError *error)
+{
+       MonoError inner_error;
+       MonoType *t = mono_reflection_type_from_name_checked (n, image, &inner_error);
+       if (!t) {
+               mono_error_set_type_load_name (error, g_strdup(n), NULL,
+                                              "Could not load %s %s while decoding custom attribute: %s",
+                                              is_enum ? "enum type": "type",
+                                              n,
+                                              mono_error_get_message (&inner_error));
+               mono_error_cleanup (&inner_error);
+               return NULL;
+       }
+       return t;
+}
+
 static MonoClass*
 load_cattr_enum_type (MonoImage *image, const char *p, const char **end, MonoError *error)
 {
@@ -8972,16 +9040,9 @@ load_cattr_enum_type (MonoImage *image, const char *p, const char **end, MonoErr
 
        n = (char *)g_memdup (p, slen + 1);
        n [slen] = 0;
-       t = mono_reflection_type_from_name_checked (n, image, error);
-       if (!t) {
-               char *msg = g_strdup (mono_error_get_message (error));
-               mono_error_cleanup (error);
-               /* We don't free n, it's consumed by mono_error */
-               mono_error_set_type_load_name (error, n, NULL, "Could not load enum type %s while decoding custom attribute: %s", n, msg);
-               g_free (msg);
-               return NULL;
-       }
+       t = cattr_type_from_name (n, image, TRUE, error);
        g_free (n);
+       return_val_if_nok (error, NULL);
        p += slen;
        *end = p;
        return mono_class_from_mono_type (t);
@@ -9079,16 +9140,9 @@ handle_type:
                slen = mono_metadata_decode_value (p, &p);
                n = (char *)g_memdup (p, slen + 1);
                n [slen] = 0;
-               t = mono_reflection_type_from_name_checked (n, image, error);
-               if (!t) {
-                       char *msg = g_strdup (mono_error_get_message (error));
-                       mono_error_cleanup (error);
-                       /* We don't free n, it's consumed by mono_error */
-                       mono_error_set_type_load_name (error, n, NULL, "Could not load type %s while decoding custom attribute: %msg", n, msg);
-                       g_free (msg);
-                       return NULL;
-               }
+               t = cattr_type_from_name (n, image, FALSE, error);
                g_free (n);
+               return_val_if_nok (error, NULL);
                *end = p + slen;
 
                rt = mono_type_get_object_checked (mono_domain_get (), t, error);
@@ -9134,16 +9188,9 @@ handle_type:
                        slen = mono_metadata_decode_value (p, &p);
                        n = (char *)g_memdup (p, slen + 1);
                        n [slen] = 0;
-                       t = mono_reflection_type_from_name_checked (n, image, error);
-                       if (!t) {
-                               char *msg = g_strdup (mono_error_get_message (error));
-                               mono_error_cleanup (error);
-                               /* We don't free n, it's consumed by mono_error */
-                               mono_error_set_type_load_name (error, n, NULL, "Could not load type %s while decoding custom attribute: %s", n, msg);
-                               g_free (msg);
-                               return NULL;
-                       }
+                       t = cattr_type_from_name (n, image, FALSE, error);
                        g_free (n);
+                       return_val_if_nok (error, NULL);
                        p += slen;
                        subc = mono_class_from_mono_type (t);
                } else if (subt >= MONO_TYPE_BOOLEAN && subt <= MONO_TYPE_R8) {
@@ -10338,7 +10385,7 @@ mono_reflection_get_custom_attrs_info_checked (MonoObject *obj, MonoError *error
        mono_error_init (error);
 
        klass = obj->vtable->klass;
-       if (klass == mono_defaults.monotype_class) {
+       if (klass == mono_defaults.runtimetype_class) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType *)obj, error);
                return_val_if_nok (error, NULL);
                klass = mono_class_from_mono_type (type);
@@ -10865,7 +10912,8 @@ get_prop_name_and_type (MonoObject *prop, char **name, MonoType **type, MonoErro
        MonoClass *klass = mono_object_class (prop);
        if (strcmp (klass->name, "PropertyBuilder") == 0) {
                MonoReflectionPropertyBuilder *pb = (MonoReflectionPropertyBuilder *)prop;
-               *name = mono_string_to_utf8 (pb->name);
+               *name = mono_string_to_utf8_checked (pb->name, error);
+               return_if_nok (error);
                *type = mono_reflection_type_get_handle ((MonoReflectionType*)pb->type, error);
        } else {
                MonoReflectionProperty *p = (MonoReflectionProperty *)prop;
@@ -10884,7 +10932,8 @@ get_field_name_and_type (MonoObject *field, char **name, MonoType **type, MonoEr
        MonoClass *klass = mono_object_class (field);
        if (strcmp (klass->name, "FieldBuilder") == 0) {
                MonoReflectionFieldBuilder *fb = (MonoReflectionFieldBuilder *)field;
-               *name = mono_string_to_utf8 (fb->name);
+               *name = mono_string_to_utf8_checked (fb->name, error);
+               return_if_nok (error);
                *type = mono_reflection_type_get_handle ((MonoReflectionType*)fb->type, error);
        } else {
                MonoReflectionField *f = (MonoReflectionField *)field;
@@ -11062,7 +11111,8 @@ handle_enum:
                        *p++ = 0xFF;
                        break;
                }
-               str = mono_string_to_utf8 ((MonoString*)arg);
+               str = mono_string_to_utf8_checked ((MonoString*)arg, error);
+               return_if_nok (error);
                slen = strlen (str);
                if ((p-buffer) + 10 + slen >= *buflen) {
                        char *newbuf;
@@ -11761,8 +11811,13 @@ mono_marshal_spec_from_builder (MonoImage *image, MonoAssembly *assembly,
                        res->data.custom_data.custom_name =
                                type_get_fully_qualified_name (marshaltyperef);
                }
-               if (minfo->mcookie)
-                       res->data.custom_data.cookie = mono_string_to_utf8 (minfo->mcookie);
+               if (minfo->mcookie) {
+                       res->data.custom_data.cookie = mono_string_to_utf8_checked (minfo->mcookie, error);
+                       if (!is_ok (error)) {
+                               image_g_free (image, res);
+                               return NULL;
+                       }
+               }
                break;
 
        default:
@@ -13032,7 +13087,11 @@ reflection_event_builder_get_event_info (MonoReflectionTypeBuilder *tb, MonoRefl
 
        event->parent = klass;
        event->attrs = eb->attrs;
-       event->name = mono_string_to_utf8 (eb->name);
+       event->name = mono_string_to_utf8_checked (eb->name, error);
+       if (!is_ok (error)) {
+               g_free (event);
+               return NULL;
+       }
        if (eb->add_method)
                event->add = eb->add_method->mhandle;
        if (eb->remove_method)
@@ -13846,7 +13905,7 @@ resolve_object (MonoImage *image, MonoObject *obj, MonoClass **handle_class, Mon
                return_val_if_nok (error, NULL);
                *handle_class = mono_defaults.string_class;
                g_assert (result);
-       } else if (strcmp (obj->vtable->klass->name, "MonoType") == 0) {
+       } else if (strcmp (obj->vtable->klass->name, "RuntimeType") == 0) {
                MonoType *type = mono_reflection_type_get_handle ((MonoReflectionType*)obj, error);
                return_val_if_nok (error, NULL);
                MonoClass *mc = mono_class_from_mono_type (type);
@@ -14140,7 +14199,8 @@ resolve_object (MonoImage *image, MonoObject *obj, MonoClass **handle_class, Mon
 
                /* Find the method */
 
-               name = mono_string_to_utf8 (m->name);
+               name = mono_string_to_utf8_checked (m->name, error);
+               return_val_if_nok (error, NULL);
                iter = NULL;
                while ((method = mono_class_get_methods (klass, &iter))) {
                        if (!strcmp (method->name, name))
@@ -14790,10 +14850,11 @@ mono_reflection_call_is_assignable_to (MonoClass *klass, MonoClass *oklass, Mono
        params [0] = mono_type_get_object_checked (mono_domain_get (), &oklass->byval_arg, error);
        return_val_if_nok (error, FALSE);
 
-       res = mono_runtime_try_invoke (method, (MonoObject*)(mono_class_get_ref_info (klass)), params, &exc, error);
+       MonoError inner_error;
+       res = mono_runtime_try_invoke (method, (MonoObject*)(mono_class_get_ref_info (klass)), params, &exc, &inner_error);
 
-       if (exc || !mono_error_ok (error)) {
-               mono_error_cleanup (error);
+       if (exc || !is_ok (&inner_error)) {
+               mono_error_cleanup (&inner_error);
                return FALSE;
        } else
                return *(MonoBoolean*)mono_object_unbox (res);
index e36eed07e37a50b15e863bfdc8808af2cdb19f8c..0afdec6960aa7987fbb77a2c5dc26d6cb18aeb6e 100644 (file)
@@ -504,6 +504,8 @@ mono_marshal_get_remoting_invoke (MonoMethod *method)
 /* mono_marshal_xdomain_copy_out_value()
  * Copies the contents of the src instance into the dst instance. src and dst
  * must have the same type, and if they are arrays, the same size.
+ *
+ * This is an icall, it may use mono_error_set_pending_exception
  */
 static void
 mono_marshal_xdomain_copy_out_value (MonoObject *src, MonoObject *dst)
@@ -523,7 +525,8 @@ mono_marshal_xdomain_copy_out_value (MonoObject *src, MonoObject *dst)
                        for (i = 0; i < len; i++) {
                                MonoObject *item = (MonoObject *)mono_array_get ((MonoArray *)src, gpointer, i);
                                MonoObject *item_copy = mono_marshal_xdomain_copy_value (item, &error);
-                               mono_error_raise_exception (&error); /* FIXME don't raise here */
+                               if (mono_error_set_pending_exception (&error))
+                                       return;
                                mono_array_setref ((MonoArray *)dst, i, item_copy);
                        }
                } else {
@@ -1259,7 +1262,7 @@ mono_marshal_load_remoting_wrapper (MonoRealProxy *rp, MonoMethod *method)
        else
                marshal_method = mono_marshal_get_remoting_invoke (method);
        gpointer compiled_ptr = mono_compile_method_checked (marshal_method, &error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       mono_error_assert_ok (&error);
        return compiled_ptr;
 }
 
@@ -1964,10 +1967,12 @@ mono_marshal_get_proxy_cancast (MonoClass *klass)
 void
 mono_upgrade_remote_class_wrapper (MonoReflectionType *rtype, MonoTransparentProxy *tproxy)
 {
+       MonoError error;
        MonoClass *klass;
        MonoDomain *domain = ((MonoObject*)tproxy)->vtable->domain;
        klass = mono_class_from_mono_type (rtype->type);
-       mono_upgrade_remote_class (domain, (MonoObject*)tproxy, klass);
+       mono_upgrade_remote_class (domain, (MonoObject*)tproxy, klass, &error);
+       mono_error_set_pending_exception (&error);
 }
 
 #else /* DISABLE_REMOTING */
index 3fe3ac04867adab1867989d2365fc0a644e5e930..e3143cc564f100c57a79be6b7903fd167127eaaf 100644 (file)
@@ -363,7 +363,7 @@ get_caller_no_reflection_related (MonoMethod *m, gint32 no, gint32 ilo, gboolean
 
                /* unlike most Invoke* cases InvokeMember is not inside System.Reflection[.Emit] but is SecuritySafeCritical */
                if (((*kname == 'T') && (strcmp (kname, "Type") == 0)) || 
-                       ((*kname == 'M') && (strcmp (kname, "MonoType")) == 0)) {
+                       ((*kname == 'R') && (strcmp (kname, "RuntimeType")) == 0)) {
 
                        /* if calling InvokeMember then we can't stop the stackwalk here and need to look at the caller */
                        if (strcmp (m->name, "InvokeMember") == 0)
index bf8ae7a5acd2a076b43014d82c5113a13a3fc41d..862871c771206b1b1fb73ecf4ccee1ed57bbf895 100644 (file)
@@ -2253,7 +2253,7 @@ static void
 sgen_thread_detach (SgenThreadInfo *p)
 {
        /* If a delegate is passed to native code and invoked on a thread we dont
-        * know about, the jit will register it with mono_jit_thread_attach, but
+        * know about, marshal will register it with mono_threads_attach_coop, but
         * we have no way of knowing when that thread goes away.  SGen has a TSD
         * so we assume that if the domain is still registered, we can detach
         * the thread
index eb272c241d6a56f46d0c307ab2aa1047c33005cf..ae1268c15222bb42c823274af45d475740a2dc0d 100644 (file)
@@ -2647,13 +2647,16 @@ get_addrinfo_family_hint (MonoError *error)
 MonoBoolean
 ves_icall_System_Net_Dns_GetHostByName_internal (MonoString *host, MonoString **h_name, MonoArray **h_aliases, MonoArray **h_addr_list)
 {
+       MonoError error;
        gboolean add_local_ips = FALSE, add_info_ok = TRUE;
        gchar this_hostname [256];
        MonoAddressInfo *info = NULL;
-       char *hostname = mono_string_to_utf8 (host);
-       MonoError error;
        int hint;
 
+       char *hostname = mono_string_to_utf8_checked (host, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
+
        hint = get_addrinfo_family_hint (&error);
        if (!mono_error_ok (&error)) {
                mono_error_set_pending_exception (&error);
@@ -2697,7 +2700,9 @@ ves_icall_System_Net_Dns_GetHostByAddr_internal (MonoString *addr, MonoString **
        gchar hostname [NI_MAXHOST] = { 0 };
        gboolean ret;
 
-       address = mono_string_to_utf8 (addr);
+       address = mono_string_to_utf8_checked (addr, &error);
+       if (mono_error_set_pending_exception (&error))
+               return FALSE;
 
        if (inet_pton (AF_INET, address, &saddr.sin_addr ) == 1) {
                family = AF_INET;
index 1840ac45699797f617d7c851eecee2b8fd168825..b78ca83b28551282d59395dba3d132807871f8c8 100644 (file)
@@ -273,7 +273,7 @@ wait_callback (gint fd, gint events, gpointer user_data)
                        MonoIOSelectorJob *job = get_job_for_event (&list, EVENT_IN);
                        if (job) {
                                mono_threadpool_ms_enqueue_work_item (((MonoObject*) job)->vtable->domain, (MonoObject*) job, &error);
-                               mono_error_raise_exception (&error); /* FIXME don't raise here */
+                               mono_error_assert_ok (&error);
                        }
 
                }
@@ -281,7 +281,7 @@ wait_callback (gint fd, gint events, gpointer user_data)
                        MonoIOSelectorJob *job = get_job_for_event (&list, EVENT_OUT);
                        if (job) {
                                mono_threadpool_ms_enqueue_work_item (((MonoObject*) job)->vtable->domain, (MonoObject*) job, &error);
-                               mono_error_raise_exception (&error); /* FIXME don't raise here */
+                               mono_error_assert_ok (&error);
                        }
                }
 
@@ -348,7 +348,7 @@ selector_thread (gpointer data)
 
                                exists = mono_g_hash_table_lookup_extended (states, GINT_TO_POINTER (fd), &k, (gpointer*) &list);
                                list = mono_mlist_append_checked (list, (MonoObject*) job, &error);
-                               mono_error_raise_exception (&error); /* FIXME don't raise here */
+                               mono_error_assert_ok (&error);
                                mono_g_hash_table_replace (states, GINT_TO_POINTER (fd), list);
 
                                operations = get_operations_for_jobs (list);
@@ -379,7 +379,7 @@ selector_thread (gpointer data)
 
                                        for (; list; list = mono_mlist_remove_item (list, list)) {
                                                mono_threadpool_ms_enqueue_work_item (mono_object_domain (mono_mlist_get_data (list)), mono_mlist_get_data (list), &error);
-                                               mono_error_raise_exception (&error); /* FIXME don't raise here */
+                                               mono_error_assert_ok (&error);
                                        }
 
                                        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_THREADPOOL, "io threadpool: del fd %3d", fd);
index 4cda0e814d52d17bb32ba12f4bc0abc5816b1a85..1f4a6cc605237a36e6f13c3a28acc3c229086dff 100644 (file)
@@ -708,13 +708,15 @@ worker_try_create (void)
 {
        ThreadPoolCounter counter;
        MonoInternalThread *thread;
+       gint64 current_ticks;
        gint32 now;
 
        mono_coop_mutex_lock (&threadpool->worker_creation_lock);
 
        mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_THREADPOOL, "[%p] try create worker", mono_native_thread_id_get ());
-
-       if ((now = mono_100ns_ticks () / 10 / 1000 / 1000) == 0) {
+       current_ticks = mono_100ns_ticks ();
+       now = current_ticks / (10 * 1000 * 1000);
+       if (0 == current_ticks) {
                g_warning ("failed to get 100ns ticks");
        } else {
                if (threadpool->worker_creation_current_second != now) {
@@ -1366,11 +1368,11 @@ mono_threadpool_ms_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMet
 }
 
 MonoObject *
-mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc)
+mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error)
 {
-       MonoError error;
        MonoAsyncCall *ac;
 
+       mono_error_init (error);
        g_assert (exc);
        g_assert (out_args);
 
@@ -1381,7 +1383,7 @@ mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, Mono
        mono_monitor_enter ((MonoObject*) ares);
 
        if (ares->endinvoke_called) {
-               *exc = (MonoObject*) mono_get_exception_invalid_operation (NULL);
+               mono_error_set_invalid_operation(error, "Delegate EndInvoke method called more than once");
                mono_monitor_exit ((MonoObject*) ares);
                return NULL;
        }
@@ -1398,8 +1400,11 @@ mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, Mono
                } else {
                        wait_event = CreateEvent (NULL, TRUE, FALSE, NULL);
                        g_assert(wait_event);
-                       MonoWaitHandle *wait_handle = mono_wait_handle_new (mono_object_domain (ares), wait_event, &error);
-                       mono_error_raise_exception (&error); /* FIXME don't raise here */
+                       MonoWaitHandle *wait_handle = mono_wait_handle_new (mono_object_domain (ares), wait_event, error);
+                       if (!is_ok (error)) {
+                               CloseHandle (wait_event);
+                               return NULL;
+                       }
                        MONO_OBJECT_SETREF (ares, handle, (MonoObject*) wait_handle);
                }
                mono_monitor_exit ((MonoObject*) ares);
index 9812ee57ba2a989617ac1b96f54997a3cc3c0b58..1603e3a15d998d18b152aa88eb104ec6e4ee1e03 100644 (file)
@@ -17,7 +17,7 @@ mono_threadpool_ms_cleanup (void);
 MonoAsyncResult *
 mono_threadpool_ms_begin_invoke (MonoDomain *domain, MonoObject *target, MonoMethod *method, gpointer *params, MonoError *error);
 MonoObject *
-mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc);
+mono_threadpool_ms_end_invoke (MonoAsyncResult *ares, MonoArray **out_args, MonoObject **exc, MonoError *error);
 
 gboolean
 mono_threadpool_ms_remove_domain_jobs (MonoDomain *domain, int timeout);
index 9cc43855c299a0f3142330d6a7e264a171f84be8..68f8ec7851c3e1a13fa19f43c8aae37e285c6454 100644 (file)
@@ -193,6 +193,7 @@ MonoInternalThread *mono_thread_internal_current (void);
 void mono_thread_internal_check_for_interruption_critical (MonoInternalThread *thread);
 
 void mono_thread_internal_stop (MonoInternalThread *thread);
+void mono_thread_internal_abort (MonoInternalThread *thread);
 
 gboolean mono_thread_internal_has_appdomain_ref (MonoInternalThread *thread, MonoDomain *domain);
 
@@ -201,7 +202,7 @@ void mono_thread_internal_reset_abort (MonoInternalThread *thread);
 void mono_thread_internal_unhandled_exception (MonoObject* exc);
 
 void mono_alloc_special_static_data_free (GHashTable *special_static_fields);
-void mono_thread_current_check_pending_interrupt (void);
+gboolean mono_thread_current_check_pending_interrupt (void);
 
 void mono_thread_set_state (MonoInternalThread *thread, MonoThreadState state);
 void mono_thread_clr_state (MonoInternalThread *thread, MonoThreadState state);
@@ -247,7 +248,7 @@ gboolean
 mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, MonoError *error);
 
 MonoThread *
-mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *error);
+mono_thread_attach_full (MonoDomain *domain, gboolean force_attach);
 
 void mono_thread_init_tls (void);
 
@@ -260,4 +261,10 @@ void mono_thread_detach_internal (MonoInternalThread *thread);
 
 void ves_icall_System_Threading_Thread_GetStackTraces (MonoArray **out_threads, MonoArray **out_stack_traces);
 
+MONO_API gpointer
+mono_threads_attach_coop (MonoDomain *domain, gpointer *dummy);
+
+MONO_API void
+mono_threads_detach_coop (gpointer cookie, gpointer *dummy);
+
 #endif /* _MONO_METADATA_THREADS_TYPES_H_ */
index 0c8282ce3e773d049cf2f347ae72173ae5215b46..09aaa07610efa27ade59aa16d8f97fb99f3e23cd 100644 (file)
@@ -41,6 +41,8 @@
 #include <mono/utils/mono-tls.h>
 #include <mono/utils/atomic.h>
 #include <mono/utils/mono-memory-model.h>
+#include <mono/utils/mono-threads-coop.h>
+#include <mono/utils/mono-error-internals.h>
 
 #include <mono/metadata/gc-internals.h>
 #include <mono/metadata/reflection-internals.h>
@@ -79,15 +81,6 @@ extern int tkill (pid_t tid, int signal);
 #define LOCK_THREAD(thread) lock_thread((thread))
 #define UNLOCK_THREAD(thread) unlock_thread((thread))
 
-/* Provide this for systems with glib < 2.6 */
-#ifndef G_GSIZE_FORMAT
-#   if GLIB_SIZEOF_LONG == 8
-#       define G_GSIZE_FORMAT "lu"
-#   else
-#       define G_GSIZE_FORMAT "u"
-#   endif
-#endif
-
 typedef struct
 {
        guint32 (*func)(void *);
@@ -204,7 +197,7 @@ static void mono_init_static_data_info (StaticDataInfo *static_data);
 static guint32 mono_alloc_static_data_slot (StaticDataInfo *static_data, guint32 size, guint32 align);
 static gboolean mono_thread_resume (MonoInternalThread* thread);
 static void async_abort_internal (MonoInternalThread *thread, gboolean install_async_abort);
-static void self_abort_internal (void);
+static void self_abort_internal (MonoError *error);
 static void async_suspend_internal (MonoInternalThread *thread, gboolean interrupt);
 static void self_suspend_internal (void);
 
@@ -581,21 +574,22 @@ set_current_thread_for_domain (MonoDomain *domain, MonoInternalThread *thread, M
 }
 
 static MonoThread*
-create_thread_object (MonoDomain *domain, MonoError *error)
+create_thread_object (MonoDomain *domain)
 {
+       MonoError error;
        MonoVTable *vt = mono_class_vtable (domain, mono_defaults.thread_class);
-       MonoThread *t = (MonoThread*)mono_object_new_mature (vt, error);
+       MonoThread *t = (MonoThread*)mono_object_new_mature (vt, &error);
+       /* only possible failure mode is OOM, from which we don't expect to recover. */
+       mono_error_assert_ok (&error);
        return t;
 }
 
 static MonoThread*
-new_thread_with_internal (MonoDomain *domain, MonoInternalThread *internal, MonoError *error)
+new_thread_with_internal (MonoDomain *domain, MonoInternalThread *internal)
 {
        MonoThread *thread;
 
-       thread = create_thread_object (domain, error);
-       if (!mono_error_ok (error))
-               return NULL;
+       thread = create_thread_object (domain);
 
        MONO_OBJECT_SETREF (thread, internal_thread, internal);
 
@@ -603,15 +597,16 @@ new_thread_with_internal (MonoDomain *domain, MonoInternalThread *internal, Mono
 }
 
 static MonoInternalThread*
-create_internal_thread (MonoError *error)
+create_internal_thread (void)
 {
+       MonoError error;
        MonoInternalThread *thread;
        MonoVTable *vt;
 
        vt = mono_class_vtable (mono_get_root_domain (), mono_defaults.internal_thread_class);
-       thread = (MonoInternalThread*) mono_object_new_mature (vt, error);
-       if (!mono_error_ok (error))
-               return NULL;
+       thread = (MonoInternalThread*) mono_object_new_mature (vt, &error);
+       /* only possible failure mode is OOM, from which we don't exect to recover */
+       mono_error_assert_ok (&error);
 
        thread->synch_cs = g_new0 (MonoCoopMutex, 1);
        mono_coop_mutex_init_recursive (thread->synch_cs);
@@ -627,14 +622,12 @@ create_internal_thread (MonoError *error)
 }
 
 static gboolean
-init_root_domain_thread (MonoInternalThread *thread, MonoThread *candidate, MonoError *error)
+init_root_domain_thread (MonoInternalThread *thread, MonoThread *candidate)
 {
        MonoDomain *domain = mono_get_root_domain ();
 
-       mono_error_init (error);
        if (!candidate || candidate->obj.vtable->domain != domain) {
-               candidate = new_thread_with_internal (domain, thread, error);
-               return_val_if_nok (error, FALSE);
+               candidate = new_thread_with_internal (domain, thread);
        }
        set_current_thread_for_domain (domain, thread, candidate);
        g_assert (!thread->root_domain_thread);
@@ -693,8 +686,7 @@ static guint32 WINAPI start_wrapper_internal(void *data)
        /* We have to do this here because mono_thread_new_init()
           requires that root_domain_thread is set up. */
        thread_adjust_static_data (internal);
-       init_root_domain_thread (internal, start_info->obj, &error);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       init_root_domain_thread (internal, start_info->obj);
 
        /* This MUST be called before any managed code can be
         * executed, as it calls the callback function that (for the
@@ -934,11 +926,9 @@ mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, gb
 
        mono_error_init (error);
 
-       thread = create_thread_object (domain, error);
-       return_val_if_nok (error, NULL);
+       thread = create_thread_object (domain);
 
-       internal = create_internal_thread (error);
-       return_val_if_nok (error, NULL);
+       internal = create_internal_thread ();
 
        MONO_OBJECT_SETREF (thread, internal_thread, internal);
 
@@ -976,15 +966,13 @@ mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, Mon
 MonoThread *
 mono_thread_attach (MonoDomain *domain)
 {
-       MonoError error;
-       MonoThread *thread = mono_thread_attach_full (domain, FALSE, &error);
-       mono_error_raise_exception (&error);
+       MonoThread *thread = mono_thread_attach_full (domain, FALSE);
 
        return thread;
 }
 
 MonoThread *
-mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *error)
+mono_thread_attach_full (MonoDomain *domain, gboolean force_attach)
 {
        MonoThreadInfo *info;
        MonoInternalThread *thread;
@@ -992,8 +980,6 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *e
        HANDLE thread_handle;
        MonoNativeThreadId tid;
 
-       mono_error_init (error);
-
        if ((thread = mono_thread_internal_current ())) {
                if (domain != mono_domain_get ())
                        mono_domain_set (domain, TRUE);
@@ -1005,9 +991,7 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *e
                g_error ("Thread %"G_GSIZE_FORMAT" calling into managed code is not registered with the GC. On UNIX, this can be fixed by #include-ing <gc.h> before <pthread.h> in the file containing the thread creation code.", mono_native_thread_id_get ());
        }
 
-       thread = create_internal_thread (error);
-       if (!mono_error_ok (error))
-               return NULL;
+       thread = create_internal_thread ();
 
        thread_handle = mono_thread_info_open_handle ();
        g_assert (thread_handle);
@@ -1025,9 +1009,7 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *e
        thread->thread_info = info;
        thread->small_id = info->small_id;
 
-       current_thread = new_thread_with_internal (domain, thread, error);
-       if (!mono_error_ok (error))
-               return NULL;
+       current_thread = new_thread_with_internal (domain, thread);
 
        if (!handle_store (current_thread, force_attach)) {
                /* Mono is shutting down, so just wait for the end */
@@ -1042,8 +1024,7 @@ mono_thread_attach_full (MonoDomain *domain, gboolean force_attach, MonoError *e
 
        thread_adjust_static_data (thread);
 
-       init_root_domain_thread (thread, current_thread, error);
-       return_val_if_nok (error, NULL);
+       init_root_domain_thread (thread, current_thread);
 
        if (domain != mono_get_root_domain ())
                set_current_thread_for_domain (domain, thread, current_thread);
@@ -1135,12 +1116,9 @@ mono_thread_exit ()
 void
 ves_icall_System_Threading_Thread_ConstructInternalThread (MonoThread *this_obj)
 {
-       MonoError error;
        MonoInternalThread *internal;
 
-       internal = create_internal_thread (&error);
-       if (mono_error_set_pending_exception (&error))
-               return;
+       internal = create_internal_thread ();
 
        internal->state = ThreadState_Unstarted;
 
@@ -1235,7 +1213,8 @@ ves_icall_System_Threading_Thread_Sleep_internal(gint32 ms)
 
        THREAD_DEBUG (g_message ("%s: Sleeping for %d ms", __func__, ms));
 
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return;
 
        while (TRUE) {
                gboolean alerted = FALSE;
@@ -1407,7 +1386,8 @@ mono_thread_set_name_internal (MonoInternalThread *this_obj, MonoString *name, g
        UNLOCK_THREAD (this_obj);
 
        if (this_obj->name && this_obj->tid) {
-               char *tname = mono_string_to_utf8 (name);
+               char *tname = mono_string_to_utf8_checked (name, error);
+               return_if_nok (error);
                mono_profiler_thread_name (this_obj->tid, tname);
                mono_native_thread_set_name (thread_get_tid (this_obj), tname);
                mono_free (tname);
@@ -1498,7 +1478,6 @@ ves_icall_System_Threading_Thread_ByteArrayToCurrentDomain (MonoArray *arr)
 MonoThread *
 mono_thread_current (void)
 {
-       MonoError error;
        MonoDomain *domain = mono_domain_get ();
        MonoInternalThread *internal = mono_thread_internal_current ();
        MonoThread **current_thread_ptr;
@@ -1508,8 +1487,7 @@ mono_thread_current (void)
 
        if (!*current_thread_ptr) {
                g_assert (domain != mono_get_root_domain ());
-               *current_thread_ptr = new_thread_with_internal (domain, internal, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               *current_thread_ptr = new_thread_with_internal (domain, internal);
        }
        return *current_thread_ptr;
 }
@@ -1518,7 +1496,6 @@ mono_thread_current (void)
 static MonoThread *
 mono_thread_current_for_thread (MonoInternalThread *internal)
 {
-       MonoError error;
        MonoDomain *domain = mono_domain_get ();
        MonoThread **current_thread_ptr;
 
@@ -1527,8 +1504,7 @@ mono_thread_current_for_thread (MonoInternalThread *internal)
 
        if (!*current_thread_ptr) {
                g_assert (domain != mono_get_root_domain ());
-               *current_thread_ptr = new_thread_with_internal (domain, internal, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               *current_thread_ptr = new_thread_with_internal (domain, internal);
        }
        return *current_thread_ptr;
 }
@@ -1549,7 +1525,8 @@ ves_icall_System_Threading_Thread_Join_internal(MonoThread *this_obj, int ms)
        MonoInternalThread *cur_thread = mono_thread_internal_current ();
        gboolean ret;
 
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return FALSE;
 
        LOCK_THREAD (thread);
        
@@ -1586,8 +1563,17 @@ ves_icall_System_Threading_Thread_Join_internal(MonoThread *this_obj, int ms)
        return(FALSE);
 }
 
+#define MANAGED_WAIT_FAILED 0x7fffffff
+
 static gint32
-mono_wait_uninterrupted (MonoInternalThread *thread, gboolean multiple, guint32 numhandles, gpointer *handles, gboolean waitall, gint32 ms, gboolean alertable)
+map_native_wait_result_to_managed (gint32 val)
+{
+       /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
+       return val == WAIT_FAILED ? MANAGED_WAIT_FAILED : val;
+}
+
+static gint32
+mono_wait_uninterrupted (MonoInternalThread *thread, guint32 numhandles, gpointer *handles, gboolean waitall, gint32 ms, MonoError *error)
 {
        MonoException *exc;
        guint32 ret;
@@ -1595,21 +1581,25 @@ mono_wait_uninterrupted (MonoInternalThread *thread, gboolean multiple, guint32
        gint32 diff_ms;
        gint32 wait = ms;
 
+       mono_error_init (error);
+
        start = (ms == -1) ? 0 : mono_100ns_ticks ();
        do {
                MONO_ENTER_GC_SAFE;
-                       if (multiple)
-                       ret = WaitForMultipleObjectsEx (numhandles, handles, waitall, wait, alertable);
+               if (numhandles != 1)
+                       ret = WaitForMultipleObjectsEx (numhandles, handles, waitall, wait, TRUE);
                else
-                       ret = WaitForSingleObjectEx (handles [0], ms, alertable);
+                       ret = WaitForSingleObjectEx (handles [0], ms, TRUE);
                MONO_EXIT_GC_SAFE;
 
                if (ret != WAIT_IO_COMPLETION)
                        break;
 
                exc = mono_thread_execute_interruption ();
-               if (exc)
-                       mono_raise_exception (exc);
+               if (exc) {
+                       mono_error_set_exception_instance (error, exc);
+                       break;
+               }
 
                if (ms == -1)
                        continue;
@@ -1628,6 +1618,7 @@ mono_wait_uninterrupted (MonoInternalThread *thread, gboolean multiple, guint32
 
 gint32 ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_handles, gint32 ms)
 {
+       MonoError error;
        HANDLE *handles;
        guint32 numhandles;
        guint32 ret;
@@ -1636,7 +1627,8 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_ha
        MonoInternalThread *thread = mono_thread_internal_current ();
 
        /* Do this WaitSleepJoin check before creating objects */
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return map_native_wait_result_to_managed (WAIT_FAILED);
 
        /* We fail in managed if the array has more than 64 elements */
        numhandles = (guint32)mono_array_length(mono_handles);
@@ -1652,19 +1644,22 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitAll_internal(MonoArray *mono_ha
        }
 
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
-       
-       ret = mono_wait_uninterrupted (thread, TRUE, numhandles, handles, TRUE, ms, TRUE);
+
+       ret = mono_wait_uninterrupted (thread, numhandles, handles, TRUE, ms, &error);
 
        mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
 
        g_free(handles);
 
+       mono_error_set_pending_exception (&error);
+
        /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
-       return ret == WAIT_FAILED ? 0x7fffffff : ret;
+       return map_native_wait_result_to_managed (ret);
 }
 
 gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_handles, gint32 ms)
 {
+       MonoError error;
        HANDLE handles [MAXIMUM_WAIT_OBJECTS];
        uintptr_t numhandles;
        guint32 ret;
@@ -1673,11 +1668,12 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_ha
        MonoInternalThread *thread = mono_thread_internal_current ();
 
        /* Do this WaitSleepJoin check before creating objects */
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return map_native_wait_result_to_managed (WAIT_FAILED);
 
        numhandles = mono_array_length(mono_handles);
        if (numhandles > MAXIMUM_WAIT_OBJECTS)
-               return WAIT_FAILED;
+               return map_native_wait_result_to_managed (WAIT_FAILED);
 
        for(i = 0; i < numhandles; i++) {       
                waitHandle = mono_array_get(mono_handles, MonoObject*, i);
@@ -1690,29 +1686,31 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitAny_internal(MonoArray *mono_ha
 
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
 
-       ret = mono_wait_uninterrupted (thread, TRUE, numhandles, handles, FALSE, ms, TRUE);
+       ret = mono_wait_uninterrupted (thread, numhandles, handles, FALSE, ms, &error);
 
        mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
 
        THREAD_WAIT_DEBUG (g_message ("%s: (%"G_GSIZE_FORMAT") returning %d", __func__, mono_native_thread_id_get (), ret));
 
+       mono_error_set_pending_exception (&error);
        /*
         * These need to be here.  See MSDN dos on WaitForMultipleObjects.
         */
        if (ret >= WAIT_OBJECT_0 && ret <= WAIT_OBJECT_0 + numhandles - 1) {
-               return ret - WAIT_OBJECT_0;
+               return map_native_wait_result_to_managed (ret - WAIT_OBJECT_0);
        }
        else if (ret >= WAIT_ABANDONED_0 && ret <= WAIT_ABANDONED_0 + numhandles - 1) {
-               return ret - WAIT_ABANDONED_0;
+               return map_native_wait_result_to_managed (ret - WAIT_ABANDONED_0);
        }
        else {
                /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
-               return ret == WAIT_FAILED ? 0x7fffffff : ret;
+               return map_native_wait_result_to_managed (ret);
        }
 }
 
 gint32 ves_icall_System_Threading_WaitHandle_WaitOne_internal(HANDLE handle, gint32 ms)
 {
+       MonoError error;
        guint32 ret;
        MonoInternalThread *thread = mono_thread_internal_current ();
 
@@ -1722,16 +1720,17 @@ gint32 ves_icall_System_Threading_WaitHandle_WaitOne_internal(HANDLE handle, gin
                ms=INFINITE;
        }
        
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return map_native_wait_result_to_managed (WAIT_FAILED);
 
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
        
-       ret = mono_wait_uninterrupted (thread, FALSE, 1, &handle, FALSE, ms, TRUE);
+       ret = mono_wait_uninterrupted (thread, 1, &handle, FALSE, ms, &error);
        
        mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
-       
-       /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
-       return ret == WAIT_FAILED ? 0x7fffffff : ret;
+
+       mono_error_set_pending_exception (&error);
+       return map_native_wait_result_to_managed (ret);
 }
 
 gint32
@@ -1743,7 +1742,8 @@ ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (HANDLE toSignal, H
        if (ms == -1)
                ms = INFINITE;
 
-       mono_thread_current_check_pending_interrupt ();
+       if (mono_thread_current_check_pending_interrupt ())
+               return map_native_wait_result_to_managed (WAIT_FAILED);
 
        mono_thread_set_state (thread, ThreadState_WaitSleepJoin);
        
@@ -1753,8 +1753,7 @@ ves_icall_System_Threading_WaitHandle_SignalAndWait_Internal (HANDLE toSignal, H
        
        mono_thread_clr_state (thread, ThreadState_WaitSleepJoin);
 
-       /* WAIT_FAILED in waithandle.cs is different from WAIT_FAILED in Win32 API */
-       return ret == WAIT_FAILED ? 0x7fffffff : ret;
+       return map_native_wait_result_to_managed (ret);
 }
 
 HANDLE ves_icall_System_Threading_Mutex_CreateMutex_internal (MonoBoolean owned, MonoString *name, MonoBoolean *created)
@@ -2185,7 +2184,15 @@ void ves_icall_System_Threading_Thread_Interrupt_internal (MonoThread *this_obj)
        }
 }
 
-void mono_thread_current_check_pending_interrupt ()
+/**
+ * mono_thread_current_check_pending_interrupt:
+ *
+ * Checks if there's a interruption request and set the pending exception if so.
+ *
+ * @returns true if a pending exception was set
+ */
+gboolean
+mono_thread_current_check_pending_interrupt (void)
 {
        MonoInternalThread *thread = mono_thread_internal_current ();
        gboolean throw_ = FALSE;
@@ -2199,13 +2206,13 @@ void mono_thread_current_check_pending_interrupt ()
        
        UNLOCK_THREAD (thread);
 
-       if (throw_) {
-               mono_raise_exception (mono_get_exception_thread_interrupted ());
-       }
+       if (throw_)
+               mono_set_pending_exception (mono_get_exception_thread_interrupted ());
+       return throw_;
 }
 
-void
-ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject *state)
+static gboolean
+request_thread_abort (MonoInternalThread *thread, MonoObject *state)
 {
        LOCK_THREAD (thread);
        
@@ -2214,13 +2221,13 @@ ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject
                (thread->state & ThreadState_Stopped) != 0)
        {
                UNLOCK_THREAD (thread);
-               return;
+               return FALSE;
        }
 
        if ((thread->state & ThreadState_Unstarted) != 0) {
                thread->state |= ThreadState_Aborted;
                UNLOCK_THREAD (thread);
-               return;
+               return FALSE;
        }
 
        thread->state |= ThreadState_AbortRequested;
@@ -2242,11 +2249,39 @@ ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject
                mono_thread_resume (thread);
 
        UNLOCK_THREAD (thread);
+       return TRUE;
+}
 
-       if (thread == mono_thread_internal_current ())
-               self_abort_internal ();
-       else
+void
+ves_icall_System_Threading_Thread_Abort (MonoInternalThread *thread, MonoObject *state)
+{
+       if (!request_thread_abort (thread, state))
+               return;
+
+       if (thread == mono_thread_internal_current ()) {
+               MonoError error;
+               self_abort_internal (&error);
+               mono_error_set_pending_exception (&error);
+       } else {
                async_abort_internal (thread, TRUE);
+       }
+}
+
+/**
+ * mono_thread_internal_abort:
+ *
+ * Request thread @thread to be aborted.
+ *
+ * @thread MUST NOT be the current thread.
+ */
+void
+mono_thread_internal_abort (MonoInternalThread *thread)
+{
+       g_assert (thread != mono_thread_internal_current ());
+
+       if (!request_thread_abort (thread, NULL))
+               return;
+       async_abort_internal (thread, TRUE);
 }
 
 void
@@ -2446,7 +2481,8 @@ is_running_protected_wrapper (void)
        return found;
 }
 
-void mono_thread_internal_stop (MonoInternalThread *thread)
+static gboolean
+request_thread_stop (MonoInternalThread *thread)
 {
        LOCK_THREAD (thread);
 
@@ -2454,7 +2490,7 @@ void mono_thread_internal_stop (MonoInternalThread *thread)
                (thread->state & ThreadState_Stopped) != 0)
        {
                UNLOCK_THREAD (thread);
-               return;
+               return FALSE;
        }
        
        /* Make sure the thread is awake */
@@ -2464,16 +2500,45 @@ void mono_thread_internal_stop (MonoInternalThread *thread)
        thread->state &= ~ThreadState_AbortRequested;
        
        UNLOCK_THREAD (thread);
+       return TRUE;
+}
+
+/**
+ * mono_thread_internal_stop:
+ *
+ * Request thread @thread to stop.
+ *
+ * @thread MUST NOT be the current thread.
+ */
+void
+mono_thread_internal_stop (MonoInternalThread *thread)
+{
+       g_assert (thread != mono_thread_internal_current ());
+
+       if (!request_thread_stop (thread))
+               return;
        
-       if (thread == mono_thread_internal_current ())
-               self_abort_internal ();
-       else
-               async_abort_internal (thread, TRUE);
+       async_abort_internal (thread, TRUE);
 }
 
 void mono_thread_stop (MonoThread *thread)
 {
-       mono_thread_internal_stop (thread->internal_thread);
+       MonoInternalThread *internal = thread->internal_thread;
+
+       if (!request_thread_stop (internal))
+               return;
+       
+       if (internal == mono_thread_internal_current ()) {
+               MonoError error;
+               self_abort_internal (&error);
+               /*
+               This function is part of the embeding API and has no way to return the exception
+               to be thrown. So what we do is keep the old behavior and raise the exception.
+               */
+               mono_error_raise_exception (&error);
+       } else {
+               async_abort_internal (internal, TRUE);
+       }
 }
 
 gint8
@@ -3532,10 +3597,9 @@ mono_threads_perform_thread_dump (void)
 }
 
 /* Obtain the thread dump of all threads */
-static void
-mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_frames)
+static gboolean
+mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_frames, MonoError *error)
 {
-       MonoError error;
 
        ThreadDumpUserData ud;
        MonoInternalThread *thread_array [128];
@@ -3543,7 +3607,7 @@ mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_fra
        MonoDebugSourceLocation *location;
        int tindex, nthreads;
 
-       mono_error_init (&error);
+       mono_error_init (error);
        
        *out_threads = NULL;
        *out_stack_frames = NULL;
@@ -3555,11 +3619,11 @@ mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_fra
        ud.frames = g_new0 (MonoStackFrameInfo, 256);
        ud.max_frames = 256;
 
-       *out_threads = mono_array_new_checked (domain, mono_defaults.thread_class, nthreads, &error);
-       if (!is_ok (&error))
+       *out_threads = mono_array_new_checked (domain, mono_defaults.thread_class, nthreads, error);
+       if (!is_ok (error))
                goto leave;
-       *out_stack_frames = mono_array_new_checked (domain, mono_defaults.array_class, nthreads, &error);
-       if (!is_ok (&error))
+       *out_stack_frames = mono_array_new_checked (domain, mono_defaults.array_class, nthreads, error);
+       if (!is_ok (error))
                goto leave;
 
        for (tindex = 0; tindex < nthreads; ++tindex) {
@@ -3579,16 +3643,16 @@ mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_fra
 
                mono_array_setref_fast (*out_threads, tindex, mono_thread_current_for_thread (thread));
 
-               thread_frames = mono_array_new_checked (domain, mono_defaults.stack_frame_class, ud.nframes, &error);
-               if (!is_ok (&error))
+               thread_frames = mono_array_new_checked (domain, mono_defaults.stack_frame_class, ud.nframes, error);
+               if (!is_ok (error))
                        goto leave;
                mono_array_setref_fast (*out_stack_frames, tindex, thread_frames);
 
                for (i = 0; i < ud.nframes; ++i) {
                        MonoStackFrameInfo *frame = &ud.frames [i];
                        MonoMethod *method = NULL;
-                       MonoStackFrame *sf = (MonoStackFrame *)mono_object_new_checked (domain, mono_defaults.stack_frame_class, &error);
-                       if (!mono_error_ok (&error))
+                       MonoStackFrame *sf = (MonoStackFrame *)mono_object_new_checked (domain, mono_defaults.stack_frame_class, error);
+                       if (!is_ok (error))
                                goto leave;
 
                        sf->native_offset = frame->native_offset;
@@ -3599,8 +3663,9 @@ mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_fra
                        if (method) {
                                sf->method_address = (gsize) frame->ji->code_start;
 
-                               MonoReflectionMethod *rm = mono_method_get_object_checked (domain, method, NULL, &error);
-                               mono_error_raise_exception (&error); /* FIXME don't raise here */
+                               MonoReflectionMethod *rm = mono_method_get_object_checked (domain, method, NULL, error);
+                               if (!is_ok (error))
+                                       goto leave;
                                MONO_OBJECT_SETREF (sf, method, rm);
 
                                location = mono_debug_lookup_source_location (method, frame->native_offset, domain);
@@ -3623,7 +3688,7 @@ mono_threads_get_thread_dump (MonoArray **out_threads, MonoArray **out_stack_fra
 
 leave:
        g_free (ud.frames);
-       mono_error_raise_exception (&error); /* FIXME don't raise here */
+       return is_ok (error);
 }
 
 /**
@@ -3821,7 +3886,7 @@ mono_threads_abort_appdomain_threads (MonoDomain *domain, int timeout)
                if (user_data.wait.num > 0) {
                        /* Abort the threads outside the threads lock */
                        for (i = 0; i < user_data.wait.num; ++i)
-                               ves_icall_System_Threading_Thread_Abort (user_data.wait.threads [i], NULL);
+                               mono_thread_internal_abort (user_data.wait.threads [i]);
 
                        /*
                         * We should wait for the threads either to abort, or to leave the
@@ -4339,17 +4404,6 @@ mono_alloc_special_static_data_free (GHashTable *special_static_fields)
        mono_threads_unlock ();
 }
 
-static void
-mono_special_static_data_free_slot (guint32 offset, guint32 size)
-{
-       /* Only ever called for ThreadLocal instances */
-       g_assert (ACCESS_SPECIAL_STATIC_OFFSET (offset, type) == SPECIAL_STATIC_OFFSET_TYPE_THREAD);
-
-       mono_threads_lock ();
-       do_free_special_slot (offset, size);
-       mono_threads_unlock ();
-}
-
 #ifdef HOST_WIN32
 static void CALLBACK dummy_apc (ULONG_PTR param)
 {
@@ -4778,18 +4832,20 @@ async_abort_internal (MonoInternalThread *thread, gboolean install_async_abort)
 }
 
 static void
-self_abort_internal (void)
+self_abort_internal (MonoError *error)
 {
        MonoException *exc;
 
+       mono_error_init (error);
+
        /* FIXME this is insanely broken, it doesn't cause interruption to happen synchronously
         * since passing FALSE to mono_thread_request_interruption makes sure it returns NULL */
 
        exc = mono_thread_request_interruption (TRUE);
        if (exc)
-               mono_raise_exception (exc);
-
-       mono_thread_info_self_interrupt ();
+               mono_error_set_exception_instance (error, exc);
+       else
+               mono_thread_info_self_interrupt ();
 }
 
 typedef struct {
@@ -5012,5 +5068,105 @@ mono_thread_internal_unhandled_exception (MonoObject* exc)
 void
 ves_icall_System_Threading_Thread_GetStackTraces (MonoArray **out_threads, MonoArray **out_stack_traces)
 {
-       mono_threads_get_thread_dump (out_threads, out_stack_traces);
+       MonoError error;
+       mono_threads_get_thread_dump (out_threads, out_stack_traces, &error);
+       mono_error_set_pending_exception (&error);
+}
+
+/*
+ * mono_threads_attach_coop: called by native->managed wrappers
+ *
+ * In non-coop mode:
+ *  - @dummy: is NULL
+ *  - @return: the original domain which needs to be restored, or NULL.
+ *
+ * In coop mode:
+ *  - @dummy: contains the original domain
+ *  - @return: a cookie containing current MonoThreadInfo*.
+ */
+gpointer
+mono_threads_attach_coop (MonoDomain *domain, gpointer *dummy)
+{
+       MonoDomain *orig;
+       gboolean fresh_thread;
+
+       if (!domain) {
+               /* Happens when called from AOTed code which is only used in the root domain. */
+               domain = mono_get_root_domain ();
+       }
+
+       g_assert (domain);
+
+       /* On coop, when we detached, we moved the thread from  RUNNING->BLOCKING.
+        * If we try to reattach we do a BLOCKING->RUNNING transition.  If the thread
+        * is fresh, mono_thread_attach() will do a STARTING->RUNNING transition so
+        * we're only responsible for making the cookie. */
+       if (mono_threads_is_coop_enabled ()) {
+               MonoThreadInfo *info = mono_thread_info_current_unchecked ();
+               fresh_thread = !info || !mono_thread_info_is_live (info);
+       }
+
+       if (!mono_thread_internal_current ()) {
+               mono_thread_attach_full (domain, FALSE);
+
+               // #678164
+               mono_thread_set_state (mono_thread_internal_current (), ThreadState_Background);
+       }
+
+       orig = mono_domain_get ();
+       if (orig != domain)
+               mono_domain_set (domain, TRUE);
+
+       if (!mono_threads_is_coop_enabled ())
+               return orig != domain ? orig : NULL;
+
+       if (fresh_thread) {
+               *dummy = NULL;
+               /* mono_thread_attach put the thread in RUNNING mode from STARTING, but we need to
+                * return the right cookie. */
+               return mono_threads_enter_gc_unsafe_region_cookie (mono_thread_info_current ());
+       } else {
+               *dummy = orig;
+               /* thread state (BLOCKING|RUNNING) -> RUNNING */
+               return mono_threads_enter_gc_unsafe_region (dummy);
+       }
+}
+
+/*
+ * mono_threads_detach_coop: called by native->managed wrappers
+ *
+ * In non-coop mode:
+ *  - @cookie: the original domain which needs to be restored, or NULL.
+ *  - @dummy: is NULL
+ *
+ * In coop mode:
+ *  - @cookie: contains current MonoThreadInfo* if it was in BLOCKING mode, NULL otherwise
+ *  - @dummy: contains the original domain
+ */
+void
+mono_threads_detach_coop (gpointer cookie, gpointer *dummy)
+{
+       MonoDomain *domain, *orig;
+
+       if (!mono_threads_is_coop_enabled ()) {
+               orig = (MonoDomain*) cookie;
+               if (orig)
+                       mono_domain_set (orig, TRUE);
+       } else {
+               orig = (MonoDomain*) *dummy;
+
+               domain = mono_domain_get ();
+               g_assert (domain);
+
+               /* it won't do anything if cookie is NULL
+                * thread state RUNNING -> (RUNNING|BLOCKING) */
+               mono_threads_exit_gc_unsafe_region (cookie, dummy);
+
+               if (orig != domain) {
+                       if (!orig)
+                               mono_domain_unset ();
+                       else
+                               mono_domain_set (orig, TRUE);
+               }
+       }
 }
index 5a0c79c7cca732b1ffeff80292a6ad943d1114e5..b72072f3246ca5e69329de13afb80229699d5699 100644 (file)
@@ -30,7 +30,7 @@ extern MONO_API MonoThread *mono_thread_current (void);
 extern MONO_API void        mono_thread_set_main (MonoThread *thread);
 extern MONO_API MonoThread *mono_thread_get_main (void);
 
-extern MONO_API void mono_thread_stop (MonoThread *thread);
+extern MONO_RT_EXTERNAL_ONLY MONO_API void mono_thread_stop (MonoThread *thread);
 
 extern MONO_API void mono_thread_new_init (intptr_t tid, void* stack_start,
                                  void* func);
index ce3c864090f6279345a817fbd51bb370d4d85b29..00aa6bca6c50da2b9467a010dcb29b4b741a27f3 100755 (executable)
@@ -49,7 +49,7 @@ MINI_RUNTIME = MONO_PATH=$(CLASS) $(RUNTIME_EXECUTABLE)
 RUNTIME_AOTCHECK = MONO_PATH="$(CLASS)$(PLATFORM_PATH_SEPARATOR)." $(RUNTIME_EXECUTABLE)
 
 CSC = $(mcs_topdir)/class/lib/build/mcs.exe
-MCS = CSC_SDK_PATH_DISABLED= $(MINI_RUNTIME) $(CSC) -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll
+MCS = CSC_SDK_PATH_DISABLED= $(MINI_RUNTIME) $(CSC) -unsafe -nowarn:0162 -nologo -noconfig -r:$(CLASS)/mscorlib.dll -r:$(CLASS)/System.dll -r:$(CLASS)/System.Core.dll
 ILASM = $(MINI_RUNTIME) $(CLASS)/ilasm.exe
 
 AM_CFLAGS = \
@@ -340,6 +340,7 @@ arm64_sources = \
        exceptions-arm64.c      \
        tramp-arm64.c   \
        mini-arm64-gsharedvt.c  \
+       mini-arm64-gsharedvt.h  \
        tramp-arm64-gsharedvt.c
 
 mips_sources = \
@@ -825,7 +826,11 @@ version.h: Makefile
        if test -d $(top_srcdir)/.git; then \
                (cd $(top_srcdir); \
                        LANG=C; export LANG; \
-                       branch=`git branch | grep '^\*' | sed 's/(detached from .*/explicit/' | cut -d ' ' -f 2`; \
+                       if test -z "$$ghprbPullId"; then \
+                               branch=`git branch | grep '^\*' | sed 's/(detached from .*/explicit/' | cut -d ' ' -f 2`; \
+                       else \
+                               branch="pull-request-$$ghprbPullId"; \
+                       fi; \
                        version=`git log --no-color --first-parent -n1 --pretty=format:%h`; \
                        echo "#define FULL_VERSION \"$$branch/$$version\""; \
                ); \
index 9c2ca7090e60162999c6bbf33bfbac7007254806..4ae5c894de5db2ba6175c0fa7e611c39767fd189 100644 (file)
@@ -245,7 +245,7 @@ typedef struct MonoAotCompile {
        MonoAotFileFlags flags;
        MonoDynamicStream blob;
        gboolean blob_closed;
-       MonoClass **typespec_classes;
+       GHashTable *typespec_classes;
        GString *llc_args;
        GString *as_args;
        char *assembly_name_sym;
@@ -2719,22 +2719,16 @@ find_typespec_for_class (MonoAotCompile *acfg, MonoClass *klass)
 
        /* FIXME: Search referenced images as well */
        if (!acfg->typespec_classes) {
-               acfg->typespec_classes = (MonoClass **)mono_mempool_alloc0 (acfg->mempool, sizeof (MonoClass*) * len);
-               for (i = 0; i < len; ++i) {
+               acfg->typespec_classes = g_hash_table_new (NULL, NULL);
+               for (i = 0; i < len; i++) {
                        MonoError error;
-                       acfg->typespec_classes [i] = mono_class_get_and_inflate_typespec_checked (acfg->image, MONO_TOKEN_TYPE_SPEC | (i + 1), NULL, &error);
+                       int typespec = MONO_TOKEN_TYPE_SPEC | (i + 1);
+                       MonoClass *klass_key = mono_class_get_and_inflate_typespec_checked (acfg->image, typespec, NULL, &error);
                        g_assert (mono_error_ok (&error)); /* FIXME error handling */
+                       g_hash_table_insert (acfg->typespec_classes, klass_key, GINT_TO_POINTER (typespec));
                }
        }
-       for (i = 0; i < len; ++i) {
-               if (acfg->typespec_classes [i] == klass)
-                       break;
-       }
-
-       if (i < len)
-               return MONO_TOKEN_TYPE_SPEC | (i + 1);
-       else
-               return 0;
+       return GPOINTER_TO_INT (g_hash_table_lookup (acfg->typespec_classes, klass));
 }
 
 static void
@@ -10071,6 +10065,8 @@ acfg_free (MonoAotCompile *acfg)
        g_hash_table_destroy (acfg->image_hash);
        g_hash_table_destroy (acfg->unwind_info_offsets);
        g_hash_table_destroy (acfg->method_label_hash);
+       if (!acfg->typespec_classes)
+               g_hash_table_destroy (acfg->typespec_classes);
        g_hash_table_destroy (acfg->export_names);
        g_hash_table_destroy (acfg->plt_entry_debug_sym_cache);
        g_hash_table_destroy (acfg->klass_blob_hash);
index 2078e8ef8543dc8da7291bd9306b1f8021552522..7407fecdf579b37975e3621fbc60b97ba2010a8b 100644 (file)
@@ -2400,9 +2400,8 @@ decode_cached_class_info (MonoAotModule *module, MonoCachedClassInfo *info, guin
 }      
 
 gpointer
-mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot)
+mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot, MonoError *error)
 {
-       MonoError error;
        int i;
        MonoClass *klass = vtable->klass;
        MonoAotModule *amodule = (MonoAotModule *)klass->image->aot_module;
@@ -2411,6 +2410,10 @@ mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int sl
        gboolean err;
        MethodRef ref;
        gboolean res;
+       gpointer addr;
+       MonoError inner_error;
+
+       mono_error_init (error);
 
        if (MONO_CLASS_IS_INTERFACE (klass) || klass->rank || !amodule)
                return NULL;
@@ -2423,12 +2426,12 @@ mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int sl
                return NULL;
 
        for (i = 0; i < slot; ++i) {
-               decode_method_ref (amodule, &ref, p, &p, &error);
-               mono_error_cleanup (&error); /* FIXME don't swallow the error */
+               decode_method_ref (amodule, &ref, p, &p, &inner_error);
+               mono_error_cleanup (&inner_error); /* FIXME don't swallow the error */
        }
 
-       res = decode_method_ref (amodule, &ref, p, &p, &error);
-       mono_error_cleanup (&error); /* FIXME don't swallow the error */
+       res = decode_method_ref (amodule, &ref, p, &p, &inner_error);
+       mono_error_cleanup (&inner_error); /* FIXME don't swallow the error */
        if (!res)
                return NULL;
        if (ref.no_aot_trampoline)
@@ -2437,7 +2440,8 @@ mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int sl
        if (mono_metadata_token_index (ref.token) == 0 || mono_metadata_token_table (ref.token) != MONO_TABLE_METHOD)
                return NULL;
 
-       return mono_aot_get_method_from_token (domain, ref.image, ref.token);
+       addr = mono_aot_get_method_from_token (domain, ref.image, ref.token, error);
+       return addr;
 }
 
 gboolean
@@ -4254,28 +4258,36 @@ init_method (MonoAotModule *amodule, guint32 method_index, MonoMethod *method, M
        return FALSE;
 }
 
+static void
+init_llvmonly_method (MonoAotModule *amodule, guint32 method_index, MonoMethod *method, MonoClass *init_class, MonoGenericContext *context)
+{
+       gboolean res;
+       MonoError error;
+
+       res = init_method (amodule, method_index, method, init_class, context, &error);
+       if (!is_ok (&error)) {
+               MonoException *ex = mono_error_convert_to_exception (&error);
+               /* Its okay to raise in llvmonly mode */
+               if (ex)
+                       mono_llvm_throw_exception ((MonoObject*)ex);
+       }
+}
+
 void
 mono_aot_init_llvm_method (gpointer aot_module, guint32 method_index)
 {
        MonoAotModule *amodule = (MonoAotModule *)aot_module;
-       gboolean res;
-       MonoError error;
 
-       res = init_method (amodule, method_index, NULL, NULL, NULL, &error);
-       // FIXME: Pass the exception up to the caller ?
-       /* Its okay to raise in llvmonly mode */
-       mono_error_raise_exception (&error);
+       init_llvmonly_method (amodule, method_index, NULL, NULL, NULL);
 }
 
 void
 mono_aot_init_gshared_method_this (gpointer aot_module, guint32 method_index, MonoObject *this_obj)
 {
        MonoAotModule *amodule = (MonoAotModule *)aot_module;
-       gboolean res;
        MonoClass *klass;
        MonoGenericContext *context;
        MonoMethod *method;
-       MonoError error;
 
        // FIXME:
        g_assert (this_obj);
@@ -4289,19 +4301,15 @@ mono_aot_init_gshared_method_this (gpointer aot_module, guint32 method_index, Mo
        context = mono_method_get_context (method);
        g_assert (context);
 
-       res = init_method (amodule, method_index, NULL, klass, context, &error);
-       /* Its okay to raise in llvmonly mode */
-       mono_error_raise_exception (&error);
+       init_llvmonly_method (amodule, method_index, NULL, klass, context);
 }
 
 void
 mono_aot_init_gshared_method_mrgctx (gpointer aot_module, guint32 method_index, MonoMethodRuntimeGenericContext *rgctx)
 {
        MonoAotModule *amodule = (MonoAotModule *)aot_module;
-       gboolean res;
        MonoGenericContext context = { NULL, NULL };
        MonoClass *klass = rgctx->class_vtable->klass;
-       MonoError error;
 
        if (klass->generic_class)
                context.class_inst = klass->generic_class->context.class_inst;
@@ -4309,20 +4317,16 @@ mono_aot_init_gshared_method_mrgctx (gpointer aot_module, guint32 method_index,
                context.class_inst = klass->generic_container->context.class_inst;
        context.method_inst = rgctx->method_inst;
 
-       res = init_method (amodule, method_index, NULL, rgctx->class_vtable->klass, &context, &error);
-       /* Its okay to raise in llvmonly mode */
-       mono_error_raise_exception (&error);
+       init_llvmonly_method (amodule, method_index, NULL, rgctx->class_vtable->klass, &context);
 }
 
 void
 mono_aot_init_gshared_method_vtable (gpointer aot_module, guint32 method_index, MonoVTable *vtable)
 {
        MonoAotModule *amodule = (MonoAotModule *)aot_module;
-       gboolean res;
        MonoClass *klass;
        MonoGenericContext *context;
        MonoMethod *method;
-       MonoError error;
 
        klass = vtable->klass;
 
@@ -4334,9 +4338,7 @@ mono_aot_init_gshared_method_vtable (gpointer aot_module, guint32 method_index,
        context = mono_method_get_context (method);
        g_assert (context);
 
-       res = init_method (amodule, method_index, NULL, klass, context, &error);
-       /* Its okay to raise in llvmonly mode */
-       mono_error_raise_exception (&error);
+       init_llvmonly_method (amodule, method_index, NULL, klass, context);
 }
 
 /*
@@ -4355,6 +4357,7 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
        MonoAotModule *amodule = (MonoAotModule *)klass->image->aot_module;
        guint8 *code;
        gboolean cache_result = FALSE;
+       MonoError inner_error;
 
        mono_error_init (error);
 
@@ -4389,7 +4392,7 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
         * remoting.
         */
        if (mono_aot_only && method->wrapper_type == MONO_WRAPPER_REMOTING_INVOKE_WITH_CHECK)
-               return mono_aot_get_method (domain, mono_marshal_method_from_wrapper (method));
+               return mono_aot_get_method_checked (domain, mono_marshal_method_from_wrapper (method), error);
 
        g_assert (klass->inited);
 
@@ -4429,7 +4432,8 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                if (method_index == 0xffffff && method->wrapper_type == MONO_WRAPPER_MANAGED_TO_MANAGED && method->klass->rank && strstr (method->name, "System.Collections.Generic")) {
                        MonoMethod *m = mono_aot_get_array_helper_from_wrapper (method);
 
-                       code = (guint8 *)mono_aot_get_method (domain, m);
+                       code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+                       mono_error_cleanup (&inner_error);
                        if (code)
                                return code;
                }
@@ -4440,7 +4444,6 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                 * an out parameter, so the managed-to-native wrappers can share the same code.
                 */
                if (method_index == 0xffffff && method->wrapper_type == MONO_WRAPPER_MANAGED_TO_NATIVE && method->klass == mono_defaults.array_class && !strcmp (method->name, "GetGenericValueImpl")) {
-                       MonoError error;
                        MonoMethod *m;
                        MonoGenericContext ctx;
                        MonoType *args [16];
@@ -4456,15 +4459,16 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                        args [0] = &mono_defaults.object_class->byval_arg;
                        ctx.method_inst = mono_metadata_get_generic_inst (1, args);
 
-                       m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, &error), TRUE, TRUE);
+                       m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, error), TRUE, TRUE);
                        if (!m)
-                               g_error ("AOT runtime could not load method due to %s", mono_error_get_message (&error)); /* FIXME don't swallow the error */
+                               g_error ("AOT runtime could not load method due to %s", mono_error_get_message (error)); /* FIXME don't swallow the error */
 
                        /* 
                         * Get the code for the <object> instantiation which should be emitted into
                         * the mscorlib aot image by the AOT compiler.
                         */
-                       code = (guint8 *)mono_aot_get_method (domain, m);
+                       code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+                       mono_error_cleanup (&inner_error);
                        if (code)
                                return code;
                }
@@ -4475,7 +4479,6 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                        ((!strcmp (method->klass->name_space, "System.Threading") && !strcmp (method->klass->name, "Interlocked") && (!strcmp (method->name, "CompareExchange") || !strcmp (method->name, "Exchange")) && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->params [1]))) ||
                         (!strcmp (method->klass->name_space, "System.Threading") && !strcmp (method->klass->name, "Volatile") && (!strcmp (method->name, "Read") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->ret)))) ||
                         (!strcmp (method->klass->name_space, "System.Threading") && !strcmp (method->klass->name, "Volatile") && (!strcmp (method->name, "Write") && MONO_TYPE_IS_REFERENCE (mini_type_get_underlying_type (mono_method_signature (method)->params [1])))))) {
-                       MonoError error;
                        MonoMethod *m;
                        MonoGenericContext ctx;
                        MonoType *args [16];
@@ -4491,9 +4494,9 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                        args [0] = &mono_defaults.object_class->byval_arg;
                        ctx.method_inst = mono_metadata_get_generic_inst (1, args);
 
-                       m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, &error), TRUE, TRUE);
+                       m = mono_marshal_get_native_wrapper (mono_class_inflate_generic_method_checked (m, &ctx, error), TRUE, TRUE);
                        if (!m)
-                               g_error ("AOT runtime could not load method due to %s", mono_error_get_message (&error)); /* FIXME don't swallow the error */
+                               g_error ("AOT runtime could not load method due to %s", mono_error_get_message (error)); /* FIXME don't swallow the error */
 
                        /* Avoid recursion */
                        if (method == m)
@@ -4503,7 +4506,8 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
                         * Get the code for the <object> instantiation which should be emitted into
                         * the mscorlib aot image by the AOT compiler.
                         */
-                       code = (guint8 *)mono_aot_get_method (domain, m);
+                       code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+                       mono_error_cleanup (&inner_error);
                        if (code)
                                return code;
                }
@@ -4521,7 +4525,8 @@ mono_aot_get_method_checked (MonoDomain *domain, MonoMethod *method, MonoError *
 
                                        m = mono_marshal_get_array_accessor_wrapper (m);
                                        if (m != method) {
-                                               code = (guint8 *)mono_aot_get_method (domain, m);
+                                               code = (guint8 *)mono_aot_get_method_checked (domain, m, &inner_error);
+                                               mono_error_cleanup (&inner_error);
                                                if (code)
                                                        return code;
                                        }
@@ -4596,6 +4601,7 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
        MonoError error;
 
        gpointer res = mono_aot_get_method_checked (domain, method, &error);
+       /* This is external only, so its ok to raise here */
        mono_error_raise_exception (&error);
        return res;
 }
@@ -4605,20 +4611,20 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
  * method.
  */
 gpointer
-mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token)
+mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token, MonoError *error)
 {
        MonoAotModule *aot_module = (MonoAotModule *)image->aot_module;
        int method_index;
-       MonoError error;
        gpointer res;
 
+       mono_error_init (error);
+
        if (!aot_module)
                return NULL;
 
        method_index = mono_metadata_token_index (token) - 1;
 
-       res = load_method (domain, aot_module, image, NULL, token, method_index, &error);
-       mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+       res = load_method (domain, aot_module, image, NULL, token, method_index, error);
        return res;
 }
 
@@ -5825,6 +5831,14 @@ mono_aot_get_method (MonoDomain *domain, MonoMethod *method)
        return NULL;
 }
 
+gpointer
+mono_aot_get_method_checked (MonoDomain *domain,
+                                                        MonoMethod *method, MonoError *error);
+{
+       mono_error_init (error);
+       return NULL;
+}
+
 gboolean
 mono_aot_is_got_entry (guint8 *code, guint8 *addr)
 {
@@ -5850,8 +5864,9 @@ mono_aot_find_jit_info (MonoDomain *domain, MonoImage *image, gpointer addr)
 }
 
 gpointer
-mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token)
+mono_aot_get_method_from_token (MonoDomain *domain, MonoImage *image, guint32 token, MonoError *error)
 {
+       mono_error_init (error);
        return NULL;
 }
 
@@ -5873,8 +5888,10 @@ mono_aot_patch_plt_entry (guint8 *code, guint8 *plt_entry, gpointer *got, mgreg_
 }
 
 gpointer
-mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot)
+mono_aot_get_method_from_vt_slot (MonoDomain *domain, MonoVTable *vtable, int slot, MonoError *error)
 {
+       mono_error_init (error);
+
        return NULL;
 }
 
index 7b9cfd320ab60e682c2356632b61a48507850c7a..fb4f06fb9bed0356940ade628058ec623d250af1 100644 (file)
@@ -401,9 +401,9 @@ instruction_hash (MonoInst *insn)
        res ^= insn->sreg1  << 0x10;
        res ^= insn->sreg2  << 0x14;
        res ^= insn->sreg3  << 0x18;
-       res ^= (guint) insn->next;
-       res ^= (guint) insn->prev;
-       res ^= (guint) insn;
+       res ^= (gsize) insn->next;
+       res ^= (gsize) insn->prev;
+       res ^= (gsize) insn;
        return res;
 }
 
index b8d57dc228cc278773081fadac9bf1b5d0d9ba40..f7b4426bad376351151d3d9f15b2280ecf62b6ad 100644 (file)
@@ -1953,7 +1953,7 @@ get_objref (MonoObject *obj)
        int hash = 0;
 
        if (obj == NULL)
-               return 0;
+               return NULL;
 
        if (suspend_count) {
                /*
@@ -2028,7 +2028,10 @@ clear_suspended_objs (void)
 static inline int
 get_objid (MonoObject *obj)
 {
-       return get_objref (obj)->id;
+       if (!obj)
+               return 0;
+       else
+               return get_objref (obj)->id;
 }
 
 /*
@@ -2678,7 +2681,7 @@ notify_thread (gpointer key, gpointer value, gpointer user_data)
 
        DEBUG_PRINTF (1, "[%p] Interrupting %p...\n", (gpointer) (gsize) mono_native_thread_id_get (), (gpointer)tid);
 
-       /* This is _not_ equivalent to ves_icall_System_Threading_Thread_Abort () */
+       /* This is _not_ equivalent to mono_thread_internal_abort () */
        InterruptData interrupt_data = { 0 };
        interrupt_data.tls = tls;
 
@@ -3626,11 +3629,15 @@ process_event (EventKind event, gpointer arg, gint32 il_offset, MonoContext *ctx
 
                ecount ++;
 
-               if (!thread)
-                       thread = mono_thread_current ();
+               if (event == EVENT_KIND_VM_DEATH) {
+                       thread = NULL;
+               } else {
+                       if (!thread)
+                               thread = mono_thread_current ();
 
-               if (event == EVENT_KIND_VM_START && arg != NULL)
-                       thread = (MonoThread *)arg;
+                       if (event == EVENT_KIND_VM_START && arg != NULL)
+                               thread = (MonoThread *)arg;
+               }
 
                buffer_add_objid (&buf, (MonoObject*)thread); // thread
 
@@ -3792,7 +3799,7 @@ runtime_initialized (MonoProfiler *prof)
 static void
 runtime_shutdown (MonoProfiler *prof)
 {
-       process_profiler_event (EVENT_KIND_VM_DEATH, mono_thread_current ());
+       process_profiler_event (EVENT_KIND_VM_DEATH, NULL);
 
        mono_debugger_agent_cleanup ();
 }
@@ -4320,9 +4327,12 @@ set_bp_in_method (MonoDomain *domain, MonoMethod *method, MonoSeqPointInfo *seq_
 
        code = mono_jit_find_compiled_method_with_jit_info (domain, method, &ji);
        if (!code) {
+               MonoError oerror;
+
                /* Might be AOTed code */
-               code = mono_aot_get_method (domain, method);
+               code = mono_aot_get_method_checked (domain, method, &oerror);
                g_assert (code);
+               mono_error_assert_ok (&oerror);
                ji = mono_jit_info_table_find (domain, (char *)code);
                g_assert (ji);
        }
@@ -5427,6 +5437,7 @@ ss_clear_for_assembly (SingleStepReq *req, MonoAssembly *assembly)
 void
 mono_debugger_agent_debug_log (int level, MonoString *category, MonoString *message)
 {
+       MonoError error;
        int suspend_policy;
        GSList *events;
        EventInfo ei;
@@ -5439,8 +5450,16 @@ mono_debugger_agent_debug_log (int level, MonoString *category, MonoString *mess
        mono_loader_unlock ();
 
        ei.level = level;
-       ei.category = category ? mono_string_to_utf8 (category) : NULL;
-       ei.message = message ? mono_string_to_utf8 (message) : NULL;
+       ei.category = NULL;
+       if (category) {
+               ei.category = mono_string_to_utf8_checked (category, &error);
+               mono_error_cleanup (&error);
+       }
+       ei.message = NULL;
+       if (message) {
+               ei.message = mono_string_to_utf8_checked (message, &error);
+               mono_error_cleanup  (&error);
+       }
 
        process_event (EVENT_KIND_USER_LOG, &ei, 0, NULL, events, suspend_policy);
 
@@ -6802,7 +6821,7 @@ invoke_method (void)
        /*
         * Take the loader lock to avoid race conditions with CMD_VM_ABORT_INVOKE:
         *
-        * It is possible that ves_icall_System_Threading_Thread_Abort () was called
+        * It is possible that mono_thread_internal_abort () was called
         * after the mono_runtime_invoke_checked() already returned, but it doesn't matter
         * because we reset the abort here.
         */
@@ -7114,7 +7133,7 @@ vm_commands (int command, int id, guint8 *p, guint8 *end, Buffer *buf)
 
                tls->abort_requested = TRUE;
 
-               ves_icall_System_Threading_Thread_Abort (THREAD_TO_INTERNAL (thread), NULL);
+               mono_thread_internal_abort (THREAD_TO_INTERNAL (thread));
                mono_loader_unlock ();
                break;
        }
@@ -7784,7 +7803,7 @@ field_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
 static void
 buffer_add_cattr_arg (Buffer *buf, MonoType *t, MonoDomain *domain, MonoObject *val)
 {
-       if (val && val->vtable->klass == mono_defaults.monotype_class) {
+       if (val && val->vtable->klass == mono_defaults.runtimetype_class) {
                /* Special case these so the client doesn't have to handle Type objects */
                
                buffer_add_byte (buf, VALUE_TYPE_ID_TYPE);
@@ -8673,7 +8692,8 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
                        s = mono_ldstr_checked (domain, method->klass->image, mono_metadata_token_index (token), &error);
                        mono_error_assert_ok (&error); /* FIXME don't swallow the error */
 
-                       s2 = mono_string_to_utf8 (s);
+                       s2 = mono_string_to_utf8_checked (s, &error);
+                       mono_error_assert_ok (&error);
 
                        buffer_add_byte (buf, TOKEN_TYPE_STRING);
                        buffer_add_string (buf, s2);
@@ -8681,6 +8701,7 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
                        break;
                }
                default: {
+                       MonoError error;
                        gpointer val;
                        MonoClass *handle_class;
 
@@ -8694,7 +8715,6 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
                                        break;
                                }
                        } else {
-                               MonoError error;
                                val = mono_ldtoken_checked (method->klass->image, token, &handle_class, NULL, &error);
                                if (!val)
                                        g_error ("Could not load token due to %s", mono_error_get_message (&error));
@@ -8715,7 +8735,8 @@ method_commands_internal (int command, MonoMethod *method, MonoDomain *domain, g
                        } else if (handle_class == mono_defaults.string_class) {
                                char *s;
 
-                               s = mono_string_to_utf8 ((MonoString *)val);
+                               s = mono_string_to_utf8_checked ((MonoString *)val, &error);
+                               mono_error_assert_ok (&error);
                                buffer_add_byte (buf, TOKEN_TYPE_STRING);
                                buffer_add_string (buf, s);
                                g_free (s);
@@ -9231,7 +9252,9 @@ string_commands (int command, guint8 *p, guint8 *end, Buffer *buf)
                        buffer_add_int (buf, mono_string_length (str) * 2);
                        buffer_add_data (buf, (guint8*)mono_string_chars (str), mono_string_length (str) * 2);
                } else {
-                       s = mono_string_to_utf8 (str);
+                       MonoError error;
+                       s = mono_string_to_utf8_checked (str, &error);
+                       mono_error_assert_ok (&error);
                        buffer_add_string (buf, s);
                        g_free (s);
                }
@@ -9696,18 +9719,17 @@ debugger_thread (void *arg)
        ErrorCode err;
        gboolean no_reply;
        gboolean attach_failed = FALSE;
-       gpointer attach_cookie, attach_dummy;
 
        DEBUG_PRINTF (1, "[dbg] Agent thread started, pid=%p\n", (gpointer) (gsize) mono_native_thread_id_get ());
 
        debugger_thread_id = mono_native_thread_id_get ();
 
-       attach_cookie = mono_jit_thread_attach (mono_get_root_domain (), &attach_dummy);
-       MonoInternalThread *thread = mono_thread_internal_current ();
-       mono_thread_set_name_internal (thread, mono_string_new (mono_get_root_domain (), "Debugger agent"), TRUE, &error);
+       MonoThread *thread = mono_thread_attach (mono_get_root_domain ());
+       mono_thread_set_name_internal (thread->internal_thread, mono_string_new (mono_get_root_domain (), "Debugger agent"), TRUE, &error);
        mono_error_assert_ok (&error);
 
-       thread->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
+       thread->internal_thread->state |= ThreadState_Background;
+       thread->internal_thread->flags |= MONO_THREAD_FLAG_DONT_MANAGE;
 
        mono_set_is_debugger_attached (TRUE);
        
@@ -9859,8 +9881,6 @@ debugger_thread (void *arg)
                start_debugger_thread ();
        }
 
-       mono_jit_thread_detach (attach_cookie, &attach_dummy);
-
        return 0;
 }
 
index aa80289292431607f3c68cb9b344b3e5fa7fea28..1a7b15b6f55ad75f301e44531a82e8714d3c280d 100644 (file)
@@ -399,11 +399,14 @@ mini_regression_step (MonoImage *image, int verbose, int *total_run, int *total,
                                if (verbose >= 2)
                                        g_print ("Running '%s' ...\n", method->name);
 #ifdef MONO_USE_AOT_COMPILER
-                               if ((func = (TestMethod)mono_aot_get_method (mono_get_root_domain (), method)))
-                                       ;
-                               else
-#endif
+                               MonoError error;
+                               func = (TestMethod)mono_aot_get_method_checked (mono_get_root_domain (), method, &error);
+                               mono_error_cleanup (&error);
+                               if (!func)
                                        func = (TestMethod)(gpointer)cfg->native_code;
+#else
+                                       func = (TestMethod)(gpointer)cfg->native_code;
+#endif
                                func = (TestMethod)mono_create_ftnptr (mono_get_root_domain (), func);
                                result = func ();
                                if (result != expected) {
index 8f7b81b30a217b43f87cf259b4fd02b59454e039..abfa1ffe73b3cf93737bc63885693e13034587f3 100644 (file)
@@ -262,7 +262,7 @@ alloc_dreg (MonoCompile *cfg, MonoStackType stack_type)
 
 #define NEW_LDSTRLITCONST(cfg,dest,val) NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_LDSTR_LIT, (val))
 
-#define NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.monotype_class)
+#define NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.runtimetype_class)
 
 #define NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL)
 
@@ -448,7 +448,7 @@ handle_gsharedvt_ldaddr (MonoCompile *cfg)
 
 #define EMIT_NEW_LDSTRLITCONST(cfg,dest,val) do { NEW_AOTCONST ((cfg), (dest), MONO_PATCH_INFO_LDSTR_LIT, (val)); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
-#define EMIT_NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.monotype_class); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
+#define EMIT_NEW_TYPE_FROM_HANDLE_CONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_TYPE_FROM_HANDLE, (image), (token), (generic_context), STACK_OBJ, mono_defaults.runtimetype_class); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
 #define EMIT_NEW_LDTOKENCONST(cfg,dest,image,token,generic_context) do { NEW_AOTCONST_TOKEN ((cfg), (dest), MONO_PATCH_INFO_LDTOKEN, (image), (token), (generic_context), STACK_PTR, NULL); MONO_ADD_INS ((cfg)->cbb, (dest)); } while (0)
 
index 1c365d577b8fac4b4cc97e16d56318a771b19f99..39abeb285497461e407cb5f3f1bfb3dd0fa96d7b 100644 (file)
@@ -1576,7 +1576,8 @@ resolve_vcall (MonoVTable *vt, int slot, MonoMethod *imt_method, gpointer *out_a
        /* Same as in common_call_trampoline () */
 
        /* Avoid loading metadata or creating a generic vtable if possible */
-       addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot);
+       addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot, &error);
+       mono_error_raise_exception (&error); // FIXME: Don't raise here
        if (addr && !vt->klass->valuetype)
                return mono_create_ftnptr (mono_domain_get (), addr);
 
@@ -1868,3 +1869,17 @@ mono_interruption_checkpoint_from_trampoline (void)
        if (ex)
                mono_raise_exception (ex);
 }
+
+void
+mono_throw_method_access (MonoMethod *callee, MonoMethod *caller)
+{
+       char *callee_name = mono_method_full_name (callee, 1);
+       char *caller_name = mono_method_full_name (caller, 1);
+       MonoError error;
+
+       mono_error_init (&error);
+       mono_error_set_generic_error (&error, "System", "MethodAccessException", "Method `%s' is inaccessible from method `%s'\n", callee_name, caller_name);
+       mono_error_set_pending_exception (&error);
+       g_free (callee_name);
+       g_free (caller_name);
+}
index 8e2b37d367628cd1f4e3799960bd2622a77a410b..319ec902a013c47aaac095493c859aee047d2149 100644 (file)
@@ -224,4 +224,6 @@ MonoObject* mono_get_method_object (MonoMethod *method);
 
 double mono_ckfinite (double d);
 
+void mono_throw_method_access (MonoMethod *callee, MonoMethod *caller);
+
 #endif /* __MONO_JIT_ICALLS_H__ */
index f2dc914e374aaf959ca6cbb97336efe5bb72ab6c..ed5eca5248beb4e1d7bff51a183720e7cc3e2498 100644 (file)
@@ -88,7 +88,7 @@ MONO_API char*       mono_get_runtime_build_info    (void);
 MONO_API MonoJitInfo *
 mono_get_jit_info_from_method (MonoDomain *domain, MonoMethod *method);
 
-MONO_API void *
+MONO_API MONO_RT_EXTERNAL_ONLY void *
 mono_aot_get_method (MonoDomain *domain, MonoMethod *method);
 
 MONO_END_DECLS
index c8cd9d6d0a6e5c19e57f5c9311a84448442ef4eb..a35a7a39f21405c92b2b9602205116099f4b7852 100644 (file)
@@ -555,13 +555,13 @@ mono_local_cprop (MonoCompile *cfg)
                                        ins->inst_destbasereg = def->sreg1;
                                        ins->inst_offset += def->inst_imm;
                                }
+
+                               if (!MONO_IS_STORE_MEMBASE (ins) && !vreg_is_volatile (cfg, ins->dreg)) {
+                                       defs [ins->dreg] = ins;
+                                       def_index [ins->dreg] = ins_index;
+                               }
                        }
                        
-                       if ((spec [MONO_INST_DEST] != ' ') && !MONO_IS_STORE_MEMBASE (ins) && !vreg_is_volatile (cfg, ins->dreg)) {
-                               defs [ins->dreg] = ins;
-                               def_index [ins->dreg] = ins_index;
-                       }
-
                        if (MONO_IS_CALL (ins))
                                last_call_index = ins_index;
 
index 231270a865c5bfb07b0e0699c658474a6f7e462a..ec4e6f429e462e45bc5388dda0501834aeb51601 100644 (file)
                if (cfg->exception_type != MONO_EXCEPTION_NONE) \
                        goto exception_exit;                                            \
        } while (0)
-#define METHOD_ACCESS_FAILURE(method, cmethod) do {                    \
-               method_access_failure ((cfg), (method), (cmethod));                     \
-               goto exception_exit;                                                                            \
-       } while (0)
 #define FIELD_ACCESS_FAILURE(method, field) do {                                       \
                field_access_failure ((cfg), (method), (field));                        \
                goto exception_exit;    \
@@ -377,17 +373,6 @@ break_on_unverified (void)
                G_BREAKPOINT ();
 }
 
-static MONO_NEVER_INLINE void
-method_access_failure (MonoCompile *cfg, MonoMethod *method, MonoMethod *cil_method)
-{
-       char *method_fname = mono_method_full_name (method, TRUE);
-       char *cil_method_fname = mono_method_full_name (cil_method, TRUE);
-       mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
-       mono_error_set_generic_error (&cfg->error, "System", "MethodAccessException", "Method `%s' is inaccessible from method `%s'\n", cil_method_fname, method_fname);
-       g_free (method_fname);
-       g_free (cil_method_fname);
-}
-
 static MONO_NEVER_INLINE void
 field_access_failure (MonoCompile *cfg, MonoMethod *method, MonoClassField *field)
 {
@@ -3156,6 +3141,18 @@ mono_emit_widen_call_res (MonoCompile *cfg, MonoInst *ins, MonoMethodSignature *
        return ins;
 }
 
+
+static void
+emit_method_access_failure (MonoCompile *cfg, MonoMethod *method, MonoMethod *cil_method)
+{
+       MonoInst *args [16];
+
+       args [0] = emit_get_rgctx_method (cfg, mono_method_check_context_used (method), method, MONO_RGCTX_INFO_METHOD);
+       args [1] = emit_get_rgctx_method (cfg, mono_method_check_context_used (cil_method), cil_method, MONO_RGCTX_INFO_METHOD);
+
+       mono_emit_jit_icall (cfg, mono_throw_method_access, args);
+}
+
 static MonoMethod*
 get_memcpy_method (void)
 {
@@ -4527,6 +4524,9 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
        int context_used;
        MonoInst *klass_inst = NULL, *res;
 
+       if (src->opcode == OP_PCONST && src->inst_p0 == 0)
+               return src;
+
        context_used = mini_class_check_context_used (cfg, klass);
 
        if (!context_used && mini_class_has_reference_variant_generic_argument (cfg, klass, context_used)) {
@@ -4558,7 +4558,7 @@ handle_castclass (MonoCompile *cfg, MonoClass *klass, MonoInst *src, guint8 *ip,
        if (context_used) {
                MonoInst *args [3];
 
-               if(mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
+               if (mini_class_has_reference_variant_generic_argument (cfg, klass, context_used) || is_complex_isinst (klass)) {
                        MonoInst *cache_ins;
 
                        cache_ins = emit_get_rgctx_klass (cfg, context_used, klass, MONO_RGCTX_INFO_CAST_CACHE);
@@ -6831,7 +6831,8 @@ mini_emit_inst_for_method (MonoCompile *cfg, MonoMethod *cmethod, MonoMethodSign
                        MONO_INST_NEW (cfg, ins, OP_OBJC_GET_SELECTOR);
                        ins->dreg = mono_alloc_ireg (cfg);
                        // FIXME: Leaks
-                       ins->inst_p0 = mono_string_to_utf8 (s);
+                       ins->inst_p0 = mono_string_to_utf8_checked (s, &cfg->error);
+                       return_val_if_nok (&cfg->error, NULL);
                        MONO_ADD_INS (cfg->cbb, ins);
                        return ins;
                }
@@ -9265,7 +9266,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                }
                                if (!mono_method_can_access_method (method_definition, target_method) &&
                                        !mono_method_can_access_method (method, cil_method))
-                                       METHOD_ACCESS_FAILURE (method, cil_method);
+                                       emit_method_access_failure (cfg, method, cil_method);
                        }
 
                        if (mono_security_core_clr_enabled ())
@@ -12772,54 +12773,47 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                MonoInst *ad_ins, *jit_tls_ins;
                                MonoBasicBlock *next_bb = NULL, *call_bb = NULL;
 
-                               cfg->attach_cookie = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
-                               cfg->attach_dummy = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
-
-                               if (mono_threads_is_coop_enabled ()) {
-                                       /* AOT code is only used in the root domain */
-                                       EMIT_NEW_PCONST (cfg, args [0], cfg->compile_aot ? NULL : cfg->domain);
-                                       EMIT_NEW_VARLOADA (cfg, args [1], cfg->attach_dummy, cfg->attach_dummy->inst_vtype);
-                                       ins = mono_emit_jit_icall (cfg, mono_jit_thread_attach, args);
-                                       MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, cfg->attach_cookie->dreg, ins->dreg);
-                               } else {
-                                       EMIT_NEW_PCONST (cfg, ins, NULL);
-                                       MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, cfg->attach_cookie->dreg, ins->dreg);
+                               g_assert (!mono_threads_is_coop_enabled ());
 
-                                       ad_ins = mono_get_domain_intrinsic (cfg);
-                                       jit_tls_ins = mono_get_jit_tls_intrinsic (cfg);
+                               cfg->orig_domain_var = mono_compile_create_var (cfg, &mono_defaults.int_class->byval_arg, OP_LOCAL);
 
-                                       if (cfg->backend->have_tls_get && ad_ins && jit_tls_ins) {
-                                               NEW_BBLOCK (cfg, next_bb);
-                                               NEW_BBLOCK (cfg, call_bb);
+                               EMIT_NEW_PCONST (cfg, ins, NULL);
+                               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, cfg->orig_domain_var->dreg, ins->dreg);
 
-                                               if (cfg->compile_aot) {
-                                                       /* AOT code is only used in the root domain */
-                                                       EMIT_NEW_PCONST (cfg, domain_ins, NULL);
-                                               } else {
-                                                       EMIT_NEW_PCONST (cfg, domain_ins, cfg->domain);
-                                               }
-                                               MONO_ADD_INS (cfg->cbb, ad_ins);
-                                               MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, ad_ins->dreg, domain_ins->dreg);
-                                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, call_bb);
+                               ad_ins = mono_get_domain_intrinsic (cfg);
+                               jit_tls_ins = mono_get_jit_tls_intrinsic (cfg);
 
-                                               MONO_ADD_INS (cfg->cbb, jit_tls_ins);
-                                               MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, jit_tls_ins->dreg, 0);
-                                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, call_bb);
+                               if (cfg->backend->have_tls_get && ad_ins && jit_tls_ins) {
+                                       NEW_BBLOCK (cfg, next_bb);
+                                       NEW_BBLOCK (cfg, call_bb);
 
-                                               MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, next_bb);
-                                               MONO_START_BB (cfg, call_bb);
+                                       if (cfg->compile_aot) {
+                                               /* AOT code is only used in the root domain */
+                                               EMIT_NEW_PCONST (cfg, domain_ins, NULL);
+                                       } else {
+                                               EMIT_NEW_PCONST (cfg, domain_ins, cfg->domain);
                                        }
+                                       MONO_ADD_INS (cfg->cbb, ad_ins);
+                                       MONO_EMIT_NEW_BIALU (cfg, OP_COMPARE, -1, ad_ins->dreg, domain_ins->dreg);
+                                       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBNE_UN, call_bb);
 
-                                       /* AOT code is only used in the root domain */
-                                       EMIT_NEW_PCONST (cfg, args [0], cfg->compile_aot ? NULL : cfg->domain);
-                                       EMIT_NEW_PCONST (cfg, args [1], NULL);
-                                       ins = mono_emit_jit_icall (cfg, mono_jit_thread_attach, args);
-                                       MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, cfg->attach_cookie->dreg, ins->dreg);
+                                       MONO_ADD_INS (cfg->cbb, jit_tls_ins);
+                                       MONO_EMIT_NEW_BIALU_IMM (cfg, OP_COMPARE_IMM, -1, jit_tls_ins->dreg, 0);
+                                       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_PBEQ, call_bb);
 
-                                       if (next_bb)
-                                               MONO_START_BB (cfg, next_bb);
+                                       MONO_EMIT_NEW_BRANCH_BLOCK (cfg, OP_BR, next_bb);
+                                       MONO_START_BB (cfg, call_bb);
                                }
 
+                               /* AOT code is only used in the root domain */
+                               EMIT_NEW_PCONST (cfg, args [0], cfg->compile_aot ? NULL : cfg->domain);
+                               ins = mono_emit_jit_icall (cfg, mono_jit_thread_attach, args);
+                               MONO_EMIT_NEW_UNALU (cfg, OP_MOVE, cfg->orig_domain_var->dreg, ins->dreg);
+
+                               if (next_bb)
+                                       MONO_START_BB (cfg, next_bb);
+
+
                                ip += 2;
                                break;
                        }
@@ -12828,9 +12822,8 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                /* Restore the original domain */
                                dreg = alloc_ireg (cfg);
-                               EMIT_NEW_UNALU (cfg, args [0], OP_MOVE, dreg, cfg->attach_cookie->dreg);
-                               EMIT_NEW_VARLOADA (cfg, args [1], cfg->attach_dummy, cfg->attach_dummy->inst_vtype);
-                               mono_emit_jit_icall (cfg, mono_jit_thread_detach, args);
+                               EMIT_NEW_UNALU (cfg, args [0], OP_MOVE, dreg, cfg->orig_domain_var->dreg);
+                               mono_emit_jit_icall (cfg, mono_jit_set_domain, args);
                                ip += 2;
                                break;
                        }
@@ -12979,6 +12972,12 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
                                constrained_class = NULL;
                                break;
                        }
+                       case CEE_MONO_LDDOMAIN:
+                               CHECK_STACK_OVF (1);
+                               EMIT_NEW_PCONST (cfg, ins, cfg->compile_aot ? NULL : cfg->domain);
+                               ip += 2;
+                               *sp++ = ins;
+                               break;
                        default:
                                g_error ("opcode 0x%02x 0x%02x not handled", MONO_CUSTOM_PREFIX, ip [1]);
                                break;
@@ -13078,7 +13077,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
 
                                cil_method = cmethod;
                                if (!dont_verify && !cfg->skip_visibility && !mono_method_can_access_method (method, cmethod))
-                                       METHOD_ACCESS_FAILURE (method, cil_method);
+                                       emit_method_access_failure (cfg, method, cil_method);
 
                                if (mono_security_core_clr_enabled ())
                                        ensure_method_is_allowed_to_call_method (cfg, method, cmethod);
index dffa9370f27024990fe7e52ab6a01d3128ca4498..2930a31e58526064279b25364aa023b29e8e6acb 100644 (file)
@@ -441,7 +441,10 @@ mono_arch_get_gsharedvt_call_info (gpointer addr, MonoMethodSignature *normal_si
                                case MONO_TYPE_I8:
                                        info->ret_marshal = GSHAREDVT_RET_I8;
                                        break;
-
+                               case MONO_TYPE_GENERICINST:
+                                       g_assert (!mono_type_generic_inst_is_valuetype (ret));
+                                       info->ret_marshal = GSHAREDVT_RET_I8;
+                                       break;
                                default:
                                        g_error ("Gsharedvt can't handle dst type [%d]", (int)sig->ret->type);
                                }
index 33c815d75762d6a97121fb703e0660b844fa6c2d..753c091a3b7963720f010b2f1797b7f6255fa95c 100644 (file)
@@ -402,6 +402,7 @@ typedef struct {
 #define MONO_ARCH_HAVE_SDB_TRAMPOLINES 1
 #define MONO_ARCH_HAVE_PATCH_CODE_NEW 1
 #define MONO_ARCH_HAVE_OP_GENERIC_CLASS_INIT 1
+#define MONO_ARCH_HAVE_GENERAL_RGCTX_LAZY_FETCH_TRAMPOLINE 1
 
 #if defined(TARGET_OSX) || defined(__linux__)
 #define MONO_ARCH_HAVE_UNWIND_BACKTRACE 1
index 93edb0fdafb6aa21b2b374bb62ccc65b3eef1751..8e7e351b08070e417be7b1524e85581d2797af8e 100644 (file)
@@ -6067,13 +6067,8 @@ mono_arch_emit_prolog (MonoCompile *cfg)
                                reg_offset += 4;
                        }
                }
-               if (iphone_abi) {
-                       mono_emit_unwind_op_offset (cfg, code, ARMREG_LR, -4);
-                       mini_gc_set_slot_type_from_cfa (cfg, -4, SLOT_NOREF);
-               } else {
-                       mono_emit_unwind_op_offset (cfg, code, ARMREG_LR, -4);
-                       mini_gc_set_slot_type_from_cfa (cfg, -4, SLOT_NOREF);
-               }
+               mono_emit_unwind_op_offset (cfg, code, ARMREG_LR, -4);
+               mini_gc_set_slot_type_from_cfa (cfg, -4, SLOT_NOREF);
        } else {
                ARM_MOV_REG_REG (code, ARMREG_IP, ARMREG_SP);
                ARM_PUSH (code, 0x5ff0);
index 5e5c27a53f6d21701ec85ced4cfc39c5b5132406..9cf772bad0815ae9571b4417e494ba63e5de439b 100644 (file)
@@ -881,11 +881,6 @@ spill_vreg (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, MonoInst *ins
                mono_regstate_free_int (rs, sel);
 }
 
-/* This isn't defined on older glib versions and on some platforms */
-#ifndef G_GUINT64_FORMAT
-#define G_GUINT64_FORMAT "ul"
-#endif
-
 static int
 get_register_spilling (MonoCompile *cfg, MonoBasicBlock *bb, MonoInst **last, MonoInst *ins, regmask_t regmask, int reg, int bank)
 {
index 46a12c45677b5339236d4dd1f77893f92cee68fe..b154daa8f31c77901cd04760ba9b3f236c20512d 100644 (file)
@@ -1551,6 +1551,8 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, MonoObject *obj, gi
                                        }
                                }
 
+                               MonoError isinst_error;
+                               mono_error_init (&isinst_error);
                                if (ei->flags == MONO_EXCEPTION_CLAUSE_NONE && mono_object_isinst_checked (ex_obj, catch_class, &error)) {
                                        setup_stack_trace (mono_ex, dynamic_methods, initial_trace_ips, &trace_ips);
                                        g_slist_free (dynamic_methods);
@@ -1562,7 +1564,7 @@ mono_handle_exception_internal_first_pass (MonoContext *ctx, MonoObject *obj, gi
                                        MONO_CONTEXT_SET_IP (ctx, ei->handler_start);
                                        return TRUE;
                                }
-                               mono_error_cleanup (&error);
+                               mono_error_cleanup (&isinst_error);
                        }
                }
 
@@ -1695,7 +1697,15 @@ mono_handle_exception_internal (MonoContext *ctx, MonoObject *obj, gboolean resu
                                mono_error_assert_ok (&error);
                        }
                        if (msg == NULL) {
-                               msg = message ? mono_string_to_utf8 ((MonoString *) message) : g_strdup ("(System.Exception.Message property not available)");
+                               if (message) {
+                                       msg = mono_string_to_utf8_checked ((MonoString *) message, &error);
+                                       if (!is_ok (&error)) {
+                                               mono_error_cleanup (&error);
+                                               msg = g_strdup ("(error while display System.Exception.Message property)");
+                                       }
+                               } else {
+                                       msg = g_strdup ("(System.Exception.Message property not available)");
+                               }
                        }
                        g_print ("[%p:] EXCEPTION handling: %s.%s: %s\n", (void*)mono_native_thread_id_get (), mono_object_class (obj)->name_space, mono_object_class (obj)->name, msg);
                        g_free (msg);
@@ -2829,8 +2839,14 @@ mono_invoke_unhandled_exception_hook (MonoObject *exc)
                MonoString *str = mono_object_to_string (exc, &other);
                char *msg = NULL;
                
-               if (str)
-                       msg = mono_string_to_utf8 (str);
+               if (str) {
+                       MonoError inner_error;
+                       msg = mono_string_to_utf8_checked (str, &inner_error);
+                       if (!is_ok (&inner_error)) {
+                               msg = g_strdup_printf ("Nested exception while formatting original exception");
+                               mono_error_cleanup (&inner_error);
+                       }
+               }
                else if (other) {
                        char *original_backtrace = mono_exception_get_managed_backtrace ((MonoException*)exc);
                        char *nested_backtrace = mono_exception_get_managed_backtrace ((MonoException*)other);
index e778f7561ff100d127adfcd475e76a941fda020b..84c21c5890e9dfedf73e95a441857fc6875f370a 100644 (file)
@@ -1102,7 +1102,7 @@ get_wrapper_shared_type (MonoType *t)
                int i;
 
                if (!MONO_TYPE_ISSTRUCT (t))
-                       return &mono_defaults.int_class->byval_arg;
+                       return get_wrapper_shared_type (&mono_defaults.object_class->byval_arg);
 
                klass = mono_class_from_mono_type (t);
                orig_ctx = &klass->generic_class->context;
@@ -1440,7 +1440,7 @@ mini_get_gsharedvt_wrapper (gboolean gsharedvt_in, gpointer addr, MonoMethodSign
                else
                        wrapper = mini_get_gsharedvt_out_sig_wrapper (normal_sig);
                res = mono_compile_method_checked (wrapper, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
+               mono_error_assert_ok (&error);
                return res;
        }
 
index 8a8a7e35d6308c4e2d014b5c715ea8d799eef6b7..d88a6c99a8f362bb690424ace4462d58f3d913d9 100644 (file)
@@ -3777,17 +3777,18 @@ ia64_patch (unsigned char* code, gpointer target)
 }
 
 void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
 {
        MonoJumpInfo *patch_info;
 
+       mono_error_init (error);
+
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
                const unsigned char *target;
-               MonoError error;
 
-               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
-               mono_error_raise_exception (&error); /* FIXME: don't raise here */
+               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+               return_if_nok (error);
 
                if (patch_info->type == MONO_PATCH_INFO_NONE)
                        continue;
index b7f5ec5a3ebf31a1932c6dc1ebdc45cb2cb10914..8f33bb655a977867a859c49f0f616e8c627083e6 100644 (file)
@@ -3201,8 +3201,12 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
                                        target =
                                                mono_create_jit_trampoline (mono_domain_get (),
                                                                                                        call->method, &error);
-                                       if (!mono_error_ok (&error))
-                                               mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+                                       if (!is_ok (&error)) {
+                                               set_failure (ctx, mono_error_get_message (&error));
+                                               mono_error_cleanup (&error);
+                                               return;
+                                       }
+
                                        tramp_var = LLVMAddGlobal (ctx->lmodule, LLVMPointerType (llvm_sig, 0), name);
                                        LLVMSetInitializer (tramp_var, LLVMConstIntToPtr (LLVMConstInt (LLVMInt64Type (), (guint64)(size_t)target, FALSE), LLVMPointerType (llvm_sig, 0)));
                                        LLVMSetLinkage (tramp_var, LLVMExternalLinkage);
@@ -3212,15 +3216,17 @@ process_call (EmitContext *ctx, MonoBasicBlock *bb, LLVMBuilderRef *builder_ref,
 #else
                                target =
                                        mono_create_jit_trampoline (mono_domain_get (),
-                                                                                               call->method, &error);
-                               if (!mono_error_ok (&error))
-                                       mono_error_raise_exception (&error); /* FIXME: Don't raise here */
+                                                                   call->method, &error);
+                               if (!is_ok (&error)) {
+                                       g_free (name);
+                                       set_failure (ctx, mono_error_get_message (&error));
+                                       mono_error_cleanup (&error);
+                                       return;
+                               }
 
                                callee = LLVMAddFunction (ctx->lmodule, name, llvm_sig);
                                g_free (name);
 
-                               if (!mono_error_ok (&error))
-                                       mono_error_raise_exception (&error); /* FIXME: Don't raise here */
                                LLVMAddGlobalMapping (ctx->module->ee, callee, target);
 #endif
                        }
index 773bd20087c95e56a17e2f811f227a5b38e7867e..5d6ebc7b6bc126975df54bdc38c29d247d5ca8d0 100644 (file)
@@ -4671,10 +4671,11 @@ mono_arch_register_lowlevel_calls (void)
 }
 
 void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
 {
        MonoJumpInfo *patch_info;
-       MonoError error;
+
+       mono_error_init (error);
 
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
@@ -4708,8 +4709,9 @@ mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain,
                case MONO_PATCH_INFO_R4:
                case MONO_PATCH_INFO_R8:
                        /* from OP_AOTCONST : lui + addiu */
-                       target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
-                       mono_error_raise_exception (&error); /* FIXME: don't raise here */
+                       target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+                       return_if_nok (error);
+
                        patch_lui_addiu ((guint32 *)(void *)ip, (guint32)target);
                        continue;
 #if 0
@@ -4722,8 +4724,9 @@ mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain,
                        /* everything is dealt with at epilog output time */
                        continue;
                default:
-                       target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
-                       mono_error_raise_exception (&error); /* FIXME: don't raise here */
+                       target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+                       return_if_nok (error);
+
                        mips_patch ((guint32 *)(void *)ip, (guint32)target);
                        break;
                }
index ad48c07158e3f0877ae4033b5c2dd0ab9a1f207a..883fc1af323b2eab7427b492160bef2dda2e8411 100644 (file)
@@ -42,6 +42,7 @@ MINI_OP(OP_SEQ_POINT, "seq_point", NONE, NONE, NONE)
 MINI_OP(OP_IL_SEQ_POINT, "il_seq_point", NONE, NONE, NONE)
 MINI_OP(OP_IMPLICIT_EXCEPTION, "implicit_exception", NONE, NONE, NONE)
 
+/* CALL opcodes need to stay together, see MONO_IS_CALL macro */
 MINI_OP(OP_VOIDCALL,   "voidcall", NONE, NONE, NONE)
 MINI_OP(OP_VOIDCALL_REG,       "voidcall_reg", NONE, IREG, NONE)
 MINI_OP(OP_VOIDCALL_MEMBASE,   "voidcall_membase", NONE, IREG, NONE)
index c9116ff46e1e6a974f1e5391de97731bc38bd90e..3089a8546b1d3a4d605535a775c1f57d27eb793f 100644 (file)
@@ -4743,19 +4743,20 @@ mono_arch_register_lowlevel_calls (void)
 
 #ifndef DISABLE_JIT
 void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
 {
        MonoJumpInfo *patch_info;
        gboolean compile_aot = !run_cctors;
-       MonoError error;
+
+       mono_error_init (error);
 
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
                unsigned char *target;
                gboolean is_fd = FALSE;
 
-               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
-               mono_error_raise_exception (&error); /* FIXME: don't raise here */
+               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+               return_if_nok (error);
 
                if (compile_aot) {
                        switch (patch_info->type) {
index fee574471bd5834ab34ff99bcd5b436a548df072..9bb896ee4ee78fee3cf09cbd47c8913aca853c78 100644 (file)
@@ -837,20 +837,20 @@ mono_set_lmf_addr (gpointer lmf_addr)
 }
 
 /*
- * mono_jit_thread_attach: called by native->managed wrappers
+ * mono_jit_thread_attach:
  *
- * In non-coop mode:
- *  - @dummy: is NULL
- *  - @return: the original domain which needs to be restored, or NULL.
+ * Called by Xamarin.Mac and other products. Attach thread to runtime if
+ * needed and switch to @domain.
  *
- * In coop mode:
- *  - @dummy: contains the original domain
- *  - @return: a cookie containing current MonoThreadInfo*.
+ * @return the original domain which needs to be restored, or NULL.
  */
-gpointer
-mono_jit_thread_attach (MonoDomain *domain, gpointer *dummy)
+MonoDomain*
+mono_jit_thread_attach (MonoDomain *domain)
 {
        MonoDomain *orig;
+       gboolean attached;
+
+       g_assert (!mono_threads_is_coop_enabled ());
 
        if (!domain) {
                /* Happens when called from AOTed code which is only used in the root domain. */
@@ -859,92 +859,38 @@ mono_jit_thread_attach (MonoDomain *domain, gpointer *dummy)
 
        g_assert (domain);
 
-       /* On coop, when we detached, we moved the thread from  RUNNING->BLOCKING.  If we try to
-        * reattach we do a BLOCKING->RUNNING transition.  If the thread is fresh,
-        * mono_thread_attach() will do a STARTING->RUNNING transition so we're only responsible
-        * for making the cookie. */
-       gboolean fresh_thread = FALSE;
-       {
-               MonoThreadInfo *info;
-
-               info = mono_thread_info_current_unchecked ();
-               fresh_thread = !info || !mono_thread_info_is_live (info);
-       }
-       {
-               gboolean attached;
-
 #ifdef MONO_HAVE_FAST_TLS
-               attached = MONO_FAST_TLS_GET (mono_lmf_addr) != NULL;
+       attached = MONO_FAST_TLS_GET (mono_lmf_addr) != NULL;
 #else
-               attached = mono_native_tls_get_value (mono_jit_tls_id) != NULL;
+       attached = mono_native_tls_get_value (mono_jit_tls_id) != NULL;
 #endif
 
-               if (!attached) {
-                       mono_thread_attach (domain);
+       if (!attached) {
+               mono_thread_attach (domain);
 
-                       // #678164
-                       mono_thread_set_state (mono_thread_internal_current (), ThreadState_Background);
-               }
+               // #678164
+               mono_thread_set_state (mono_thread_internal_current (), ThreadState_Background);
+       }
 
-               orig = mono_domain_get ();
-               if (orig != domain)
-                       mono_domain_set (domain, TRUE);
+       orig = mono_domain_get ();
+       if (orig != domain)
+               mono_domain_set (domain, TRUE);
 
-       }
-       if (!mono_threads_is_coop_enabled ()) {
-               return orig != domain ? orig : NULL;
-       } else {
-               if (fresh_thread) {
-                       *dummy = NULL;
-                       /* mono_thread_attach put the thread in RUNNING mode from STARTING, but we need to
-                        * return the right cookie. */
-                       return mono_threads_enter_gc_unsafe_region_cookie (mono_thread_info_current ());
-               } else {
-                       *dummy = orig;
-                       /* thread state (BLOCKING|RUNNING) -> RUNNING */
-                       return mono_threads_enter_gc_unsafe_region (dummy);
-               }
-       }
+       return orig != domain ? orig : NULL;
 }
 
 /*
- * mono_jit_thread_detach: called by native->managed wrappers
- *
- * In non-coop mode:
- *  - @cookie: the original domain which needs to be restored, or NULL.
- *  - @dummy: is NULL
+ * mono_jit_set_domain:
  *
- * In coop mode:
- *  - @cookie: contains current MonoThreadInfo* if it was in BLOCKING mode, NULL otherwise
- *  - @dummy: contains the original domain
+ * Set domain to @domain if @domain is not null
  */
 void
-mono_jit_thread_detach (gpointer cookie, gpointer *dummy)
+mono_jit_set_domain (MonoDomain *domain)
 {
-       MonoDomain *domain, *orig;
+       g_assert (!mono_threads_is_coop_enabled ());
 
-       if (!mono_threads_is_coop_enabled ()) {
-               orig = (MonoDomain*) cookie;
-
-               if (orig)
-                       mono_domain_set (orig, TRUE);
-       } else {
-               orig = (MonoDomain*) *dummy;
-
-               domain = mono_domain_get ();
-               g_assert (domain);
-
-               /* it won't do anything if cookie is NULL
-                * thread state RUNNING -> (RUNNING|BLOCKING) */
-               mono_threads_exit_gc_unsafe_region (cookie, dummy);
-
-               if (orig != domain) {
-                       if (!orig)
-                               mono_domain_unset ();
-                       else
-                               mono_domain_set (orig, TRUE);
-               }
-       }
+       if (domain)
+               mono_domain_set (domain, TRUE);
 }
 
 /**
@@ -2944,27 +2890,25 @@ MONO_SIG_HANDLER_FUNC (, mono_sigint_signal_handler)
  * Returns: a pointer to the newly created code
  */
 static gpointer
-mono_jit_create_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target)
+mono_jit_create_remoting_trampoline (MonoDomain *domain, MonoMethod *method, MonoRemotingTarget target, MonoError *error)
 {
-       MonoError error;
        MonoMethod *nm;
        guint8 *addr = NULL;
 
+       mono_error_init (error);
+
        if ((method->flags & METHOD_ATTRIBUTE_VIRTUAL) && mono_method_signature (method)->generic_param_count) {
                return mono_create_specific_trampoline (method, MONO_TRAMPOLINE_GENERIC_VIRTUAL_REMOTING,
                        domain, NULL);
        }
 
        if ((method->flags & METHOD_ATTRIBUTE_ABSTRACT) ||
-           (mono_method_signature (method)->hasthis && (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class))) {
+           (mono_method_signature (method)->hasthis && (mono_class_is_marshalbyref (method->klass) || method->klass == mono_defaults.object_class)))
                nm = mono_marshal_get_remoting_invoke_for_target (method, target);
-               addr = (guint8 *)mono_compile_method_checked (nm, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
-       } else
-       {
-               addr = (guint8 *)mono_compile_method_checked (method, &error);
-               mono_error_raise_exception (&error); /* FIXME don't raise here */
-       }
+       else
+               nm = method;
+       addr = (guint8 *)mono_compile_method_checked (nm, error);
+       return_val_if_nok (error, NULL);
        return mono_get_addr_from_ftnptr (addr);
 }
 #endif
@@ -3782,8 +3726,8 @@ register_icalls (void)
        register_icall (mono_trace_enter_method, "mono_trace_enter_method", NULL, TRUE);
        register_icall (mono_trace_leave_method, "mono_trace_leave_method", NULL, TRUE);
        register_icall (mono_get_lmf_addr, "mono_get_lmf_addr", "ptr", TRUE);
-       register_icall (mono_jit_thread_attach, "mono_jit_thread_attach", "ptr ptr ptr", TRUE);
-       register_icall (mono_jit_thread_detach, "mono_jit_thread_detach", "void ptr ptr", TRUE);
+       register_icall (mono_jit_thread_attach, "mono_jit_thread_attach", "ptr ptr", TRUE);
+       register_icall (mono_jit_set_domain, "mono_jit_set_domain", "void ptr", TRUE);
        register_icall (mono_domain_get, "mono_domain_get", "ptr", TRUE);
 
        register_icall (mono_llvm_throw_exception, "mono_llvm_throw_exception", "void object", TRUE);
@@ -4007,6 +3951,7 @@ register_icalls (void)
        register_icall (mono_llvmonly_init_delegate_virtual, "mono_llvmonly_init_delegate_virtual", "void object object ptr", TRUE);
        register_icall (mono_get_assembly_object, "mono_get_assembly_object", "object ptr", TRUE);
        register_icall (mono_get_method_object, "mono_get_method_object", "object ptr", TRUE);
+       register_icall (mono_throw_method_access, "mono_throw_method_access", "void ptr ptr", FALSE);
 
        register_icall_with_wrapper (mono_monitor_enter, "mono_monitor_enter", "void obj");
        register_icall_with_wrapper (mono_monitor_enter_v4, "mono_monitor_enter_v4", "void obj ptr");
index e593e3b350102a00c7a020e36042b5fbdce771ed..3fe40d2cfc28fdd8a055b003ad58785d5cbd3427 100644 (file)
@@ -264,6 +264,8 @@ if (ins->inst_target_bb->native_offset) {                                   \
 #include <mono/metadata/appdomain.h>
 #include <mono/metadata/debug-helpers.h>
 #include <mono/metadata/profiler-private.h>
+#include <mono/utils/mono-error.h>
+#include <mono/utils/mono-error-internals.h>
 #include <mono/utils/mono-math.h>
 #include <mono/utils/mono-mmap.h>
 #include <mono/utils/mono-hwcap-s390x.h>
@@ -765,6 +767,20 @@ cvtMonoType(MonoTypeEnum t)
 /*                                                                 */
 /*------------------------------------------------------------------*/
 
+static void
+decodeParmString (MonoString *s)
+{
+       MonoError error;
+       char *str = mono_string_to_utf8_checked(s, &error);
+       if (is_ok (&error))  {
+               printf("[STRING:%p:%s], ", s, str);
+               g_free (str);
+       } else {
+               mono_error_cleanup (&error);
+               printf("[STRING:%p:], ", s);
+       }
+}
+
 static void 
 decodeParm(MonoType *type, void *curParm, int size)
 {
@@ -813,7 +829,7 @@ enum_parmtype:
                                MonoString *s = *((MonoString **) curParm);
                                if (s) {
                                        g_assert (((MonoObject *) s)->vtable->klass == mono_defaults.string_class);
-                                       printf("[STRING:%p:%s], ", s, mono_string_to_utf8(s));
+                                       decodeParmString (s);
                                } else {
                                        printf("[STRING:null], ");
                                }
@@ -828,8 +844,7 @@ enum_parmtype:
                                        klass = obj->vtable->klass;
                                        printf("%p [%p] ",obj,curParm);
                                        if (klass == mono_defaults.string_class) {
-                                               printf("[STRING:%p:%s]", 
-                                                      obj, mono_string_to_utf8 ((MonoString *) obj));
+                                               decodeParmString ((MonoString *)obj);
                                        } else if (klass == mono_defaults.int32_class) { 
                                                printf("[INT32:%p:%d]", 
                                                        obj, *(gint32 *)((char *)obj + sizeof (MonoObject)));
@@ -969,8 +984,8 @@ enter_method (MonoMethod *method, RegParm *rParm, char *sp)
                                if (obj->vtable) {
                                        klass = obj->vtable->klass;
                                        if (klass == mono_defaults.string_class) {
-                                               printf ("this:[STRING:%p:%s], ", 
-                                                       obj, mono_string_to_utf8 ((MonoString *)obj));
+                                               printf ("this:");
+                                               decodeParmString((MonoString *)obj);
                                        } else {
                                                printf ("this:%p[%s.%s], ", 
                                                        obj, klass->name_space, klass->name);
@@ -1126,7 +1141,7 @@ handle_enum:
 ;
                if (s) {
                        g_assert (((MonoObject *)s)->vtable->klass == mono_defaults.string_class);
-                       printf ("[STRING:%p:%s]", s, mono_string_to_utf8 (s));
+                       decodeParmString (s);
                } else 
                        printf ("[STRING:null], ");
                break;
@@ -5386,18 +5401,20 @@ mono_arch_register_lowlevel_calls (void)
 
 void
 mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, 
-                     guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+                     guint8 *code, MonoJumpInfo *ji, gboolean run_cctors,
+                     MonoError *error)
 {
        MonoJumpInfo *patch_info;
-       MonoError error;
+
+       mono_error_init (error);
 
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
                gconstpointer target = NULL;
 
                target = mono_resolve_patch_target (method, domain, code, 
-                                                                                       patch_info, run_cctors, &error);
-               mono_error_raise_exception (&error); /* FIXME: don't raise here */
+                                                                                       patch_info, run_cctors, error);
+               return_if_nok (error);
 
                switch (patch_info->type) {
                        case MONO_PATCH_INFO_IP:
index b29563dcb0ac480f6e6f93651ebd654b5e3c3466..022f8a5e790b8ea9334d4fa61bb7f92c99229c9f 100644 (file)
@@ -3672,18 +3672,19 @@ mono_arch_register_lowlevel_calls (void)
 }
 
 void
-mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors)
+mono_arch_patch_code (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error)
 {
-       MonoError error;
        MonoJumpInfo *patch_info;
 
+       mono_error_init (error);
+
        /* FIXME: Move part of this to arch independent code */
        for (patch_info = ji; patch_info; patch_info = patch_info->next) {
                unsigned char *ip = patch_info->ip.i + code;
                gpointer target;
 
-               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, &error);
-               mono_error_raise_exception (&error); /* FIXME: don't raise here */
+               target = mono_resolve_patch_target (method, domain, code, patch_info, run_cctors, error);
+               return_if_nok (error);
 
                switch (patch_info->type) {
                case MONO_PATCH_INFO_NONE:
index 9a71893c239fa4137906d382c43df066c9b1ebde..a84d695a8b3ce0ba0ed665ac2c0cd13319e45a45 100644 (file)
@@ -203,11 +203,15 @@ mini_resolve_imt_method (MonoVTable *vt, gpointer *vtable_slot, MonoMethod *imt_
                impl = mono_class_inflate_generic_method_checked (impl, &context, &error);
                g_assert (mono_error_ok (&error)); /* FIXME don't swallow the error */
        } else {
+               MonoError error;
+
                /* Avoid loading metadata or creating a generic vtable if possible */
-               if (lookup_aot && !vt->klass->valuetype)
-                       aot_addr = (guint8 *)mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method));
-               else
+               if (lookup_aot && !vt->klass->valuetype) {
+                       aot_addr = (guint8 *)mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, interface_offset + mono_method_get_vtable_slot (imt_method), &error);
+                       mono_error_raise_exception (&error); // FIXME: Don't raise here
+               } else {
                        aot_addr = NULL;
+               }
                if (aot_addr)
                        impl = NULL;
                else
@@ -870,7 +874,8 @@ mono_vcall_trampoline (mgreg_t *regs, guint8 *code, int slot, guint8 *tramp)
                vtable_slot = &(vt->vtable [slot]);
 
                /* Avoid loading metadata or creating a generic vtable if possible */
-               addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot);
+               addr = mono_aot_get_method_from_vt_slot (mono_domain_get (), vt, slot, &error);
+               mono_error_raise_exception (&error); /* FIXME don't raise here */
                if (addr && !vt->klass->valuetype) {
                        if (mono_domain_owns_vtable_slot (mono_domain_get (), vtable_slot))
                                *vtable_slot = addr;
@@ -968,6 +973,7 @@ mono_aot_trampoline (mgreg_t *regs, guint8 *code, guint8 *token_info,
        MonoMethod *method = NULL;
        gpointer addr;
        guint8 *plt_entry;
+       MonoError error;
 
        trampoline_calls ++;
 
@@ -975,9 +981,10 @@ mono_aot_trampoline (mgreg_t *regs, guint8 *code, guint8 *token_info,
        token_info += sizeof (gpointer);
        token = *(guint32*)(gpointer)token_info;
 
-       addr = mono_aot_get_method_from_token (mono_domain_get (), image, token);
+       addr = mono_aot_get_method_from_token (mono_domain_get (), image, token, &error);
+       if (!is_ok (&error))
+               mono_error_cleanup (&error);
        if (!addr) {
-               MonoError error;
                method = mono_get_method_checked (image, token, NULL, NULL, &error);
                if (!method)
                        g_error ("Could not load AOT trampoline due to %s", mono_error_get_message (&error));
index 1f4711425eced29efa18bcf86c2b4738b9a52fac..0dcda64a378eafd968056c96d79fe1c67b70f84c 100644 (file)
@@ -2419,7 +2419,11 @@ mono_codegen (MonoCompile *cfg)
                }
        }
 #else
-       mono_arch_patch_code (cfg, cfg->method, cfg->domain, cfg->native_code, cfg->patch_info, cfg->run_cctors);
+       mono_arch_patch_code (cfg, cfg->method, cfg->domain, cfg->native_code, cfg->patch_info, cfg->run_cctors, &cfg->error);
+       if (!is_ok (&cfg->error)) {
+               mono_cfg_set_exception (cfg, MONO_EXCEPTION_MONO_ERROR);
+               return;
+       }
 #endif
 
        if (cfg->method->dynamic) {
@@ -4291,8 +4295,11 @@ mono_jit_compile_method_inner (MonoMethod *method, MonoDomain *target_domain, in
                                mono_arch_patch_code_new (NULL, target_domain, (guint8 *)tmp->data, &patch_info, target);
                        }
 #else
-                       for (tmp = jlist->list; tmp; tmp = tmp->next)
-                               mono_arch_patch_code (NULL, NULL, target_domain, tmp->data, &patch_info, TRUE);
+                       for (tmp = jlist->list; tmp; tmp = tmp->next) {
+                               mono_arch_patch_code (NULL, NULL, target_domain, tmp->data, &patch_info, TRUE, error);
+                               if (!is_ok (error))
+                                       break;
+                       }
 #endif
                }
        }
index 5b0417e6b02cdb5c8e2a95aef21d04d4fdfdbc87..a10818df3991a22551b79f753a322128c9b629ee 100644 (file)
@@ -484,7 +484,8 @@ enum {
 #define MONO_IS_STORE_MEMBASE(ins) (((ins)->opcode >= OP_STORE_MEMBASE_REG && (ins)->opcode <= OP_STOREV_MEMBASE) || ((ins)->opcode >= OP_ATOMIC_STORE_I1 && (ins)->opcode <= OP_ATOMIC_STORE_R8))
 #define MONO_IS_STORE_MEMINDEX(ins) (((ins)->opcode >= OP_STORE_MEMINDEX) && ((ins)->opcode <= OP_STORER8_MEMINDEX))
 
-#define MONO_IS_CALL(ins) (((ins->opcode >= OP_VOIDCALL) && (ins->opcode <= OP_VOIDCALL_MEMBASE)) || ((ins->opcode >= OP_FCALL) && (ins->opcode <= OP_FCALL_MEMBASE)) || ((ins->opcode >= OP_LCALL) && (ins->opcode <= OP_LCALL_MEMBASE)) || ((ins->opcode >= OP_VCALL) && (ins->opcode <= OP_VCALL_MEMBASE)) || ((ins->opcode >= OP_CALL) && (ins->opcode <= OP_CALL_MEMBASE)) || ((ins->opcode >= OP_VCALL2) && (ins->opcode <= OP_VCALL2_MEMBASE)) || (ins->opcode == OP_TAILCALL) || ((ins->opcode >= OP_RCALL) && (ins->opcode <= OP_RCALL_MEMBASE)))
+// OP_DYN_CALL is not a MonoCallInst
+#define MONO_IS_CALL(ins) (((ins->opcode >= OP_VOIDCALL) && (ins->opcode <= OP_VCALL2_MEMBASE)) || (ins->opcode == OP_TAILCALL))
 
 #define MONO_IS_JUMP_TABLE(ins) (((ins)->opcode == OP_JUMP_TABLE) ? TRUE : ((((ins)->opcode == OP_AOTCONST) && (ins->inst_i1 == (gpointer)MONO_PATCH_INFO_SWITCH)) ? TRUE : ((ins)->opcode == OP_SWITCH) ? TRUE : ((((ins)->opcode == OP_GOT_ENTRY) && ((ins)->inst_right->inst_i1 == (gpointer)MONO_PATCH_INFO_SWITCH)) ? TRUE : FALSE)))
 
@@ -1606,8 +1607,7 @@ typedef struct {
        MonoInst *gsharedvt_info_var;
 
        /* For native-to-managed wrappers, CEE_MONO_JIT_(AT|DE)TACH opcodes */
-       MonoInst *attach_cookie;
-       MonoInst *attach_dummy;
+       MonoInst *orig_domain_var;
 
        MonoInst *lmf_var;
        MonoInst *lmf_addr_var;
@@ -2388,8 +2388,8 @@ MonoLMF * mono_get_lmf                      (void);
 MonoLMF** mono_get_lmf_addr                 (void);
 void      mono_set_lmf                      (MonoLMF *lmf);
 MonoJitTlsData* mono_get_jit_tls            (void);
-MONO_API gpointer  mono_jit_thread_attach            (MonoDomain *domain, gpointer *dummy);
-MONO_API void      mono_jit_thread_detach            (gpointer cookie, gpointer *dummy);
+MONO_API MonoDomain* mono_jit_thread_attach (MonoDomain *domain);
+MONO_API void      mono_jit_set_domain      (MonoDomain *domain);
 gint32    mono_get_jit_tls_offset           (void);
 gint32    mono_get_lmf_tls_offset           (void);
 gint32    mono_get_lmf_addr_tls_offset      (void);
@@ -2456,11 +2456,9 @@ jinfo_get_method (MonoJitInfo *ji)
 /* AOT */
 void      mono_aot_init                     (void);
 void      mono_aot_cleanup                  (void);
-gpointer  mono_aot_get_method               (MonoDomain *domain,
-                                                                                        MonoMethod *method);
 gpointer  mono_aot_get_method_checked       (MonoDomain *domain,
                                                                                         MonoMethod *method, MonoError *error);
-gpointer  mono_aot_get_method_from_token    (MonoDomain *domain, MonoImage *image, guint32 token);
+gpointer  mono_aot_get_method_from_token    (MonoDomain *domain, MonoImage *image, guint32 token, MonoError *error);
 gboolean  mono_aot_is_got_entry             (guint8 *code, guint8 *addr);
 guint8*   mono_aot_get_plt_entry            (guint8 *code);
 guint32   mono_aot_get_plt_info_offset      (mgreg_t *regs, guint8 *code);
@@ -2469,7 +2467,7 @@ gboolean  mono_aot_get_class_from_name      (MonoImage *image, const char *name_
 MonoJitInfo* mono_aot_find_jit_info         (MonoDomain *domain, MonoImage *image, gpointer addr);
 gpointer mono_aot_plt_resolve               (gpointer aot_module, guint32 plt_info_offset, guint8 *code, MonoError *error);
 void     mono_aot_patch_plt_entry           (guint8 *code, guint8 *plt_entry, gpointer *got, mgreg_t *regs, guint8 *addr);
-gpointer mono_aot_get_method_from_vt_slot   (MonoDomain *domain, MonoVTable *vtable, int slot);
+gpointer mono_aot_get_method_from_vt_slot   (MonoDomain *domain, MonoVTable *vtable, int slot, MonoError *error);
 gpointer mono_aot_create_specific_trampoline   (MonoImage *image, gpointer arg1, MonoTrampolineType tramp_type, MonoDomain *domain, guint32 *code_len);
 gpointer mono_aot_get_trampoline            (const char *name);
 gpointer mono_aot_get_trampoline_full       (const char *name, MonoTrampInfo **out_tinfo);
@@ -2655,7 +2653,7 @@ GList    *mono_arch_get_global_fp_regs          (MonoCompile *cfg);
 GList    *mono_arch_get_iregs_clobbered_by_call (MonoCallInst *call);
 GList    *mono_arch_get_fregs_clobbered_by_call (MonoCallInst *call);
 guint32   mono_arch_regalloc_cost               (MonoCompile *cfg, MonoMethodVar *vmv);
-void      mono_arch_patch_code                  (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors);
+void      mono_arch_patch_code                  (MonoCompile *cfg, MonoMethod *method, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gboolean run_cctors, MonoError *error);
 void      mono_arch_patch_code_new              (MonoCompile *cfg, MonoDomain *domain, guint8 *code, MonoJumpInfo *ji, gpointer target);
 void      mono_arch_flush_icache                (guint8 *code, gint size);
 int       mono_arch_max_epilog_size             (MonoCompile *cfg);
index d8e4437b75d5ddb7836dbee0230e052f673744d6..98f89d63500b7fe89ea677a7bbe041a911dd4a00 100644 (file)
@@ -534,7 +534,7 @@ mono_trace_enter_method (MonoMethod *method, char *ebp)
                                        g_free (as);
                                } else if (klass == mono_defaults.int32_class) {
                                        printf ("[INT32:%p:%d], ", o, *(gint32 *)((char *)o + sizeof (MonoObject)));
-                               } else if (klass == mono_defaults.monotype_class) {
+                               } else if (klass == mono_defaults.runtimetype_class) {
                                        printf ("[TYPE:%s], ", mono_type_full_name (((MonoReflectionType*)o)->type));
                                } else
                                        printf ("[%s.%s:%p], ", klass->name_space, klass->name, o);
index a8df3065dd80910322b0f6f21a7732acc94c043d..d9737fb8c52e948339da1868b78630a3a2005c34 100644 (file)
@@ -709,6 +709,41 @@ mono_arch_create_rgctx_lazy_fetch_trampoline (guint32 slot, MonoTrampInfo **info
        return buf;
 }
 
+gpointer
+mono_arch_create_general_rgctx_lazy_fetch_trampoline (MonoTrampInfo **info, gboolean aot)
+{
+       guint8 *code, *buf;
+       int tramp_size;
+       MonoJumpInfo *ji = NULL;
+       GSList *unwind_ops;
+
+       g_assert (aot);
+       tramp_size = 64;
+
+       code = buf = (guint8 *)mono_global_codeman_reserve (tramp_size);
+
+       unwind_ops = mono_arch_get_cie_program ();
+
+       // FIXME: Currently, we always go to the slow path.
+       /* This receives a <slot, trampoline> in the rgctx arg reg. */
+       /* Load trampoline addr */
+       amd64_mov_reg_membase (code, AMD64_R11, MONO_ARCH_RGCTX_REG, 8, 8);
+       /* move the rgctx pointer to the VTABLE register */
+       amd64_mov_reg_reg (code, MONO_ARCH_VTABLE_REG, AMD64_ARG_REG1, sizeof(gpointer));
+       /* Jump to the trampoline */
+       amd64_jump_reg (code, AMD64_R11);
+
+       mono_arch_flush_icache (buf, code - buf);
+       mono_profiler_code_buffer_new (buf, code - buf, MONO_PROFILER_CODE_BUFFER_GENERICS_TRAMPOLINE, NULL);
+
+       g_assert (code - buf <= tramp_size);
+
+       if (info)
+               *info = mono_tramp_info_create ("rgctx_fetch_trampoline_general", buf, code - buf, ji, unwind_ops);
+
+       return buf;
+}
+
 void
 mono_arch_invalidate_method (MonoJitInfo *ji, void *func, gpointer func_arg)
 {
index e658bf9777b6b78e81c6851a74b41a6fc44ec53a..15baec017ac03cd4dc6a5451303577f73ab1433e 100644 (file)
@@ -203,7 +203,8 @@ static inline void print_report (const gchar *format, ...)
        prop = mono_class_get_property_from_name (klass, "StackTrace");
        str = (MonoString*)mono_property_get_value_checked (prop, NULL, NULL, &error);
        mono_error_assert_ok (&error);
-       stack_trace = mono_string_to_utf8 (str);
+       stack_trace = mono_string_to_utf8_checked (str, &error);
+       mono_error_assert_ok (&error);
 
        fprintf (stdout, "-= Stack Trace =-\n%s\n\n", stack_trace);
        g_free (stack_trace);
@@ -212,7 +213,6 @@ static inline void print_report (const gchar *format, ...)
 
 static inline void append_report (GString **report, const gchar *format, ...)
 {
-#if defined (_EGLIB_MAJOR) || GLIB_CHECK_VERSION(2,14,0)
        va_list ap;
        if (!*report)
                *report = g_string_new ("");
@@ -220,13 +220,11 @@ static inline void append_report (GString **report, const gchar *format, ...)
        va_start (ap, format);
        g_string_append_vprintf (*report, format, ap);
        va_end (ap);
-#else
-       g_assert_not_reached ();
-#endif
 }
 
 static gboolean saved_strings_find_func (gpointer key, gpointer value, gpointer user_data)
 {
+       MonoError error;
        SavedStringFindInfo *info = (SavedStringFindInfo*)user_data;
        SavedString *saved = (SavedString*)value;
        gchar *utf_str;
@@ -235,7 +233,8 @@ static gboolean saved_strings_find_func (gpointer key, gpointer value, gpointer
        if (!info || !saved || mono_string_length (saved->string) != info->len)
                return FALSE;
 
-       utf_str = mono_string_to_utf8 (saved->string);
+       utf_str = mono_string_to_utf8_checked (saved->string, &error);
+       mono_error_assert_ok (&error);
        hash = do_calc_string_hash (0, utf_str);
        g_free (utf_str);
 
index 1d3c897bd726f4277fc1c7a04d1590aea4acb066..6daa9199dfcea5d7067518d98732a153cb5f6abc 100644 (file)
@@ -992,9 +992,11 @@ check_reference_for_xdomain (GCObject **ptr, GCObject *obj, MonoDomain *domain)
                        break;
        }
 
-       if (ref->vtable->klass == mono_defaults.string_class)
-               str = mono_string_to_utf8 ((MonoString*)ref);
-       else
+       if (ref->vtable->klass == mono_defaults.string_class) {
+               MonoError error;
+               str = mono_string_to_utf8_checked ((MonoString*)ref, &error);
+               mono_error_cleanup (&error);
+       } else
                str = NULL;
        g_print ("xdomain reference in %p (%s.%s) at offset %d (%s) to %p (%s.%s) (%s)  -  pointed to by:\n",
                        obj, obj->vtable->klass->name_space, obj->vtable->klass->name,
index dbd2e9ad1cc108d8ee2ebbb383738f9b84999af4..650e7716e583d8af4318a59a900c7ad8b742780c 100644 (file)
@@ -1339,6 +1339,8 @@ mono_test_return_empty_struct (int a)
 {
        EmptyStruct s;
 
+       memset (&s, 0, sizeof (s));
+
        g_assert (a == 42);
 
        return s;
index 84d04781e708927500ec5fc106ec46066cacfda4..7488c9ca6c9f64df7ed65b17c3c911efc1f22968 100644 (file)
@@ -39,6 +39,8 @@ is_managed_exception (MonoErrorInternal *error)
 static void
 mono_error_prepare (MonoErrorInternal *error)
 {
+       /* mono_error_set_* after a mono_error_cleanup without an intervening init */
+       g_assert (error->error_code != MONO_ERROR_CLEANUP_CALLED_SENTINEL);
        if (error->error_code != MONO_ERROR_NONE)
                return;
 
@@ -106,15 +108,30 @@ void
 mono_error_cleanup (MonoError *oerror)
 {
        MonoErrorInternal *error = (MonoErrorInternal*)oerror;
-       if (error->error_code == MONO_ERROR_NONE)
+       short int orig_error_code = error->error_code;
+       gboolean free_strings = error->flags & MONO_ERROR_FREE_STRINGS;
+       gboolean has_instance_handle = is_managed_exception (error);
+
+       /* Two cleanups in a row without an intervening init. */
+       g_assert (orig_error_code != MONO_ERROR_CLEANUP_CALLED_SENTINEL);
+
+       /* Mark it as cleaned up. */
+       error->error_code = MONO_ERROR_CLEANUP_CALLED_SENTINEL;
+       error->flags = 0;
+
+       if (orig_error_code == MONO_ERROR_NONE)
                return;
 
-       if (is_managed_exception (error))
+
+       if (has_instance_handle)
                mono_gchandle_free (error->exn.instance_handle);
 
+
        g_free ((char*)error->full_message);
        g_free ((char*)error->full_message_with_fields);
-       if (!(error->flags & MONO_ERROR_FREE_STRINGS)) //no memory was allocated
+       error->full_message = NULL;
+       error->full_message_with_fields = NULL;
+       if (!free_strings) //no memory was allocated
                return;
 
        g_free ((char*)error->type_name);
@@ -123,6 +140,9 @@ mono_error_cleanup (MonoError *oerror)
        g_free ((char*)error->exception_name_space);
        g_free ((char*)error->exception_name);
        g_free ((char*)error->first_argument);
+       error->type_name = error->assembly_name = error->member_name = error->exception_name_space = error->exception_name = error->first_argument = NULL;
+       error->exn.klass = NULL;
+
 }
 
 gboolean
@@ -664,6 +684,9 @@ mono_error_prepare_exception (MonoError *oerror, MonoError *error_out)
                exception = (MonoException*) mono_gchandle_get_target (error->exn.instance_handle);
                break;
 
+       case MONO_ERROR_CLEANUP_CALLED_SENTINEL:
+               mono_error_set_execution_engine (error_out, "MonoError reused after mono_error_cleanup");
+               break;
        default:
                mono_error_set_execution_engine (error_out, "Invalid error-code %d", error->error_code);
        }
index 5e1102ec2b842006b8d799e93f969267fef68101..2a98d4839fc45f4ca02b7a8fa247f8bc642fff70 100644 (file)
@@ -32,7 +32,10 @@ enum {
         */
        MONO_ERROR_GENERIC = 9,
        /* This one encapsulates a managed exception instance */
-       MONO_ERROR_EXCEPTION_INSTANCE = 10
+       MONO_ERROR_EXCEPTION_INSTANCE = 10,
+
+       /* Not a valid error code - indicates that the error was cleaned up and reused */
+       MONO_ERROR_CLEANUP_CALLED_SENTINEL = 0xffff
 };
 
 /*Keep in sync with MonoErrorInternal*/
index 740db4c7543cb72bc2b8f1d6c68775849bb35cbd..54c6320d2b6f6a08bc8fc2fe249f315bbde8cac8 100644 (file)
@@ -93,7 +93,6 @@ static gchar *find_in_dir (DIR *current, const gchar *name)
 
 static inline void append_report (GString **report, const gchar *format, ...)
 {
-#if defined (_EGLIB_MAJOR) || GLIB_CHECK_VERSION(2,14,0)
        va_list ap;
        if (!*report)
                *report = g_string_new ("");
@@ -101,9 +100,6 @@ static inline void append_report (GString **report, const gchar *format, ...)
        va_start (ap, format);
        g_string_append_vprintf (*report, format, ap);
        va_end (ap);
-#else
-       g_assert_not_reached ();
-#endif
 }
 
 static inline void do_mono_profiler_iomap (GString **report, const char *pathname, const char *new_pathname)
index 487513f2c369be8282e3c4a4be25b3af208c821e..cec505f17e543309c627d69b5c159137a5471a5e 100644 (file)
@@ -15,6 +15,7 @@ mono_array_new_full
 mono_array_new_specific
 mono_assemblies_cleanup
 mono_assemblies_init
+mono_assembly_addref
 mono_assembly_close
 mono_assembly_fill_assembly_name
 mono_assembly_foreach
@@ -471,6 +472,7 @@ mono_install_assembly_preload_hook
 mono_install_assembly_refonly_preload_hook
 mono_install_assembly_refonly_search_hook
 mono_install_assembly_search_hook
+mono_install_ftnptr_eh_callback
 mono_install_load_aot_data_hook
 mono_install_runtime_cleanup
 mono_install_unhandled_exception_hook
@@ -486,18 +488,23 @@ mono_jit_init_version
 mono_jit_parse_options
 mono_jit_set_aot_mode
 mono_jit_set_aot_only
+mono_jit_set_domain
 mono_jit_set_trace_options
 mono_jit_thread_attach
-mono_jit_thread_detach
 mono_ldstr
 mono_ldtoken
 mono_load_remote_field
 mono_load_remote_field_new
+mono_lock_free_alloc
+mono_lock_free_allocator_check_consistency
+mono_lock_free_allocator_init_allocator
+mono_lock_free_allocator_init_size_class
+mono_lock_free_free
 mono_lock_free_queue_dequeue
 mono_lock_free_queue_enqueue
 mono_lock_free_queue_init
-mono_lock_free_queue_node_unpoison
 mono_lock_free_queue_node_init
+mono_lock_free_queue_node_unpoison
 mono_locks_dump
 mono_lookup_icall_symbol
 mono_lookup_internal_call
@@ -635,6 +642,8 @@ mono_monitor_enter_v4
 mono_monitor_exit
 mono_monitor_try_enter
 mono_mprotect
+mono_native_thread_id_get
+mono_native_thread_set_name
 mono_object_castclass_mbyref
 mono_object_clone
 mono_object_describe
@@ -829,6 +838,8 @@ mono_thread_get_main
 mono_thread_get_managed_id
 mono_thread_get_name_utf8
 mono_thread_get_undeniable_exception
+mono_thread_hazardous_try_free
+mono_thread_info_detach
 mono_thread_init
 mono_thread_is_foreign
 mono_thread_manage
@@ -838,7 +849,9 @@ mono_thread_set_manage_callback
 mono_thread_stop
 mono_threads_assert_gc_safe_region
 mono_threads_assert_gc_unsafe_region
+mono_threads_attach_coop
 mono_threads_attach_tools_thread
+mono_threads_detach_coop
 mono_threads_enter_gc_safe_region
 mono_threads_enter_gc_unsafe_region
 mono_threads_exit_gc_safe_region
index d686ca0d90942115580eb285e3023703273a11f9..246785ccb6bb385ffafa5bf4fae289ee2d46361b 100644 (file)
@@ -15,6 +15,7 @@ mono_array_new_full
 mono_array_new_specific
 mono_assemblies_cleanup
 mono_assemblies_init
+mono_assembly_addref
 mono_assembly_close
 mono_assembly_fill_assembly_name
 mono_assembly_foreach
@@ -473,6 +474,7 @@ mono_install_assembly_preload_hook
 mono_install_assembly_refonly_preload_hook
 mono_install_assembly_refonly_search_hook
 mono_install_assembly_search_hook
+mono_install_ftnptr_eh_callback
 mono_install_load_aot_data_hook
 mono_install_runtime_cleanup
 mono_install_unhandled_exception_hook
@@ -488,18 +490,23 @@ mono_jit_init_version
 mono_jit_parse_options
 mono_jit_set_aot_mode
 mono_jit_set_aot_only
+mono_jit_set_domain
 mono_jit_set_trace_options
 mono_jit_thread_attach
-mono_jit_thread_detach
 mono_ldstr
 mono_ldtoken
 mono_load_remote_field
 mono_load_remote_field_new
+mono_lock_free_alloc
+mono_lock_free_allocator_check_consistency
+mono_lock_free_allocator_init_allocator
+mono_lock_free_allocator_init_size_class
+mono_lock_free_free
 mono_lock_free_queue_dequeue
 mono_lock_free_queue_enqueue
 mono_lock_free_queue_init
-mono_lock_free_queue_node_unpoison
 mono_lock_free_queue_node_init
+mono_lock_free_queue_node_unpoison
 mono_locks_dump
 mono_lookup_icall_symbol
 mono_lookup_internal_call
@@ -637,6 +644,8 @@ mono_monitor_enter_v4
 mono_monitor_exit
 mono_monitor_try_enter
 mono_mprotect
+mono_native_thread_id_get
+mono_native_thread_set_name
 mono_object_castclass_mbyref
 mono_object_clone
 mono_object_describe
@@ -831,6 +840,8 @@ mono_thread_get_main
 mono_thread_get_managed_id
 mono_thread_get_name_utf8
 mono_thread_get_undeniable_exception
+mono_thread_hazardous_try_free
+mono_thread_info_detach
 mono_thread_init
 mono_thread_is_foreign
 mono_thread_manage
@@ -840,7 +851,9 @@ mono_thread_set_manage_callback
 mono_thread_stop
 mono_threads_assert_gc_safe_region
 mono_threads_assert_gc_unsafe_region
+mono_threads_attach_coop
 mono_threads_attach_tools_thread
+mono_threads_detach_coop
 mono_threads_enter_gc_safe_region
 mono_threads_enter_gc_unsafe_region
 mono_threads_exit_gc_safe_region
diff --git a/msvc/scripts/Commons.Xml.Relaxng.pre b/msvc/scripts/Commons.Xml.Relaxng.pre
new file mode 100644 (file)
index 0000000..55520b7
--- /dev/null
@@ -0,0 +1 @@
+$(ProjectDir)\..\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay > $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs
diff --git a/msvc/scripts/RabbitMQ.Client.Apigen.post b/msvc/scripts/RabbitMQ.Client.Apigen.post
new file mode 100644 (file)
index 0000000..675c09b
--- /dev/null
@@ -0,0 +1,6 @@
+@MONO@ RabbitMQ.Client.Apigen.exe /n:v0_9 "/apiName:AMQP_0_9" $(ProjectDir)..\..\docs\specs\amqp0-9.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-9.cs
+@MONO@ RabbitMQ.Client.Apigen.exe /n:v0_8 "/apiName:AMQP_0_8" $(ProjectDir)..\..\docs\specs\amqp0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-0-8.cs
+@MONO@ RabbitMQ.Client.Apigen.exe /n:v0_8qpid "/apiName:AMQP_0_8_QPID" $(ProjectDir)..\..\docs\specs\qpid-amqp.0-8.stripped.xml $(ProjectDir)..\..\docs\specs\net_4_x-api-qpid-0-8.cs
+
+
+
index 60c66680b662b862af21bb86fa01597a91e7d203..7c775bb70c9b554b0b0df1092e9c5ae59d026546 100644 (file)
@@ -696,29 +696,10 @@ class MsbuildGenerator {
                }
                //
                // Prebuild code, might be in inputs, check:
-               //  inputs/LIBRARY-PROFILE.pre
                //  inputs/LIBRARY.pre
                //
-               string prebuild = Load (library + ".pre");
-               string prebuild_windows, prebuild_unix;
-               
-               int q = library.IndexOf ("-");
-               if (q != -1)
-                       prebuild = prebuild + Load (library.Substring (0, q) + ".pre");
-
-               if (prebuild.IndexOf ("@MONO@") != -1){
-                       prebuild_unix = prebuild.Replace ("@MONO@", "mono").Replace ("@CAT@", "cat");
-                       prebuild_windows = prebuild.Replace ("@MONO@", "").Replace ("@CAT@", "type");
-               } else {
-                       prebuild_unix = prebuild.Replace ("jay.exe", "jay");
-                       prebuild_windows = prebuild;
-               }
-               
-               const string condition_unix    = "Condition=\" '$(OS)' != 'Windows_NT' \"";
-               const string condition_windows = "Condition=\" '$(OS)' == 'Windows_NT' \"";
-               prebuild =
-                       "    <PreBuildEvent " + condition_unix + ">\n" + prebuild_unix + "\n    </PreBuildEvent>" + NewLine +
-                       "    <PreBuildEvent " + condition_windows + ">" + NewLine + prebuild_windows + NewLine + "    </PreBuildEvent>" + NewLine;
+               string prebuild = GenerateStep (library, ".pre", "PreBuildEvent");
+               string postbuild = GenerateStep (library, ".post", "PostBuildEvent");
 
                var all_args = new Queue<string []> ();
                all_args.Enqueue (flags.Split ());
@@ -752,7 +733,6 @@ class MsbuildGenerator {
                }
 
                string [] source_files;
-               //Console.WriteLine ("Base: {0} res: {1}", base_dir, response);
                using (var reader = new StreamReader (NativeName (base_dir + "\\" + response))) {
                        source_files = reader.ReadToEnd ().Split ();
                }
@@ -812,7 +792,10 @@ class MsbuildGenerator {
                if (embedded_resources.Count > 0) {
                        resources.AppendFormat ("  <ItemGroup>" + NewLine);
                        foreach (var dk in embedded_resources) {
-                               resources.AppendFormat ("    <EmbeddedResource Include=\"{0}\">" + NewLine, dk.Key);
+                               var source = dk.Key;
+                               if (source.EndsWith (".resources"))
+                                       source = source.Replace (".resources", ".resx");
+                               resources.AppendFormat ("    <EmbeddedResource Include=\"{0}\">" + NewLine, source);
                                resources.AppendFormat ("      <LogicalName>{0}</LogicalName>" + NewLine, dk.Value);
                                resources.AppendFormat ("    </EmbeddedResource>" + NewLine);
                        }
@@ -877,15 +860,6 @@ class MsbuildGenerator {
                        build_output_dir = Path.GetDirectoryName (LibraryOutput);
                else
                        build_output_dir = "bin\\Debug\\" + library;
-               
-
-               string postbuild_unix = string.Empty;
-               string postbuild_windows = string.Empty;
-
-               var postbuild =  
-                       "    <PostBuildEvent " + condition_unix + ">" + NewLine + postbuild_unix + NewLine + "    </PostBuildEvent>" + NewLine +
-                       "    <PostBuildEvent " + condition_windows + ">" + NewLine + postbuild_windows + NewLine + "    </PostBuildEvent>";
-                       
 
                bool basic_or_build = (library.Contains ("-basic") || library.Contains ("-build"));
 
@@ -923,8 +897,8 @@ class MsbuildGenerator {
                        Replace ("@DEBUGTYPE@", want_debugging_support ? "full" : "pdbonly").
                        Replace ("@REFERENCES@", refs.ToString ()).
                        Replace ("@PREBUILD@", prebuild).
-                       Replace ("@STARTUPOBJECT@", main == null ? "" : $"<StartupObject>{main}</StartupObject>").
                        Replace ("@POSTBUILD@", postbuild).
+                       Replace ("@STARTUPOBJECT@", main == null ? "" : $"<StartupObject>{main}</StartupObject>").
                        //Replace ("@ADDITIONALLIBPATHS@", String.Format ("<AdditionalLibPaths>{0}</AdditionalLibPaths>", string.Join (",", libs.ToArray ()))).
                        Replace ("@ADDITIONALLIBPATHS@", String.Empty).
                        Replace ("@RESOURCES@", resources.ToString ()).
@@ -939,6 +913,30 @@ class MsbuildGenerator {
                return Csproj;
        }
 
+       string GenerateStep (string library, string suffix, string eventKey)
+       {
+               string target = Load (library + suffix);
+               string target_windows, target_unix;
+
+               int q = library.IndexOf ("-");
+               if (q != -1)
+                       target = target + Load (library.Substring (0, q) + suffix);
+                       
+               if (target.IndexOf ("@MONO@") != -1){
+                       target_unix = target.Replace ("@MONO@", "mono").Replace ("@CAT@", "cat");
+                       target_windows = target.Replace ("@MONO@", "").Replace ("@CAT@", "type");
+               } else {
+                       target_unix = target.Replace ("jay.exe", "jay");
+                       target_windows = target;
+               }
+               const string condition_unix    = "Condition=\" '$(OS)' != 'Windows_NT' \"";
+               const string condition_windows = "Condition=\" '$(OS)' == 'Windows_NT' \"";
+               var result =
+                       $"    <{eventKey} {condition_unix}>\n{target_unix}\n    </{eventKey}>{NewLine}" +
+                       $"    <{eventKey} {condition_windows}>{NewLine}{target_windows}{NewLine}    </{eventKey}>";
+               return result;
+       }
+       
        void AddProjectReference (StringBuilder refs, VsCsproj result, MsbuildGenerator match, string r, string alias)
        {
                refs.AppendFormat ("    <ProjectReference Include=\"{0}\">{1}", GetRelativePath (result.csProjFilename, match.CsprojFilename), NewLine);
index 1d220e23fac778114dc662ab284b6103385f7bbe..fba952f0701f56e37bebc921a4bd5de1510f0c88 100644 (file)
@@ -28,12 +28,6 @@ class Prepare {
                }
 
                switch (args [1]){
-               case "xml":
-                       Filter (bdir + "/class/System.XML/System.Xml.XPath/Parser.jay",
-                               bdir + "/class/System.XML/Mono.Xml.Xsl/PatternParser.jay",
-                               (i, o) => o.Write (i.ReadToEnd ().Replace ("%start Expr", "%start Pattern")));
-                       break;
-
                case "core":
                        Filter (bdir + "/build/common/Consts.cs.in",
                                bdir + "/build/common/Consts.cs",
index ba17c5e4e215857005ff74c9b74f17746742998a..55750f27a09c017337d8d581cb0980efa79ee477 100644 (file)
@@ -23,10 +23,10 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Security-net_4_x", "
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Core-net_4_x", "mcs/class/System.Core/System.Core-net_4_x.csproj", "{359142A1-D80F-401E-AA64-7167C9317649}"
 EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Posix-net_4_x", "mcs/class/Mono.Posix/Mono.Posix-net_4_x.csproj", "{66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}"
-EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.CompilerServices.SymbolWriter-net_4_x", "mcs/class/Mono.CompilerServices.SymbolWriter/Mono.CompilerServices.SymbolWriter-net_4_x.csproj", "{88177C4B-894F-485D-B95A-44199C06BE9F}"
 EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Mono.Posix-net_4_x", "mcs/class/Mono.Posix/Mono.Posix-net_4_x.csproj", "{66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}"
+EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "System.Core-plaincore-net_4_x", "mcs/class/System.Core/System.Core-plaincore-net_4_x.csproj", "{1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}"
 EndProject
 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "resgen-net_4_x", "mcs/tools/resgen/resgen-net_4_x.csproj", "{647DC12E-A4EE-424A-9EC7-CE6643EE2EF7}"
@@ -725,14 +725,14 @@ Global
                {359142A1-D80F-401E-AA64-7167C9317649}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {359142A1-D80F-401E-AA64-7167C9317649}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {359142A1-D80F-401E-AA64-7167C9317649}.Release|Any CPU.Build.0 = Release|Any CPU
-               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
-               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
-               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
-               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Release|Any CPU.Build.0 = Release|Any CPU
                {88177C4B-894F-485D-B95A-44199C06BE9F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {88177C4B-894F-485D-B95A-44199C06BE9F}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {88177C4B-894F-485D-B95A-44199C06BE9F}.Release|Any CPU.ActiveCfg = Release|Any CPU
                {88177C4B-894F-485D-B95A-44199C06BE9F}.Release|Any CPU.Build.0 = Release|Any CPU
+               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Debug|Any CPU.Build.0 = Debug|Any CPU
+               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Release|Any CPU.ActiveCfg = Release|Any CPU
+               {66DBB049-785B-4C2E-9EF6-C9E163F7DDD1}.Release|Any CPU.Build.0 = Release|Any CPU
                {1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
                {1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}.Debug|Any CPU.Build.0 = Debug|Any CPU
                {1EC0EBC0-0B35-454C-89AE-3F8F0FDD9705}.Release|Any CPU.ActiveCfg = Release|Any CPU
index d4e07fd8965d5796ac61c0cf557c18c12a2e1d11..b4c6b68c22369b55c3ffcb20899241328b3287f5 100644 (file)
@@ -11,7 +11,7 @@ MONO_OPTIONS_SRC = $(SRC_ROOT)/mcs/class/Mono.Options/Mono.Options/Options.cs
 
 .stamp-clone:
        @if [ ! -d $(CPPSHARP_DIR) ]; then \
-               git clone git@github.com:xamarin/CppSharpBinaries.git $(CPPSHARP_DIR) && touch $@; \
+               git clone git://github.com/xamarin/CppSharpBinaries.git $(CPPSHARP_DIR) && touch $@; \
        fi
 
 MonoAotOffsetsDumper.exe: .stamp-clone MonoAotOffsetsDumper.cs $(MONO_OPTIONS_SRC)